[client] Remove post indexing UI
This commit is contained in:
parent
361176448e
commit
4f3bf91e7f
4 changed files with 0 additions and 46 deletions
|
@ -1085,11 +1085,6 @@ migrationConfirm: "Are you absolutely sure you want to migrate your account to {
|
|||
as the account you're moving from."
|
||||
defaultReaction: "Default emoji reaction for outgoing and incoming posts"
|
||||
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"
|
||||
customKaTeXMacroDescription: "Set up macros to write mathematical expressions easily!
|
||||
The notation conforms to the LaTeX command definitions and is written as \\newcommand{\\
|
||||
|
|
|
@ -7,9 +7,6 @@
|
|||
:display-back-button="true"
|
||||
/></template>
|
||||
<MkSpacer :content-max="800" :margin-min="16" :margin-max="32">
|
||||
<FormButton primary @click="indexPosts">{{
|
||||
i18n.ts.indexPosts
|
||||
}}</FormButton>
|
||||
<FormSuspense
|
||||
v-slot="{ result: database }"
|
||||
:p="databasePromiseFactory"
|
||||
|
@ -43,7 +40,6 @@ import bytes from "@/filters/bytes";
|
|||
import number from "@/filters/number";
|
||||
import { i18n } from "@/i18n";
|
||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||
import { indexPosts } from "@/scripts/index-posts";
|
||||
|
||||
const databasePromiseFactory = () =>
|
||||
os
|
||||
|
|
|
@ -81,7 +81,6 @@ import * as os from "@/os";
|
|||
import { lookupUser } from "@/scripts/lookup-user";
|
||||
import { lookupFile } from "@/scripts/lookup-file";
|
||||
import { lookupInstance } from "@/scripts/lookup-instance";
|
||||
import { indexPosts } from "@/scripts/index-posts";
|
||||
import { defaultStore } from "@/store";
|
||||
import { useRouter } from "@/router";
|
||||
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,
|
||||
},
|
||||
]
|
||||
: []),
|
||||
],
|
||||
},
|
||||
{
|
||||
|
|
|
@ -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,
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue