Compare commits

...

3 Commits

Author SHA1 Message Date
CrescentLeaf
82c5aeaaa0 ui: 修正 文件卡片 文字折行失敗
* https://commandnotfound.cn/css-layout/101/644/CSS-控制长文本自动折行
* 也許是 width 相關導致word-wrap 沒效果?
* 玄學
2025-10-03 01:08:57 +08:00
CrescentLeaf
14c279cc80 ui: 點擊聊天文件不會再跳轉的同時並下載了, 只會進行下載 2025-10-02 23:38:43 +08:00
CrescentLeaf
67c6f11892 ui: 微調 置底 延遲時間 2025-10-02 23:35:08 +08:00
2 changed files with 2 additions and 4 deletions

View File

@@ -75,7 +75,7 @@ export default function ChatFragment({ target, showReturnButton, onReturnButtonC
top: 10000000000,
behavior: "smooth",
})
}, 100)
}, 300)
}, [target])
const page = React.useRef(0)

View File

@@ -5,12 +5,11 @@ customElements.define('chat-file', class extends HTMLElement {
super()
}
connectedCallback() {
this.style.display = 'block'
const e = new DOMParser().parseFromString(`
<a style="width: 100%;height: 100%;">
<mdui-card variant="outlined" clickable style="display: flex;align-items: center;">
<mdui-icon name="insert_drive_file" style="margin: 13px;font-size: 34px;"></mdui-icon>
<span style="margin-right: 13px;"></span>
<span style="margin-right: 13px; word-wrap: break-word; word-break:break-all;white-space:normal; max-width :100%;"></span>
</mdui-card>
</a>`, 'text/html').body.firstChild as HTMLElement
$(e).find('span').text($(this).attr("name"))
@@ -23,7 +22,6 @@ customElements.define('chat-file', class extends HTMLElement {
// deno-lint-ignore no-window
e.onclick = (e) => {
e.stopPropagation()
window.open(href, '_blank')
}
this.appendChild(e)
}