mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-24 19:07:32 -07:00
revert e37e265751
Some checks failed
/ test-build (push) Has been cancelled
Some checks failed
/ test-build (push) Has been cancelled
revert revert a220810f76
revert Remove Experiments page
This commit is contained in:
parent
fdf5c51828
commit
204f5fabea
3 changed files with 0 additions and 85 deletions
|
@ -1,74 +0,0 @@
|
||||||
<template>
|
|
||||||
<MkStickyContainer>
|
|
||||||
<template #header
|
|
||||||
><MkPageHeader
|
|
||||||
:actions="headerActions"
|
|
||||||
:tabs="headerTabs"
|
|
||||||
:display-back-button="true"
|
|
||||||
/></template>
|
|
||||||
<MkSpacer :content-max="700" :margin-min="16" :margin-max="32">
|
|
||||||
<FormSuspense :p="init">
|
|
||||||
<FormSwitch
|
|
||||||
v-model="enablePostImports"
|
|
||||||
@update:modelValue="save"
|
|
||||||
class="_formBlock"
|
|
||||||
>
|
|
||||||
<template #label>
|
|
||||||
<i class="ph-download-simple ph-bold ph-lg"></i>
|
|
||||||
{{ i18n.ts._experiments.enablePostImports }}
|
|
||||||
</template>
|
|
||||||
<template #caption>{{
|
|
||||||
i18n.ts._experiments.postImportsCaption
|
|
||||||
}}</template>
|
|
||||||
</FormSwitch>
|
|
||||||
</FormSuspense>
|
|
||||||
</MkSpacer>
|
|
||||||
</MkStickyContainer>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup>
|
|
||||||
import {} from "vue";
|
|
||||||
import MkStickyContainer from "@/components/global/MkStickyContainer.vue";
|
|
||||||
import FormSuspense from "@/components/form/suspense.vue";
|
|
||||||
import FormSwitch from "@/components/form/switch.vue";
|
|
||||||
import * as os from "@/os";
|
|
||||||
import { fetchInstance } from "@/instance";
|
|
||||||
import { i18n } from "@/i18n";
|
|
||||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
|
||||||
|
|
||||||
let enablePostImports = $ref(false);
|
|
||||||
let meta = $ref<MetaExperiments | null>(null);
|
|
||||||
|
|
||||||
type MetaExperiments = {
|
|
||||||
experimentalFeatures?: {
|
|
||||||
postImports?: boolean;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
async function init() {
|
|
||||||
meta = (await os.api("admin/meta")) as MetaExperiments;
|
|
||||||
if (!meta) return;
|
|
||||||
|
|
||||||
enablePostImports = meta.experimentalFeatures?.postImports ?? false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function save() {
|
|
||||||
const experiments: MetaExperiments = {
|
|
||||||
experimentalFeatures: {
|
|
||||||
postImports: enablePostImports,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
os.apiWithDialog("admin/update-meta", experiments).then(() => {
|
|
||||||
fetchInstance();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
const headerActions = $computed(() => []);
|
|
||||||
|
|
||||||
const headerTabs = $computed(() => []);
|
|
||||||
|
|
||||||
definePageMetadata({
|
|
||||||
title: i18n.ts._experiments.title,
|
|
||||||
icon: "ph-flask ph-bold ph-lg",
|
|
||||||
});
|
|
||||||
</script>
|
|
|
@ -259,12 +259,6 @@ const menuDef = $computed(() => [
|
||||||
to: "/admin/database",
|
to: "/admin/database",
|
||||||
active: currentPage?.route.name === "database",
|
active: currentPage?.route.name === "database",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
icon: "ph-flask ph-bold ph-lg",
|
|
||||||
text: i18n.ts._experiments.title,
|
|
||||||
to: "/admin/experiments",
|
|
||||||
active: currentPage?.route.name === "experiments",
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -543,11 +543,6 @@ export const routes = [
|
||||||
name: "other-settings",
|
name: "other-settings",
|
||||||
component: page(() => import("./pages/admin/custom-css.vue")),
|
component: page(() => import("./pages/admin/custom-css.vue")),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: "/experiments",
|
|
||||||
name: "experiments",
|
|
||||||
component: page(() => import("./pages/admin/experiments.vue")),
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: "/",
|
path: "/",
|
||||||
component: page(() => import("./pages/_empty_.vue")),
|
component: page(() => import("./pages/_empty_.vue")),
|
||||||
|
|
Loading…
Reference in a new issue