Compare commits

...

12 commits

23 changed files with 1826 additions and 411 deletions

View file

@ -5,7 +5,8 @@
"Properties": { "Properties": {
"id": "20230805232134-3d6mx2k", "id": "20230805232134-3d6mx2k",
"title": "Search asset content", "title": "Search asset content",
"updated": "20231026085302" "type": "doc",
"updated": "20250903163017"
}, },
"Children": [ "Children": [
{ {
@ -46,7 +47,7 @@
"ListData": {}, "ListData": {},
"Properties": { "Properties": {
"id": "20230818102341-ny18orr", "id": "20230818102341-ny18orr",
"updated": "20230818102341" "updated": "20250903163017"
}, },
"Children": [ "Children": [
{ {
@ -58,7 +59,7 @@
}, },
"Properties": { "Properties": {
"id": "20230818102341-eg8labw", "id": "20230818102341-eg8labw",
"updated": "20230818102341" "updated": "20250903163017"
}, },
"Children": [ "Children": [
{ {
@ -66,12 +67,318 @@
"Type": "NodeParagraph", "Type": "NodeParagraph",
"Properties": { "Properties": {
"id": "20230818102341-izc16tp", "id": "20230818102341-izc16tp",
"updated": "20230818102426" "updated": "20250903163017"
}, },
"Children": [ "Children": [
{ {
"Type": "NodeText", "Type": "NodeText",
"Data": "Text files (.txt, .md, .json, .log, .sql, .html, .xml, .java, .h, .c, .cpp, .go, .rs, .swift, .kt, . py, .php, .js, .css, .ts, .sh, .bat, .cmd, .ini, .yaml, .rst, .adoc, .textile, .opml, .org, .wiki)" "Data": "Text files ("
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".txt"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".md"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".markdown"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".json"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".log"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".sql"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".html"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".xml"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".java"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".h"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".c"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".cpp"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".go"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".rs"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".swift"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".kt"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".py"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".php"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".js"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".css"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".ts"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".sh"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".bat"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".cmd"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".ini"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".yaml"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".rst"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".adoc"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".textile"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".opml"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".org"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".wiki"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".epub"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".cs"
},
{
"Type": "NodeText",
"Data": ")"
} }
] ]
} }
@ -85,7 +392,8 @@
"Marker": "Kg==" "Marker": "Kg=="
}, },
"Properties": { "Properties": {
"id": "20230818102427-os9c4nm" "id": "20230818102427-os9c4nm",
"updated": "20250903162955"
}, },
"Children": [ "Children": [
{ {
@ -93,12 +401,21 @@
"Type": "NodeParagraph", "Type": "NodeParagraph",
"Properties": { "Properties": {
"id": "20230818102427-dyojs23", "id": "20230818102427-dyojs23",
"updated": "20230818102429" "updated": "20250903162955"
}, },
"Children": [ "Children": [
{ {
"Type": "NodeText", "Type": "NodeText",
"Data": ".docx" "Data": ""
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".docx"
},
{
"Type": "NodeText",
"Data": ""
} }
] ]
} }
@ -112,7 +429,8 @@
"Marker": "Kg==" "Marker": "Kg=="
}, },
"Properties": { "Properties": {
"id": "20230818102430-sw9p4uf" "id": "20230818102430-sw9p4uf",
"updated": "20250903162956"
}, },
"Children": [ "Children": [
{ {
@ -120,12 +438,21 @@
"Type": "NodeParagraph", "Type": "NodeParagraph",
"Properties": { "Properties": {
"id": "20230818102430-boci4wf", "id": "20230818102430-boci4wf",
"updated": "20230818102431" "updated": "20250903162956"
}, },
"Children": [ "Children": [
{ {
"Type": "NodeText", "Type": "NodeText",
"Data": ".pptx" "Data": ""
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".pptx"
},
{
"Type": "NodeText",
"Data": ""
} }
] ]
} }
@ -139,7 +466,8 @@
"Marker": "Kg==" "Marker": "Kg=="
}, },
"Properties": { "Properties": {
"id": "20230818102432-6uclx4n" "id": "20230818102432-6uclx4n",
"updated": "20250903162957"
}, },
"Children": [ "Children": [
{ {
@ -147,12 +475,21 @@
"Type": "NodeParagraph", "Type": "NodeParagraph",
"Properties": { "Properties": {
"id": "20230818102432-3n95b7k", "id": "20230818102432-3n95b7k",
"updated": "20230818102433" "updated": "20250903162957"
}, },
"Children": [ "Children": [
{ {
"Type": "NodeText", "Type": "NodeText",
"Data": ".xlsx" "Data": ""
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".xlsx"
},
{
"Type": "NodeText",
"Data": ""
} }
] ]
} }
@ -166,19 +503,30 @@
"Marker": "Kg==" "Marker": "Kg=="
}, },
"Properties": { "Properties": {
"id": "20230818102434-9xgwy7r" "id": "20230818102434-9xgwy7r",
"updated": "20250903162959"
}, },
"Children": [ "Children": [
{ {
"ID": "20230818102434-1efdkw9", "ID": "20230818102434-1efdkw9",
"Type": "NodeParagraph", "Type": "NodeParagraph",
"Properties": { "Properties": {
"id": "20230818102434-1efdkw9" "id": "20230818102434-1efdkw9",
"updated": "20250903162959"
}, },
"Children": [ "Children": [
{ {
"Type": "NodeText", "Type": "NodeText",
"Data": ".pdf" "Data": ""
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".pdf"
},
{
"Type": "NodeText",
"Data": ""
} }
] ]
} }

View file

@ -5,7 +5,8 @@
"Properties": { "Properties": {
"id": "20230805230218-aea8icj", "id": "20230805230218-aea8icj",
"title": "搜索资源文件内容", "title": "搜索资源文件内容",
"updated": "20231026085139" "type": "doc",
"updated": "20250903162923"
}, },
"Children": [ "Children": [
{ {
@ -46,7 +47,7 @@
"ListData": {}, "ListData": {},
"Properties": { "Properties": {
"id": "20230818101450-4a6lzdg", "id": "20230818101450-4a6lzdg",
"updated": "20230818101545" "updated": "20250903162923"
}, },
"Children": [ "Children": [
{ {
@ -58,7 +59,7 @@
}, },
"Properties": { "Properties": {
"id": "20230818101510-rfacaaf", "id": "20230818101510-rfacaaf",
"updated": "20230818101800" "updated": "20250903162915"
}, },
"Children": [ "Children": [
{ {
@ -66,12 +67,318 @@
"Type": "NodeParagraph", "Type": "NodeParagraph",
"Properties": { "Properties": {
"id": "20230818101510-duzarcy", "id": "20230818101510-duzarcy",
"updated": "20230818101800" "updated": "20250903162915"
}, },
"Children": [ "Children": [
{ {
"Type": "NodeText", "Type": "NodeText",
"Data": "文本文件(.txt、.md、.json、.log、.sql、.html、.xml、.java、.h、.c、.cpp、.go、.rs、.swift、.kt、.py、.php、.js、.css、.ts、.sh、.bat、.cmd、.ini、.yaml、.rst、.adoc、.textile、.opml、.org、.wiki" "Data": "文本文件("
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".txt"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".md"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".markdown"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".json"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".log"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".sql"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".html"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".xml"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".java"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".h"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".c"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".cpp"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".go"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".rs"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".swift"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".kt"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".py"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".php"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".js"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".css"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".ts"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".sh"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".bat"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".cmd"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".ini"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".yaml"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".rst"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".adoc"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".textile"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".opml"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".org"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".wiki"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".epub"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".cs"
},
{
"Type": "NodeText",
"Data": ""
} }
] ]
} }
@ -85,7 +392,8 @@
"Marker": "Kg==" "Marker": "Kg=="
}, },
"Properties": { "Properties": {
"id": "20230818101513-x5baw16" "id": "20230818101513-x5baw16",
"updated": "20250903162918"
}, },
"Children": [ "Children": [
{ {
@ -93,12 +401,21 @@
"Type": "NodeParagraph", "Type": "NodeParagraph",
"Properties": { "Properties": {
"id": "20230818101513-558ntbl", "id": "20230818101513-558ntbl",
"updated": "20230818101520" "updated": "20250903162918"
}, },
"Children": [ "Children": [
{ {
"Type": "NodeText", "Type": "NodeText",
"Data": ".docx" "Data": ""
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".docx"
},
{
"Type": "NodeText",
"Data": ""
} }
] ]
} }
@ -112,7 +429,8 @@
"Marker": "Kg==" "Marker": "Kg=="
}, },
"Properties": { "Properties": {
"id": "20230818101521-n1r8yqv" "id": "20230818101521-n1r8yqv",
"updated": "20250903162920"
}, },
"Children": [ "Children": [
{ {
@ -120,12 +438,21 @@
"Type": "NodeParagraph", "Type": "NodeParagraph",
"Properties": { "Properties": {
"id": "20230818101521-mutuxqo", "id": "20230818101521-mutuxqo",
"updated": "20230818101526" "updated": "20250903162920"
}, },
"Children": [ "Children": [
{ {
"Type": "NodeText", "Type": "NodeText",
"Data": ".pptx" "Data": ""
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".pptx"
},
{
"Type": "NodeText",
"Data": ""
} }
] ]
} }
@ -139,7 +466,8 @@
"Marker": "Kg==" "Marker": "Kg=="
}, },
"Properties": { "Properties": {
"id": "20230818101526-oortrwo" "id": "20230818101526-oortrwo",
"updated": "20250903162921"
}, },
"Children": [ "Children": [
{ {
@ -147,12 +475,21 @@
"Type": "NodeParagraph", "Type": "NodeParagraph",
"Properties": { "Properties": {
"id": "20230818101526-t4uvb3w", "id": "20230818101526-t4uvb3w",
"updated": "20230818101529" "updated": "20250903162921"
}, },
"Children": [ "Children": [
{ {
"Type": "NodeText", "Type": "NodeText",
"Data": ".xlsx" "Data": ""
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".xlsx"
},
{
"Type": "NodeText",
"Data": ""
} }
] ]
} }
@ -167,7 +504,7 @@
}, },
"Properties": { "Properties": {
"id": "20230818101543-ejcoq3j", "id": "20230818101543-ejcoq3j",
"updated": "20230818101545" "updated": "20250903162923"
}, },
"Children": [ "Children": [
{ {
@ -175,12 +512,21 @@
"Type": "NodeParagraph", "Type": "NodeParagraph",
"Properties": { "Properties": {
"id": "20230818101543-36waszk", "id": "20230818101543-36waszk",
"updated": "20230818101545" "updated": "20250903162923"
}, },
"Children": [ "Children": [
{ {
"Type": "NodeText", "Type": "NodeText",
"Data": ".pdf" "Data": ""
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".pdf"
},
{
"Type": "NodeText",
"Data": ""
} }
] ]
} }

View file

@ -5,7 +5,8 @@
"Properties": { "Properties": {
"id": "20230805232920-5fdco36", "id": "20230805232920-5fdco36",
"title": "搜索資源文件內容", "title": "搜索資源文件內容",
"updated": "20231026085346" "type": "doc",
"updated": "20250903162952"
}, },
"Children": [ "Children": [
{ {
@ -46,7 +47,7 @@
"ListData": {}, "ListData": {},
"Properties": { "Properties": {
"id": "20230818102501-gq9fesz", "id": "20230818102501-gq9fesz",
"updated": "20230818102519" "updated": "20250903162952"
}, },
"Children": [ "Children": [
{ {
@ -58,7 +59,7 @@
}, },
"Properties": { "Properties": {
"id": "20230818102501-2qu8flm", "id": "20230818102501-2qu8flm",
"updated": "20230818102519" "updated": "20250903162947"
}, },
"Children": [ "Children": [
{ {
@ -66,12 +67,318 @@
"Type": "NodeParagraph", "Type": "NodeParagraph",
"Properties": { "Properties": {
"id": "20230818102501-p1l631d", "id": "20230818102501-p1l631d",
"updated": "20230818102519" "updated": "20250903162947"
}, },
"Children": [ "Children": [
{ {
"Type": "NodeText", "Type": "NodeText",
"Data": "文本文件(.txt、.md、.json、.log、.sql、.html、.xml、.java、.h、.c、.cpp、.go、.rs、.swift、.kt、.py、.php、.js、.css、.ts、.sh、.bat、.cmd、.ini、.yaml、.rst、.adoc、.textile、.opml、.org、.wiki" "Data": "文本文件("
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".txt"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".md"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".markdown"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".json"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".log"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".sql"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".html"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".xml"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".java"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".h"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".c"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".cpp"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".go"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".rs"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".swift"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".kt"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".py"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".php"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".js"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".css"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".ts"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".sh"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".bat"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".cmd"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".ini"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".yaml"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".rst"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".adoc"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".textile"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".opml"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".org"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".wiki"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".epub"
},
{
"Type": "NodeText",
"Data": "​、"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".cs"
},
{
"Type": "NodeText",
"Data": ""
} }
] ]
} }
@ -86,7 +393,7 @@
}, },
"Properties": { "Properties": {
"id": "20230818102501-8jue7y8", "id": "20230818102501-8jue7y8",
"updated": "20230818102501" "updated": "20250903162949"
}, },
"Children": [ "Children": [
{ {
@ -94,12 +401,21 @@
"Type": "NodeParagraph", "Type": "NodeParagraph",
"Properties": { "Properties": {
"id": "20230818102501-fom9qf4", "id": "20230818102501-fom9qf4",
"updated": "20230818102501" "updated": "20250903162949"
}, },
"Children": [ "Children": [
{ {
"Type": "NodeText", "Type": "NodeText",
"Data": ".docx" "Data": ""
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".docx"
},
{
"Type": "NodeText",
"Data": ""
} }
] ]
} }
@ -114,7 +430,7 @@
}, },
"Properties": { "Properties": {
"id": "20230818102501-609htp0", "id": "20230818102501-609htp0",
"updated": "20230818102501" "updated": "20250903162950"
}, },
"Children": [ "Children": [
{ {
@ -122,12 +438,21 @@
"Type": "NodeParagraph", "Type": "NodeParagraph",
"Properties": { "Properties": {
"id": "20230818102501-fu9up7s", "id": "20230818102501-fu9up7s",
"updated": "20230818102501" "updated": "20250903162950"
}, },
"Children": [ "Children": [
{ {
"Type": "NodeText", "Type": "NodeText",
"Data": ".pptx" "Data": ""
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".pptx"
},
{
"Type": "NodeText",
"Data": ""
} }
] ]
} }
@ -142,7 +467,7 @@
}, },
"Properties": { "Properties": {
"id": "20230818102501-cjozdv1", "id": "20230818102501-cjozdv1",
"updated": "20230818102501" "updated": "20250903162951"
}, },
"Children": [ "Children": [
{ {
@ -150,12 +475,21 @@
"Type": "NodeParagraph", "Type": "NodeParagraph",
"Properties": { "Properties": {
"id": "20230818102501-ewonoc2", "id": "20230818102501-ewonoc2",
"updated": "20230818102501" "updated": "20250903162951"
}, },
"Children": [ "Children": [
{ {
"Type": "NodeText", "Type": "NodeText",
"Data": ".xlsx" "Data": ""
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".xlsx"
},
{
"Type": "NodeText",
"Data": ""
} }
] ]
} }
@ -170,7 +504,7 @@
}, },
"Properties": { "Properties": {
"id": "20230818102501-ljun2c0", "id": "20230818102501-ljun2c0",
"updated": "20230818102501" "updated": "20250903162952"
}, },
"Children": [ "Children": [
{ {
@ -178,12 +512,21 @@
"Type": "NodeParagraph", "Type": "NodeParagraph",
"Properties": { "Properties": {
"id": "20230818102501-w0e68xh", "id": "20230818102501-w0e68xh",
"updated": "20230818102501" "updated": "20250903162952"
}, },
"Children": [ "Children": [
{ {
"Type": "NodeText", "Type": "NodeText",
"Data": ".pdf" "Data": ""
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".pdf"
},
{
"Type": "NodeText",
"Data": ""
} }
] ]
} }

View file

@ -7,7 +7,7 @@
"id": "20240530101000-5k5d5i3", "id": "20240530101000-5k5d5i3",
"title": "アセットの内容検索", "title": "アセットの内容検索",
"type": "doc", "type": "doc",
"updated": "20240530101000" "updated": "20250903163024"
}, },
"Children": [ "Children": [
{ {
@ -50,7 +50,7 @@
"Properties": { "Properties": {
"ID": "20240530101000-gui4fuq", "ID": "20240530101000-gui4fuq",
"id": "20240530101000-dy607mr", "id": "20240530101000-dy607mr",
"updated": "20240530101000" "updated": "20250903163024"
}, },
"Children": [ "Children": [
{ {
@ -63,21 +63,326 @@
"Properties": { "Properties": {
"ID": "20240530101000-d6fzgev", "ID": "20240530101000-d6fzgev",
"id": "20240530101000-423ygdo", "id": "20240530101000-423ygdo",
"updated": "20240530101000" "updated": "20250903163024"
}, },
"Children": [ "Children": [
{ {
"ID": "20240530101000-5htsgo0", "ID": "20240530101000-5htsgo0",
"Type": "NodeParagraph", "Type": "NodeParagraph",
"Properties": { "Properties": {
"ID": "20240530101000-lunnpt0",
"id": "20240530101000-5htsgo0", "id": "20240530101000-5htsgo0",
"updated": "20240530101000" "updated": "20250903163024"
}, },
"Children": [ "Children": [
{ {
"Type": "NodeText", "Type": "NodeText",
"Data": "テキストファイル (.txt, .md, .json, .log, .sql, .html, .xml, .java, .h, .c, .cpp, .go, .rs, .swift, .kt, . py, .php, .js, .css, .ts, .sh, .bat, .cmd, .ini, .yaml, .rst, .adoc, .textile, .opml, .org, .wiki)" "Data": "テキストファイル ("
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".txt"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".md"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".markdown"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".json"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".log"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".sql"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".html"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".xml"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".java"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".h"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".c"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".cpp"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".go"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".rs"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".swift"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".kt"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".py"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".php"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".js"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".css"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".ts"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".sh"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".bat"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".cmd"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".ini"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".yaml"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".rst"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".adoc"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".textile"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".opml"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".org"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".wiki"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".epub"
},
{
"Type": "NodeText",
"Data": ", "
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".cs"
},
{
"Type": "NodeText",
"Data": ")"
} }
] ]
} }
@ -92,21 +397,30 @@
}, },
"Properties": { "Properties": {
"ID": "20240530101000-jhc3a4i", "ID": "20240530101000-jhc3a4i",
"id": "20240530101000-ddgjyye" "id": "20240530101000-ddgjyye",
"updated": "20250903163001"
}, },
"Children": [ "Children": [
{ {
"ID": "20240530101000-alu1ygl", "ID": "20240530101000-alu1ygl",
"Type": "NodeParagraph", "Type": "NodeParagraph",
"Properties": { "Properties": {
"ID": "20240530101000-cznhpu3",
"id": "20240530101000-alu1ygl", "id": "20240530101000-alu1ygl",
"updated": "20240530101000" "updated": "20250903163001"
}, },
"Children": [ "Children": [
{ {
"Type": "NodeText", "Type": "NodeText",
"Data": ".docx" "Data": ""
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".docx"
},
{
"Type": "NodeText",
"Data": ""
} }
] ]
} }
@ -121,21 +435,30 @@
}, },
"Properties": { "Properties": {
"ID": "20240530101000-0t3jtob", "ID": "20240530101000-0t3jtob",
"id": "20240530101000-t8ewu5o" "id": "20240530101000-t8ewu5o",
"updated": "20250903163002"
}, },
"Children": [ "Children": [
{ {
"ID": "20240530101000-afub9kt", "ID": "20240530101000-afub9kt",
"Type": "NodeParagraph", "Type": "NodeParagraph",
"Properties": { "Properties": {
"ID": "20240530101000-isl867u",
"id": "20240530101000-afub9kt", "id": "20240530101000-afub9kt",
"updated": "20240530101000" "updated": "20250903163002"
}, },
"Children": [ "Children": [
{ {
"Type": "NodeText", "Type": "NodeText",
"Data": ".pptx" "Data": ""
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".pptx"
},
{
"Type": "NodeText",
"Data": ""
} }
] ]
} }
@ -150,21 +473,30 @@
}, },
"Properties": { "Properties": {
"ID": "20240530101000-79w2hmi", "ID": "20240530101000-79w2hmi",
"id": "20240530101000-6c3or97" "id": "20240530101000-6c3or97",
"updated": "20250903163003"
}, },
"Children": [ "Children": [
{ {
"ID": "20240530101000-p5qs8ir", "ID": "20240530101000-p5qs8ir",
"Type": "NodeParagraph", "Type": "NodeParagraph",
"Properties": { "Properties": {
"ID": "20240530101000-zo7jhc4",
"id": "20240530101000-p5qs8ir", "id": "20240530101000-p5qs8ir",
"updated": "20240530101000" "updated": "20250903163003"
}, },
"Children": [ "Children": [
{ {
"Type": "NodeText", "Type": "NodeText",
"Data": ".xlsx" "Data": ""
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".xlsx"
},
{
"Type": "NodeText",
"Data": ""
} }
] ]
} }
@ -179,20 +511,30 @@
}, },
"Properties": { "Properties": {
"ID": "20240530101000-nm831gm", "ID": "20240530101000-nm831gm",
"id": "20240530101000-napqxcr" "id": "20240530101000-napqxcr",
"updated": "20250903163004"
}, },
"Children": [ "Children": [
{ {
"ID": "20240530101000-vknnawk", "ID": "20240530101000-vknnawk",
"Type": "NodeParagraph", "Type": "NodeParagraph",
"Properties": { "Properties": {
"ID": "20240530101000-l05rbi9", "id": "20240530101000-vknnawk",
"id": "20240530101000-vknnawk" "updated": "20250903163004"
}, },
"Children": [ "Children": [
{ {
"Type": "NodeText", "Type": "NodeText",
"Data": ".pdf" "Data": ""
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": ".pdf"
},
{
"Type": "NodeText",
"Data": ""
} }
] ]
} }

View file

@ -62,7 +62,7 @@ export const pdfResize = () => {
export const genAssetHTML = (type: string, pathString: string, imgName: string, linkName: string) => { export const genAssetHTML = (type: string, pathString: string, imgName: string, linkName: string) => {
let html = ""; let html = "";
if (Constants.SIYUAN_ASSETS_AUDIO.includes(type)) { if (Constants.SIYUAN_ASSETS_AUDIO.includes(type)) {
html = `<div data-node-id="${Lute.NewNodeID()}" data-type="NodeAudio" class="iframe" updated="${dayjs().format("YYYYMMDDHHmmss")}"><div class="iframe-content"><audio controls="controls" src="${pathString}" data-src="${pathString}"></audio>${Constants.ZWSP}</div><div class="protyle-attr" contenteditable="false">${Constants.ZWSP}</div></div>`; html = `<div data-node-id="${Lute.NewNodeID()}" data-type="NodeAudio" class="iframe" updated="${dayjs().format("YYYYMMDDHHmmss")}"><div class="iframe-content"><audio controls="controls" src="${pathString}"></audio>${Constants.ZWSP}</div><div class="protyle-attr" contenteditable="false">${Constants.ZWSP}</div></div>`;
} else if (Constants.SIYUAN_ASSETS_IMAGE.includes(type)) { } else if (Constants.SIYUAN_ASSETS_IMAGE.includes(type)) {
let netHTML = ""; let netHTML = "";
if (!pathString.startsWith("assets/")) { if (!pathString.startsWith("assets/")) {
@ -70,7 +70,7 @@ export const genAssetHTML = (type: string, pathString: string, imgName: string,
} }
html = `<span contenteditable="false" data-type="img" class="img"><span> </span><span><span class="protyle-action protyle-icons"><span class="protyle-icon protyle-icon--only"><svg><use xlink:href="#iconMore"></use></svg></span></span><img src="${pathString}" data-src="${pathString}" alt="${imgName}" /><span class="protyle-action__drag"></span>${netHTML}<span class="protyle-action__title"></span></span><span> </span></span>`; html = `<span contenteditable="false" data-type="img" class="img"><span> </span><span><span class="protyle-action protyle-icons"><span class="protyle-icon protyle-icon--only"><svg><use xlink:href="#iconMore"></use></svg></span></span><img src="${pathString}" data-src="${pathString}" alt="${imgName}" /><span class="protyle-action__drag"></span>${netHTML}<span class="protyle-action__title"></span></span><span> </span></span>`;
} else if (Constants.SIYUAN_ASSETS_VIDEO.includes(type)) { } else if (Constants.SIYUAN_ASSETS_VIDEO.includes(type)) {
html = `<div data-node-id="${Lute.NewNodeID()}" data-type="NodeVideo" class="iframe" updated="${dayjs().format("YYYYMMDDHHmmss")}"><div class="iframe-content">${Constants.ZWSP}<video controls="controls" src="${pathString}" data-src="${pathString}"></video><span class="protyle-action__drag" contenteditable="false"></span></div><div class="protyle-attr" contenteditable="false">${Constants.ZWSP}</div></div>`; html = `<div data-node-id="${Lute.NewNodeID()}" data-type="NodeVideo" class="iframe" updated="${dayjs().format("YYYYMMDDHHmmss")}"><div class="iframe-content">${Constants.ZWSP}<video controls="controls" src="${pathString}"></video><span class="protyle-action__drag" contenteditable="false"></span></div><div class="protyle-attr" contenteditable="false">${Constants.ZWSP}</div></div>`;
} else { } else {
html = `<span data-type="a" data-href="${pathString}">${linkName}</span>`; html = `<span data-type="a" data-href="${pathString}">${linkName}</span>`;
} }

View file

@ -59,6 +59,7 @@ export const openMobileFileById = (app: App, id: string, action: TProtyleAction[
render: { render: {
scroll: true, scroll: true,
title: true, title: true,
titleShowTop: true,
background: true, background: true,
gutter: true, gutter: true,
}, },

View file

@ -14,7 +14,9 @@ import {Constants} from "../../constants";
import {matchHotKey} from "../util/hotKey"; import {matchHotKey} from "../util/hotKey";
import {isMac, readText} from "../util/compatibility"; import {isMac, readText} from "../util/compatibility";
import * as dayjs from "dayjs"; import * as dayjs from "dayjs";
/// #if !MOBILE
import {openFileById} from "../../editor/util"; import {openFileById} from "../../editor/util";
/// #endif
import {setTitle} from "../../dialog/processSystem"; import {setTitle} from "../../dialog/processSystem";
import {getContenteditableElement, getNoContainerElement} from "../wysiwyg/getBlock"; import {getContenteditableElement, getNoContainerElement} from "../wysiwyg/getBlock";
import {commonHotkey} from "../wysiwyg/commonHotkey"; import {commonHotkey} from "../wysiwyg/commonHotkey";
@ -38,232 +40,68 @@ export class Title {
if (window.siyuan.config.editor.displayBookmarkIcon) { if (window.siyuan.config.editor.displayBookmarkIcon) {
this.element.classList.add("protyle-wysiwyg--attr"); this.element.classList.add("protyle-wysiwyg--attr");
} }
/// #if !MOBILE if (protyle.options.render?.titleShowTop) {
// 标题内需要一个空格,避免首次加载出现`请输入文档名`干扰 this.element.innerHTML = '<div class="protyle-attr"></div>';
this.element.innerHTML = `<span aria-label="${isMac() ? window.siyuan.languages.gutterTip2 : window.siyuan.languages.gutterTip2.replace("⇧", "Shift+")}" data-position="west" class="protyle-title__icon ariaLabel"><svg><use xlink:href="#iconFile"></use></svg></span> } else {
// 标题内需要一个空格,避免首次加载出现`请输入文档名`干扰
this.element.innerHTML = `<span aria-label="${isMac() ? window.siyuan.languages.gutterTip2 : window.siyuan.languages.gutterTip2.replace("⇧", "Shift+")}" data-position="west" class="protyle-title__icon ariaLabel"><svg><use xlink:href="#iconFile"></use></svg></span>
<div contenteditable="true" spellcheck="${window.siyuan.config.editor.spellcheck}" class="protyle-title__input" data-tip="${window.siyuan.languages._kernel[16]}"> </div><div class="protyle-attr"></div>`; <div contenteditable="true" spellcheck="${window.siyuan.config.editor.spellcheck}" class="protyle-title__input" data-tip="${window.siyuan.languages._kernel[16]}"> </div><div class="protyle-attr"></div>`;
this.editElement = this.element.querySelector(".protyle-title__input"); this.editElement = this.element.querySelector(".protyle-title__input");
this.editElement.addEventListener("paste", (event: ClipboardEvent) => { this.editElement.addEventListener("paste", (event: ClipboardEvent) => {
event.stopPropagation();
event.preventDefault();
// 不能使用 range.insertNode否则无法撤销
let text = event.clipboardData.getData("text/siyuan");
if (text) {
try {
JSON.parse(text);
text = event.clipboardData.getData("text/plain");
} catch (e) {
// 不为数据库,保持 text 不变
}
text = protyle.lute.BlockDOM2Content(text);
} else {
text = event.clipboardData.getData("text/plain");
}
// 阻止右键复制菜单报错
setTimeout(function () {
document.execCommand("insertText", false, replaceFileName(text));
}, 0);
this.rename(protyle);
});
this.editElement.addEventListener("click", () => {
protyle.toolbar?.element.classList.add("fn__none");
});
this.editElement.addEventListener("input", (event: InputEvent) => {
if (event.isComposing) {
return;
}
if (this.editElement.textContent === "") {
this.editElement.querySelectorAll("br").forEach(item => {
item.remove();
});
}
this.rename(protyle);
});
this.editElement.addEventListener("compositionend", () => {
this.rename(protyle);
});
this.editElement.addEventListener("drop", (event: DragEvent) => {
// https://ld246.com/article/1661911210429
event.stopPropagation();
event.preventDefault();
});
this.editElement.addEventListener("keydown", (event: KeyboardEvent) => {
if (event.isComposing) {
return;
}
if (commonHotkey(protyle, event)) {
return true;
}
if (matchHotKey("⇧⌘V", event)) {
navigator.clipboard.readText().then(textPlain => {
// 对 HTML 标签进行内部转义,避免被 Lute 解析以后变为小写 https://github.com/siyuan-note/siyuan/issues/10620
textPlain = textPlain.replace(/</g, ";;;lt;;;").replace(/>/g, ";;;gt;;;");
enableLuteMarkdownSyntax(protyle);
let content = protyle.lute.BlockDOM2EscapeMarkerContent(protyle.lute.Md2BlockDOM(textPlain));
restoreLuteMarkdownSyntax(protyle);
// 移除 ;;;lt;;; 和 ;;;gt;;; 转义及其包裹的内容
content = content.replace(/;;;lt;;;[^;]+;;;gt;;;/g, "");
document.execCommand("insertText", false, replaceFileName(content));
this.rename(protyle);
});
event.preventDefault();
event.stopPropagation(); event.stopPropagation();
} event.preventDefault();
if (matchHotKey(window.siyuan.config.keymap.general.enterBack.custom, event)) { // 不能使用 range.insertNode否则无法撤销
const ids = protyle.path.split("/"); let text = event.clipboardData.getData("text/siyuan");
if (ids.length > 2) { if (text) {
openFileById({ try {
app: protyle.app, JSON.parse(text);
id: ids[ids.length - 2], text = event.clipboardData.getData("text/plain");
action: [Constants.CB_GET_FOCUS, Constants.CB_GET_SCROLL] } catch (e) {
// 不为数据库,保持 text 不变
}
text = protyle.lute.BlockDOM2Content(text);
} else {
text = event.clipboardData.getData("text/plain");
}
// 阻止右键复制菜单报错
setTimeout(function () {
document.execCommand("insertText", false, replaceFileName(text));
}, 0);
this.rename(protyle);
});
this.editElement.addEventListener("click", () => {
protyle.toolbar?.element.classList.add("fn__none");
});
this.editElement.addEventListener("input", (event: InputEvent) => {
if (event.isComposing) {
return;
}
if (this.editElement.textContent === "") {
this.editElement.querySelectorAll("br").forEach(item => {
item.remove();
}); });
} }
event.preventDefault(); this.rename(protyle);
});
this.editElement.addEventListener("compositionend", () => {
this.rename(protyle);
});
this.editElement.addEventListener("drop", (event: DragEvent) => {
// https://ld246.com/article/1661911210429
event.stopPropagation(); event.stopPropagation();
return; event.preventDefault();
} });
if (electronUndo(event)) { this.editElement.addEventListener("keydown", (event: KeyboardEvent) => {
return; if (event.isComposing) {
} return;
if (event.key === "ArrowDown") {
const rects = getSelection().getRangeAt(0).getClientRects();
// https://github.com/siyuan-note/siyuan/issues/11729
if (rects.length === 0 // 标题为空时时
|| this.editElement.getBoundingClientRect().bottom - rects[rects.length - 1].bottom < 25) {
const noContainerElement = getNoContainerElement(protyle.wysiwyg.element.firstElementChild);
// https://github.com/siyuan-note/siyuan/issues/4923
if (noContainerElement) {
focusBlock(noContainerElement, protyle.wysiwyg.element);
}
event.preventDefault();
event.stopPropagation();
} }
} else if (event.key === "Enter") {
const editElement = getContenteditableElement(protyle.wysiwyg.element.firstElementChild); if (commonHotkey(protyle, event)) {
if (editElement && editElement.textContent === "" && editElement.getAttribute("placeholder")) { return true;
// 配合提示文本使用,避免提示文本挤压到第二个块中
focusBlock(protyle.wysiwyg.element.firstElementChild, protyle.wysiwyg.element);
} else {
const newId = Lute.NewNodeID();
const newElement = genEmptyElement(false, true, newId);
protyle.wysiwyg.element.insertAdjacentElement("afterbegin", newElement);
focusByWbr(newElement, protyle.toolbar.range || getEditorRange(newElement));
transaction(protyle, [{
action: "insert",
data: newElement.outerHTML,
id: newId,
parentID: protyle.block.parentID
}], [{
action: "delete",
id: newId,
}]);
} }
event.preventDefault(); if (matchHotKey("⇧⌘V", event)) {
event.stopPropagation();
} else if (matchHotKey(window.siyuan.config.keymap.editor.general.attr.custom, event)) {
fetchPost("/api/block/getDocInfo", {
id: protyle.block.rootID
}, (response) => {
openFileAttr(response.data.ial, "bookmark", protyle);
});
event.preventDefault();
event.stopPropagation();
} else if (matchHotKey("⌘A", event)) {
getEditorRange(this.editElement).selectNodeContents(this.editElement);
event.preventDefault();
event.stopPropagation();
}
});
const iconElement = this.element.querySelector(".protyle-title__icon");
iconElement.addEventListener("click", () => {
if (window.siyuan.shiftIsPressed) {
fetchPost("/api/block/getDocInfo", {
id: protyle.block.rootID
}, (response) => {
openFileAttr(response.data.ial, "bookmark", protyle);
});
} else {
const iconRect = iconElement.getBoundingClientRect();
openTitleMenu(protyle, {x: iconRect.left, y: iconRect.bottom});
}
});
this.element.addEventListener("contextmenu", (event) => {
if (event.shiftKey) {
return;
}
if (getSelection().rangeCount === 0) {
openTitleMenu(protyle, {x: event.clientX, y: event.clientY});
return;
}
protyle.toolbar?.element.classList.add("fn__none");
window.siyuan.menus.menu.remove();
const range = getEditorRange(this.editElement);
if (range.toString() !== "") {
window.siyuan.menus.menu.append(new MenuItem({
id: "copy",
icon: "iconCopy",
accelerator: "⌘C",
label: window.siyuan.languages.copy,
click: () => {
focusByRange(getEditorRange(this.editElement));
document.execCommand("copy");
}
}).element);
window.siyuan.menus.menu.append(new MenuItem({
id: "cut",
icon: "iconCut",
accelerator: "⌘X",
label: window.siyuan.languages.cut,
click: () => {
focusByRange(getEditorRange(this.editElement));
document.execCommand("cut");
setTimeout(() => {
this.rename(protyle);
}, Constants.TIMEOUT_INPUT);
}
}).element);
window.siyuan.menus.menu.append(new MenuItem({
id: "delete",
icon: "iconTrashcan",
accelerator: "⌫",
label: window.siyuan.languages.delete,
click: () => {
const range = getEditorRange(this.editElement);
range.extractContents();
focusByRange(range);
setTimeout(() => {
this.rename(protyle);
}, Constants.TIMEOUT_INPUT);
}
}).element);
}
window.siyuan.menus.menu.append(new MenuItem({
id: "paste",
label: window.siyuan.languages.paste,
icon: "iconPaste",
accelerator: "⌘V",
click: async () => {
focusByRange(getEditorRange(this.editElement));
if (document.queryCommandSupported("paste")) {
document.execCommand("paste");
} else {
try {
const text = await readText();
document.execCommand("insertText", false, replaceFileName(text));
this.rename(protyle);
} catch (e) {
console.log(e);
}
}
}
}).element);
window.siyuan.menus.menu.append(new MenuItem({
id: "pasteAsPlainText",
label: window.siyuan.languages.pasteAsPlainText,
accelerator: "⇧⌘V",
click: async () => {
navigator.clipboard.readText().then(textPlain => { navigator.clipboard.readText().then(textPlain => {
// 对 HTML 标签进行内部转义,避免被 Lute 解析以后变为小写 https://github.com/siyuan-note/siyuan/issues/10620
textPlain = textPlain.replace(/</g, ";;;lt;;;").replace(/>/g, ";;;gt;;;"); textPlain = textPlain.replace(/</g, ";;;lt;;;").replace(/>/g, ";;;gt;;;");
enableLuteMarkdownSyntax(protyle); enableLuteMarkdownSyntax(protyle);
let content = protyle.lute.BlockDOM2EscapeMarkerContent(protyle.lute.Md2BlockDOM(textPlain)); let content = protyle.lute.BlockDOM2EscapeMarkerContent(protyle.lute.Md2BlockDOM(textPlain));
@ -273,23 +111,189 @@ export class Title {
document.execCommand("insertText", false, replaceFileName(content)); document.execCommand("insertText", false, replaceFileName(content));
this.rename(protyle); this.rename(protyle);
}); });
event.preventDefault();
event.stopPropagation();
} }
}).element); if (matchHotKey(window.siyuan.config.keymap.general.enterBack.custom, event)) {
window.siyuan.menus.menu.append(new MenuItem({ const ids = protyle.path.split("/");
id: "selectAll", if (ids.length > 2) {
label: window.siyuan.languages.selectAll, /// #if !MOBILE
icon: "iconSelect", openFileById({
accelerator: "⌘A", app: protyle.app,
click: () => { id: ids[ids.length - 2],
range.selectNodeContents(this.editElement); action: [Constants.CB_GET_FOCUS, Constants.CB_GET_SCROLL]
focusByRange(range); });
/// #endif
}
event.preventDefault();
event.stopPropagation();
return;
} }
}).element); if (electronUndo(event)) {
window.siyuan.menus.menu.popup({x: event.clientX, y: event.clientY}); return;
}); }
/// #else if (event.key === "ArrowDown") {
this.element.innerHTML = '<div class="protyle-attr"></div>'; const rects = getSelection().getRangeAt(0).getClientRects();
/// #endif // https://github.com/siyuan-note/siyuan/issues/11729
if (rects.length === 0 // 标题为空时时
|| this.editElement.getBoundingClientRect().bottom - rects[rects.length - 1].bottom < 25) {
const noContainerElement = getNoContainerElement(protyle.wysiwyg.element.firstElementChild);
// https://github.com/siyuan-note/siyuan/issues/4923
if (noContainerElement) {
focusBlock(noContainerElement, protyle.wysiwyg.element);
}
event.preventDefault();
event.stopPropagation();
}
} else if (event.key === "Enter") {
const editElement = getContenteditableElement(protyle.wysiwyg.element.firstElementChild);
if (editElement && editElement.textContent === "" && editElement.getAttribute("placeholder")) {
// 配合提示文本使用,避免提示文本挤压到第二个块中
focusBlock(protyle.wysiwyg.element.firstElementChild, protyle.wysiwyg.element);
} else {
const newId = Lute.NewNodeID();
const newElement = genEmptyElement(false, true, newId);
protyle.wysiwyg.element.insertAdjacentElement("afterbegin", newElement);
focusByWbr(newElement, protyle.toolbar.range || getEditorRange(newElement));
transaction(protyle, [{
action: "insert",
data: newElement.outerHTML,
id: newId,
parentID: protyle.block.parentID
}], [{
action: "delete",
id: newId,
}]);
}
event.preventDefault();
event.stopPropagation();
} else if (matchHotKey(window.siyuan.config.keymap.editor.general.attr.custom, event)) {
fetchPost("/api/block/getDocInfo", {
id: protyle.block.rootID
}, (response) => {
openFileAttr(response.data.ial, "bookmark", protyle);
});
event.preventDefault();
event.stopPropagation();
} else if (matchHotKey("⌘A", event)) {
getEditorRange(this.editElement).selectNodeContents(this.editElement);
event.preventDefault();
event.stopPropagation();
}
});
const iconElement = this.element.querySelector(".protyle-title__icon");
iconElement.addEventListener("click", () => {
if (window.siyuan.shiftIsPressed) {
fetchPost("/api/block/getDocInfo", {
id: protyle.block.rootID
}, (response) => {
openFileAttr(response.data.ial, "bookmark", protyle);
});
} else {
const iconRect = iconElement.getBoundingClientRect();
openTitleMenu(protyle, {x: iconRect.left, y: iconRect.bottom});
}
});
this.element.addEventListener("contextmenu", (event) => {
if (event.shiftKey) {
return;
}
if (getSelection().rangeCount === 0) {
openTitleMenu(protyle, {x: event.clientX, y: event.clientY});
return;
}
protyle.toolbar?.element.classList.add("fn__none");
window.siyuan.menus.menu.remove();
const range = getEditorRange(this.editElement);
if (range.toString() !== "") {
window.siyuan.menus.menu.append(new MenuItem({
id: "copy",
icon: "iconCopy",
accelerator: "⌘C",
label: window.siyuan.languages.copy,
click: () => {
focusByRange(getEditorRange(this.editElement));
document.execCommand("copy");
}
}).element);
window.siyuan.menus.menu.append(new MenuItem({
id: "cut",
icon: "iconCut",
accelerator: "⌘X",
label: window.siyuan.languages.cut,
click: () => {
focusByRange(getEditorRange(this.editElement));
document.execCommand("cut");
setTimeout(() => {
this.rename(protyle);
}, Constants.TIMEOUT_INPUT);
}
}).element);
window.siyuan.menus.menu.append(new MenuItem({
id: "delete",
icon: "iconTrashcan",
accelerator: "⌫",
label: window.siyuan.languages.delete,
click: () => {
const range = getEditorRange(this.editElement);
range.extractContents();
focusByRange(range);
setTimeout(() => {
this.rename(protyle);
}, Constants.TIMEOUT_INPUT);
}
}).element);
}
window.siyuan.menus.menu.append(new MenuItem({
id: "paste",
label: window.siyuan.languages.paste,
icon: "iconPaste",
accelerator: "⌘V",
click: async () => {
focusByRange(getEditorRange(this.editElement));
if (document.queryCommandSupported("paste")) {
document.execCommand("paste");
} else {
try {
const text = await readText();
document.execCommand("insertText", false, replaceFileName(text));
this.rename(protyle);
} catch (e) {
console.log(e);
}
}
}
}).element);
window.siyuan.menus.menu.append(new MenuItem({
id: "pasteAsPlainText",
label: window.siyuan.languages.pasteAsPlainText,
accelerator: "⇧⌘V",
click: async () => {
navigator.clipboard.readText().then(textPlain => {
textPlain = textPlain.replace(/</g, ";;;lt;;;").replace(/>/g, ";;;gt;;;");
enableLuteMarkdownSyntax(protyle);
let content = protyle.lute.BlockDOM2EscapeMarkerContent(protyle.lute.Md2BlockDOM(textPlain));
restoreLuteMarkdownSyntax(protyle);
// 移除 ;;;lt;;; 和 ;;;gt;;; 转义及其包裹的内容
content = content.replace(/;;;lt;;;[^;]+;;;gt;;;/g, "");
document.execCommand("insertText", false, replaceFileName(content));
this.rename(protyle);
});
}
}).element);
window.siyuan.menus.menu.append(new MenuItem({
id: "selectAll",
label: window.siyuan.languages.selectAll,
icon: "iconSelect",
accelerator: "⌘A",
click: () => {
range.selectNodeContents(this.editElement);
focusByRange(range);
}
}).element);
window.siyuan.menus.menu.popup({x: event.clientX, y: event.clientY});
});
}
this.element.querySelector(".protyle-attr").addEventListener("click", (event: MouseEvent & { this.element.querySelector(".protyle-attr").addEventListener("click", (event: MouseEvent & {
target: HTMLElement target: HTMLElement
}) => { }) => {
@ -329,9 +333,15 @@ export class Title {
public setTitle(title: string) { public setTitle(title: string) {
/// #if MOBILE /// #if MOBILE
const inputElement = document.getElementById("toolbarName") as HTMLInputElement; if (this.editElement) {
if (code160to32(title) !== code160to32(inputElement.value)) { if (code160to32(title) !== code160to32(this.editElement.textContent)) {
inputElement.value = title === window.siyuan.languages.untitled ? "" : title; this.editElement.textContent = title === window.siyuan.languages.untitled ? "" : title;
}
} else {
const inputElement = document.getElementById("toolbarName") as HTMLInputElement;
if (code160to32(title) !== code160to32(inputElement.value)) {
inputElement.value = title === window.siyuan.languages.untitled ? "" : title;
}
} }
/// #else /// #else
if (code160to32(title) !== code160to32(this.editElement.textContent)) { if (code160to32(title) !== code160to32(this.editElement.textContent)) {

View file

@ -6,6 +6,8 @@ import {updateHotkeyTip} from "../util/compatibility";
/// #if !MOBILE /// #if !MOBILE
import {openBacklink, openGraph, openOutline} from "../../layout/dock/util"; import {openBacklink, openGraph, openOutline} from "../../layout/dock/util";
import * as path from "path"; import * as path from "path";
/// #else
import {openMobileFileById} from "../../mobile/editor";
/// #endif /// #endif
import {Constants} from "../../constants"; import {Constants} from "../../constants";
import {openCardByData} from "../../card/openCard"; import {openCardByData} from "../../card/openCard";
@ -24,7 +26,6 @@ import {transferBlockRef} from "../../menus/block";
import {addEditorToDatabase} from "../render/av/addToDatabase"; import {addEditorToDatabase} from "../render/av/addToDatabase";
import {openFileById} from "../../editor/util"; import {openFileById} from "../../editor/util";
import {hasTopClosestByClassName} from "../util/hasClosest"; import {hasTopClosestByClassName} from "../util/hasClosest";
import {openMobileFileById} from "../../mobile/editor";
export const openTitleMenu = (protyle: IProtyle, position: IPosition) => { export const openTitleMenu = (protyle: IProtyle, position: IPosition) => {
hideTooltip(); hideTooltip();
@ -228,7 +229,7 @@ export const openTitleMenu = (protyle: IProtyle, position: IPosition) => {
action: protyle.block.rootID !== protyle.block.id ? [Constants.CB_GET_ALL, Constants.CB_GET_FOCUS] : [Constants.CB_GET_CONTEXT], action: protyle.block.rootID !== protyle.block.id ? [Constants.CB_GET_ALL, Constants.CB_GET_FOCUS] : [Constants.CB_GET_CONTEXT],
}); });
/// #else /// #else
openMobileFileById(protyle.app, protyle.block.id, protyle.block.rootID !== protyle.block.id ? [Constants.CB_GET_ALL, Constants.CB_GET_FOCUS] : [Constants.CB_GET_CONTEXT]); openMobileFileById(protyle.app, protyle.block.id, protyle.block.rootID !== protyle.block.id ? [Constants.CB_GET_ALL] : [Constants.CB_GET_CONTEXT]);
/// #endif /// #endif
} }
}).element); }).element);

View file

@ -290,6 +290,9 @@ export class Protyle {
data.data[0].doOperations.find((item: IOperation) => { data.data[0].doOperations.find((item: IOperation) => {
if (!this.protyle.preview.element.classList.contains("fn__none")) { if (!this.protyle.preview.element.classList.contains("fn__none")) {
this.protyle.preview.render(this.protyle); this.protyle.preview.render(this.protyle);
if (item.action === "updateAttrs") {
onTransaction(this.protyle, item, false);
}
} else if (this.protyle.options.backlinkData && ["delete", "move"].includes(item.action)) { } else if (this.protyle.options.backlinkData && ["delete", "move"].includes(item.action)) {
// 只对特定情况刷新,否则展开、编辑等操作刷新会频繁 // 只对特定情况刷新,否则展开、编辑等操作刷新会频繁
/// #if !MOBILE /// #if !MOBILE

View file

@ -11,11 +11,12 @@ export class Options {
render: { render: {
background: false, background: false,
title: false, title: false,
titleShowTop: false,
hideTitleOnZoom: false,
gutter: true, gutter: true,
scroll: false, scroll: false,
breadcrumb: true, breadcrumb: true,
breadcrumbDocName: false, breadcrumbDocName: false,
hideTitleOnZoom: false,
}, },
action: [], action: [],
after: undefined, after: undefined,

View file

@ -855,15 +855,16 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
const cloneRange = range.cloneRange(); const cloneRange = range.cloneRange();
const nextElement = getNextBlock(getTopAloneElement(nodeElement)); const nextElement = getNextBlock(getTopAloneElement(nodeElement));
if (nextElement) { if (nextElement) {
if (!nodeElement.classList.contains("code-block")) { const nextRange = focusBlock(nextElement);
const nextRange = focusBlock(nextElement); if (nextRange) {
if (nextRange) { const nextBlockElement = hasClosestBlock(nextRange.startContainer);
const nextBlockElement = hasClosestBlock(nextRange.startContainer); if (nextBlockElement &&
if (nextBlockElement) { (!nextBlockElement.classList.contains("code-block") ||
// 反向删除合并为一个块时,光标应保持在尾部 https://github.com/siyuan-note/siyuan/issues/14290#issuecomment-2849810529 (nextBlockElement.classList.contains("code-block") && getContenteditableElement(nextBlockElement).textContent == "\n"))
cloneRange.insertNode(document.createElement("wbr")); ) {
removeBlock(protyle, nextBlockElement, nextRange, "Delete"); // 反向删除合并为一个块时,光标应保持在尾部 https://github.com/siyuan-note/siyuan/issues/14290#issuecomment-2849810529
} cloneRange.insertNode(document.createElement("wbr"));
removeBlock(protyle, nextBlockElement, nextRange, "Delete");
} }
} }
event.stopPropagation(); event.stopPropagation();
@ -912,7 +913,9 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
// 需使用 textContent文本元素没有 innerText // 需使用 textContent文本元素没有 innerText
currentNode.textContent === "") // https://ld246.com/article/1649251218696 currentNode.textContent === "") // https://ld246.com/article/1649251218696
)) { )) {
if (!nodeElement.classList.contains("code-block")) { if (!nodeElement.classList.contains("code-block") ||
(nodeElement.classList.contains("code-block") && editElement.textContent == "\n")
) {
removeBlock(protyle, nodeElement, range, "Backspace"); removeBlock(protyle, nodeElement, range, "Backspace");
} }
event.stopPropagation(); event.stopPropagation();

View file

@ -455,6 +455,7 @@ interface IProtyleOptions {
render?: { render?: {
background?: boolean background?: boolean
title?: boolean title?: boolean
titleShowTop?: boolean
gutter?: boolean gutter?: boolean
scroll?: boolean scroll?: boolean
breadcrumb?: boolean breadcrumb?: boolean

File diff suppressed because one or more lines are too long

View file

@ -154,7 +154,7 @@ func extensionCopy(c *gin.Context) {
fName += ext fName += ext
} }
fName = util.AssetName(fName) fName = util.AssetName(fName, ast.NewNodeID())
writePath := filepath.Join(assets, fName) writePath := filepath.Join(assets, fName)
if err = filelock.WriteFile(writePath, data); err != nil { if err = filelock.WriteFile(writePath, data); err != nil {
ret.Code = -1 ret.Code = -1

View file

@ -8,7 +8,7 @@ require (
github.com/88250/epub v0.0.0-20230830085737-c19055cd1f48 github.com/88250/epub v0.0.0-20230830085737-c19055cd1f48
github.com/88250/go-humanize v0.0.0-20240424102817-4f78fac47ea7 github.com/88250/go-humanize v0.0.0-20240424102817-4f78fac47ea7
github.com/88250/gulu v1.2.3-0.20250227144607-7f4570b0d689 github.com/88250/gulu v1.2.3-0.20250227144607-7f4570b0d689
github.com/88250/lute v1.7.7-0.20250903032105-b1737f9621fb github.com/88250/lute v1.7.7-0.20250903134523-51a49dcdda40
github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1 github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1
github.com/ClarkThan/ahocorasick v0.0.0-20231011042242-30d1ef1347f4 github.com/ClarkThan/ahocorasick v0.0.0-20231011042242-30d1ef1347f4
github.com/ConradIrwin/font v0.2.1 github.com/ConradIrwin/font v0.2.1
@ -56,9 +56,9 @@ require (
github.com/rqlite/sql v0.0.0-20250623131620-453fa49cad04 github.com/rqlite/sql v0.0.0-20250623131620-453fa49cad04
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06
github.com/sashabaranov/go-openai v1.40.3 github.com/sashabaranov/go-openai v1.40.3
github.com/shirou/gopsutil/v4 v4.25.7 github.com/shirou/gopsutil/v4 v4.25.8
github.com/siyuan-note/dataparser v0.0.0-20250804100744-b41253b236f3 github.com/siyuan-note/dataparser v0.0.0-20250804100744-b41253b236f3
github.com/siyuan-note/dejavu v0.0.0-20250823083709-147ab94b046a github.com/siyuan-note/dejavu v0.0.0-20250903140859-4d1e84e6dc9d
github.com/siyuan-note/encryption v0.0.0-20250326023622-24a67e6956ec github.com/siyuan-note/encryption v0.0.0-20250326023622-24a67e6956ec
github.com/siyuan-note/eventbus v0.0.0-20240627125516-396fdb0f0f97 github.com/siyuan-note/eventbus v0.0.0-20240627125516-396fdb0f0f97
github.com/siyuan-note/filelock v0.0.0-20250227145141-7d111cdf3c57 github.com/siyuan-note/filelock v0.0.0-20250227145141-7d111cdf3c57
@ -94,24 +94,24 @@ require (
github.com/alex-ant/gomath v0.0.0-20160516115720-89013a210a82 // indirect github.com/alex-ant/gomath v0.0.0-20160516115720-89013a210a82 // indirect
github.com/andybalholm/brotli v1.2.0 // indirect github.com/andybalholm/brotli v1.2.0 // indirect
github.com/andybalholm/cascadia v1.3.3 // indirect github.com/andybalholm/cascadia v1.3.3 // indirect
github.com/aws/aws-sdk-go-v2 v1.38.1 // indirect github.com/aws/aws-sdk-go-v2 v1.38.3 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.0 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.1 // indirect
github.com/aws/aws-sdk-go-v2/config v1.31.2 // indirect github.com/aws/aws-sdk-go-v2/config v1.31.6 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.18.6 // indirect github.com/aws/aws-sdk-go-v2/credentials v1.18.10 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.4 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.6 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.4 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.6 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.4 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.6 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.4 // indirect github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.6 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.0 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.8.4 // indirect github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.8.6 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.4 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.6 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.4 // indirect github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.6 // indirect
github.com/aws/aws-sdk-go-v2/service/s3 v1.87.1 // indirect github.com/aws/aws-sdk-go-v2/service/s3 v1.87.3 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.28.2 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.29.1 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.33.2 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.34.2 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.38.0 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.38.2 // indirect
github.com/aws/smithy-go v1.22.5 // indirect github.com/aws/smithy-go v1.23.0 // indirect
github.com/bytedance/sonic v1.13.3 // indirect github.com/bytedance/sonic v1.13.3 // indirect
github.com/bytedance/sonic/loader v0.2.4 // indirect github.com/bytedance/sonic/loader v0.2.4 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect
@ -187,7 +187,7 @@ require (
golang.org/x/tools v0.36.0 // indirect golang.org/x/tools v0.36.0 // indirect
google.golang.org/protobuf v1.36.6 // indirect google.golang.org/protobuf v1.36.6 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect
modernc.org/fileutil v1.3.22 // indirect modernc.org/fileutil v1.3.29 // indirect
) )
replace github.com/mattn/go-sqlite3 => github.com/88250/go-sqlite3 v1.14.13-0.20231214121541-e7f54c482950 replace github.com/mattn/go-sqlite3 => github.com/88250/go-sqlite3 v1.14.13-0.20231214121541-e7f54c482950

View file

@ -14,8 +14,8 @@ github.com/88250/go-sqlite3 v1.14.13-0.20231214121541-e7f54c482950 h1:Pa5hMiBceT
github.com/88250/go-sqlite3 v1.14.13-0.20231214121541-e7f54c482950/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/88250/go-sqlite3 v1.14.13-0.20231214121541-e7f54c482950/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
github.com/88250/gulu v1.2.3-0.20250227144607-7f4570b0d689 h1:39y5g7vnFAIcXhTN3IXPk7h2xBhC4a9hBTykDhHJqRY= github.com/88250/gulu v1.2.3-0.20250227144607-7f4570b0d689 h1:39y5g7vnFAIcXhTN3IXPk7h2xBhC4a9hBTykDhHJqRY=
github.com/88250/gulu v1.2.3-0.20250227144607-7f4570b0d689/go.mod h1:c8uVw25vW2W4dhJ/j4iYsX5H1hc19spim266jO5x2hU= github.com/88250/gulu v1.2.3-0.20250227144607-7f4570b0d689/go.mod h1:c8uVw25vW2W4dhJ/j4iYsX5H1hc19spim266jO5x2hU=
github.com/88250/lute v1.7.7-0.20250903032105-b1737f9621fb h1:ioONtSsO7UCA3CrJMu2wbDkdmYDXrYY51lj8PD8pLNI= github.com/88250/lute v1.7.7-0.20250903134523-51a49dcdda40 h1:PR2s/jxhLei+dk41Ogr+dhWtdqxbrpwiRQU6Odflnsc=
github.com/88250/lute v1.7.7-0.20250903032105-b1737f9621fb/go.mod h1:WYyUw//5yVw9BJnoVjx7rI/3szsISxNZCYGOqTIrV0o= github.com/88250/lute v1.7.7-0.20250903134523-51a49dcdda40/go.mod h1:WYyUw//5yVw9BJnoVjx7rI/3szsISxNZCYGOqTIrV0o=
github.com/88250/pdfcpu v0.3.14-0.20250424122812-f10e8d9d8d46 h1:Bq1JsDfVbHKUxNL/B2JXd8cC/1h6aFjrlXpGycnh0Hk= github.com/88250/pdfcpu v0.3.14-0.20250424122812-f10e8d9d8d46 h1:Bq1JsDfVbHKUxNL/B2JXd8cC/1h6aFjrlXpGycnh0Hk=
github.com/88250/pdfcpu v0.3.14-0.20250424122812-f10e8d9d8d46/go.mod h1:fVfOloBzs2+W2VJCCbq60XIxc3yJHAZ0Gahv1oO0gyI= github.com/88250/pdfcpu v0.3.14-0.20250424122812-f10e8d9d8d46/go.mod h1:fVfOloBzs2+W2VJCCbq60XIxc3yJHAZ0Gahv1oO0gyI=
github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1 h1:48T899JQDwyyRu9yXHePYlPdHtpJfrJEUGBMH3SMBWY= github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1 h1:48T899JQDwyyRu9yXHePYlPdHtpJfrJEUGBMH3SMBWY=
@ -56,42 +56,42 @@ github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de h1:FxWPpzIjnTlhP
github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de/go.mod h1:DCaWoUhZrYW9p1lxo/cm8EmUOOzAPSEZNGF2DK1dJgw= github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de/go.mod h1:DCaWoUhZrYW9p1lxo/cm8EmUOOzAPSEZNGF2DK1dJgw=
github.com/asaskevich/EventBus v0.0.0-20200907212545-49d423059eef h1:2JGTg6JapxP9/R33ZaagQtAM4EkkSYnIAlOG5EI8gkM= github.com/asaskevich/EventBus v0.0.0-20200907212545-49d423059eef h1:2JGTg6JapxP9/R33ZaagQtAM4EkkSYnIAlOG5EI8gkM=
github.com/asaskevich/EventBus v0.0.0-20200907212545-49d423059eef/go.mod h1:JS7hed4L1fj0hXcyEejnW57/7LCetXggd+vwrRnYeII= github.com/asaskevich/EventBus v0.0.0-20200907212545-49d423059eef/go.mod h1:JS7hed4L1fj0hXcyEejnW57/7LCetXggd+vwrRnYeII=
github.com/aws/aws-sdk-go-v2 v1.38.1 h1:j7sc33amE74Rz0M/PoCpsZQ6OunLqys/m5antM0J+Z8= github.com/aws/aws-sdk-go-v2 v1.38.3 h1:B6cV4oxnMs45fql4yRH+/Po/YU+597zgWqvDpYMturk=
github.com/aws/aws-sdk-go-v2 v1.38.1/go.mod h1:9Q0OoGQoboYIAJyslFyF1f5K1Ryddop8gqMhWx/n4Wg= github.com/aws/aws-sdk-go-v2 v1.38.3/go.mod h1:sDioUELIUO9Znk23YVmIk86/9DOpkbyyVb1i/gUNFXY=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.0 h1:6GMWV6CNpA/6fbFHnoAjrv4+LGfyTqZz2LtCHnspgDg= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.1 h1:i8p8P4diljCr60PpJp6qZXNlgX4m2yQFpYk+9ZT+J4E=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.0/go.mod h1:/mXlTIVG9jbxkqDnr5UQNQxW1HRYxeGklkM9vAFeabg= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.1/go.mod h1:ddqbooRZYNoJ2dsTwOty16rM+/Aqmk/GOXrK8cg7V00=
github.com/aws/aws-sdk-go-v2/config v1.31.2 h1:NOaSZpVGEH2Np/c1toSeW0jooNl+9ALmsUTZ8YvkJR0= github.com/aws/aws-sdk-go-v2/config v1.31.6 h1:a1t8fXY4GT4xjyJExz4knbuoxSCacB5hT/WgtfPyLjo=
github.com/aws/aws-sdk-go-v2/config v1.31.2/go.mod h1:17ft42Yb2lF6OigqSYiDAiUcX4RIkEMY6XxEMJsrAes= github.com/aws/aws-sdk-go-v2/config v1.31.6/go.mod h1:5ByscNi7R+ztvOGzeUaIu49vkMk2soq5NaH5PYe33MQ=
github.com/aws/aws-sdk-go-v2/credentials v1.18.6 h1:AmmvNEYrru7sYNJnp3pf57lGbiarX4T9qU/6AZ9SucU= github.com/aws/aws-sdk-go-v2/credentials v1.18.10 h1:xdJnXCouCx8Y0NncgoptztUocIYLKeQxrCgN6x9sdhg=
github.com/aws/aws-sdk-go-v2/credentials v1.18.6/go.mod h1:/jdQkh1iVPa01xndfECInp1v1Wnp70v3K4MvtlLGVEc= github.com/aws/aws-sdk-go-v2/credentials v1.18.10/go.mod h1:7tQk08ntj914F/5i9jC4+2HQTAuJirq7m1vZVIhEkWs=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.4 h1:lpdMwTzmuDLkgW7086jE94HweHCqG+uOJwHf3LZs7T0= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.6 h1:wbjnrrMnKew78/juW7I2BtKQwa1qlf6EjQgS69uYY14=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.4/go.mod h1:9xzb8/SV62W6gHQGC/8rrvgNXU6ZoYM3sAIJCIrXJxY= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.6/go.mod h1:AtiqqNrDioJXuUgz3+3T0mBWN7Hro2n9wll2zRUc0ww=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.4 h1:IdCLsiiIj5YJ3AFevsewURCPV+YWUlOW8JiPhoAy8vg= github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.6 h1:uF68eJA6+S9iVr9WgX1NaRGyQ/6MdIyc4JNUo6TN1FA=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.4/go.mod h1:l4bdfCD7XyyZA9BolKBo1eLqgaJxl0/x91PL4Yqe0ao= github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.6/go.mod h1:qlPeVZCGPiobx8wb1ft0GHT5l+dc6ldnwInDFaMvC7Y=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.4 h1:j7vjtr1YIssWQOMeOWRbh3z8g2oY/xPjnZH2gLY4sGw= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.6 h1:pa1DEC6JoI0zduhZePp3zmhWvk/xxm4NB8Hy/Tlsgos=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.4/go.mod h1:yDmJgqOiH4EA8Hndnv4KwAo8jCGTSnM5ASG1nBI+toA= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.6/go.mod h1:gxEjPebnhWGJoaDdtDkA0JX46VRg1wcTHYe63OfX5pE=
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d2KyU5X/BZxjOkRo= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d2KyU5X/BZxjOkRo=
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.4 h1:BE/MNQ86yzTINrfxPPFS86QCBNQeLKY2A0KhDh47+wI= github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.6 h1:R0tNFJqfjHL3900cqhXuwQ+1K4G0xc9Yf8EDbFXCKEw=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.4/go.mod h1:SPBBhkJxjcrzJBc+qY85e83MQ2q3qdra8fghhkkyrJg= github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.6/go.mod h1:y/7sDdu+aJvPtGXr4xYosdpq9a6T9Z0jkXfugmti0rI=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.0 h1:6+lZi2JeGKtCraAj1rpoZfKqnQ9SptseRZioejfUOLM= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1 h1:oegbebPEMA/1Jny7kvwejowCaHz1FWZAQ94WXFNCyTM=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.0/go.mod h1:eb3gfbVIxIoGgJsi9pGne19dhCBpK6opTYpQqAmdy44= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1/go.mod h1:kemo5Myr9ac0U9JfSjMo9yHLtw+pECEHsFtJ9tqCEI8=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.8.4 h1:Beh9oVgtQnBgR4sKKzkUBRQpf1GnL4wt0l4s8h2VCJ0= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.8.6 h1:hncKj/4gR+TPauZgTAsxOxNcvBayhUlYZ6LO/BYiQ30=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.8.4/go.mod h1:b17At0o8inygF+c6FOD3rNyYZufPw62o9XJbSfQPgbo= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.8.6/go.mod h1:OiIh45tp6HdJDDJGnja0mw8ihQGz3VGrUflLqSL0SmM=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.4 h1:ueB2Te0NacDMnaC+68za9jLwkjzxGWm0KB5HTUHjLTI= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.6 h1:LHS1YAIJXJ4K9zS+1d/xa9JAA9sL2QyXIQCQFQW/X08=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.4/go.mod h1:nLEfLnVMmLvyIG58/6gsSA03F1voKGaCfHV7+lR8S7s= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.6/go.mod h1:c9PCiTEuh0wQID5/KqA32J+HAgZxN9tOGXKCiYJjTZI=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.4 h1:HVSeukL40rHclNcUqVcBwE1YoZhOkoLeBfhUqR3tjIU= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.6 h1:nEXUSAwyUfLTgnc9cxlDWy637qsq4UWwp3sNAfl0Z3Y=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.4/go.mod h1:DnbBOv4FlIXHj2/xmrUQYtawRFC9L9ZmQPz+DBc6X5I= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.6/go.mod h1:HGzIULx4Ge3Do2V0FaiYKcyKzOqwrhUZgCI77NisswQ=
github.com/aws/aws-sdk-go-v2/service/s3 v1.87.1 h1:2n6Pd67eJwAb/5KCX62/8RTU0aFAAW7V5XIGSghiHrw= github.com/aws/aws-sdk-go-v2/service/s3 v1.87.3 h1:ETkfWcXP2KNPLecaDa++5bsQhCRa5M5sLUJa5DWYIIg=
github.com/aws/aws-sdk-go-v2/service/s3 v1.87.1/go.mod h1:w5PC+6GHLkvMJKasYGVloB3TduOtROEMqm15HSuIbw4= github.com/aws/aws-sdk-go-v2/service/s3 v1.87.3/go.mod h1:+/3ZTqoYb3Ur7DObD00tarKMLMuKg8iqz5CHEanqTnw=
github.com/aws/aws-sdk-go-v2/service/sso v1.28.2 h1:ve9dYBB8CfJGTFqcQ3ZLAAb/KXWgYlgu/2R2TZL2Ko0= github.com/aws/aws-sdk-go-v2/service/sso v1.29.1 h1:8OLZnVJPvjnrxEwHFg9hVUof/P4sibH+Ea4KKuqAGSg=
github.com/aws/aws-sdk-go-v2/service/sso v1.28.2/go.mod h1:n9bTZFZcBa9hGGqVz3i/a6+NG0zmZgtkB9qVVFDqPA8= github.com/aws/aws-sdk-go-v2/service/sso v1.29.1/go.mod h1:27M3BpVi0C02UiQh1w9nsBEit6pLhlaH3NHna6WUbDE=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.33.2 h1:pd9G9HQaM6UZAZh19pYOkpKSQkyQQ9ftnl/LttQOcGI= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.34.2 h1:gKWSTnqudpo8dAxqBqZnDoDWCiEh/40FziUjr/mo6uA=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.33.2/go.mod h1:eknndR9rU8UpE/OmFpqU78V1EcXPKFTTm5l/buZYgvM= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.34.2/go.mod h1:x7+rkNmRoEN1U13A6JE2fXne9EWyJy54o3n6d4mGaXQ=
github.com/aws/aws-sdk-go-v2/service/sts v1.38.0 h1:iV1Ko4Em/lkJIsoKyGfc0nQySi+v0Udxr6Igq+y9JZc= github.com/aws/aws-sdk-go-v2/service/sts v1.38.2 h1:YZPjhyaGzhDQEvsffDEcpycq49nl7fiGcfJTIo8BszI=
github.com/aws/aws-sdk-go-v2/service/sts v1.38.0/go.mod h1:bEPcjW7IbolPfK67G1nilqWyoxYMSPrDiIQ3RdIdKgo= github.com/aws/aws-sdk-go-v2/service/sts v1.38.2/go.mod h1:2dIN8qhQfv37BdUYGgEC8Q3tteM3zFxTI1MLO2O3J3c=
github.com/aws/smithy-go v1.22.5 h1:P9ATCXPMb2mPjYBgueqJNCA5S9UfktsW0tTxi+a7eqw= github.com/aws/smithy-go v1.23.0 h1:8n6I3gXzWJB2DxBDnfxgBaSX6oe0d/t10qGz7OKqMCE=
github.com/aws/smithy-go v1.22.5/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI= github.com/aws/smithy-go v1.23.0/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI=
github.com/bytedance/sonic v1.13.3 h1:MS8gmaH16Gtirygw7jV91pDCN33NyMrPbN7qiYhEsF0= github.com/bytedance/sonic v1.13.3 h1:MS8gmaH16Gtirygw7jV91pDCN33NyMrPbN7qiYhEsF0=
github.com/bytedance/sonic v1.13.3/go.mod h1:o68xyaF9u2gvVBuGHPlUVCy+ZfmNNO5ETf1+KgkJhz4= github.com/bytedance/sonic v1.13.3/go.mod h1:o68xyaF9u2gvVBuGHPlUVCy+ZfmNNO5ETf1+KgkJhz4=
github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU=
@ -363,8 +363,8 @@ github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+e
github.com/sashabaranov/go-openai v1.40.3 h1:PkOw0SK34wrvYVOuXF1HZzuTBRh992qRZHil4kG3eYE= github.com/sashabaranov/go-openai v1.40.3 h1:PkOw0SK34wrvYVOuXF1HZzuTBRh992qRZHil4kG3eYE=
github.com/sashabaranov/go-openai v1.40.3/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= github.com/sashabaranov/go-openai v1.40.3/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg=
github.com/scylladb/termtables v0.0.0-20191203121021-c4c0b6d42ff4/go.mod h1:C1a7PQSMz9NShzorzCiG2fk9+xuCgLkPeCvMHYR2OWg= github.com/scylladb/termtables v0.0.0-20191203121021-c4c0b6d42ff4/go.mod h1:C1a7PQSMz9NShzorzCiG2fk9+xuCgLkPeCvMHYR2OWg=
github.com/shirou/gopsutil/v4 v4.25.7 h1:bNb2JuqKuAu3tRlPv5piSmBZyMfecwQ+t/ILq+1JqVM= github.com/shirou/gopsutil/v4 v4.25.8 h1:NnAsw9lN7587WHxjJA9ryDnqhJpFH6A+wagYWTOH970=
github.com/shirou/gopsutil/v4 v4.25.7/go.mod h1:XV/egmwJtd3ZQjBpJVY5kndsiOO4IRqy9TQnmm6VP7U= github.com/shirou/gopsutil/v4 v4.25.8/go.mod h1:q9QdMmfAOVIw7a+eF86P7ISEU6ka+NLgkUxlopV4RwI=
github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k=
github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME=
github.com/shurcooL/gofontwoff v0.0.0-20181114050219-180f79e6909d h1:lvCTyBbr36+tqMccdGMwuEU+hjux/zL6xSmf5S9ITaA= github.com/shurcooL/gofontwoff v0.0.0-20181114050219-180f79e6909d h1:lvCTyBbr36+tqMccdGMwuEU+hjux/zL6xSmf5S9ITaA=
@ -372,8 +372,8 @@ github.com/shurcooL/gofontwoff v0.0.0-20181114050219-180f79e6909d/go.mod h1:05Ut
github.com/simplereach/timeutils v1.2.0/go.mod h1:VVbQDfN/FHRZa1LSqcwo4kNZ62OOyqLLGQKYB3pB0Q8= github.com/simplereach/timeutils v1.2.0/go.mod h1:VVbQDfN/FHRZa1LSqcwo4kNZ62OOyqLLGQKYB3pB0Q8=
github.com/siyuan-note/dataparser v0.0.0-20250804100744-b41253b236f3 h1:EH063L0HD1f82DvddurUmEXS0obXypv8pQrcaC/zNgI= github.com/siyuan-note/dataparser v0.0.0-20250804100744-b41253b236f3 h1:EH063L0HD1f82DvddurUmEXS0obXypv8pQrcaC/zNgI=
github.com/siyuan-note/dataparser v0.0.0-20250804100744-b41253b236f3/go.mod h1:8lb+SsWAPQblGbjmwEBsBdJszMCcLeECtB95fv6mReg= github.com/siyuan-note/dataparser v0.0.0-20250804100744-b41253b236f3/go.mod h1:8lb+SsWAPQblGbjmwEBsBdJszMCcLeECtB95fv6mReg=
github.com/siyuan-note/dejavu v0.0.0-20250823083709-147ab94b046a h1:VBsNIc1MGVvHbHl1NMe4RMg+VVyCC4qVYtjpP2cC9hQ= github.com/siyuan-note/dejavu v0.0.0-20250903140859-4d1e84e6dc9d h1:QRYzJHKG020eN1O8o8GxkxPQbJnA58y9OIfDoo2+KH0=
github.com/siyuan-note/dejavu v0.0.0-20250823083709-147ab94b046a/go.mod h1:9u6fFkH30VBjtozHDjNA/MZCULOuDtiPfGhV7DbYzww= github.com/siyuan-note/dejavu v0.0.0-20250903140859-4d1e84e6dc9d/go.mod h1:OEWx8aZaDWv8pIY3mCbVMoYzH7at/o2rXo5hCnt8gmQ=
github.com/siyuan-note/encryption v0.0.0-20250326023622-24a67e6956ec h1:D8Sjwa+7WxP3XrIBscT4PxBZZddZ83/O+5nX1sq6g6g= github.com/siyuan-note/encryption v0.0.0-20250326023622-24a67e6956ec h1:D8Sjwa+7WxP3XrIBscT4PxBZZddZ83/O+5nX1sq6g6g=
github.com/siyuan-note/encryption v0.0.0-20250326023622-24a67e6956ec/go.mod h1:6iAxXPOOAG3+M4bCiKQZTQ+n4gSUx/OyHhsP57dJlS8= github.com/siyuan-note/encryption v0.0.0-20250326023622-24a67e6956ec/go.mod h1:6iAxXPOOAG3+M4bCiKQZTQ+n4gSUx/OyHhsP57dJlS8=
github.com/siyuan-note/eventbus v0.0.0-20240627125516-396fdb0f0f97 h1:lM5v8BfNtbOL5jYwhCdMYBcYtr06IYBKjjSLAPMKTM8= github.com/siyuan-note/eventbus v0.0.0-20240627125516-396fdb0f0f97 h1:lM5v8BfNtbOL5jYwhCdMYBcYtr06IYBKjjSLAPMKTM8=
@ -402,8 +402,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
github.com/studio-b12/gowebdav v0.10.0 h1:Yewz8FFiadcGEu4hxS/AAJQlHelndqln1bns3hcJIYc= github.com/studio-b12/gowebdav v0.10.0 h1:Yewz8FFiadcGEu4hxS/AAJQlHelndqln1bns3hcJIYc=
github.com/studio-b12/gowebdav v0.10.0/go.mod h1:bHA7t77X/QFExdeAnDzK6vKM34kEZAcE1OX4MfiwjkE= github.com/studio-b12/gowebdav v0.10.0/go.mod h1:bHA7t77X/QFExdeAnDzK6vKM34kEZAcE1OX4MfiwjkE=
github.com/teambition/rrule-go v1.8.2 h1:lIjpjvWTj9fFUZCmuoVDrKVOtdiyzbzc93qTmRVe/J8= github.com/teambition/rrule-go v1.8.2 h1:lIjpjvWTj9fFUZCmuoVDrKVOtdiyzbzc93qTmRVe/J8=
@ -571,6 +571,6 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU=
gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU=
modernc.org/fileutil v1.0.0/go.mod h1:JHsWpkrk/CnVV1H/eGlFf85BEpfkrp56ro8nojIq9Q8= modernc.org/fileutil v1.0.0/go.mod h1:JHsWpkrk/CnVV1H/eGlFf85BEpfkrp56ro8nojIq9Q8=
modernc.org/fileutil v1.3.22 h1:2gf4hOBPsb2LBudv5wUzBAf6OlJEW3/rrhl9kTofh0Y= modernc.org/fileutil v1.3.29 h1:2HcUXxp2OuKCvHDGE/O92Tv3rX28fRRi9g+wVz4k5cA=
modernc.org/fileutil v1.3.22/go.mod h1:HxmghZSZVAz/LXcMNwZPA/DRrQZEVP9VX0V4LQGQFOc= modernc.org/fileutil v1.3.29/go.mod h1:HxmghZSZVAz/LXcMNwZPA/DRrQZEVP9VX0V4LQGQFOc=
nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50=

View file

@ -26,6 +26,7 @@ import (
"time" "time"
"github.com/88250/gulu" "github.com/88250/gulu"
"github.com/88250/lute/ast"
"github.com/siyuan-note/filelock" "github.com/siyuan-note/filelock"
"github.com/siyuan-note/httpclient" "github.com/siyuan-note/httpclient"
"github.com/siyuan-note/logging" "github.com/siyuan-note/logging"
@ -289,5 +290,5 @@ func FilterUploadFileName(name string) string {
} }
func AssetName(name string) string { func AssetName(name string) string {
return util.AssetName(name) return util.AssetName(name, ast.NewNodeID())
} }

View file

@ -201,7 +201,7 @@ func NetAssets2LocalAssets(rootID string, onlyImg bool, originalURL string) (err
name := filepath.Base(u) name := filepath.Base(u)
name = util.FilterUploadFileName(name) name = util.FilterUploadFileName(name)
name = "network-asset-" + name name = "network-asset-" + name
name = util.AssetName(name) name = util.AssetName(name, ast.NewNodeID())
writePath := filepath.Join(assetsDirPath, name) writePath := filepath.Join(assetsDirPath, name)
if err = filelock.Copy(u, writePath); err != nil { if err = filelock.Copy(u, writePath); err != nil {
logging.LogErrorf("copy [%s] to [%s] failed: %s", u, writePath, err) logging.LogErrorf("copy [%s] to [%s] failed: %s", u, writePath, err)
@ -303,7 +303,7 @@ func NetAssets2LocalAssets(rootID string, onlyImg bool, originalURL string) (err
name += ext name += ext
} }
} }
name = util.AssetName(name) name = util.AssetName(name, ast.NewNodeID())
name = "network-asset-" + name name = "network-asset-" + name
writePath := filepath.Join(assetsDirPath, name) writePath := filepath.Join(assetsDirPath, name)
if err = filelock.WriteFile(writePath, data); err != nil { if err = filelock.WriteFile(writePath, data); err != nil {
@ -737,7 +737,7 @@ func RenameAsset(oldPath, newName string) (newPath string, err error) {
return return
} }
newName = util.AssetName(newName + filepath.Ext(oldPath)) newName = util.AssetName(newName+filepath.Ext(oldPath), ast.NewNodeID())
parentDir := path.Dir(oldPath) parentDir := path.Dir(oldPath)
newPath = path.Join(parentDir, newName) newPath = path.Join(parentDir, newName)
oldAbsPath, getErr := GetAssetAbsPath(oldPath) oldAbsPath, getErr := GetAssetAbsPath(oldPath)

View file

@ -3755,10 +3755,7 @@ func sortAttributeViewRow(operation *Operation) (err error) {
targetGroupView.GroupItemIDs = util.InsertElem(targetGroupView.GroupItemIDs, previousIndex, itemID) targetGroupView.GroupItemIDs = util.InsertElem(targetGroupView.GroupItemIDs, previousIndex, itemID)
} }
if av.KeyTypeMSelect == groupKey.Type || av.KeyTypeRelation == groupKey.Type { regenAttrViewGroups(attrView)
// 跨多选分组时一个项目可能会同时存在于多个分组中,需要重新生成分组
regenAttrViewGroups(attrView)
}
} else { // 同分组内排序 } else { // 同分组内排序
for i, r := range groupView.GroupItemIDs { for i, r := range groupView.GroupItemIDs {
if r == operation.PreviousID { if r == operation.PreviousID {

View file

@ -28,6 +28,7 @@ import (
"sync" "sync"
"github.com/88250/gulu" "github.com/88250/gulu"
"github.com/88250/lute/ast"
"github.com/emersion/go-vcard" "github.com/emersion/go-vcard"
"github.com/emersion/go-webdav/carddav" "github.com/emersion/go-webdav/carddav"
"github.com/siyuan-note/logging" "github.com/siyuan-note/logging"
@ -640,7 +641,7 @@ func (b *AddressBook) load() error {
addressesWaitGroup.Add(1) addressesWaitGroup.Add(1)
go func() { go func() {
defer addressesWaitGroup.Done() defer addressesWaitGroup.Done()
filename_ := util.AssetName(filename) filename_ := util.AssetName(filename, ast.NewNodeID())
address := &AddressObject{ address := &AddressObject{
FilePath: path.Join(b.DirectoryPath, filename_), FilePath: path.Join(b.DirectoryPath, filename_),
BookPath: b.MetaData.Path, BookPath: b.MetaData.Path,

View file

@ -981,7 +981,7 @@ func ImportFromLocalPath(boxID, localPath string, toPath string) (err error) {
if "" == existName { if "" == existName {
name = filepath.Base(absolutePath) name = filepath.Base(absolutePath)
name = util.FilterUploadFileName(name) name = util.FilterUploadFileName(name)
name = util.AssetName(name) name = util.AssetName(name, ast.NewNodeID())
assetTargetPath := filepath.Join(assetDirPath, name) assetTargetPath := filepath.Join(assetDirPath, name)
if err = filelock.Copy(absolutePath, assetTargetPath); err != nil { if err = filelock.Copy(absolutePath, assetTargetPath); err != nil {
logging.LogErrorf("copy asset from [%s] to [%s] failed: %s", absolutePath, assetTargetPath, err) logging.LogErrorf("copy asset from [%s] to [%s] failed: %s", absolutePath, assetTargetPath, err)
@ -1104,7 +1104,7 @@ func ImportFromLocalPath(boxID, localPath string, toPath string) (err error) {
if "" == existName { if "" == existName {
name = filepath.Base(absolutePath) name = filepath.Base(absolutePath)
name = util.FilterUploadFileName(name) name = util.FilterUploadFileName(name)
name = util.AssetName(name) name = util.AssetName(name, ast.NewNodeID())
assetTargetPath := filepath.Join(assetDirPath, name) assetTargetPath := filepath.Join(assetDirPath, name)
if err = filelock.Copy(absolutePath, assetTargetPath); err != nil { if err = filelock.Copy(absolutePath, assetTargetPath); err != nil {
logging.LogErrorf("copy asset from [%s] to [%s] failed: %s", absolutePath, assetTargetPath, err) logging.LogErrorf("copy asset from [%s] to [%s] failed: %s", absolutePath, assetTargetPath, err)
@ -1249,7 +1249,7 @@ func processBase64Img(n *ast.Node, dest string, assetDirPath string) {
name = alt.TokensStr() + ext name = alt.TokensStr() + ext
} }
name = util.FilterUploadFileName(name) name = util.FilterUploadFileName(name)
name = util.AssetName(name) name = util.AssetName(name, ast.NewNodeID())
tmp := filepath.Join(base64TmpDir, name) tmp := filepath.Join(base64TmpDir, name)
tmpFile, openErr := os.OpenFile(tmp, os.O_RDWR|os.O_CREATE, 0644) tmpFile, openErr := os.OpenFile(tmp, os.O_RDWR|os.O_CREATE, 0644)

View file

@ -25,6 +25,7 @@ import (
"strings" "strings"
"github.com/88250/gulu" "github.com/88250/gulu"
"github.com/88250/lute/ast"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/siyuan-note/filelock" "github.com/siyuan-note/filelock"
"github.com/siyuan-note/logging" "github.com/siyuan-note/logging"
@ -93,7 +94,7 @@ func InsertLocalAssets(id string, assetAbsPaths []string, isUpload bool) (succMa
// 已经存在同样数据的资源文件的话不重复保存 // 已经存在同样数据的资源文件的话不重复保存
succMap[baseName] = existAsset.Path succMap[baseName] = existAsset.Path
} else { } else {
fName = util.AssetName(fName) fName = util.AssetName(fName, ast.NewNodeID())
writePath := filepath.Join(assetsDirPath, fName) writePath := filepath.Join(assetsDirPath, fName)
if _, err = f.Seek(0, io.SeekStart); err != nil { if _, err = f.Seek(0, io.SeekStart); err != nil {
f.Close() f.Close()
@ -163,6 +164,10 @@ func Upload(c *gin.Context) {
for _, file := range files { for _, file := range files {
baseName := file.Filename baseName := file.Filename
_, lastID := util.LastID(baseName)
if !ast.IsNodeIDPattern(lastID) {
lastID = ""
}
needUnzip2Dir := false needUnzip2Dir := false
if gulu.OS.IsDarwin() { if gulu.OS.IsDarwin() {
@ -198,7 +203,16 @@ func Upload(c *gin.Context) {
} else { } else {
if skipIfDuplicated { if skipIfDuplicated {
// 复制 PDF 矩形注解时不再重复插入图片 No longer upload image repeatedly when copying PDF rectangle annotation https://github.com/siyuan-note/siyuan/issues/10666 // 复制 PDF 矩形注解时不再重复插入图片 No longer upload image repeatedly when copying PDF rectangle annotation https://github.com/siyuan-note/siyuan/issues/10666
matches, globErr := filepath.Glob(assetsDirPath + string(os.PathSeparator) + strings.TrimSuffix(fName, ext) + "*" + ext) pattern := assetsDirPath + string(os.PathSeparator) + strings.TrimSuffix(fName, ext)
_, patternLastID := util.LastID(fName)
if lastID != "" && lastID != patternLastID {
// 文件名太长被截断了,通过之前的 lastID 来匹配 PDF files with too long file names cannot generate annotated images https://github.com/siyuan-note/siyuan/issues/15739
pattern = assetsDirPath + string(os.PathSeparator) + "*" + lastID + ext
} else {
pattern += "*" + ext
}
matches, globErr := filepath.Glob(pattern)
if nil != globErr { if nil != globErr {
logging.LogErrorf("glob failed: %s", globErr) logging.LogErrorf("glob failed: %s", globErr)
} else { } else {
@ -211,7 +225,10 @@ func Upload(c *gin.Context) {
} }
} }
fName = util.AssetName(fName) if "" == lastID {
lastID = ast.NewNodeID()
}
fName = util.AssetName(fName, lastID)
writePath := filepath.Join(assetsDirPath, fName) writePath := filepath.Join(assetsDirPath, fName)
tmpDir := filepath.Join(util.TempDir, "convert", "zip", gulu.Rand.String(7)) tmpDir := filepath.Join(util.TempDir, "convert", "zip", gulu.Rand.String(7))
if needUnzip2Dir { if needUnzip2Dir {
@ -248,7 +265,7 @@ func Upload(c *gin.Context) {
fName = strings.TrimSuffix(fName, ext) fName = strings.TrimSuffix(fName, ext)
ext = strings.ToLower(ext) ext = strings.ToLower(ext)
fName += ext fName += ext
fName = util.AssetName(fName) fName = util.AssetName(fName, ast.NewNodeID())
tmpDir2 := filepath.Join(util.TempDir, "convert", "zip", gulu.Rand.String(7)) tmpDir2 := filepath.Join(util.TempDir, "convert", "zip", gulu.Rand.String(7))
if err = gulu.Zip.Unzip(writePath, tmpDir2); err != nil { if err = gulu.Zip.Unzip(writePath, tmpDir2); err != nil {
errFiles = append(errFiles, fName) errFiles = append(errFiles, fName)

View file

@ -172,12 +172,12 @@ func Ext(name string) (ret string) {
return return
} }
func AssetName(name string) string { func AssetName(name, newID string) string {
_, id := LastID(name) _, id := LastID(name)
ext := Ext(name) ext := Ext(name)
name = name[0 : len(name)-len(ext)] name = name[0 : len(name)-len(ext)]
if !ast.IsNodeIDPattern(id) { if !ast.IsNodeIDPattern(id) {
id = ast.NewNodeID() id = newID
name = name + "-" + id + ext name = name + "-" + id + ext
} else { } else {
if !ast.IsNodeIDPattern(name) { if !ast.IsNodeIDPattern(name) {