From 3e003962dcf423bfcd9654a18c0f044ddf65a03f Mon Sep 17 00:00:00 2001 From: Dennis Postma Date: Mon, 10 Jun 2024 02:39:00 +0200 Subject: [PATCH] Fixed characters not showing after logging in, added loading screen before showing characters, worked on GM tools --- public/assets/icons/loading-icon1.svg | 1 + public/assets/icons/loading-icon2.svg | 1 + src/App.vue | 5 ++- src/assets/scss/main.scss | 8 +++-- src/components/screens/Characters.vue | 31 ++++++++++++++++--- src/components/screens/Login.vue | 10 ++++++ src/components/utilities/Modal.vue | 20 +++++++----- .../utilities/gmTools/GmUtilityWindow.vue | 19 ++++++++++-- src/services/authentication.ts | 6 ++-- src/stores/socket.ts | 10 ++++-- 10 files changed, 85 insertions(+), 26 deletions(-) create mode 100644 public/assets/icons/loading-icon1.svg create mode 100644 public/assets/icons/loading-icon2.svg diff --git a/public/assets/icons/loading-icon1.svg b/public/assets/icons/loading-icon1.svg new file mode 100644 index 0000000..ea54de3 --- /dev/null +++ b/public/assets/icons/loading-icon1.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/assets/icons/loading-icon2.svg b/public/assets/icons/loading-icon2.svg new file mode 100644 index 0000000..fa56388 --- /dev/null +++ b/public/assets/icons/loading-icon2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/App.vue b/src/App.vue index 832afdf..10285f8 100644 --- a/src/App.vue +++ b/src/App.vue @@ -18,13 +18,12 @@ import Game from '@/components/Game.vue' const screen: Ref = ref('login') const socket = useSocketStore() -socket.$subscribe( - (mutation, state) => { +socket.$subscribe((mutation, state) => { if (!state.connection) { screen.value = 'login' } - if (state.connection) { + if (state.token && state.connection) { screen.value = 'characters' if (state.character) { diff --git a/src/assets/scss/main.scss b/src/assets/scss/main.scss index 88e553d..f9af2fc 100644 --- a/src/assets/scss/main.scss +++ b/src/assets/scss/main.scss @@ -16,12 +16,12 @@ body { } h1, h2, h3, h4, h5, h6, button, a { - font-family: "Poppins"; + font-family: "Poppins", serif; color: $white; } p, span, li, label { - font-family: "Inter"; + font-family: "Inter", serif; color: $white; } button, a { @@ -37,6 +37,10 @@ button, input { button { text-align: center; + &.w-full { + width: 100%; + } + &.btn-cyan { background-color: rgba($cyan, 0.5); border: 1px solid $white; diff --git a/src/components/screens/Characters.vue b/src/components/screens/Characters.vue index 0cfef1b..2efa61e 100644 --- a/src/components/screens/Characters.vue +++ b/src/components/screens/Characters.vue @@ -1,7 +1,7 @@