iceshrimp-legacy/src/web/app/dev/views/app.vue

40 lines
644 B
Vue
Raw Normal View History

2018-02-27 16:11:28 +01:00
<template>
2018-02-27 21:43:14 +01:00
<mk-ui>
2018-02-27 16:11:28 +01:00
<p v-if="fetching">読み込み中</p>
2018-02-27 21:43:14 +01:00
<b-card v-if="!fetching" :header="app.name">
<b-form-group label="App Secret">
<b-input :value="app.secret" readonly/>
</b-form-group>
</b-card>
</mk-ui>
2018-02-27 16:11:28 +01:00
</template>
<script lang="ts">
import Vue from 'vue';
export default Vue.extend({
data() {
return {
fetching: true,
app: null
};
},
watch: {
$route: 'fetch'
},
mounted() {
this.fetch();
},
methods: {
fetch() {
this.fetching = true;
(this as any).api('app/show', {
2018-03-28 09:39:14 +02:00
appId: this.$route.params.id
2018-02-27 16:11:28 +01:00
}).then(app => {
this.app = app;
this.fetching = false;
});
}
}
});
</script>