зеркало из https://github.com/nextcloud/deck.git
Merge pull request #2045 from nextcloud/bugfix/labels
Improve label styling
This commit is contained in:
Коммит
ebce6b5bc2
|
@ -14,24 +14,30 @@
|
||||||
type="submit"
|
type="submit"
|
||||||
value=""
|
value=""
|
||||||
class="icon-confirm">
|
class="icon-confirm">
|
||||||
<input v-tooltip="t('deck', 'Cancel')"
|
<Actions>
|
||||||
value=""
|
<ActionButton v-tooltip="{content: missingDataLabel, show: !editLabelObjValidated, trigger: 'manual' }"
|
||||||
class="icon-close"
|
:disabled="!editLabelObjValidated"
|
||||||
|
icon="icon-close"
|
||||||
@click="editingLabelId = null">
|
@click="editingLabelId = null">
|
||||||
|
{{ t('deck', 'Cancel') }}
|
||||||
|
</ActionButton>
|
||||||
|
</Actions>
|
||||||
</form>
|
</form>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<div :style="{ backgroundColor: `#${label.color}`, color:textColor(label.color) }" class="label-title">
|
<div class="label-title" @click="clickEdit(label)">
|
||||||
<span>{{ label.title }}</span>
|
<span :style="{ backgroundColor: `#${label.color}`, color: textColor(label.color) }">{{ label.title }}</span>
|
||||||
</div>
|
</div>
|
||||||
<button v-if="canManage && !isArchived"
|
<Actions v-if="canManage && !isArchived">
|
||||||
v-tooltip="t('deck', 'Edit')"
|
<ActionButton icon="icon-rename" @click="clickEdit(label)">
|
||||||
class="icon-rename"
|
{{ t('deck', 'Edit') }}
|
||||||
@click="clickEdit(label)" />
|
</ActionButton>
|
||||||
<button v-if="canManage && !isArchived"
|
</Actions>
|
||||||
v-tooltip="t('deck', 'Delete')"
|
<Actions v-if="canManage && !isArchived">
|
||||||
class="icon-delete"
|
<ActionButton icon="icon-delete" @click="deleteLabel(label.id)">
|
||||||
@click="deleteLabel(label.id)" />
|
{{ t('deck', 'Delete') }}
|
||||||
|
</ActionButton>
|
||||||
|
</Actions>
|
||||||
</template>
|
</template>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
@ -48,10 +54,11 @@
|
||||||
type="submit"
|
type="submit"
|
||||||
value=""
|
value=""
|
||||||
class="icon-confirm">
|
class="icon-confirm">
|
||||||
<input v-tooltip="t('deck', 'Cancel')"
|
<Actions>
|
||||||
value=""
|
<ActionButton icon="icon-close" @click="addLabel=false">
|
||||||
class="icon-close"
|
{{ t('deck', 'Cancel') }}
|
||||||
@click="addLabel=false">
|
</ActionButton>
|
||||||
|
</Actions>
|
||||||
</form>
|
</form>
|
||||||
</template>
|
</template>
|
||||||
</li>
|
</li>
|
||||||
|
@ -66,12 +73,14 @@
|
||||||
|
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import Color from '../../mixins/color'
|
import Color from '../../mixins/color'
|
||||||
import { ColorPicker } from '@nextcloud/vue'
|
import { ColorPicker, Actions, ActionButton } from '@nextcloud/vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TagsTabSidebar',
|
name: 'TagsTabSidebar',
|
||||||
components: {
|
components: {
|
||||||
ColorPicker,
|
ColorPicker,
|
||||||
|
Actions,
|
||||||
|
ActionButton,
|
||||||
},
|
},
|
||||||
mixins: [Color],
|
mixins: [Color],
|
||||||
data() {
|
data() {
|
||||||
|
@ -149,7 +158,7 @@ export default {
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
$clickable-area: 37px;
|
$clickable-area: 44px;
|
||||||
|
|
||||||
.labels li {
|
.labels li {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -157,12 +166,23 @@ export default {
|
||||||
align-items: stretch;
|
align-items: stretch;
|
||||||
height: $clickable-area;
|
height: $clickable-area;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: var(--color-background-hover);
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
.label-title {
|
.label-title {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
border-radius: 3px;
|
padding: 10px;
|
||||||
padding: 7px;
|
|
||||||
|
&:hover, span:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
span {
|
span {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
border-radius: 15px;
|
||||||
|
padding: 7px 12px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&:not(.editing) button {
|
&:not(.editing) button {
|
||||||
|
@ -195,15 +215,11 @@ export default {
|
||||||
display: flex;
|
display: flex;
|
||||||
input[type=text] {
|
input[type=text] {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
|
margin: 5px;
|
||||||
}
|
}
|
||||||
|
input[type=submit] {
|
||||||
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
button,
|
|
||||||
input:not([type='text']):last-child {
|
|
||||||
min-width: $clickable-area;
|
|
||||||
border-radius: 0 var(--border-radius) var(--border-radius) 0;
|
|
||||||
margin-left: -1px;
|
|
||||||
width: 35px;
|
|
||||||
background-color: var(--color-main-background);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -588,8 +588,8 @@ export default {
|
||||||
flex-grow: 0;
|
flex-grow: 0;
|
||||||
flex-shrink: 1;
|
flex-shrink: 1;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding: 1px 3px;
|
padding: 0px 5px;
|
||||||
border-radius: 3px;
|
border-radius: 15px;
|
||||||
font-size: 85%;
|
font-size: 85%;
|
||||||
margin-right: 3px;
|
margin-right: 3px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -229,7 +229,7 @@ export default {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding: 3px 7px;
|
padding: 0px 5px;
|
||||||
border-radius: 15px;
|
border-radius: 15px;
|
||||||
font-size: 85%;
|
font-size: 85%;
|
||||||
margin-right: 3px;
|
margin-right: 3px;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче