Compare commits
3 Commits
edf35b7dd0
...
82c5aeaaa0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
82c5aeaaa0 | ||
|
|
14c279cc80 | ||
|
|
67c6f11892 |
@@ -75,7 +75,7 @@ export default function ChatFragment({ target, showReturnButton, onReturnButtonC
|
|||||||
top: 10000000000,
|
top: 10000000000,
|
||||||
behavior: "smooth",
|
behavior: "smooth",
|
||||||
})
|
})
|
||||||
}, 100)
|
}, 300)
|
||||||
}, [target])
|
}, [target])
|
||||||
|
|
||||||
const page = React.useRef(0)
|
const page = React.useRef(0)
|
||||||
|
|||||||
@@ -5,12 +5,11 @@ customElements.define('chat-file', class extends HTMLElement {
|
|||||||
super()
|
super()
|
||||||
}
|
}
|
||||||
connectedCallback() {
|
connectedCallback() {
|
||||||
this.style.display = 'block'
|
|
||||||
const e = new DOMParser().parseFromString(`
|
const e = new DOMParser().parseFromString(`
|
||||||
<a style="width: 100%;height: 100%;">
|
<a style="width: 100%;height: 100%;">
|
||||||
<mdui-card variant="outlined" clickable style="display: flex;align-items: center;">
|
<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>
|
<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>
|
</mdui-card>
|
||||||
</a>`, 'text/html').body.firstChild as HTMLElement
|
</a>`, 'text/html').body.firstChild as HTMLElement
|
||||||
$(e).find('span').text($(this).attr("name"))
|
$(e).find('span').text($(this).attr("name"))
|
||||||
@@ -23,7 +22,6 @@ customElements.define('chat-file', class extends HTMLElement {
|
|||||||
// deno-lint-ignore no-window
|
// deno-lint-ignore no-window
|
||||||
e.onclick = (e) => {
|
e.onclick = (e) => {
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
window.open(href, '_blank')
|
|
||||||
}
|
}
|
||||||
this.appendChild(e)
|
this.appendChild(e)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user