2020-10-17 14:12:00 +03:00
|
|
|
<template>
|
2020-11-25 14:31:34 +02:00
|
|
|
<FormBase>
|
2021-01-23 09:52:45 +02:00
|
|
|
<FormLink to="/settings/update">Misskey Update</FormLink>
|
|
|
|
|
2020-12-19 03:55:52 +02:00
|
|
|
<FormSwitch :value="$i.injectFeaturedNote" @update:value="onChangeInjectFeaturedNote">
|
2020-12-26 03:47:36 +02:00
|
|
|
{{ $ts.showFeaturedNotesInTimeline }}
|
2020-11-25 14:31:34 +02:00
|
|
|
</FormSwitch>
|
|
|
|
|
2021-01-08 14:43:56 +02:00
|
|
|
<FormSwitch v-model:value="reportError">{{ $ts.sendErrorReports }}<template #desc>{{ $ts.sendErrorReportsDescription }}</template></FormSwitch>
|
|
|
|
|
2020-12-26 03:47:36 +02:00
|
|
|
<FormLink to="/settings/account-info">{{ $ts.accountInfo }}</FormLink>
|
|
|
|
<FormLink to="/settings/experimental-features">{{ $ts.experimentalFeatures }}</FormLink>
|
2020-11-25 14:31:34 +02:00
|
|
|
|
|
|
|
<FormGroup>
|
2020-12-26 03:47:36 +02:00
|
|
|
<template #label>{{ $ts.developer }}</template>
|
2020-11-25 14:31:34 +02:00
|
|
|
<FormSwitch v-model:value="debug" @update:value="changeDebug">
|
2020-11-01 04:39:38 +02:00
|
|
|
DEBUG MODE
|
2020-11-25 14:31:34 +02:00
|
|
|
</FormSwitch>
|
|
|
|
<template v-if="debug">
|
|
|
|
<FormButton @click="taskmanager">Task Manager</FormButton>
|
|
|
|
</template>
|
|
|
|
</FormGroup>
|
2021-01-11 13:38:34 +02:00
|
|
|
|
|
|
|
<FormLink to="/settings/registry"><template #icon><Fa :icon="faCogs"/></template>{{ $ts.registry }}</FormLink>
|
2021-01-11 13:57:48 +02:00
|
|
|
|
|
|
|
<FormButton @click="closeAccount" danger>{{ $ts.closeAccount }}</FormButton>
|
2020-11-25 14:31:34 +02:00
|
|
|
</FormBase>
|
2020-10-17 14:12:00 +03:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
2020-11-01 04:39:38 +02:00
|
|
|
import { defineAsyncComponent, defineComponent } from 'vue';
|
2021-01-11 13:38:34 +02:00
|
|
|
import { faEllipsisH, faCogs } from '@fortawesome/free-solid-svg-icons';
|
2020-11-25 14:31:34 +02:00
|
|
|
import FormSwitch from '@/components/form/switch.vue';
|
|
|
|
import FormSelect from '@/components/form/select.vue';
|
|
|
|
import FormLink from '@/components/form/link.vue';
|
|
|
|
import FormBase from '@/components/form/base.vue';
|
|
|
|
import FormGroup from '@/components/form/group.vue';
|
|
|
|
import FormButton from '@/components/form/button.vue';
|
2020-10-17 14:12:00 +03:00
|
|
|
import * as os from '@/os';
|
2020-11-01 04:39:38 +02:00
|
|
|
import { debug } from '@/config';
|
2021-01-08 14:43:56 +02:00
|
|
|
import { defaultStore } from '@/store';
|
2021-01-11 13:57:48 +02:00
|
|
|
import { signout } from '@/account';
|
2020-10-17 14:12:00 +03:00
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
components: {
|
2020-11-25 14:31:34 +02:00
|
|
|
FormBase,
|
|
|
|
FormSelect,
|
|
|
|
FormSwitch,
|
|
|
|
FormButton,
|
|
|
|
FormLink,
|
|
|
|
FormGroup,
|
2020-10-17 14:12:00 +03:00
|
|
|
},
|
|
|
|
|
|
|
|
emits: ['info'],
|
|
|
|
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
INFO: {
|
2020-12-26 03:47:36 +02:00
|
|
|
title: this.$ts.other,
|
2020-11-03 13:36:12 +02:00
|
|
|
icon: faEllipsisH
|
2020-10-17 14:12:00 +03:00
|
|
|
},
|
2021-01-11 13:38:34 +02:00
|
|
|
debug,
|
|
|
|
faCogs
|
2020-10-17 14:12:00 +03:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2021-01-08 14:43:56 +02:00
|
|
|
computed: {
|
|
|
|
reportError: defaultStore.makeGetterSetter('reportError'),
|
|
|
|
},
|
|
|
|
|
2020-10-17 14:12:00 +03:00
|
|
|
mounted() {
|
|
|
|
this.$emit('info', this.INFO);
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
2020-11-01 04:39:38 +02:00
|
|
|
changeDebug(v) {
|
|
|
|
console.log(v);
|
|
|
|
localStorage.setItem('debug', v.toString());
|
|
|
|
location.reload();
|
|
|
|
},
|
|
|
|
|
2020-10-17 14:12:00 +03:00
|
|
|
onChangeInjectFeaturedNote(v) {
|
|
|
|
os.api('i/update', {
|
|
|
|
injectFeaturedNote: v
|
|
|
|
});
|
|
|
|
},
|
2020-11-01 04:39:38 +02:00
|
|
|
|
|
|
|
taskmanager() {
|
2020-11-03 08:22:55 +02:00
|
|
|
os.popup(import('@/components/taskmanager.vue'), {
|
2020-11-01 04:39:38 +02:00
|
|
|
}, {}, 'closed');
|
2021-01-11 13:57:48 +02: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-11-01 04:39:38 +02:00
|
|
|
}
|
2020-10-17 14:12:00 +03:00
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|