mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 10:30:13 +01:00
This commit is contained in:
parent
c582204ec3
commit
6f65247cc8
2 changed files with 4 additions and 4 deletions
|
|
@ -36,14 +36,14 @@ export const AIActions = (elements: Element[], protyle: IProtyle) => {
|
|||
click() {
|
||||
const dialog = new Dialog({
|
||||
title: window.siyuan.languages.aiCustomAction,
|
||||
content: `<div class="b3-dialog__content"><input class="b3-text-field fn__block" value=""></div>
|
||||
content: `<div class="b3-dialog__content"><textarea class="b3-text-field fn__block"></textarea></div>
|
||||
<div class="b3-dialog__action">
|
||||
<button class="b3-button b3-button--cancel">${window.siyuan.languages.cancel}</button><div class="fn__space"></div>
|
||||
<button class="b3-button b3-button--text">${window.siyuan.languages.confirm}</button>
|
||||
</div>`,
|
||||
width: isMobile() ? "92vw" : "520px",
|
||||
});
|
||||
const inputElement = dialog.element.querySelector("input") as HTMLInputElement;
|
||||
const inputElement = dialog.element.querySelector("textarea");
|
||||
const btnsElement = dialog.element.querySelectorAll(".b3-button");
|
||||
dialog.bindInput(inputElement, () => {
|
||||
(btnsElement[1] as HTMLButtonElement).click();
|
||||
|
|
|
|||
|
|
@ -6,14 +6,14 @@ import {fillContent} from "./actions";
|
|||
export const AIChat = (protyle: IProtyle, element: Element) => {
|
||||
const dialog = new Dialog({
|
||||
title: "AI Chat",
|
||||
content: `<div class="b3-dialog__content"><input class="b3-text-field fn__block" value=""></div>
|
||||
content: `<div class="b3-dialog__content"><textarea class="b3-text-field fn__block"></textarea></div>
|
||||
<div class="b3-dialog__action">
|
||||
<button class="b3-button b3-button--cancel">${window.siyuan.languages.cancel}</button><div class="fn__space"></div>
|
||||
<button class="b3-button b3-button--text">${window.siyuan.languages.confirm}</button>
|
||||
</div>`,
|
||||
width: isMobile() ? "92vw" : "520px",
|
||||
});
|
||||
const inputElement = dialog.element.querySelector("input") as HTMLInputElement;
|
||||
const inputElement = dialog.element.querySelector("textarea");
|
||||
const btnsElement = dialog.element.querySelectorAll(".b3-button");
|
||||
dialog.bindInput(inputElement, () => {
|
||||
(btnsElement[1] as HTMLButtonElement).click();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue