完善对话页面!

* 消息组件显示移植
* 最近对话直接打开的补充
* 提及的修补
* ......
This commit is contained in:
CrescentLeaf
2026-01-01 19:39:04 +08:00
parent 722b06c018
commit ba97ea359a
6 changed files with 330 additions and 17 deletions

View File

@@ -1,8 +1,15 @@
import { $ } from 'mdui'
import showSnackbar from "../../utils/showSnackbar.ts";
customElements.define('chat-mention', class extends HTMLElement {
import showSnackbar from "../../utils/showSnackbar.ts"
import { Chat, User } from 'lingchair-client-protocol'
export default class ChatMentionElement extends HTMLElement {
declare link: HTMLAnchorElement
static observedAttributes = ['user-id']
// 这两个方法应当在被渲染后由渲染组件主动提供
declare openChatInfo?: (chat: Chat | string) => void
declare openUserInfo?: (user: Chat | User | string) => void
constructor() {
super()
@@ -57,4 +64,6 @@ customElements.define('chat-mention', class extends HTMLElement {
}
}
}
})
}
customElements.define('chat-mention', ChatMentionElement)