Skip to content

Commit

Permalink
chore(sidebar/icon): swap sensitive hidden on/off icon
Browse files Browse the repository at this point in the history
  • Loading branch information
qwqcode committed Sep 2, 2024
1 parent 4b5ec39 commit f29d2f8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ui/artalk-sidebar/src/components/PreferenceItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function toggleSensitiveHidden() {
/>
<div v-if="isSensitive" class="input-suffix">
<div class="hidden-switch" @click="toggleSensitiveHidden()">
<i :class="['atk-icon', `atk-icon-eye-${sensitiveHidden ? 'on' : 'off'}`]" />
<i :class="['atk-icon', `atk-icon-eye-${sensitiveHidden ? 'off' : 'on'}`]" />
</div>
</div>
</template>
Expand Down
11 changes: 5 additions & 6 deletions ui/plugin-auth/UserProfileDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const UserProfileDialog = (props: UserProfileDialogProps) => {
if (!data.is_login) {
ctx.get('user').logout()
onClose()
throw new Error('No login')
}
return { ...data.user, token: '' }
})
Expand All @@ -35,11 +36,9 @@ export const UserProfileDialog = (props: UserProfileDialogProps) => {
const backHome = () => setPage(homePage)

return (
<Show when={() => userInfo.loading} fallback={<>Loading...</>}>
<Dialog showBackBtn={showBackBtn} onBack={backHome} onClose={onClose} title={title}>
{() => pages[page()]()}
</Dialog>
</Show>
<Dialog showBackBtn={showBackBtn} onBack={backHome} onClose={onClose} title={title}>
{() => pages[page()]()}
</Dialog>
)
}

Expand All @@ -59,7 +58,7 @@ const UserBasicProfileForm = (
code: '',
})

const needVerify = () => fields.email !== user()?.email
const needVerify = () => !user.loading && fields.email !== user()?.email

const submitHandler = (e: SubmitEvent) => {
e.preventDefault()
Expand Down

0 comments on commit f29d2f8

Please sign in to comment.