Skip to content

Commit

Permalink
Add GoXLR Mini Sanity Checks!
Browse files Browse the repository at this point in the history
  • Loading branch information
FrostyCoolSlug committed Nov 10, 2022
1 parent bb14025 commit 6a6f6ca
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 17 deletions.
7 changes: 4 additions & 3 deletions src/components/sections/SamplerTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ import {sendHttpCommand, websocket} from "@/util/sockets";
import AudioVisualiser from "@/components/sections/sampler/AudioVisualiser";
import SampleHandler from "@/components/sections/files/SampleHandler";
import ModalBox from "@/components/design/modal/ModalBox";
import {isDeviceMini} from "@/util/util";
export default {
name: "SamplerTab",
Expand All @@ -85,7 +86,7 @@ export default {
methods: {
isActiveFunction(sampleFunction) {
if (!store.hasActiveDevice()) {
if (!store.hasActiveDevice() || isDeviceMini()) {
return false;
}
return store.getActiveDevice().sampler.banks[this.activeBank][this.activeButton].function === sampleFunction;
Expand All @@ -96,7 +97,7 @@ export default {
},
isActiveOrder(order) {
if (!store.hasActiveDevice()) {
if (!store.hasActiveDevice() || isDeviceMini()) {
return false;
}
return store.getActiveDevice().sampler.banks[this.activeBank][this.activeButton].order === order;
Expand All @@ -107,7 +108,7 @@ export default {
},
getSamples() {
if (!store.hasActiveDevice()) {
if (!store.hasActiveDevice() || isDeviceMini()) {
return [];
}
return store.getActiveDevice().sampler.banks[this.activeBank][this.activeButton].samples;
Expand Down
10 changes: 5 additions & 5 deletions src/components/sections/lighting/LightingEffects.vue
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@ export default {
},
isPresetMuteInactiveState(state) {
if (!store.hasActiveDevice()) {
if (!store.hasActiveDevice() || isDeviceMini()) {
return false;
}
return store.getActiveDevice().lighting.buttons[this.activeEffect].off_style === state;
},
isEffectMuteInactiveState(state) {
if (!store.hasActiveDevice()) {
if (!store.hasActiveDevice() || isDeviceMini()) {
return false;
}
return store.getActiveDevice().lighting.buttons[this.activeEffect].off_style === state;
Expand All @@ -125,7 +125,7 @@ export default {
},
getColour(active) {
if (!store.hasActiveDevice()) {
if (!store.hasActiveDevice() || isDeviceMini()) {
return "#000000";
}
let button = this.activePreset;
Expand All @@ -134,14 +134,14 @@ export default {
},
getEncoderColour(colour) {
if (!store.hasActiveDevice()) {
if (!store.hasActiveDevice() || isDeviceMini()) {
return "#000000";
}
return "#" + store.getActiveDevice().lighting.encoders[this.activeEncoder][colour];
},
getEffectColour(active) {
if (!store.hasActiveDevice()) {
if (!store.hasActiveDevice() || isDeviceMini()) {
return "#000000";
}
let colour = (active) ? "colour_one" : "colour_two";
Expand Down
12 changes: 6 additions & 6 deletions src/components/sections/lighting/LightingMixer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -170,22 +170,22 @@ export default {
},
getScreenColour() {
if (!store.hasActiveDevice()) {
if (!store.hasActiveDevice() || isDeviceMini()) {
return "#000000";
}
return "#" + store.getActiveDevice().lighting.simple[ScribbleNames[this.activeChannel]].colour_one;
},
getScreenIcons() {
if (!store.hasActiveDevice()) {
if (!store.hasActiveDevice() || isDeviceMini()) {
return [];
}
return store.getIconFiles().sort();
},
isActiveIcon(file_name) {
if (!store.hasActiveDevice()) {
if (!store.hasActiveDevice() || isDeviceMini()) {
return false;
}
return store.getActiveDevice().fader_status[this.activeChannel].scribble.file_name === file_name;
Expand All @@ -200,7 +200,7 @@ export default {
},
isShowNumber() {
if (!store.hasActiveDevice()) {
if (!store.hasActiveDevice() || isDeviceMini()) {
return false;
}
if (this.textValue === null) {
Expand All @@ -216,7 +216,7 @@ export default {
},
isInverted() {
if (!store.hasActiveDevice()) {
if (!store.hasActiveDevice() || isDeviceMini()) {
return false;
}
Expand All @@ -229,7 +229,7 @@ export default {
},
getBottomText() {
if (!store.hasActiveDevice()) {
if (!store.hasActiveDevice() || isDeviceMini()) {
return false;
}
let text = store.getActiveDevice().fader_status[this.activeChannel].scribble.bottom_text;
Expand Down
5 changes: 3 additions & 2 deletions src/components/sections/lighting/LightingSampler.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import PushButton from "@/components/button_list/Button";
import {store} from "@/store";
import {websocket} from "@/util/sockets";
import ColourBox from "@/components/sections/lighting/ColourBox";
import {isDeviceMini} from "@/util/util";
export default {
name: "LightingSampler",
Expand All @@ -45,7 +46,7 @@ export default {
methods: {
isInactiveState(state) {
if (!store.hasActiveDevice()) {
if (!store.hasActiveDevice() || isDeviceMini()) {
return false;
}
return store.getActiveDevice().lighting.sampler[this.activeBank].off_style === state;
Expand All @@ -55,7 +56,7 @@ export default {
},
getColour(element) {
if (!store.hasActiveDevice()) {
if (!store.hasActiveDevice() || isDeviceMini()) {
return "#000000";
}
return "#" + store.getActiveDevice().lighting.sampler[this.activeBank].colours[element];
Expand Down
3 changes: 2 additions & 1 deletion src/components/sections/sampler/AudioVisualiser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<script>
import {websocket} from "@/util/sockets";
import {store} from "@/store";
import {isDeviceMini} from "@/util/util";
export default {
name: "AudioVisualiser",
props: {
Expand Down Expand Up @@ -54,7 +55,7 @@ export default {
},
getPlaybackButton() {
if (!store.hasActiveDevice()) {
if (!store.hasActiveDevice() || isDeviceMini()) {
return "fa-solid fa-play";
}
if (store.getActiveDevice().sampler.banks[this.activeBank][this.activeButton].is_playing) {
Expand Down

0 comments on commit 6a6f6ca

Please sign in to comment.