tagid instead of tagname
This commit is contained in:
parent
52bfed6ed9
commit
bca0da0b18
|
@ -166,11 +166,11 @@ const flash = ({ type, msg }) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
let res;
|
let res;
|
||||||
if(tags.includes("sfw")) {
|
if(tags.includes("sfw")) {
|
||||||
await deleteTag(postid, "sfw");
|
await deleteTag(postid, 1);
|
||||||
res = await addTag(postid, "nsfw");
|
res = await addTag(postid, "nsfw");
|
||||||
}
|
}
|
||||||
else if(tags.includes("nsfw")) {
|
else if(tags.includes("nsfw")) {
|
||||||
await deleteTag(postid, "nsfw");
|
await deleteTag(postid, 2);
|
||||||
res = await addTag(postid, "sfw");
|
res = await addTag(postid, "sfw");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -47,23 +47,23 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="metadata">
|
<div class="metadata">
|
||||||
<span class="badge badge-dark">
|
<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>
|
||||||
<span class="badge badge-dark">{{ user.network }} / {{ user.channel }}</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 image-source">
|
||||||
<span class="badge badge-dark"><a class="dest-link" href="{{ item.dest }}" target="_blank">{{ item.mime }}</a> / {{ item.size }}</span>
|
@if(item.src.long.length)
|
||||||
<span class="badge badge-dark"><time class="timeago" title="{{ item.timestamp }}" datetime="{{ item.timestamp }}">{{ item.timestamp }}</time></span>
|
<a href="{{ item.src.long }}" target="_blank">{{ item.src.short }}</a>
|
||||||
<span class="badge badge-dark">
|
|
||||||
@if(session)
|
|
||||||
<a href="#" id="a_delete">delete</a>
|
|
||||||
@else
|
@else
|
||||||
{{ lul }}
|
hidden
|
||||||
@endif
|
@endif
|
||||||
</span>
|
</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">
|
<span class="badge badge-dark" id="tags">
|
||||||
@if(typeof item.tags !== "undefined")
|
@if(typeof item.tags !== "undefined")
|
||||||
@each(item.tags as tag)
|
@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
|
<a href="/tag/{{ tag.tag.replace(/\s/g, "%20") }}">{{ tag.tag }}</a>@if(session) <a href="#">×</a>@endif
|
||||||
</span>
|
</span>
|
||||||
@endeach
|
@endeach
|
||||||
|
|
Loading…
Reference in New Issue
Block a user