Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/polls.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordartcafe <github@dartcafe.de>2022-06-04 12:33:14 +0300
committerdartcafe <github@dartcafe.de>2022-06-04 12:33:14 +0300
commitf68eeba6fcb315674a4dfddf73a7fc4a17aa364a (patch)
tree9d7f5e232bad0ffce0e97c82eec4d4daba243fbb /src/js/components/Configuration
parent315d2cfb3ce51825edaaeca4fe45e3cb4a876126 (diff)
enhance inputDiv and optimize modals
Signed-off-by: dartcafe <github@dartcafe.de>
Diffstat (limited to 'src/js/components/Configuration')
-rw-r--r--src/js/components/Configuration/ConfigOptionLimit.vue8
-rw-r--r--src/js/components/Configuration/ConfigTitle.vue16
-rw-r--r--src/js/components/Configuration/ConfigVoteLimit.vue7
3 files changed, 19 insertions, 12 deletions
diff --git a/src/js/components/Configuration/ConfigOptionLimit.vue b/src/js/components/Configuration/ConfigOptionLimit.vue
index f9c74965..48738834 100644
--- a/src/js/components/Configuration/ConfigOptionLimit.vue
+++ b/src/js/components/Configuration/ConfigOptionLimit.vue
@@ -25,14 +25,14 @@
<CheckboxRadioSwitch :checked.sync="useOptionLimit" type="switch">
{{ t('polls', 'Limit "Yes" votes per option') }}
</CheckboxRadioSwitch>
+
<InputDiv v-if="optionLimit"
v-model="optionLimit"
- class="selectUnit indented"
+ class="indented"
type="number"
inputmode="numeric"
- use-num-modifiers
- @add="optionLimit += 1"
- @subtract="optionLimit -= 1" />
+ use-num-modifiers />
+
<CheckboxRadioSwitch v-if="optionLimit"
class="indented"
:checked.sync="hideBookedUp"
diff --git a/src/js/components/Configuration/ConfigTitle.vue b/src/js/components/Configuration/ConfigTitle.vue
index 98d8d6ec..fe1521f5 100644
--- a/src/js/components/Configuration/ConfigTitle.vue
+++ b/src/js/components/Configuration/ConfigTitle.vue
@@ -21,24 +21,32 @@
-->
<template>
- <input v-model="title"
- :class="{ error: !poll.title }"
+ <InputDiv v-model="title"
+ :signaling-class="checkTitle"
type="text"
- @change="$emit('change')"
- @keyup.enter="$emit('change')">
+ @change="$emit('change')" />
</template>
<script>
import { mapState } from 'vuex'
+import InputDiv from '../Base/InputDiv.vue'
export default {
name: 'ConfigTitle',
+ components: {
+ InputDiv,
+ },
+
computed: {
...mapState({
poll: (state) => state.poll,
}),
+ checkTitle() {
+ return this.poll.title ? '' : 'error'
+ },
+
title: {
get() {
return this.poll.title
diff --git a/src/js/components/Configuration/ConfigVoteLimit.vue b/src/js/components/Configuration/ConfigVoteLimit.vue
index 09637945..871aa248 100644
--- a/src/js/components/Configuration/ConfigVoteLimit.vue
+++ b/src/js/components/Configuration/ConfigVoteLimit.vue
@@ -25,14 +25,13 @@
<CheckboxRadioSwitch :checked.sync="useVoteLimit" type="switch">
{{ t('polls', 'Limit "Yes" votes per user') }}
</CheckboxRadioSwitch>
+
<InputDiv v-if="voteLimit"
v-model="voteLimit"
- class="selectUnit indented"
+ class="indented"
type="number"
inputmode="numeric"
- use-num-modifiers
- @add="voteLimit += 1"
- @subtract="voteLimit -= 1" />
+ use-num-modifiers />
</div>
</template>