mirror of
https://github.com/HackPlan/RootPanel.git
synced 2026-01-12 22:27:09 +08:00
many improve
This commit is contained in:
@@ -28,8 +28,8 @@ module.exports =
|
||||
|
||||
plans:
|
||||
shadowsocks:
|
||||
t_name: 'ShadowSocks 按量付费'
|
||||
t_service: 'ShadowSocks'
|
||||
t_name: 'ShadowSocks'
|
||||
t_service: '按量付费'
|
||||
t_resources: '0.6 CNY / G'
|
||||
services: ['shadowsocks']
|
||||
resources: {}
|
||||
|
||||
@@ -24,7 +24,7 @@ block content
|
||||
|
||||
.col-md-9
|
||||
.row
|
||||
header= t('panel.overview')
|
||||
header 财务
|
||||
p
|
||||
| #{t('plan.balance')}: #{account.attribute.balance.toFixed(2)} #{t('plan.currency.cny')}
|
||||
if account.attribute.remaining_time && account.attribute.remaining_time != Infinity && account.attribute.remaining_time != -Infinity
|
||||
@@ -33,7 +33,7 @@ block content
|
||||
a(href= '/panel/pay/').btn.btn-success 充值
|
||||
|
||||
.row
|
||||
header= t('plan.')
|
||||
header 服务
|
||||
table.table.table-hover.plan-list
|
||||
tbody
|
||||
for plan in plans
|
||||
@@ -43,9 +43,9 @@ block content
|
||||
td= plan.t_resources
|
||||
td
|
||||
if plan.is_enable
|
||||
button.btn.btn-danger.btn-sm= t('plan.unsubscribe')
|
||||
button.btn.btn-danger.btn-sm 关闭
|
||||
else
|
||||
button.btn.btn-success.btn-sm= t('plan.subscribe')
|
||||
button.btn.btn-success.btn-sm 开启
|
||||
|
||||
if switch_buttons.length
|
||||
#service-switch.row
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
## ShadowSocks
|
||||
## 连接信息
|
||||
|
||||
* 服务器:即当前域名
|
||||
* 端口:可在面板上查看
|
||||
* 密码:可在面板上查看
|
||||
* 加密方式:aes-256-cfb
|
||||
|
||||
## 计费细节
|
||||
## 常用客户端
|
||||
|
||||
每消耗 100M 流量触发一次扣费(约 0.06 元), 若扣费导致帐号余额低于 0, 则会自动退订 ShadowSocks 功能,即关闭服务。
|
||||
当手动退订 ShadowSocks 时, 强行触发一次扣费,不足 100M 按 100M 计算。
|
||||
* [Windows GUI](http://pan.baidu.com/s/1qWry1Co)
|
||||
* [OS X GoAgentX](http://pan.baidu.com/s/1xWGyE) | [OS X GUI](http://pan.baidu.com/s/1i3va6ZN)
|
||||
* [Android apk](http://pan.baidu.com/s/1sjjUTgL)
|
||||
* [More](http://shadowsocks.org/en/download/clients.html)
|
||||
|
||||
## 计费细节
|
||||
每消耗 100M 流量触发一次扣费(约 0.06 元), 若扣费导致帐号余额低于 0, 则会自动关闭 ShadowSocks 服务。当手动关闭 ShadowSocks 时, 强行触发一次扣费,不足 100M 按 100M 计算。
|
||||
|
||||
@@ -3,7 +3,7 @@ fs = require 'fs'
|
||||
path = require 'path'
|
||||
|
||||
service = require './service'
|
||||
{renderAccount, requireInService} = require '../../core/router/middleware'
|
||||
{renderAccount, requireInService, requireAuthenticate} = require '../../core/router/middleware'
|
||||
|
||||
mAccount = require '../../core/model/account'
|
||||
|
||||
@@ -25,29 +25,28 @@ exports.post '/reset_password', (req, res) ->
|
||||
|
||||
wiki_router = express.Router()
|
||||
|
||||
wiki_router.use (req, res) ->
|
||||
req.inject [renderAccount], ->
|
||||
url = req.url.substr 1
|
||||
wiki_router.use requireAuthenticate, (req, res) ->
|
||||
url = req.url.substr 1
|
||||
|
||||
unless url
|
||||
url = 'README.md'
|
||||
unless url
|
||||
url = 'README.md'
|
||||
|
||||
filename = path.resolve path.join __dirname, 'WIKI', url
|
||||
baseDir = path.resolve path.join __dirname, 'WIKI'
|
||||
filename = path.resolve path.join __dirname, 'WIKI', url
|
||||
baseDir = path.resolve path.join __dirname, 'WIKI'
|
||||
|
||||
unless filename[0 .. baseDir.length-1] == baseDir
|
||||
return res.json 404
|
||||
unless filename[0 .. baseDir.length-1] == baseDir
|
||||
return res.json 404
|
||||
|
||||
fs.readFile filename, (err, data) ->
|
||||
if err
|
||||
return res.status(404).send err.toString()
|
||||
fs.readFile filename, (err, data) ->
|
||||
if err
|
||||
return res.status(404).send err.toString()
|
||||
|
||||
res.render 'wiki',
|
||||
title: url
|
||||
content: markdown.toHTML data.toString()
|
||||
res.render 'wiki',
|
||||
title: url
|
||||
content: markdown.toHTML data.toString()
|
||||
|
||||
app.view_hook.menu_bar.push
|
||||
href: '/wiki/'
|
||||
html: '用户手册'
|
||||
html: '使用帮助'
|
||||
|
||||
app.use '/wiki', wiki_router
|
||||
|
||||
@@ -28,8 +28,8 @@ module.exports =
|
||||
|
||||
plans:
|
||||
shadowsocks:
|
||||
t_name: 'ShadowSocks 按量付费'
|
||||
t_service: 'ShadowSocks'
|
||||
t_name: 'ShadowSocks'
|
||||
t_service: '按量付费'
|
||||
t_resources: '0.6 CNY / G'
|
||||
services: ['shadowsocks']
|
||||
resources: {}
|
||||
|
||||
Reference in New Issue
Block a user