Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src_assets/common/assets/web/Checkbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ const props = defineProps({
type: String,
default: "missing-prefix"
},
inverseValues: {
type: Boolean,
default: false,
},
default: {
type: undefined,
default: null,
Expand Down Expand Up @@ -79,7 +83,9 @@ const checkboxValues = (() => {
return ["true", "false"];
})();

return { truthy: mappedValues[0], falsy: mappedValues[1] };
const truthyIndex = props.inverseValues ? 1 : 0;
const falsyIndex = props.inverseValues ? 0 : 1;
return { truthy: mappedValues[truthyIndex], falsy: mappedValues[falsyIndex] };
})();
const parsedDefaultPropValue = (() => {
const boolValues = mapToBoolRepresentation(props.default);
Expand Down
1 change: 1 addition & 0 deletions src_assets/common/assets/web/apps.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ <h1>{{ $t('apps.applications_title') }}</h1>
desc="apps.global_prep_desc"
v-model="editForm['exclude-global-prep-cmd']"
default="true"
inverse-values
></Checkbox>
<div class="mb-3">
<label for="appName" class="form-label">{{ $t('apps.cmd_prep_name') }}</label>
Expand Down
Loading