diff --git a/src/SzuruWrapper.ts b/src/SzuruWrapper.ts index cbb650a..c587347 100644 --- a/src/SzuruWrapper.ts +++ b/src/SzuruWrapper.ts @@ -46,7 +46,7 @@ export default class SzuruWrapper { } async updateTag(tag: Tag): Promise { - return (await this.apiPut("tag/" + tag.names[0], tag)).data; + return (await this.apiPut("tag/" + encodeURIComponent(tag.names[0]), tag)).data; } async getTags( @@ -75,7 +75,7 @@ export default class SzuruWrapper { tags: post.tags.map(x => x.name), safety: post.rating, source: post.source, - notes: post.notes.map(note => { polygon: note.polygons, text: note.text }), + notes: post.notes, contentUrl: post.contentUrl }; @@ -86,10 +86,7 @@ export default class SzuruWrapper { } async reverseSearch(contentUrl: string): Promise { - var obj = { - contentUrl: contentUrl - }; - + var obj = { contentUrl }; return (await this.apiPost("posts/reverse-search", obj)).data; } diff --git a/src/css/style.css b/src/css/style.css index 6b1b5e9..0b2215f 100644 --- a/src/css/style.css +++ b/src/css/style.css @@ -54,6 +54,15 @@ select { display: inline; } +.compact-tags > li { + /* + Ident each newline but not the first line. + This makes tagName line breaks look better, though it is a bit hacky. + */ + text-indent: -1.5ch; + padding-left: 1.5ch; +} + .tag-general { color: #24aadd; } @@ -94,6 +103,8 @@ a.remove-tag { .tag-usages { font-size: 90%; + /* Reset text-indent set by ".compact-tags > li" because it clashes with our margin */ + text-indent: initial; margin-left: 0.7em; } diff --git a/src/popup/App.vue b/src/popup/App.vue index ae4cc2c..ff91161 100644 --- a/src/popup/App.vue +++ b/src/popup/App.vue @@ -82,7 +82,7 @@
  • x - {{ tag.name }} + "); + }, // Remove tag from post's taglist removeTag(tag: TagViewModel) { if (this.selectedPost) {