This commit is contained in:
Daniel 2025-03-25 23:57:12 +08:00
parent 69642e3bac
commit 3ebfdf6c5b
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
21 changed files with 77 additions and 72 deletions

View file

@ -11,7 +11,7 @@ import {isKernelInMobile} from "../util/functions";
const renderProvider = (provider: number) => {
if (provider === 0) {
if (needSubscribe("")) {
return `<div class="b3-label b3-label--inner">${window.siyuan.config.system.container === "ios" ? window.siyuan.languages._kernel[122] : window.siyuan.languages._kernel[29].replace("${url}", getCloudURL("subscribe/siyuan"))}</div>
return `<div class="b3-label b3-label--inner">${window.siyuan.config.system.container === "ios" ? window.siyuan.languages._kernel[122] : window.siyuan.languages._kernel[29].replaceAll("${accountServer}", getCloudURL(""))}</div>
<div class="b3-label b3-label--inner">
${window.siyuan.languages.cloudIntro1}
<div class="b3-label__text">
@ -41,7 +41,7 @@ const renderProvider = (provider: number) => {
</div>`;
}
if (!isPaidUser()) {
return `<div class="b3-label b3-label--inner">${window.siyuan.languages["_kernel"][214]}</div>`;
return `<div class="b3-label b3-label--inner">${window.siyuan.languages["_kernel"][214].replaceAll("${accountServer}", getCloudURL(""))}</div>`;
}
if (provider === 2) {
return `<div class="b3-label b3-label--inner">

View file

@ -33,6 +33,9 @@ export const setAccessAuthCode = () => {
export const getCloudURL = (key: string) => {
const origin = window.siyuan.config.cloudRegion === 0 ? "https://ld246.com" : "https://liuyun.io";
if (!key || "" === key) {
return origin;
}
return `${origin}/${key}`;
};

View file

@ -365,7 +365,7 @@ ${data.shorthandContent}
${window.siyuan.languages.inboxTip}
</li>
<li class="b3-list--empty">
${window.siyuan.config.system.container === "ios" ? window.siyuan.languages._kernel[122] : window.siyuan.languages._kernel[29].replace("${url}", getCloudURL("subscribe/siyuan"))}
${window.siyuan.config.system.container === "ios" ? window.siyuan.languages._kernel[122] : window.siyuan.languages._kernel[29].replaceAll("${accountServer}", getCloudURL(""))}
</li>
</ul>`;
loadingElement.classList.add("fn__none");

View file

@ -13,6 +13,7 @@ import {Dialog} from "../../dialog";
import {replaceLocalPath} from "../../editor/rename";
import {setStorageVal} from "../util/compatibility";
import {isPaidUser} from "../../util/needSubscribe";
import {getCloudURL} from "../../config/util/about";
export const saveExport = (option: IExportOptions) => {
/// #if !BROWSER
@ -258,7 +259,7 @@ const renderPDF = async (id: string) => {
</div>
<span class="fn__hr"></span>
<input id="watermark" class="b3-switch" type="checkbox" ${localData.watermark ? "checked" : ""}>
<div style="display:none;font-size: 12px;margin-top: 12px;color: var(--b3-theme-on-surface);">${window.siyuan.languages._kernel[214]}</div>
<div style="display:none;font-size: 12px;margin-top: 12px;color: var(--b3-theme-on-surface);">${window.siyuan.languages._kernel[214].replaceAll("${accountServer}", getCloudURL(""))}</div>
</label>
</div>
<div class="fn__flex" style="padding: 0 16px">

View file

@ -13,6 +13,7 @@ import {processRender} from "../util/processCode";
import {isIPhone, isSafari, openByMobile, setStorageVal} from "../util/compatibility";
import {showFileInFolder} from "../../util/pathName";
import {isPaidUser} from "../../util/needSubscribe";
import {getCloudURL} from "../../config/util/about";
export const afterExport = (exportPath: string, msgId: string) => {
/// #if !BROWSER
@ -105,7 +106,7 @@ export const exportImage = (id: string) => {
window.siyuan.storage[Constants.LOCAL_EXPORTIMG].watermark = watermarkElement.checked;
if (watermarkElement.checked && !isPaidUser()) {
watermarkElement.checked = false;
showMessage(window.siyuan.languages._kernel[214]);
showMessage(window.siyuan.languages._kernel[214].replaceAll("${accountServer}", getCloudURL("")));
}
updateWatermark();
});

View file

@ -11,6 +11,7 @@ import {addClearButton} from "../util/addClearButton";
import {isPaidUser} from "../util/needSubscribe";
import {showMessage} from "../dialog/message";
import {saveAssetKeyList} from "./toggleHistory";
import {getCloudURL} from "../config/util/about";
export const openSearchAsset = (element: HTMLElement, isStick: boolean) => {
/// #if !MOBILE
@ -170,7 +171,7 @@ export const assetInputEvent = (element: Element, localSearch?: ISearchAssetOpti
element.querySelector(".search__drag")?.classList.add("fn__none");
element.querySelector("#searchAssetPreview").classList.add("fn__none");
element.querySelector("#searchAssetList").innerHTML = `<div class="search__empty">
${window.siyuan.languages["_kernel"][214]}
${window.siyuan.languages["_kernel"][214].replaceAll("${accountServer}", getCloudURL(""))}
</div>`;
return;
}
@ -450,7 +451,7 @@ export const assetMoreMenu = (target: Element, element: Element, cb: () => void)
label: window.siyuan.languages.rebuildIndex,
click() {
if (!isPaidUser()) {
showMessage(window.siyuan.languages["_kernel"][214]);
showMessage(window.siyuan.languages["_kernel"][214].replaceAll("${accountServer}", getCloudURL("")));
return;
}
element.parentElement.querySelector(".fn__loading--top").classList.remove("fn__none");

View file

@ -10,6 +10,7 @@ import {openSetting} from "../config";
/// #endif
import {App} from "../index";
import {Constants} from "../constants";
import {getCloudURL} from "../config/util/about";
export const addCloudName = (cloudPanelElement: Element) => {
const dialog = new Dialog({
@ -153,7 +154,7 @@ export const syncGuide = (app?: App) => {
return;
}
} else if (!isPaidUser()) {
showMessage(window.siyuan.languages["_kernel"][214]);
showMessage(window.siyuan.languages["_kernel"][214].replaceAll("${accountServer}", getCloudURL("")));
return;
}
/// #else
@ -171,7 +172,7 @@ export const syncGuide = (app?: App) => {
return;
}
if (0 !== window.siyuan.config.sync.provider && !isPaidUser() && app) {
showMessage(window.siyuan.languages["_kernel"][214]);
showMessage(window.siyuan.languages["_kernel"][214].replaceAll("${accountServer}", getCloudURL("")));
return;
}
/// #endif

View file

@ -10,7 +10,7 @@ export const needSubscribe = (tip = window.siyuan.languages._kernel[29]) => {
showMessage(window.siyuan.languages._kernel[122]);
} else {
if (tip === window.siyuan.languages._kernel[29]) {
tip = window.siyuan.languages._kernel[29].replace("${url}", getCloudURL("subscribe/siyuan"));
tip = window.siyuan.languages._kernel[29].replaceAll("${accountServer}", getCloudURL(""));
}
showMessage(tip);
}