From c6d4c20982261b55b16dda59c3e657eb1feb0041 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Thu, 11 Mar 2021 16:11:44 +0200 Subject: Made Select component to make using styled selects easier --- src/components/poll/poll_form.vue | 51 ++++++++++++++------------------------- 1 file changed, 18 insertions(+), 33 deletions(-) (limited to 'src/components/poll/poll_form.vue') diff --git a/src/components/poll/poll_form.vue b/src/components/poll/poll_form.vue index c4403210..f10d1550 100644 --- a/src/components/poll/poll_form.vue +++ b/src/components/poll/poll_form.vue @@ -46,23 +46,13 @@ class="poll-type" :title="$t('polls.type')" > - + + +
- + {{ $t(`time.${unit}_short`, ['']) }} + +
-- cgit v1.2.3-70-g09d2 From 5d3bf43fdc83efb0294229df63201877032a85ff Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Thu, 11 Mar 2021 16:19:11 +0200 Subject: ghost styles for poll form --- src/components/poll/poll_form.vue | 14 ++------------ src/components/select/select.js | 21 +++++++++++++++++++++ src/components/select/select.vue | 31 ++++++++++--------------------- 3 files changed, 33 insertions(+), 33 deletions(-) create mode 100644 src/components/select/select.js (limited to 'src/components/poll/poll_form.vue') diff --git a/src/components/poll/poll_form.vue b/src/components/poll/poll_form.vue index f10d1550..f2459e45 100644 --- a/src/components/poll/poll_form.vue +++ b/src/components/poll/poll_form.vue @@ -47,6 +47,7 @@ :title="$t('polls.type')" > @@ -132,12 +134,6 @@ .poll-type { margin-right: 0.75em; flex: 1 1 60%; - .select { - border: none; - box-shadow: none; - background-color: transparent; - padding-right: 0.75em; - } } .poll-expiry { @@ -147,12 +143,6 @@ width: 3em; text-align: right; } - - .expiry-unit { - border: none; - box-shadow: none; - background-color: transparent; - } } } diff --git a/src/components/select/select.js b/src/components/select/select.js new file mode 100644 index 00000000..49535d07 --- /dev/null +++ b/src/components/select/select.js @@ -0,0 +1,21 @@ +import { library } from '@fortawesome/fontawesome-svg-core' +import { + faChevronDown +} from '@fortawesome/free-solid-svg-icons' + +library.add( + faChevronDown +) + +export default { + model: { + prop: 'value', + event: 'change' + }, + props: [ + 'value', + 'disabled', + 'unstyled', + 'kind' + ] +} diff --git a/src/components/select/select.vue b/src/components/select/select.vue index a27a2541..55474e1a 100644 --- a/src/components/select/select.vue +++ b/src/components/select/select.vue @@ -2,7 +2,7 @@ - + diff --git a/src/components/shadow_control/shadow_control.vue b/src/components/shadow_control/shadow_control.vue index 6b5acbdb..511e07f3 100644 --- a/src/components/shadow_control/shadow_control.vue +++ b/src/components/shadow_control/shadow_control.vue @@ -306,20 +306,20 @@ .id-control { align-items: stretch; - .select, .btn { + + .shadow-switcher { + flex: 1; + } + + .shadow-switcher, .btn { min-width: 1px; margin-right: 5px; } + .btn { padding: 0 .4em; margin: 0 .1em; } - .select { - flex: 1; - select { - align-self: initial; - } - } } } } diff --git a/src/components/user_card/user_card.vue b/src/components/user_card/user_card.vue index c5b73fde..75c08f47 100644 --- a/src/components/user_card/user_card.vue +++ b/src/components/user_card/user_card.vue @@ -532,15 +532,11 @@ flex: 1 0 auto; } - .userHighlightSel, - .userHighlightSel.select { + .userHighlightSel { padding-top: 0; padding-bottom: 0; flex: 1 0 auto; } - .userHighlightSel.select svg { - line-height: 22px; - } .userHighlightText { width: 70px; @@ -549,9 +545,7 @@ .userHighlightCl, .userHighlightText, - .userHighlightSel, - .userHighlightSel.select { - height: 22px; + .userHighlightSel { vertical-align: top; margin-right: .5em; margin-bottom: .25em; -- cgit v1.2.3-70-g09d2 From c03965646027bc8ce2d4c083ea3fd0423233fa18 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Mon, 31 May 2021 14:02:36 +0300 Subject: fix warnings --- src/components/poll/poll_form.vue | 10 +++++++--- src/components/settings_modal/tabs/filtering_tab.vue | 8 ++++---- src/components/user_card/user_card.vue | 16 ++++++++++++---- 3 files changed, 23 insertions(+), 11 deletions(-) (limited to 'src/components/poll/poll_form.vue') diff --git a/src/components/poll/poll_form.vue b/src/components/poll/poll_form.vue index ecbfdf41..3620075a 100644 --- a/src/components/poll/poll_form.vue +++ b/src/components/poll/poll_form.vue @@ -47,13 +47,17 @@ :title="$t('polls.type')" >
+ id="replyVisibility" + path="replyVisibility" + :options="replyVisibilityOptions" + > {{ $t('settings.replies_in_timeline') }}
diff --git a/src/components/user_card/user_card.vue b/src/components/user_card/user_card.vue index 75c08f47..53b55c01 100644 --- a/src/components/user_card/user_card.vue +++ b/src/components/user_card/user_card.vue @@ -137,10 +137,18 @@ v-model="userHighlightType" class="userHighlightSel" > - - - - + + + +
-- cgit v1.2.3-70-g09d2