mirror of
https://github.com/go-shiori/shiori.git
synced 2025-02-22 15:06:04 +08:00
Implement dialog tags
This commit is contained in:
parent
05504c2317
commit
fe8d12708e
4 changed files with 65 additions and 11 deletions
File diff suppressed because one or more lines are too long
|
@ -8,7 +8,7 @@ var template = `
|
||||||
<a title="Add new bookmark" @click="showDialogAdd">
|
<a title="Add new bookmark" @click="showDialogAdd">
|
||||||
<i class="fas fa-fw fa-plus-circle"></i>
|
<i class="fas fa-fw fa-plus-circle"></i>
|
||||||
</a>
|
</a>
|
||||||
<a title="Show tags">
|
<a title="Show tags" @click="showDialogTags">
|
||||||
<i class="fas fa-fw fa-tags"></i>
|
<i class="fas fa-fw fa-tags"></i>
|
||||||
</a>
|
</a>
|
||||||
<a title="Batch edit" @click="toggleEditMode">
|
<a title="Batch edit" @click="toggleEditMode">
|
||||||
|
@ -73,6 +73,11 @@ var template = `
|
||||||
</div>
|
</div>
|
||||||
<p class="empty-message" v-if="!loading && listIsEmpty">No saved bookmarks yet :(</p>
|
<p class="empty-message" v-if="!loading && listIsEmpty">No saved bookmarks yet :(</p>
|
||||||
<div class="loading-overlay" v-if="loading"><i class="fas fa-fw fa-spin fa-spinner"></i></div>
|
<div class="loading-overlay" v-if="loading"><i class="fas fa-fw fa-spin fa-spinner"></i></div>
|
||||||
|
<custom-dialog id="dialog-tags" v-bind="dialogTags">
|
||||||
|
<a v-for="tag in tags" @click="filterTag(tag.name)">
|
||||||
|
{{tag.name}}<span>{{tag.nBookmarks}}</span>
|
||||||
|
</a>
|
||||||
|
</custom-dialog>
|
||||||
<custom-dialog v-bind="dialog"/>
|
<custom-dialog v-bind="dialog"/>
|
||||||
</div>`
|
</div>`
|
||||||
|
|
||||||
|
@ -98,6 +103,15 @@ export default {
|
||||||
maxPage: 0,
|
maxPage: 0,
|
||||||
bookmarks: [],
|
bookmarks: [],
|
||||||
tags: [],
|
tags: [],
|
||||||
|
|
||||||
|
dialogTags: {
|
||||||
|
visible: true,
|
||||||
|
title: 'Existing Tags',
|
||||||
|
mainText: 'OK',
|
||||||
|
mainClick: () => {
|
||||||
|
this.dialogTags.visible = false;
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -612,6 +626,9 @@ export default {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
showDialogTags() {
|
||||||
|
this.dialogTags.visible = true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
|
@ -434,4 +434,41 @@ body {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#dialog-tags {
|
||||||
|
.custom-dialog-body {
|
||||||
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||||
|
|
||||||
|
@media (max-width: 600px) {
|
||||||
|
grid-template-columns: minmax(0, 1fr);
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
font-size: 1em;
|
||||||
|
|
||||||
|
span {
|
||||||
|
&:last-child {
|
||||||
|
font-size: 1em;
|
||||||
|
color: var(--colorLink);
|
||||||
|
margin-left: 4px;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
content: "(";
|
||||||
|
margin-right: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
content: ")";
|
||||||
|
margin-left: 2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:focus {
|
||||||
|
color: var(--main);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue