Skip to content

Commit bd9a22c

Browse files
committed
Implement stage manager pane in show live view
1 parent 3388a89 commit bd9a22c

10 files changed

Lines changed: 1627 additions & 1082 deletions

File tree

client/package-lock.json

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"lodash": "4.17.23",
4242
"loglevel": "1.9.2",
4343
"marked": "11.2.0",
44+
"splitpanes": "^2.4.1",
4445
"vue": "2.7.14",
4546
"vue-multiselect": "2.1.9",
4647
"vue-native-websocket": "2.0.15",

client/src/App.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@
6060
>
6161
Jump To Page
6262
</b-dropdown-item>
63+
<b-dropdown-item-btn
64+
@click.stop.prevent="SET_STAGE_MANAGER_MODE(!STAGE_MANAGER_MODE)"
65+
>
66+
{{ STAGE_MANAGER_MODE ? 'Disable' : 'Enable' }} Stage Manager
67+
</b-dropdown-item-btn>
6368
</b-nav-item-dropdown>
6469
</template>
6570
<b-nav-item
@@ -162,7 +167,7 @@
162167
</template>
163168

164169
<script>
165-
import { mapGetters, mapActions } from 'vuex';
170+
import { mapGetters, mapActions, mapMutations } from 'vuex';
166171
import log from 'loglevel';
167172
import CreateUser from '@/vue_components/user/CreateUser.vue';
168173
import { makeURL } from '@/js/utils';
@@ -227,6 +232,7 @@ export default {
227232
'IS_SCRIPT_EDITOR',
228233
'IS_CUE_READER',
229234
'IS_CUE_EDITOR',
235+
'STAGE_MANAGER_MODE',
230236
]),
231237
},
232238
async created() {
@@ -285,6 +291,7 @@ export default {
285291
'CHECK_WEBSOCKET_STATE',
286292
'GET_USER_SETTINGS',
287293
]),
294+
...mapMutations(['SET_STAGE_MANAGER_MODE']),
288295
isElectron,
289296
async switchServer() {
290297
// Clear the active connection and disconnect WebSocket

client/src/assets/styles/dark.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,11 @@
1010
:root {
1111
--body-background: #{$body-bg};
1212
}
13+
14+
.splitpanes {
15+
background: inherit !important;
16+
}
17+
18+
.splitpanes__pane {
19+
background: inherit !important;
20+
}

client/src/main.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { BootstrapVue, IconsPlugin } from 'bootstrap-vue';
55
import Vuelidate from 'vuelidate';
66
import ToastPlugin from 'vue-toast-notification';
77
import Multiselect from 'vue-multiselect';
8+
import { Splitpanes, Pane } from 'splitpanes';
89

910
import store from '@/store/store';
1011
import App from './App.vue';
@@ -15,12 +16,15 @@ import { getWebSocketURL, isElectron } from '@/js/platform';
1516
import './assets/styles/dark.scss';
1617
import 'vue-toast-notification/dist/theme-sugar.css';
1718
import 'vue-multiselect/dist/vue-multiselect.min.css';
19+
import 'splitpanes/dist/splitpanes.css';
1820

1921
setupHttpInterceptor();
2022

2123
Vue.use(BootstrapVue);
2224
Vue.use(IconsPlugin);
2325
Vue.component('MultiSelect', Multiselect);
26+
Vue.component('SplitPanes', Splitpanes);
27+
Vue.component('SplitPane', Pane);
2428

2529
Vue.use(Vuex);
2630
Vue.use(Vuelidate);

client/src/store/modules/show.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export default {
2121
noLeaderToast: null,
2222
scriptModes: [],
2323
sessionTags: [],
24+
stageManagerMode: false,
2425
},
2526
mutations: {
2627
SET_CAST_LIST(state, castList) {
@@ -75,6 +76,9 @@ export default {
7576
SET_SESSION_TAGS(state, tags) {
7677
state.sessionTags = tags;
7778
},
79+
SET_STAGE_MANAGER_MODE(state, enabled) {
80+
state.stageManagerMode = enabled;
81+
},
7882
},
7983
actions: {
8084
async GET_CAST_LIST(context) {
@@ -862,5 +866,8 @@ export default {
862866
}
863867
return null;
864868
},
869+
STAGE_MANAGER_MODE(state) {
870+
return state.stageManagerMode;
871+
},
865872
},
866873
};

client/src/store/store.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ export default new Vuex.Store({
210210
createPersistedState({
211211
storage: getStorageAdapter('session'),
212212
key: 'digiscript',
213-
paths: ['websocket.internalUUID'],
213+
paths: ['websocket.internalUUID', 'show.stageManagerMode'],
214214
}),
215215
],
216216
});

0 commit comments

Comments
 (0)