Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

Commit

Permalink
Merge pull request #6 from ilworkcn/v1.9.0_official
Browse files Browse the repository at this point in the history
V1.9.0 official 002 update
  • Loading branch information
Ice-Ling authored Jun 27, 2022
2 parents fff6f84 + 45bbdf0 commit 3e9ace4
Show file tree
Hide file tree
Showing 50 changed files with 1,052 additions and 1,020 deletions.
2 changes: 1 addition & 1 deletion resources/scripts/components/auth/LoginContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const LoginContainer = ({ history }: RouteComponentProps) => {
})}
>
{({ isSubmitting, setSubmitting, submitForm }) => (
<LoginFormContainer title={'Login to Continue'} css={tw`w-full flex`}>
<LoginFormContainer title={'请登入账号以继续'} css={tw`w-full flex`}>
<Field light type={'text'} label={'用户名或电子邮箱地址'} name={'username'} disabled={isSubmitting} />
<div css={tw`mt-6`}>
<Field light type={'password'} label={'密码'} name={'password'} disabled={isSubmitting} />
Expand Down
2 changes: 1 addition & 1 deletion resources/scripts/components/auth/LoginFormContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default forwardRef<HTMLFormElement, Props>(({ title, ...props }, ref) =>
>
Pterodactyl Software
</a>
which Sinicizated by
which Sinicizated by
<a
rel={'noopener nofollow noreferrer'}
href={'https://ilwork.cn'}
Expand Down
4 changes: 2 additions & 2 deletions resources/scripts/components/elements/PageContentBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ const PageContentBlock: React.FC<PageContentBlockProps> = ({ title, showFlashKey
>
Pterodactyl
</a>
which Sinicizated by
which Sinicizated by
<a
rel={'noopener nofollow noreferrer'}
href={'https://ilwork.cn'}
target={'_blank'}
css={tw`no-underline text-neutral-500 hover:text-neutral-300`}
>
iLwork.CN STUDIO &reg;
iLwork.CN STUDIO &reg;
</a>
&nbsp;&copy; 2015 - {new Date().getFullYear()}
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const BackupContainer = () => {
<div css={tw`mt-6 sm:flex items-center justify-end`}>
{backupLimit > 0 && backups.backupCount > 0 && (
<p css={tw`text-sm text-neutral-300 mb-4 sm:mr-6 sm:mb-0`}>
已为此服务器创建 {backups.backupCount} / {backupLimit} 个备份.
已为此服务器创建 {backups.backupCount} / {backupLimit} 个备份.
</p>
)}
{backupLimit > 0 && backupLimit > backups.backupCount && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default () => {
<ServerContentBlock title={'子用户'}>
<FlashMessageRender byKey={'users'} css={tw`mb-4`} />
{!subusers.length ? (
<p css={tw`text-center text-sm text-neutral-300`}>看起来您没有任何子用户.</p>
<p css={tw`text-center text-sm text-neutral-300`}>看起来您没有任何子用户.</p>
) : (
subusers.map((subuser) => <UserRow key={subuser.uuid} subuser={subuser} />)
)}
Expand Down
32 changes: 16 additions & 16 deletions resources/views/admin/api/index.blade.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
@extends('layouts.admin')

@section('title')
Application API
应用 API
@endsection

@section('content-header')
<h1>Application API<small>Control access credentials for managing this Panel via the API.</small></h1>
<h1>应用 API<small>通过 API 控制管理此面板的访问凭据.</small></h1>
<ol class="breadcrumb">
<li><a href="{{ route('admin.index') }}">Admin</a></li>
<li class="active">Application API</li>
<li><a href="{{ route('admin.index') }}">管理</a></li>
<li class="active">应用 API</li>
</ol>
@endsection

Expand All @@ -17,18 +17,18 @@
<div class="col-xs-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">Credentials List</h3>
<h3 class="box-title">凭证列表</h3>
<div class="box-tools">
<a href="{{ route('admin.api.new') }}" class="btn btn-sm btn-primary">Create New</a>
<a href="{{ route('admin.api.new') }}" class="btn btn-sm btn-primary">新建</a>
</div>
</div>
<div class="box-body table-responsive no-padding">
<table class="table table-hover">
<tr>
<th>Key</th>
<th>Memo</th>
<th>Last Used</th>
<th>Created</th>
<th>密钥 KEY</th>
<th>备注</th>
<th>上次使用于</th>
<th>创建于</th>
<th></th>
</tr>
@foreach($keys as $key)
Expand Down Expand Up @@ -66,12 +66,12 @@
event.preventDefault();
swal({
type: 'error',
title: 'Revoke API Key',
text: 'Once this API key is revoked any applications currently using it will stop working.',
title: '删除 API 密钥',
text: '一旦此 API 密钥被删除,当前使用它的任何应用程序都将停止工作。',
showCancelButton: true,
allowOutsideClick: true,
closeOnConfirm: false,
confirmButtonText: 'Revoke',
confirmButtonText: '删除',
confirmButtonColor: '#d9534f',
showLoaderOnConfirm: true
}, function () {
Expand All @@ -85,15 +85,15 @@
swal({
type: 'success',
title: '',
text: 'API Key has been revoked.'
text: 'API 密钥已被删除.'
});
self.parent().parent().slideUp();
}).fail(function (jqXHR) {
console.error(jqXHR);
swal({
type: 'error',
title: 'Whoops!',
text: 'An error occurred while attempting to revoke this key.'
title: '离了个大谱!',
text: '删除此 API 密钥时发生错误,此操作无法继续进行.'
});
});
});
Expand Down
24 changes: 12 additions & 12 deletions resources/views/admin/api/new.blade.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
@extends('layouts.admin')

@section('title')
Application API
应用 API
@endsection

@section('content-header')
<h1>Application API<small>Create a new application API key.</small></h1>
<h1>应用 API<small>创建新的应用程序 API 密钥.</small></h1>
<ol class="breadcrumb">
<li><a href="{{ route('admin.index') }}">Admin</a></li>
<li><a href="{{ route('admin.api.index') }}">Application API</a></li>
<li class="active">New Credentials</li>
<li><a href="{{ route('admin.index') }}">管理</a></li>
<li><a href="{{ route('admin.api.index') }}">应用 API</a></li>
<li class="active">新凭据</li>
</ol>
@endsection

Expand All @@ -19,7 +19,7 @@
<div class="col-sm-8 col-xs-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">Select Permissions</h3>
<h3 class="box-title">选择权限</h3>
</div>
<div class="box-body table-responsive no-padding">
<table class="table table-hover">
Expand All @@ -28,15 +28,15 @@
<td class="col-sm-3 strong">{{ str_replace('_', ' ', title_case($resource)) }}</td>
<td class="col-sm-3 radio radio-primary text-center">
<input type="radio" id="r_{{ $resource }}" name="r_{{ $resource }}" value="{{ $permissions['r'] }}">
<label for="r_{{ $resource }}">Read</label>
<label for="r_{{ $resource }}">只读</label>
</td>
<td class="col-sm-3 radio radio-primary text-center">
<input type="radio" id="rw_{{ $resource }}" name="r_{{ $resource }}" value="{{ $permissions['rw'] }}">
<label for="rw_{{ $resource }}">Read &amp; Write</label>
<label for="rw_{{ $resource }}">可读 &amp; 可写</label>
</td>
<td class="col-sm-3 radio text-center">
<input type="radio" id="n_{{ $resource }}" name="r_{{ $resource }}" value="{{ $permissions['n'] }}" checked>
<label for="n_{{ $resource }}">None</label>
<label for="n_{{ $resource }}">无权限</label>
</td>
</tr>
@endforeach
Expand All @@ -48,14 +48,14 @@
<div class="box box-primary">
<div class="box-body">
<div class="form-group">
<label class="control-label" for="memoField">Description <span class="field-required"></span></label>
<label class="control-label" for="memoField">描述 <span class="field-required"></span></label>
<input id="memoField" type="text" name="memo" class="form-control">
</div>
<p class="text-muted">Once you have assigned permissions and created this set of credentials you will be unable to come back and edit it. If you need to make changes down the road you will need to create a new set of credentials.</p>
<p class="text-muted">一旦您分配了权限并创建了这组凭据,您将无法返回并对其进行编辑。 如果您需要在以后进行更改,则需要创建一组新的凭据.</p>
</div>
<div class="box-footer">
{{ csrf_field() }}
<button type="submit" class="btn btn-success btn-sm pull-right">Create Credentials</button>
<button type="submit" class="btn btn-success btn-sm pull-right">创建凭据</button>
</div>
</div>
</div>
Expand Down
63 changes: 32 additions & 31 deletions resources/views/admin/databases/index.blade.php
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
{{-- Pterodactyl - Panel --}}
{{-- Pterodactyl - Panel which Sinicizated by iLwork.CN STUDIO --}}
{{-- Copyright (c) 2015 - 2017 Dane Everitt <[email protected]> --}}
{{-- Simplified Chinese Translation Copyright (c) 2021 - 2022 Ice Ling <[email protected]> --}}

{{-- This software is licensed under the terms of the MIT license. --}}
{{-- https://opensource.org/licenses/MIT --}}
@extends('layouts.admin')

@section('title')
Database Hosts
数据库主机
@endsection

@section('content-header')
<h1>Database Hosts<small>Database hosts that servers can have databases created on.</small></h1>
<h1>数据库主机<small>服务器可以在其上创建数据库的数据库主机。</small></h1>
<ol class="breadcrumb">
<li><a href="{{ route('admin.index') }}">Admin</a></li>
<li class="active">Database Hosts</li>
<li><a href="{{ route('admin.index') }}">管理</a></li>
<li class="active">数据库主机</li>
</ol>
@endsection

Expand All @@ -22,22 +23,22 @@
<div class="col-xs-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">Host List</h3>
<h3 class="box-title">主机列表</h3>
<div class="box-tools">
<button class="btn btn-sm btn-primary" data-toggle="modal" data-target="#newHostModal">Create New</button>
<button class="btn btn-sm btn-primary" data-toggle="modal" data-target="#newHostModal">新建</button>
</div>
</div>
<div class="box-body table-responsive no-padding">
<table class="table table-hover">
<tbody>
<tr>
<th>ID</th>
<th>Name</th>
<th>Host</th>
<th>Port</th>
<th>Username</th>
<th class="text-center">Databases</th>
<th class="text-center">Node</th>
<th>名称</th>
<th>地址</th>
<th>端口</th>
<th>用户名</th>
<th class="text-center">数据库</th>
<th class="text-center">节点</th>
</tr>
@foreach ($hosts as $host)
<tr>
Expand All @@ -51,7 +52,7 @@
@if(! is_null($host->node))
<a href="{{ route('admin.nodes.view', $host->node->id) }}">{{ $host->node->name }}</a>
@else
<span class="label label-default">None</span>
<span class="label label-default"></span>
@endif
</td>
</tr>
Expand All @@ -68,42 +69,42 @@
<form action="{{ route('admin.databases') }}" method="POST">
<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">Create New Database Host</h4>
<h4 class="modal-title">新建数据库主机</h4>
</div>
<div class="modal-body">
<div class="form-group">
<label for="pName" class="form-label">Name</label>
<label for="pName" class="form-label">名称</label>
<input type="text" name="name" id="pName" class="form-control" />
<p class="text-muted small">A short identifier used to distinguish this location from others. Must be between 1 and 60 characters, for example, <code>us.nyc.lvl3</code>.</p>
<p class="text-muted small">用于将此主机与其他主机区分开来的简短标识符。 必须介于 1 到 60 个字符之间,例如, <code>us.nyc.lvl3</code>.</p>
</div>
<div class="row">
<div class="col-md-6">
<label for="pHost" class="form-label">Host</label>
<label for="pHost" class="form-label">地址</label>
<input type="text" name="host" id="pHost" class="form-control" />
<p class="text-muted small">The IP address or FQDN that should be used when attempting to connect to this MySQL host <em>from the panel</em> to add new databases.</p>
<p class="text-muted small">尝试连接到此 MySQL 主机时应使用的 IP 地址或域名.</p>
</div>
<div class="col-md-6">
<label for="pPort" class="form-label">Port</label>
<label for="pPort" class="form-label">端口</label>
<input type="text" name="port" id="pPort" class="form-control" value="3306"/>
<p class="text-muted small">The port that MySQL is running on for this host.</p>
<p class="text-muted small">MYSQL 主机运行开放的端口.</p>
</div>
</div>
<div class="row">
<div class="col-md-6">
<label for="pUsername" class="form-label">Username</label>
<label for="pUsername" class="form-label">用户名</label>
<input type="text" name="username" id="pUsername" class="form-control" />
<p class="text-muted small">The username of an account that has enough permissions to create new users and databases on the system.</p>
<p class="text-muted small">具有足够权限在系统上创建新用户和数据库的帐户的用户名.</p>
</div>
<div class="col-md-6">
<label for="pPassword" class="form-label">Password</label>
<label for="pPassword" class="form-label">密码</label>
<input type="password" name="password" id="pPassword" class="form-control" />
<p class="text-muted small">The password to the account defined.</p>
<p class="text-muted small">上方阁下填写的账户的密码.</p>
</div>
</div>
<div class="form-group">
<label for="pNodeId" class="form-label">Linked Node</label>
<label for="pNodeId" class="form-label">关联的节点服务器</label>
<select name="node_id" id="pNodeId" class="form-control">
<option value="">None</option>
<option value=""></option>
@foreach($locations as $location)
<optgroup label="{{ $location->short }}">
@foreach($location->nodes as $node)
Expand All @@ -112,14 +113,14 @@
</optgroup>
@endforeach
</select>
<p class="text-muted small">This setting does nothing other than default to this database host when adding a database to a server on the selected node.</p>
<p class="text-muted small">此设置除了将数据库默认添加到所选节点上的服务器以外没有任何作用.</p>
</div>
</div>
<div class="modal-footer">
<p class="text-danger small text-left">The account defined for this database host <strong>must</strong> have the <code>WITH GRANT OPTION</code> permission. If the defined account does not have this permission requests to create databases <em>will</em> fail. <strong>Do not use the same account details for MySQL that you have defined for this panel.</strong></p>
<p class="text-danger small text-left">连接此数据库主机所使用的账户 <strong>必须</strong> 具有 <code>WITH GRANT OPTION</code> 权限. 如果账户没有此权限将 <em>无法</em> 成功建立数据库. <strong>不要为 MySQL 使用您为此面板使用的相同帐户详细信息.</strong></p>
{!! csrf_field() !!}
<button type="button" class="btn btn-default btn-sm pull-left" data-dismiss="modal">Cancel</button>
<button type="submit" class="btn btn-success btn-sm">Create</button>
<button type="button" class="btn btn-default btn-sm pull-left" data-dismiss="modal">取消</button>
<button type="submit" class="btn btn-success btn-sm">创建</button>
</div>
</form>
</div>
Expand Down
Loading

0 comments on commit 3e9ace4

Please sign in to comment.