You've already forked AstralRinth
forked from didirus/AstralRinth
Switch to official launcher auth (#1118)
* Switch to official launcher auth * add debug info * Fix build
This commit is contained in:
21
theseus_gui/src/store/error.js
Normal file
21
theseus_gui/src/store/error.js
Normal file
@@ -0,0 +1,21 @@
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
export const useError = defineStore('errorsStore', {
|
||||
state: () => ({
|
||||
errorModal: null,
|
||||
}),
|
||||
actions: {
|
||||
setErrorModal(ref) {
|
||||
this.errorModal = ref
|
||||
},
|
||||
showError(error) {
|
||||
this.errorModal.show(error)
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
export const handleSevereError = (err) => {
|
||||
const error = useError()
|
||||
error.showError(err)
|
||||
console.error(err)
|
||||
}
|
||||
Reference in New Issue
Block a user