Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have a link from session to video room #161

Merged
merged 1 commit into from
Jul 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion webapp/src/views/schedule/talks/item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
a.download(v-for="{resource, description} of talk.resources", :href="getAbsoluteResourceUrl(resource)", target="_blank")
.mdi(:class="`mdi-${getIconByFileEnding(resource)}`")
.filename {{ description }}
bunt-link-button.btn-create.router-link.stage(v-if="getRoomIdByName(roomName)", :to="{name: 'room', params: {roomId: getRoomIdByName(roomName)}}") Join room
.speakers(v-if="talk.speakers.length > 0")
.header {{ $t('schedule/talks/item:speakers:header', {count: talk.speakers.length})}}
.speakers-list
Expand All @@ -24,7 +25,7 @@
bunt-progress-circular(v-else, size="huge", :page="true")
</template>
<script>
import { mapGetters } from 'vuex'
import { mapGetters, mapState } from 'vuex'
import moment from 'lib/timetravelMoment'
import MarkdownContent from 'components/MarkdownContent'
import { getIconByFileEnding } from 'lib/filetypes'
Expand All @@ -40,6 +41,7 @@ export default {
}
},
computed: {
...mapState(['rooms']),
...mapGetters('schedule', ['pretalxApiBaseUrl', 'sessions']),
datetime () {
return moment(this.talk.slot?.start || this.talk.start).format('L LT') + ' - ' + moment(this.talk.slot?.end || this.talk.end).format('LT')
Expand Down Expand Up @@ -73,6 +75,10 @@ export default {
if (!this.pretalxApiBaseUrl) return resource
const base = (new URL(this.pretalxApiBaseUrl)).origin
return new URL(resource, base)
},
getRoomIdByName(roomName) {
const room = this.rooms.find(r => r.name === roomName);
return room ? room.id : null;
}
}
}
Expand Down Expand Up @@ -121,6 +127,8 @@ export default {
.mdi
font-size: 36px
margin: 0 4px
.btn-create
themed-button-primary()
.speakers
width: 280px
margin: 32px 16px
Expand Down
Loading