funkwhale/front/src/components/auth/ApplicationNew.vue

55 wiersze
1.3 KiB
Vue
Czysty Zwykły widok Historia

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>
<template>
2021-12-06 10:35:20 +00:00
<main
v-title="labels.title"
class="main pusher"
>
<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>
</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>
</h2>
<application-form
:defaults="defaults"
2021-12-06 10:35:20 +00:00
@created="$router.push({name: 'settings.applications.edit', params: {id: $event.client_id}})"
/>
</section>
</div>
</main>
</template>