update translation
This commit is contained in:
parent
1e48c89528
commit
950c9b5caf
|
@ -2013,5 +2013,5 @@ _experiments:
|
||||||
alpha: "Alpha"
|
alpha: "Alpha"
|
||||||
beta: "Beta"
|
beta: "Beta"
|
||||||
release: "Release"
|
release: "Release"
|
||||||
enableExperimentalPostEditing: "Enable experimental post editing"
|
enablePostEditing: "Enable post editing"
|
||||||
experimentalPostEditingCaption: "Enables the option for users to edit their posts in post options"
|
postEditingCaption: "Shows the option for users to edit their existing posts via the post options menu"
|
||||||
|
|
|
@ -9,19 +9,19 @@
|
||||||
<MkSpacer :content-max="700" :margin-min="16" :margin-max="32">
|
<MkSpacer :content-max="700" :margin-min="16" :margin-max="32">
|
||||||
<FormSuspense :p="init">
|
<FormSuspense :p="init">
|
||||||
<FormSwitch
|
<FormSwitch
|
||||||
v-model="enableExperimentalPostEditing"
|
v-model="enablePostEditing"
|
||||||
@update:modelValue="save"
|
@update:modelValue="save"
|
||||||
class="_formBlock"
|
class="_formBlock"
|
||||||
>
|
>
|
||||||
<template #label>
|
<template #label>
|
||||||
<i class="ph-pencil-line ph-bold ph-lg"></i>
|
<i class="ph-pencil-line ph-bold ph-lg"></i>
|
||||||
{{ i18n.ts._experiments.enableExperimentalPostEditing }}
|
{{ i18n.ts._experiments.enablePostEditing }}
|
||||||
<span class="level alpha">
|
<span class="level alpha">
|
||||||
({{ i18n.ts._experiments.alpha }})</span
|
({{ i18n.ts._experiments.alpha }})</span
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
<template #caption>{{
|
<template #caption>{{
|
||||||
i18n.ts._experiments.experimentalPostEditingCaption
|
i18n.ts._experiments.postEditingCaption
|
||||||
}}</template>
|
}}</template>
|
||||||
</FormSwitch>
|
</FormSwitch>
|
||||||
</FormSuspense>
|
</FormSuspense>
|
||||||
|
@ -39,7 +39,7 @@ import { fetchInstance } from "@/instance";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||||
|
|
||||||
let enableExperimentalPostEditing = $ref(false);
|
let enablePostEditing = $ref(false);
|
||||||
let meta = $ref<MetaExperiments | null>(null);
|
let meta = $ref<MetaExperiments | null>(null);
|
||||||
|
|
||||||
type MetaExperiments = {
|
type MetaExperiments = {
|
||||||
|
@ -52,14 +52,13 @@ async function init() {
|
||||||
meta = (await os.api("admin/meta")) as MetaExperiments;
|
meta = (await os.api("admin/meta")) as MetaExperiments;
|
||||||
if (!meta) return;
|
if (!meta) return;
|
||||||
|
|
||||||
enableExperimentalPostEditing =
|
enablePostEditing = meta.experimentalFeatures?.postEditing ?? false;
|
||||||
meta.experimentalFeatures?.postEditing ?? false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function save() {
|
function save() {
|
||||||
const experiments: MetaExperiments = {
|
const experiments: MetaExperiments = {
|
||||||
experimentalFeatures: {
|
experimentalFeatures: {
|
||||||
postEditing: enableExperimentalPostEditing,
|
postEditing: enablePostEditing,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
os.apiWithDialog("admin/update-meta", experiments).then(() => {
|
os.apiWithDialog("admin/update-meta", experiments).then(() => {
|
||||||
|
|
Loading…
Reference in New Issue