mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-20 05:50:53 +08:00
Compare commits
1 Commits
codex/adap
...
codex/adap
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8c554465f6 |
@@ -7,11 +7,7 @@
|
||||
@click="item.iconClick && item.iconClick()"
|
||||
>
|
||||
<BaseImage v-if="item.src" :src="item.src" class="timeline-img" alt="timeline item" />
|
||||
<component
|
||||
v-else-if="item.icon && (typeof item.icon !== 'string' || !item.icon.includes(' '))"
|
||||
:is="item.icon"
|
||||
:size="20"
|
||||
/>
|
||||
<i v-else-if="item.icon" :class="item.icon"></i>
|
||||
<BaseImage v-else-if="item.emoji" :src="item.emoji" class="timeline-emoji" alt="emoji" />
|
||||
</div>
|
||||
<div class="timeline-content">
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
</template>
|
||||
<template #option="{ option }">
|
||||
<div class="search-option-item">
|
||||
<i :class="['result-icon', iconMap[option.type]]"></i>
|
||||
<component :is="iconMap[option.type]" class="result-icon" />
|
||||
<div class="result-body">
|
||||
<div class="result-main" v-html="highlight(option.text)"></div>
|
||||
<div v-if="option.subText" class="result-sub" v-html="highlight(option.subText)"></div>
|
||||
@@ -83,11 +83,12 @@ const highlight = (text) => {
|
||||
}
|
||||
|
||||
const iconMap = {
|
||||
user: 'fas fa-user',
|
||||
post: 'fas fa-file-alt',
|
||||
comment: 'fas fa-comment',
|
||||
category: 'fas fa-folder',
|
||||
tag: 'fas fa-hashtag',
|
||||
user: 'UserIcon',
|
||||
post: 'FileText',
|
||||
post_title: 'FileText',
|
||||
comment: 'CommentIcon',
|
||||
category: 'Inbox',
|
||||
tag: 'TagOne',
|
||||
}
|
||||
|
||||
watch(selected, (val) => {
|
||||
|
||||
@@ -9,28 +9,28 @@ export const notificationState = reactive({
|
||||
})
|
||||
|
||||
const iconMap = {
|
||||
POST_VIEWED: 'HistoryIcon',
|
||||
COMMENT_REPLY: 'MessageOne',
|
||||
POST_REVIEWED: 'CheckCorrect',
|
||||
POST_REVIEW_REQUEST: 'FileText',
|
||||
POST_UPDATED: 'Edit',
|
||||
USER_ACTIVITY: 'UserIcon',
|
||||
FOLLOWED_POST: 'Pin',
|
||||
USER_FOLLOWED: 'AddUser',
|
||||
USER_UNFOLLOWED: 'ReduceUser',
|
||||
POST_SUBSCRIBED: 'Bookmark',
|
||||
POST_UNSUBSCRIBED: 'Bookmark',
|
||||
REGISTER_REQUEST: 'AlarmClock',
|
||||
ACTIVITY_REDEEM: 'PaperMoneyTwo',
|
||||
POINT_REDEEM: 'Gift',
|
||||
LOTTERY_WIN: 'MedalOne',
|
||||
LOTTERY_DRAW: 'Fireworks',
|
||||
POLL_VOTE: 'ChartHistogram',
|
||||
POLL_RESULT_OWNER: 'RankingList',
|
||||
POLL_RESULT_PARTICIPANT: 'ChartLine',
|
||||
MENTION: 'HashtagKey',
|
||||
POST_DELETED: 'ClearIcon',
|
||||
POST_FEATURED: 'Star',
|
||||
POST_VIEWED: 'fas fa-eye',
|
||||
COMMENT_REPLY: 'fas fa-reply',
|
||||
POST_REVIEWED: 'fas fa-shield-alt',
|
||||
POST_REVIEW_REQUEST: 'fas fa-gavel',
|
||||
POST_UPDATED: 'fas fa-comment-dots',
|
||||
USER_ACTIVITY: 'fas fa-user',
|
||||
FOLLOWED_POST: 'fas fa-feather-alt',
|
||||
USER_FOLLOWED: 'fas fa-user-plus',
|
||||
USER_UNFOLLOWED: 'fas fa-user-minus',
|
||||
POST_SUBSCRIBED: 'fas fa-bookmark',
|
||||
POST_UNSUBSCRIBED: 'fas fa-bookmark',
|
||||
REGISTER_REQUEST: 'fas fa-user-clock',
|
||||
ACTIVITY_REDEEM: 'fas fa-coffee',
|
||||
POINT_REDEEM: 'fas fa-gift',
|
||||
LOTTERY_WIN: 'fas fa-trophy',
|
||||
LOTTERY_DRAW: 'fas fa-bullhorn',
|
||||
POLL_VOTE: 'fas fa-square-poll-vertical',
|
||||
POLL_RESULT_OWNER: 'fas fa-flag-checkered',
|
||||
POLL_RESULT_PARTICIPANT: 'fas fa-flag-checkered',
|
||||
MENTION: 'fas fa-at',
|
||||
POST_DELETED: 'fas fa-trash',
|
||||
POST_FEATURED: 'fas fa-star',
|
||||
}
|
||||
|
||||
export async function fetchUnreadCount() {
|
||||
|
||||
@@ -23,7 +23,7 @@ export default (apiBaseUrl, websiteBaseUrl) => {
|
||||
return (
|
||||
body.map((item) => ({
|
||||
value: `[🔗${item.title}](${websiteBaseUrl}/posts/${item.id})`,
|
||||
html: `<div><link-icon /> ${item.title}</div>`,
|
||||
html: `<div><i class="fas fa-link"></i> ${item.title}</div>`,
|
||||
})) ?? []
|
||||
)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user