feat: make $:/core/save/all the default behavior (no lazy loading) and add tooltip for it

fixes #569
This commit is contained in:
lin onetwo 2024-06-29 18:58:03 +08:00
parent 0ea4246a55
commit e241ff3693
5 changed files with 13 additions and 2 deletions

View file

@ -179,6 +179,11 @@
"BackupOnIntervalDescription": "When enabled, data will be automatically backed up with local Git at regular intervals (interval in global settings), so that even if no cloud git synchronization address is configured, it will be automatically backed up locally.",
"WikiRootTiddler": "Wiki Root Tiddler",
"WikiRootTiddlerDescription": "Wiki's root tiddler determines the core behavior of the system, please read the official documentation to understand before modifying",
"WikiRootTiddlerItems": {
"all": "Load all at once",
"lazy-images": "Load images on demand",
"lazy-all": "Load images and text on demand"
},
"ReadOnlyModeDescription": "Can be used with intranet penetration, allowing TidGi work as a server program to deploy blogs. After opening, wiki can only be modified by directly modifying the file on the disk (including using git synchronization). The content cannot be modified on the web page, but anyone can access it.",
"ReadOnlyMode": "ReadOnly Mode",
"TokenAuth": "Token Authenticate",

View file

@ -213,6 +213,11 @@
"NameDescription": "工作区的名字将显示在侧边栏上可以与工作区Git仓库的实际文件夹名不同",
"WikiRootTiddler": "知识库根条目",
"WikiRootTiddlerDescription": "Wiki 的根条目root-tiddler决定了系统的核心行为修改前请阅读官方文档来了解",
"WikiRootTiddlerItems": {
"all": "全量加载",
"lazy-images": "按需加载图片",
"lazy-all": "按需加载图片和文本"
},
"ReadOnlyMode": "只读模式",
"ReadOnlyModeDescription": "可用于配合内网穿透让太记作为服务器程序部署博客。打开后将只能通过直接改文件的方式修改知识库内容包括git同步网页上将不能修改内容但任何人都可以访问。",
"TokenAuth": "凭证鉴权",

View file

@ -1 +1 @@
export const rootTiddlers = ['$:/core/save/lazy-images', '$:/core/save/all', '$:/core/save/lazy-all'];
export const rootTiddlers = ['$:/core/save/all', '$:/core/save/lazy-images', '$:/core/save/lazy-all'];

View file

@ -342,6 +342,7 @@ export function ServerOptions(props: IServerOptionsProps) {
renderInput={(parameters: AutocompleteRenderInputParams) => (
<TextField {...parameters} label={t('EditWorkspace.WikiRootTiddler')} helperText={t('EditWorkspace.WikiRootTiddlerDescription')} />
)}
renderOption={(props, option) => <li {...props}>{t(`EditWorkspace.WikiRootTiddlerItems.${option.replace('$:/core/save/', '')}`)} ({option})</li>}
/>
</AccordionDetails>
</AServerOptionsAccordion>

View file

@ -23,7 +23,7 @@ export function startNodeJSWiki({
isDev,
openDebugger,
readOnlyMode,
rootTiddler = '$:/core/save/lazy-images',
rootTiddler = '$:/core/save/all',
tiddlyWikiHost = defaultServerIP,
tiddlyWikiPort = 5112,
tokenAuth,