🎨 add clear tip

This commit is contained in:
Vanessa 2023-12-04 20:15:00 +08:00
parent 4ed3c772ad
commit 7b09118c34
2 changed files with 3 additions and 2 deletions

View file

@ -318,7 +318,8 @@ export const genSearch = (app: App, config: ISearchOption, element: Element, clo
</span>
<input id="replaceInput" class="b3-text-field b3-text-field--text">
</div>
<svg class="fn__rotate fn__none svg" style="padding: 0 8px;align-self: center;"><use xlink:href="#iconRefresh"></use></svg>
<div class="fn__space"></div>
<svg class="fn__rotate fn__none svg" style="padding: 0 8px;align-self: center;margin-right: 8px"><use xlink:href="#iconRefresh"></use></svg>
<button id="replaceAllBtn" class="b3-button b3-button--small b3-button--outline fn__flex-center">${window.siyuan.languages.replaceAll}</button>
<div class="fn__space"></div>
<button id="replaceBtn" class="b3-button b3-button--small b3-button--outline fn__flex-center"> ${window.siyuan.languages.replace}</button>

View file

@ -19,7 +19,7 @@ export const addClearButton = (options: {
className?: string
}) => {
options.inputElement.insertAdjacentHTML("afterend",
`<svg class="${options.className || "b3-form__icon-clear"}" style="${options.right ? "right: " + options.right + "px;" : ""}${options.height ? "height:" + options.height + "px" : ""}">
`<svg class="${options.className || "b3-form__icon-clear"} ariaLabel" aria-label="${window.siyuan.languages.clear}" style="${options.right ? "right: " + options.right + "px;" : ""}${options.height ? "height:" + options.height + "px" : ""}">
<use xlink:href="#iconCloseRound"></use></svg>`);
const clearElement = options.inputElement.nextElementSibling;
clearElement.addEventListener("click", () => {