2020-10-17 05:12:00 -06:00
|
|
|
<template>
|
2020-11-25 05:31:34 -07:00
|
|
|
<FormBase>
|
2021-01-23 00:52:45 -07:00
|
|
|
<FormLink to="/settings/update">Misskey Update</FormLink>
|
|
|
|
|
2020-12-18 18:55:52 -07:00
|
|
|
<FormSwitch :value="$i.injectFeaturedNote" @update:value="onChangeInjectFeaturedNote">
|
2020-12-25 18:47:36 -07:00
|
|
|
{{ $ts.showFeaturedNotesInTimeline }}
|
2020-11-25 05:31:34 -07:00
|
|
|
</FormSwitch>
|
|
|
|
|
2021-01-08 05:43:56 -07:00
|
|
|
<FormSwitch v-model:value="reportError">{{ $ts.sendErrorReports }}<template #desc>{{ $ts.sendErrorReportsDescription }}</template></FormSwitch>
|
|
|
|
|
2020-12-25 18:47:36 -07:00
|
|
|
<FormLink to="/settings/account-info">{{ $ts.accountInfo }}</FormLink>
|
|
|
|
<FormLink to="/settings/experimental-features">{{ $ts.experimentalFeatures }}</FormLink>
|
2020-11-25 05:31:34 -07:00
|
|
|
|
|
|
|
<FormGroup>
|
2020-12-25 18:47:36 -07:00
|
|
|
<template #label>{{ $ts.developer }}</template>
|
2020-11-25 05:31:34 -07:00
|
|
|
<FormSwitch v-model:value="debug" @update:value="changeDebug">
|
2020-10-31 20:39:38 -06:00
|
|
|
DEBUG MODE
|
2020-11-25 05:31:34 -07:00
|
|
|
</FormSwitch>
|
|
|
|
<template v-if="debug">
|
|
|
|
<FormButton @click="taskmanager">Task Manager</FormButton>
|
|
|
|
</template>
|
|
|
|
</FormGroup>
|
2021-01-11 04:38:34 -07:00
|
|
|
|
2021-04-20 08:22:59 -06:00
|
|
|
<FormLink to="/settings/registry"><template #icon><i class="fas fa-cogs"></i></template>{{ $ts.registry }}</FormLink>
|
2021-01-11 04:57:48 -07:00
|
|
|
|
2021-04-20 08:22:59 -06:00
|
|
|
<FormLink to="/bios" behavior="browser"><template #icon><i class="fas fa-door-open"></i></template>BIOS</FormLink>
|
|
|
|
<FormLink to="/cli" behavior="browser"><template #icon><i class="fas fa-door-open"></i></template>CLI</FormLink>
|
2021-03-02 09:03:29 -07:00
|
|
|
|
2021-01-11 04:57:48 -07:00
|
|
|
<FormButton @click="closeAccount" danger>{{ $ts.closeAccount }}</FormButton>
|
2020-11-25 05:31:34 -07:00
|
|
|
</FormBase>
|
2020-10-17 05:12:00 -06:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
2020-10-31 20:39:38 -06:00
|
|
|
import { defineAsyncComponent, defineComponent } from 'vue';
|
2021-03-23 02:30:14 -06:00
|
|
|
import FormSwitch from '@client/components/form/switch.vue';
|
|
|
|
import FormSelect from '@client/components/form/select.vue';
|
|
|
|
import FormLink from '@client/components/form/link.vue';
|
|
|
|
import FormBase from '@client/components/form/base.vue';
|
|
|
|
import FormGroup from '@client/components/form/group.vue';
|
|
|
|
import FormButton from '@client/components/form/button.vue';
|
|
|
|
import * as os from '@client/os';
|
|
|
|
import { debug } from '@client/config';
|
|
|
|
import { defaultStore } from '@client/store';
|
|
|
|
import { signout } from '@client/account';
|
|
|
|
import { unisonReload } from '@client/scripts/unison-reload';
|
2021-04-09 21:54:12 -06:00
|
|
|
import * as symbols from '@client/symbols';
|
2020-10-17 05:12:00 -06:00
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
components: {
|
2020-11-25 05:31:34 -07:00
|
|
|
FormBase,
|
|
|
|
FormSelect,
|
|
|
|
FormSwitch,
|
|
|
|
FormButton,
|
|
|
|
FormLink,
|
|
|
|
FormGroup,
|
2020-10-17 05:12:00 -06:00
|
|
|
},
|
|
|
|
|
|
|
|
emits: ['info'],
|
|
|
|
|
|
|
|
data() {
|
|
|
|
return {
|
2021-04-09 21:54:12 -06:00
|
|
|
[symbols.PAGE_INFO]: {
|
2020-12-25 18:47:36 -07:00
|
|
|
title: this.$ts.other,
|
2021-04-20 12:32:16 -06:00
|
|
|
icon: 'fas fa-ellipsis-h'
|
2020-10-17 05:12:00 -06:00
|
|
|
},
|
2021-01-11 04:38:34 -07:00
|
|
|
debug,
|
2020-10-17 05:12:00 -06:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2021-01-08 05:43:56 -07:00
|
|
|
computed: {
|
|
|
|
reportError: defaultStore.makeGetterSetter('reportError'),
|
|
|
|
},
|
|
|
|
|
2020-10-17 05:12:00 -06:00
|
|
|
mounted() {
|
2021-04-09 21:54:12 -06:00
|
|
|
this.$emit('info', this[symbols.PAGE_INFO]);
|
2020-10-17 05:12:00 -06:00
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
2020-10-31 20:39:38 -06:00
|
|
|
changeDebug(v) {
|
|
|
|
console.log(v);
|
|
|
|
localStorage.setItem('debug', v.toString());
|
2021-02-17 05:36:56 -07:00
|
|
|
unisonReload();
|
2020-10-31 20:39:38 -06:00
|
|
|
},
|
|
|
|
|
2020-10-17 05:12:00 -06:00
|
|
|
onChangeInjectFeaturedNote(v) {
|
|
|
|
os.api('i/update', {
|
|
|
|
injectFeaturedNote: v
|
|
|
|
});
|
|
|
|
},
|
2020-10-31 20:39:38 -06:00
|
|
|
|
|
|
|
taskmanager() {
|
2021-03-23 02:30:14 -06:00
|
|
|
os.popup(import('@client/components/taskmanager.vue'), {
|
2020-10-31 20:39:38 -06:00
|
|
|
}, {}, 'closed');
|
2021-01-11 04:57:48 -07:00
|
|
|
},
|
|
|
|
|
|
|
|
closeAccount() {
|
|
|
|
os.dialog({
|
|
|
|
title: this.$ts.password,
|
|
|
|
input: {
|
|
|
|
type: 'password'
|
|
|
|
}
|
|
|
|
}).then(({ canceled, result: password }) => {
|
|
|
|
if (canceled) return;
|
|
|
|
os.api('i/delete-account', {
|
|
|
|
password: password
|
|
|
|
}).then(() => {
|
|
|
|
signout();
|
|
|
|
});
|
|
|
|
});
|
2020-10-31 20:39:38 -06:00
|
|
|
}
|
2020-10-17 05:12:00 -06:00
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|