🎨 The Publishing service no longer support export https://github.com/siyuan-note/siyuan/issues/12928

This commit is contained in:
Daniel 2024-10-27 12:07:32 +08:00
parent 4e407b0ef8
commit 4a33fa9a29
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
7 changed files with 51 additions and 33 deletions

View file

@ -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) => {

View file

@ -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,

View file

@ -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(() => {

View file

@ -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 {

View file

@ -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) => {