Fix styling in label color picker and pick random default colors
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
6
package-lock.json
generated
6
package-lock.json
generated
@@ -3570,9 +3570,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@nextcloud/vue": {
|
"@nextcloud/vue": {
|
||||||
"version": "1.2.8",
|
"version": "1.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/@nextcloud/vue/-/vue-1.2.8.tgz",
|
"resolved": "https://registry.npmjs.org/@nextcloud/vue/-/vue-1.3.0.tgz",
|
||||||
"integrity": "sha512-YEiI+Cu7v+xRXgZ15vK/pcbOEyOcy6PHI90/JMHsVJVVGTYijy5oeG4izQFc0+/oC1idgbShrwN4Cr1W1JfxWA==",
|
"integrity": "sha512-zqSLvrp+pX012qNBbJBuE/Z9MPv/A6fovsro2nkGCoO0ppBD+W9gmjzLa6D9jRHN24+BmDWB3lNGd9T/G0q3Fw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@nextcloud/axios": "^1.1.0",
|
"@nextcloud/axios": "^1.1.0",
|
||||||
"@nextcloud/router": "^1.0.0",
|
"@nextcloud/router": "^1.0.0",
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
"@nextcloud/axios": "^1.3.1",
|
"@nextcloud/axios": "^1.3.1",
|
||||||
"@nextcloud/l10n": "^1.0.1",
|
"@nextcloud/l10n": "^1.0.1",
|
||||||
"@nextcloud/router": "^1.0.0",
|
"@nextcloud/router": "^1.0.0",
|
||||||
"@nextcloud/vue": "^1.2.8",
|
"@nextcloud/vue": "^1.3.0",
|
||||||
"fuse.js": "^3.4.6",
|
"fuse.js": "^3.4.6",
|
||||||
"nextcloud-server": "^0.15.10",
|
"nextcloud-server": "^0.15.10",
|
||||||
"nextcloud-vue-collections": "^0.7.1",
|
"nextcloud-vue-collections": "^0.7.1",
|
||||||
|
|||||||
@@ -25,22 +25,32 @@
|
|||||||
:actions="[]"
|
:actions="[]"
|
||||||
:title="board.title"
|
:title="board.title"
|
||||||
@close="closeSidebar">
|
@close="closeSidebar">
|
||||||
<AppSidebarTab :order="0" name="Sharing" icon="icon-shared">
|
<AppSidebarTab id="sharing"
|
||||||
|
:order="0"
|
||||||
|
:name="t('deck', 'Sharing')"
|
||||||
|
icon="icon-shared">
|
||||||
<SharingTabSidebar :board="board" />
|
<SharingTabSidebar :board="board" />
|
||||||
</AppSidebarTab>
|
</AppSidebarTab>
|
||||||
|
|
||||||
<AppSidebarTab :order="1" name="Tags" icon="icon-tag">
|
<AppSidebarTab id="tags"
|
||||||
|
:order="1"
|
||||||
|
:name="t('deck', 'Tags')"
|
||||||
|
icon="icon-tag">
|
||||||
<TagsTabSidebar :board="board" />
|
<TagsTabSidebar :board="board" />
|
||||||
</AppSidebarTab>
|
</AppSidebarTab>
|
||||||
|
|
||||||
<AppSidebarTab v-if="canEdit"
|
<AppSidebarTab v-if="canEdit"
|
||||||
|
id="deleted"
|
||||||
:order="2"
|
:order="2"
|
||||||
name="Deleted items"
|
:name="t('deck', 'Deleted items')"
|
||||||
icon="icon-delete">
|
icon="icon-delete">
|
||||||
<DeletedTabSidebar :board="board" />
|
<DeletedTabSidebar :board="board" />
|
||||||
</AppSidebarTab>
|
</AppSidebarTab>
|
||||||
|
|
||||||
<AppSidebarTab :order="3" name="Timeline" icon="icon-activity">
|
<AppSidebarTab id="activity"
|
||||||
|
:order="3"
|
||||||
|
:name="t('deck', 'Timeline')"
|
||||||
|
icon="icon-activity">
|
||||||
<TimelineTabSidebar :board="board" />
|
<TimelineTabSidebar :board="board" />
|
||||||
</AppSidebarTab>
|
</AppSidebarTab>
|
||||||
</AppSidebar>
|
</AppSidebar>
|
||||||
|
|||||||
@@ -4,10 +4,10 @@
|
|||||||
<li v-for="label in labels" :key="label.id" :class="{editing: (editingLabelId === label.id)}">
|
<li v-for="label in labels" :key="label.id" :class="{editing: (editingLabelId === label.id)}">
|
||||||
<!-- Edit Tag -->
|
<!-- Edit Tag -->
|
||||||
<template v-if="editingLabelId === label.id">
|
<template v-if="editingLabelId === label.id">
|
||||||
<ColorPicker class="app-navigation-entry-bullet-wrapper" :value="'#' + editingLabel.color" @input="updateColor">
|
|
||||||
<div :style="{ backgroundColor: '#' + editingLabel.color }" class="color0 icon-colorpicker app-navigation-entry-bullet" />
|
|
||||||
</ColorPicker>
|
|
||||||
<form class="label-form" @submit.prevent="updateLabel(label)">
|
<form class="label-form" @submit.prevent="updateLabel(label)">
|
||||||
|
<ColorPicker class="color-picker-wrapper" :value="'#' + editingLabel.color" @input="updateColor">
|
||||||
|
<div :style="{ backgroundColor: '#' + editingLabel.color }" class="color0 icon-colorpicker" />
|
||||||
|
</ColorPicker>
|
||||||
<input v-model="editingLabel.title" type="text">
|
<input v-model="editingLabel.title" type="text">
|
||||||
<input v-tooltip="{content: missingDataLabel, show: !editLabelObjValidated, trigger: 'manual' }"
|
<input v-tooltip="{content: missingDataLabel, show: !editLabelObjValidated, trigger: 'manual' }"
|
||||||
:disabled="!editLabelObjValidated"
|
:disabled="!editLabelObjValidated"
|
||||||
@@ -38,10 +38,10 @@
|
|||||||
<li v-if="addLabel" class="editing">
|
<li v-if="addLabel" class="editing">
|
||||||
<!-- New Tag -->
|
<!-- New Tag -->
|
||||||
<template>
|
<template>
|
||||||
<ColorPicker class="app-navigation-entry-bullet-wrapper" :value="'#' + addLabelObj.color" @input="updateColor">
|
|
||||||
<div :style="{ backgroundColor: '#' + addLabelObj.color }" class="color0 icon-colorpicker app-navigation-entry-bullet" />
|
|
||||||
</ColorPicker>
|
|
||||||
<form class="label-form" @submit.prevent="clickAddLabel">
|
<form class="label-form" @submit.prevent="clickAddLabel">
|
||||||
|
<ColorPicker class="color-picker-wrapper" :value="'#' + addLabelObj.color" @input="updateColor">
|
||||||
|
<div :style="{ backgroundColor: '#' + addLabelObj.color }" class="color0 icon-colorpicker" />
|
||||||
|
</ColorPicker>
|
||||||
<input v-model="addLabelObj.title" type="text">
|
<input v-model="addLabelObj.title" type="text">
|
||||||
<input v-tooltip="{content: missingDataLabel, show: !addLabelObjValidated, trigger: 'manual' }"
|
<input v-tooltip="{content: missingDataLabel, show: !addLabelObjValidated, trigger: 'manual' }"
|
||||||
:disabled="!addLabelObjValidated"
|
:disabled="!addLabelObjValidated"
|
||||||
@@ -81,7 +81,7 @@ export default {
|
|||||||
addLabelObj: null,
|
addLabelObj: null,
|
||||||
addLabel: false,
|
addLabel: false,
|
||||||
missingDataLabel: t('deck', 'title and color value must be provided'),
|
missingDataLabel: t('deck', 'title and color value must be provided'),
|
||||||
defaultColors: ['#31CC7C', '#317CCC', '#FF7A66', '#F1DB50', '#7C31CC', '#CC317C', '#3A3B3D', '#CACBCD'],
|
defaultColors: ['31CC7C', '17CCC', 'FF7A66', 'F1DB50', '7C31CC', 'CC317C', '3A3B3D', 'CACBCD'],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -133,7 +133,7 @@ export default {
|
|||||||
this.editingLabelId = null
|
this.editingLabelId = null
|
||||||
},
|
},
|
||||||
clickShowAddLabel() {
|
clickShowAddLabel() {
|
||||||
this.addLabelObj = { cardId: null, color: '000000', title: '' }
|
this.addLabelObj = { cardId: null, color: this.defaultColors[Math.floor(Math.random() * this.defaultColors.length)], title: '' }
|
||||||
this.addLabel = true
|
this.addLabel = true
|
||||||
},
|
},
|
||||||
clickAddLabel() {
|
clickAddLabel() {
|
||||||
@@ -145,9 +145,13 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
$clickable-area: 37px;
|
||||||
|
|
||||||
.labels li {
|
.labels li {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-bottom: 3px;
|
margin-bottom: 3px;
|
||||||
|
align-items: stretch;
|
||||||
|
height: $clickable-area;
|
||||||
|
|
||||||
.label-title {
|
.label-title {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
@@ -158,23 +162,27 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
&:not(.editing) button {
|
&:not(.editing) button {
|
||||||
width: 44px;
|
width: $clickable-area;
|
||||||
margin: 0;
|
margin: 0 0 0 -3px;
|
||||||
margin-left: -3px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-navigation-entry-bullet-wrapper {
|
.color-picker-wrapper {
|
||||||
position: absolute;
|
&, &::v-deep > .trigger {
|
||||||
width: 44px !important;
|
width: $clickable-area;
|
||||||
margin: 6px;
|
padding: 3px;
|
||||||
height: 44px;
|
display: flex;
|
||||||
.color0 {
|
align-items: stretch;
|
||||||
width: 30px !important;
|
position: relative;
|
||||||
height: 30px;
|
}
|
||||||
border-radius: 50%;
|
|
||||||
background-size: 14px;
|
.color0 {
|
||||||
|
position: absolute;
|
||||||
|
width: calc(#{$clickable-area} - 6px);
|
||||||
|
height: calc(#{$clickable-area} - 6px);
|
||||||
|
background-size: 14px;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
&.editing {
|
&.editing {
|
||||||
display: block;
|
display: block;
|
||||||
@@ -187,12 +195,11 @@ export default {
|
|||||||
}
|
}
|
||||||
button,
|
button,
|
||||||
input:not([type='text']):last-child {
|
input:not([type='text']):last-child {
|
||||||
border-bottom-right-radius: var(--border-radius);
|
min-width: $clickable-area;
|
||||||
border-top-right-radius: var(--border-radius);
|
border-radius: 0 var(--border-radius) var(--border-radius) 0;
|
||||||
border-bottom-left-radius: 0;
|
|
||||||
border-top-left-radius: 0;
|
|
||||||
margin-left: -1px;
|
margin-left: -1px;
|
||||||
width: 35px;
|
width: 35px;
|
||||||
|
background-color: var(--color-main-background);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -26,7 +26,10 @@
|
|||||||
:subtitle="subtitle"
|
:subtitle="subtitle"
|
||||||
@close="closeSidebar">
|
@close="closeSidebar">
|
||||||
<template #secondary-actions />
|
<template #secondary-actions />
|
||||||
<AppSidebarTab :order="0" name="Details" icon="icon-home">
|
<AppSidebarTab id="details"
|
||||||
|
:order="0"
|
||||||
|
:name="t('deck', 'Details')"
|
||||||
|
icon="icon-home">
|
||||||
<div class="section-wrapper">
|
<div class="section-wrapper">
|
||||||
<div v-tooltip="t('deck', 'Tags')" class="section-label icon-tag">
|
<div v-tooltip="t('deck', 'Tags')" class="section-label icon-tag">
|
||||||
<span class="hidden-visually">{{ t('deck', 'Tags') }}</span>
|
<span class="hidden-visually">{{ t('deck', 'Tags') }}</span>
|
||||||
@@ -117,15 +120,24 @@
|
|||||||
<VueEasymde ref="markdownEditor" v-model="copiedCard.description" :configs="mdeConfig" />
|
<VueEasymde ref="markdownEditor" v-model="copiedCard.description" :configs="mdeConfig" />
|
||||||
</AppSidebarTab>
|
</AppSidebarTab>
|
||||||
|
|
||||||
<AppSidebarTab :order="1" :name="t('deck', 'Attachments')" icon="icon-attach">
|
<AppSidebarTab id="attachments"
|
||||||
|
:order="1"
|
||||||
|
:name="t('deck', 'Attachments')"
|
||||||
|
icon="icon-attach">
|
||||||
<CardSidebarTabAttachments :card="currentCard" />
|
<CardSidebarTabAttachments :card="currentCard" />
|
||||||
</AppSidebarTab>
|
</AppSidebarTab>
|
||||||
|
|
||||||
<AppSidebarTab :order="2" :name="t('deck', 'Comments')" icon="icon-comment">
|
<AppSidebarTab id="comments"
|
||||||
|
:order="2"
|
||||||
|
:name="t('deck', 'Comments')"
|
||||||
|
icon="icon-comment">
|
||||||
<CardSidebarTabComments :card="currentCard" />
|
<CardSidebarTabComments :card="currentCard" />
|
||||||
</AppSidebarTab>
|
</AppSidebarTab>
|
||||||
|
|
||||||
<AppSidebarTab :order="3" :name="t('deck', 'Timeline')" icon="icon-activity">
|
<AppSidebarTab id="timeline"
|
||||||
|
:order="3"
|
||||||
|
:name="t('deck', 'Timeline')"
|
||||||
|
icon="icon-activity">
|
||||||
<CardSidebarTabActivity :card="currentCard" />
|
<CardSidebarTabActivity :card="currentCard" />
|
||||||
</AppSidebarTab>
|
</AppSidebarTab>
|
||||||
</AppSidebar>
|
</AppSidebar>
|
||||||
|
|||||||
Reference in New Issue
Block a user