2018-02-27 09:11:28 -06:00
|
|
|
<template>
|
2018-02-27 14:43:14 -06:00
|
|
|
<mk-ui>
|
2018-10-20 13:01:09 -05:00
|
|
|
<b-card header="%i18n:@manage-apps%">
|
|
|
|
<b-button to="/app/new" variant="primary">%i18n:@create-app%</b-button>
|
2018-02-27 14:43:14 -06:00
|
|
|
<hr>
|
|
|
|
<div class="apps">
|
2018-10-20 13:01:09 -05:00
|
|
|
<p v-if="fetching">%i18n:common.loading%</p>
|
2018-02-27 14:43:14 -06:00
|
|
|
<template v-if="!fetching">
|
2018-10-20 13:01:09 -05:00
|
|
|
<b-alert v-if="apps.length == 0">%i18n:@app-missing%</b-alert>
|
2018-02-27 14:43:14 -06:00
|
|
|
<b-list-group v-else>
|
|
|
|
<b-list-group-item v-for="app in apps" :key="app.id" :to="`/app/${app.id}`">
|
|
|
|
{{ app.name }}
|
|
|
|
</b-list-group-item>
|
|
|
|
</b-list-group>
|
|
|
|
</template>
|
|
|
|
</div>
|
|
|
|
</b-card>
|
|
|
|
</mk-ui>
|
2018-02-27 09:11:28 -06:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
2018-02-27 09:30:36 -06:00
|
|
|
export default Vue.extend({
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
fetching: true,
|
|
|
|
apps: []
|
|
|
|
};
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
(this as any).api('my/apps').then(apps => {
|
|
|
|
this.apps = apps;
|
|
|
|
this.fetching = false;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
2018-02-27 09:11:28 -06:00
|
|
|
</script>
|