mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-05-08 03:37:28 +08:00
Merge pull request #903 from nagisa77/codex/adapt-iconpark-in-users-page
chore: migrate user page icons to IconPark
This commit is contained in:
@@ -415,19 +415,19 @@ const fetchSummary = async () => {
|
|||||||
const postsRes = await fetch(`${API_BASE_URL}/api/users/${username}/hot-posts`)
|
const postsRes = await fetch(`${API_BASE_URL}/api/users/${username}/hot-posts`)
|
||||||
if (postsRes.ok) {
|
if (postsRes.ok) {
|
||||||
const data = await postsRes.json()
|
const data = await postsRes.json()
|
||||||
hotPosts.value = data.map((p) => ({ icon: 'fas fa-book', post: p }))
|
hotPosts.value = data.map((p) => ({ icon: 'file-text', post: p }))
|
||||||
}
|
}
|
||||||
|
|
||||||
const repliesRes = await fetch(`${API_BASE_URL}/api/users/${username}/hot-replies`)
|
const repliesRes = await fetch(`${API_BASE_URL}/api/users/${username}/hot-replies`)
|
||||||
if (repliesRes.ok) {
|
if (repliesRes.ok) {
|
||||||
const data = await repliesRes.json()
|
const data = await repliesRes.json()
|
||||||
hotReplies.value = data.map((c) => ({ icon: 'fas fa-comment', comment: c }))
|
hotReplies.value = data.map((c) => ({ icon: 'comment-icon', comment: c }))
|
||||||
}
|
}
|
||||||
|
|
||||||
const tagsRes = await fetch(`${API_BASE_URL}/api/users/${username}/hot-tags`)
|
const tagsRes = await fetch(`${API_BASE_URL}/api/users/${username}/hot-tags`)
|
||||||
if (tagsRes.ok) {
|
if (tagsRes.ok) {
|
||||||
const data = await tagsRes.json()
|
const data = await tagsRes.json()
|
||||||
hotTags.value = data.map((t) => ({ icon: 'fas fa-tag', tag: t }))
|
hotTags.value = data.map((t) => ({ icon: 'tag-one', tag: t }))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -443,19 +443,19 @@ const fetchTimeline = async () => {
|
|||||||
const mapped = [
|
const mapped = [
|
||||||
...posts.map((p) => ({
|
...posts.map((p) => ({
|
||||||
type: 'post',
|
type: 'post',
|
||||||
icon: 'fas fa-book',
|
icon: 'file-text',
|
||||||
post: p,
|
post: p,
|
||||||
createdAt: p.createdAt,
|
createdAt: p.createdAt,
|
||||||
})),
|
})),
|
||||||
...replies.map((r) => ({
|
...replies.map((r) => ({
|
||||||
type: r.parentComment ? 'reply' : 'comment',
|
type: r.parentComment ? 'reply' : 'comment',
|
||||||
icon: 'fas fa-comment',
|
icon: 'comment-icon',
|
||||||
comment: r,
|
comment: r,
|
||||||
createdAt: r.createdAt,
|
createdAt: r.createdAt,
|
||||||
})),
|
})),
|
||||||
...tags.map((t) => ({
|
...tags.map((t) => ({
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
icon: 'fas fa-tag',
|
icon: 'tag-one',
|
||||||
tag: t,
|
tag: t,
|
||||||
createdAt: t.createdAt,
|
createdAt: t.createdAt,
|
||||||
})),
|
})),
|
||||||
@@ -477,7 +477,7 @@ const fetchFavorites = async () => {
|
|||||||
const res = await fetch(`${API_BASE_URL}/api/users/${username}/subscribed-posts`)
|
const res = await fetch(`${API_BASE_URL}/api/users/${username}/subscribed-posts`)
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
const data = await res.json()
|
const data = await res.json()
|
||||||
favoritePosts.value = data.map((p) => ({ icon: 'fas fa-bookmark', post: p }))
|
favoritePosts.value = data.map((p) => ({ icon: 'bookmark', post: p }))
|
||||||
} else {
|
} else {
|
||||||
favoritePosts.value = []
|
favoritePosts.value = []
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user