2018-02-12 16:22:43 +02:00
|
|
|
<template>
|
2018-02-22 14:15:24 +02:00
|
|
|
<div class="root api">
|
2018-05-27 07:49:09 +03:00
|
|
|
<p>%i18n:@token% <code>{{ $store.state.i.token }}</code></p>
|
2018-04-14 19:04:40 +03:00
|
|
|
<p>%i18n:@intro%</p>
|
|
|
|
<div class="ui info warn"><p>%fa:exclamation-triangle%%i18n:@caution%</p></div>
|
|
|
|
<p>%i18n:@regeneration-of-token%</p>
|
|
|
|
<button class="ui" @click="regenerateToken">%i18n:@regenerate-token%</button>
|
2018-02-12 16:22:43 +02:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
|
|
|
|
|
|
|
export default Vue.extend({
|
|
|
|
methods: {
|
|
|
|
regenerateToken() {
|
2018-02-22 14:15:24 +02:00
|
|
|
(this as any).apis.input({
|
2018-05-20 14:26:38 +03:00
|
|
|
title: '%i18n:@enter-password%',
|
2018-02-22 14:15:24 +02:00
|
|
|
type: 'password'
|
|
|
|
}).then(password => {
|
2018-02-18 05:35:18 +02:00
|
|
|
(this as any).api('i/regenerate_token', {
|
2018-02-12 16:22:43 +02:00
|
|
|
password: password
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="stylus" scoped>
|
2018-02-22 14:15:24 +02:00
|
|
|
.root.api
|
2018-02-12 16:22:43 +02:00
|
|
|
code
|
|
|
|
display inline-block
|
|
|
|
padding 4px 6px
|
|
|
|
color #555
|
|
|
|
background #eee
|
|
|
|
border-radius 2px
|
|
|
|
</style>
|