* wip * tabun ok * better msg * oops * fix lint * Update gulpfile.ts Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com> * Update src/client/scripts/set-i18n-contexts.ts Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com> * refactor Co-authored-by: acid-chicken <root@acid-chicken.com> * ✨ * wip * fix lint * たぶんおk * fix flush * Translate Notification * remove console.log * fix * add notifications * remove san * wip * ok * ✌️ * Update src/prelude/array.ts Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com> * wip * i18n refactor * Update init.ts * ✌️ Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com> Co-authored-by: syuilo <syuilotan@yahoo.co.jp>
44 lines
986 B
Vue
44 lines
986 B
Vue
<template>
|
|
<section class="_card">
|
|
<div class="_title"><fa :icon="faKey"/> API</div>
|
|
<div class="_content">
|
|
<mk-input :value="$store.state.i.token" readonly>
|
|
<span>{{ $t('token') }}</span>
|
|
</mk-input>
|
|
<mk-button @click="regenerateToken"><fa :icon="faSyncAlt"/> {{ $t('regenerate') }}</mk-button>
|
|
</div>
|
|
</section>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import Vue from 'vue';
|
|
import { faKey, faSyncAlt } from '@fortawesome/free-solid-svg-icons';
|
|
import MkButton from '../../components/ui/button.vue';
|
|
import MkInput from '../../components/ui/input.vue';
|
|
|
|
export default Vue.extend({
|
|
components: {
|
|
MkButton, MkInput
|
|
},
|
|
data() {
|
|
return {
|
|
faKey, faSyncAlt
|
|
};
|
|
},
|
|
methods: {
|
|
regenerateToken() {
|
|
this.$root.dialog({
|
|
title: this.$t('password'),
|
|
input: {
|
|
type: 'password'
|
|
}
|
|
}).then(({ canceled, result: password }) => {
|
|
if (canceled) return;
|
|
this.$root.api('i/regenerate_token', {
|
|
password: password
|
|
});
|
|
});
|
|
},
|
|
}
|
|
});
|
|
</script>
|