Skip to content

Commit 13744d3

Browse files
committed
Replace checked-by-def/unchecked-by-def with default field
1 parent 5a3814f commit 13744d3

File tree

11 files changed

+32
-37
lines changed

11 files changed

+32
-37
lines changed

src_assets/common/assets/web/Checkbox.vue

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,9 @@ const props = defineProps({
2222
type: String,
2323
default: "missing-prefix"
2424
},
25-
checkedByDef: {
26-
type: Boolean,
27-
default: false
28-
},
29-
uncheckedByDef: {
30-
type: Boolean,
31-
default: false
25+
default: {
26+
type: [Boolean, null],
27+
default: null
3228
}
3329
});
3430
@@ -81,9 +77,8 @@ const checkboxValues = (() => {
8177
const labelField = props.label ?? `${props.localePrefix}.${props.id}`;
8278
const descField = props.desc ?? `${props.localePrefix}.${props.id}_desc`;
8379
const showDesc = props.desc !== "" || Object.entries(slots).length > 0;
84-
const showDefValue = props.checkedByDef || props.uncheckedByDef;
85-
const defValue = props.checkedByDef === props.uncheckedByDef ? "INVALID" :
86-
props.checkedByDef ? "_common.enabled_def_cbox" : "_common.disabled_def_cbox";
80+
const showDefValue = props.default !== null;
81+
const defValue = props.default ? "_common.enabled_def_cbox" : "_common.disabled_def_cbox";
8782
</script>
8883
8984
<template>

src_assets/common/assets/web/apps.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ <h1>{{ $t('apps.applications_title') }}</h1>
121121
label="apps.global_prep_name"
122122
desc="apps.global_prep_desc"
123123
v-model="editForm['exclude-global-prep-cmd']"
124-
checked-by-def
124+
default="true"
125125
></Checkbox>
126126
<div class="mb-3">
127127
<label for="appName" class="form-label">{{ $t('apps.cmd_prep_name') }}</label>
@@ -212,23 +212,23 @@ <h1>{{ $t('apps.applications_title') }}</h1>
212212
label="_common.run_as"
213213
desc="apps.run_as_desc"
214214
v-model="editForm.elevated"
215-
unchecked-by-def
215+
default="false"
216216
></Checkbox>
217217
<!-- auto-detach -->
218218
<Checkbox class="mb-3"
219219
id="autoDetach"
220220
label="apps.auto_detach"
221221
desc="apps.auto_detach_desc"
222222
v-model="editForm['auto-detach']"
223-
checked-by-def
223+
default="true"
224224
></Checkbox>
225225
<!-- wait for all processes -->
226226
<Checkbox class="mb-3"
227227
id="waitAll"
228228
label="apps.wait_all"
229229
desc="apps.wait_all_desc"
230230
v-model="editForm['wait-all']"
231-
checked-by-def
231+
default="true"
232232
></Checkbox>
233233
<!-- exit timeout -->
234234
<div class="mb-3">

src_assets/common/assets/web/configs/tabs/AudioVideo.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const config = ref(props.config)
5959
id="install_steam_audio_drivers"
6060
locale-prefix="config"
6161
v-model="config.install_steam_audio_drivers"
62-
checked-by-def
62+
default="true"
6363
></Checkbox>
6464
</template>
6565
</PlatformLayout>

src_assets/common/assets/web/configs/tabs/General.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ function removeCmd(index) {
129129
id="notify_pre_releases"
130130
locale-prefix="config"
131131
v-model="config.notify_pre_releases"
132-
unchecked-by-def
132+
default="false"
133133
></Checkbox>
134134
</div>
135135
</template>

src_assets/common/assets/web/configs/tabs/Inputs.vue

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const config = ref(props.config)
1818
id="controller"
1919
locale-prefix="config"
2020
v-model="config.controller"
21-
checked-by-def
21+
default="true"
2222
></Checkbox>
2323

2424
<!-- Emulated Gamepad Type -->
@@ -64,14 +64,14 @@ const config = ref(props.config)
6464
id="motion_as_ds4"
6565
locale-prefix="config"
6666
v-model="config.motion_as_ds4"
67-
checked-by-def
67+
default="true"
6868
></Checkbox>
6969
<!-- DS4 touchpad -->
7070
<Checkbox class="mb-3"
7171
id="touchpad_as_ds4"
7272
locale-prefix="config"
7373
v-model="config.touchpad_as_ds4"
74-
checked-by-def
74+
default="true"
7575
></Checkbox>
7676
</template>
7777
<!-- DS4 options (all platforms) -->
@@ -81,7 +81,7 @@ const config = ref(props.config)
8181
id="ds4_back_as_touchpad_click"
8282
locale-prefix="config"
8383
v-model="config.ds4_back_as_touchpad_click"
84-
checked-by-def
84+
default="true"
8585
></Checkbox>
8686
</template>
8787
</div>
@@ -105,7 +105,7 @@ const config = ref(props.config)
105105
id="keyboard"
106106
locale-prefix="config"
107107
v-model="config.keyboard"
108-
checked-by-def
108+
default="true"
109109
></Checkbox>
110110

111111
<!-- Key Repeat Delay-->
@@ -130,7 +130,7 @@ const config = ref(props.config)
130130
id="always_send_scancodes"
131131
locale-prefix="config"
132132
v-model="config.always_send_scancodes"
133-
checked-by-def
133+
default="true"
134134
></Checkbox>
135135

136136
<!-- Mapping Key AltRight to Key Windows -->
@@ -139,7 +139,7 @@ const config = ref(props.config)
139139
id="key_rightalt_to_key_win"
140140
locale-prefix="config"
141141
v-model="config.key_rightalt_to_key_win"
142-
unchecked-by-def
142+
default="false"
143143
></Checkbox>
144144

145145
<!-- Enable Mouse Input -->
@@ -148,7 +148,7 @@ const config = ref(props.config)
148148
id="mouse"
149149
locale-prefix="config"
150150
v-model="config.mouse"
151-
checked-by-def
151+
default="true"
152152
></Checkbox>
153153

154154
<!-- High resolution scrolling support -->
@@ -157,7 +157,7 @@ const config = ref(props.config)
157157
id="high_resolution_scrolling"
158158
locale-prefix="config"
159159
v-model="config.high_resolution_scrolling"
160-
checked-by-def
160+
default="true"
161161
></Checkbox>
162162

163163
<!-- Native pen/touch support -->
@@ -166,7 +166,7 @@ const config = ref(props.config)
166166
id="native_pen_touch"
167167
locale-prefix="config"
168168
v-model="config.native_pen_touch"
169-
checked-by-def
169+
default="true"
170170
></Checkbox>
171171
</div>
172172
</template>

src_assets/common/assets/web/configs/tabs/Network.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const effectivePort = computed(() => +config.value?.port ?? defaultMoonlightPort
2020
id="upnp"
2121
locale-prefix="config"
2222
v-model="config.upnp"
23-
unchecked-by-def
23+
default="false"
2424
></Checkbox>
2525
2626
<!-- Address family -->

src_assets/common/assets/web/configs/tabs/encoders/AmdAmfEncoder.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const config = ref(props.config)
5454
id="amd_enforce_hrd"
5555
locale-prefix="config"
5656
v-model="config.amd_enforce_hrd"
57-
unchecked-by-def
57+
default="false"
5858
></Checkbox>
5959
</div>
6060
</div>
@@ -89,15 +89,15 @@ const config = ref(props.config)
8989
id="amd_preanalysis"
9090
locale-prefix="config"
9191
v-model="config.amd_preanalysis"
92-
unchecked-by-def
92+
default="false"
9393
></Checkbox>
9494

9595
<!-- AMD VBAQ -->
9696
<Checkbox class="mb-3"
9797
id="amd_vbaq"
9898
locale-prefix="config"
9999
v-model="config.amd_vbaq"
100-
checked-by-def
100+
default="true"
101101
></Checkbox>
102102

103103
<!-- AMF Coder (H264) -->

src_assets/common/assets/web/configs/tabs/encoders/IntelQuickSyncEncoder.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const config = ref(props.config)
4141
id="qsv_slow_hevc"
4242
locale-prefix="config"
4343
v-model="config.qsv_slow_hevc"
44-
unchecked-by-def
44+
default="false"
4545
></Checkbox>
4646
</div>
4747
</template>

src_assets/common/assets/web/configs/tabs/encoders/NvidiaNvencEncoder.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ const config = ref(props.config)
7878
id="nvenc_realtime_hags"
7979
locale-prefix="config"
8080
v-model="config.nvenc_realtime_hags"
81-
checked-by-def
81+
default="true"
8282
>
8383
<br>
8484
<br>
@@ -91,7 +91,7 @@ const config = ref(props.config)
9191
id="nvenc_latency_over_power"
9292
locale-prefix="config"
9393
v-model="config.nvenc_latency_over_power"
94-
checked-by-def
94+
default="true"
9595
></Checkbox>
9696

9797
<!-- Present OpenGL/Vulkan on top of DXGI -->
@@ -100,15 +100,15 @@ const config = ref(props.config)
100100
id="nvenc_opengl_vulkan_on_dxgi"
101101
locale-prefix="config"
102102
v-model="config.nvenc_opengl_vulkan_on_dxgi"
103-
checked-by-def
103+
default="true"
104104
></Checkbox>
105105

106106
<!-- NVENC H264 CAVLC -->
107107
<Checkbox class="mb-3"
108108
id="nvenc_h264_cavlc"
109109
locale-prefix="config"
110110
v-model="config.nvenc_h264_cavlc"
111-
unchecked-by-def
111+
default="false"
112112
></Checkbox>
113113
</div>
114114
</div>

src_assets/common/assets/web/configs/tabs/encoders/VAAPIEncoder.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const config = ref(props.config)
1717
id="vaapi_strict_rc_buffer"
1818
locale-prefix="config"
1919
v-model="config.vaapi_strict_rc_buffer"
20-
unchecked-by-def
20+
default="false"
2121
></Checkbox>
2222
</div>
2323
</template>

0 commit comments

Comments
 (0)