@@ -35,6 +35,41 @@ const shouldSend = computed({
35
35
}
36
36
},
37
37
})
38
+
39
+ const state = computed ({
40
+ get : () => {
41
+ if (shouldReceive .value && shouldSend .value ) {
42
+ return ' bidirectional'
43
+ }
44
+ if (shouldReceive .value && ! shouldSend .value ) {
45
+ return ' receive-only'
46
+ }
47
+ if (! shouldReceive .value && shouldSend .value ) {
48
+ return ' send-only'
49
+ }
50
+ return ' off'
51
+ },
52
+ set(v ) {
53
+ switch (v ) {
54
+ case ' bidirectional' :
55
+ shouldReceive .value = true
56
+ shouldSend .value = true
57
+ break
58
+ case ' receive-only' :
59
+ shouldReceive .value = true
60
+ shouldSend .value = false
61
+ break
62
+ case ' send-only' :
63
+ shouldReceive .value = false
64
+ shouldSend .value = true
65
+ break
66
+ case ' off' :
67
+ shouldReceive .value = false
68
+ shouldSend .value = false
69
+ break
70
+ }
71
+ },
72
+ })
38
73
</script >
39
74
40
75
<template >
@@ -52,19 +87,13 @@ const shouldSend = computed({
52
87
<span font-bold text-primary >{{ isPresenter ? 'presenter' : 'viewer' }}</span >
53
88
</div >
54
89
<SelectList
55
- v-model =" shouldSend"
56
- title =" Send Changes"
57
- :items =" [
58
- { value: true, display: 'On' },
59
- { value: false, display: 'Off' },
60
- ]"
61
- />
62
- <SelectList
63
- v-model =" shouldReceive"
64
- title =" Receive Changes"
90
+ v-model =" state"
91
+ title =" Sync Mode"
65
92
:items =" [
66
- { value: true, display: 'On' },
67
- { value: false, display: 'Off' },
93
+ { value: 'bidirectional', display: 'Bidirectional Sync' },
94
+ { value: 'receive-only', display: 'Receive Only' },
95
+ { value: 'send-only', display: 'Send Only' },
96
+ { value: 'off', display: 'Disable' },
68
97
]"
69
98
/>
70
99
</div >
0 commit comments