diff --git a/app/api/ltData.ts b/app/api/ltData.ts
index de6e7b2..70bc165 100644
--- a/app/api/ltData.ts
+++ b/app/api/ltData.ts
@@ -15,6 +15,7 @@ interface ApiResponse
{
pages: {[key: string]: P};
categorymembers?: P[];
allpages?: P[];
+ allusers?: P[];
};
}
@@ -24,6 +25,11 @@ interface Page {
title: string;
}
+interface User {
+ userid: number;
+ name: string;
+}
+
interface CoordinatePage {
pageid: number;
ns: number;
@@ -211,6 +217,17 @@ export async function getCategoriesForPrefix(prefix: string): Promise i.title.replace(/^Category:/, '' as CommonsTitle));
}
+export async function getUsersForPrefix(prefix: string): Promise {
+ const params = {
+ list: 'allusers',
+ aulimit: 30,
+ aufrom: prefix,
+ apuprefix: prefix
+ };
+ const data = await $query>(params, {}, undefined, () => false);
+ return (data.query.allusers || []).map(i => i.name);
+}
+
export async function getFiles({
files,
user,
diff --git a/app/components/ltFilesSelector.vue b/app/components/ltFilesSelector.vue
index b0eef66..767f18a 100644
--- a/app/components/ltFilesSelector.vue
+++ b/app/components/ltFilesSelector.vue
@@ -36,7 +36,13 @@