clean up login state
This commit is contained in:
parent
3afac8e66b
commit
e27d2ebd2e
@ -14,7 +14,9 @@
|
|||||||
{
|
{
|
||||||
id: 'sign-out',
|
id: 'sign-out',
|
||||||
color: 'danger',
|
color: 'danger',
|
||||||
action: () => {},
|
action: async () => {
|
||||||
|
await mrAuth.logout()
|
||||||
|
},
|
||||||
hoverFilledOnly: true,
|
hoverFilledOnly: true,
|
||||||
},
|
},
|
||||||
]"
|
]"
|
||||||
@ -46,30 +48,22 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { Avatar, OverflowMenu, LogOutIcon, LogInIcon, Modal } from 'omorphia'
|
import { Avatar, OverflowMenu, LogOutIcon, LogInIcon, Modal } from 'omorphia'
|
||||||
|
|
||||||
import { useTheming } from '@/store/state'
|
import { useTheming } from '@/store/state'
|
||||||
import ModrinthLoginScreen from '@/components/ui/tutorial/ModrinthLoginScreen.vue'
|
|
||||||
import { useMrAuth } from '@/composables/auth.js'
|
import { useMrAuth } from '@/composables/auth.js'
|
||||||
|
|
||||||
const themeStore = useTheming()
|
import ModrinthLoginScreen from '@/components/ui/tutorial/ModrinthLoginScreen.vue'
|
||||||
|
|
||||||
|
const themeStore = useTheming()
|
||||||
const mrAuth = useMrAuth()
|
const mrAuth = useMrAuth()
|
||||||
|
|
||||||
const modrinthLoginModal = ref(null)
|
const modrinthLoginModal = ref(null)
|
||||||
|
|
||||||
const refreshCredentials = async () => {
|
|
||||||
await mrAuth.get()
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(async () => {
|
|
||||||
await refreshCredentials()
|
|
||||||
})
|
|
||||||
|
|
||||||
const signInAfter = async () => {
|
const signInAfter = async () => {
|
||||||
modrinthLoginModal.value?.hide()
|
modrinthLoginModal.value?.hide()
|
||||||
await refreshCredentials()
|
await mrAuth.get()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user