summaryrefslogtreecommitdiff
path: root/src/web/app/dev/views/app.vue
blob: 2c2a3c83ce7834eae7b63dd2313d35f5146befdb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<template>
<mk-ui>
	<p v-if="fetching">読み込み中</p>
	<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>
</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', {
				app_id: this.$route.params.id
			}).then(app => {
				this.app = app;
				this.fetching = false;
			});
		}
	}
});
</script>