working on i18n of user center

This commit is contained in:
printempw 2016-09-15 23:03:58 +08:00
parent 23f6e4b35e
commit d9b364556b
35 changed files with 786 additions and 394 deletions

View File

@ -79,11 +79,6 @@ class Utils
return ($timestamp == 0) ? date('Y-m-d H:i:s') : date('Y-m-d H:i:s', $timestamp);
}
public static function getNameOrEmail(\App\Models\User $user)
{
return ($user->getNickName() == '') ? $user->email : $user->getNickName();
}
/**
* Replace content of string according to given rules
*

View File

@ -9,21 +9,21 @@
*/
$menu['user'] = array(
1 => ['title' => '仪表盘', 'link' => '/user', 'icon' => 'fa-dashboard'],
2 => ['title' => '我的衣柜', 'link' => '/user/closet', 'icon' => 'fa-star'],
3 => ['title' => '角色管理', 'link' => '/user/player', 'icon' => 'fa-users'],
4 => ['title' => '配置生成', 'link' => '/user/config', 'icon' => 'fa-book'],
5 => ['title' => '个人资料', 'link' => '/user/profile', 'icon' => 'fa-user']
['title' => 'general.dashboard', 'link' => '/user', 'icon' => 'fa-dashboard'],
['title' => 'general.my-closet', 'link' => '/user/closet', 'icon' => 'fa-star'],
['title' => 'general.player-manage', 'link' => '/user/player', 'icon' => 'fa-users'],
['title' => 'general.generate-config', 'link' => '/user/config', 'icon' => 'fa-book'],
['title' => 'general.profile', 'link' => '/user/profile', 'icon' => 'fa-user']
);
$menu['admin'] = array(
1 => ['title' => '仪表盘', 'link' => '/admin', 'icon' => 'fa-dashboard'],
2 => ['title' => '用户管理', 'link' => '/admin/users', 'icon' => 'fa-users'],
3 => ['title' => '角色管理', 'link' => '/admin/players', 'icon' => 'fa-gamepad'],
4 => ['title' => '个性化', 'link' => '/admin/customize', 'icon' => 'fa-paint-brush'],
5 => ['title' => '积分配置', 'link' => '/admin/score', 'icon' => 'fa-credit-card'],
6 => ['title' => '站点配置', 'link' => '/admin/options', 'icon' => 'fa-cog'],
7 => ['title' => '检查更新', 'link' => '/admin/update', 'icon' => 'fa-arrow-up']
['title' => 'general.dashboard', 'link' => '/admin', 'icon' => 'fa-dashboard'],
['title' => 'general.user-manage', 'link' => '/admin/users', 'icon' => 'fa-users'],
['title' => 'general.player-manage', 'link' => '/admin/players', 'icon' => 'fa-gamepad'],
['title' => 'general.customize', 'link' => '/admin/customize', 'icon' => 'fa-paint-brush'],
['title' => 'general.score-options', 'link' => '/admin/score', 'icon' => 'fa-credit-card'],
['title' => 'general.options', 'link' => '/admin/options', 'icon' => 'fa-cog'],
['title' => 'general.check-update', 'link' => '/admin/update', 'icon' => 'fa-arrow-up']
);
return $menu;

View File

@ -1,41 +1,76 @@
login:
login: Log In
title: Log In
button: Log In
message: Log in to manage your skin & players
keep: Remember me
success: Logged in successfully~
check:
anonymous: Illegal access. Please log in first.
banned: You are banned on this site. Please contact the admin.
token: Invalid token. Please log in.
register:
register: Register
message: Welcome to :sitename
title: Register
button: Register
message: Welcome to :sitename!
nickname-intro: Whatever you like expect special characters
repeat-pwd: Repeat your password
close: Well, this site doesn't allow any register.
success: Registered successfully. Redirecting...
max: You can't register more than :regs accounts.
registered: The email address is already registered.
forgot:
forgot: Reset Password
message: We will send you an E-mail to verify
send: Send
title: Forgot Password
button: Send
message: We will send you an E-mail to verify.
login-link: I do remember it
close: Password resetting is not available now.
frequent-mail: You click the send button too fast. Wait for 60 secs, guy.
unregistered: The email address is not registered.
mail:
title: Reset your password on :sitename
success: Mail is sent. Will be expired in 1 hour, please check.
failed: Fail to send mail, detailed message :msg
message: You are receiving this email because this email address was used to reset your password on :sitename
ignore: If you haven't signed up on our site, please ignore this email. No unsubscribing is required.
reset: Reset your password
notice: This mail is sending automatically, no reponses will be sent if you reply.
reset:
reset: Reset
message: :username, reset your email address here
title: Reset Password
button: Reset
invalid: Invalid link.
expired: This link is expired.
message: :username, reset your email address here.
success: Password resetted successfully.
bind:
bind: Bind
message: You need to fill your email adderss to continue
title: Bind Email
button: Bind
message: You need to fill your email adderss to continue.
introduction: Email addresses will be used for password resetting. We won't send you any spam.
registered: The email address is already registered.
validation:
identification: Invalid format of email or player name.
email: Email format is invalid.
captcha: Wrong CAPTCHA.
user: Unexistent user.
password: Wrong email or password.
logout:
success: Logged out successfully~
fail: No valid session.
nickname: Nickname
email: Email Address
identification: Email or Player Name
email: Email
identification: Email or player name
password: Password
captcha: Enter the CAPTCHA
change-captcha: Click to change another image.
login-link: Already have an account?
captcha: Please enter the CAPTCHA.
change-captcha: Click to change CAPTCHA image.
login-link: Already registered? Log in here.
forgot-link: Forgot your password?
register-link: Register a new account
register-link: Register new account

View File

@ -0,0 +1,38 @@
index: Homepage
skinlib: Skin Library
langs: Language
user-center: User Center
logout: Log Out
login: Log In
register: Register Now
profile: User Profile
online: Online
admin-panel: Admin Panel
explore: Explore
manage: Manage
anonymous: Guest
back: Back
dashboard: Dashboard
my-closet: Closet
player-manage: Player Manage
user-manage: User Manage
generate-config: Generate Config
customize: Customize
options: Options
score-options: Score Options
check-update: Check Update
close: Close
skin: Skin
cape: Cape
pagination: Page :page, total :total
texture-preview: Texture Preview
walk: Walk
run: Run
rotation: Rotation
submit: Submit
notice: Notice
switch-2d-preview: Switch to 2D Preview

View File

@ -0,0 +1,70 @@
/*!
* Blessing Skin English Translations
*
* @see https://github.com/printempw/blessing-skin-server
* @author printempw <h@prinzeugen.net>
*
* NOTE: this file must be saved in UTF-8 encoding.
*/
(function ($) {
"use strict";
$.locales['zh-CN'] = {
auth: {
emptyIdentification: 'Empty email/player name.',
emptyPassword: 'Password is required.',
emptyCaptcha: 'Empty password.',
login: 'Log In',
loggingIn: 'Logging In',
tooManyFails: 'You fails too many times! Please enter the CAPTCHA.',
emptyEmail: 'Empty email address.',
invalidEmail: 'Invalid format of email address.',
invalidPassword: 'Invalid password. The length of password should between 8 and 16.',
emptyConfirmPwd: 'Empty confirming password.',
invalidConfirmPwd: 'Confirming password is not equal with password.',
emptyNickname: 'Empty nickname.',
register: 'Register',
registering: 'Registering',
send: 'Send',
sending: 'Sending',
reset: 'Reset',
resetting: 'Resetting'
},
user: {
switch2dPreview: 'Switch to 2D Preview',
switch3dPreview: 'Switch to 3D Preview',
removeFromCloset: 'Sure to remove this from your closet?',
setAvatar: 'Sure to set this as your avatar?',
setAvatarNotice: 'The head segment of skin will bu used.',
noSelectedPlayer: 'No player is selected.',
noSelectedTexture: 'No texture is selected.',
changePlayerName: 'Please enter the player name:',
playerNameRule: 'The player name may only contain letters, numbers, and dashes. Chinese characters supporting is depended on option of this site.',
emptyPlayerName: 'Empty player name.',
clearTexture: 'Sure to clear the skins & cape of this player?',
deletePlayer: 'Sure to delete this player?',
deletePlayerNotice: 'It\'s permanent. No backups.',
emptyNewNickName: 'Empty new nickname.',
changeNickName: 'SUre to set your nickname to :new_nickname?',
emptyPassword: 'Original password is required.',
emptyNewPassword: 'Empty new password.',
emptyNewEmail: 'Empty new email address.',
changeEmail: 'Sure to change your email address to :new_email?',
emptyDeletePassword: 'Please enter the current password:',
signRemainTime: 'Can sign after :time hours',
},
config: {
csl13_1Upper: 'v13.1 and upper (recommended)',
csl13_1Lower: 'lower than v13.1',
usm1_4Upper: 'v1.4 and upper (recommended)',
usm1_2To1_3: 'v1.2 to v1.3',
usm1_2Lower: 'lower than v1.2',
},
general: {
confirmLogout: 'Sure to log out?',
confirm: 'OK',
cancel: 'Cancel'
}
};
})(window.jQuery);

107
resources/lang/en/user.yml Normal file
View File

