mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-27 10:14:06 +00:00
## Summary Should stop this from flipping back and forth depending on which user the harness ends up with. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8033-Fix-test-Mask-username-field-in-settings-since-it-s-not-deterministic-2e76d73d3650811e85f4fc4ca2253e7e) by [Unito](https://www.unito.io) --------- Co-authored-by: github-actions <github-actions@github.com>
38 lines
924 B
Vue
38 lines
924 B
Vue
<!-- A message that displays the current user -->
|
|
<template>
|
|
<Message
|
|
v-if="userStore.isMultiUserServer"
|
|
severity="info"
|
|
icon="pi pi-user"
|
|
pt:text="w-full"
|
|
>
|
|
<div class="flex items-center justify-between">
|
|
<div data-testid="current-user-indicator">
|
|
{{ $t('g.currentUser') }}: {{ userStore.currentUser?.username }}
|
|
</div>
|
|
<Button
|
|
class="text-inherit"
|
|
variant="textonly"
|
|
size="icon"
|
|
:aria-label="$t('menuLabels.Sign Out')"
|
|
@click="logout"
|
|
>
|
|
<i class="pi pi-sign-out" />
|
|
</Button>
|
|
</div>
|
|
</Message>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import Message from 'primevue/message'
|
|
|
|
import Button from '@/components/ui/button/Button.vue'
|
|
import { useUserStore } from '@/stores/userStore'
|
|
|
|
const userStore = useUserStore()
|
|
const logout = async () => {
|
|
await userStore.logout()
|
|
window.location.reload()
|
|
}
|
|
</script>
|