diff --git a/public/information.json b/public/information.json index 25edfc5..20c0c92 100644 --- a/public/information.json +++ b/public/information.json @@ -1,7 +1,7 @@ { "discord": { - "development": "https://discord.com/oauth2/authorize?client_id=1342913183744004158&response_type=code&redirect_uri=http%3A%2F%2F192.168.1.77%3A8080%2Fredirect&scope=guilds+identify+guilds.members.read", - "production": "https://discord.com/oauth2/authorize?client_id=1094727789682380922&response_type=code&redirect_uri=https%3A%2F%2Fsubsonics.raphix.fr%2Fredirect&scope=guilds+identify+guilds.members.read" + "development": "https://discord.com/oauth2/authorize?client_id=1342913183744004158&response_type=code&redirect_uri=http%3A%2F%2F192.168.1.77%3A8080%2Fredirect&scope=identify", + "production": "https://discord.com/oauth2/authorize?client_id=1094727789682380922&response_type=code&redirect_uri=https%3A%2F%2Fsubsonics.raphix.fr%2Fredirect&scope=identify" }, "backend": { "development": "http://192.168.1.77:3000", diff --git a/src/App.vue b/src/App.vue index 0f07a0a..503eb96 100644 --- a/src/App.vue +++ b/src/App.vue @@ -2,7 +2,6 @@ - \ No newline at end of file diff --git a/src/components/Features/Account.vue b/src/components/Layout/Account.vue similarity index 64% rename from src/components/Features/Account.vue rename to src/components/Layout/Account.vue index 5902630..a0f2641 100644 --- a/src/components/Features/Account.vue +++ b/src/components/Layout/Account.vue @@ -2,11 +2,13 @@
- - + +
- +
+ + \ No newline at end of file diff --git a/src/components/Layout/Search.vue b/src/components/Layout/Search.vue new file mode 100644 index 0000000..cbb87ed --- /dev/null +++ b/src/components/Layout/Search.vue @@ -0,0 +1,35 @@ + + + + + \ No newline at end of file diff --git a/src/components/UI/Avatar.vue b/src/components/UI/Avatar.vue index 6a75fef..baff3fc 100644 --- a/src/components/UI/Avatar.vue +++ b/src/components/UI/Avatar.vue @@ -1,12 +1,13 @@ @@ -24,13 +28,14 @@ button { color: rgb(255, 255, 255); border: none; border-radius: 5px; - padding: 10px; + padding: 7px; display: flex; - gap: 10px; + gap: 5px; justify-content: center; align-items: center; text-decoration: none; transition: all 0.3s ease; + } button:hover { @@ -58,4 +63,16 @@ button:active { background-color: var(--tertiary) !important; transform: none !important ; } + +.color-lower { + background-color: var(--secondary) !important; +} + +.color-lower:hover { + background-color: var(--secondary) !important; +} + +.color-lower:active { + background-color: var(--secondary) !important; +} \ No newline at end of file diff --git a/src/components/UI/ContextMenu.vue b/src/components/UI/ContextMenu.vue new file mode 100644 index 0000000..8cda9c6 --- /dev/null +++ b/src/components/UI/ContextMenu.vue @@ -0,0 +1,113 @@ + + + \ No newline at end of file diff --git a/src/components/Layout/DefaultSplash.vue b/src/components/UI/DefaultSplash.vue similarity index 91% rename from src/components/Layout/DefaultSplash.vue rename to src/components/UI/DefaultSplash.vue index 7e10646..95d1354 100644 --- a/src/components/Layout/DefaultSplash.vue +++ b/src/components/UI/DefaultSplash.vue @@ -2,11 +2,12 @@ + \ No newline at end of file diff --git a/src/components/UI/Logo.vue b/src/components/UI/Logo.vue new file mode 100644 index 0000000..b5d8c15 --- /dev/null +++ b/src/components/UI/Logo.vue @@ -0,0 +1,24 @@ + + + \ No newline at end of file diff --git a/src/components/UI/Modal.vue b/src/components/UI/Modal.vue new file mode 100644 index 0000000..a088ec2 --- /dev/null +++ b/src/components/UI/Modal.vue @@ -0,0 +1,146 @@ + + + diff --git a/src/components/UI/ModalTree.vue b/src/components/UI/ModalTree.vue new file mode 100644 index 0000000..39007f2 --- /dev/null +++ b/src/components/UI/ModalTree.vue @@ -0,0 +1,45 @@ + + + \ No newline at end of file diff --git a/src/components/UI/Role.vue b/src/components/UI/Role.vue new file mode 100644 index 0000000..12fd8c4 --- /dev/null +++ b/src/components/UI/Role.vue @@ -0,0 +1,23 @@ + + diff --git a/src/components/UI/Selector.vue b/src/components/UI/Selector.vue new file mode 100644 index 0000000..ff27053 --- /dev/null +++ b/src/components/UI/Selector.vue @@ -0,0 +1,163 @@ + + + + + \ No newline at end of file diff --git a/src/components/Widget/ServerItem.vue b/src/components/UI/Server.vue similarity index 100% rename from src/components/Widget/ServerItem.vue rename to src/components/UI/Server.vue diff --git a/src/components/Layout/Splash.vue b/src/components/UI/Splash.vue similarity index 100% rename from src/components/Layout/Splash.vue rename to src/components/UI/Splash.vue diff --git a/src/components/UI/Success.vue b/src/components/UI/Success.vue new file mode 100644 index 0000000..5167d24 --- /dev/null +++ b/src/components/UI/Success.vue @@ -0,0 +1,30 @@ + + \ No newline at end of file diff --git a/src/components/UI/Tag.vue b/src/components/UI/Tag.vue new file mode 100644 index 0000000..c0f83ff --- /dev/null +++ b/src/components/UI/Tag.vue @@ -0,0 +1,33 @@ + + + \ No newline at end of file diff --git a/src/components/UI/User.vue b/src/components/UI/User.vue index 212f06c..081ee28 100644 --- a/src/components/UI/User.vue +++ b/src/components/UI/User.vue @@ -1,9 +1,12 @@ diff --git a/src/components/Widget/Guild/GuildHeaderUsers.vue b/src/components/Widget/Guild/GuildHeaderUsers.vue new file mode 100644 index 0000000..25f874e --- /dev/null +++ b/src/components/Widget/Guild/GuildHeaderUsers.vue @@ -0,0 +1,73 @@ + + + \ No newline at end of file diff --git a/src/components/Widget/Guild/GuildSettings.vue b/src/components/Widget/Guild/GuildSettings.vue new file mode 100644 index 0000000..7d8caaa --- /dev/null +++ b/src/components/Widget/Guild/GuildSettings.vue @@ -0,0 +1,42 @@ + + \ No newline at end of file diff --git a/src/components/Widget/Guild/Settings/GuildStats.vue b/src/components/Widget/Guild/Settings/GuildStats.vue new file mode 100644 index 0000000..90552bc --- /dev/null +++ b/src/components/Widget/Guild/Settings/GuildStats.vue @@ -0,0 +1,128 @@ + + + + \ No newline at end of file diff --git a/src/components/Widget/Guild/Settings/GuildUsers.vue b/src/components/Widget/Guild/Settings/GuildUsers.vue new file mode 100644 index 0000000..0a45e5f --- /dev/null +++ b/src/components/Widget/Guild/Settings/GuildUsers.vue @@ -0,0 +1,139 @@ + + + \ No newline at end of file diff --git a/src/components/Widget/ServerListItem.vue b/src/components/Widget/Server/ServerListItem.vue similarity index 60% rename from src/components/Widget/ServerListItem.vue rename to src/components/Widget/Server/ServerListItem.vue index f8d9ab4..0eeaedc 100644 --- a/src/components/Widget/ServerListItem.vue +++ b/src/components/Widget/Server/ServerListItem.vue @@ -1,21 +1,28 @@ \ No newline at end of file diff --git a/src/components/Widget/User/Settings/InformationSettings.vue b/src/components/Widget/User/Settings/InformationSettings.vue new file mode 100644 index 0000000..350b17d --- /dev/null +++ b/src/components/Widget/User/Settings/InformationSettings.vue @@ -0,0 +1,104 @@ + + + \ No newline at end of file diff --git a/src/components/Widget/User/Settings/PrivacySettings.vue b/src/components/Widget/User/Settings/PrivacySettings.vue new file mode 100644 index 0000000..47c0076 --- /dev/null +++ b/src/components/Widget/User/Settings/PrivacySettings.vue @@ -0,0 +1,101 @@ + + + \ No newline at end of file diff --git a/src/components/Widget/User/Settings/ThemeSelector.vue b/src/components/Widget/User/Settings/ThemeSelector.vue new file mode 100644 index 0000000..70ffff8 --- /dev/null +++ b/src/components/Widget/User/Settings/ThemeSelector.vue @@ -0,0 +1,101 @@ + + + + + \ No newline at end of file diff --git a/src/components/Widget/User/UserSettings.vue b/src/components/Widget/User/UserSettings.vue new file mode 100644 index 0000000..3fe9479 --- /dev/null +++ b/src/components/Widget/User/UserSettings.vue @@ -0,0 +1,47 @@ + + + \ No newline at end of file diff --git a/src/socket.js b/src/socket.js index cba32f6..ca05611 100644 --- a/src/socket.js +++ b/src/socket.js @@ -19,4 +19,5 @@ export const socket = io(URL, { token: localStorage.getItem("token") || null, sessionId: localStorage.getItem("session") || null }, -}); + +}); \ No newline at end of file diff --git a/src/stores/globalStore.js b/src/stores/globalStore.js index 831fecb..f7aaae6 100644 --- a/src/stores/globalStore.js +++ b/src/stores/globalStore.js @@ -5,7 +5,11 @@ export const useGlobalStore = defineStore('global', () => { const isLoading = ref(true); const lastRoute = ref(null); const lastGuild = ref(localStorage.getItem("lastGuild") || null); - const theme = ref(localStorage.getItem("theme") || "dark"); + const theme = ref(localStorage.getItem("theme") || "system"); + if(theme.value === "system") { + const systemTheme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"; + theme.value = systemTheme; + } document.documentElement.setAttribute("data-theme", theme.value); function setLoading(loading) { @@ -24,6 +28,17 @@ export const useGlobalStore = defineStore('global', () => { localStorage.setItem("lastGuild", guild || null); } + function setTheme(newTheme) { + console.log("Setting theme to", newTheme); + localStorage.setItem("theme", newTheme); + theme.value = newTheme; + if(theme.value === "system") { + const systemTheme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"; + theme.value = systemTheme; + } + document.documentElement.setAttribute("data-theme", theme.value); + } + function toogleTheme() { theme.value = theme.value === "dark" ? "light" : "dark"; localStorage.setItem("theme", theme.value); @@ -39,6 +54,7 @@ export const useGlobalStore = defineStore('global', () => { theme, toogleTheme, lastGuild, - setLastGuild + setLastGuild, + setTheme }; }) \ No newline at end of file diff --git a/src/utils/Events.js b/src/utils/Events.js index 57b0d44..0298706 100644 --- a/src/utils/Events.js +++ b/src/utils/Events.js @@ -14,6 +14,7 @@ export default { }, emit(eventName, data) { if(Events.has(eventName)) { + console.log(`Event emitted: ${eventName}`, data) Events.get(eventName).forEach(fn => fn(data)) } }, diff --git a/src/utils/Loader.vue b/src/utils/Loader.vue index a95b0af..58d4784 100644 --- a/src/utils/Loader.vue +++ b/src/utils/Loader.vue @@ -1,5 +1,5 @@ @@ -8,7 +8,7 @@ import Button from '@/components/UI/Button.vue';