summaryrefslogtreecommitdiff
path: root/packages/client/src/pages/admin/other-settings.vue
blob: 552b05f34758af6c92f3b03951e4585a9cbebbfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<template>
<MkSpacer :content-max="700" :margin-min="16" :margin-max="32">
	<FormSuspense :p="init">
		none
	</FormSuspense>
</MkSpacer>
</template>

<script lang="ts" setup>
import { } from 'vue';
import FormSuspense from '@/components/form/suspense.vue';
import * as os from '@/os';
import * as symbols from '@/symbols';
import { fetchInstance } from '@/instance';
import { i18n } from '@/i18n';

async function init() {
	await os.api('admin/meta');
}

function save() {
	os.apiWithDialog('admin/update-meta').then(() => {
		fetchInstance();
	});
}

defineExpose({
  [symbols.PAGE_INFO]: {
		title: i18n.ts.other,
		icon: 'fas fa-cogs',
		bg: 'var(--bg)',
		actions: [{
			asFullButton: true,
			icon: 'fas fa-check',
			text: i18n.ts.save,
			handler: save,
		}],
	}
});
</script>