@ -0,0 +1,107 @@
used:
title: Resources Used
players: Registered players
storage: Storage used
cur-score: Current Score
score-notice: Click the score to show introduction.
sign: Sign In
last-sign: Last signed in at :time
remain-time: Can sign in after :time hours
announcement: Announcement
score-intro:
title: What is score?
introduction: |
We use score system to prevent the behaviors like uplaoding huge amount of textures and registering players casually.
Both adding players and uplaoding textures will consume your score. The score will be returned if you deleted them.
Adding textures from skin library to your closet will not decline your score.
The inital score of user on this site is :initial_score, you can acquire :score-from ~ :score-to scores by signing in.
rates:
storage: :score scores = 1 KB storage
player: :score scores = 1 player
closet:
upload: Uplaod Texture
search: Search Texture
switch-category: Switch Category
view: View in skin librariy
more: More
remove: Remove from closet
set-avatar: Set as avatar
empty-msg: |
<p>Nothing in your closet...</p>
<p>Why not explore the <a href=":url">Skin Library</a> for a while?</p>
use-as:
button: Apply...
title: Which player should be applied to?
empty: It seems that you own no player...
add: Add new player
player:
player-name: Player Name
preference: Preference
edit: Edit
operation: Delete
edit-pname: Player name
delete-texture: Textures
delete-player: Player
add-player: Add new player
login-notice: Now you can log in with player names you owned instead email address.
player-info: Information <small>(click player name to show preview)</small>
textures:
steve: Steve Model
alex: Alex Model
cape: Cape
empty: Nothing
pname-rule: Could only contain letters, numbers and dashes.
pname-rule-chinese: Could only contain chinese characters, letters, numbers and dashes.
profile:
change-avatar: Change Avatar?
avatar-notice: Click the gear icon「<i class="fa fa-cog"></i>」of any skin in your skinlib, then click 「Set as avatar」. We will cut the head segment of that skin for you.
password:
title: Change Password
old: Old Password
new: New Password
confirm: Repeat Password
button: Change Password
nickname:
title: Change Nickname
empty: No nickname is setted now.
rule: Whatever you like expect special characters
email:
title: Change Email
new: New Email
password: Current Password
button: Change Email
delete:
title: Delete Account
notice: Sure to delete your account on :sitename?
admin: Admin account can not be deleted.
button: Delete My Account
modal-title: You need to enter your password to continue
modal-notice: |
You're about to delete your account.
This is permanent! No backups, no restores, no magic undo button.
We warned you, ok?
password: Current Password
config:
mod-requirement: MOD Requirement
mod-intro: |
<p>We support all versions of <a href="http://www.mcbbs.net/forum.php?mod=viewthread&tid=358932" target="_blank">UniSkinMod</a> and <a href="http://www.mcbbs.net/thread-269807-1-1.html" target="_blank">CustomSkinLoader</a>, and any other skin mod using with leagcy links.</p>
<p>Detailed Documentation Here: <a href="https://github.com/printempw/blessing-skin-server/wiki/Mod-Configuration" target="_blank">@GitHub</a></p>
version: Version
config-file: Config File

View File

@ -0,0 +1,38 @@
index: 首页
skinlib: 皮肤库
langs: 语言
user-center: 用户中心
logout: 登出
login: 登录
register: 现在注册
profile: 个人资料
online: 在线
admin-panel: 管理面板
explore: 浏览
manage: 管理
anonymous: 未登录
back: 返回
dashboard: 仪表盘
my-closet: 我的衣柜
player-manage: 角色管理
user-manage: 用户管理
generate-config: 配置生成
customize: 个性化
options: 站点配置
score-options: 积分配置
check-update: 检查更新
close: 关闭
skin: 皮肤
cape: 披风
pagination: 第 :page 页,共 :total 页
texture-preview: 材质预览
walk: 行走
run: 奔跑
rotation: 旋转
submit: 提交
notice: 提示
switch-2d-preview: 切换 2D 预览

View File

@ -1,7 +0,0 @@
index: 首页
skinlib: 皮肤库
langs: 语言
user-center: 用户中心
logout: 登出
login: 登录
register: 现在注册

View File

