2022-07-11 00:31:08 +00:00
|
|
|
<script setup lang="ts">
|
|
|
|
import ApplicationForm from '~/components/auth/ApplicationForm.vue'
|
|
|
|
import { computed, reactive } from 'vue'
|
|
|
|
import { useGettext } from 'vue3-gettext'
|
|
|
|
|
|
|
|
interface Props {
|
|
|
|
name?: string
|
|
|
|
scopes?: string
|
|
|
|
redirectUris?: string
|
|
|
|
}
|
|
|
|
|
|
|
|
const props = withDefaults(defineProps<Props>(), {
|
|
|
|
name: '',
|
|
|
|
scopes: '',
|
|
|
|
redirectUris: ''
|
|
|
|
})
|
|
|
|
|
|
|
|
const defaults = reactive({
|
|
|
|
name: props.name,
|
|
|
|
scopes: props.scopes,
|
2022-07-21 01:21:36 +00:00
|
|
|
redirectUris: props.redirectUris
|
2022-07-11 00:31:08 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
const { $pgettext } = useGettext()
|
|
|
|
const labels = computed(() => ({
|
|
|
|
title: $pgettext('Content/Settings/Button.Label', 'Create a new application')
|
|
|
|
}))
|
|
|
|
</script>
|
|
|
|
|
2019-03-25 16:02:51 +00:00
|
|
|
<template>
|
2021-12-06 10:35:20 +00:00
|
|
|
<main
|
|
|
|
v-title="labels.title"
|
|
|
|
class="main pusher"
|
|
|
|
>
|
2019-03-25 16:02:51 +00:00
|
|
|
<div class="ui vertical stripe segment">
|
|
|
|
<section class="ui text container">
|
|
|
|
<router-link :to="{name: 'settings'}">
|
2021-12-06 10:35:20 +00:00
|
|
|
<translate translate-context="Content/Applications/Link">
|
|
|
|
Back to settings
|
|
|
|
</translate>
|
2019-03-25 16:02:51 +00:00
|
|
|
</router-link>
|
|
|
|
<h2 class="ui header">
|
2021-12-06 10:35:20 +00:00
|
|
|
<translate translate-context="Content/Settings/Button.Label">
|
|
|
|
Create a new application
|
|
|
|
</translate>
|
2019-03-25 16:02:51 +00:00
|
|
|
</h2>
|
|
|
|
<application-form
|
2019-05-03 10:24:08 +00:00
|
|
|
:defaults="defaults"
|
2021-12-06 10:35:20 +00:00
|
|
|
@created="$router.push({name: 'settings.applications.edit', params: {id: $event.client_id}})"
|
|
|
|
/>
|
2019-03-25 16:02:51 +00:00
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
</main>
|
|
|
|
</template>
|