added permission repo and changes to recorder state, etc

This commit is contained in:
2019-11-28 19:39:18 +01:00
parent 42366def40
commit 39e7bbd098
14 changed files with 4219 additions and 3905 deletions

View File

@@ -1,15 +1,5 @@
<template>
<div v-if="authenticated">
<div v-if="profile.favorite_recorders.length <=0">
<p>You haven't configured favorite recorders yet click below to do so!</p>
</div>
<div v-else>
<p>Yeah, you already configured a favorite recorder :)</p>
<ul>
<li v-for="recorder in profile.favorite_recorders">{{recorder.name}}</li>
</ul>
</div>
<b-form>
<b-input-group>
<select class="form-control" v-model="favorite_recorder_id">
@@ -19,8 +9,9 @@
</option>
</select>
<b-input-group-append>
<b-button variant="outline-success">
<font-awesome-icon icon="check"></font-awesome-icon>
<b-button variant="outline-success"
@click="recorderSelected()">
<font-awesome-icon icon="check"/>
</b-button>
</b-input-group-append>
</b-input-group>
@@ -38,22 +29,23 @@
@Component
export default class SelectRecorder extends Vue {
@Prop() private msg!: string;
@Prop() private favorite_recorder_id!: string;
favorite_recorder_id = '';
get authenticated() {
return this.$store.getters.isAuthenticated;
}
get profile() {
return this.$store.state.profile;
}
get recorders() {
return this.$store.state.recorders;
}
private mounted() {
mounted() {
this.$store.dispatch('loadProfile');
this.$store.dispatch('loadRecorders');
}
recorderSelected() {
this.$emit('recorderSelected', {'recorder_id': this.favorite_recorder_id});
}
}
</script>