2018-02-12 15:22:43 +01:00
|
|
|
<template>
|
2018-02-22 13:15:24 +01:00
|
|
|
<div class="root api">
|
2018-03-25 17:19:07 +02:00
|
|
|
<p>Token: <code>{{ os.i.account.token }}</code></p>
|
2018-02-12 15:22:43 +01:00
|
|
|
<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() {
|
2018-02-22 13:15:24 +01:00
|
|
|
(this as any).apis.input({
|
|
|
|
title: '%i18n:desktop.tags.mk-api-info.enter-password%',
|
|
|
|
type: 'password'
|
|
|
|
}).then(password => {
|
2018-02-18 04:35:18 +01:00
|
|
|
(this as any).api('i/regenerate_token', {
|
2018-02-12 15:22:43 +01:00
|
|
|
password: password
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="stylus" scoped>
|
2018-02-22 13:15:24 +01:00
|
|
|
.root.api
|
2018-02-12 15:22:43 +01:00
|
|
|
color #4a535a
|
|
|
|
|
|
|
|
code
|
|
|
|
display inline-block
|
|
|
|
padding 4px 6px
|
|
|
|
color #555
|
|
|
|
background #eee
|
|
|
|
border-radius 2px
|
|
|
|
</style>
|