feat: minecraft required modal (#6797)

* feat: minecraft required modal

* pnpm prepr

* refactor: move steve to /assets and turn it to webp

* refactor: rename to steve look up left

---------

Co-authored-by: Prospector <6166773+Prospector@users.noreply.github.com>
This commit is contained in:
Truman Gao
2026-07-21 19:09:34 +00:00
committed by GitHub
co-authored by Prospector
parent 074699be45
commit 7ac1d17571
6 changed files with 182 additions and 18 deletions
+13
View File
@@ -6,6 +6,7 @@ export const useError = defineStore('errorsStore', {
state: () => ({
errorModal: null,
minecraftAuthErrorModal: null,
minecraftRequiredModal: null,
}),
actions: {
setErrorModal(ref) {
@@ -14,7 +15,19 @@ export const useError = defineStore('errorsStore', {
setMinecraftAuthErrorModal(ref) {
this.minecraftAuthErrorModal = ref
},
setMinecraftRequiredModal(ref) {
this.minecraftRequiredModal = ref
},
showError(error, context, closable = true, source = null) {
const errorMessage = error.message?.toLowerCase()
if (
(errorMessage?.includes('user is not logged in') ||
errorMessage?.includes('cannot play instance since minecraft is required')) &&
this.minecraftRequiredModal
) {
this.minecraftRequiredModal.show()
return
}
if (
error.message &&
(error.message.includes('Minecraft authentication error:') ||