Skip to content

Commit bf1eb24

Browse files
authored
feat(profile): move logout section and refine profile-pic hover transitions to improve layout and UX (#10867)
1 parent b4c88a3 commit bf1eb24

File tree

2 files changed

+19
-26
lines changed

2 files changed

+19
-26
lines changed

apps/desktop/src/components/profileSettings/GeneralSettings.svelte

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,27 @@
149149
</div>
150150
</form>
151151
</SectionCard>
152+
153+
<SectionCard orientation="row">
154+
{#snippet title()}
155+
Signing out
156+
{/snippet}
157+
{#snippet caption()}
158+
Ready to take a break? Click here to log out and unwind.
159+
{/snippet}
160+
161+
<Button
162+
kind="outline"
163+
icon="signout"
164+
onclick={async () => {
165+
await userService.logout();
166+
}}>Log out</Button
167+
>
168+
</SectionCard>
152169
{:else}
153170
<WelcomeSigninAction />
154171
{/if}
172+
155173
<Spacer />
156174

157175
<SectionCard orientation="row" centerAlign>
@@ -235,25 +253,6 @@
235253

236254
<Spacer />
237255

238-
{#if $user}
239-
<SectionCard orientation="row">
240-
{#snippet title()}
241-
Signing out
242-
{/snippet}
243-
{#snippet caption()}
244-
Ready to take a break? Click here to log out and unwind.
245-
{/snippet}
246-
247-
<Button
248-
kind="outline"
249-
icon="signout"
250-
onclick={async () => {
251-
await userService.logout();
252-
}}>Log out</Button
253-
>
254-
</SectionCard>
255-
{/if}
256-
257256
<SectionCard orientation="row">
258257
{#snippet title()}
259258
Remove all projects

packages/ui/src/lib/components/ProfilePictureUpload.svelte

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,17 +89,12 @@
8989
border-radius: var(--radius-m);
9090
background-color: var(--clr-scale-pop-70);
9191
cursor: pointer;
92-
transition: opacity var(--transition-medium);
9392
9493
&:hover,
9594
&:focus-within {
9695
& .profile-pic__edit-label {
9796
opacity: 1;
9897
}
99-
100-
& .profile-pic {
101-
opacity: 0.8;
102-
}
10398
}
10499
}
105100
@@ -117,7 +112,6 @@
117112
height: 100%;
118113
object-fit: cover;
119114
background-color: var(--clr-core-pop-70);
120-
transition: opacity var(--transition-medium);
121115
}
122116
123117
.profile-pic__edit-label {
@@ -130,6 +124,6 @@
130124
background-color: var(--clr-core-ntrl-20);
131125
color: var(--clr-core-ntrl-100);
132126
opacity: 0;
133-
transition: opacity var(--transition-medium);
127+
transition: opacity var(--transition-fast);
134128
}
135129
</style>

0 commit comments

Comments
 (0)