diff options
author | Mike Greiling <mike@pixelcog.com> | 2018-11-16 23:07:38 +0300 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2018-11-20 18:30:01 +0300 |
commit | 5b9495c5db851ec8d1ca2cc6da0da12d6b161130 (patch) | |
tree | f622611ceb4caeda70212a52438a2c9428511a68 /app/assets/javascripts/vue_shared/components/sidebar | |
parent | 29d129d21718f8aa9c7d58a8b403cf91f6d4addd (diff) |
Prettify all the things
Diffstat (limited to 'app/assets/javascripts/vue_shared/components/sidebar')
13 files changed, 37 insertions, 155 deletions
diff --git a/app/assets/javascripts/vue_shared/components/sidebar/collapsed_calendar_icon.vue b/app/assets/javascripts/vue_shared/components/sidebar/collapsed_calendar_icon.vue index 5841db52704..cc24fedceed 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/collapsed_calendar_icon.vue +++ b/app/assets/javascripts/vue_shared/components/sidebar/collapsed_calendar_icon.vue @@ -47,16 +47,9 @@ export default { data-boundary="viewport" @click="click" > - <i - v-if="showIcon" - class="fa fa-calendar" - aria-hidden="true" - > - </i> + <i v-if="showIcon" class="fa fa-calendar" aria-hidden="true"> </i> <slot> - <span> - {{ text }} - </span> + <span> {{ text }} </span> </slot> </div> </template> diff --git a/app/assets/javascripts/vue_shared/components/sidebar/collapsed_grouped_date_picker.vue b/app/assets/javascripts/vue_shared/components/sidebar/collapsed_grouped_date_picker.vue index 174c29809ac..b5e43da401e 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/collapsed_grouped_date_picker.vue +++ b/app/assets/javascripts/vue_shared/components/sidebar/collapsed_grouped_date_picker.vue @@ -85,16 +85,10 @@ export default { @click="toggleSidebar" > <span class="sidebar-collapsed-value"> - <span v-if="showFromText">From</span> - <span>{{ dateText('min') }}</span> + <span v-if="showFromText">From</span> <span>{{ dateText('min') }}</span> </span> </collapsed-calendar-icon> - <div - v-if="hasMinAndMaxDates" - class="text-center sidebar-collapsed-divider" - > - - - </div> + <div v-if="hasMinAndMaxDates" class="text-center sidebar-collapsed-divider">-</div> <collapsed-calendar-icon v-if="maxDate" :container-class="iconClass" @@ -102,8 +96,7 @@ export default { @click="toggleSidebar" > <span class="sidebar-collapsed-value"> - <span v-if="!minDate">Until</span> - <span>{{ dateText('max') }}</span> + <span v-if="!minDate">Until</span> <span>{{ dateText('max') }}</span> </span> </collapsed-calendar-icon> </div> diff --git a/app/assets/javascripts/vue_shared/components/sidebar/date_picker.vue b/app/assets/javascripts/vue_shared/components/sidebar/date_picker.vue index 6aa880603b9..82067129c57 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/date_picker.vue +++ b/app/assets/javascripts/vue_shared/components/sidebar/date_picker.vue @@ -96,26 +96,14 @@ export default { </script> <template> - <div - :class="blockClass" - class="block" - > + <div :class="blockClass" class="block"> <div class="issuable-sidebar-header"> - <toggle-sidebar - :collapsed="collapsed" - @toggle="toggleSidebar" - /> + <toggle-sidebar :collapsed="collapsed" @toggle="toggleSidebar" /> </div> - <collapsed-calendar-icon - :text="collapsedText" - class="sidebar-collapsed-icon" - /> + <collapsed-calendar-icon :text="collapsedText" class="sidebar-collapsed-icon" /> <div class="title"> {{ label }} - <gl-loading-icon - v-if="isLoading" - :inline="true" - /> + <gl-loading-icon v-if="isLoading" :inline="true" /> <div class="float-right"> <button v-if="editable && !editing" @@ -125,11 +113,7 @@ export default { > Edit </button> - <toggle-sidebar - v-if="showToggleSidebar" - :collapsed="collapsed" - @toggle="toggleSidebar" - /> + <toggle-sidebar v-if="showToggleSidebar" :collapsed="collapsed" @toggle="toggleSidebar" /> </div> </div> <div class="value"> @@ -142,32 +126,21 @@ export default { @newDateSelected="newDateSelected" @hidePicker="stopEditing" /> - <span - v-else - class="value-content" - > + <span v-else class="value-content"> <template v-if="selectedDate"> <strong>{{ selectedDateWords }}</strong> - <span - v-if="selectedAndEditable" - class="no-value" - > + <span v-if="selectedAndEditable" class="no-value"> - <button type="button" class="btn-blank btn-link btn-secondary-hover-link" - @click="newDateSelected(null)" + @click="newDateSelected(null);" > remove </button> </span> </template> - <span - v-else - class="no-value" - > - None - </span> + <span v-else class="no-value"> None </span> </span> </div> </div> diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/base.vue b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/base.vue index 98b8b6460fe..f66e81b1e08 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/base.vue +++ b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/base.vue @@ -122,30 +122,18 @@ export default { :labels="context.labels" @onValueClick="handleCollapsedValueClick" /> - <dropdown-title - :can-edit="canEdit" - /> - <dropdown-value - :labels="context.labels" - :label-filter-base-path="labelFilterBasePath" - > + <dropdown-title :can-edit="canEdit" /> + <dropdown-value :labels="context.labels" :label-filter-base-path="labelFilterBasePath"> <slot></slot> </dropdown-value> - <div - v-if="canEdit" - class="selectbox js-selectbox" - style="display: none;" - > + <div v-if="canEdit" class="selectbox js-selectbox" style="display: none;"> <dropdown-hidden-input v-for="label in context.labels" :key="label.id" :name="hiddenInputName" :value="label.id" /> - <div - ref="dropdown" - class="dropdown" - > + <div ref="dropdown" class="dropdown"> <dropdown-button :ability-name="abilityName" :field-name="hiddenInputName" @@ -161,11 +149,9 @@ dropdown-menu-labels dropdown-menu-selectable" > <div class="dropdown-page-one"> <dropdown-header v-if="showCreate" /> - <dropdown-search-input/> + <dropdown-search-input /> <div class="dropdown-content"></div> - <div class="dropdown-loading"> - <gl-loading-icon /> - </div> + <div class="dropdown-loading"><gl-loading-icon /></div> <dropdown-footer v-if="showCreate" :labels-web-url="labelsWebUrl" diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_button.vue b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_button.vue index 48d2f16f554..498b507d11d 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_button.vue +++ b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_button.vue @@ -65,14 +65,7 @@ export default { class="dropdown-menu-toggle wide js-label-select js-multiselect js-context-config-modal" data-toggle="dropdown" > - <span class="dropdown-toggle-text"> - {{ dropdownToggleText }} - </span> - <i - aria-hidden="true" - class="fa fa-chevron-down" - data-hidden="true" - > - </i> + <span class="dropdown-toggle-text"> {{ dropdownToggleText }} </span> + <i aria-hidden="true" class="fa fa-chevron-down" data-hidden="true"> </i> </button> </template> diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_create_label.vue b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_create_label.vue index fe895136ccc..74c5e063c3d 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_create_label.vue +++ b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_create_label.vue @@ -23,12 +23,7 @@ export default { type="button" class="dropdown-title-button dropdown-menu-back" > - <i - aria-hidden="true" - class="fa fa-arrow-left" - data-hidden="true" - > - </i> + <i aria-hidden="true" class="fa fa-arrow-left" data-hidden="true"> </i> </button> {{ headerTitle }} <button @@ -36,12 +31,7 @@ export default { type="button" class="dropdown-title-button dropdown-menu-close" > - <i - aria-hidden="true" - class="fa fa-times dropdown-menu-close-icon" - data-hidden="true" - > - </i> + <i aria-hidden="true" class="fa fa-times dropdown-menu-close-icon" data-hidden="true"> </i> </button> </div> <div class="dropdown-content"> @@ -75,16 +65,10 @@ export default { /> </div> <div class="clearfix"> - <button - type="button" - class="btn btn-primary float-left js-new-label-btn disabled" - > + <button type="button" class="btn btn-primary float-left js-new-label-btn disabled"> {{ __('Create') }} </button> - <button - type="button" - class="btn btn-default float-right js-cancel-label-btn" - > + <button type="button" class="btn btn-default float-right js-cancel-label-btn"> {{ __('Cancel') }} </button> </div> diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_footer.vue b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_footer.vue index d64ad016f9b..ebbd8d119b5 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_footer.vue +++ b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_footer.vue @@ -25,19 +25,10 @@ export default { <div class="dropdown-footer"> <ul class="dropdown-footer-list"> <li> - <a - href="#" - class="dropdown-toggle-page" - > - {{ createLabelTitle }} - </a> + <a href="#" class="dropdown-toggle-page"> {{ createLabelTitle }} </a> </li> <li> - <a - :href="labelsWebUrl" - data-is-link="true" - class="dropdown-external-link" - > + <a :href="labelsWebUrl" data-is-link="true" class="dropdown-external-link"> {{ manageLabelsTitle }} </a> </li> diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_header.vue b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_header.vue index e98b6392827..eb837be165b 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_header.vue +++ b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_header.vue @@ -10,12 +10,7 @@ export default {}; type="button" class="dropdown-title-button dropdown-menu-close" > - <i - aria-hidden="true" - class="fa fa-times dropdown-menu-close-icon" - data-hidden="true" - > - </i> + <i aria-hidden="true" class="fa fa-times dropdown-menu-close-icon" data-hidden="true"> </i> </button> </div> </template> diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_search_input.vue b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_search_input.vue index 80d65a2a534..bf51fa3dc38 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_search_input.vue +++ b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_search_input.vue @@ -10,12 +10,7 @@ export default {}; class="dropdown-input-field" type="search" /> - <i - aria-hidden="true" - class="fa fa-search dropdown-input-search" - data-hidden="true" - > - </i> + <i aria-hidden="true" class="fa fa-search dropdown-input-search" data-hidden="true"> </i> <i aria-hidden="true" class="fa fa-times dropdown-input-clear js-dropdown-input-clear" diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_title.vue b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_title.vue index 9ac32ff13c6..cb53273c786 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_title.vue +++ b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_title.vue @@ -13,16 +13,8 @@ export default { <div class="title hide-collapsed append-bottom-10"> {{ __('Labels') }} <template v-if="canEdit"> - <i - aria-hidden="true" - class="fa fa-spinner fa-spin block-loading" - data-hidden="true" - > - </i> - <button - type="button" - class="edit-link btn btn-blank float-right js-sidebar-dropdown-toggle" - > + <i aria-hidden="true" class="fa fa-spinner fa-spin block-loading" data-hidden="true"> </i> + <button type="button" class="edit-link btn btn-blank float-right js-sidebar-dropdown-toggle"> {{ __('Edit') }} </button> </template> diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_value.vue b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_value.vue index 10e990f8a80..6faf3fafad1 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_value.vue +++ b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_value.vue @@ -37,22 +37,14 @@ export default { <template> <div :class="{ - 'has-labels':!isEmpty, + 'has-labels': !isEmpty, }" class="hide-collapsed value issuable-show-labels js-value" > - <span - v-if="isEmpty" - class="text-secondary" - > + <span v-if="isEmpty" class="text-secondary"> <slot>{{ __('None') }}</slot> </span> - <a - v-for="label in labels" - v-else - :key="label.id" - :href="labelFilterUrl(label)" - > + <a v-for="label in labels" v-else :key="label.id" :href="labelFilterUrl(label)"> <span v-tooltip :style="labelStyle(label)" diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_value_collapsed.vue b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_value_collapsed.vue index 0d5fc07e6e3..e742900dbcb 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_value_collapsed.vue +++ b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_value_collapsed.vue @@ -46,12 +46,7 @@ export default { data-container="body" @click="handleClick" > - <i - aria-hidden="true" - data-hidden="true" - class="fa fa-tags" - > - </i> + <i aria-hidden="true" data-hidden="true" class="fa fa-tags"> </i> <span>{{ labels.length }}</span> </div> </template> diff --git a/app/assets/javascripts/vue_shared/components/sidebar/toggle_sidebar.vue b/app/assets/javascripts/vue_shared/components/sidebar/toggle_sidebar.vue index 80dc7d3557c..3b5ce0e9910 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/toggle_sidebar.vue +++ b/app/assets/javascripts/vue_shared/components/sidebar/toggle_sidebar.vue @@ -46,7 +46,7 @@ export default { <i :class="{ 'fa-angle-double-right': !collapsed, - 'fa-angle-double-left': collapsed + 'fa-angle-double-left': collapsed, }" aria-label="toggle collapse" class="fa" |