diff options
Diffstat (limited to 'src/client/app/dev')
| -rw-r--r-- | src/client/app/dev/script.ts | 46 | ||||
| -rw-r--r-- | src/client/app/dev/style.styl | 10 | ||||
| -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 |
7 files changed, 0 insertions, 231 deletions
diff --git a/src/client/app/dev/script.ts b/src/client/app/dev/script.ts deleted file mode 100644 index 9adcb84d7c..0000000000 --- a/src/client/app/dev/script.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Developer Center - */ - -import Vue from 'vue'; -import VueRouter from 'vue-router'; -import BootstrapVue from 'bootstrap-vue'; -import 'bootstrap/dist/css/bootstrap.css'; -import 'bootstrap-vue/dist/bootstrap-vue.css'; - -// Style -import './style.styl'; - -import init from '../init'; - -import Index from './views/index.vue'; -import Apps from './views/apps.vue'; -import AppNew from './views/new-app.vue'; -import App from './views/app.vue'; -import ui from './views/ui.vue'; -import NotFound from '../common/views/pages/not-found.vue'; - -Vue.use(BootstrapVue); - -Vue.component('mk-ui', ui); - -/** - * init - */ -init(launch => { - // Init router - const router = new VueRouter({ - mode: 'history', - base: '/dev/', - routes: [ - { path: '/', component: Index }, - { path: '/apps', component: Apps }, - { path: '/app/new', component: AppNew }, - { path: '/app/:id', component: App }, - { path: '*', component: NotFound } - ] - }); - - // Launch the app - launch(router); -}); diff --git a/src/client/app/dev/style.styl b/src/client/app/dev/style.styl deleted file mode 100644 index e635897b17..0000000000 --- a/src/client/app/dev/style.styl +++ /dev/null @@ -1,10 +0,0 @@ -@import "../app" -@import "../reset" - -// Bootstrapのデザインを崩すので: -* - position initial - background-clip initial !important - -html - background-color #fff 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> |