diff options
author | dartcafe <github@dartcafe.de> | 2022-03-26 15:38:50 +0300 |
---|---|---|
committer | dartcafe <github@dartcafe.de> | 2022-03-26 15:38:50 +0300 |
commit | b9cd2e6cf92a49b21a5f90f715d13d5d722361ae (patch) | |
tree | 55cdd120745348b49019b22218faf5e4b672d42b /src/js/components/Options | |
parent | 841499f61b641c4871d7c1511d79f2d655485dca (diff) |
glitches, fixes, styling
Signed-off-by: dartcafe <github@dartcafe.de>
Diffstat (limited to 'src/js/components/Options')
-rw-r--r-- | src/js/components/Options/OptionCloneDate.vue | 2 | ||||
-rw-r--r-- | src/js/components/Options/OptionsTextAddBulk.vue | 20 |
2 files changed, 14 insertions, 8 deletions
diff --git a/src/js/components/Options/OptionCloneDate.vue b/src/js/components/Options/OptionCloneDate.vue index 9c128ddf..795d2295 100644 --- a/src/js/components/Options/OptionCloneDate.vue +++ b/src/js/components/Options/OptionCloneDate.vue @@ -37,7 +37,7 @@ <input v-model="sequence.amount"> </div> - <div class="buttons"> + <div class="modal__buttons"> <ButtonDiv :title="t('polls', 'Cancel')" @click="$emit('close')" /> <ButtonDiv :primary="true" :title="t('polls', 'OK')" @click="createSequence" /> </div> diff --git a/src/js/components/Options/OptionsTextAddBulk.vue b/src/js/components/Options/OptionsTextAddBulk.vue index c866607c..0b18ca5e 100644 --- a/src/js/components/Options/OptionsTextAddBulk.vue +++ b/src/js/components/Options/OptionsTextAddBulk.vue @@ -30,12 +30,18 @@ {{ caption }} </ActionButton> </Actions> + <Modal v-if="showModal" size="small" :can-close="false"> <div class="option-clone-date modal__content"> + <h2>{{ t('polls', 'Create multiple options at once') }}</h2> + + <p>{{ t('polls', 'Each line creates a new option. Duplicates will get skipped without warning.') }}</p> + <textarea v-model="newPollTexts" class="add-options-list" :placeholder="placeholder" /> - <div class="buttons"> + + <div class="modal__buttons"> <ButtonDiv :title="t('polls', 'Close')" @click="showModal = false" /> <ButtonDiv :primary="true" :title="t('polls', 'Add options')" @click="addOptionsList()" /> </div> @@ -82,14 +88,10 @@ export default { if (this.newPollTexts) { try { await this.$store.dispatch('options/addBulk', { text: this.newPollTexts }) - showSuccess(t('polls', 'Options added (possible duplicates got skipped)')) + showSuccess(t('polls', 'Options added')) this.newPollTexts = '' } catch (e) { - if (e.response.status === 409) { - showError(t('polls', '{optionTexts} already exists', { optionText: this.newPollText })) - } else { - showError(t('polls', 'Error adding options', { optionText: this.newPollText })) - } + showError(t('polls', 'Error adding options', { optionText: this.newPollText })) } } }, @@ -98,6 +100,10 @@ export default { </script> <style lang="scss"> + .option-clone-date.modal__content { + padding-left: 28px; + padding-right: 28px; + } .add-options-list { width: 99%; resize: vertical; |