Remove dock

This commit is contained in:
Gamebrary 2022-05-18 21:17:13 -07:00
parent a7de324047
commit c8aa0eba1d
11 changed files with 0 additions and 351 deletions

View file

@ -17,7 +17,6 @@
<div
id="app"
:dir="dir"
:class="`dock-${dockPosition} ${user ? 'authed' : ''}`"
v-shortkey="KEYBOARD_SHORTCUTS"
@shortkey="handleShortcutAction"
>
@ -70,10 +69,6 @@ export default {
return settings && settings.language === 'ar' ? 'rtl' : 'ltr';
},
dockPosition() {
return this.settings?.dockPosition;
},
isPublicRoute() {
return this.$route.meta?.public;
},

View file

@ -1,113 +0,0 @@
<template lang="html">
<nav>
<template v-if="boards.length">
<b-avatar
v-for="{ id, name, backgroundColor, backgroundUrl } in boards"
:key="id"
block
rounded
:title="name"
:style="`
${backgroundColor ? `background-color: ${backgroundColor};` : '' }
${getWallpaperUrl(backgroundUrl)}
`"
:class="['mb-1 cursor-pointer pinned-board', { active: board.id === id }]"
@click.native="viewBoard(id)"
>
<span class="board-initials text-uppercase">{{ getBoardInitials(name) }}</span>
</b-avatar>
<hr class="mb-2 mt-0">
</template>
<template v-if="isBoard && !board.pinned">
<b-button
class="active pinned-board"
:title="board.name"
:style="`
${board.backgroundColor ? ` background-color: ${board.backgroundColor};` : null }
${getWallpaperUrl(board.backgroundUrl) }
`"
@click="$router.push({ name: 'board.edit', params: { id: board.id } })"
>
<span class="board-initials text-uppercase mr-1">
{{ getBoardInitials(board.name) }}
</span>
</b-button>
<hr class="my-1">
</template>
</nav>
</template>
<script>
import { mapGetters, mapState } from 'vuex';
export default {
computed: {
...mapState(['board', 'boards', 'wallpapers']),
...mapGetters(['sortedBoards']),
isBoard() {
return ['public.board', 'board'].includes(this.$route.name);
},
hasMultipleBoards() {
return this.$route.name === 'board' && this.board.name && this.sortedBoards.length > 1;
},
pinnedBoards() {
return this.boards.filter(({ pinned }) => pinned);
},
},
methods: {
getWallpaperUrl(url) {
if (!url) return '';
if (url && url.includes('igdb.com')) return `background-image: url(${url});`;
const wallpaperObject = this.wallpapers.find(({ fullPath }) => fullPath === url);
return wallpaperObject && wallpaperObject.url
? `background-image: url(${wallpaperObject.url});`
: '';
},
viewBoard(id) {
this.$router.push({ name: 'board', params: { id } });
},
getBoardInitials(boardName) {
const boardInitials = boardName
? boardName.split(' ').map(n => n[0]).join('')
: '';
return boardInitials.length > 2
? boardInitials.substring(0, 2)
: boardInitials;
},
},
};
</script>
<style lang="scss" rel="stylesheet/scss" scoped>
nav {
overflow-y: auto;
max-height: calc(100vh - 100px);
}
.pinned-board {
background-size: cover;
&.active {
box-shadow: inset 0 0 0 1px yellow;
}
}
.board-initials {
color: white;
text-shadow: 1px 1px black;
}
</style>

View file

@ -111,10 +111,6 @@ export default {
});
},
dockPosition() {
return this.settings?.dockPosition;
},
boardInitials() {
return this.board.name.split(' ').map(n => n[0]).join('').slice(0, 2);
},
@ -122,10 +118,6 @@ export default {
boardBackgroundUrl() {
return this.getWallpaperUrl(this.board?.backgroundUrl);
},
// isHorizontal() {
// return !this.dockPosition || this.dockPosition === 'bottom';
// },
},
methods: {

View file

@ -1,70 +0,0 @@
<template lang="html">
<nav class="d-flex flex-column text-center dock px-2">
<pinned-boards class="pt-2" />
<b-button :to="{ name: 'settings' }" class="d-block d-sm-none mb-2">
<i class="fas fa-cog" />
</b-button>
<global-search class="d-block d-sm-none" />
</nav>
</template>
<script>
import { mapState, mapGetters } from 'vuex';
import PinnedBoards from '@/components/Board/PinnedBoards';
import GlobalSearch from '@/components/GlobalSearch';
export default {
components: {
PinnedBoards,
GlobalSearch,
},
computed: {
...mapState(['board', 'notification', 'user', 'releases']),
...mapGetters(['darkTheme']),
latestRelease() {
// eslint-disable-next-line
const [latestRelease] = this.releases;
// eslint-disable-next-line
return latestRelease && latestRelease.tag_name;
},
isBoard() {
return ['public.board', 'board'].includes(this.$route.name);
},
},
methods: {
// async pinBoard() {
// const payload = {
// ...this.board,
// pinned: !this.board.pinned,
// };
//
// this.$store.commit('SET_ACTIVE_BOARD', payload);
//
// await this.$store.dispatch('SAVE_BOARD')
// .catch(() => {
// this.$bvToast.toast('There was an error renaming list', { variant: 'danger' });
// });
//
// this.$bvToast.toast('Board settings saved');
// },
},
};
</script>
<style lang="scss" rel="stylesheet/scss" scoped>
.dock {
// background: rgba(0, 0, 0, 0.5);
// background-color: #1c1c27;
background: linear-gradient(180deg, rgba(2,0,36,1) 0%, rgba(0,212,255,1) 100%);
z-index: 1;
max-height: 100vh;
height: calc(100vh - 45px);
}
</style>

View file

@ -1,40 +0,0 @@
<template lang="html">
<nav>
<router-link :to="{ name: 'home' }">
<img
src="/gamebrary-logo.png"
width="32"
/>
</router-link>
<public-menu />
</nav>
</template>
<script>
import { mapState } from 'vuex';
import PublicMenu from '@/components/PublicMenu';
export default {
components: {
PublicMenu,
},
computed: {
...mapState(['settings']),
dockPosition() {
return this.settings?.dockPosition;
},
},
};
</script>
<style lang="scss" rel="stylesheet/scss" scoped>
nav {
padding: .25rem 1rem;
display: flex;
align-items: center;
justify-content: space-between;
}
</style>

View file

@ -1,25 +0,0 @@
<template lang="html">
<div>
<b-button
variant="dark"
:to="{ name: 'auth' }"
>
Sign in
</b-button>
<b-button
variant="info"
:to="{ name: 'explore' }"
>
Explore
</b-button>
</div>
</template>
<script>
export default {
};
</script>
<style lang="scss" rel="stylesheet/scss" scoped>
</style>

View file

@ -1,60 +0,0 @@
<template lang="html">
<div>
<b-form-group label="Dock position:">
<b-form-select
v-model="dockPosition"
style="max-width: 200px"
@change="save"
>
<b-form-select-option
v-for="{ name, value } in $options.DOCK_POSITIONS"
:key="value"
:value="value"
>
{{ name }}
</b-form-select-option>
</b-form-select>
</b-form-group>
</div>
</template>
<script>
import { mapState } from 'vuex';
import { DOCK_POSITIONS } from '@/constants';
export default {
DOCK_POSITIONS,
data() {
return {
dockPosition: null,
};
},
computed: {
...mapState(['settings']),
},
mounted() {
const { settings } = this;
this.dockPosition = settings.dockPosition || null;
},
methods: {
async save() {
const { dockPosition, settings } = this;
const payload = {
...settings,
dockPosition,
};
await this.$store.dispatch('SAVE_SETTINGS', payload)
.catch(() => {
this.$bvToast.toast('There was an error saving your settings', { variant: 'danger' });
});
},
},
};
</script>

View file

@ -343,13 +343,6 @@ export const AGE_RATING_SYSTEMS = [
},
];
export const DOCK_POSITIONS = [
{ name: 'Top', value: null },
{ name: 'Left', value: 'left' },
{ name: 'Bottom', value: 'bottom' },
{ name: 'Right', value: 'right' },
];
export const WEBSITE_CATEGORIES = {
WIKIPEDIA: 3,
AMAZON: 20,

View file

@ -34,10 +34,6 @@
/>
</b-form-group>
<b-form-checkbox v-model="pinned" switch>
Pinned to dock
</b-form-checkbox>
<b-form-checkbox v-model="isPublic" switch class="mb-2">
Make board public (beta)
</b-form-checkbox>
@ -191,7 +187,6 @@ export default {
return {
saving: false,
description: null,
pinned: false,
isPublic: false,
name: null,
selectedPlatforms: [],
@ -245,7 +240,6 @@ export default {
this.description = board.description;
this.name = board.name;
this.selectedPlatforms = board.platforms;
this.pinned = board.pinned || false;
this.isPublic = board.isPublic || false;
this.theme = board.theme || 'default';
},
@ -287,7 +281,6 @@ export default {
description: this.description,
name: this.name,
// platforms: this.platforms,
pinned: this.pinned,
isPublic: this.isPublic,
theme: this.theme,
};

View file

@ -2,19 +2,16 @@
<b-container fluid>
<page-title title="General settings" />
<!-- <game-detail-settings /> -->
<!-- <dock-settings /> -->
<language-settings />
</b-container>
</template>
<script>
// import DockSettings from '@/components/Settings/DockSettings';
import LanguageSettings from '@/components/Settings/LanguageSettings';
// import GameDetailSettings from '@/components/Settings/GameDetailSettings';
export default {
components: {
// DockSettings,
// GameDetailSettings,
LanguageSettings,
},

View file

@ -222,19 +222,6 @@
</td>
</tr>
<tr>
<td>
Dock
(Quickly access all your boards, pin them, organize them, group them, etc...)
</td>
<td>
<i class="fa-solid fa-times text-muted" />
</td>
<td>
<i class="fa-solid fa-check text-success" />
</td>
</tr>
<tr>
<td>
Import/Export