[client] Remove post indexing UI

This commit is contained in:
Laura Hausmann 2023-11-18 19:30:22 +01:00
parent 361176448e
commit 4f3bf91e7f
No known key found for this signature in database
GPG Key ID: D044E84C5BE01605
4 changed files with 0 additions and 46 deletions

View File

@ -1085,11 +1085,6 @@ migrationConfirm: "Are you absolutely sure you want to migrate your account to {
as the account you're moving from." as the account you're moving from."
defaultReaction: "Default emoji reaction for outgoing and incoming posts" defaultReaction: "Default emoji reaction for outgoing and incoming posts"
license: "License" license: "License"
indexPosts: "Index Posts"
indexFrom: "Index from Post ID onwards"
indexFromDescription: "Leave blank to index every post"
indexNotice: "Now indexing. This will probably take a while, please don't restart
your server for at least an hour."
customKaTeXMacro: "Custom KaTeX macros" customKaTeXMacro: "Custom KaTeX macros"
customKaTeXMacroDescription: "Set up macros to write mathematical expressions easily! customKaTeXMacroDescription: "Set up macros to write mathematical expressions easily!
The notation conforms to the LaTeX command definitions and is written as \\newcommand{\\ The notation conforms to the LaTeX command definitions and is written as \\newcommand{\\

View File

@ -7,9 +7,6 @@
:display-back-button="true" :display-back-button="true"
/></template> /></template>
<MkSpacer :content-max="800" :margin-min="16" :margin-max="32"> <MkSpacer :content-max="800" :margin-min="16" :margin-max="32">
<FormButton primary @click="indexPosts">{{
i18n.ts.indexPosts
}}</FormButton>
<FormSuspense <FormSuspense
v-slot="{ result: database }" v-slot="{ result: database }"
:p="databasePromiseFactory" :p="databasePromiseFactory"
@ -43,7 +40,6 @@ import bytes from "@/filters/bytes";
import number from "@/filters/number"; import number from "@/filters/number";
import { i18n } from "@/i18n"; import { i18n } from "@/i18n";
import { definePageMetadata } from "@/scripts/page-metadata"; import { definePageMetadata } from "@/scripts/page-metadata";
import { indexPosts } from "@/scripts/index-posts";
const databasePromiseFactory = () => const databasePromiseFactory = () =>
os os

View File

@ -81,7 +81,6 @@ import * as os from "@/os";
import { lookupUser } from "@/scripts/lookup-user"; import { lookupUser } from "@/scripts/lookup-user";
import { lookupFile } from "@/scripts/lookup-file"; import { lookupFile } from "@/scripts/lookup-file";
import { lookupInstance } from "@/scripts/lookup-instance"; import { lookupInstance } from "@/scripts/lookup-instance";
import { indexPosts } from "@/scripts/index-posts";
import { defaultStore } from "@/store"; import { defaultStore } from "@/store";
import { useRouter } from "@/router"; import { useRouter } from "@/router";
import { import {
@ -174,16 +173,6 @@ const menuDef = $computed(() => [
}, },
] ]
: []), : []),
...($i.isAdmin
? [
{
type: "button",
icon: "ph-list-magnifying-glass ph-bold ph-lg",
text: i18n.ts.indexPosts,
action: indexPosts,
},
]
: []),
], ],
}, },
{ {

View File

@ -1,26 +0,0 @@
import { i18n } from "@/i18n";
import * as os from "@/os";
export async function indexPosts() {
const { canceled, result: index } = await os.inputText({
title: i18n.ts.indexFrom,
text: i18n.ts.indexFromDescription,
});
if (canceled) return;
if (index == null || index === "") {
await os.api("admin/search/index-all");
await os.alert({
type: "info",
text: i18n.ts.indexNotice,
});
} else {
await os.api("admin/search/index-all", {
cursor: index,
});
await os.alert({
type: "info",
text: i18n.ts.indexNotice,
});
}
}