Commit 77b70357 authored by Liyuan Li's avatar Liyuan Li

🎨 fix #95

parent c9a79c62
...@@ -1902,6 +1902,16 @@ ...@@ -1902,6 +1902,16 @@
"integrity": "sha1-WYr+VHVbKGilMw0q/51Ou1Mgm2U=", "integrity": "sha1-WYr+VHVbKGilMw0q/51Ou1Mgm2U=",
"dev": true "dev": true
}, },
"bindings": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
"dev": true,
"optional": true,
"requires": {
"file-uri-to-path": "1.0.0"
}
},
"block-stream": { "block-stream": {
"version": "0.0.9", "version": "0.0.9",
"resolved": "https://registry.npm.taobao.org/block-stream/download/block-stream-0.0.9.tgz", "resolved": "https://registry.npm.taobao.org/block-stream/download/block-stream-0.0.9.tgz",
...@@ -3631,6 +3641,13 @@ ...@@ -3631,6 +3641,13 @@
"schema-utils": "^2.5.0" "schema-utils": "^2.5.0"
} }
}, },
"file-uri-to-path": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
"dev": true,
"optional": true
},
"find-cache-dir": { "find-cache-dir": {
"version": "3.2.0", "version": "3.2.0",
"resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.2.0.tgz", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.2.0.tgz",
...@@ -3849,14 +3866,15 @@ ...@@ -3849,14 +3866,15 @@
"dev": true "dev": true
}, },
"fsevents": { "fsevents": {
"version": "1.2.9", "version": "1.2.12",
"resolved": "https://registry.npm.taobao.org/fsevents/download/fsevents-1.2.9.tgz", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.12.tgz",
"integrity": "sha1-P17WZYPM1vQAtaANtvfoYTY+OI8=", "integrity": "sha512-Ggd/Ktt7E7I8pxZRbGIs7vwqAPscSESMrCSkx2FtWeqmheJgCo2R74fTsZFCifr0VTPwqRpPv17+6b8Zp7th0Q==",
"dev": true, "dev": true,
"optional": true, "optional": true,
"requires": { "requires": {
"bindings": "^1.5.0",
"nan": "^2.12.1", "nan": "^2.12.1",
"node-pre-gyp": "^0.12.0" "node-pre-gyp": "*"
}, },
"dependencies": { "dependencies": {
"abbrev": { "abbrev": {
...@@ -3904,7 +3922,7 @@ ...@@ -3904,7 +3922,7 @@
} }
}, },
"chownr": { "chownr": {
"version": "1.1.1", "version": "1.1.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true "optional": true
...@@ -3934,7 +3952,7 @@ ...@@ -3934,7 +3952,7 @@
"optional": true "optional": true
}, },
"debug": { "debug": {
"version": "4.1.1", "version": "3.2.6",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true, "optional": true,
...@@ -3961,12 +3979,12 @@ ...@@ -3961,12 +3979,12 @@
"optional": true "optional": true
}, },
"fs-minipass": { "fs-minipass": {
"version": "1.2.5", "version": "1.2.7",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true, "optional": true,
"requires": { "requires": {
"minipass": "^2.2.1" "minipass": "^2.6.0"
} }
}, },
"fs.realpath": { "fs.realpath": {
...@@ -3992,7 +4010,7 @@ ...@@ -3992,7 +4010,7 @@
} }
}, },
"glob": { "glob": {
"version": "7.1.3", "version": "7.1.6",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true, "optional": true,
...@@ -4021,7 +4039,7 @@ ...@@ -4021,7 +4039,7 @@
} }
}, },
"ignore-walk": { "ignore-walk": {
"version": "3.0.1", "version": "3.0.3",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true, "optional": true,
...@@ -4040,7 +4058,7 @@ ...@@ -4040,7 +4058,7 @@
} }
}, },
"inherits": { "inherits": {
"version": "2.0.3", "version": "2.0.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true "optional": true
...@@ -4076,13 +4094,13 @@ ...@@ -4076,13 +4094,13 @@
} }
}, },
"minimist": { "minimist": {
"version": "0.0.8", "version": "1.2.5",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true "optional": true
}, },
"minipass": { "minipass": {
"version": "2.3.5", "version": "2.9.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true, "optional": true,
...@@ -4092,42 +4110,42 @@ ...@@ -4092,42 +4110,42 @@
} }
}, },
"minizlib": { "minizlib": {
"version": "1.2.1", "version": "1.3.3",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true, "optional": true,
"requires": { "requires": {
"minipass": "^2.2.1" "minipass": "^2.9.0"
} }
}, },
"mkdirp": { "mkdirp": {
"version": "0.5.1", "version": "0.5.3",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true, "optional": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "^1.2.5"
} }
}, },
"ms": { "ms": {
"version": "2.1.1", "version": "2.1.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true "optional": true
}, },
"needle": { "needle": {
"version": "2.3.0", "version": "2.3.3",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true, "optional": true,
"requires": { "requires": {
"debug": "^4.1.0", "debug": "^3.2.6",
"iconv-lite": "^0.4.4", "iconv-lite": "^0.4.4",
"sax": "^1.2.4" "sax": "^1.2.4"
} }
}, },
"node-pre-gyp": { "node-pre-gyp": {
"version": "0.12.0", "version": "0.14.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true, "optional": true,
...@@ -4141,11 +4159,11 @@ ...@@ -4141,11 +4159,11 @@
"rc": "^1.2.7", "rc": "^1.2.7",
"rimraf": "^2.6.1", "rimraf": "^2.6.1",
"semver": "^5.3.0", "semver": "^5.3.0",
"tar": "^4" "tar": "^4.4.2"
} }
}, },
"nopt": { "nopt": {
"version": "4.0.1", "version": "4.0.3",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true, "optional": true,
...@@ -4155,19 +4173,29 @@ ...@@ -4155,19 +4173,29 @@
} }
}, },
"npm-bundled": { "npm-bundled": {
"version": "1.0.6", "version": "1.1.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"npm-normalize-package-bin": "^1.0.1"
}
},
"npm-normalize-package-bin": {
"version": "1.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true "optional": true
}, },
"npm-packlist": { "npm-packlist": {
"version": "1.4.1", "version": "1.4.8",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true, "optional": true,
"requires": { "requires": {
"ignore-walk": "^3.0.1", "ignore-walk": "^3.0.1",
"npm-bundled": "^1.0.1" "npm-bundled": "^1.0.1",
"npm-normalize-package-bin": "^1.0.1"
} }
}, },
"npmlog": { "npmlog": {
...@@ -4232,7 +4260,7 @@ ...@@ -4232,7 +4260,7 @@
"optional": true "optional": true
}, },
"process-nextick-args": { "process-nextick-args": {
"version": "2.0.0", "version": "2.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true "optional": true
...@@ -4247,18 +4275,10 @@ ...@@ -4247,18 +4275,10 @@
"ini": "~1.3.0", "ini": "~1.3.0",
"minimist": "^1.2.0", "minimist": "^1.2.0",
"strip-json-comments": "~2.0.1" "strip-json-comments": "~2.0.1"
},
"dependencies": {
"minimist": {
"version": "1.2.0",
"bundled": true,
"dev": true,
"optional": true
}
} }
}, },
"readable-stream": { "readable-stream": {
"version": "2.3.6", "version": "2.3.7",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true, "optional": true,
...@@ -4273,7 +4293,7 @@ ...@@ -4273,7 +4293,7 @@
} }
}, },
"rimraf": { "rimraf": {
"version": "2.6.3", "version": "2.7.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true, "optional": true,
...@@ -4300,7 +4320,7 @@ ...@@ -4300,7 +4320,7 @@
"optional": true "optional": true
}, },
"semver": { "semver": {
"version": "5.7.0", "version": "5.7.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true "optional": true
...@@ -4353,18 +4373,18 @@ ...@@ -4353,18 +4373,18 @@
"optional": true "optional": true
}, },
"tar": { "tar": {
"version": "4.4.8", "version": "4.4.13",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true, "optional": true,
"requires": { "requires": {
"chownr": "^1.1.1", "chownr": "^1.1.1",
"fs-minipass": "^1.2.5", "fs-minipass": "^1.2.5",
"minipass": "^2.3.4", "minipass": "^2.8.6",
"minizlib": "^1.1.1", "minizlib": "^1.2.1",
"mkdirp": "^0.5.0", "mkdirp": "^0.5.0",
"safe-buffer": "^5.1.2", "safe-buffer": "^5.1.2",
"yallist": "^3.0.2" "yallist": "^3.0.3"
} }
}, },
"util-deprecate": { "util-deprecate": {
...@@ -4389,7 +4409,7 @@ ...@@ -4389,7 +4409,7 @@
"optional": true "optional": true
}, },
"yallist": { "yallist": {
"version": "3.0.3", "version": "3.1.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true "optional": true
...@@ -5709,20 +5729,12 @@ ...@@ -5709,20 +5729,12 @@
} }
}, },
"mkdirp": { "mkdirp": {
"version": "0.5.1", "version": "0.5.5",
"resolved": "https://registry.npm.taobao.org/mkdirp/download/mkdirp-0.5.1.tgz", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "^1.2.5"
},
"dependencies": {
"minimist": {
"version": "0.0.8",
"resolved": "https://registry.npm.taobao.org/minimist/download/minimist-0.0.8.tgz",
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
"dev": true
}
} }
}, },
"move-concurrently": { "move-concurrently": {
...@@ -8672,9 +8684,9 @@ ...@@ -8672,9 +8684,9 @@
} }
}, },
"vditor": { "vditor": {
"version": "3.0.11", "version": "3.0.12",
"resolved": "https://registry.npmjs.org/vditor/-/vditor-3.0.11.tgz", "resolved": "https://registry.npmjs.org/vditor/-/vditor-3.0.12.tgz",
"integrity": "sha512-3bvTScQ+Y/SErO1aw9K/+vhqwEAhr4Qxga6INDqvlDRDlHrK1BJUQao+Vm/bQunol4WOFXXBnjFzQjXpmzdXdw==", "integrity": "sha512-C/o5buMesljrbvqLg/dcwEv9VIrh+x19uxBEdipXXKzDXhrfAifoHeNbb76D0MEl33QSxqkFAcGjy4yFHZA4lw==",
"requires": { "requires": {
"diff-match-patch": "^1.0.4" "diff-match-patch": "^1.0.4"
} }
......
...@@ -55,6 +55,6 @@ ...@@ -55,6 +55,6 @@
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"uvstat": "^1.0.7", "uvstat": "^1.0.7",
"vcmt": "^1.1.4", "vcmt": "^1.1.4",
"vditor": "^3.0.11" "vditor": "^3.0.12"
} }
} }
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
--> -->
<#include "../common-template/label.ftl"/> <#include "../common-template/label.ftl"/>
<script type="text/javascript"> <script type="text/javascript">
Label.editorMode = '${editorMode}'
Label.setMobileLabel = '${setMobileLabel}' Label.setMobileLabel = '${setMobileLabel}'
Label.pushSuccLabel = '${pushSuccLabel}' Label.pushSuccLabel = '${pushSuccLabel}'
Label.pushToHacpaiLabel = '${pushToHacpaiLabel}' Label.pushToHacpaiLabel = '${pushToHacpaiLabel}'
......
...@@ -249,57 +249,54 @@ ...@@ -249,57 +249,54 @@
<div class="fn__clear"></div> <div class="fn__clear"></div>
</div> </div>
<div id="tabPreferencePanel_markdown" class="fn__none form"> <div id="tabPreferencePanel_markdown" class="fn__none form">
${editorModeLabel}
<label><input name="editorMode" type="radio" value="wysiwyg" checked>&nbsp;${editorModeWYSIWYGLabel} </label>
<label><input name="editorMode" type="radio" value="ir">&nbsp;${editorModeIRLabel} </label>
<label><input name="editorMode" type="radio" value="sv">&nbsp;${editorModeSVLabel} </label>
<#if !luteAvailable>
<div class="fn__clear">
${luteHTTPLabel}
</div>
</#if>
<button class="fn__right" onclick="admin.preference.update()">${updateLabel}</button> <button class="fn__right" onclick="admin.preference.update()">${updateLabel}</button>
<div class="fn__clear"></div>
<label>${editorModeLabel}</label>
<div class="fn__flex"> <div class="fn__flex">
<div class="fn__flex-1"> <label class="checkbox fn__flex-1">
<label> <input name="editorMode" type="radio" value="wysiwyg" checked>
<div class="fn__flex-inline"> <span>&nbsp;${editorModeWYSIWYGLabel}</span>
<input id="footnotes" type="checkbox" class="normalInput"/> </label>
&nbsp;${supportFootnotesLabel} <label class="checkbox fn__flex-1">
</div> <input name="editorMode" type="radio" value="ir">
</label> <span>&nbsp;${editorModeIRLabel}</span>
<label> </label>
<div class="fn__flex-inline"> <label class="checkbox fn__flex-1">
<input id="showToC" type="checkbox" class="normalInput"/> <input name="editorMode" type="radio" value="sv">
&nbsp;${supportToCLabel} <span>&nbsp;${editorModeSVLabel}</span>
</div> </label>
</label>
<label>
<div class="fn__flex-inline">
<input id="autoSpace" type="checkbox" class="normalInput"/>
&nbsp;${autoSpaceLabel}
</div>
</label>
<label>
<div class="fn__flex-inline">
<input id="fixTermTypo" type="checkbox" class="normalInput"/>
&nbsp;${fixTermTypoLabel}
</div>
</label>
<label>
<div class="fn__flex-inline">
<input id="chinesePunct" type="checkbox" class="normalInput"/>
&nbsp;${chinesePunctLabel}
</div>
</label>
<label>
<div class="fn__flex-inline">
<input id="inlineMathAllowDigitAfterOpenMarker" type="checkbox" class="normalInput"/>
&nbsp;${inlineMathAllowDigitAfterOpenMarkerLabel}
</div>
</label>
</div>
</div> </div>
<#if !luteAvailable>
<div class="fn__clear">
${luteHTTPLabel}
</div>
</#if>
<label class="checkbox">
<input id="footnotes" type="checkbox" class="normalInput"/>
<span>&nbsp;${supportFootnotesLabel}</span>
</label>
<label class="checkbox">
<input id="showToC" type="checkbox" class="normalInput"/>
<span>&nbsp;${supportToCLabel}</span>
</label>
<label class="checkbox">
<input id="autoSpace" type="checkbox" class="normalInput"/>
<span>&nbsp;${autoSpaceLabel}</span>
</label>
<label class="checkbox">
<input id="fixTermTypo" type="checkbox" class="normalInput"/>
<span>&nbsp;${fixTermTypoLabel}</span>
</label>
<label class="checkbox">
<input id="chinesePunct" type="checkbox" class="normalInput"/>
<span>&nbsp;${chinesePunctLabel}</span>
</label>
<label class="checkbox">
<input id="inlineMathAllowDigitAfterOpenMarker" type="checkbox" class="normalInput"/>
<span>&nbsp;${inlineMathAllowDigitAfterOpenMarkerLabel}</span>
</label>
<button class="fn__right" onclick="admin.preference.update()">${updateLabel}</button> <button class="fn__right" onclick="admin.preference.update()">${updateLabel}</button>
<div class="fn__clear"></div> <div class="fn__clear"></div>
</div> </div>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -63,6 +63,7 @@ $.extend(SoloEditor.prototype, { ...@@ -63,6 +63,7 @@ $.extend(SoloEditor.prototype, {
}) })
const options = { const options = {
mode: Label.editorMode,
typewriterMode: this.conf.typewriterMode, typewriterMode: this.conf.typewriterMode,
cache: { cache: {
enable: true, enable: true,
......
...@@ -307,7 +307,7 @@ window.Util = { ...@@ -307,7 +307,7 @@ window.Util = {
loadVditor: function (cb) { loadVditor: function (cb) {
$.ajax({ $.ajax({
method: 'GET', method: 'GET',
url: 'https://cdn.jsdelivr.net/npm/vditor@3.0.11/dist/index.min.js', url: 'https://cdn.jsdelivr.net/npm/vditor@3.0.12/dist/index.min.js',
dataType: 'script', dataType: 'script',
cache: true, cache: true,
success: () => { success: () => {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment