Adding robots.txt override via admin control panel
This is a requested low priority feature in #418 - I created the changes to follow similarly to how the Instance Description is handled.
This commit is contained in:
parent
4b104879cd
commit
993532bc1f
10 changed files with 62 additions and 1 deletions
|
|
@ -159,6 +159,11 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<template #label>{{ i18n.ts.enableBotTrending }}<span v-if="otherForm.modifiedStates.enableBotTrending" class="_modified">{{ i18n.ts.modified }}</span></template>
|
||||
<template #caption>{{ i18n.ts.turnOffBotTrending }}</template>
|
||||
</MkSwitch>
|
||||
|
||||
<MkTextarea v-model="otherForm.state.robotsTxt">
|
||||
<template #label>{{ i18n.ts.robotsTxt }}<span v-if="otherForm.modifiedStates.robotsTxt" class="_modified">{{ i18n.ts.modified }}</span></template>
|
||||
<template #caption>{{ i18n.ts.robotsTxtDescription }}</template>
|
||||
</MkTextarea>
|
||||
</div>
|
||||
</MkFolder>
|
||||
|
||||
|
|
@ -369,10 +374,12 @@ const serviceWorkerForm = useForm({
|
|||
const otherForm = useForm({
|
||||
enableAchievements: meta.enableAchievements,
|
||||
enableBotTrending: meta.enableBotTrending,
|
||||
robotsTxt: meta.robotsTxt,
|
||||
}, async (state) => {
|
||||
await os.apiWithDialog('admin/update-meta', {
|
||||
enableAchievements: state.enableAchievements,
|
||||
enableBotTrending: state.enableBotTrending,
|
||||
robotsTxt: state.robotsTxt,
|
||||
});
|
||||
fetchInstance(true);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue