-
+
-
+
-
-
-
-
-
-
-
- {{usernameState}}
-
-
- {updateEvent(value)}"/>
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ {{usernameState}}
+
+
+
+ {updateEvent(value)}"/>
+
+
+
+
+
+
+
+
diff --git a/components/OuterComponents.vue b/components/OuterComponents.vue
index 4284b00..83745ee 100644
--- a/components/OuterComponents.vue
+++ b/components/OuterComponents.vue
@@ -10,19 +10,37 @@
import {couchDBBaseURL} from "~/utils/URIs";
const usersDB = new PouchDB(`${couchDBBaseURL}/_users`, {skip_setup: true});
+ const session = await usersDB.getSession()
let {width, height} = useWindowSize()
let route = useRoute()
+ const events = ['2024test', '2024trial']
+
+ let selectedEvent = ref(window.localStorage.getItem("event"))
+
+ function updateEvent(value: string){
+ window.localStorage.setItem("event", value)
+ }
+
+ const {usernameState, sessionState, logout}: {
+ logout: () => Promise
;
+ // noinspection TypeScriptUnresolvedReference
+ loginState: Ref>;
+ // noinspection TypeScriptUnresolvedReference
+ sessionState: Ref>;
+ // noinspection TypeScriptUnresolvedReference
+ usernameState: Ref>;
+ updateUsernameState: () => Promise
+ } = inject(loginStateKey)!
+
let links: VerticalNavigationLink[] = [
{ label: "Dashboard", to: "/dashboard" },
{ label: "Matches", to: "/matches" },
{ label: "Teams", to: "/teams" },
- { label: "Competitions", to: "/competitions" },
{ label: "Attachments", to: "/attachments" }
]
- let session = await usersDB.getSession()
if (session.userCtx.roles?.indexOf("_admin") != -1){
links.push({ label: "Users", to: "/users" })
}
@@ -34,9 +52,29 @@
-
+
+
+
+
+
+
+
+
+ {{usernameState}}
+
+
+
+ {updateEvent(value)}"/>
+
+
+
+
+
+
+
+
From 4dde9bb932b167eff85fb2a0eb672e4082aa4dbf Mon Sep 17 00:00:00 2001
From: Ryan Bauroth <25bauroth@da.org>
Date: Fri, 2 Feb 2024 21:01:54 -0500
Subject: [PATCH 06/42] made significant changes to OuterComponents.vue and
Navbar.vue to remove profile picture and top bar and add a settings icon.
Still needs work to make side bar not scroll with page
---
components/Navbar.vue | 77 ++++++++++++++++------------------
components/OuterComponents.vue | 72 ++++++++++++++++++++++---------
2 files changed, 90 insertions(+), 59 deletions(-)
diff --git a/components/Navbar.vue b/components/Navbar.vue
index 22e3f6a..1912614 100644
--- a/components/Navbar.vue
+++ b/components/Navbar.vue
@@ -14,6 +14,10 @@ const {usernameState, sessionState, logout}: {
updateUsernameState: () => Promise
} = inject(loginStateKey)!
+const events = ['2024test', '2024trial']
+
+let selectedEvent = ref(window.localStorage.getItem("event"))
+
let props = defineProps({
scoutMode: {
type: Boolean,
@@ -33,7 +37,6 @@ let links: VerticalNavigationLink[] = [
{ label: "Dashboard", to: "/dashboard" },
{ label: "Matches", to: "/matches" },
{ label: "Teams", to: "/teams" },
- { label: "Competitions", to: "/competitions" },
{ label: "Attachments", to: "/attachments" },
{ label: "Contacts", to: "/contacts" }
]
@@ -41,64 +44,58 @@ console.log(sessionState?.value?.userCtx?.roles)
if (sessionState?.value?.userCtx?.roles?.indexOf('_admin') != -1)
links.push({ label: "Users", to: "/users" })
-const events = ['2024test', '2024trial']
-
-let selectedEvent = ref(window.localStorage.getItem("event"))
-
-function updateEvent(value: string){
- window.localStorage.setItem("event", value)
-}
-
-
+
-
+
-
-
-
-
-
-
-
- {{usernameState}}
-
-
- {updateEvent(value)}"/>
-
-
-
-
-
-
-
-
-
+
+
\ No newline at end of file
diff --git a/components/OuterComponents.vue b/components/OuterComponents.vue
index 4284b00..f29ef7d 100644
--- a/components/OuterComponents.vue
+++ b/components/OuterComponents.vue
@@ -3,26 +3,43 @@
import LoginState from "~/utils/authorization/LoginState";
import {loginStateKey} from "~/utils/keys";
import AddButton from "~/components/AddButton.vue";
- import SessionResponse = PouchDB.Authentication.SessionResponse;
import type {VerticalNavigationLink} from "#ui/types";
import type {Ref} from "@vue/reactivity";
import type {UnwrapRef} from "vue";
import {couchDBBaseURL} from "~/utils/URIs";
const usersDB = new PouchDB(`${couchDBBaseURL}/_users`, {skip_setup: true});
+ const session = await usersDB.getSession()
let {width, height} = useWindowSize()
let route = useRoute()
+ const events = ['2024test', '2024trial']
+
+ let selectedEvent = ref(window.localStorage.getItem("event"))
+
+ function updateEvent(value: string){
+ window.localStorage.setItem("event", value)
+ }
+
+ const {usernameState, sessionState, logout}: {
+ logout: () => Promise
;
+ // noinspection TypeScriptUnresolvedReference
+ loginState: Ref>;
+ // noinspection TypeScriptUnresolvedReference
+ sessionState: Ref>;
+ // noinspection TypeScriptUnresolvedReference
+ usernameState: Ref>;
+ updateUsernameState: () => Promise
+ } = inject(loginStateKey)!
+
let links: VerticalNavigationLink[] = [
{ label: "Dashboard", to: "/dashboard" },
{ label: "Matches", to: "/matches" },
{ label: "Teams", to: "/teams" },
- { label: "Competitions", to: "/competitions" },
{ label: "Attachments", to: "/attachments" }
]
- let session = await usersDB.getSession()
if (session.userCtx.roles?.indexOf("_admin") != -1){
links.push({ label: "Users", to: "/users" })
}
@@ -34,9 +51,29 @@
-
+
+
@@ -49,24 +86,21 @@
\ No newline at end of file
From 50260fea0f641d49b45e3c10785a85cbe4a3e1ea Mon Sep 17 00:00:00 2001
From: Ryan Bauroth <25bauroth@da.org>
Date: Fri, 2 Feb 2024 21:13:01 -0500
Subject: [PATCH 07/42] quick fix
---
components/Navbar.vue | 27 ---------------------------
components/OuterComponents.vue | 20 --------------------
2 files changed, 47 deletions(-)
diff --git a/components/Navbar.vue b/components/Navbar.vue
index ed913d6..c320704 100644
--- a/components/Navbar.vue
+++ b/components/Navbar.vue
@@ -52,33 +52,6 @@ if (sessionState?.value?.userCtx?.roles?.indexOf('_admin') != -1)
-
-
-
-
-
-
-
-
diff --git a/components/OuterComponents.vue b/components/OuterComponents.vue
index fbf10fc..45339ff 100644
--- a/components/OuterComponents.vue
+++ b/components/OuterComponents.vue
@@ -54,26 +54,6 @@
-
From cb779d7ab42cdd86529a643c73f185b463fc3069 Mon Sep 17 00:00:00 2001
From: Ryan Bauroth <25bauroth@da.org>
Date: Fri, 2 Feb 2024 21:17:49 -0500
Subject: [PATCH 08/42] changed style to css
---
components/Navbar.vue | 4 ++--
components/OuterComponents.vue | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/components/Navbar.vue b/components/Navbar.vue
index c320704..6714d24 100644
--- a/components/Navbar.vue
+++ b/components/Navbar.vue
@@ -58,13 +58,13 @@ if (sessionState?.value?.userCtx?.roles?.indexOf('_admin') != -1)
-
+