Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion frontend/public/assistant.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;(function () {
; (function () {
window.sqlbot_assistant_handler = window.sqlbot_assistant_handler || {}
const defaultData = {
id: '1',
Expand Down Expand Up @@ -170,6 +170,13 @@
chat_button_img = root.querySelector('.sqlbot-assistant-chat-button > img')
}
chat_button_img.style.display = 'block'
function resizeImg() {
const rate = window.outerWidth / window.innerWidth;
chat_button_img.style.width = `${30 * (1 / rate)}px`;
chat_button_img.style.height = `${30 * (1 / rate)}px`;
}
resizeImg()
window.addEventListener('resize', resizeImg);
// 对话框元素
const chat_container = root.querySelector('#sqlbot-assistant-chat-container')
// 引导层
Expand Down
Loading