mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-19 21:48:06 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
e014b02478
23 changed files with 121 additions and 82 deletions
|
|
@ -17,7 +17,9 @@ import {
|
|||
progressBackgroundTask,
|
||||
progressLoading,
|
||||
progressStatus,
|
||||
reloadSync, setDefRefCount, setRefDynamicText,
|
||||
reloadSync,
|
||||
setDefRefCount,
|
||||
setRefDynamicText,
|
||||
setTitle,
|
||||
transactionError
|
||||
} from "./dialog/processSystem";
|
||||
|
|
@ -166,6 +168,7 @@ export class App {
|
|||
addScriptSync(`${Constants.PROTYLE_CDN}/js/lute/lute.min.js?v=${Constants.SIYUAN_VERSION}`, "protyleLuteScript");
|
||||
addScript(`${Constants.PROTYLE_CDN}/js/protyle-html.js?v=${Constants.SIYUAN_VERSION}`, "protyleWcHtmlScript");
|
||||
window.siyuan.config = response.data.conf;
|
||||
window.siyuan.isPublish = response.data.isPublish;
|
||||
await loadPlugins(this);
|
||||
getLocalStorage(() => {
|
||||
fetchGet(`/appearance/langs/${window.siyuan.config.appearance.lang}.json?v=${Constants.SIYUAN_VERSION}`, (lauguages: IObject) => {
|
||||
|
|
|
|||
|
|
@ -446,6 +446,9 @@ export const copySubMenu = (id: string, accelerator = true, focusElement?: Eleme
|
|||
};
|
||||
|
||||
export const exportMd = (id: string) => {
|
||||
if (window.siyuan.isPublish) {
|
||||
return;
|
||||
}
|
||||
return new MenuItem({
|
||||
id: "export",
|
||||
label: window.siyuan.languages.export,
|
||||
|
|
|
|||
|
|
@ -97,6 +97,7 @@ class App {
|
|||
addScriptSync(`${Constants.PROTYLE_CDN}/js/lute/lute.min.js?v=${Constants.SIYUAN_VERSION}`, "protyleLuteScript");
|
||||
addScript(`${Constants.PROTYLE_CDN}/js/protyle-html.js?v=${Constants.SIYUAN_VERSION}`, "protyleWcHtmlScript");
|
||||
window.siyuan.config = confResponse.data.conf;
|
||||
window.siyuan.isPublish = confResponse.data.isPublish;
|
||||
correctHotkey(siyuanApp);
|
||||
await loadPlugins(this);
|
||||
getLocalStorage(() => {
|
||||
|
|
|
|||
|
|
@ -204,7 +204,11 @@ ${unicode2Emoji(childItem.ial.icon, "b3-list-item__graphic", true)}
|
|||
listElement.scrollTop = 0;
|
||||
let countHTML = "";
|
||||
if (response) {
|
||||
countHTML = `<span class="fn__flex-center">${window.siyuan.languages.findInDoc.replace("${x}", response.data.matchedRootCount).replace("${y}", response.data.matchedBlockCount)}</span>
|
||||
let text = window.siyuan.languages.findInDoc.replace("${x}", response.data.matchedRootCount).replace("${y}", response.data.matchedBlockCount);
|
||||
if (response.data.docMode) {
|
||||
text = window.siyuan.languages.matchDoc.replace("${x}", response.data.matchedRootCount);
|
||||
}
|
||||
countHTML = `<span class="fn__flex-center">${text}</span>
|
||||
<span class="fn__flex-1"></span>
|
||||
<span class="fn__flex-center">${config.page}/${response.data.pageCount || 1}</span>`;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1367,8 +1367,12 @@ export const inputEvent = (element: Element, config: Config.IUILayoutTabSearchCo
|
|||
nextElement.setAttribute("disabled", "disabled");
|
||||
}
|
||||
onSearch(response.data.blocks, edit, element, config);
|
||||
let text = window.siyuan.languages.findInDoc.replace("${x}", response.data.matchedRootCount).replace("${y}", response.data.matchedBlockCount);
|
||||
if (response.data.docMode) {
|
||||
text = window.siyuan.languages.matchDoc.replace("${x}", response.data.matchedRootCount);
|
||||
}
|
||||
searchResultElement.innerHTML = `${config.page}/${response.data.pageCount || 1}<span class="fn__space"></span>
|
||||
<span class="ft__on-surface">${window.siyuan.languages.findInDoc.replace("${x}", response.data.matchedRootCount).replace("${y}", response.data.matchedBlockCount)}</span>`;
|
||||
<span class="ft__on-surface">${text}</span>`;
|
||||
loadingElement.classList.add("fn__none");
|
||||
searchResultElement.setAttribute("data-pagecount", response.data.pageCount || 1);
|
||||
});
|
||||
|
|
|
|||
6
app/src/types/index.d.ts
vendored
6
app/src/types/index.d.ts
vendored
|
|
@ -432,7 +432,11 @@ interface ISiyuan {
|
|||
bookmarkLabel?: string[]
|
||||
blockPanels: import("../block/Panel").BlockPanel[],
|
||||
dialogs: import("../dialog").Dialog[],
|
||||
viewer?: Viewer
|
||||
viewer?: Viewer,
|
||||
/**
|
||||
* 是否在发布服务下访问
|
||||
*/
|
||||
isPublish?: boolean;
|
||||
}
|
||||
|
||||
interface IOperation {
|
||||
|
|
|
|||
|
|
@ -9,9 +9,13 @@ import {fetchGet, fetchPost} from "../util/fetch";
|
|||
import {addBaseURL, setNoteBook} from "../util/pathName";
|
||||
import {openFileById} from "../editor/util";
|
||||
import {
|
||||
processSync, progressBackgroundTask,
|
||||
processSync,
|
||||
progressBackgroundTask,
|
||||
progressLoading,
|
||||
progressStatus, reloadSync, setDefRefCount, setRefDynamicText,
|
||||
progressStatus,
|
||||
reloadSync,
|
||||
setDefRefCount,
|
||||
setRefDynamicText,
|
||||
setTitle,
|
||||
transactionError
|
||||
} from "../dialog/processSystem";
|
||||
|
|
@ -151,6 +155,7 @@ class App {
|
|||
addScriptSync(`${Constants.PROTYLE_CDN}/js/lute/lute.min.js?v=${Constants.SIYUAN_VERSION}`, "protyleLuteScript");
|
||||
addScript(`${Constants.PROTYLE_CDN}/js/protyle-html.js?v=${Constants.SIYUAN_VERSION}`, "protyleWcHtmlScript");
|
||||
window.siyuan.config = response.data.conf;
|
||||
window.siyuan.isPublish = response.data.isPublish;
|
||||
await loadPlugins(this);
|
||||
getLocalStorage(() => {
|
||||
fetchGet(`/appearance/langs/${window.siyuan.config.appearance.lang}.json?v=${Constants.SIYUAN_VERSION}`, (lauguages: IObject) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue