+
-
-
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,
};