diff --git a/client/src/assets/base.css b/client/src/assets/base.css index e9a2b6d1..7e2eb37e 100644 --- a/client/src/assets/base.css +++ b/client/src/assets/base.css @@ -64,6 +64,7 @@ --color-heading: var(--c-text-light-1); --color-text: var(--c-text-light-1); + --separator: var(--c-black-mute); --section-gap: 160px; } @@ -86,6 +87,7 @@ --color-heading: var(--c-text-dark-1); --color-text: var(--c-text-dark-2); + --separator: var(--c-white-mute); --color-hover: var() } diff --git a/client/src/assets/main.css b/client/src/assets/main.css index 0b7c340a..f28f8d1c 100644 --- a/client/src/assets/main.css +++ b/client/src/assets/main.css @@ -37,7 +37,35 @@ a { @media (prefers-color-scheme: dark) { filter: invert(0.7); } - +} + +.icon-add-margin { + width: 16px; + height: 16px; + margin: 4.25px; +} + +hr { + border: 0; + height: 1px; + width: 30%; + overflow: visible; + position: relative; + margin: 16px auto 16px auto; + background-color: var(--separator); +} + +hr:before { + content: ""; + display: inline-block; + width: 8px; + height: 8px; + background-color: var(--separator); + position: absolute; + transform: rotate(45deg); + top: -2.5px; + left: 50%; + margin: -1px 0 0 -1px; } label { @@ -59,7 +87,8 @@ input[type=text]:focus, input[type=password]:focus, input[type=email]:focus { } button { - margin-bottom: 10px; + margin-top: 5px; + margin-bottom: 5px; padding: 18px; font-size: 15px; border-radius: 6px; diff --git a/client/src/services/Windows.js b/client/src/services/Windows.js index f1980e2d..ee7fd2ae 100644 --- a/client/src/services/Windows.js +++ b/client/src/services/Windows.js @@ -6,6 +6,8 @@ const windows = { test: ref([]), main_menu: ref([]), edit_profile: ref([]), + account_settings: ref([]), + db_window: ref([]) }; const reload = ref(0); @@ -15,12 +17,11 @@ let Windows = () => { return windows }; let currentIndex = 1; -function SetupHandle(id, handle, handleData){ +function SetupHandle(id, handle){ // Update window info with handle info let win = GetWindowWithId(id); - win.handle = handleData; let currentWindowId = "window-wrapper-" + id; let currentWindowHandleId = "window-handle-" + id; diff --git a/client/src/views/HomeView.vue b/client/src/views/HomeView.vue index 14b996a9..25fff0d7 100644 --- a/client/src/views/HomeView.vue +++ b/client/src/views/HomeView.vue @@ -9,10 +9,18 @@ import { CreateWindow } from '@/services/Windows' onMounted(() => { if(GetUser()){ - CreateWindow({type: "main_menu", id: "main_menu"}) + CreateWindow({ + type: "main_menu", + id: "main_menu", + title: "Dragonroll" + }) return; } - CreateWindow({type: "login", id: "login"}); + CreateWindow({ + type: "login", + id: "login", + title: "Login" + }); } ); diff --git a/client/src/views/managers/WindowManager.vue b/client/src/views/managers/WindowManager.vue index da375840..7c7832e2 100644 --- a/client/src/views/managers/WindowManager.vue +++ b/client/src/views/managers/WindowManager.vue @@ -10,10 +10,9 @@ import EditProfileWindow from '@/views/windows/EditProfileWindow.vue' import AccountSettingsWindow from '../windows/AccountSettingsWindow.vue' import { Windows, ReloadRef } from '@/services/Windows'; +import DbWindow from '../windows/database/DbWindow.vue' // Gestionem ventanas -import useEmitter from '@/services/Emitter'; - const reload = ReloadRef(); const windows = Windows(); @@ -23,6 +22,8 @@ const register = windows.register; const test = windows.test; const main_menu = windows.main_menu; const edit_profile = windows.edit_profile; +const account_settings = windows.account_settings; +const db_window = windows.db_window; @@ -34,6 +35,7 @@ const edit_profile = windows.edit_profile; + diff --git a/client/src/views/others/VersionRender.vue b/client/src/views/others/VersionRender.vue index 9e1b3158..e87f1a42 100644 --- a/client/src/views/others/VersionRender.vue +++ b/client/src/views/others/VersionRender.vue @@ -4,7 +4,7 @@ diff --git a/client/src/views/partials/EditUserPartial.vue b/client/src/views/partials/EditUserPartial.vue index 8c2a437b..707caf8b 100644 --- a/client/src/views/partials/EditUserPartial.vue +++ b/client/src/views/partials/EditUserPartial.vue @@ -26,12 +26,30 @@ function retrieveAvatar(){ function LogOut(){ LogoutUser(); - ClearWindows({type: "main_menu"}); - CreateWindow({type: "login", id: "login"}); + ClearWindows({type: "main_menu", title: "Dragonroll"}); + CreateWindow({ + type: "login", + id: "login", + title: "Login" + }); } function EditProfile(){ - CreateWindow({type: "edit_profile", id: "edit_profile"}); + CreateWindow({ + type: "edit_profile", + id: "edit_profile", + title: "Edit Profile", + close: true + }); +} + +function EditSettings(){ + CreateWindow({ + type: "account_settings", + id: "account_settings", + title: "Dragonroll settings", + close: true + }); } onMounted(() => { @@ -75,7 +93,7 @@ onMounted(() => {
- +
@@ -90,7 +108,6 @@ onMounted(() => { .button-small { height: 32px; - margin-bottom: 0px; padding: 10px; } diff --git a/client/src/views/partials/WindowHandle.vue b/client/src/views/partials/WindowHandle.vue index 939c471f..3fe96664 100644 --- a/client/src/views/partials/WindowHandle.vue +++ b/client/src/views/partials/WindowHandle.vue @@ -7,15 +7,23 @@ const props = defineProps(['window']); const id = props.window; const closeButton = ref(null); +const backButton = ref(null); const title = ref(""); const close = ref(false); +const hasBack = ref(false); + +let backFunction; function setupHandle() { - let handleInfo = GetWindowWithId(id).handle; + let win = GetWindowWithId(id); - if(handleInfo.title) title.value = handleInfo.title; - if(handleInfo.close) close.value = true; + if(win.title) title.value = win.title; + if(win.close) close.value = true; + if(win.back) { + hasBack.value = true; + backFunction = win.back; + } } function CloseButton(){ @@ -31,7 +39,9 @@ defineExpose({