Merge pull request #6120 from G-Chubinidze/gc_SCI_9185

Placeholder text in the "Move to different result" modal dropdown [SCI-9185]
This commit is contained in:
artoscinote 2023-09-01 11:40:34 +02:00 committed by GitHub
commit 7b73e03a5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 2 deletions

View file

@ -90,6 +90,10 @@
width: calc(100%);
}
.select__option-placeholder {
color: var(--sn-grey);
}
.sn-select__no-options {
color: var(--sn-grey);
padding: .5em;

View file

@ -15,7 +15,7 @@
<div class="w-full">
<Select
:value="target"
:options="targets"
:options="targetOptions"
v-bind:disabled="false"
@change="setTarget"
></Select>
@ -78,6 +78,15 @@
cancel() {
$(this.$refs.modal).modal('hide');
}
},
computed: {
targetOptions() {
return this.targets.map(target => [
target[0],
target[1] || this.i18n.t('protocols.steps.modals.move_element.result.untitled_result'),
target[1] === null ? true : false
]);
}
}
}
</script>

View file

@ -14,8 +14,10 @@
<template v-if="options.length">
<div
v-for="option in options"
:key="option[0]" @mousedown.prevent.stop="setValue(option[0])"
:key="option[0]"
@mousedown.prevent.stop="setValue(option[0])"
class="sn-select__option"
:class="{ 'select__option-placeholder': option[2] }"
>
{{ option[1] }}
</div>

View file

@ -3136,6 +3136,7 @@ en:
result:
title: Move to different result
targets_label: Select result
untitled_result: Untitled result
delete_step:
title: 'Delete step'
description_1: 'Youre about to delete a whole step from your protocol. It might contain data you dont want to lose. You wont be able to get it back.'