diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2020-01-30 04:37:25 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-30 04:37:25 +0900 |
| commit | f6154dc0af1a0d65819e87240f4385f9573095cb (patch) | |
| tree | 699a5ca07d6727b7f8497d4769f25d6d62f94b5a /src/client/app/dev/views | |
| parent | Add Event activity-type support (#5785) (diff) | |
| download | sharkey-f6154dc0af1a0d65819e87240f4385f9573095cb.tar.gz sharkey-f6154dc0af1a0d65819e87240f4385f9573095cb.tar.bz2 sharkey-f6154dc0af1a0d65819e87240f4385f9573095cb.zip | |
v12 (#5712)
Co-authored-by: MeiMei <30769358+mei23@users.noreply.github.com>
Co-authored-by: Satsuki Yanagi <17376330+u1-liquid@users.noreply.github.com>
Diffstat (limited to 'src/client/app/dev/views')
| -rw-r--r-- | src/client/app/dev/views/app.vue | 41 | ||||
| -rw-r--r-- | src/client/app/dev/views/apps.vue | 39 | ||||
| -rw-r--r-- | src/client/app/dev/views/index.vue | 13 | ||||
| -rw-r--r-- | src/client/app/dev/views/new-app.vue | 62 | ||||
| -rw-r--r-- | src/client/app/dev/views/ui.vue | 20 |
5 files changed, 0 insertions, 175 deletions
diff --git a/src/client/app/dev/views/app.vue b/src/client/app/dev/views/app.vue deleted file mode 100644 index 2379d71aa5..0000000000 --- a/src/client/app/dev/views/app.vue +++ /dev/null @@ -1,41 +0,0 @@ -<template> -<mk-ui> - <p v-if="fetching">{{ $t('@.loading') }}</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'; -import i18n from '../../i18n'; -export default Vue.extend({ - i18n: i18n(), - data() { - return { - fetching: true, - app: null - }; - }, - watch: { - $route: 'fetch' - }, - mounted() { - this.fetch(); - }, - methods: { - fetch() { - this.fetching = true; - this.$root.api('app/show', { - appId: this.$route.params.id - }).then(app => { - this.app = app; - this.fetching = false; - }); - } - } -}); -</script> diff --git a/src/client/app/dev/views/apps.vue b/src/client/app/dev/views/apps.vue deleted file mode 100644 index b99ccdf576..0000000000 --- a/src/client/app/dev/views/apps.vue +++ /dev/null @@ -1,39 +0,0 @@ -<template> -<mk-ui> - <b-card :header="$t('manage-apps')"> - <b-button to="/app/new" variant="primary">{{ $t('create-app') }}</b-button> - <hr> - <div class="apps"> - <p v-if="fetching">{{ $t('@.loading') }}</p> - <template v-if="!fetching"> - <b-alert v-if="apps.length == 0">{{ $t('app-missing') }}</b-alert> - <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> -</template> - -<script lang="ts"> -import Vue from 'vue'; -import i18n from '../../i18n'; -export default Vue.extend({ - i18n: i18n('dev/views/apps.vue'), - data() { - return { - fetching: true, - apps: [] - }; - }, - mounted() { - this.$root.api('my/apps').then(apps => { - this.apps = apps; - this.fetching = false; - }); - } -}); -</script> diff --git a/src/client/app/dev/views/index.vue b/src/client/app/dev/views/index.vue deleted file mode 100644 index db0e4d57c2..0000000000 --- a/src/client/app/dev/views/index.vue +++ /dev/null @@ -1,13 +0,0 @@ -<template> -<mk-ui> - <b-button to="/apps" variant="primary">{{ $t('manage-apps') }}</b-button> -</mk-ui> -</template> - -<script lang="ts"> -import Vue from 'vue'; -import i18n from '../../i18n'; -export default Vue.extend({ - i18n: i18n('dev/views/index.vue') -}); -</script> diff --git a/src/client/app/dev/views/new-app.vue b/src/client/app/dev/views/new-app.vue deleted file mode 100644 index dbb41211cc..0000000000 --- a/src/client/app/dev/views/new-app.vue +++ /dev/null @@ -1,62 +0,0 @@ -<template> -<mk-ui> - <b-card :header="$t('new-app')"> - <b-alert show variant="info"><fa icon="info-circle"/> {{ $t('new-app-info') }}</b-alert> - <b-form @submit.prevent="onSubmit" autocomplete="off"> - <b-form-group :label="$t('app-name')" :description="$t('app-name-desc')"> - <b-form-input v-model="name" type="text" :placeholder="$t('app-name-placeholder')" autocomplete="off" required/> - </b-form-group> - <b-form-group :label="$t('app-overview')" :description="$t('app-overview-desc')"> - <b-textarea v-model="description" :placeholder="$t('app-overview-placeholder')" autocomplete="off" required></b-textarea> - </b-form-group> - <b-form-group :label="$t('callback-url')" :description="$t('callback-url-desc')"> - <b-input v-model="cb" type="url" :placeholder="$t('callback-url-placeholder')" autocomplete="off"/> - </b-form-group> - <b-card :header="$t('authority')"> - <b-form-group :description="$t('authority-desc')"> - <b-alert show variant="warning"><fa icon="exclamation-triangle"/> {{ $t('authority-warning') }}</b-alert> - <b-form-checkbox-group v-model="permission" stacked> - <b-form-checkbox v-for="v in permissionsList" :value="v" :key="v">{{ $t(`@.permissions.${v}`) }} ({{ v }})</b-form-checkbox> - </b-form-checkbox-group> - </b-form-group> - </b-card> - <hr> - <b-button type="submit" variant="primary">{{ $t('create-app') }}</b-button> - </b-form> - </b-card> -</mk-ui> -</template> - -<script lang="ts"> -import Vue from 'vue'; -import i18n from '../../i18n'; -import { kinds } from '../../../../server/api/kinds'; - -export default Vue.extend({ - i18n: i18n('dev/views/new-app.vue'), - data() { - return { - name: '', - description: '', - cb: '', - nidState: null, - permission: [], - permissionsList: kinds - }; - }, - methods: { - onSubmit() { - this.$root.api('app/create', { - name: this.name, - description: this.description, - callbackUrl: this.cb, - permission: this.permission - }).then(() => { - location.href = '/dev/apps'; - }).catch(() => { - alert(this.$t('@.dev.failed-to-create')); - }); - } - } -}); -</script> diff --git a/src/client/app/dev/views/ui.vue b/src/client/app/dev/views/ui.vue deleted file mode 100644 index f1e001909f..0000000000 --- a/src/client/app/dev/views/ui.vue +++ /dev/null @@ -1,20 +0,0 @@ -<template> -<div> - <b-navbar toggleable="md" type="dark" variant="info"> - <b-navbar-brand>Developers</b-navbar-brand> - <b-navbar-nav> - <b-nav-item to="/">Home</b-nav-item> - <b-nav-item to="/apps">Apps</b-nav-item> - </b-navbar-nav> - </b-navbar> - <main> - <slot></slot> - </main> -</div> -</template> - -<style lang="stylus" scoped> -main - padding 32px - max-width 700px -</style> |