Skip to content

Commit

Permalink
Merge remote-tracking branch 'forke-siyuan/dev' into v0.30
Browse files Browse the repository at this point in the history
  • Loading branch information
Soltus committed Apr 23, 2024
2 parents 51e380b + 51455b1 commit 6b1407c
Show file tree
Hide file tree
Showing 24 changed files with 104 additions and 51 deletions.
5 changes: 4 additions & 1 deletion app/appearance/langs/en_US.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"copyAsPNG": "Copy as PNG",
"unbindBlock": "Unbind block",
"showTitle": "Show database title",
"fillCreated": "Default fill created time",
Expand Down Expand Up @@ -1476,6 +1477,8 @@
"240": "Drag heading under container blocks in the doc is not supported",
"241": "Drag to its subheading is not supported",
"242": "The binding block already exists in the current database",
"243": "Only list the first [%d] tags (including subtags), if you need to adjust, please modify [Settings - Doc Tree - Maximum number to list]"
"243": "Only list the first [%d] tags (including subtags), if you need to adjust, please modify [Settings - Doc Tree - Maximum number to list]",
"244": "It did not exit normally after the last use. It is recommended to execute [Doc Tree - Rebuild Index]",
"245": "It did not exit normally after the last use. It is recommended to execute [Doc Tree - Rebuild Index]. To exit normally, you need to use [Exit Application] in the right panel"
}
}
5 changes: 4 additions & 1 deletion app/appearance/langs/es_ES.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"copyAsPNG": "Copiar como PNG",
"unbindBlock": "Desvincular bloque",
"showTitle": "Mostrar título de la base de datos",
"fillCreated": "Hora de creación del relleno predeterminado",
Expand Down Expand Up @@ -1476,6 +1477,8 @@
"240": "No se admite arrastrar encabezado debajo de los bloques contenedores en el documento",
"241": "No se admite arrastrar a su subtítulo",
"242": "El bloque de enlace ya existe en la base de datos actual",
"243": "Enumere solo las primeras [%d] etiquetas (incluidas las subetiquetas), modifique [Configuración - Árbol de documentos - Número máximo a listar]"
"243": "Enumere solo las primeras [%d] etiquetas (incluidas las subetiquetas), modifique [Configuración - Árbol de documentos - Número máximo a listar]",
"244": "No salió normalmente después del último uso. Se recomienda ejecutar [Árbol de documentos - Reconstruir índice]",
"245": "No salió normalmente después del último uso. Se recomienda ejecutar [Árbol de documentos - Reconstruir índice]. Para salir normalmente, necesita usar [Salir de la aplicación] en el panel derecho"
}
}
5 changes: 4 additions & 1 deletion app/appearance/langs/fr_FR.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"copyAsPNG": "Copier en tant PNG",
"unbindBlock": "Dissocier le bloc",
"showTitle": "Afficher le titre de la base de données",
"fillCreated": "Heure de création de remplissage par défaut",
Expand Down Expand Up @@ -1476,6 +1477,8 @@
"240": "Le déplacement du titre sous les blocs conteneurs dans la doc n'est pas pris en charge",
"241": "Le glisser vers son sous-titre n'est pas pris en charge",
"242": "Le bloc de liaison existe déjà dans la base de données actuelle",
"243": "Répertorier uniquement les [%d] premières balises (y compris les sous-balises). veuillez modifier [Paramètres - Arbre des documents - Nombre maximum de documents à lister]."
"243": "Répertorier uniquement les [%d] premières balises (y compris les sous-balises). veuillez modifier [Paramètres - Arbre des documents - Nombre maximum de documents à lister].",
"244": "Il ne s'est pas terminé normalement après la dernière utilisation. Il est recommandé d'exécuter [Doc Tree - Rebuild Index]",
"245": "Il ne s'est pas terminé normalement après la dernière utilisation. Il est recommandé d'exécuter [Doc Tree - Rebuild Index]. Pour quitter normalement, vous devez utiliser [Quitter l'application] dans le panneau de droite"
}
}
5 changes: 4 additions & 1 deletion app/appearance/langs/zh_CHT.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"copyAsPNG": "複製為 PNG",
"unbindBlock": "取消綁定區塊",
"showTitle": "顯示資料庫標題",
"fillCreated": "預設填滿創建時間",
Expand Down Expand Up @@ -1476,6 +1477,8 @@
"240": "不支援拖曳文件中容器區塊下的標題",
"241": "不支持拖曳為自己的子標題",
"242": "目前資料庫中已經存在該綁定區塊",
"243": "僅列出前 [%d] 個標籤(含子標籤),如需調整請修改 [設置 - 文檔樹 - 最大列出數量]"
"243": "僅列出前 [%d] 個標籤(含子標籤),如需調整請修改 [設置 - 文檔樹 - 最大列出數量]",
"244": "上次使用後未正常退出,建議執行一次 [文檔樹 - 重建索引]",
"245": "上次使用後未正常退出,建議執行一次 [文件樹 - 重建索引],正常退出需使用右側欄面板中的 [退出應用]"
}
}
5 changes: 4 additions & 1 deletion app/appearance/langs/zh_CN.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"copyAsPNG": "复制为 PNG",
"unbindBlock": "取消绑定块",
"showTitle": "显示数据库标题",
"fillCreated": "默认填充创建时间",
Expand Down Expand Up @@ -1478,6 +1479,8 @@
"240": "不支持拖拽文档中容器块下的标题",
"241": "不支持拖拽为自己的子标题",
"242": "当前数据库中已经存在该绑定块",
"243": "仅列出前 [%d] 个标签(含子标签),如需调整请修改 [设置 - 文档树 - 最大列出数量]"
"243": "仅列出前 [%d] 个标签(含子标签),如需调整请修改 [设置 - 文档树 - 最大列出数量]",
"244": "上次使用后未正常退出,建议执行一次 [文档树 - 重建索引]",
"245": "上次使用后未正常退出,建议执行一次 [文档树 - 重建索引],正常退出需使用右侧栏面板中的 [退出应用]"
}
}
1 change: 1 addition & 0 deletions app/appearance/themes/daylight/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
--b3-transition: all .2s cubic-bezier(0, 0, .2, 1) 0ms;
--b3-width-transition: width .2s cubic-bezier(0, 0, .2, 1) 0ms;
--b3-color-transition: color .2s cubic-bezier(0, 0, .2, 1) 0ms;
--b3-background-transition: background 20ms ease-in 0s;

