Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

Commit

Permalink
feat(logo): add link to logo that goes to root
Browse files Browse the repository at this point in the history
  • Loading branch information
ttshivers committed Aug 27, 2020
1 parent 6264bee commit 1f7ad31
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 13 deletions.
26 changes: 15 additions & 11 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,21 @@
>
<v-app-bar-nav-icon @click="SET_LEFT_SIDEBAR_OPEN" />

<picture>
<source
srcset="@/assets/images/logos/logo-small-light.png"
:media="smallLogoMedia"
>
<img
height="42"
src="@/assets/images/logos/logo-long-light.png"
style="vertical-align: middle;"
>
</picture>
<router-link
:to="{ name: 'CreateRoom'}"
>
<picture>
<source
srcset="@/assets/images/logos/logo-small-light.png"
:media="smallLogoMedia"
>
<img
height="42"
src="@/assets/images/logos/logo-long-light.png"
style="vertical-align: middle;"
>
</picture>
</router-link>

<nowplayingchip
v-if="showNowPlaying"
Expand Down
7 changes: 5 additions & 2 deletions src/store/modules/synclounge/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,14 @@ export default {
return dispatch('CONNECT_AND_JOIN_ROOM');
},

ESTABLISH_SOCKET_CONNECTION: async ({ getters, commit, dispatch }) => {
// TODO: make wrapper method that disconnects the socket if it already exists
DISCONNECT_IF_CONNECTED: async ({ dispatch }) => {
if (isConnected()) {
await dispatch('DISCONNECT');
}
},

ESTABLISH_SOCKET_CONNECTION: async ({ getters, commit, dispatch }) => {
await dispatch('DISCONNECT_IF_CONNECTED');

const properBase = new URL(getters.GET_SERVER, window.location);
const url = combineUrl('socket.io', properBase.toString());
Expand Down
3 changes: 3 additions & 0 deletions src/views/createroom.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ export default {
},
async created() {
await this.DISCONNECT_IF_CONNECTED();
if (this.GET_CONFIG.autojoin) {
this.$router.push({
name: 'join',
Expand All @@ -104,6 +106,7 @@ export default {
...mapActions('synclounge', [
'FETCH_SERVERS_HEALTH',
'CREATE_AND_JOIN_ROOM',
'DISCONNECT_IF_CONNECTED',
]),
async fetchServersHealth() {
Expand Down
5 changes: 5 additions & 0 deletions src/views/join.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,14 @@ export default {
]),
},
async created() {
await this.DISCONNECT_IF_CONNECTED();
},
methods: {
...mapActions('synclounge', [
'SET_AND_CONNECT_AND_JOIN_ROOM',
'DISCONNECT_IF_CONNECTED',
]),
async joinInvite() {
Expand Down

0 comments on commit 1f7ad31

Please sign in to comment.