mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
This commit is contained in:
parent
41e8fe8c03
commit
ffd94d6b51
9 changed files with 1124 additions and 825 deletions
|
|
@ -10,7 +10,7 @@ export const fillContent = (protyle:IProtyle, data:string, elements:Element[]) =
|
||||||
setLastNodeRange(getContenteditableElement(elements[elements.length - 1]), protyle.toolbar.range);
|
setLastNodeRange(getContenteditableElement(elements[elements.length - 1]), protyle.toolbar.range);
|
||||||
protyle.toolbar.range.collapse(true);
|
protyle.toolbar.range.collapse(true);
|
||||||
insertHTML(data, protyle, true, true);
|
insertHTML(data, protyle, true, true);
|
||||||
}
|
};
|
||||||
|
|
||||||
export const AIActions = (elements: Element[], protyle: IProtyle) => {
|
export const AIActions = (elements: Element[], protyle: IProtyle) => {
|
||||||
const ids: string[] = [];
|
const ids: string[] = [];
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,10 @@
|
||||||
<div id="loading" class="b3-dialog b3-dialog--open">
|
<div id="loading" class="b3-dialog b3-dialog--open">
|
||||||
<div class="b3-dialog__scrim" style="background-color: #212224"></div>
|
<div class="b3-dialog__scrim" style="background-color: #212224"></div>
|
||||||
<img style="position: absolute;width: 36vh;" src="../../icon.png">
|
<img style="position: absolute;width: 36vh;" src="../../icon.png">
|
||||||
<button onclick="window.location.reload()" id="loadingRefresh" style="display: none;position: absolute;bottom: 16px;background: transparent;border: 1px solid #4285f4;color: #4285f4;border-radius: 4px;line-height: 20px;padding: 4px 8px;">Click to Refresh<br>点 击 刷 新</button>
|
<button onclick="window.location.reload()" id="loadingRefresh"
|
||||||
|
style="display: none;position: absolute;bottom: 16px;background: transparent;border: 1px solid #4285f4;color: #4285f4;border-radius: 4px;line-height: 20px;padding: 4px 8px;">
|
||||||
|
Click to Refresh<br>点 击 刷 新
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div id="toolbar" class="toolbar fn__flex"></div>
|
<div id="toolbar" class="toolbar fn__flex"></div>
|
||||||
<div class="fn__flex-1 fn__flex">
|
<div class="fn__flex-1 fn__flex">
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ import {needSubscribe} from "../util/needSubscribe";
|
||||||
|
|
||||||
export const lockScreen = () => {
|
export const lockScreen = () => {
|
||||||
if (window.siyuan.config.readonly) {
|
if (window.siyuan.config.readonly) {
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
/// #if BROWSER
|
/// #if BROWSER
|
||||||
fetchPost("/api/system/logoutAuth", {}, () => {
|
fetchPost("/api/system/logoutAuth", {}, () => {
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ export const mermaidRender = (element: Element, cdn = Constants.PROTYLE_CDN) =>
|
||||||
if (mermaidElements.length === 0) {
|
if (mermaidElements.length === 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
addScript(`${cdn}/js/mermaid/mermaid.min.js?v=9.3.0`, "protyleMermaidScript").then(() => {
|
addScript(`${cdn}/js/mermaid/mermaid.min.js?v=9.4.3`, "protyleMermaidScript").then(() => {
|
||||||
const config: any = {
|
const config: any = {
|
||||||
securityLevel: "loose", // 升级后无 https://github.com/siyuan-note/siyuan/issues/3587,可使用该选项
|
securityLevel: "loose", // 升级后无 https://github.com/siyuan-note/siyuan/issues/3587,可使用该选项
|
||||||
altFontFamily: "sans-serif",
|
altFontFamily: "sans-serif",
|
||||||
|
|
|
||||||
1118
app/stage/protyle/js/mermaid/mermaid.min.js
vendored
1118
app/stage/protyle/js/mermaid/mermaid.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -4,7 +4,7 @@ const pkg = require("./package.json");
|
||||||
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
||||||
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
||||||
const {CleanWebpackPlugin} = require("clean-webpack-plugin");
|
const {CleanWebpackPlugin} = require("clean-webpack-plugin");
|
||||||
const { EsbuildPlugin } = require("esbuild-loader");
|
const {EsbuildPlugin} = require("esbuild-loader");
|
||||||
|
|
||||||
module.exports = (env, argv) => {
|
module.exports = (env, argv) => {
|
||||||
return {
|
return {
|
||||||
|
|
@ -13,7 +13,7 @@ module.exports = (env, argv) => {
|
||||||
devtool: argv.mode !== "production" ? "eval" : false,
|
devtool: argv.mode !== "production" ? "eval" : false,
|
||||||
target: "electron-renderer",
|
target: "electron-renderer",
|
||||||
output: {
|
output: {
|
||||||
publicPath: "",
|
publicPath: "auto",
|
||||||
filename: "[name].[chunkhash].js",
|
filename: "[name].[chunkhash].js",
|
||||||
path: path.resolve(__dirname, "stage/build/app"),
|
path: path.resolve(__dirname, "stage/build/app"),
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
||||||
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
||||||
const {CleanWebpackPlugin} = require("clean-webpack-plugin");
|
const {CleanWebpackPlugin} = require("clean-webpack-plugin");
|
||||||
// const BundleAnalyzerPlugin = require("webpack-bundle-analyzer").BundleAnalyzerPlugin;
|
// const BundleAnalyzerPlugin = require("webpack-bundle-analyzer").BundleAnalyzerPlugin;
|
||||||
const { EsbuildPlugin } = require("esbuild-loader");
|
const {EsbuildPlugin} = require("esbuild-loader");
|
||||||
|
|
||||||
module.exports = (env, argv) => {
|
module.exports = (env, argv) => {
|
||||||
return {
|
return {
|
||||||
|
|
@ -13,7 +13,7 @@ module.exports = (env, argv) => {
|
||||||
watch: argv.mode !== "production",
|
watch: argv.mode !== "production",
|
||||||
devtool: argv.mode !== "production" ? "eval" : false,
|
devtool: argv.mode !== "production" ? "eval" : false,
|
||||||
output: {
|
output: {
|
||||||
publicPath: "",
|
publicPath: "auto",
|
||||||
filename: "[name].[chunkhash].js",
|
filename: "[name].[chunkhash].js",
|
||||||
path: path.resolve(__dirname, "stage/build/desktop"),
|
path: path.resolve(__dirname, "stage/build/desktop"),
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ const pkg = require("./package.json");
|
||||||
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
||||||
const {CleanWebpackPlugin} = require("clean-webpack-plugin");
|
const {CleanWebpackPlugin} = require("clean-webpack-plugin");
|
||||||
// const BundleAnalyzerPlugin = require("webpack-bundle-analyzer").BundleAnalyzerPlugin;
|
// const BundleAnalyzerPlugin = require("webpack-bundle-analyzer").BundleAnalyzerPlugin;
|
||||||
const { EsbuildPlugin } = require("esbuild-loader");
|
const {EsbuildPlugin} = require("esbuild-loader");
|
||||||
|
|
||||||
module.exports = (env, argv) => {
|
module.exports = (env, argv) => {
|
||||||
return {
|
return {
|
||||||
|
|
@ -12,7 +12,7 @@ module.exports = (env, argv) => {
|
||||||
watch: argv.mode !== "production",
|
watch: argv.mode !== "production",
|
||||||
devtool: argv.mode !== "production" ? "eval" : false,
|
devtool: argv.mode !== "production" ? "eval" : false,
|
||||||
output: {
|
output: {
|
||||||
publicPath: "",
|
publicPath: "auto",
|
||||||
filename: "[name].js",
|
filename: "[name].js",
|
||||||
path: path.resolve(__dirname, "stage/build/export"),
|
path: path.resolve(__dirname, "stage/build/export"),
|
||||||
libraryTarget: "umd",
|
libraryTarget: "umd",
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
||||||
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
||||||
const {CleanWebpackPlugin} = require("clean-webpack-plugin");
|
const {CleanWebpackPlugin} = require("clean-webpack-plugin");
|
||||||
// const BundleAnalyzerPlugin = require("webpack-bundle-analyzer").BundleAnalyzerPlugin;
|
// const BundleAnalyzerPlugin = require("webpack-bundle-analyzer").BundleAnalyzerPlugin;
|
||||||
const { EsbuildPlugin } = require("esbuild-loader");
|
const {EsbuildPlugin} = require("esbuild-loader");
|
||||||
|
|
||||||
module.exports = (env, argv) => {
|
module.exports = (env, argv) => {
|
||||||
return {
|
return {
|
||||||
|
|
@ -13,7 +13,7 @@ module.exports = (env, argv) => {
|
||||||
watch: argv.mode !== "production",
|
watch: argv.mode !== "production",
|
||||||
devtool: argv.mode !== "production" ? "eval" : false,
|
devtool: argv.mode !== "production" ? "eval" : false,
|
||||||
output: {
|
output: {
|
||||||
publicPath: "",
|
publicPath: "auto",
|
||||||
filename: "[name].[chunkhash].js",
|
filename: "[name].[chunkhash].js",
|
||||||
path: path.resolve(__dirname, "stage/build/mobile"),
|
path: path.resolve(__dirname, "stage/build/mobile"),
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue