diff --git a/functions/yarn.lock b/functions/yarn.lock index a9abe5ac..38f10026 100644 --- a/functions/yarn.lock +++ b/functions/yarn.lock @@ -326,15 +326,6 @@ agent-base@6: dependencies: debug "4" -apicalypse@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/apicalypse/-/apicalypse-0.2.0.tgz#dcb1b3447bbb2768f131980864f869fea16bab9c" - integrity sha512-KJeyO2vHGOLkb90fNeuEytx0zG65Ifcplr1dk9mnngzsS4J6ksHB0PyNvu0dehsc8rAaLx+OW+L4raU7UDlpFw== - dependencies: - axios "^0.21.1" - better-queue "^3.8.10" - better-queue-memory "^1.0.4" - array-buffer-byte-length@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz#fabe8bc193fea865f317fe7807085ee0dee5aead" @@ -365,32 +356,11 @@ axios@^0.19.0: dependencies: follow-redirects "1.5.10" -axios@^0.21.1: - version "0.21.4" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" - integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== - dependencies: - follow-redirects "^1.14.0" - base64-js@^1.3.0: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== -better-queue-memory@^1.0.1, better-queue-memory@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/better-queue-memory/-/better-queue-memory-1.0.4.tgz#f390d6b30bb3b36aaf2ce52b37a483e8a7a81a22" - integrity sha512-SWg5wFIShYffEmJpI6LgbL8/3Dqhku7xI1oEiy6FroP9DbcZlG0ZDjxvPdP9t7hTGW40IpIcC6zVoGT1oxjOuA== - -better-queue@^3.8.10: - version "3.8.12" - resolved "https://registry.yarnpkg.com/better-queue/-/better-queue-3.8.12.tgz#15c18923d0f9778be94f19c3ef2bd85c632d0db3" - integrity sha512-D9KZ+Us+2AyaCz693/9AyjTg0s8hEmkiM/MB3i09cs4MdK1KgTSGJluXRYmOulR69oLZVo2XDFtqsExDt8oiLA== - dependencies: - better-queue-memory "^1.0.1" - node-eta "^0.9.0" - uuid "^9.0.0" - bignumber.js@^9.0.0: version "9.1.2" resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.2.tgz#b7c4242259c008903b13707983b5f4bbd31eda0c" @@ -778,11 +748,6 @@ follow-redirects@1.5.10: dependencies: debug "=3.1.0" -follow-redirects@^1.14.0: - version "1.15.3" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.3.tgz#fe2f3ef2690afce7e82ed0b44db08165b207123a" - integrity sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q== - for-each@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" @@ -1370,11 +1335,6 @@ negotiator@0.6.3: resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== -node-eta@^0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/node-eta/-/node-eta-0.9.0.tgz#9fb0b099bcd2a021940e603c64254dc003d9a7a8" - integrity sha512-mTCTZk29tmX1OGfVkPt63H3c3VqXrI2Kvua98S7iUIB/Gbp0MNw05YtUomxQIxnnKMyRIIuY9izPcFixzhSBrA== - node-fetch@^2.2.0, node-fetch@^2.3.0, node-fetch@^2.6.0, node-fetch@^2.6.7: version "2.7.0" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" @@ -1809,11 +1769,6 @@ uuid@^7.0.0: resolved "https://registry.yarnpkg.com/uuid/-/uuid-7.0.3.tgz#c5c9f2c8cf25dc0a372c4df1441c41f5bd0c680b" integrity sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg== -uuid@^9.0.0: - version "9.0.1" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30" - integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== - vary@^1, vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" diff --git a/src/App.vue b/src/App.vue index 5ce3d10e..a6cd83a5 100644 --- a/src/App.vue +++ b/src/App.vue @@ -47,6 +47,8 @@ Elevate your gaming experience with PlayStats – because your gaming journey is + + @@ -56,6 +58,7 @@ import MarkdownCheatsheet from '@/components/MarkdownCheatsheet'; import KeyboardShortcutsModal from '@/components/KeyboardShortcutsModal'; import PageDock from '@/components/PageDock'; import MainMenu from '@/components/MainMenu'; +import WallpaperDetailsSidebar from '@/components/Wallpapers/WallpaperDetailsSidebar'; import { initializeApp } from "firebase/app"; import { mapState, mapGetters } from 'vuex'; import { KEYBOARD_SHORTCUTS, FIREBASE_CONFIG, IGDB_QUERIES } from '@/constants'; @@ -64,12 +67,13 @@ const app = initializeApp(FIREBASE_CONFIG); export default { name: 'App', - + components: { PageDock, MainMenu, MarkdownCheatsheet, KeyboardShortcutsModal, + WallpaperDetailsSidebar, }, data() { diff --git a/src/components/Dock/DockFooter.vue b/src/components/Dock/DockFooter.vue index 559719ec..43cb23cf 100644 --- a/src/components/Dock/DockFooter.vue +++ b/src/components/Dock/DockFooter.vue @@ -34,7 +34,7 @@ - - diff --git a/src/components/Wallpapers/WallpaperDetailsSidebar.vue b/src/components/Wallpapers/WallpaperDetailsSidebar.vue new file mode 100644 index 00000000..cc240481 --- /dev/null +++ b/src/components/Wallpapers/WallpaperDetailsSidebar.vue @@ -0,0 +1,177 @@ + + + + + diff --git a/src/components/WallpapersList.vue b/src/components/WallpapersList.vue index 8d72b696..90eb165c 100644 --- a/src/components/WallpapersList.vue +++ b/src/components/WallpapersList.vue @@ -1,33 +1,39 @@ - - - diff --git a/src/pages/BoardsPage.vue b/src/pages/BoardsPage.vue index 433b3d09..e23bb727 100644 --- a/src/pages/BoardsPage.vue +++ b/src/pages/BoardsPage.vue @@ -3,7 +3,7 @@
- Boards +

Boards

diff --git a/src/pages/EditBoardPage.vue b/src/pages/EditBoardPage.vue index 459316c1..790f6259 100644 --- a/src/pages/EditBoardPage.vue +++ b/src/pages/EditBoardPage.vue @@ -16,7 +16,7 @@ - + diff --git a/src/pages/PublicProfilePage.vue b/src/pages/PublicProfilePage.vue index 9ebe0f79..0b79a75b 100644 --- a/src/pages/PublicProfilePage.vue +++ b/src/pages/PublicProfilePage.vue @@ -10,11 +10,14 @@ Edit profile + + +
import { mapState } from 'vuex'; import MiniBoard from '@/components/Board/MiniBoard'; +import EditProfileSidebar from '@/components/EditProfileSidebar'; import EmptyState from '@/components/EmptyState'; import { getImageThumbnail } from '@/utils'; export default { components: { MiniBoard, + EditProfileSidebar, EmptyState, }, diff --git a/src/pages/WallpapersPage.vue b/src/pages/WallpapersPage.vue index 342b6edd..240c0b83 100644 --- a/src/pages/WallpapersPage.vue +++ b/src/pages/WallpapersPage.vue @@ -18,7 +18,7 @@ - +
@@ -38,7 +38,6 @@ export default { data() { return { file: null, - saving: false, loading: false, wallpaperUrls: [], }; diff --git a/src/routes.js b/src/routes.js index ea19ac7b..40f92ef4 100644 --- a/src/routes.js +++ b/src/routes.js @@ -100,14 +100,6 @@ const routes = [ title: 'Settings', }, }, - { - name: 'profile', - path: '/profile', - component: () => import(/* webpackChunkName: "settings" */ '@/pages/EditProfilePage'), - meta: { - title: 'Profile', - }, - }, { name: 'steam', path: '/steam', diff --git a/src/store/actions.js b/src/store/actions.js index 37838f18..b5924a6b 100644 --- a/src/store/actions.js +++ b/src/store/actions.js @@ -171,17 +171,23 @@ export default { commit("SET_SETTINGS", docSnap.data()); }, + // TODO: get legacy notes, add UI to migrate? + // const docSnap = await getDoc(doc(db, "notes", state.user.uid)); + async LOAD_NOTES({ commit, state }) { - const q = query(collection(db, "notes-v2"), where("owner", "==", state.user.uid)); + // const q = query(collection(db, "notes-v2"), where("owner", "==", state.user.uid)); - const querySnapshot = await getDocs(q); + // const querySnapshot = await getDocs(q); - const notes = querySnapshot.docs.map((doc) => ({ - ...doc.data(), - id: doc.id, - })); + // const notes = querySnapshot.docs.map((doc) => ({ + // ...doc.data(), + // id: doc.id, + // })); + + // commit("SET_NOTES", notes); + const docSnap = await getDoc(doc(db, "notes", state.user.uid)); - commit("SET_NOTES", notes); + commit("SET_NOTES", docSnap.data()); }, async LOAD_NOTE({ state }, noteId) { @@ -337,19 +343,18 @@ export default { async UPLOAD_WALLPAPER({ state, commit }, file) { const storageRef = ref(storage, `${state.user.uid}/wallpapers/${file.name}`); - uploadBytes(storageRef, file).then(async ({ metadata }) => { - const downloadURL = await getDownloadURL(ref(storage, metadata.fullPath)); - - const wallpaper = { - ref: metadata.fullPath, - name: metadata.name, - size: metadata.size, - updated: metadata.updated, - url: downloadURL, - }; - - commit("ADD_WALLPAPER", wallpaper); - }); + const { metadata } = await uploadBytes(storageRef, file); + const downloadURL = await getDownloadURL(ref(storage, metadata.fullPath)); + + const wallpaper = { + ref: metadata.fullPath, + name: metadata.name, + size: metadata.size, + updated: metadata.updated, + url: downloadURL, + }; + + return commit("ADD_WALLPAPER", wallpaper); }, // EXTERNAL, clean up, use await, etc... diff --git a/src/store/mutations.js b/src/store/mutations.js index d28659a8..bf748649 100644 --- a/src/store/mutations.js +++ b/src/store/mutations.js @@ -21,6 +21,14 @@ export default { state.twitchToken = token; }, + SET_ACTIVE_WALLPAPER(state, activeWallpaper) { + state.activeWallpaper = activeWallpaper; + }, + + CLEAR_ACTIVE_WALLPAPER(state) { + state.activeWallpaper = {}; + }, + SET_HIGHLIGHTED_GAME(state, gameId) { state.highlightedGame = gameId; }, diff --git a/src/store/state.js b/src/store/state.js index aa8dc952..582b5828 100644 --- a/src/store/state.js +++ b/src/store/state.js @@ -20,5 +20,6 @@ export default { twitchToken: null, user: null, wallpapers: [], + activeWallpaper: {}, menuOpen: true, };