51 lines
1.6 KiB
Vue
51 lines
1.6 KiB
Vue
<script setup lang="ts">
|
|
import { useForm } from '@inertiajs/vue3';
|
|
import Button from '@/components/ui/Button.vue';
|
|
import Input from '@/components/ui/Input.vue';
|
|
import SettingsCard from '@/components/SettingsCard.vue';
|
|
import { useTranslations } from '@/composables/useVanguard';
|
|
import AppLayout from '@/layouts/AppLayout.vue';
|
|
|
|
const props = defineProps<{ values: { app_name: string } }>();
|
|
|
|
const { __ } = useTranslations();
|
|
|
|
const form = useForm({ app_name: props.values.app_name ?? '' });
|
|
|
|
function submit() {
|
|
form.post(route('settings.general.update'), { preserveScroll: true });
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<AppLayout
|
|
:title="__('General Settings')"
|
|
:heading="__('General Settings')"
|
|
:breadcrumbs="[{ label: __('Settings') }, { label: __('General') }]"
|
|
>
|
|
<form class="max-w-3xl" @submit.prevent="submit">
|
|
<SettingsCard>
|
|
<div>
|
|
<label for="app_name" class="mb-1 block text-slate-700">{{ __('Name') }}</label>
|
|
<Input
|
|
id="app_name"
|
|
v-model="form.app_name"
|
|
class="w-full"
|
|
:invalid="Boolean(form.errors.app_name)"
|
|
/>
|
|
<small v-if="form.errors.app_name" class="text-red-600">
|
|
{{ form.errors.app_name }}
|
|
</small>
|
|
</div>
|
|
</SettingsCard>
|
|
|
|
<Button
|
|
type="submit"
|
|
:label="__('Update')"
|
|
class="mt-4"
|
|
:loading="form.processing"
|
|
/>
|
|
</form>
|
|
</AppLayout>
|
|
</template>
|