@ -31,6 +31,36 @@
reset: '重置',
resetting: '重置中'
},
user: {
switch2dPreview: '切换 2D 预览',
switch3dPreview: '切换 3D 预览',
removeFromCloset: '确定要从衣柜中移除此材质吗?',
setAvatar: '确定要将此材质设置为用户头像吗?',
setAvatarNotice: '将会自动截取皮肤头部',
noSelectedPlayer: '你还没有选择角色哦',
noSelectedTexture: '你还没有选择要应用的材质哦',
changePlayerName: '请输入角色名:',
playerNameRule: '允许数字、字母以及下划线,是否支持中文角色名请参考本站设置',
emptyPlayerName: '你还没有填写名称哦',
clearTexture: '确定要重置该用户的皮肤/披风吗?',
deletePlayer: '真的要删除该玩家吗?',
deletePlayerNotice: '这将是永久性的删除',
emptyNewNickName: '你还没有填写新昵称啊',
changeNickName: '确定要将昵称设置为 :new_nickname 吗?',
emptyPassword: '原密码不能为空',
emptyNewPassword: '新密码要好好填哦',
emptyNewEmail: '你还没有填写新邮箱啊',
changeEmail: '确定要将用户邮箱更改为 :new_email 吗?',
emptyDeletePassword: '请先输入当前用户密码',
signRemainTime: ':time 小时后可签到',
},
config: {
csl13_1Upper: '13.1 版及以上(推荐)',
csl13_1Lower: '13.1 版以下',
usm1_4Upper: '1.4 版及以上(推荐)',
usm1_2To1_3: '1.2 及 1.3 版',
usm1_2Lower: '1.2 版以下',
},
general: {
confirmLogout: '确定要登出吗?',
confirm: '确定',

View File

@ -0,0 +1,114 @@
used:
title: 使用情况
players: 角色数量
storage: 存储空间
cur-score: 当前积分
score-notice: 点击积分查看说明
sign: 每日签到
last-sign: 上次签到于 :time
remain-time: :time 小时后可签到
announcement: 公告
score-intro:
title: 积分是个啥?
introduction: |
「既然你诚心诚意地发问了!」
「那我们就大发慈悲地告诉你!」
「为了守护皮肤站的和平」
「为了防止皮肤站被破坏」
「贯彻爱与真实的。。呸!」上面只是卖下萌~
为了不出现用户一个劲上传材质导致存储空间爆满,我们决定启用积分系统。
添加角色以及上传材质都会消耗积分,而删除已经添加的角色和已上传的材质时积分将会被返还。
本站用户初始积分为 :initial_score每日签到可以随机获得 :score-from ~ :score-to 积分
添加皮肤库里的材质到衣柜不消耗积分。
rates:
storage: :score 积分 = 1 KB 存储空间
player: :score 积分 = 1 个角色
closet:
upload: 上传材质
search: 搜索材质
switch-category: 切换分类
view: 在皮肤库中查看
more: 更多
remove: 从衣柜中移除
set-avatar: 设为头像
empty-msg: |
<p>衣柜里啥都没有哦~</p>
<p>去<a href=":url">皮肤库</a>看看吧~</p>
use-as:
button: 使用...
title: 要给哪个角色使用呢?
empty: 你好像还没有添加任何角色哦
add: 添加角色
player:
player-name: 角色名称
preference: 优先模型
edit: 编辑
operation: 操作
edit-pname: 修改角色名
delete-texture: 删除材质
delete-player: 删除角色
add-player: 添加新角色
login-notice: 你现在可以使用你所拥有的角色名来登录皮肤站啦~
player-info: 角色信息 <small>(点击角色名以查看预览)</small>
textures:
steve: Steve 模型的皮肤:
alex: Alex 模型的皮肤:
cape: 披风:
empty: 未上传
pname-rule: 只能包含数字、字母以及下划线
pname-rule-chinese: 可使用汉字,字母数字以及下划线
profile:
change-avatar: 更改头像?
avatar-notice: 请在衣柜中任意皮肤的右下角「<i class="fa fa-cog"></i>」处选择「设为头像」,将会自动截取该皮肤的头部作为头像哦~
password:
title: 更改密码
old: 旧的密码
new: 新密码
confirm: 确认密码
button: 修改密码
nickname:
title: 更改昵称
empty: 当前未设置昵称,
rule: 可使用除一些特殊符号外的任意字符
email:
title: 更改邮箱
new: 新邮箱
password: 当前密码
button: 修改邮箱
delete:
title: 删除账号
notice: 确定要删除你在 :sitename 上的账号吗?
admin: 管理员账号不能被删除哟
button: 删除我的账户
modal-title: 这是危险操作,输入密码以继续
modal-notice: |
此操作不可恢复!
你所上传至皮肤库的材质仍会被保留,但你的角色将被永久删除。
我们不提供任何备份,或者神奇的撤销按钮。
我们警告过你了,确定要这样做吗?
password: 当前密码
config:
mod-requirement: MOD 需求
mod-intro: |
<p>本站支持的皮肤 MOD 有 <a href="http://www.mcbbs.net/forum.php?mod=viewthread&tid=358932" target="_blank">UniSkinMod</a><a href="http://www.mcbbs.net/thread-269807-1-1.html" target="_blank">CustomSkinLoader</a> 各自的新版和旧版,以及任何支持传统皮肤加载链接的皮肤 MOD。</p>
<p>详细教程:<a href="https://github.com/printempw/blessing-skin-server/wiki/Mod-Configuration" target="_blank">@GitHub</a></p>
version: 版本
config-file: 配置文件

View File

@ -2,7 +2,7 @@
* @Author: printempw
* @Date: 2016-07-16 10:02:24
* @Last Modified by: printempw
* @Last Modified time: 2016-09-10 21:42:29
* @Last Modified time: 2016-09-15 21:26:27
*/
'use strict';
@ -95,7 +95,7 @@ function show2dPreview() {
$('#preview-msg').remove();
$('.operations').hide();
$('#preview-2d').show();
$('#preview-switch').html('切换 3D 预览').attr('onclick', 'show3dPreview();');
$('#preview-switch').html(trans('user.switch3dPreview')).attr('onclick', 'show3dPreview();');
}
function show3dPreview() {
@ -106,7 +106,7 @@ function show3dPreview() {
init3dCanvas();
$('#preview-2d').hide();
$('.operations').show();
$('#preview-switch').html('切换 2D 预览').attr('onclick', 'show2dPreview();');
$('#preview-switch').html(trans('user.switch2dPreview')).attr('onclick', 'show2dPreview();');
}
// Change 3D preview status
@ -147,7 +147,7 @@ $('body').on('click', '.item', function() {
function removeFromCloset(tid) {
swal({
text: '确定要从衣柜中移除此材质吗?',
text: trans('user.removeFromCloset'),
type: 'warning',
showCancelButton: true
}).then(function() {
@ -175,8 +175,8 @@ function removeFromCloset(tid) {
function setAsAvatar(tid) {
swal({
title: '确定要将此材质设置为用户头像吗?',
text: '将会自动截取皮肤头部',
title: trans('user.setAvatar'),
text: trans('user.setAvatarNotice'),
type: 'question',
showCancelButton: true
}).then(function() {
@ -206,8 +206,8 @@ $(document).ready(function() {
radioClass: 'iradio_square-blue'
});
swal.setDefaults({
confirmButtonText: '确定',
cancelButtonText: '取消'
confirmButtonText: trans('general.confirm'),
cancelButtonText: trans('general.cancel')
});
});
@ -221,9 +221,9 @@ function setTexture() {
var tid = $('.item-selected').attr('tid');
if (!pid) {
toastr.info('你还没有选择角色哦');
toastr.info(trans('user.noSelectedPlayer'));
} else if (!tid) {
toastr.info('你还没有选择要应用的材质哦');
toastr.info(trans('user.noSelectedTexture'));
} else {
$.ajax({
type: "POST",
@ -241,9 +241,7 @@ function setTexture() {
toastr.warning(json.msg);
}
},
error: function(json) {
showModal(json.responseText.replace(/\n/g, '<br />'), 'Fatal Error请联系作者', 'danger');
}
error: showAjaxError
});
}
}
@ -266,10 +264,10 @@ $('body').on('change', '#preference', function() {
});
});
function changePlayerMame(pid, current_player_name) {
function changePlayerName(pid, current_player_name) {
swal({
title: '请输入角色名:',
text: '允许数字、字母以及下划线,是否支持中文角色名请参考本站设置',
title: trans('user.changePlayerName'),
text: trans('user.playerNameRule'),
inputValue: current_player_name,
input: 'text',
showCancelButton: true,
@ -278,7 +276,7 @@ function changePlayerMame(pid, current_player_name) {
if (value) {
resolve();
} else {
reject('你还没有填写名称哦');
reject(trans('user.emptyPlayerName'));
}
});
}
@ -309,7 +307,7 @@ function changePlayerMame(pid, current_player_name) {
function clearTexture(pid) {
swal({
text: "确定要重置该用户的皮肤/披风吗?",
text: trans('user.clearTexture'),
type: 'warning',
showCancelButton: true
}).then(function() {
@ -338,8 +336,8 @@ function clearTexture(pid) {
function deletePlayer(pid) {
swal({
title: "真的要删除该玩家吗?",
text: "这将是永久性的删除",
title: trans('user.deletePlayer'),
text: trans('user.deletePlayerNotice'),
type: 'warning',
showCancelButton: true,
cancelButtonColor: '#3085d6',
@ -399,13 +397,13 @@ function changeNickName() {
if (!new_nickname) {
swal({
type: 'error',
html: '你还没有填写新昵称啊'
html: trans('user.emptyNewNickname')
});
return;
}
swal({
text: '确定要将昵称设置为 ' + new_nickname + ' 吗?',
text: trans('user.changeNickName', { new_nickname: new_nickname }),
type: 'question',
showCancelButton: true
}).then(function() {
@ -433,8 +431,6 @@ function changeNickName() {
error: showAjaxError
});
});
}
function changePassword() {
@ -443,16 +439,16 @@ function changePassword() {
var new_passwd = $('#new-passwd').val();
if (password == "") {
toastr.info('原密码不能为空');
toastr.info(trans('user.emptyPassword'));
$('#passwd').focus();
} else if (new_passwd == "") {
toastr.info('新密码要好好填哦');
toastr.info(trans('user.emptyNewPassword'));
$('#new-passwd').focus();
} else if ($('#confirm-pwd').val() == "") {
toastr.info('确认密码不能为空');
toastr.info(trans('auth.emptyConfirmPwd'));
$('#confirm-pwd').focus();
} else if (new_passwd != $('#confirm-pwd').val()) {
toastr.warning('新密码和确认的密码不一样诶?');
toastr.warning(trans('auth.invalidConfirmPwd'));
$('#confirm-pwd').focus();
} else {
$.ajax({
@ -498,7 +494,7 @@ function changeEmail() {
if (!new_email) {
swal({
type: 'error',
html: '你还没有填写新邮箱啊'
html: trans('user.emptyNewEmail')
});
return;
}
@ -506,12 +502,12 @@ function changeEmail() {
if (!/\S+@\S+\.\S+/.test(new_email)) {
swal({
type: 'warning',
html: '邮箱格式不正确'
html: trans('auth.invalidEmail')
}); return;
}
swal({
text: '确定要将用户邮箱更改为 '+new_email+' 吗?',
text: trans('user.changeEmail', { new_email: new_email }),
type: 'question',
showCancelButton: true
}).then(function() {
@ -548,7 +544,7 @@ function deleteAccount() {
if (!password) {
swal({
type: 'warning',
html: '请先输入当前用户密码'
html: trans('user.emptyDeletePassword')
}); return;
}
@ -576,32 +572,6 @@ function deleteAccount() {
});
}
$('#mod-select').change(function() {
$('#version-select').children().each(function() { $(this).remove(); });
if ($(this).val() == "csl") {
$('#version-select').append('<option value="13_1-upper">13.1 版及以上(推荐)</option>');
$('#version-select').append('<option value="13_1-lower">13.1 版以下</option>');
} else if ($(this).val() == "usm") {
$('#version-select').append('<option value="1_4-upper">1.4 版及以上(推荐)</option>');
$('#version-select').append('<option value="1_2-1_3">1.2 及 1.3 版</option>');
$('#version-select').append('<option value="1_2-lower">1.2 版以下</option>');
}
showConfig();
});
function showConfig() {
$('#config-13_1-upper').hide();
$('#config-13_1-lower').hide();
$('#config-1_4-upper').hide();
$('#config-1_2-1_3').hide();
$('#config-1_2-lower').hide();
$('#config-'+$('#version-select').val()).show();
}
$('#version-select').change(showConfig);
function sign() {
$.ajax({
type: "POST",
@ -614,7 +584,7 @@ function sign() {
html: json.msg
}).then(function() {
$('#score').html(json.score);
var dom = '<i class="fa fa-calendar-check-o"></i> &nbsp;'+json.remaining_time+' 小时后可签到';
var dom = '<i class="fa fa-calendar-check-o"></i> &nbsp;' + trans('user.signRemainTime', { time: json.remaining_time });
$('#sign-button').attr('disabled', 'disabled').html(dom);
});
} else {

View File

@ -2,7 +2,7 @@
* @Author: printempw
* @Date: 2016-07-16 09:02:32
* @Last Modified by: printempw
* @Last Modified time: 2016-09-15 10:39:49
* @Last Modified time: 2016-09-15 21:48:24
*/
$.locales = {};
@ -42,11 +42,13 @@ function loadLocales() {
}
}
function trans(key) {
function trans(key, parameters) {
if (isEmpty(locale)) {
loadLocales();
}
parameters = parameters || {};
var segments = key.split('.');
var temp = locale || {};
@ -58,6 +60,12 @@ function trans(key) {
}
}
for (i in parameters) {
if (!isEmpty(parameters[i])) {
temp = temp.replace(':'+i, parameters[i]);
}
}
return temp;
}

View File

@ -111,7 +111,7 @@
<tr>
<td class="key">首页图片地址</td>
<td class="value">
<input type="text" title="相对于首页的路径或者完整的 URL" data-toggle="tooltip" data-placement="top" class="form-control" name="home_pic_url" value="{{ Option::get('home_pic_url') }}">
<input type="text" title="相对于首页的路径或者完整的 URL" data-toggle="tooltip" data-placement="top" class="form-control" name="home_pic_url" value="{{ option('home_pic_url') }}">
</td>
</tr>
<tr>
@ -120,14 +120,14 @@
</td>
<td class="value">
<label for="show_footer_copyright">
<input {{ (Option::get('show_footer_copyright') == '1') ? 'checked="true"' : '' }} type="checkbox" id="show_footer_copyright" name="show_footer_copyright" value="1"> 显示页面右下角的版权信息
<input {{ (option('show_footer_copyright') == '1') ? 'checked="true"' : '' }} type="checkbox" id="show_footer_copyright" name="show_footer_copyright" value="1"> 显示页面右下角的版权信息
</label>
</td>
</tr>
<tr>
<td class="key">版权文字</td>
<td class="value">
<textarea class="form-control" rows="4" name="copyright_text">{{ Option::get('copyright_text') }}</textarea>
<textarea class="form-control" rows="4" name="copyright_text">{{ option('copyright_text') }}</textarea>
<p class="description">自定义版权文字内可使用占位符,<code>{site_name}</code> 将会被自动替换为站点名称,<code>{site_url}</code> 会被替换为站点地址。</p>
</td>
</tr>
@ -162,13 +162,13 @@
<tr>
<td class="key">CSS</td>
<td class="value">
<textarea name="custom_css" class="form-control" rows="6">{{ Option::get('custom_css') }}</textarea>
<textarea name="custom_css" class="form-control" rows="6">{{ option('custom_css') }}</textarea>
</td>
</tr>
<tr>
<td class="key">JavaScript</td>
<td class="value">
<textarea name="custom_js" class="form-control" rows="6">{{ Option::get('custom_js') }}</textarea>
<textarea name="custom_js" class="form-control" rows="6">{{ option('custom_js') }}</textarea>
</td>
</tr>
@ -188,7 +188,7 @@
</div><!-- /.content-wrapper -->
<script type="text/javascript">
var current_skin = "{{ Option::get('color_scheme') }}";
var current_skin = "{{ option('color_scheme') }}";
</script>
@endsection

View File

@ -1,6 +1,6 @@
@extends('admin.master')
@section('title', '仪表盘')
@section('title', trans('general.dashboard'))
@section('content')
@ -9,7 +9,7 @@
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
仪表盘
{{ trans('general.dashboard') }}
<small>Dashboard</small>
</h1>
</section>

View File

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>@yield('title') - {{ Option::get('site_name') }}</title>
<title>@yield('title') - {{ option('site_name') }}</title>
<link rel="shortcut icon" href="{{ assets('images/favicon.ico') }}">
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
@ -15,18 +15,18 @@
<?php $user = new App\Models\User(session('uid')); ?>
<body class="hold-transition {{ Option::get('color_scheme') }} sidebar-mini">
<body class="hold-transition {{ option('color_scheme') }} sidebar-mini">
<div class="wrapper">
<!-- Main Header -->
<header class="main-header">
<!-- Logo -->
<a href="{{ Option::get('site_url') }}" class="logo">
<a href="{{ option('site_url') }}" class="logo">
<!-- mini logo for sidebar mini 50x50 pixels -->
<span class="logo-mini"> <i class="fa fa-bookmark"></i> </span>
<!-- logo for regular state and mobile devices -->
<span class="logo-lg">{{ Option::get('site_name') }}</span>
<span class="logo-lg">{{ option('site_name') }}</span>
</a>
<!-- Header Navbar -->
@ -41,7 +41,7 @@
<!-- Language Menu -->
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-language" aria-hidden="true"></i> {{ trans('index.langs') }} <span class="caret"></span>
<i class="fa fa-language" aria-hidden="true"></i> {{ trans('general.langs') }} <span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
@foreach(config('locales') as $locale => $lang)
@ -55,7 +55,7 @@
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-user"></i>
<!-- hidden-xs hides the username on small devices so only the image appears. -->
<span class="hidden-xs nickname">{{ Utils::getNameOrEmail($user) }}</span>
<span class="hidden-xs nickname">{{ bs_nickname($user) }}</span>
</a>
<ul class="dropdown-menu">
<!-- The user image in the menu -->
@ -66,10 +66,10 @@
<!-- Menu Footer-->
<li class="user-footer">
<div class="pull-left">
<a href="{{ url('user/profile') }}" class="btn btn-default btn-flat">我的资料</a>
<a href="{{ url('user/profile') }}" class="btn btn-default btn-flat">{{ trans('general.profile') }}</a>
</div>
<div class="pull-right">
<a href="javascript:logout();" class="btn btn-default btn-flat">登出</a>
<a href="javascript:logout();" class="btn btn-default btn-flat">{{ trans('general.logout') }}</a>
</div>
</li>
</ul>
@ -90,26 +90,18 @@
<img src="{{ avatar($user, 45) }}" alt="User Image">
</div>
<div class="pull-left info">
<p class="nickname">{{ Utils::getNameOrEmail($user) }}</p>
<i class="fa fa-circle text-success"></i> Online
<p class="nickname">{{ bs_nickname($user) }}</p>
<i class="fa fa-circle text-success"></i> {{ trans('general.online') }}
</div>
</div>
<!-- Sidebar Menu -->
<ul class="sidebar-menu">
<li class="header">管理面板</li>
<?php $menu = require BASE_DIR."/config/menu.php"; ?>
<li class="header">{{ trans('general.admin-panel') }}</li>
{!! bs_menu('admin', $__env->yieldContent('title')) !!}
@foreach ($menu['admin'] as $key => $value)
<li class="{{ ($__env->yieldContent('title') == $value['title']) ? 'active' : '' }}">
<a href="{{ url($value['link']) }}"><i class="fa {{ $value['icon'] }}"></i> <span>{{ $value['title'] }}</span></a>
</li>
@endforeach
@if ($user->is_admin)
<li class="header">返回</li>
<li><a href="{{ url('user') }}"><i class="fa fa-user"></i> <span>用户中心</span></a></li>
@endif
<li class="header">{{ trans('general.back') }}</li>
<li><a href="{{ url('user') }}"><i class="fa fa-user"></i> <span>{{ trans('general.user-center') }}</span></a></li>
</ul><!-- /.sidebar-menu -->
</section>
<!-- /.sidebar -->
@ -119,14 +111,14 @@
<!-- Main Footer -->
<footer class="main-footer">
@if (Option::get('show_footer_copyright'))
@if (option('show_footer_copyright'))
<!-- To the right -->
<div class="pull-right hidden-xs">
Powered with by <a href="https://github.com/printempw/blessing-skin-server">Blessing Skin Server</a>.
</div>
@endif
<!-- Default to the left -->
{!! Utils::getStringReplaced(Option::get('copyright_text'), ['{site_name}' => Option::get('site_name'), '{site_url}' => Option::get('site_url')]) !!}
{!! bs_copyright() !!}
</footer>
</div><!-- ./wrapper -->
@ -134,7 +126,7 @@
<!-- App Scripts -->
{!! bs_footer('admin') !!}
@if (Option::get('check_update') == '1')
@if (option('check_update') == '1')
<script>
$(document).ready(function() {
var url = "{{ url('admin/update') }}";

View File

@ -56,21 +56,21 @@
<tr>
<td class="key">站点标题</td>
<td class="value">
<input type="text" class="form-control" name="site_name" value="{{ Option::get('site_name') }}">
<input type="text" class="form-control" name="site_name" value="{{ option('site_name') }}">
</td>
</tr>
<tr>
<td class="key">站点描述</td>
<td class="value">
<input type="text" class="form-control" name="site_description" value="{{ Option::get('site_description') }}">
<input type="text" class="form-control" name="site_description" value="{{ option('site_description') }}">
</td>
</tr>
<tr title="以 http(s):// 开头,不要以 / 结尾" data-toggle="tooltip" data-placement="top">
<td class="key">站点地址URL</td>
<td class="value">
<input type="text" class="form-control" name="site_url" value="{{ Option::get('site_url') }}">
<input type="text" class="form-control" name="site_url" value="{{ option('site_url') }}">
</td>
</tr>
@ -78,7 +78,7 @@
<td class="key">开放注册</td>
<td class="value">
<label for="user_can_register">
<input {{ (Option::get('user_can_register') == '1') ? 'checked="true"' : '' }} type="checkbox" id="user_can_register" name="user_can_register" value="1"> 任何人都可以注册
<input {{ (option('user_can_register') == '1') ? 'checked="true"' : '' }} type="checkbox" id="user_can_register" name="user_can_register" value="1"> 任何人都可以注册
</label>
</td>
</tr>
@ -86,7 +86,7 @@
<tr>
<td class="key">每个 IP 限制注册数</td>
<td class="value">
<input type="text" class="form-control" name="regs_per_ip" value="{{ Option::get('regs_per_ip') }}">
<input type="text" class="form-control" name="regs_per_ip" value="{{ option('regs_per_ip') }}">
</td>
</tr>
@ -94,7 +94,7 @@
<td class="key">角色名</td>
<td class="value">
<label for="allow_chinese_playername">
<input {{ (Option::get('allow_chinese_playername') == '1') ? 'checked="true"' : '' }} type="checkbox" id="allow_chinese_playername" name="allow_chinese_playername" value="1"> 允许中文角色名
<input {{ (option('allow_chinese_playername') == '1') ? 'checked="true"' : '' }} type="checkbox" id="allow_chinese_playername" name="allow_chinese_playername" value="1"> 允许中文角色名
</label>
</td>
</tr>
@ -103,8 +103,8 @@
<td class="key">首选 JSON API</td>
<td class="value">
<select class="form-control" name="api_type">
<option {{ (Option::get('api_type') == '0') ? 'selected="selected"' : '' }} value="0">CustomSkinLoader API</option>
<option {{ (Option::get('api_type') == '1') ? 'selected="selected"' : '' }} value="1">UniversalSkinAPI</option>
<option {{ (option('api_type') == '0') ? 'selected="selected"' : '' }} value="0">CustomSkinLoader API</option>
<option {{ (option('api_type') == '1') ? 'selected="selected"' : '' }} value="1">UniversalSkinAPI</option>
</select>
</td>
</tr>
@ -115,7 +115,7 @@
</td>
<td class="value">
<label for="avatar_query_string">
<input {{ (Option::get('avatar_query_string') == '1') ? 'checked="true"' : '' }} type="checkbox" id="avatar_query_string" name="avatar_query_string" value="1"> 为头像添加 Query String
<input {{ (option('avatar_query_string') == '1') ? 'checked="true"' : '' }} type="checkbox" id="avatar_query_string" name="avatar_query_string" value="1"> 为头像添加 Query String
</label>
</td>
</tr>
@ -126,7 +126,7 @@
</td>
<td class="value">
<label for="auto_del_invalid_texture">
<input {{ (Option::get('auto_del_invalid_texture') == '1') ? 'checked="true"' : '' }} type="checkbox" id="auto_del_invalid_texture" name="auto_del_invalid_texture" value="1"> 自动删除失效材质
<input {{ (option('auto_del_invalid_texture') == '1') ? 'checked="true"' : '' }} type="checkbox" id="auto_del_invalid_texture" name="auto_del_invalid_texture" value="1"> 自动删除失效材质
</label>
</td>
</tr>
@ -136,7 +136,7 @@
<i class="fa fa-question-circle" title="就是 Disqus多说畅言等评论服务提供的代码。留空以停用评论功能" data-toggle="tooltip" data-placement="top"></i>
</td>
<td class="value">
<textarea class="form-control" rows="6" name="comment_script">{{ Option::get('comment_script') }}</textarea>
<textarea class="form-control" rows="6" name="comment_script">{{ option('comment_script') }}</textarea>
<p class="description">评论代码内可使用占位符,<code>{tid}</code> 将会被自动替换为材质的 id<code>{name}</code> 会被替换为材质名称,<code>{url}</code> 会被替换为当前页面地址。</p>
</td>
</tr>
@ -164,7 +164,7 @@
echo '<div class="callout callout-success">设置已保存。</div>';
} ?>
<textarea name="announcement" class="form-control" rows="3">{{ Option::get('announcement') }}</textarea>
<textarea name="announcement" class="form-control" rows="3">{{ option('announcement') }}</textarea>
<p class="description">站点公告内容不会被转义,因此您可以使用 HTML 进行排版</p>
</div><!-- /.box-body -->

View File

@ -39,7 +39,7 @@
<td class="key">存储</td>
<td class="value">
<div class="input-group">
<input type="text" class="form-control" name="score_per_storage" value="{{ Option::get('score_per_storage') }}">
<input type="text" class="form-control" name="score_per_storage" value="{{ option('score_per_storage') }}">
<span class="input-group-addon">积分 = 1 KB</span>
</div>
@ -52,7 +52,7 @@
</td>
<td class="value">
<div class="input-group">
<input type="text" class="form-control" name="private_score_per_storage" value="{{ Option::get('private_score_per_storage') }}">
<input type="text" class="form-control" name="private_score_per_storage" value="{{ option('private_score_per_storage') }}">
<span class="input-group-addon">积分 = 1 KB</span>
</div>
@ -63,7 +63,7 @@
<td class="key">角色</td>
<td class="value">
<div class="input-group">
<input type="text" class="form-control" name="score_per_player" value="{{ Option::get('score_per_player') }}">
<input type="text" class="form-control" name="score_per_player" value="{{ option('score_per_player') }}">
<span class="input-group-addon">积分 = 一个角色</span>
</div>
</td>
@ -72,7 +72,7 @@
<tr>
<td class="key">新用户默认积分</td>
<td class="value">
<input type="text" class="form-control" name="user_initial_score" value="{{ Option::get('user_initial_score') }}">
<input type="text" class="form-control" name="user_initial_score" value="{{ option('user_initial_score') }}">
</td>
</tr>
</tbody>
@ -107,9 +107,9 @@
<td class="key">签到获得积分</td>
<td class="value">
<div class="input-group">
<input type="text" class="form-control" name="sign_score_from" value="{{ explode(',', Option::get('sign_score'))[0] }}">
<input type="text" class="form-control" name="sign_score_from" value="{{ explode(',', option('sign_score'))[0] }}">
<span class="input-group-addon" style="border-right: 0; border-left: 0;">积分 ~ </span>
<input type="text" class="form-control" name="sign_score_to" value="{{ explode(',', Option::get('sign_score'))[1] }}">
<input type="text" class="form-control" name="sign_score_to" value="{{ explode(',', option('sign_score'))[1] }}">
<span class="input-group-addon">积分</span>
</div>
@ -120,7 +120,7 @@
<td class="key">签到间隔时间</td>
<td class="value">
<div class="input-group">
<input type="text" class="form-control" name="sign_gap_time" value="{{ Option::get('sign_gap_time') }}">
<input type="text" class="form-control" name="sign_gap_time" value="{{ option('sign_gap_time') }}">
<span class="input-group-addon">小时</span>
</div>
@ -133,7 +133,7 @@
</td>
<td class="value">
<label for="sign_after_zero">
<input {{ (Option::get('sign_after_zero') == '1') ? 'checked="true"' : '' }} type="checkbox" id="sign_after_zero" name="sign_after_zero" value="1"> 每天零点后可签到
<input {{ (option('sign_after_zero') == '1') ? 'checked="true"' : '' }} type="checkbox" id="sign_after_zero" name="sign_after_zero" value="1"> 每天零点后可签到
</label>
</td>
</tr>

View File

@ -130,12 +130,12 @@
<td class="key">检查更新</td>
<td class="value">
<label for="check_update">
<input {{ (Option::get('check_update') == '1') ? 'checked="true"' : '' }} type="checkbox" id="check_update" name="check_update" value="1"> 自动检查更新并提示
<input {{ (option('check_update') == '1') ? 'checked="true"' : '' }} type="checkbox" id="check_update" name="check_update" value="1"> 自动检查更新并提示
</label>
</td>
</tr>
<?php $current_source = Option::get('update_source'); ?>
<?php $current_source = option('update_source'); ?>
<tr>
<td class="key">更新源</td>
<td class="value">

View File

@ -6,7 +6,7 @@
<div class="login-box">
<div class="login-logo">
<a href="{{ url('/') }}">{{ Option::get('site_name') }}</a>
<a href="{{ url('/') }}">{{ option('site_name') }}</a>
</div>
<!-- /.login-logo -->
<div class="login-box-body">

View File

@ -6,7 +6,7 @@
<div class="login-box">
<div class="login-logo">
<a href="{{ url('/') }}">{{ Option::get('site_name') }}</a>
<a href="{{ url('/') }}">{{ option('site_name') }}</a>
</div>
<!-- /.login-logo -->
<div class="login-box-body">

View File

@ -6,7 +6,7 @@
<div class="login-box">
<div class="login-logo">
<a href="{{ url('/') }}">{{ Option::get('site_name') }}</a>
<a href="{{ url('/') }}">{{ option('site_name') }}</a>
</div>
<!-- /.login-logo -->
<div class="login-box-body">

View File

@ -4,9 +4,9 @@
<center>
<div style="margin:0 auto;width:580px;background:#fff;text-align:left">
<h1 style="margin:0 40px;color:#999;border-bottom:1px dotted #ddd;padding:40px 0 30px;text-align:center;font-size: 35px;font-family:Minecraft,'Helvetica Neue',Arial,'Microsoft Yahei','Microsoft Jhenghei',sans-serif">
{{ Option::get('site_name') }}
{{ option('site_name') }}
</h1>
<div style="padding:30px 40px 40px">{!! trans('auth.mail.message', ['sitename' => "<a style='color:#009a61;text-decoration:none' href='".Option::get('site_url')."'>".Option::get('site_name')."</a>"]) !!}<br><br>
<div style="padding:30px 40px 40px">{!! trans('auth.mail.message', ['sitename' => "<a style='color:#009a61;text-decoration:none' href='".option('site_url')."'>".option('site_name')."</a>"]) !!}<br><br>
<div style="border-left:5px solid #ddd;padding:0 0 0 24px;color:#888">
{{ trans('auth.mail.ignore') }}
</div>

View File

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>@yield('title') - {{ Option::get('site_name') }}</title>
<title>@yield('title') - {{ option('site_name') }}</title>
<link rel="shortcut icon" href="{{ assets('images/favicon.ico') }}">
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- App Styles -->

View File

@ -6,11 +6,11 @@
<div class="register-box">
<div class="register-logo">
<a href="{{ url('/') }}">{{ Option::get('site_name') }}</a>
<a href="{{ url('/') }}">{{ option('site_name') }}</a>
</div>
<div class="register-box-body">
<p class="login-box-msg">{{ trans('auth.register.message', ['sitename' => Option::get('site_name')]) }}</p>
<p class="login-box-msg">{{ trans('auth.register.message', ['sitename' => option('site_name')]) }}</p>
<form id="register-form">
<div class="form-group has-feedback">

View File

@ -6,7 +6,7 @@
<div class="login-box">
<div class="login-logo">
<a href="{{ url('/') }}">{{ Option::get('site_name') }}</a>
<a href="{{ url('/') }}">{{ option('site_name') }}</a>
</div>
<div class="login-box-body">

View File

@ -3,39 +3,38 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>{{ Option::get('site_name') }}</title>
<title>{{ option('site_name') }}</title>
<link rel="shortcut icon" href="{{ assets('images/favicon.ico') }}">
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- App Styles -->
{!! bs_header('index') !!}
<style>
.wrapper {
background-image: url('{{ Option::get('home_pic_url') }}');
}
</style>
</head>
<body class="hold-transition {{ Option::get('color_scheme') }} layout-top-nav">
<div class="wrapper">
<body class="hold-transition {{ option('color_scheme') }} layout-top-nav">
<div class="wrapper" style="background-image: url('{{ option('home_pic_url') }}');">
<header class="main-header">
<nav class="navbar navbar-static-top">
<div class="container">
<div class="navbar-header">
<a href="{{ Option::get('site_url') }}" class="navbar-brand">{{ Option::get('site_name') }}</a>
<a href="{{ option('site_url') }}" class="navbar-brand">{{ option('site_name') }}</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse pull-left" id="navbar-collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="{{ url('/') }}">{{ trans('index.index') }}</a></li>
<li><a href="{{ url('skinlib') }}">{{ trans('index.skinlib') }}</a></li>
<li class="active"><a href="{{ url('/') }}">{{ trans('general.index') }}</a></li>
<li><a href="{{ url('skinlib') }}">{{ trans('general.skinlib') }}</a></li>
</ul>
</div><!-- /.navbar-collapse -->
<!-- Navbar Right Menu -->
<div class="navbar-custom-menu">
<ul class="nav navbar-nav">
<!-- Language Menu -->
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-language" aria-hidden="true"></i> {{ trans('index.langs') }} <span class="caret"></span>
<i class="fa fa-language" aria-hidden="true"></i> {{ trans('general.langs') }} <span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
@foreach(config('locales') as $locale => $lang)
@ -43,46 +42,41 @@
@endforeach
</ul>
</li>
@if (!is_null($user))
<!-- User Account Menu -->
<li class="dropdown user user-menu">
<!-- Menu Toggle Button -->
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<!-- The user image in the navbar-->
<img src="{{ avatar($user, 25) }}" class="user-image" alt="User Image">
<!-- hidden-xs hides the username on small devices so only the image appears. -->
<span class="hidden-xs nickname">{{ bs_nickname($user) }}</span>
</a>
<ul class="dropdown-menu">
<!-- The user image in the menu -->
<li class="user-header">
<img src="{{ avatar($user, 128) }}" alt="User Image">
<p>{{ $user->email }}</p>
</li>
<!-- Menu Footer-->
<li class="user-footer">
<div class="pull-left">
<a href="{{ url('user') }}" class="btn btn-default btn-flat">{{ trans('general.user-center') }}</a>
</div>
<div class="pull-right">
<a href="javascript:logout();" class="btn btn-default btn-flat">{{ trans('general.logout') }}</a>
</div>
</li>
</ul>
</li>
@else {{-- Anonymous User --}}
<!-- User Account Menu -->
<li class="dropdown user user-menu">
<a href="{{ url('auth/login') }}" class="btn btn-login">{{ trans('general.login') }}</a>
</li>
@endif
</ul>
</div><!-- /.navbar-collapse -->
<!-- Navbar Right Menu -->
<div class="navbar-custom-menu">
<ul class="nav navbar-nav">
@if (!is_null($user))
<!-- User Account Menu -->
<li class="dropdown user user-menu">
<!-- Menu Toggle Button -->
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<!-- The user image in the navbar-->
<img src="{{ avatar($user, 25) }}" class="user-image" alt="User Image">
<!-- hidden-xs hides the username on small devices so only the image appears. -->
<span class="hidden-xs nickname">{{ Utils::getNameOrEmail($user) }}</span>
</a>
<ul class="dropdown-menu">
<!-- The user image in the menu -->
<li class="user-header">
<img src="{{ avatar($user, 128) }}" alt="User Image">
<p>{{ $user->email }}</p>
</li>
<!-- Menu Footer-->
<li class="user-footer">
<div class="pull-left">
<a href="{{ url('user') }}" class="btn btn-default btn-flat">{{ trans('index.user-center') }}</a>
</div>
<div class="pull-right">
<a href="javascript:logout();" class="btn btn-default btn-flat">{{ trans('index.logout') }}</a>
</div>
</li>
</ul>
</li>
@else {{-- Anonymous User --}}
<!-- User Account Menu -->
<li class="dropdown user user-menu">
<a href="{{ url('auth/login') }}" class="btn btn-login">{{ trans('index.login') }}</a>
</li>
@endif
</ul>
</div><!-- /.navbar-custom-menu -->
</div><!-- /.navbar-custom-menu -->
</div><!-- /.container-fluid -->
</nav>
</header>
@ -91,15 +85,15 @@
<div class="content-wrapper">
<div class="container">
<div class="splash">
<h1 class="splash-head">{{ Option::get('site_name') }}</h1>
<h1 class="splash-head">{{ option('site_name') }}</h1>
<p class="splash-subhead">
{{ Option::get('site_description') }}
{{ option('site_description') }}
</p>
<p>
@if (is_null($user))
<a href="{{ url('auth/register') }}" class="button">{{ trans('index.register') }}</a>
<a href="{{ url('auth/register') }}" class="button">{{ trans('general.register') }}</a>
@else
<a href="{{ url('user') }}" class="button">{{ trans('index.user-center') }}</a>
<a href="{{ url('user') }}" class="button">{{ trans('general.user-center') }}</a>
@endif
</p>
</div>
@ -109,7 +103,7 @@
<!-- Main Footer -->
<footer class="main-footer">
<div class="container text-center">
{!! Utils::getStringReplaced(Option::get('copyright_text'), ['{site_name}' => Option::get('site_name'), '{site_url}' => Option::get('site_url')]) !!}
{!! bs_copyright() !!}
</div>
</footer>

View File

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>@yield('title') - {{ Option::get('site_name') }}</title>
<title>@yield('title') - {{ option('site_name') }}</title>
<link rel="shortcut icon" href="{{ assets('images/favicon.ico') }}">
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
@ -13,14 +13,14 @@
@yield('style')
</head>
<body class="hold-transition {{ Option::get('color_scheme') }} layout-top-nav">
<body class="hold-transition {{ option('color_scheme') }} layout-top-nav">
<div class="wrapper">
<header class="main-header">
<nav class="navbar navbar-static-top">
<div class="container">
<div class="navbar-header">
<a href="{{ Option::get('site_url') }}" class="navbar-brand">{{ Option::get('site_name') }}</a>
<a href="{{ option('site_url') }}" class="navbar-brand">{{ option('site_name') }}</a>
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse">
<i class="fa fa-bars"></i>
</button>
@ -72,7 +72,7 @@
<!-- Language Menu -->
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-language" aria-hidden="true"></i> {{ trans('index.langs') }} <span class="caret"></span>
<i class="fa fa-language" aria-hidden="true"></i> {{ trans('general.langs') }} <span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
@foreach(config('locales') as $locale => $lang)
@ -90,7 +90,7 @@
<!-- The user image in the navbar-->
<img src="{{ avatar($user, 25) }}" class="user-image" alt="User Image">
<!-- hidden-xs hides the username on small devices so only the image appears. -->
<span class="hidden-xs nickname">{{ Utils::getNameOrEmail($user) }}</span>
<span class="hidden-xs nickname">{{ bs_nickname($user) }}</span>
</a>
<ul class="dropdown-menu">
<!-- The user image in the menu -->
@ -101,10 +101,10 @@
<!-- Menu Footer-->
<li class="user-footer">
<div class="pull-left">
<a href="{{ url('user') }}" class="btn btn-default btn-flat">用户中心</a>
<a href="{{ url('user') }}" class="btn btn-default btn-flat">{{ trans('general.user-center') }}</a>
</div>
<div class="pull-right">
<a href="javascript:logout();" class="btn btn-default btn-flat">登出</a>
<a href="javascript:logout();" class="btn btn-default btn-flat">{{ trans('general.logout') }}</a>
</div>
</li>
</ul>
@ -116,7 +116,7 @@
<a href="{{ url('auth/login') }}">
<i class="fa fa-user"></i>
<!-- hidden-xs hides the username on small devices so only the image appears. -->
<span class="hidden-xs nickname">未登录</span>
<span class="hidden-xs nickname">{{ trans('general.anonymous') }}</span>
</a>
</li>
@endif
@ -131,14 +131,14 @@
<!-- Main Footer -->
<footer class="main-footer">
<div class="container">
@if (Option::get('show_footer_copyright'))
@if (option('show_footer_copyright'))
<!-- To the right -->
<div class="pull-right hidden-xs">
Powered with by <a href="https://github.com/printempw/blessing-skin-server">Blessing Skin Server</a>.
</div>
@endif
<!-- Default to the left -->
{!! Utils::getStringReplaced(Option::get('copyright_text'), ['{site_name}' => Option::get('site_name'), '{site_url}' => Option::get('site_url')]) !!}
{!! bs_copyright() !!}
</div>
</footer>

View File

@ -144,9 +144,9 @@
<h3 class="box-title">评论区</h3>
</div><!-- /.box-header -->
<div class="box-body">
@if (Option::get('comment_script') != "")
@if (option('comment_script') != "")
<!-- Comment Start -->
{!! Utils::getStringReplaced(Option::get('comment_script'), ['{tid}' => $texture->tid, '{name}' => $texture->name, '{url}' => get_current_url()]) !!}
{!! Utils::getStringReplaced(option('comment_script'), ['{tid}' => $texture->tid, '{name}' => $texture->name, '{url}' => get_current_url()]) !!}
<!-- Comment End -->
@else
<p style="text-align: center; margin: 30px 0;">本站未开启评论服务</p>

View File

@ -72,7 +72,7 @@ label[for="type-cape"] {
</div>
<div class="callout callout-info" id="msg" style="display: none;">
<p>私密材质将会消耗更多的积分:每 KB 存储空间 {{ Option::get('private_score_per_storage') }} 积分</p>
<p>私密材质将会消耗更多的积分:每 KB 存储空间 {{ option('private_score_per_storage') }} 积分</p>
</div>
</div><!-- /.box-body -->

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
@extends('user.master')
@section('title', '配置生成')
@section('title', trans('general.generate-config'))
@section('style')
<link rel="stylesheet" href="{{ assets('vendor/highlight/styles/arduino-light.css') }}">
@ -14,7 +14,7 @@
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
配置生成
{{ trans('general.generate-config') }}
<small>Configuration Generator</small>
</h1>
</section>
@ -25,17 +25,16 @@
<div class="col-md-6">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">MOD 需求</h3>
<h3 class="box-title">{{ trans('user.config.mod-requirement') }}</h3>
</div><!-- /.box-header -->
<div class="box-body">
<p>本站支持的皮肤 MOD <a href="http://www.mcbbs.net/forum.php?mod=viewthread&tid=358932" target="_blank">UniSkinMod</a><a href="http://www.mcbbs.net/thread-269807-1-1.html" target="_blank">CustomSkinLoader</a> 各自的新版和旧版,以及任何支持传统皮肤加载链接的皮肤 MOD。</p>
<p>详细教程:<a href="https://github.com/printempw/blessing-skin-server#客户端配置" target="_blank">@GitHub</a></p>
{!! trans('user.config.mod-intro') !!}
</div><!-- /.box-body -->
</div><!-- /.box -->
<div class="box box-default">
<div class="box-header with-border">
<h3 class="box-title">配置生成</h3>
<h3 class="box-title">{{ trans('general.generate-config') }}</h3>
</div><!-- /.box-header -->
<div class="box-body">
<table class="table">
@ -51,11 +50,9 @@
</tr>
<tr>
<td class="key">版本</td>
<td class="key">{{ trans('user.config.version') }}</td>
<td class="value">
<select class="form-control" id="version-select">
<option value="13_1-upper">13.1 版及以上(推荐)</option>
<option value="13_1-lower">13.1 版以下</option>
</select>
</td>
</tr>
@ -67,7 +64,7 @@
<div class="col-md-6">
<div class="box box-default">
<div class="box-header with-border">
<h3 class="box-title">配置文件</h3>
<h3 class="box-title">{{ trans('user.config.config-file') }}</h3>
</div><!-- /.box-header -->
<div class="box-body">
@ -76,9 +73,9 @@
"enable": true,
"loadlist": [
{
"name": "<?php echo Option::get('site_name'); ?>",
"name": "<?php echo option('site_name'); ?>",
"type": "CustomSkinAPI",
"root": "<?php echo Option::get('site_url')."/csl/"; ?>"
"root": "<?php echo option('site_url')."/csl/"; ?>"
},
{
"name": "Mojang",
@ -90,17 +87,17 @@
<pre id="config-13_1-lower" class="hljs ini" style="display: none;">
# skinurls.txt
<?php echo Option::get('site_url'); ?>/skin/*.png
<?php echo option('site_url'); ?>/skin/*.png
http://skins.minecraft.net/MinecraftSkins/*.png
# capeurls.txt
<?php echo Option::get('site_url'); ?>/cape/*.png
<?php echo option('site_url'); ?>/cape/*.png
</pre>
<pre id="config-1_4-upper" style="display: none;">
{
"rootURIs": [
"<?php echo Option::get('site_url'); ?>/usm",
"<?php echo option('site_url'); ?>/usm",
"http://www.skinme.cc/uniskin"
],
"legacySkinURIs": [],
@ -109,14 +106,14 @@ http://skins.minecraft.net/MinecraftSkins/*.png
</pre>
<pre id="config-1_2-1_3" class="hljs ini" style="display: none;">
# <?php echo Option::get('site_name')."\n"; ?>
Root: <?php echo Option::get('site_url'); ?>/usm
# <?php echo option('site_name')."\n"; ?>
Root: <?php echo option('site_url'); ?>/usm
</pre>
<pre id="config-1_2-lower" class="hljs ini" style="display: none;">
# <?php echo Option::get('site_name')."\n"; ?>
Skin: <?php echo Option::get('site_url'); ?>/skin/%s.png
Cape: <?php echo Option::get('site_url'); ?>/cape/%s.png
# <?php echo option('site_name')."\n"; ?>
Skin: <?php echo option('site_url'); ?>/skin/%s.png
Cape: <?php echo option('site_url'); ?>/cape/%s.png
# Mojang
Skin: http://skins.minecraft.net/MinecraftSkins/%s.png
Cape: http://skins.minecraft.net/MinecraftCloaks/%s.png
@ -140,6 +137,37 @@ Cape: http://skins.minecraft.net/MinecraftCloaks/%s.png
hljs.highlightBlock(block);
});
});
function freshVersionSelect(element) {
$('#version-select').children().each(function() { $(this).remove(); });
if ($(element).val() == "csl") {
$('#version-select').append('<option value="13_1-upper">'+trans('config.csl13_1Upper')+'</option>');
$('#version-select').append('<option value="13_1-lower">'+trans('config.csl13_1Lower')+'</option>');
} else if ($(element).val() == "usm") {
$('#version-select').append('<option value="1_4-upper">'+trans('config.usm1_4Upper')+'</option>');
$('#version-select').append('<option value="1_2-1_3">'+trans('config.usm1_2To1_3')+'</option>');
$('#version-select').append('<option value="1_2-lower">'+trans('config.usm1_2Lower')+'</option>');
}
showConfig();
}
function showConfig() {
$('#config-13_1-upper').hide();
$('#config-13_1-lower').hide();
$('#config-1_4-upper').hide();
$('#config-1_2-1_3').hide();
$('#config-1_2-lower').hide();
$('#config-'+$('#version-select').val()).show();
}
$('#mod-select').change(function() {
freshVersionSelect(this);
});
$('#version-select').change(showConfig);
freshVersionSelect('#mod-select');
</script>
@endsection

View File

@ -1,6 +1,6 @@
@extends('user.master')
@section('title', '仪表盘')
@section('title', trans('general.dashboard'))
@section('content')
@ -9,7 +9,7 @@
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
仪表盘
{{ trans('general.dashboard') }}
<small>Dashboard</small>
</h1>
</section>
@ -25,15 +25,15 @@
<div class="col-md-8">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">使用情况</h3>
<h3 class="box-title">{{ trans('user.used.title') }}</h3>
</div><!-- /.box-header -->
<div class="box-body">
<div class="row">
<div class="col-md-8">
<div class="progress-group">
<span class="progress-text">角色数量</span>
<span class="progress-text">{{ trans('user.used.players') }}</span>
<?php
$players_available = count($user->getPlayers()) + floor($user->getScore() / Option::get('score_per_player'));
$players_available = count($user->getPlayers()) + floor($user->getScore() / option('score_per_player'));
$percent = ($players_available == 0) ? 0 : count($user->getPlayers()) / $players_available * 100
?>
<span class="progress-number"><b>{{ count($user->getPlayers()) }}</b>/{{ $players_available }}</span>
@ -42,8 +42,8 @@
</div>
</div><!-- /.progress-group -->
<div class="progress-group">
<span class="progress-text">存储空间</span>
<?php $rate = Option::get('score_per_storage'); ?>
<span class="progress-text">{{ trans('user.used.storage') }}</span>
<?php $rate = option('score_per_storage'); ?>
@if ($user->getStorageUsed() > 1024)
<span class="progress-number">
<b>{{ round($user->getStorageUsed() / 1024, 1) }}</b>/
@ -63,23 +63,23 @@
</div><!-- /.col -->
<div class="col-md-4">
<p class="text-center">
<strong>当前积分</strong>
<strong>{{ trans('user.cur-score') }}</strong>
</p>
<p id="score" data-toggle="modal" data-target="#modal-score-instruction">
{{ $user->getScore() }}
</p>
<p class="text-center" style="font-size: smaller; margin-top: 20px;">点击积分查看说明</p>
<p class="text-center" style="font-size: smaller; margin-top: 20px;">{{ trans('user.score-notice') }}</p>
</div><!-- /.col -->
</div><!-- /.row -->
</div><!-- ./box-body -->
<div class="box-footer">
@if ($user->canSign())
<button id="sign-button" class="btn btn-primary pull-left" onclick="sign()">
<i class="fa fa-calendar-check-o" aria-hidden="true"></i> &nbsp;每日签到
<i class="fa fa-calendar-check-o" aria-hidden="true"></i> &nbsp;{{ trans('user.sign') }}
</button>
@else
<button class="btn btn-primary pull-left" title="上次签到于 {{ $user->getLastSignTime() }}" disabled="disabled">
<i class="fa fa-calendar-check-o" aria-hidden="true"></i> &nbsp;{{ $user->canSign(true) }} 小时后可签到
<button class="btn btn-primary pull-left" title="{{ trans('user.last-sign', ['time' => $user->getLastSignTime()]) }}" disabled="disabled">
<i class="fa fa-calendar-check-o" aria-hidden="true"></i> &nbsp;{{ trans('user.remain-time', ['time' => $user->canSign(true)]) }}
</button>
@endif
</div><!-- /.box-footer -->
@ -89,10 +89,10 @@
<div class="col-md-4">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">公告</h3>
<h3 class="box-title">{{ trans('user.announcement') }}</h3>
</div><!-- /.box-header -->
<div class="box-body">
{!! nl2br(Option::get('announcement')) !!}
{!! nl2br(option('announcement')) !!}
</div><!-- /.box-body -->
</div>
</div>
@ -107,36 +107,29 @@
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">积分是个啥?</h4>
<h4 class="modal-title">{{ trans('user.score-intro.title') }}</h4>
</div>
<div class="modal-body">
<p>「既然你诚心诚意地发问了!」</p>
<p>「那我们就大发慈悲地告诉你!」</p>
<p>「为了守护皮肤站的和平」</p>
<p>「为了防止皮肤站被破坏」</p>
<p>「贯彻爱与真实的。。呸!」上面只是卖下萌~</p>
<hr />
<p>为了不出现用户一个劲上传材质导致存储空间爆满,我们决定启用积分系统。</p>
<p>添加角色以及上传材质都会消耗积分,而删除已经添加的角色和已上传的材质时积分将会被返还。</p>
<?php $sign_score = explode(',', Option::get('sign_score')); ?>
<p>本站用户初始积分为 {{ \Option::get('user_initial_score') }},每日签到可以随机获得 {{ $sign_score[0] }} ~ {{ $sign_score[1] }} 积分</p>
<p>添加皮肤库里的材质到衣柜不消耗积分。</p>
<?php list($from, $to) = explode(',', Option::get('sign_score')); ?>
{!! nl2br(trans('user.score-intro.introduction', [
'initial_score' => option('user_initial_score'),
'score-from' => $from,
'score-to' => $to
])) !!}
<hr />
<div class="row">
<div class="col-md-6">
<p class="text-center">{{ Option::get('score_per_storage') }} 积分 = 1 KB 存储空间</p>
<p class="text-center">{{ trans('user.score-intro.rates.storage', ['score' => option('score_per_storage')]) }}</p>
</div>
<div class="col-md-6">
<p class="text-center">{{ Option::get('score_per_player') }} 积分 = 1 个角色</p>
<p class="text-center">{{ trans('user.score-intro.rates.player', ['score' => option('score_per_player')]) }}</p>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('general.close') }}</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->

View File

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>@yield('title') - {{ Option::get('site_name') }}</title>
<title>@yield('title') - {{ option('site_name') }}</title>
<link rel="shortcut icon" href="{{ assets('images/favicon.ico') }}">
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
@ -13,18 +13,18 @@
@yield('style')
</head>
<body class="hold-transition {{ Option::get('color_scheme') }} sidebar-mini">
<body class="hold-transition {{ option('color_scheme') }} sidebar-mini">
<div class="wrapper">
<!-- Main Header -->
<header class="main-header">
<!-- Logo -->
<a href="{{ Option::get('site_url') }}" class="logo">
<a href="{{ option('site_url') }}" class="logo">
<!-- mini logo for sidebar mini 50x50 pixels -->
<span class="logo-mini"> <i class="fa fa-bookmark"></i> </span>
<!-- logo for regular state and mobile devices -->
<span class="logo-lg">{{ Option::get('site_name') }}</span>
<span class="logo-lg">{{ option('site_name') }}</span>
</a>
<!-- Header Navbar -->
@ -39,7 +39,7 @@
<!-- Language Menu -->
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-language" aria-hidden="true"></i> {{ trans('index.langs') }} <span class="caret"></span>
<i class="fa fa-language" aria-hidden="true"></i> {{ trans('general.langs') }} <span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
@foreach(config('locales') as $locale => $lang)
@ -53,7 +53,7 @@
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-user"></i>
<!-- hidden-xs hides the username on small devices so only the image appears. -->
<span class="hidden-xs nickname">{{ Utils::getNameOrEmail($user) }}</span>
<span class="hidden-xs nickname">{{ bs_nickname($user) }}</span>
</a>
<ul class="dropdown-menu">
<!-- The user image in the menu -->
@ -64,10 +64,10 @@
<!-- Menu Footer-->
<li class="user-footer">
<div class="pull-left">
<a href="{{ url('user/profile') }}" class="btn btn-default btn-flat">我的资料</a>
<a href="{{ url('user/profile') }}" class="btn btn-default btn-flat">{{ trans('general.profile') }}</a>
</div>
<div class="pull-right">
<a href="javascript:logout();" class="btn btn-default btn-flat">登出</a>
<a href="javascript:logout();" class="btn btn-default btn-flat">{{ trans('general.logout') }}</a>
</div>
</li>
</ul>
@ -88,28 +88,22 @@
<img src="{{ avatar($user, 45) }}" alt="User Image">
</div>
<div class="pull-left info">
<p class="nickname">{{ Utils::getNameOrEmail($user) }}</p>
<i class="fa fa-circle text-success"></i> Online
<p class="nickname">{{ bs_nickname($user) }}</p>
<i class="fa fa-circle text-success"></i> {{ trans('general.online') }}
</div>
</div>
<!-- Sidebar Menu -->
<ul class="sidebar-menu">
<li class="header">用户中心</li>
<?php $menu = require BASE_DIR."/config/menu.php"; ?>
<li class="header">{{ trans('general.user-center') }}</li>
{!! bs_menu('user', $__env->yieldContent('title')) !!}
@foreach ($menu['user'] as $key => $value)
<li class="{{ ($__env->yieldContent('title') == $value['title']) ? 'active' : '' }}">
<a href="{{ url($value['link']) }}"><i class="fa {{ $value['icon'] }}"></i> <span>{{ $value['title'] }}</span></a>
</li>
@endforeach
<li class="header">浏览</li>
<li><a href="{{ url('skinlib') }}"><i class="fa fa-archive"></i> <span>皮肤库</span></a></li>
<li class="header">{{ trans('general.explore') }}</li>
<li><a href="{{ url('skinlib') }}"><i class="fa fa-archive"></i> <span>{{ trans('general.skinlib') }}</span></a></li>
@if ($user->is_admin)
<li class="header">管理</li>
<li><a href="{{ url('admin') }}"><i class="fa fa-cog"></i> <span>管理面板</span></a></li>
<li class="header">{{ trans('general.manage') }}</li>
<li><a href="{{ url('admin') }}"><i class="fa fa-cog"></i> <span>{{ trans('general.admin-panel') }}</span></a></li>
@endif
</ul><!-- /.sidebar-menu -->
</section>
@ -120,14 +114,14 @@
<!-- Main Footer -->
<footer class="main-footer">
@if (Option::get('show_footer_copyright'))
@if (option('show_footer_copyright'))
<!-- To the right -->
<div class="pull-right hidden-xs">
Powered with by <a href="https://github.com/printempw/blessing-skin-server">Blessing Skin Server</a>.
</div>
@endif
<!-- Default to the left -->
{!! Utils::getStringReplaced(Option::get('copyright_text'), ['{site_name}' => Option::get('site_name'), '{site_url}' => Option::get('site_url')]) !!}
{!! bs_copyright() !!}
</footer>
</div><!-- ./wrapper -->

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
@extends('user.master')
@section('title', '个人资料')
@section('title', trans('general.profile'))
@section('content')
@ -9,7 +9,7 @@
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
个人资料
{{ trans('general.profile') }}
<small>User Profile</small>
</h1>
</section>
@ -20,84 +20,84 @@
<div class="col-md-6">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">更改头像?</h3>
<h3 class="box-title">{{ trans('user.profile.change-avatar') }}</h3>
</div><!-- /.box-header -->
<div class="box-body">
<p>请在衣柜中任意皮肤的右下角「<i class="fa fa-cog"></i>」处选择「设为头像」,将会自动截取该皮肤的头部作为头像哦~</p>
{!! trans('user.profile.avatar-notice') !!}
</div><!-- /.box-body -->
</div>
<div class="box box-warning">
<div class="box-header with-border">
<h3 class="box-title">更改密码</h3>
<h3 class="box-title">{{ trans('user.profile.password.title') }}</h3>
</div><!-- /.box-header -->
<div class="box-body">
<div class="form-group">
<label for="password">旧的密码</label>
<label for="password">{{ trans('user.profile.password.old') }}</label>
<input type="password" class="form-control" id="password" value="">
</div>
<div class="form-group">
<label for="new-passwd">新密码</label>
<label for="new-passwd">{{ trans('user.profile.password.new') }}</label>
<input type="password" class="form-control" id="new-passwd" value="">
</div>
<div class="form-group">
<label for="confirm-pwd">确认密码</label>
<label for="confirm-pwd">{{ trans('user.profile.password.confirm') }}</label>
<input type="password" class="form-control" id="confirm-pwd" value="">
</div>
</div><!-- /.box-body -->
<div class="box-footer">
<button onclick="changePassword()" class="btn btn-primary">修改密码</button>
<button onclick="changePassword()" class="btn btn-primary">{{ trans('user.profile.password.button') }}</button>
</div>
</div><!-- /.box -->
</div>
<div class="col-md-6">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">更改昵称</h3>
<h3 class="box-title">{{ trans('user.profile.nickname.title') }}</h3>
</div><!-- /.box-header -->
<div class="box-body">
<div class="form-group has-feedback">
<input id="new-nickname" type="text" class="form-control" placeholder="{{ ($user->getNickName() == '') ? '当前未设置昵称,' : '' }}可使用除一些特殊符号外的任意字符">
<input id="new-nickname" type="text" class="form-control" placeholder="{{ ($user->getNickName() == '') ? trans('user.profile.nickname.empty') : '' . trans('user.profile.nickname.rule') }}">
<span class="glyphicon glyphicon-user form-control-feedback"></span>
</div>
</div><!-- /.box-body -->
<div class="box-footer">
<button onclick="changeNickName()" class="btn btn-primary">提交</button>
<button onclick="changeNickName()" class="btn btn-primary">{{ trans('general.submit') }}</button>
</div>
</div>
<div class="box box-warning">
<div class="box-header with-border">
<h3 class="box-title">更改邮箱</h3>
<h3 class="box-title">{{ trans('user.profile.email.title') }}</h3>
</div><!-- /.box-header -->
<div class="box-body">
<div class="form-group has-feedback">
<input id="new-email" type="email" class="form-control" placeholder="新邮箱">
<input id="new-email" type="email" class="form-control" placeholder="{{ trans('user.profile.email.new') }}">
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
</div>
<div class="form-group has-feedback" style="display: none;">
<input id="current-password" type="password" class="form-control" placeholder="当前密码">
<input id="current-password" type="password" class="form-control" placeholder="{{ trans('user.profile.email.password') }}">
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
</div>
</div><!-- /.box-body -->
<div class="box-footer">
<button onclick="changeEmail()" class="btn btn-warning">修改邮箱</button>
<button onclick="changeEmail()" class="btn btn-warning">{{ trans('user.profile.email.button') }}</button>
</div>
</div>
<div class="box box-danger">
<div class="box-header with-border">
<h3 class="box-title">删除账号</h3>
<h3 class="box-title">{{ trans('user.profile.delete.title') }}</h3>
</div><!-- /.box-header -->
<div class="box-body">
@if (!$user->is_admin)
<p>确定要删除你在 {{ Option::get('site_name') }} 上的账号吗?</p>
<button id="delete" class="btn btn-danger" data-toggle="modal" data-target="#modal-delete-account">删除我的账户</button>
<p>{{ trans('user.profile.delete.notice', ['site' => option('site_name')]) }}</p>
<button id="delete" class="btn btn-danger" data-toggle="modal" data-target="#modal-delete-account">{{ trans('user.profile.delete.button') }}</button>
@else
<p>管理员账号不能被删除哟</p>
<button class="btn btn-danger" disabled="disabled">删除我的账户</button>
<p>{{ trans('user.profile.delete.admin') }}</p>
<button class="btn btn-danger" disabled="disabled">{{ trans('user.profile.delete.button') }}</button>
@endif
</div><!-- /.box-body -->
</div>
@ -112,20 +112,17 @@
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">这是危险操作,输入密码以继续</h4>
<h4 class="modal-title">{{ trans('user.profile.delete.modal-title') }}</h4>
</div>
<div class="modal-body">
<p>此操作不可恢复!</p>
<p>你所上传至皮肤库的材质仍会被保留,但你的角色将被永久删除。</p>
<p>我们不提供任何备份,或者神奇的撤销按钮。</p>
<p>我们警告过你了,确定要这样做吗?</p>
{!! nl2br(trans('user.profile.delete.modal-notice')) !!}
<br />
<input type="password" class="form-control" id="password" placeholder="当前密码">
<input type="password" class="form-control" id="password" placeholder="{{ trans('user.profile.delete.password') }}">
<br />
</div>
<div class="modal-footer">
<button type="button" class="btn btn-outline" data-dismiss="modal">关闭</button>
<a href="javascript:deleteAccount();" class="btn btn-outline">提交</a>
<button type="button" class="btn btn-outline" data-dismiss="modal">{{ trans('general.close') }}</button>
<a href="javascript:deleteAccount();" class="btn btn-outline">{{ trans('general.submit') }}</a>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->