This commit is contained in:
31
client/app/pages/preferences.vue
Normal file
31
client/app/pages/preferences.vue
Normal file
@@ -0,0 +1,31 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user