Skip to content

Commit

Permalink
Merge pull request #88 from TheNerdful8/make-room-player-distinction-…
Browse files Browse the repository at this point in the history
…consistent

Make distinction between room and player consistent
  • Loading branch information
fredericobormann authored Jul 27, 2020
2 parents af29676 + 3754e9a commit 854ab06
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions lecture2gether-vue/src/plugins/router/routes.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { RouteConfig } from 'vue-router';
import Home from '@/views/Home.vue';
import Player from '@/views/Room.vue';
import Room from '@/views/Room.vue';

export default [
{
Expand All @@ -10,8 +10,8 @@ export default [
},
{
path: '/l/:roomId',
name: 'player',
component: Player,
name: 'room',
component: Room,
},
{
path: '/sync/debug',
Expand Down
2 changes: 1 addition & 1 deletion lecture2gether-vue/src/views/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default class L2gHome extends Vue {
async onConnectedChanged() {
await this.$store.dispatch('newRoom');
await this.$router.push({
name: 'player',
name: 'room',
params: {
roomId: this.$store.state.rooms.roomId,
},
Expand Down
8 changes: 4 additions & 4 deletions lecture2gether-vue/src/views/Room.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div>
<PasswordDialog v-if="this.$store.getters.authRequired" class="password-dialog"></PasswordDialog>
<l2g-player v-if="!this.$store.getters.authRequired && this.$store.state.player.videoUrl" class="l2g-player"></l2g-player>
<player v-if="!this.$store.getters.authRequired && this.$store.state.player.videoUrl" class="l2g-player"></player>
<v-overlay :value="!roomExists" light>
<v-card class="room-card pa-12">
<h2 class="display-1 heading ">Room does not exist (anymore)!</h2>
Expand All @@ -17,15 +17,15 @@
// @ is an alias to /src
import Vue from 'vue';
import Component from 'vue-class-component';
import L2gPlayer from '@/components/Player.vue';
import Player from '@/components/Player.vue';
import { Watch } from 'vue-property-decorator';
import { AuthState } from '@/plugins/store/player';
import PasswordDialog from '@/components/PasswordDialog.vue';
@Component({
components: { PasswordDialog, L2gPlayer },
components: { PasswordDialog, Player },
})
export default class L2gPlayerView extends Vue {
export default class Room extends Vue {
roomExists = true;
@Watch('$route.params.roomId')
Expand Down

0 comments on commit 854ab06

Please sign in to comment.