mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-05-09 04:07:31 +08:00
feat: add article state
This commit is contained in:
@@ -77,7 +77,7 @@ export default {
|
|||||||
width: 2px;
|
width: 2px;
|
||||||
bottom: -20px;
|
bottom: -20px;
|
||||||
background: var(--text-color);
|
background: var(--text-color);
|
||||||
opacity: 0.2;
|
opacity: 0.08;
|
||||||
}
|
}
|
||||||
|
|
||||||
.timeline-item:last-child::before {
|
.timeline-item:last-child::before {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
PENDING
|
PENDING
|
||||||
</div>
|
</div>
|
||||||
<div class="article-block-button">
|
<div class="article-block-button">
|
||||||
BLOCK
|
REJECT
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="loggedIn && !isAuthor && !subscribed"
|
v-if="loggedIn && !isAuthor && !subscribed"
|
||||||
@@ -211,7 +211,10 @@ export default {
|
|||||||
const fetchPost = async () => {
|
const fetchPost = async () => {
|
||||||
try {
|
try {
|
||||||
isWaitingFetchingPost.value = true;
|
isWaitingFetchingPost.value = true;
|
||||||
const res = await fetch(`${API_BASE_URL}/api/posts/${postId}`)
|
const token = getToken()
|
||||||
|
const res = await fetch(`${API_BASE_URL}/api/posts/${postId}`, {
|
||||||
|
headers: { Authorization: token ? `Bearer ${token}` : '' }
|
||||||
|
})
|
||||||
isWaitingFetchingPost.value = false;
|
isWaitingFetchingPost.value = false;
|
||||||
if (!res.ok) return
|
if (!res.ok) return
|
||||||
const data = await res.json()
|
const data = await res.json()
|
||||||
|
|||||||
Reference in New Issue
Block a user