diff --git a/src/App.vue b/src/App.vue index 2650975a..5372a6a0 100644 --- a/src/App.vue +++ b/src/App.vue @@ -21,6 +21,8 @@ id="app" :dir="dir" v-shortkey="KEYBOARD_SHORTCUTS" + :style="style" + :class="{ 'no-repeat': style.length > 0 }" @shortkey="handleShortcutAction" > @@ -58,6 +60,8 @@ export default { data() { return { debugUserId: null, + backgroundImageUrl: null, + backgroundColor: null, KEYBOARD_SHORTCUTS, }; }, @@ -65,6 +69,18 @@ export default { computed: { ...mapState(['user', 'settings', 'sessionExpired']), + style() { + const backgroundImage = this.backgroundImageUrl + ? `background-image: url('${this.backgroundImageUrl}');` + : null; + + const backgroundColor = this.backgroundColor + ? `background-color: ${this.backgroundColor};` + : null; + + return [backgroundImage, backgroundColor].join(''); + }, + userId() { return this.debugUserId || this.user.uid; }, @@ -91,12 +107,23 @@ export default { }, async mounted() { + this.$bus.$on('UPDATE_WALLPAPER', this.updateWallpaperUrl); + this.$bus.$on('UPDATE_BACKGROUND_COLOR', this.updateBackgroundColor); + await this.$store.dispatch('GET_TWITCH_TOKEN'); this.init(); }, methods: { + updateWallpaperUrl(value) { + this.backgroundImageUrl = value; + }, + + updateBackgroundColor(value) { + this.backgroundColor = value; + }, + handleShortcutAction(data) { this.$bus.$emit('HANDLE_SHORTCUT', data); }, @@ -134,14 +161,20 @@ export default { diff --git a/src/components/BoardsDropdown.vue b/src/components/BoardsDropdown.vue index 73e5a2e6..dd8d6235 100644 --- a/src/components/BoardsDropdown.vue +++ b/src/components/BoardsDropdown.vue @@ -1,94 +1,66 @@ + + diff --git a/src/components/GameCards/GameCardDefault.vue b/src/components/GameCards/GameCardDefault.vue index c7119560..e541615d 100644 --- a/src/components/GameCards/GameCardDefault.vue +++ b/src/components/GameCards/GameCardDefault.vue @@ -2,7 +2,7 @@ diff --git a/src/components/Lists/GameList.vue b/src/components/Lists/GameList.vue index 4ad362a6..4bffe6ee 100644 --- a/src/components/Lists/GameList.vue +++ b/src/components/Lists/GameList.vue @@ -83,14 +83,16 @@ {{ $t('board.list.emptyListButton') }} --> - - [Empty] - + + Add games + diff --git a/src/components/PageHeader.vue b/src/components/PageHeader.vue index e6ce1cb5..16d90236 100644 --- a/src/components/PageHeader.vue +++ b/src/components/PageHeader.vue @@ -1,7 +1,7 @@