mirror of
https://github.com/HackPlan/RootPanel.git
synced 2026-03-29 08:38:02 +08:00
移除版本信息的显示
This commit is contained in:
@@ -22,24 +22,6 @@ exports.runWebServer = ->
|
||||
app.use connect.cookieParser()
|
||||
app.use connect.logger('dev')
|
||||
|
||||
app.locals.version = do ->
|
||||
logs = fs.readFileSync './.git/logs/HEAD', 'utf8'
|
||||
logs = logs.split "\n"
|
||||
lastline = logs[logs.length - 2]
|
||||
|
||||
result = lastline.match /([a-f0-9]{40})\s([a-f0-9]{40})\s(\S+)\s(\S+)\s(\d+)\s(\+\d+)\s(.+)/
|
||||
|
||||
version =
|
||||
parent: result[1]
|
||||
version: result[2]
|
||||
author: result[3]
|
||||
email: result[4]
|
||||
time: new Date parseInt(result[5]) * 1000
|
||||
timezone: result[6]
|
||||
message: result[7]
|
||||
|
||||
return version
|
||||
|
||||
app.use (req, res, next) ->
|
||||
res.locals.app = app
|
||||
res.locals.t = i18n.getTranslator 'zh_CN'
|
||||
|
||||
@@ -47,15 +47,6 @@ html
|
||||
header= t('app.name')
|
||||
p= t('app.description')
|
||||
|
||||
if app && app.locals && app.locals.version
|
||||
.row
|
||||
header Version
|
||||
ul
|
||||
li Version: #{app.locals.version.version.slice(0, 10)}
|
||||
li Author: #{app.locals.version.author}
|
||||
li= app.locals.version.time.toJSON()
|
||||
li= app.locals.version.message
|
||||
|
||||
#footer
|
||||
script(src='http://cdn.staticfile.org/jquery/2.0.3/jquery.min.js')
|
||||
script(src='http://cdn.staticfile.org/twitter-bootstrap/3.0.3/js/bootstrap.min.js')
|
||||
|
||||
Reference in New Issue
Block a user