Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add tooltip for changing categories #341

Merged
merged 1 commit into from
Jul 12, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/components/Sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
>
<div class="sidebar-content-wrapper">
<div class="note-category" :title="t('notes', 'Set category')">
<h4>{{ t('notes', 'Category') }}</h4>
<h4>{{ t('notes', 'Category') }} <span v-tooltip="t('notes', 'You can create subcategories by using “/” as delimiter between parent category and subcategory, e.g. “{parent}/{sub}”.', { parent: t('notes', 'Category'), sub: t('notes', 'Subcategory')})" class="icon-info svg" /></h4>
<form class="category" @submit.prevent.stop="">
<Multiselect id="category" :value="category" :options="categories"
:placeholder="t('notes', 'Uncategorized')"
Expand Down Expand Up @@ -52,6 +52,7 @@
import {
AppSidebar,
Multiselect,
Tooltip,
} from 'nextcloud-vue'
import NotesService from '../NotesService'
import store from '../store'
Expand All @@ -64,6 +65,10 @@ export default {
Multiselect,
},

directives: {
tooltip: Tooltip,
},

filters: {
categoryOptionLabel: function(obj) {
const category = obj.isTag ? obj.label : obj
Expand Down Expand Up @@ -194,6 +199,11 @@ form.category {
align-items: center;
}

.note-category .icon-info {
padding: 11px 20px;
vertical-align: super;
}

.category-select {
flex-grow: 1;
}
Expand Down