mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 17:40:13 +01:00
This commit is contained in:
parent
524fbca868
commit
18d4c5800c
3 changed files with 16 additions and 3 deletions
|
|
@ -198,6 +198,7 @@ export const openEmojiPanel = (id: string, type: "doc" | "notebook" | "av", posi
|
|||
window.siyuan.menus.menu.removeScrollEvent();
|
||||
}
|
||||
const dialog = new Dialog({
|
||||
disableAnimation: true,
|
||||
transparent: true,
|
||||
hideCloseIcon: true,
|
||||
width: isMobile() ? "80vw" : "360px",
|
||||
|
|
|
|||
|
|
@ -102,8 +102,8 @@ export const getEditHTML = (options: {
|
|||
<span class="b3-menu__label ft__center">${window.siyuan.languages.edit}</span>
|
||||
</button>
|
||||
<button class="b3-menu__separator"></button>
|
||||
<button class="b3-menu__item">
|
||||
<svg class="b3-menu__icon"><use xlink:href="#${getColIconByType(colData.type)}"></use></svg>
|
||||
<button class="b3-menu__item" data-type="nobg">
|
||||
<span style="padding: 5px;margin-right: 8px;" class="block__icon block__icon--show" data-type="update-icon"><svg><use xlink:href="#${getColIconByType(colData.type)}"></use></svg></span>
|
||||
<span class="b3-menu__label"><input data-type="name" style="margin: 4px 0" class="b3-text-field" type="text" value="${colData.name}"></span>
|
||||
</button>`;
|
||||
if (colData.options && colData.options.length > 0) {
|
||||
|
|
@ -387,7 +387,7 @@ export const showColMenu = (protyle: IProtyle, blockElement: Element, cellElemen
|
|||
}]);
|
||||
});
|
||||
menu.addItem({
|
||||
iconHTML: `<span style="align-self: center;margin-right: 8px;" class="block__icon block__icon--show" data-type="update-icon"><svg><use xlink:href="#${getColIconByType(type)}"></use></svg></span>`,
|
||||
iconHTML: `<span style="align-self: center;margin-right: 8px;" class="block__icon block__icon--show"><svg><use xlink:href="#${getColIconByType(type)}"></use></svg></span>`,
|
||||
type: "readonly",
|
||||
label: `<input style="margin: 4px 0" class="b3-text-field" type="text" value="${cellElement.innerText.trim()}">`,
|
||||
bind(element) {
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import {addAssetLink, bindAssetEvent, editAssetItem, getAssetHTML, updateAssetCe
|
|||
import {Constants} from "../../../constants";
|
||||
import {hideElements} from "../../ui/hideElements";
|
||||
import {pathPosix} from "../../../util/pathName";
|
||||
import {openEmojiPanel} from "../../../emoji";
|
||||
|
||||
export const openMenuPanel = (options: {
|
||||
protyle: IProtyle,
|
||||
|
|
@ -501,6 +502,17 @@ export const openMenuPanel = (options: {
|
|||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
break;
|
||||
} else if (type === "update-icon") {
|
||||
const rect = target.getBoundingClientRect();
|
||||
openEmojiPanel("", "av", {
|
||||
x: rect.left,
|
||||
y: rect.bottom,
|
||||
h: rect.height,
|
||||
w: rect.width
|
||||
});
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
break;
|
||||
} else if (type === "showAllCol") {
|
||||
const doOperations: IOperation[] = [];
|
||||
const undoOperations: IOperation[] = [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue