|
27 | 27 | .visibility-controls |
28 | 28 | h3 Visibility |
29 | 29 | bunt-checkbox(name="hidden", v-model="config.hidden", class="visibility-option") Hide this room from schedule-editor |
30 | | - bunt-checkbox( |
31 | | - name="sidebar_hidden", |
32 | | - v-model="config.sidebar_hidden", |
33 | | - :disabled="sidebarHiddenDisabled", |
34 | | - class="visibility-option" |
35 | | - ) Hide from Sidebar |
36 | | - small(v-if="!config.setup_complete") Hidden from the sidebar until setup is complete. |
37 | | - small(v-else-if="config.hidden") Hidden rooms are always removed from the sidebar. |
| 30 | + template(v-if="config.setup_complete") |
| 31 | + bunt-checkbox( |
| 32 | + name="sidebar_hidden", |
| 33 | + v-model="config.sidebar_hidden", |
| 34 | + :disabled="config.hidden", |
| 35 | + class="visibility-option" |
| 36 | + ) Hide from Sidebar |
| 37 | + small(v-if="config.hidden") Hidden rooms are always removed from the sidebar. |
| 38 | + template(v-else) |
| 39 | + small Hidden from the sidebar until setup is complete. |
38 | 40 | template(v-if="inferredType && typeComponents[inferredType.id]") |
39 | 41 | .video-settings(v-if="showVideoSettingsTitle") |
40 | 42 | h3 Video Settings |
@@ -126,12 +128,6 @@ export default { |
126 | 128 | const videoTypes = ['stage', 'channel-bbb', 'channel-janus', 'channel-zoom', 'channel-roulette'] |
127 | 129 | return videoTypes.includes(this.inferredType?.id) |
128 | 130 | }, |
129 | | - visibilityDependencies() { |
130 | | - return [this.config?.hidden, this.config?.setup_complete] |
131 | | - }, |
132 | | - sidebarHiddenDisabled() { |
133 | | - return !this.config.setup_complete || this.config.hidden |
134 | | - }, |
135 | 131 | localizedName: { |
136 | 132 | get() { |
137 | 133 | return this.$localize(this.config.name) |
@@ -168,14 +164,15 @@ export default { |
168 | 164 | }, |
169 | 165 | methods: { |
170 | 166 | applyVisibilityDefaults(config) { |
171 | | - if (config.hidden === undefined) config.hidden = false |
172 | | - if (config.sidebar_hidden === undefined) { |
| 167 | + if (config.hidden == null) config.hidden = false |
| 168 | + if (config.sidebar_hidden == null) { |
173 | 169 | config.sidebar_hidden = !config.setup_complete |
174 | 170 | } |
175 | 171 | }, |
176 | 172 | syncSidebarHidden() { |
177 | 173 | if (!this.config) return |
178 | | - if (this.config.hidden || !this.config.setup_complete) { |
| 174 | + // Enforce business rule: sidebar_hidden must be true if hidden is true or setup is incomplete |
| 175 | + if ((this.config.hidden || !this.config.setup_complete) && !this.config.sidebar_hidden) { |
179 | 176 | this.config.sidebar_hidden = true |
180 | 177 | } |
181 | 178 | }, |
|
0 commit comments