ui: 调整消息媒体的大小

This commit is contained in:
CrescentLeaf
2025-11-01 01:20:30 +08:00
parent 8891cd23af
commit 02485de52c
2 changed files with 4 additions and 2 deletions

View File

@@ -11,8 +11,8 @@ customElements.define('chat-image', class extends HTMLElement {
connectedCallback() {
this.style.display = 'block'
const e = new Image()
e.style.maxWidth = "100%"
e.style.maxHeight = "90%"
e.style.maxWidth = "400px"
e.style.maxHeight = "300px"
e.style.marginTop = '5px'
e.style.marginBottom = '5px'
e.style.borderRadius = "var(--mdui-shape-corner-medium)"

View File

@@ -7,6 +7,8 @@ customElements.define('chat-video', class extends HTMLElement {
connectedCallback() {
this.style.display = 'block'
const e = new DOMParser().parseFromString(`<video controls></video>`, 'text/html').body.firstChild as HTMLVideoElement
e.style.maxWidth = "400px"
e.style.maxHeight = "300px"
e.style.width = "100%"
e.style.height = "100%"
e.style.borderRadius = "var(--mdui-shape-corner-medium)"