mirror of https://github.com/halo-dev/halo
Refactor options form.
parent
3918285d38
commit
da4d508f3c
|
@ -0,0 +1,41 @@
|
||||||
|
package run.halo.app.model.properties;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Api properties.
|
||||||
|
*
|
||||||
|
* @author ryanwang
|
||||||
|
* @date 2019-06-25
|
||||||
|
*/
|
||||||
|
public enum ApiProperties implements PropertyEnum {
|
||||||
|
|
||||||
|
API_ENABLED("api_enabled", Boolean.class, "false"),
|
||||||
|
|
||||||
|
API_ACCESS_KEY("api_access_key", String.class, "");
|
||||||
|
|
||||||
|
private final String value;
|
||||||
|
|
||||||
|
private final Class<?> type;
|
||||||
|
|
||||||
|
private final String defaultValue;
|
||||||
|
|
||||||
|
ApiProperties(String value, Class<?> type, String defaultValue) {
|
||||||
|
this.value = value;
|
||||||
|
this.type = type;
|
||||||
|
this.defaultValue = defaultValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class<?> getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String defaultValue() {
|
||||||
|
return defaultValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,22 +4,14 @@ package run.halo.app.model.properties;
|
||||||
* Other properties.
|
* Other properties.
|
||||||
*
|
*
|
||||||
* @author johnniang
|
* @author johnniang
|
||||||
|
* @author ryanwang
|
||||||
* @date 4/1/19
|
* @date 4/1/19
|
||||||
*/
|
*/
|
||||||
public enum OtherProperties implements PropertyEnum {
|
public enum OtherProperties implements PropertyEnum {
|
||||||
|
|
||||||
API_ENABLED("api_enabled", Boolean.class, "false"),
|
|
||||||
|
|
||||||
API_ACCESS_KEY("api_access_key", String.class, ""),
|
|
||||||
|
|
||||||
CUSTOM_HEAD("blog_custom_head",String.class,""),
|
CUSTOM_HEAD("blog_custom_head",String.class,""),
|
||||||
|
|
||||||
STATISTICS_CODE("blog_statistics_code", String.class, ""),
|
STATISTICS_CODE("blog_statistics_code", String.class, "");
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否禁止爬虫
|
|
||||||
*/
|
|
||||||
SPIDER_DISABLED("spider_disabled", Boolean.class, "false");
|
|
||||||
|
|
||||||
private final String value;
|
private final String value;
|
||||||
|
|
||||||
|
|
|
@ -154,6 +154,7 @@ public interface PropertyEnum extends ValueEnum<String> {
|
||||||
propertyEnumClasses.add(QnYunProperties.class);
|
propertyEnumClasses.add(QnYunProperties.class);
|
||||||
propertyEnumClasses.add(SeoProperties.class);
|
propertyEnumClasses.add(SeoProperties.class);
|
||||||
propertyEnumClasses.add(UpYunProperties.class);
|
propertyEnumClasses.add(UpYunProperties.class);
|
||||||
|
propertyEnumClasses.add(ApiProperties.class);
|
||||||
|
|
||||||
Map<String, PropertyEnum> result = new HashMap<>();
|
Map<String, PropertyEnum> result = new HashMap<>();
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ package run.halo.app.model.properties;
|
||||||
* SEO properties.
|
* SEO properties.
|
||||||
*
|
*
|
||||||
* @author johnniang
|
* @author johnniang
|
||||||
|
* @author ryanwang
|
||||||
* @date 4/1/19
|
* @date 4/1/19
|
||||||
*/
|
*/
|
||||||
public enum SeoProperties implements PropertyEnum {
|
public enum SeoProperties implements PropertyEnum {
|
||||||
|
@ -14,13 +15,10 @@ public enum SeoProperties implements PropertyEnum {
|
||||||
|
|
||||||
BAIDU_TOKEN("seo_baidu_token", String.class, ""),
|
BAIDU_TOKEN("seo_baidu_token", String.class, ""),
|
||||||
|
|
||||||
VERIFICATION_BAIDU("seo_verification_baidu", String.class, ""),
|
/**
|
||||||
|
* 是否禁止爬虫
|
||||||
VERIFICATION_GOOGLE("seo_verification_google", String.class, ""),
|
*/
|
||||||
|
SPIDER_DISABLED("seo_spider_disabled", Boolean.class, "false");
|
||||||
VERIFICATION_BING("seo_verification_bing", String.class, ""),
|
|
||||||
|
|
||||||
VERIFICATION_QIHU("seo_verification_qihu", String.class, "");
|
|
||||||
|
|
||||||
private final String value;
|
private final String value;
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,8 @@ import org.springframework.util.Assert;
|
||||||
import run.halo.app.config.properties.HaloProperties;
|
import run.halo.app.config.properties.HaloProperties;
|
||||||
import run.halo.app.exception.AuthenticationException;
|
import run.halo.app.exception.AuthenticationException;
|
||||||
import run.halo.app.exception.ForbiddenException;
|
import run.halo.app.exception.ForbiddenException;
|
||||||
|
import run.halo.app.model.properties.ApiProperties;
|
||||||
import run.halo.app.model.properties.CommentProperties;
|
import run.halo.app.model.properties.CommentProperties;
|
||||||
import run.halo.app.model.properties.OtherProperties;
|
|
||||||
import run.halo.app.service.OptionService;
|
import run.halo.app.service.OptionService;
|
||||||
|
|
||||||
import javax.servlet.FilterChain;
|
import javax.servlet.FilterChain;
|
||||||
|
@ -48,7 +48,7 @@ public class ApiAuthenticationFilter extends AbstractAuthenticationFilter {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get api_enable from option
|
// Get api_enable from option
|
||||||
Boolean apiEnabled = optionService.getByPropertyOrDefault(OtherProperties.API_ENABLED, Boolean.class, false);
|
Boolean apiEnabled = optionService.getByPropertyOrDefault(ApiProperties.API_ENABLED, Boolean.class, false);
|
||||||
|
|
||||||
if (!apiEnabled) {
|
if (!apiEnabled) {
|
||||||
getFailureHandler().onFailure(request, response, new ForbiddenException("API has been disabled by blogger currently"));
|
getFailureHandler().onFailure(request, response, new ForbiddenException("API has been disabled by blogger currently"));
|
||||||
|
@ -65,7 +65,7 @@ public class ApiAuthenticationFilter extends AbstractAuthenticationFilter {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get access key from option
|
// Get access key from option
|
||||||
Optional<String> optionalAccessKey = optionService.getByProperty(OtherProperties.API_ACCESS_KEY, String.class);
|
Optional<String> optionalAccessKey = optionService.getByProperty(ApiProperties.API_ACCESS_KEY, String.class);
|
||||||
|
|
||||||
if (!optionalAccessKey.isPresent()) {
|
if (!optionalAccessKey.isPresent()) {
|
||||||
// If the access key is not set
|
// If the access key is not set
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
.attach-detail-img img{width:100%}.attach-item{width:50%;margin:0 auto;position:relative;padding-bottom:28%;overflow:hidden;float:left;cursor:pointer}.attach-item img{width:100%;height:100%;position:absolute;top:0;left:0}@-webkit-keyframes scaleDraw-data-v-0ce6900e{0%{-webkit-transform:scale(1);transform:scale(1)}25%{-webkit-transform:scale(1.3);transform:scale(1.3)}50%{-webkit-transform:scale(1);transform:scale(1)}75%{-webkit-transform:scale(1.3);transform:scale(1.3)}}@keyframes scaleDraw-data-v-0ce6900e{0%{-webkit-transform:scale(1);transform:scale(1)}25%{-webkit-transform:scale(1.3);transform:scale(1.3)}50%{-webkit-transform:scale(1);transform:scale(1)}75%{-webkit-transform:scale(1.3);transform:scale(1.3)}}.upload-button[data-v-0ce6900e]{-webkit-animation:scaleDraw-data-v-0ce6900e 4s ease-in-out infinite;position:fixed;bottom:30px;right:30px}.theme-thumb[data-v-0ce6900e]{width:100%;margin:0 auto;position:relative;padding-bottom:56%;overflow:hidden}.theme-thumb img[data-v-0ce6900e]{width:100%;height:100%;position:absolute;top:0;left:0}
|
.attach-detail-img img{width:100%}.attach-item{width:50%;margin:0 auto;position:relative;padding-bottom:28%;overflow:hidden;float:left;cursor:pointer}.attach-item img{width:100%;height:100%;position:absolute;top:0;left:0}@-webkit-keyframes scaleDraw-data-v-d8dae54c{0%{-webkit-transform:scale(1);transform:scale(1)}25%{-webkit-transform:scale(1.3);transform:scale(1.3)}50%{-webkit-transform:scale(1);transform:scale(1)}75%{-webkit-transform:scale(1.3);transform:scale(1.3)}}@keyframes scaleDraw-data-v-d8dae54c{0%{-webkit-transform:scale(1);transform:scale(1)}25%{-webkit-transform:scale(1.3);transform:scale(1.3)}50%{-webkit-transform:scale(1);transform:scale(1)}75%{-webkit-transform:scale(1.3);transform:scale(1.3)}}.upload-button[data-v-d8dae54c]{-webkit-animation:scaleDraw-data-v-d8dae54c 4s ease-in-out infinite;position:fixed;bottom:30px;right:30px}.theme-thumb[data-v-d8dae54c]{width:100%;margin:0 auto;position:relative;padding-bottom:56%;overflow:hidden}.theme-thumb img[data-v-d8dae54c]{width:100%;height:100%;position:absolute;top:0;left:0}
|
|
@ -1 +1 @@
|
||||||
<!DOCTYPE html><html lang=zh-cmn-Hans><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><meta name=robots content=noindex,nofllow><meta name=generator content=Halo><link rel=icon href=/logo.png><title>Halo Dashboard</title><link href=/css/chunk-0337f7a6.4c6b622f.css rel=prefetch><link href=/css/chunk-1079f749.94b473ad.css rel=prefetch><link href=/css/chunk-14e0b302.32f796a8.css rel=prefetch><link href=/css/chunk-161dc990.5ac5144c.css rel=prefetch><link href=/css/chunk-1be69b35.43c1fc12.css rel=prefetch><link href=/css/chunk-31c8ea42.4a090118.css rel=prefetch><link href=/css/chunk-5000e55c.7fb9bc61.css rel=prefetch><link href=/css/chunk-6d8b31f6.ad8d17b2.css rel=prefetch><link href=/css/chunk-81d936d8.05888d95.css rel=prefetch><link href=/css/chunk-b2d0b040.389eca76.css rel=prefetch><link href=/css/chunk-bb4f0d4a.c1990d7c.css rel=prefetch><link href=/css/chunk-bfd5bbcc.6a83ae7d.css rel=prefetch><link href=/css/chunk-c0a1d3c4.09186be6.css rel=prefetch><link href=/css/chunk-cec31564.6f053d75.css rel=prefetch><link href=/css/fail.809a6bc5.css rel=prefetch><link href=/js/chunk-0337f7a6.11326d77.js rel=prefetch><link href=/js/chunk-0ba750a2.b786c9db.js rel=prefetch><link href=/js/chunk-1079f749.ec67c7db.js rel=prefetch><link href=/js/chunk-142c8832.0f8270b3.js rel=prefetch><link href=/js/chunk-14e0b302.a86d1254.js rel=prefetch><link href=/js/chunk-161dc990.5de9313f.js rel=prefetch><link href=/js/chunk-1be69b35.81559bfc.js rel=prefetch><link href=/js/chunk-2d0b64bf.61d5d7c3.js rel=prefetch><link href=/js/chunk-2d0d65a2.2249765a.js rel=prefetch><link href=/js/chunk-2d21a35c.eda7a11a.js rel=prefetch><link href=/js/chunk-2d228d13.85b46532.js rel=prefetch><link href=/js/chunk-31c8ea42.0b2feab9.js rel=prefetch><link href=/js/chunk-5000e55c.3bd9ce3a.js rel=prefetch><link href=/js/chunk-5bf599cc.6555f060.js rel=prefetch><link href=/js/chunk-6d8b31f6.b64e5366.js rel=prefetch><link href=/js/chunk-81d936d8.8bec77ac.js rel=prefetch><link href=/js/chunk-87e2df70.0ada7d4e.js rel=prefetch><link href=/js/chunk-b2d0b040.b0d70d07.js rel=prefetch><link href=/js/chunk-bb4f0d4a.ef7d1ded.js rel=prefetch><link href=/js/chunk-bfd5bbcc.d2ca1e80.js rel=prefetch><link href=/js/chunk-c0a1d3c4.41d0d3f8.js rel=prefetch><link href=/js/chunk-cec31564.cfe3fd85.js rel=prefetch><link href=/js/fail.61f30b0f.js rel=prefetch><link href=/css/app.852293da.css rel=preload as=style><link href=/css/chunk-vendors.ee4e8dbf.css rel=preload as=style><link href=/js/app.29b04043.js rel=preload as=script><link href=/js/chunk-vendors.2f7bce79.js rel=preload as=script><link href=/css/chunk-vendors.ee4e8dbf.css rel=stylesheet><link href=/css/app.852293da.css rel=stylesheet></head><body><noscript><strong>We're sorry but vue-antd-pro doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.2f7bce79.js></script><script src=/js/app.29b04043.js></script></body></html>
|
<!DOCTYPE html><html lang=zh-cmn-Hans><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><meta name=robots content=noindex,nofllow><meta name=generator content=Halo><link rel=icon href=/logo.png><title>Halo Dashboard</title><link href=/css/chunk-0337f7a6.4c6b622f.css rel=prefetch><link href=/css/chunk-14e0b302.32f796a8.css rel=prefetch><link href=/css/chunk-161dc990.5ac5144c.css rel=prefetch><link href=/css/chunk-1be69b35.43c1fc12.css rel=prefetch><link href=/css/chunk-31c8ea42.4a090118.css rel=prefetch><link href=/css/chunk-434a7762.ba0136c1.css rel=prefetch><link href=/css/chunk-5000e55c.7fb9bc61.css rel=prefetch><link href=/css/chunk-6d8b31f6.ad8d17b2.css rel=prefetch><link href=/css/chunk-81d936d8.05888d95.css rel=prefetch><link href=/css/chunk-b2d0b040.389eca76.css rel=prefetch><link href=/css/chunk-bb4f0d4a.c1990d7c.css rel=prefetch><link href=/css/chunk-bfd5bbcc.6a83ae7d.css rel=prefetch><link href=/css/chunk-c0a1d3c4.09186be6.css rel=prefetch><link href=/css/chunk-cec31564.6f053d75.css rel=prefetch><link href=/css/fail.809a6bc5.css rel=prefetch><link href=/js/chunk-0337f7a6.11326d77.js rel=prefetch><link href=/js/chunk-0ba750a2.b786c9db.js rel=prefetch><link href=/js/chunk-142c8832.0f8270b3.js rel=prefetch><link href=/js/chunk-14e0b302.a86d1254.js rel=prefetch><link href=/js/chunk-161dc990.5de9313f.js rel=prefetch><link href=/js/chunk-1be69b35.09ed87f0.js rel=prefetch><link href=/js/chunk-2d0b64bf.61d5d7c3.js rel=prefetch><link href=/js/chunk-2d0d65a2.2249765a.js rel=prefetch><link href=/js/chunk-2d21a35c.eda7a11a.js rel=prefetch><link href=/js/chunk-2d228d13.85b46532.js rel=prefetch><link href=/js/chunk-31c8ea42.0b2feab9.js rel=prefetch><link href=/js/chunk-434a7762.7b32a373.js rel=prefetch><link href=/js/chunk-5000e55c.47b4c73b.js rel=prefetch><link href=/js/chunk-5bf599cc.6555f060.js rel=prefetch><link href=/js/chunk-6d8b31f6.b64e5366.js rel=prefetch><link href=/js/chunk-81d936d8.8bec77ac.js rel=prefetch><link href=/js/chunk-87e2df70.0ada7d4e.js rel=prefetch><link href=/js/chunk-b2d0b040.b0d70d07.js rel=prefetch><link href=/js/chunk-bb4f0d4a.8511af49.js rel=prefetch><link href=/js/chunk-bfd5bbcc.d2ca1e80.js rel=prefetch><link href=/js/chunk-c0a1d3c4.60b68f50.js rel=prefetch><link href=/js/chunk-cec31564.cfe3fd85.js rel=prefetch><link href=/js/fail.61f30b0f.js rel=prefetch><link href=/css/app.852293da.css rel=preload as=style><link href=/css/chunk-vendors.ee4e8dbf.css rel=preload as=style><link href=/js/app.a9634e28.js rel=preload as=script><link href=/js/chunk-vendors.2f7bce79.js rel=preload as=script><link href=/css/chunk-vendors.ee4e8dbf.css rel=stylesheet><link href=/css/app.852293da.css rel=stylesheet></head><body><noscript><strong>We're sorry but vue-antd-pro doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.2f7bce79.js></script><script src=/js/app.a9634e28.js></script></body></html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
||||||
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1be69b35"],{"031c":function(t,a,n){},2967:function(t,a,n){"use strict";n.r(a);var e=function(){var t=this,a=t.$createElement,n=t._self._c||a;return n("div",{staticClass:"page-header-index-wide"},[n("a-row",[n("a-col",{attrs:{span:24}},[n("a-card",{attrs:{bordered:!1}},[n("a-card",{staticClass:"environment-info",attrs:{bordered:!1}},[n("template",{slot:"title"},[t._v("\n 环境信息\n "),n("a",{attrs:{href:"javascript:void(0);"},on:{click:t.handleCopyEnvironments}},[n("a-icon",{attrs:{type:"copy"}})],1)]),n("a-popconfirm",{attrs:{slot:"extra",placement:"left",okText:"确定",cancelText:"取消"},on:{confirm:t.confirmUpdate},slot:"extra"},[n("template",{slot:"title"},[n("p",[t._v("确定更新 "),n("b",[t._v("Halo admin")]),t._v(" 吗?")])]),n("a-icon",{attrs:{slot:"icon",type:"cloud-download"},slot:"icon"}),n("a-button",{attrs:{loading:t.updating,type:"dashed",shape:"circle",icon:"cloud-download"}})],2),n("ul",[n("li",[t._v("Server 版本:"+t._s(t.environments.version))]),n("li",[t._v("Admin 版本:"+t._s(t.adminVersion))]),n("li",[t._v("数据库:"+t._s(t.environments.database))]),n("li",[t._v("运行模式:"+t._s(t.environments.mode))]),n("li",[t._v("启动时间:"+t._s(t._f("moment")(t.environments.startTime)))])]),n("a",{attrs:{href:"https://github.com/halo-dev",target:"_blank"}},[t._v("开源地址\n "),n("a-icon",{attrs:{type:"link"}})],1),n("a",{attrs:{href:"https://halo.run/guide",target:"_blank"}},[t._v("用户文档\n "),n("a-icon",{attrs:{type:"link"}})],1),n("a",{attrs:{href:"https://bbs.halo.run",target:"_blank"}},[t._v("在线社区\n "),n("a-icon",{attrs:{type:"link"}})],1)],2),n("a-card",{attrs:{title:"开发者",bordered:!1}},t._l(t.developers,function(t,a){return n("a",{key:a,attrs:{href:t.github,target:"_blank"}},[n("a-tooltip",{attrs:{placement:"top",title:t.name}},[n("a-avatar",{style:{marginRight:"10px"},attrs:{size:"large",src:t.avatar}})],1)],1)}),0),n("a-card",{attrs:{title:"时间轴",bordered:!1}},[n("a-timeline",[n("a-timeline-item",[t._v("...")]),t._l(t.steps,function(a,e){return n("a-timeline-item",{key:e},[t._v(t._s(a.date)+" "+t._s(a.content))])})],2)],1)],1)],1)],1)],1)},i=[],o=n("50fc"),s={data:function(){return{adminVersion:this.VERSION,environments:{},developers:[{name:"Ryan Wang",avatar:"//cn.gravatar.com/avatar/7cc7f29278071bd4dce995612d428834?s=256&d=mm",website:"https://ryanc.cc",github:"https://github.com/ruibaby"},{name:"John Niang",avatar:"//cn.gravatar.com/avatar/1dcf60ef27363dae539385d5bae9b2bd?s=256&d=mm",website:"https://johnniang.me",github:"https://github.com/johnniang"},{name:"Aquan",avatar:"//cn.gravatar.com/avatar/3958035fa354403fa9ca3fca36b08068?s=256&d=mm",website:"https://blog.eunji.cn",github:"https://github.com/aquanlerou"},{name:"appdev",avatar:"//cn.gravatar.com/avatar/08cf681fb7c6ad1b4fe70a8269c2103c?s=256&d=mm",website:"https://www.apkdv.com",github:"https://github.com/appdev"}],steps:[{date:"2019-06-01",content:"1.0 正式版发布"},{date:"2019-05-03",content:"Star 数达到 3300"},{date:"2019-01-30",content:"John Niang 加入开发"},{date:"2018-10-18",content:"构建镜像到 Docker hub"},{date:"2018-09-22",content:"Star 数达到 800"},{date:"2018-05-02",content:"第一条 Issue"},{date:"2018-05-01",content:"Star 数达到 100"},{date:"2018-04-29",content:"第一个 Pull request"},{date:"2018-04-28",content:"正式开源"},{date:"2018-03-21",content:"确定命名为 Halo,并上传到 Github"}],updating:!1}},created:function(){this.getEnvironments()},computed:{updateText:function(){return this.updating?"更新中...":"更新"}},methods:{getEnvironments:function(){var t=this;o["a"].environments().then(function(a){t.environments=a.data.data})},confirmUpdate:function(){var t=this;this.updating=!0,o["a"].updateAdminAssets().then(function(a){t.$notification.success({message:"更新成功",description:"请刷新后体验最新版本!"})}).finally(function(){t.updating=!1})},handleCopyEnvironments:function(){var t=this,a="Server 版本:".concat(this.environments.version,"\nAdmin 版本:").concat(this.adminVersion,"\n数据库:").concat(this.environments.database,"\n运行模式:").concat(this.environments.mode);this.$copyText(a).then(function(a){console.log("copy",a),t.$message.success("复制成功!")}).catch(function(a){console.log("copy.err",a),t.$message.error("复制失败!")})}}},r=s,c=(n("5ea2"),n("17cc")),d=Object(c["a"])(r,e,i,!1,null,null,null);a["default"]=d.exports},"5ea2":function(t,a,n){"use strict";var e=n("031c"),i=n.n(e);i.a}}]);
|
|
@ -1 +0,0 @@
|
||||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1be69b35"],{"031c":function(t,a,e){},2967:function(t,a,e){"use strict";e.r(a);var n=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"page-header-index-wide"},[e("a-row",[e("a-col",{attrs:{span:24}},[e("a-card",{attrs:{bordered:!1}},[e("a-card",{staticClass:"environment-info",attrs:{title:"环境信息",bordered:!1}},[e("a-popconfirm",{attrs:{slot:"extra",placement:"left",okText:"确定",cancelText:"取消"},on:{confirm:t.confirmUpdate},slot:"extra"},[e("template",{slot:"title"},[e("p",[t._v("确定更新 "),e("b",[t._v("Halo admin")]),t._v(" 吗?")])]),e("a-icon",{attrs:{slot:"icon",type:"cloud-download"},slot:"icon"}),e("a-button",{attrs:{loading:t.updating,type:"dashed",shape:"circle",icon:"cloud-download"}})],2),e("ul",[e("li",[t._v("Server 版本:"+t._s(t.environments.version))]),e("li",[t._v("Admin 版本:"+t._s(t.adminVersion))]),e("li",[t._v("数据库:"+t._s(t.environments.database))]),e("li",[t._v("运行模式:"+t._s(t.environments.mode))]),e("li",[t._v("启动时间:"+t._s(t._f("moment")(t.environments.startTime)))])]),e("a",{attrs:{href:"https://github.com/halo-dev",target:"_blank"}},[t._v("开源地址\n "),e("a-icon",{attrs:{type:"link"}})],1),e("a",{attrs:{href:"https://halo.run/docs",target:"_blank"}},[t._v("用户文档\n "),e("a-icon",{attrs:{type:"link"}})],1),e("a",{attrs:{href:"https://bbs.halo.run",target:"_blank"}},[t._v("在线社区\n "),e("a-icon",{attrs:{type:"link"}})],1)],1),e("a-card",{attrs:{title:"开发者",bordered:!1}},t._l(t.developers,function(t,a){return e("a",{key:a,attrs:{href:t.github,target:"_blank"}},[e("a-tooltip",{attrs:{placement:"top",title:t.name}},[e("a-avatar",{style:{marginRight:"10px"},attrs:{size:"large",src:t.avatar}})],1)],1)}),0),e("a-card",{attrs:{title:"时间轴",bordered:!1}},[e("a-timeline",[e("a-timeline-item",[t._v("...")]),t._l(t.steps,function(a,n){return e("a-timeline-item",{key:n},[t._v(t._s(a.date)+" "+t._s(a.content))])})],2)],1)],1)],1)],1)],1)},i=[],r=e("50fc"),o={data:function(){return{adminVersion:this.VERSION,environments:{},developers:[{name:"Ryan Wang",avatar:"//cn.gravatar.com/avatar/7cc7f29278071bd4dce995612d428834?s=256&d=mm",website:"https://ryanc.cc",github:"https://github.com/ruibaby"},{name:"John Niang",avatar:"//cn.gravatar.com/avatar/1dcf60ef27363dae539385d5bae9b2bd?s=256&d=mm",website:"https://johnniang.me",github:"https://github.com/johnniang"},{name:"Aquan",avatar:"//cn.gravatar.com/avatar/3958035fa354403fa9ca3fca36b08068?s=256&d=mm",website:"https://blog.eunji.cn",github:"https://github.com/aquanlerou"},{name:"appdev",avatar:"//cn.gravatar.com/avatar/08cf681fb7c6ad1b4fe70a8269c2103c?s=256&d=mm",website:"https://www.apkdv.com",github:"https://github.com/appdev"}],steps:[{date:"2019-06-01",content:"1.0 正式版发布"},{date:"2019-05-03",content:"Star 数达到 3300"},{date:"2019-01-30",content:"John Niang 加入开发"},{date:"2018-10-18",content:"构建镜像到 Docker hub"},{date:"2018-09-22",content:"Star 数达到 800"},{date:"2018-05-02",content:"第一条 Issue"},{date:"2018-05-01",content:"Star 数达到 100"},{date:"2018-04-29",content:"第一个 Pull request"},{date:"2018-04-28",content:"正式开源"},{date:"2018-03-21",content:"确定命名为 Halo,并上传到 Github"}],updating:!1}},created:function(){this.getEnvironments()},computed:{updateText:function(){return this.updating?"更新中...":"更新"}},methods:{getEnvironments:function(){var t=this;r["a"].environments().then(function(a){t.environments=a.data.data})},confirmUpdate:function(){var t=this;this.updating=!0,r["a"].updateAdminAssets().then(function(a){t.$notification.success({message:"更新成功",description:"请刷新后体验最新版本!"})}).finally(function(){t.updating=!1})}}},s=o,c=(e("5ea2"),e("17cc")),d=Object(c["a"])(s,n,i,!1,null,null,null);a["default"]=d.exports},"5ea2":function(t,a,e){"use strict";var n=e("031c"),i=e.n(n);i.a}}]);
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -21,20 +21,9 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#macro>
|
</#macro>
|
||||||
|
|
||||||
<#-- 站点验证代码 -->
|
<#-- 站点验证代码,已废弃 -->
|
||||||
<#macro verification>
|
<#macro verification>
|
||||||
<#if options.seo_verification_google??>
|
|
||||||
<meta name="google-site-verification" content="${options.seo_verification_google}" />
|
|
||||||
</#if>
|
|
||||||
<#if options.seo_verification_bing??>
|
|
||||||
<meta name="msvalidate.01" content="${options.seo_verification_bing}" />
|
|
||||||
</#if>
|
|
||||||
<#if options.seo_verification_baidu??>
|
|
||||||
<meta name="baidu-site-verification" content="${options.seo_verification_baidu}" />
|
|
||||||
</#if>
|
|
||||||
<#if options.seo_verification_qihu??>
|
|
||||||
<meta name="360-site-verification" content="${options.seo_verification_qihu}" />
|
|
||||||
</#if>
|
|
||||||
</#macro>
|
</#macro>
|
||||||
|
|
||||||
<#-- 时间格式化 几...前 -->
|
<#-- 时间格式化 几...前 -->
|
||||||
|
@ -52,7 +41,7 @@
|
||||||
</#macro>
|
</#macro>
|
||||||
|
|
||||||
<#macro globalHeader>
|
<#macro globalHeader>
|
||||||
<#if options.spider_disabled!false>
|
<#if options.seo_spider_disabled!false>
|
||||||
<meta name="robots" content="none">
|
<meta name="robots" content="none">
|
||||||
</#if>
|
</#if>
|
||||||
<meta name="generator" content="Halo ${version!}"/>
|
<meta name="generator" content="Halo ${version!}"/>
|
||||||
|
|
|
@ -21,20 +21,9 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#macro>
|
</#macro>
|
||||||
|
|
||||||
<#-- 站点验证代码 -->
|
<#-- 站点验证代码,已废弃 -->
|
||||||
<#macro verification>
|
<#macro verification>
|
||||||
<#if options.seo_verification_google??>
|
|
||||||
<meta name="google-site-verification" content="${options.seo_verification_google}"/>
|
|
||||||
</#if>
|
|
||||||
<#if options.seo_verification_bing??>
|
|
||||||
<meta name="msvalidate.01" content="${options.seo_verification_bing}"/>
|
|
||||||
</#if>
|
|
||||||
<#if options.seo_verification_baidu??>
|
|
||||||
<meta name="baidu-site-verification" content="${options.seo_verification_baidu}"/>
|
|
||||||
</#if>
|
|
||||||
<#if options.seo_verification_qihu??>
|
|
||||||
<meta name="360-site-verification" content="${options.seo_verification_qihu}"/>
|
|
||||||
</#if>
|
|
||||||
</#macro>
|
</#macro>
|
||||||
|
|
||||||
<#-- 时间格式化 几...前 -->
|
<#-- 时间格式化 几...前 -->
|
||||||
|
@ -53,7 +42,7 @@
|
||||||
|
|
||||||
<#-- global head -->
|
<#-- global head -->
|
||||||
<#macro head>
|
<#macro head>
|
||||||
<#if options.spider_disabled!false>
|
<#if options.seo_spider_disabled!false>
|
||||||
<meta name="robots" content="none">
|
<meta name="robots" content="none">
|
||||||
</#if>
|
</#if>
|
||||||
<meta name="generator" content="Halo ${version!}"/>
|
<meta name="generator" content="Halo ${version!}"/>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<#if options.spider_disabled!false>
|
<#if options.seo_spider_disabled!false>
|
||||||
User-agent: /
|
User-agent: /
|
||||||
Disallow: /
|
Disallow: /
|
||||||
<#else>
|
<#else>
|
||||||
|
|
Loading…
Reference in New Issue