fix: disable the quality choice while visuals are unavailable
This commit is contained in:
@@ -94,6 +94,14 @@ const statusText = computed(() => {
|
||||
return null;
|
||||
});
|
||||
|
||||
/** The scene was lost or never started: the quality choice has nothing to
|
||||
* act on, so it reads Static and is disabled rather than claiming High. */
|
||||
const visualsUnavailable = computed(
|
||||
() =>
|
||||
props.policy.reason === "full" &&
|
||||
(props.sceneStatus === "failed" || props.sceneStatus === "static"),
|
||||
);
|
||||
|
||||
const runAction = (): void => {
|
||||
const event = action.value?.event;
|
||||
if (event === "pause") emit("pause");
|
||||
@@ -334,7 +342,8 @@ onBeforeUnmount(() => {
|
||||
<label for="drive-quality">QUALITY</label>
|
||||
<select
|
||||
id="drive-quality"
|
||||
:value="maximumQuality"
|
||||
:value="visualsUnavailable ? 'static' : maximumQuality"
|
||||
:disabled="visualsUnavailable"
|
||||
aria-label="Quality control"
|
||||
@change="changeQuality"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user