1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-12-22 18:48:19 +09:00
MisskeyIO/src/web/app/desktop/views/components/settings.api.vue
Akihiko Odaki 19b9cb105d Introduce account document to user document
An account document is attached to a user document if an account of the
user is on the server. It may be missing if the user is on a remote server.
2018-03-26 14:07:16 +09:00

41 lines
934 B
Vue

<template>
<div class="root api">
<p>Token: <code>{{ os.i.account.token }}</code></p>
<p>%i18n:desktop.tags.mk-api-info.intro%</p>
<div class="ui info warn"><p>%fa:exclamation-triangle%%i18n:desktop.tags.mk-api-info.caution%</p></div>
<p>%i18n:desktop.tags.mk-api-info.regeneration-of-token%</p>
<button class="ui" @click="regenerateToken">%i18n:desktop.tags.mk-api-info.regenerate-token%</button>
</div>
</template>
<script lang="ts">
import Vue from 'vue';
export default Vue.extend({
methods: {
regenerateToken() {
(this as any).apis.input({
title: '%i18n:desktop.tags.mk-api-info.enter-password%',
type: 'password'
}).then(password => {
(this as any).api('i/regenerate_token', {
password: password
});
});
}
}
});
</script>
<style lang="stylus" scoped>
.root.api
color #4a535a
code
display inline-block
padding 4px 6px
color #555
background #eee
border-radius 2px
</style>