diff --git a/src/main/java/cc/ryanc/halo/service/impl/AttachmentServiceImpl.java b/src/main/java/cc/ryanc/halo/service/impl/AttachmentServiceImpl.java index 899a549df1daec9c9b6628a4f4ef152731aac6bf..10c5a09249b4c214969afc3d0a77e4714d38c009 100644 --- a/src/main/java/cc/ryanc/halo/service/impl/AttachmentServiceImpl.java +++ b/src/main/java/cc/ryanc/halo/service/impl/AttachmentServiceImpl.java @@ -129,7 +129,7 @@ public class AttachmentServiceImpl implements AttachmentService { Map<String, String> resultMap; String attachLoc = HaloConst.OPTIONS.get(BlogPropertiesEnum.ATTACH_LOC.getProp()); if (StrUtil.isEmpty(attachLoc)) { - return null; + attachLoc = "server"; } switch (attachLoc) { case "server": diff --git a/src/main/resources/static/halo-backend/plugins/quicklink/quicklink.js b/src/main/resources/static/halo-backend/plugins/quicklink/quicklink.js deleted file mode 100644 index e8a7b4ea5b53ee629d6133d59c80baf82e9f7fc1..0000000000000000000000000000000000000000 --- a/src/main/resources/static/halo-backend/plugins/quicklink/quicklink.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):e.quicklink=n()}(this,function(){var e={};function n(e){return new Promise(function(n,t){var r=new XMLHttpRequest;r.open("GET",e,r.withCredentials=!0),r.onload=function(){200===r.status?n():t()},r.send()})}var t,r,i=(t="prefetch",((r=document.createElement("link")).relList||{}).supports&&r.relList.supports(t)?function(e){return new Promise(function(n,t){var r=document.createElement("link");r.rel="prefetch",r.href=e,r.onload=n,r.onerror=t,document.head.appendChild(r)})}:n);function o(t,r,o){if(!(e[t]||(o=navigator.connection)&&((o.effectiveType||"").includes("2g")||o.saveData)))return(r?function(e){return null==self.fetch?n(e):fetch(e,{credentials:"include"})}:i)(t).then(function(){e[t]=!0})}var u=u||function(e){var n=Date.now();return setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-n))}})},1)},c=new Set,f=new IntersectionObserver(function(e){e.forEach(function(e){if(e.isIntersecting){var n=e.target.href;c.has(n)&&a(n)}})});function a(e){c.delete(e),o(new URL(e,location.href).toString(),f.priority)}return function(e){e=Object.assign({timeout:2e3,priority:!1,timeoutFn:u,el:document},e),f.priority=e.priority;var n=e.origins||[location.hostname],t=e.ignores||[];e.timeoutFn(function(){e.urls?e.urls.forEach(a):Array.from(e.el.querySelectorAll("a"),function(e){f.observe(e),n.length&&!n.includes(e.hostname)||function e(n,t){return Array.isArray(t)?t.some(function(t){return e(n,t)}):(t.test||t).call(t,n.href,n)}(e,t)||c.add(e.href)})},{timeout:e.timeout})}}); diff --git a/src/main/resources/templates/admin/module/_footer.ftl b/src/main/resources/templates/admin/module/_footer.ftl index c3964802bccf166b8c524c9c28f8e246868be718..cd80670eecc872e40a3392dccfa6618593b67c55 100755 --- a/src/main/resources/templates/admin/module/_footer.ftl +++ b/src/main/resources/templates/admin/module/_footer.ftl @@ -1,5 +1,5 @@ <footer class="main-footer"> <#-- 铏界劧Halo浣跨敤浜嗗鏉剧殑GPL鍗忚锛屼絾寮€鍙戜笉鏄擄紝甯屾湜鎮ㄥ彲浠ヤ繚鐣欎竴涓嬬増鏉冨0鏄庛€傜瑪鑺瘇 --> - <div class="pull-right hidden-xs"><a target="_blank" href="https://github.com/ruibaby/halo/releases/tag/v0.1.1">0.1.1</a></div> + <div class="pull-right hidden-xs"><a target="_blank" href="https://github.com/ruibaby/halo/releases/tag/v0.2.0">0.2.0</a></div> Thanks for using <strong><a data-pjax="true" href="/admin/halo">Halo</a>.</strong> </footer> diff --git a/src/main/resources/templates/admin/module/_macro.ftl b/src/main/resources/templates/admin/module/_macro.ftl index 8cc8b892ff439ee59c81a125d02853ec4e8918f8..9b0a223fdafe3f3a8b2faf19190e9d44260e0377 100644 --- a/src/main/resources/templates/admin/module/_macro.ftl +++ b/src/main/resources/templates/admin/module/_macro.ftl @@ -49,7 +49,6 @@ <#if (options.blog_locale!'zh_CN') == 'zh_CN'> <script src="/static/halo-backend/plugins/fileinput/zh.min.js"></script> </#if> -<script src="/static/halo-backend/plugins/quicklink/quicklink.js"></script> <script src="/static/halo-backend/js/halo.min.js"></script> <@compress single_line=true> <script> @@ -58,7 +57,6 @@ <#if (options.admin_pjax!'true') == 'true'> $(document).pjax('a[data-pjax=true]', '.content-wrapper', {fragment: '.content-wrapper',timeout: 8000}); </#if> - quicklink(); var heading = "<@spring.message code='common.text.tips' />"; </script> </@compress>