This commit is contained in:
parent
7a8eff0783
commit
a5ce4139a6
6 changed files with 56 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"noSupportTip": "This function does not support the use of card packages",
|
||||
"insertRowTip": "The newly added rows have been filtered and can be viewed by canceling filtering/searching/sorting",
|
||||
"insertRowTip2": "New rows do not participate in sorting",
|
||||
"insertPhoto": "Take a photo and insert it",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"noSupportTip": "Esta función no admite el uso de paquetes de tarjetas",
|
||||
"insertRowTip": "Las filas recién agregadas se han filtrado y se pueden ver cancelando el filtrado/búsqueda/clasificación",
|
||||
"insertRowTip2": "Las filas nuevas no participan en la clasificación",
|
||||
"insertPhoto": "Toma una foto e insértala",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"noSupportTip": "Cette fonction ne prend pas en charge l'utilisation de packages de cartes",
|
||||
"insertRowTip": "Les lignes nouvellement ajoutées ont été filtrées et peuvent être visualisées en annulant le filtrage/recherche/tri",
|
||||
"insertRowTip2": "Les nouvelles lignes ne participent pas au tri",
|
||||
"insertPhoto": "Prendre une photo et l'insérer",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"noSupportTip": "此功能暫不支援卡包使用",
|
||||
"insertRowTip": "新增行已被過濾,可取消過濾/搜尋/排序進行查看",
|
||||
"insertRowTip2": "新增行不參與排序",
|
||||
"insertPhoto": "拍照並插入",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"noSupportTip": "该功能暂不支持卡包使用",
|
||||
"insertRowTip": "新增行已被过滤,可取消过滤/搜索/排序进行查看",
|
||||
"insertRowTip2": "新增行不参与排序",
|
||||
"insertPhoto": "拍照并插入",
|
||||
|
|
|
@ -265,6 +265,57 @@ export const bindCardEvent = async (options: {
|
|||
event.preventDefault();
|
||||
return;
|
||||
}
|
||||
const moreElement = hasClosestByAttribute(target, "data-type", "more");
|
||||
if (moreElement) {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
if (filterElement.getAttribute("data-cardtype") === "all") {
|
||||
showMessage(window.siyuan.languages.noSupportTip);
|
||||
return;
|
||||
}
|
||||
const menu = new Menu();
|
||||
menu.addItem({
|
||||
icon: "iconClock",
|
||||
label: window.siyuan.languages.updatedTime,
|
||||
click() {
|
||||
|
||||
}
|
||||
})
|
||||
menu.addItem({
|
||||
icon: "iconRefresh",
|
||||
label: window.siyuan.languages.reset,
|
||||
click() {
|
||||
|
||||
}
|
||||
})
|
||||
menu.addItem({
|
||||
icon: "iconTrashcan",
|
||||
label: `${window.siyuan.languages.remove} <b>${window.siyuan.languages.riffCard}</b>`,
|
||||
click() {
|
||||
actionElements[0].classList.add("fn__none");
|
||||
actionElements[1].classList.remove("fn__none");
|
||||
if (options.cardsData.cards[index].state === 0) {
|
||||
options.cardsData.unreviewedNewCardCount--;
|
||||
} else {
|
||||
options.cardsData.unreviewedOldCardCount--;
|
||||
}
|
||||
options.element.dispatchEvent(new CustomEvent("click", {detail: "0"}));
|
||||
transaction(undefined, [{
|
||||
action: "removeFlashcards",
|
||||
deckID: Constants.QUICK_DECK_ID,
|
||||
blockIDs: [options.cardsData.cards[index].blockID]
|
||||
}]);
|
||||
options.cardsData.cards.splice(index, 1);
|
||||
index--;
|
||||
}
|
||||
})
|
||||
const rect = target.getBoundingClientRect();
|
||||
menu.open({
|
||||
x: rect.left,
|
||||
y: rect.bottom
|
||||
});
|
||||
return;
|
||||
}
|
||||
/// #if !MOBILE
|
||||
const sticktabElement = hasClosestByAttribute(target, "data-type", "sticktab");
|
||||
if (sticktabElement) {
|
||||
|
|
Loading…
Add table
Reference in a new issue