tagid instead of tagname
This commit is contained in:
parent
52bfed6ed9
commit
bca0da0b18
@ -166,11 +166,11 @@ const flash = ({ type, msg }) => {
|
||||
e.preventDefault();
|
||||
let res;
|
||||
if(tags.includes("sfw")) {
|
||||
await deleteTag(postid, "sfw");
|
||||
await deleteTag(postid, 1);
|
||||
res = await addTag(postid, "nsfw");
|
||||
}
|
||||
else if(tags.includes("nsfw")) {
|
||||
await deleteTag(postid, "nsfw");
|
||||
await deleteTag(postid, 2);
|
||||
res = await addTag(postid, "sfw");
|
||||
}
|
||||
else
|
||||
|
@ -47,23 +47,23 @@
|
||||
</div>
|
||||
<div class="metadata">
|
||||
<span class="badge badge-dark">
|
||||
<a href="/{{ item.id }}" style="--hover-image: url('/t/{{ item.id }}.png');" class="id-link">{{ item.id }}</a>@if(session) (<a id="a_username" href="/user/{{ user.name.toLowerCase() }}@if(tmp.mime)/{{ tmp.mime }}@endif">{{ user.name }}</a>)@endif
|
||||
<a href="/{{ item.id }}" style="--hover-image: url('/t/{{ item.id }}.png');" class="id-link">{{ item.id }}</a>@if(session) (<a id="a_username" href="/user/{{ user.name.toLowerCase() }}@if(tmp.mime)/{{ tmp.mime }}@endif">{{ user.name }}</a>) <a title="delete" href="#" id="a_delete">✖</a>@endif
|
||||
</span>
|
||||
<span class="badge badge-dark">{{ user.network }} / {{ user.channel }}</span>
|
||||
<span class="badge badge-dark image-source"><a class="post_source" title="{{ item.src.long }}" href="{{ item.src.long }}" target="_blank">{{ item.src.short }}</a></span>
|
||||
<span class="badge badge-dark"><a class="dest-link" href="{{ item.dest }}" target="_blank">{{ item.mime }}</a> / {{ item.size }}</span>
|
||||
<span class="badge badge-dark"><time class="timeago" title="{{ item.timestamp }}" datetime="{{ item.timestamp }}">{{ item.timestamp }}</time></span>
|
||||
<span class="badge badge-dark">
|
||||
@if(session)
|
||||
<a href="#" id="a_delete">delete</a>
|
||||
<span class="badge badge-dark image-source">
|
||||
@if(item.src.long.length)
|
||||
<a href="{{ item.src.long }}" target="_blank">{{ item.src.short }}</a>
|
||||
@else
|
||||
{{ lul }}
|
||||
hidden
|
||||
@endif
|
||||
</span>
|
||||
<span class="badge badge-dark"><a class="dest-link" href="{{ item.dest }}" target="_blank">{{ item.mime }}</a> / {{ item.size }}</span>
|
||||
<span class="badge badge-dark"><time class="timeago" tooltip="{{ item.timestamp.timefull }}">{{ item.timestamp.timeago }}</time></span>
|
||||
<span class="badge badge-dark">{{ phrase }}</span>
|
||||
<span class="badge badge-dark" id="tags">
|
||||
@if(typeof item.tags !== "undefined")
|
||||
@each(item.tags as tag)
|
||||
<span @if(session)title="{{ tag.user }}" data-tagid="{{ tag.id }}"@endif class="badge@if(tag.tag[0] == "&") badge-greentext@endif badge-{{ (tag.tag === "nsfw" ? "danger" : tag.tag === "sfw" ? "success" : "light") }} mr-2">
|
||||
<span @if(session)@if(session.id != 9)tooltip@elseiftitle@endif="{{ tag.user }}" data-tagid="{{ tag.id }}"@endif class="badge@if(tag.tag[0] == "&") badge-greentext@endif badge-{{ (tag.tag === "nsfw" ? "danger" : tag.tag === "sfw" ? "success" : "light") }} mr-2">
|
||||
<a href="/tag/{{ tag.tag.replace(/\s/g, "%20") }}">{{ tag.tag }}</a>@if(session) <a href="#">×</a>@endif
|
||||
</span>
|
||||
@endeach
|
||||
|
Loading…
Reference in New Issue
Block a user