Move user menu to sidebar, fixes #35
This commit is contained in:
@@ -25,52 +25,34 @@ const user = page.props.auth.user;
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<AppLayout>
|
||||
<Head title="Profile settings" />
|
||||
<AppLayout title="Profile settings">
|
||||
|
||||
<SettingsLayout>
|
||||
<div class="flex flex-col space-y-6">
|
||||
<HeadingSmall title="Profile information" description="Update your name and email address" />
|
||||
|
||||
<Form v-bind="ProfileController.update.form()" class="space-y-6" v-slot="{ errors, processing, recentlySuccessful }">
|
||||
<Form v-bind="ProfileController.update.form()" class="space-y-6"
|
||||
v-slot="{ errors, processing, recentlySuccessful }">
|
||||
<div class="grid gap-2">
|
||||
<Label for="name">Name</Label>
|
||||
<Input
|
||||
id="name"
|
||||
class="mt-1 block w-full"
|
||||
name="name"
|
||||
:default-value="user.name"
|
||||
required
|
||||
autocomplete="name"
|
||||
placeholder="Full name"
|
||||
/>
|
||||
<Input id="name" class="mt-1 block w-full" name="name" :default-value="user.name" required
|
||||
autocomplete="name" placeholder="Full name" />
|
||||
<InputError class="mt-2" :message="errors.name" />
|
||||
</div>
|
||||
|
||||
<div class="grid gap-2">
|
||||
<Label for="email">Email address</Label>
|
||||
<Input
|
||||
id="email"
|
||||
type="email"
|
||||
class="mt-1 block w-full"
|
||||
name="email"
|
||||
:default-value="user.email"
|
||||
required
|
||||
autocomplete="username"
|
||||
placeholder="Email address"
|
||||
/>
|
||||
<Input id="email" type="email" class="mt-1 block w-full" name="email"
|
||||
:default-value="user.email" required autocomplete="username" placeholder="Email address" />
|
||||
<InputError class="mt-2" :message="errors.email" />
|
||||
</div>
|
||||
|
||||
<div v-if="mustVerifyEmail && !user.email_verified_at">
|
||||
<p class="-mt-4 text-sm text-muted-foreground">
|
||||
Your email address is unverified.
|
||||
<Link
|
||||
:href="send()"
|
||||
as="button"
|
||||
class="text-foreground underline decoration-neutral-300 underline-offset-4 transition-colors duration-300 ease-out hover:decoration-current! dark:decoration-neutral-500"
|
||||
>
|
||||
Click here to resend the verification email.
|
||||
<Link :href="send()" as="button"
|
||||
class="text-foreground underline decoration-neutral-300 underline-offset-4 transition-colors duration-300 ease-out hover:decoration-current! dark:decoration-neutral-500">
|
||||
Click here to resend the verification email.
|
||||
</Link>
|
||||
</p>
|
||||
|
||||
@@ -81,28 +63,17 @@ const user = page.props.auth.user;
|
||||
|
||||
<div class="grid gap-2">
|
||||
<Label for="avatar">Avatar</Label>
|
||||
<Input
|
||||
id="avatar"
|
||||
type="avatar"
|
||||
class="mt-1 block w-full"
|
||||
name="avatar"
|
||||
:default-value="user.avatar"
|
||||
required
|
||||
autocomplete="username"
|
||||
placeholder="avatar address"
|
||||
/>
|
||||
<Input id="avatar" type="avatar" class="mt-1 block w-full" name="avatar"
|
||||
:default-value="user.avatar" required autocomplete="username"
|
||||
placeholder="avatar address" />
|
||||
<InputError class="mt-2" :message="errors.email" />
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-4">
|
||||
<Button :disabled="processing" data-test="update-profile-button">Save</Button>
|
||||
|
||||
<Transition
|
||||
enter-active-class="transition ease-in-out"
|
||||
enter-from-class="opacity-0"
|
||||
leave-active-class="transition ease-in-out"
|
||||
leave-to-class="opacity-0"
|
||||
>
|
||||
<Transition enter-active-class="transition ease-in-out" enter-from-class="opacity-0"
|
||||
leave-active-class="transition ease-in-out" leave-to-class="opacity-0">
|
||||
<p v-show="recentlySuccessful" class="text-sm text-neutral-600">Saved.</p>
|
||||
</Transition>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user