32 lines
733 B
Vue
32 lines
733 B
Vue
<template>
|
|
<div>
|
|
<AppHeader title="Preferences" secondary />
|
|
|
|
<form class="flex flex-col gap-3 p-3" @submit.prevent="save">
|
|
<PrimeFloatLabel variant="on">
|
|
<PrimeInputText id="username" v-model="localUsername" size="large" class="w-full" />
|
|
<label for="username">Username</label>
|
|
</PrimeFloatLabel>
|
|
|
|
<PrimeButton label="Save" type="submit" />
|
|
</form>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
definePageMeta({
|
|
name: 'Preferences',
|
|
})
|
|
|
|
const { username } = usePreferences()
|
|
const toast = useToast()
|
|
|
|
const localUsername = ref(username.value)
|
|
|
|
function save() {
|
|
username.value = localUsername.value
|
|
|
|
toast.add({ severity: 'success', summary: 'Saved', life: 3000 })
|
|
}
|
|
</script>
|