Skip to content

Commit fc71b73

Browse files
committed
SEBSERV-878 added new texts and make value inversion possible for Checkboxes
1 parent 22c513c commit fc71b73

3 files changed

Lines changed: 25 additions & 13 deletions

File tree

client/src/components/widgets/sebSettings/SebSettingsSecurity.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
label="sebSettings.securityView.sebService.sebServiceIgnore"
1717
:tooltip="false"
1818
:disabled="context.readonly"
19+
:invert-value="true"
1920
@saved="notifyEBServiceIgnore"
2021
/>
2122
</v-row>
@@ -40,7 +41,7 @@
4041
:label-tooltip="true"
4142
:disabled="
4243
context.readonly || igonreSEBServiceRef
43-
? !igonreSEBServiceRef?.boolVal
44+
? igonreSEBServiceRef?.boolVal
4445
: false
4546
"
4647
/>
@@ -53,7 +54,7 @@
5354
:tooltip="false"
5455
:disabled="
5556
context.readonly || igonreSEBServiceRef
56-
? !igonreSEBServiceRef?.boolVal
57+
? igonreSEBServiceRef?.boolVal
5758
: false
5859
"
5960
/>
@@ -66,7 +67,7 @@
6667
:tooltip="false"
6768
:disabled="
6869
context.readonly || igonreSEBServiceRef
69-
? !igonreSEBServiceRef?.boolVal
70+
? igonreSEBServiceRef?.boolVal
7071
: false
7172
"
7273
/>
@@ -79,7 +80,7 @@
7980
:tooltip="false"
8081
:disabled="
8182
context.readonly || igonreSEBServiceRef
82-
? !igonreSEBServiceRef?.boolVal
83+
? igonreSEBServiceRef?.boolVal
8384
: false
8485
"
8586
/>

client/src/components/widgets/sebSettings/components/inputFields/CheckboxSetting.vue

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@ const props = defineProps<{
2929
label: string;
3030
tooltip?: boolean;
3131
disabled?: boolean;
32+
invertValue?: boolean;
3233
}>();
3334
34-
const boolVal = ref<boolean>(props.modelValue.getBooleanValue(props.name));
35+
const boolVal = ref<boolean>(getValue());
3536
3637
defineExpose({
3738
boolVal,
@@ -40,10 +41,22 @@ defineExpose({
4041
const emit = defineEmits(["saved"]);
4142
4243
async function save() {
43-
props.modelValue.saveSingleValue(
44-
props.name,
45-
boolVal.value ? "true" : "false",
46-
);
44+
var value: string = props.invertValue
45+
? boolVal.value
46+
? "false"
47+
: "true"
48+
: boolVal.value
49+
? "true"
50+
: "false";
51+
props.modelValue.saveSingleValue(props.name, value);
4752
emit("saved");
4853
}
54+
55+
function getValue(): boolean {
56+
if (props.invertValue) {
57+
return !props.modelValue.getBooleanValue(props.name);
58+
} else {
59+
return props.modelValue.getBooleanValue(props.name);
60+
}
61+
}
4962
</script>

client/src/i18n/locales/en.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1460,15 +1460,15 @@
14601460
"securityView": {
14611461
"sebService": {
14621462
"title": "SEB Service (Win)",
1463-
"note": "IMPORTANT: The SEB Service changes aspects of the system configuration. Some anti-virus software providers might falsely identify its operation as malicious, thus it is not recommended to use the SEB Service in uncontrolled environments (e.g. BYOD).",
1463+
"note": "Recommended for BYOD scenarios.",
14641464
"sebServicePolicy": {
14651465
"title": "SEB Service policy",
14661466
"0": "allow to run SEB without service",
14671467
"1": "display warning when service is not running",
14681468
"2": "allow to use SEB only with service"
14691469
},
14701470
"sebServicePolicy_tooltip": "Policy that applies when an exam client doesn't have the SEB client running",
1471-
"sebServiceIgnore": "Ignore SEB Service",
1471+
"sebServiceIgnore": "Enable SEB Service Component",
14721472
"enableWindowsUpdate": "Allow Windows Update to run while SEB is running",
14731473
"enableChromeNotifications": "Allow notifications from Chrome browsers",
14741474
"allowScreenSharing": "Allow remote session/screen sharing",
@@ -1968,11 +1968,9 @@
19681968
"createConnectionConfiguration": "Add Connection Configuration",
19691969
"connectionConfigurations": "Connection Configurations",
19701970
"certificates": "Certificates",
1971-
19721971
"institutions": "Institutions",
19731972
"createInstitution": "Add Institution",
19741973
"editInstitution": "Edit Institution",
1975-
19761974
"editExamTemplate": "Edit Exam Template",
19771975
"galleryView": "Gallery View"
19781976
},

0 commit comments

Comments
 (0)