mirror of https://github.com/halo-dev/halo
🎨 add halo version to database
parent
db0193b176
commit
da1696bdb9
|
@ -1,7 +1,7 @@
|
|||
package cc.ryanc.halo.listener;
|
||||
|
||||
import cc.ryanc.halo.model.support.Theme;
|
||||
import cc.ryanc.halo.model.enums.BlogPropertiesEnum;
|
||||
import cc.ryanc.halo.model.support.Theme;
|
||||
import cc.ryanc.halo.service.OptionsService;
|
||||
import cc.ryanc.halo.utils.HaloUtils;
|
||||
import cc.ryanc.halo.web.controller.core.BaseController;
|
||||
|
@ -39,6 +39,8 @@ public class StartedListener implements ApplicationListener<ApplicationStartedEv
|
|||
|
||||
@Override
|
||||
public void onApplicationEvent(ApplicationStartedEvent event) {
|
||||
// save halo version to database
|
||||
optionsService.saveOption("version", HALO_VERSION);
|
||||
try {
|
||||
this.loadActiveTheme();
|
||||
} catch (TemplateModelException e) {
|
||||
|
|
|
@ -15,6 +15,11 @@ import java.util.Map;
|
|||
*/
|
||||
public class HaloConst {
|
||||
|
||||
/**
|
||||
* version constant
|
||||
*/
|
||||
public static final String HALO_VERSION = "0.4.2";
|
||||
|
||||
/**
|
||||
* 所有设置选项(key,value)
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<footer class="main-footer">
|
||||
<#-- 虽然Halo使用了宽松的GPL协议,但开发不易,希望您可以保留一下版权声明。笔芯~ -->
|
||||
<div class="pull-right hidden-xs"><a target="_blank" href="https://github.com/ruibaby/halo/releases/tag/v0.4.2">0.4.2</a></div>
|
||||
<div class="pull-right hidden-xs"><a target="_blank" href="https://github.com/ruibaby/halo/releases/tag/v${options.version!}">${options.version!}</a></div>
|
||||
Thanks for using <strong><a data-pjax="true" href="/admin/halo">Halo</a>.</strong>
|
||||
</footer>
|
||||
|
|
Loading…
Reference in New Issue