/* 下拉菜单 */
--b3-select-background: url("data:image/svg+xml;utf8,<svg fill='rgba(95, 99, 104, .68)' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>") no-repeat right 2px center var(--b3-theme-background);
Expand Down
1 change: 1 addition & 0 deletions app/appearance/themes/midnight/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
--b3-transition: all .2s cubic-bezier(0, 0, .2, 1) 0ms;
--b3-width-transition: width .2s cubic-bezier(0, 0, .2, 1) 0ms;
--b3-color-transition: color .2s cubic-bezier(0, 0, .2, 1) 0ms;
--b3-background-transition: background 20ms ease-in 0s;

/* 下拉菜单 */
--b3-select-background: url("data:image/svg+xml;utf8,<svg fill='rgba(154, 160, 166, .68)' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>") no-repeat right 2px center var(--b3-theme-background);
Expand Down
2 changes: 1 addition & 1 deletion app/appx/AppxManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<Identity Name="89C2A984.SiYuan"
ProcessorArchitecture="x64"
Publisher="CN=087C656E-C1D9-42D8-8807-CED45A74FC0F"
Version="3.0.10.0"/>
Version="3.0.11.0"/>
<Properties>
<DisplayName>SiYuan</DisplayName>
<PublisherDisplayName>云南链滴科技有限公司</PublisherDisplayName>
Expand Down
2 changes: 2 additions & 0 deletions app/changelogs/v3.0.11/v3.0.11.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Below are the detailed changes in this version.
* [Improve the status bar at the bottom of the mobile](https://github.com/siyuan-note/siyuan/issues/11041)
* [Improve database table view row/col drag and drop sorting](https://github.com/siyuan-note/siyuan/issues/11048)
* [New window link opens using browser](https://github.com/siyuan-note/siyuan/issues/11050)
* [Prompt when there is no normal exit](https://github.com/siyuan-note/siyuan/issues/11054)
* [Editor should not scroll when dragging database columns](https://github.com/siyuan-note/siyuan/issues/11056)
* [Improve `Copy text *`](https://github.com/siyuan-note/siyuan/issues/11057)
* [Supports replacing text elements with other elements](https://github.com/siyuan-note/siyuan/issues/11058)
Expand All @@ -37,6 +38,7 @@ Below are the detailed changes in this version.
### Bugfix

* [Adjusting the column width of the mirror database will affect other views](https://github.com/siyuan-note/siyuan/issues/11019)
* [Database UI color exception in embed blocks](https://github.com/siyuan-note/siyuan/issues/11032)
* [The menu position is incorrect when creating a new column in the database](https://github.com/siyuan-note/siyuan/issues/11051)
* [Unable to edit primary key immediately after adding row in database](https://github.com/siyuan-note/siyuan/issues/11079)
* [Graph view refresh not working](https://github.com/siyuan-note/siyuan/issues/11087)
Expand Down
2 changes: 2 additions & 0 deletions app/changelogs/v3.0.11/v3.0.11_zh_CHT.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* [改進行動端底部狀態列](https://github.com/siyuan-note/siyuan/issues/11041)
* [改進資料庫表格視圖行/列拖放排序](https://github.com/siyuan-note/siyuan/issues/11048)
* [新視窗中的連結使用瀏覽器開啟](https://github.com/siyuan-note/siyuan/issues/11050)
* [提示未正常退出](https://github.com/siyuan-note/siyuan/issues/11054)
* [拖曳資料庫列時編輯器不應捲動](https://github.com/siyuan-note/siyuan/issues/11056)
* [改進 `複製 文本*`](https://github.com/siyuan-note/siyuan/issues/11057)
* [支援以其他元素取代文字元素](https://github.com/siyuan-note/siyuan/issues/11058)
Expand All @@ -37,6 +38,7 @@
### 修復缺陷

* [調整鏡像資料庫的列寬度會影響其他視圖](https://github.com/siyuan-note/siyuan/issues/11019)
* [嵌入區塊中的資料庫介面顏色異常](https://github.com/siyuan-note/siyuan/issues/11032)
* [資料庫新建欄位時選單位置不正確](https://github.com/siyuan-note/siyuan/issues/11051)
* [在資料庫中新增行後無法立即編輯主鍵](https://github.com/siyuan-note/siyuan/issues/11079)
* [關係圖刷新無效](https://github.com/siyuan-note/siyuan/issues/11087)
Expand Down
2 changes: 2 additions & 0 deletions app/changelogs/v3.0.11/v3.0.11_zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* [改进移动端底部状态栏](https://github.com/siyuan-note/siyuan/issues/11041)
* [改进数据库表格视图行/列拖放排序](https://github.com/siyuan-note/siyuan/issues/11048)
* [新窗口中的链接使用浏览器打开](https://github.com/siyuan-note/siyuan/issues/11050)
* [提示未正常退出](https://github.com/siyuan-note/siyuan/issues/11054)
* [拖动数据库列时编辑器不应滚动](https://github.com/siyuan-note/siyuan/issues/11056)
* [改进 `复制 文本*`](https://github.com/siyuan-note/siyuan/issues/11057)
* [支持用其他元素替换文本元素](https://github.com/siyuan-note/siyuan/issues/11058)
Expand All @@ -37,6 +38,7 @@
### 修复缺陷

* [调整镜像数据库的列宽度会影响其他视图](https://github.com/siyuan-note/siyuan/issues/11019)
* [嵌入块中的数据库界面颜色异常](https://github.com/siyuan-note/siyuan/issues/11032)
* [数据库新建列时菜单位置不正确](https://github.com/siyuan-note/siyuan/issues/11051)
* [在数据库中添加行后无法立即编辑主键](https://github.com/siyuan-note/siyuan/issues/11079)
* [关系图刷新无效](https://github.com/siyuan-note/siyuan/issues/11087)
Expand Down
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sillot",
"version": "0.30.1510",
"version": "0.30.1600",
"syv": "3.0.11",
"sypv": "[]",
"description": "Build Your Eternal Digital Garden",
Expand Down
24 changes: 12 additions & 12 deletions app/src/assets/scss/business/_av.scss
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,11 @@

&.dragover__bottom {
border-bottom-color: var(--b3-theme-primary-lighter);
z-index: 3;
}

&.dragover__top {
z-index: 3;
box-shadow: 0 -3px 0 var(--b3-theme-primary-lighter), inset 0 2px 0 var(--b3-theme-primary-lighter) !important;
}

Expand Down Expand Up @@ -281,6 +283,11 @@
border-right-color: var(--b3-theme-primary-lighter);
}

&.dragover__left,
&.dragover__right {
z-index: 2;
}

&--select {
background-color: var(--b3-menu-background);
box-shadow: 2px 2px 0 var(--b3-theme-primary-lighter) inset, -2px -2px 0 var(--b3-theme-primary-lighter) inset;
Expand All @@ -295,7 +302,6 @@
padding: 5px 8px;
display: flex;
align-items: center;
transition: background 20ms ease-in 0s;
overflow: inherit; // 保证列宽和顺序调整的拖拽点样式
border-right-color: transparent;

Expand Down Expand Up @@ -324,6 +330,7 @@
margin: 0 0 0 5px;
}
}

}

.block__icon {
Expand Down Expand Up @@ -426,7 +433,7 @@
width: 5px;
height: 100%;
right: -2.5px;
transition: background 20ms ease-in 0s;
transition: var(--b3-background-transition);
z-index: 1;

&:hover {
Expand Down Expand Up @@ -521,27 +528,20 @@
.av__cell--active,
.av__counter {
background-color: var(--b3-av-background-hl) !important;
transition: var(--b3-background-transition);
}
}

.dragover__top,
.dragover__bottom {
.av__colsticky {
z-index: 0;

& > div {
&.av__firstcol,
& > div:not(.av__cell--select):not(.av__cell--active):not(.av__calc--ashow) {
background-color: transparent;
}
}
}

.dragover__bottom + .av__row,
.av__row:has(+ .dragover__top) {
.av__colsticky > div {
background-color: transparent;
}
}

img.av__cellassetimg {
max-height: calc(1.625em - 2px);
border-radius: var(--b3-border-radius);
Expand Down
2 changes: 1 addition & 1 deletion app/src/assets/scss/protyle/_wysiwyg.scss
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@

&--hl,
&--hl .hljs {
transition: var(--b3-transition);
transition: var(--b3-background-transition);
background-color: var(--b3-theme-primary-lightest) !important;
}

Expand Down
3 changes: 1 addition & 2 deletions app/src/boot/globalEvent/keydown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ import {workspaceMenu} from "../../menus/workspace";
import {resize} from "../../protyle/util/resize";
import {Search} from "../../search";
import {Custom} from "../../layout/dock/Custom";
import {Protyle} from "../../protyle";
import {transaction} from "../../protyle/wysiwyg/transaction";
import {quickMakeCard} from "../../card/makeCard";
import {copyPNG} from "../../menus/util";
Expand Down Expand Up @@ -225,7 +224,7 @@ const editKeydown = (app: App, event: KeyboardEvent) => {
protyle = item.protyle;
return true;
}
})
});
}
}
if (!protyle) {
Expand Down
2 changes: 1 addition & 1 deletion app/src/layout/dock/Backlink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ export class Backlink extends Model {
}
this.editors.forEach(item => {
item.destroy();
})
});
const element = this.element.querySelector('.block__icon[data-type="refresh"] svg');
element.classList.add("fn__rotate");
fetchPost("/api/ref/refreshBacklink", {
Expand Down
4 changes: 2 additions & 2 deletions app/src/layout/getAll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ export const getAllEditor = () => {
});
models.custom.forEach(item => {
item.editors?.forEach(eItem => {
editors.push(eItem)
})
editors.push(eItem);
});
});
models.backlink.forEach(item => {
item.editors.forEach(editorItem => {
Expand Down
5 changes: 3 additions & 2 deletions app/src/menus/protyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import {
hasClosestBlock,
hasClosestByAttribute,
hasClosestByClassName,
hasClosestByMatchTag, hasTopClosestByClassName
hasClosestByMatchTag,
hasTopClosestByClassName
} from "../protyle/util/hasClosest";
import {MenuItem} from "./Menu";
import {focusBlock, focusByRange, focusByWbr, getEditorRange, selectAll,} from "../protyle/util/selection";
Expand Down Expand Up @@ -957,7 +958,7 @@ export const imgMenu = (protyle: IProtyle, range: Range, assetElement: HTMLEleme
}
}).element);
window.siyuan.menus.menu.append(new MenuItem({
label: window.siyuan.languages.copy + " PNG",
label: window.siyuan.languages.copyAsPNG,
accelerator: window.siyuan.config.keymap.editor.general.copyBlockRef.custom,
icon: "iconImage",
click() {
Expand Down
16 changes: 8 additions & 8 deletions app/src/protyle/render/av/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@ import {transaction} from "../../wysiwyg/transaction";
import {openEditorTab} from "../../../menus/util";
import {copySubMenu} from "../../../menus/commonMenuItem";
import {
addDragFill, genCellValueByElement,
addDragFill,
genCellValueByElement,
getCellText,
getTypeByCellElement,
popTextCell,
renderCell,
renderCellAttr, updateCellsValue,
renderCellAttr,
updateCellsValue,
updateHeaderCell
} from "./cell";
import {getColIconByType, showColMenu} from "./col";
import {deleteRow, insertRows, setPageSize, updateHeader} from "./row";
import {addCol, getColIconByType, showColMenu} from "./col";
import {deleteRow, insertRows, selectRow, setPageSize, updateHeader} from "./row";
import {emitOpenMenu} from "../../../plugin/EventBus";
import {addCol} from "./col";
import {openMenuPanel} from "./openMenuPanel";
import {hintRef} from "../../hint/extend";
import {focusByRange} from "../../util/selection";
import {showMessage} from "../../../dialog/message";
import {previewImage} from "../../preview/image";
import {unicode2Emoji} from "../../../emoji";
import {selectRow} from "./row";
// import * as dayjs from "dayjs";
import {formatDate} from "sofill/mid";
import {openCalcMenu} from "./calc";
Expand Down Expand Up @@ -286,15 +286,15 @@ export const avContextmenu = (protyle: IProtyle, rowElement: HTMLElement, positi
const srcs: IOperationSrcs[] = [];
const sourceIds: string[] = [];
rowElements.forEach(item => {
const rowId = item.getAttribute("data-id")
const rowId = item.getAttribute("data-id");
const blockValue = genCellValueByElement("block", item.querySelector(".av__cell[data-block-id]"));
srcs.push({
content: blockValue.block.content,
id: rowId,
isDetached: blockValue.isDetached,
});
sourceIds.push(rowId);
})
});
const avID = listItemElement.dataset.avId;
transaction(protyle, [{
action: "insertAttrViewBlock",
Expand Down
11 changes: 8 additions & 3 deletions app/src/protyle/render/av/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {Constants} from "../../../constants";
import {addDragFill, renderCell} from "./cell";
import {unicode2Emoji} from "../../../emoji";
import {focusBlock} from "../../util/selection";
import {hasClosestBlock, hasClosestByClassName} from "../../util/hasClosest";
import {hasClosestBlock, hasClosestByAttribute, hasClosestByClassName} from "../../util/hasClosest";
import {stickyRow} from "./row";
import {getCalcValue} from "./calc";
import {renderAVAttribute} from "./blockAttr";
Expand Down Expand Up @@ -193,8 +193,13 @@ ${cell.color ? `color:${cell.color};` : ""}">${renderCell(cell.value, rowIndex)}
viewData = item;
}
});

e.firstElementChild.outerHTML = `<div class="av__container" style="--av-background:${e.style.backgroundColor || "var(--b3-theme-background)"}">
let avBackground = "--av-background:var(--b3-theme-background)";
if (e.style.backgroundColor) {
avBackground = "--av-background:" + e.style.backgroundColor;
} else if (hasClosestByAttribute(e, "data-type", "NodeBlockQueryEmbed")) {
avBackground = "--av-background:var(--b3-theme-surface)";
}
e.firstElementChild.outerHTML = `<div class="av__container" style="${avBackground}">
<div class="av__header">
<div class="fn__flex av__views${isSearching || query ? " av__views--show" : ""}">
<div class="layout-tab-bar fn__flex">
Expand Down
Loading

0 comments on commit 6b1407c

Please sign in to comment.