diff --git a/app/Console/Commands/Test.php b/app/Console/Commands/Test.php index 17570a6e..8c89fe3c 100644 --- a/app/Console/Commands/Test.php +++ b/app/Console/Commands/Test.php @@ -46,6 +46,8 @@ use Nexus\Imdb\Imdb; use NexusPlugin\PostLike\PostLikeRepository; use NexusPlugin\StickyPromotion\Models\StickyPromotion; use NexusPlugin\StickyPromotion\Models\StickyPromotionParticipator; +use PhpIP\IP; +use PhpIP\IPBlock; use Rhilip\Bencode\Bencode; class Test extends Command @@ -81,11 +83,10 @@ class Test extends Command */ public function handle() { - $r = Str::of(class_basename(\App\Models\AgentAllow::class)) - ->plural() - ->kebab() - ->slug(); - + $ip = '116.30.133.129'; +// $ip = '240e:3a1:680c:bb11:211:32ff:fe2c:a603'; + $ipObj = IPBlock::create($ip); + $r = $ipObj->getFirstIp(); dd($r); } diff --git a/app/Filament/Resources/System/SeedBoxRecordResource.php b/app/Filament/Resources/System/SeedBoxRecordResource.php new file mode 100644 index 00000000..2cbba422 --- /dev/null +++ b/app/Filament/Resources/System/SeedBoxRecordResource.php @@ -0,0 +1,87 @@ +schema([ + Forms\Components\TextInput::make('operator')->label(__('label.seedbox_record.operator')), + Forms\Components\TextInput::make('bandwidth')->label(__('label.seedbox_record.bandwidth'))->integer(), + Forms\Components\TextInput::make('ip_begin')->label(__('label.seedbox_record.ip_begin')), + Forms\Components\TextInput::make('ip_end')->label(__('label.seedbox_record.ip_end')), + Forms\Components\TextInput::make('ip')->label(__('label.seedbox_record.ip'))->helperText(__('label.seedbox_record.ip_help')), + Forms\Components\Textarea::make('comment')->label(__('label.comment')), + ])->columns(1); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('id'), + Tables\Columns\TextColumn::make('typeText')->label(__('label.seedbox_record.type')), + Tables\Columns\TextColumn::make('user.username')->label(__('label.username')), + Tables\Columns\TextColumn::make('operation')->label(__('label.seedbox_record.operator')), + Tables\Columns\TextColumn::make('bandwidth')->label(__('label.seedbox_record.bandwidth')), + Tables\Columns\TextColumn::make('ip')->label(__('label.seedbox_record.ip'))->formatStateUsing(fn ($record) => $record->ip ?: sprintf('%s ~ %s', $record->ip_begin, $record->ip_end)), + Tables\Columns\TextColumn::make('comment')->label(__('label.comment')), + ]) + ->filters([ + // + ]) + ->actions([ + Tables\Actions\EditAction::make(), + ]) + ->bulkActions([ + Tables\Actions\DeleteBulkAction::make(), + ]); + } + + public static function getRelations(): array + { + return [ + // + ]; + } + + public static function getPages(): array + { + return [ + 'index' => Pages\ListSeedBoxRecords::route('/'), + 'create' => Pages\CreateSeedBoxRecord::route('/create'), + 'edit' => Pages\EditSeedBoxRecord::route('/{record}/edit'), + ]; + } +} diff --git a/app/Filament/Resources/System/SeedBoxRecordResource/Pages/CreateSeedBoxRecord.php b/app/Filament/Resources/System/SeedBoxRecordResource/Pages/CreateSeedBoxRecord.php new file mode 100644 index 00000000..d9f52e4e --- /dev/null +++ b/app/Filament/Resources/System/SeedBoxRecordResource/Pages/CreateSeedBoxRecord.php @@ -0,0 +1,35 @@ +id(); + $data['type'] = SeedBoxRecord::TYPE_ADMIN; + + return $data; + } + + protected function handleRecordCreation(array $data): Model + { + $seedBoxRep = new SeedBoxRepository(); + try { + return $seedBoxRep->store($data); + } catch (\Exception $exception) { + //this wont work... + $this->notify('danger', $exception->getMessage()); + die(); + } + } +} diff --git a/app/Filament/Resources/System/SeedBoxRecordResource/Pages/EditSeedBoxRecord.php b/app/Filament/Resources/System/SeedBoxRecordResource/Pages/EditSeedBoxRecord.php new file mode 100644 index 00000000..27ee46a4 --- /dev/null +++ b/app/Filament/Resources/System/SeedBoxRecordResource/Pages/EditSeedBoxRecord.php @@ -0,0 +1,19 @@ + __("seedbox.type_text." . $attributes['type']) + ); + } + + public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo + { + return $this->belongsTo(User::class, 'uid'); + } + + +} diff --git a/app/Repositories/SeedBoxRepository.php b/app/Repositories/SeedBoxRepository.php new file mode 100644 index 00000000..ba7e4d29 --- /dev/null +++ b/app/Repositories/SeedBoxRepository.php @@ -0,0 +1,66 @@ +getSortFieldAndType($params); + $query->orderBy($sortField, $sortType); + return $query->paginate(); + } + + public function store(array $params) + { + if (!empty($params['ip']) && empty($params['ip_begin']) && empty($params['ip_end'])) { + if (str_contains($params['ip'], '/')) { + $ipBlock = IPBlock::create($params['ip']); + $params['ip_begin_numeric'] = $ipBlock->getFirstIp()->numeric(); + $params['ip_end_numeric'] = $ipBlock->getLastIp()->numeric(); + } else { + $ip = IP::create($params['ip']); + $params['ip_begin_numeric'] = $ip->numeric(); + $params['ip_end_numeric'] = $ip->numeric(); + } + } elseif (empty($params['ip']) && !empty($params['ip_begin']) && !empty($params['ip_end'])) { + $ipBegin = IP::create($params['ip_begin']); + $params['ip_begin_numeric'] = $ipBegin->numeric(); + + $ipEnd = IP::create($params['ip_end']); + $params['ip_end_numeric'] = $ipEnd->numeric(); + } else { + throw new \InvalidArgumentException("Require ip or ip_begin + ip_end"); + } + + return SeedBoxRecord::query()->create($params); + } + + public function update(array $params, $id) + { + $model = Poll::query()->findOrFail($id); + $model->update($params); + return $model; + } + + public function getDetail($id) + { + $model = Poll::query()->findOrFail($id); + return $model; + } + + public function delete($id, $uid) + { + return SeedBoxRecord::query()->whereIn('id', Arr::wrap($id))->where('uid', $uid)->delete(); + } + +} diff --git a/composer.json b/composer.json index ed5d7744..75e22fd0 100644 --- a/composer.json +++ b/composer.json @@ -49,6 +49,7 @@ "orangehill/iseed": "^3.0", "phpgangsta/googleauthenticator": "dev-master", "rhilip/bencode": "^2.0", + "rlanvin/php-ip": "^3.0", "spiral/roadrunner": "^2.8" }, "require-dev": { diff --git a/composer.lock b/composer.lock index d7e5f13b..ef9313c4 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f25ef23bbab12c64d2125ead6357473b", + "content-hash": "480b59d5b7bde3ea71a3c52e64455c7b", "packages": [ { "name": "akaunting/laravel-money", @@ -5775,6 +5775,50 @@ }, "time": "2022-07-17T11:19:47+00:00" }, + { + "name": "rlanvin/php-ip", + "version": "v3.0.0", + "source": { + "type": "git", + "url": "https://github.com/rlanvin/php-ip.git", + "reference": "7811f12256a5a610ddcb31ed9840179f4dd3784d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/rlanvin/php-ip/zipball/7811f12256a5a610ddcb31ed9840179f4dd3784d", + "reference": "7811f12256a5a610ddcb31ed9840179f4dd3784d", + "shasum": "" + }, + "require": { + "ext-gmp": "*", + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^6.5|^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "PhpIP\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "IPv4/IPv6 manipulation library for PHP", + "homepage": "https://github.com/rlanvin/php-ip", + "keywords": [ + "IP", + "ipv4", + "ipv6" + ], + "support": { + "issues": "https://github.com/rlanvin/php-ip/issues", + "source": "https://github.com/rlanvin/php-ip/tree/v3.0.0" + }, + "time": "2022-03-02T08:51:37+00:00" + }, { "name": "spatie/laravel-package-tools", "version": "1.12.1", diff --git a/database/migrations/2022_04_03_041642_add_attendance_card_to_users_table.php b/database/migrations/2022_04_03_041642_add_attendance_card_to_users_table.php index 7decc7f0..12b99233 100644 --- a/database/migrations/2022_04_03_041642_add_attendance_card_to_users_table.php +++ b/database/migrations/2022_04_03_041642_add_attendance_card_to_users_table.php @@ -13,6 +13,9 @@ return new class extends Migration */ public function up() { + if (Schema::hasColumn('users', 'attendance_card')) { + return; + } Schema::table('users', function (Blueprint $table) { $table->integer('attendance_card')->default(0); }); diff --git a/database/migrations/2022_05_03_155158_add_cover_to_torrents_table.php b/database/migrations/2022_05_03_155158_add_cover_to_torrents_table.php index 170c2589..64245e51 100644 --- a/database/migrations/2022_05_03_155158_add_cover_to_torrents_table.php +++ b/database/migrations/2022_05_03_155158_add_cover_to_torrents_table.php @@ -13,6 +13,9 @@ return new class extends Migration */ public function up() { + if (Schema::hasColumn('torrents', 'cover')) { + return; + } Schema::table('torrents', function (Blueprint $table) { $table->string('cover')->default('')->after('save_as'); }); diff --git a/database/migrations/2022_05_06_191830_add_autoload_to_settings_table.php b/database/migrations/2022_05_06_191830_add_autoload_to_settings_table.php index c8e31f92..acc1b443 100644 --- a/database/migrations/2022_05_06_191830_add_autoload_to_settings_table.php +++ b/database/migrations/2022_05_06_191830_add_autoload_to_settings_table.php @@ -13,6 +13,9 @@ return new class extends Migration */ public function up() { + if (Schema::hasColumn('settings', 'autoload')) { + return; + } Schema::table('settings', function (Blueprint $table) { $table->enum('autoload', ['yes', 'no'])->default('yes'); }); diff --git a/database/migrations/2022_06_14_021936_add_approval_status_to_torrents_table.php b/database/migrations/2022_06_14_021936_add_approval_status_to_torrents_table.php index c22cee5e..99f45732 100644 --- a/database/migrations/2022_06_14_021936_add_approval_status_to_torrents_table.php +++ b/database/migrations/2022_06_14_021936_add_approval_status_to_torrents_table.php @@ -13,6 +13,9 @@ return new class extends Migration */ public function up() { + if (Schema::hasColumn('torrents', 'approval_status')) { + return; + } Schema::table('torrents', function (Blueprint $table) { $table->integer('approval_status')->default(0); }); diff --git a/database/migrations/2022_07_08_215348_add_deadline_to_torrents_state_table.php b/database/migrations/2022_07_08_215348_add_deadline_to_torrents_state_table.php index dc8112aa..eb924d2c 100644 --- a/database/migrations/2022_07_08_215348_add_deadline_to_torrents_state_table.php +++ b/database/migrations/2022_07_08_215348_add_deadline_to_torrents_state_table.php @@ -13,6 +13,9 @@ return new class extends Migration */ public function up() { + if (Schema::hasColumn('torrents_state', 'deadline')) { + return; + } Schema::table('torrents_state', function (Blueprint $table) { $table->id(); $table->dateTime('deadline')->nullable(); diff --git a/database/migrations/2022_07_20_194152_create_seedbox_records_table.php b/database/migrations/2022_07_20_194152_create_seedbox_records_table.php new file mode 100644 index 00000000..359f365c --- /dev/null +++ b/database/migrations/2022_07_20_194152_create_seedbox_records_table.php @@ -0,0 +1,41 @@ +id(); + $table->integer('type'); + $table->integer('uid'); + $table->string('operator')->nullable(); + $table->integer('bandwidth')->nullable(); + $table->string('ip')->nullable(); + $table->string('ip_begin')->nullable(); + $table->string('ip_end')->nullable(); + $table->string('ip_begin_numeric', 128)->index(); + $table->string('ip_end_numeric', 128)->index(); + $table->string('comment')->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('seedbox_records'); + } +}; diff --git a/lang/chs/lang_functions.php b/lang/chs/lang_functions.php index dea8444a..baad916e 100644 --- a/lang/chs/lang_functions.php +++ b/lang/chs/lang_functions.php @@ -323,6 +323,7 @@ $lang_functions = array 'text_contactstaff' => '联系管理组', 'full_site_promotion_in_effect' => '全站 [%s] 生效中!截止时间:%s', 'text_torrent_to_approval' => '有 %s%u 个待审核的种子%s', + 'std_confirm_remove' => '确定要删除吗?', ); ?> diff --git a/lang/chs/lang_usercp.php b/lang/chs/lang_usercp.php index bb3a1910..8b3c7bc1 100644 --- a/lang/chs/lang_usercp.php +++ b/lang/chs/lang_usercp.php @@ -252,6 +252,8 @@ $lang_usercp = array 'text_two_step_secret_bind_complete_note' => '输入 code 完成两步验证', 'text_two_step_secret_unbind_note' => '输入 code 取消两步验证', 'row_passkey_login_url' => 'Passkey 登录链接', + 'row_seed_box' => 'SeedBox', + 'add_seed_box_btn' => '登记', ); ?> diff --git a/lang/cht/lang_functions.php b/lang/cht/lang_functions.php index 20708a8c..19b7ed9c 100644 --- a/lang/cht/lang_functions.php +++ b/lang/cht/lang_functions.php @@ -330,6 +330,7 @@ $lang_functions = array 'text_contactstaff' => '聯系管理組', 'full_site_promotion_in_effect' => '全站 [%s] 生效中!截止時間:%s', 'text_torrent_to_approval' => '有 %s%u 個待審核的種子%s', + 'std_confirm_remove' => '確定要刪除嗎?', ); ?> diff --git a/lang/cht/lang_usercp.php b/lang/cht/lang_usercp.php index 06bb8a30..13d65f06 100644 --- a/lang/cht/lang_usercp.php +++ b/lang/cht/lang_usercp.php @@ -250,6 +250,8 @@ $lang_usercp = array 'text_two_step_secret_bind_complete_note' => '輸入 code 完成兩步驗證', 'text_two_step_secret_unbind_note' => '輸入 code 取消兩步驗證', 'row_passkey_login_url' => 'Passkey 登錄鏈接', + 'row_seed_box' => 'SeedBox', + 'add_seed_box_btn' => '登記', ); ?> diff --git a/lang/en/lang_functions.php b/lang/en/lang_functions.php index b41ae1b4..503190c7 100644 --- a/lang/en/lang_functions.php +++ b/lang/en/lang_functions.php @@ -331,6 +331,7 @@ $lang_functions = array 'text_contactstaff' => 'Contact staff', 'full_site_promotion_in_effect' => 'Full site [%s] in effect! Deadline: %s', 'text_torrent_to_approval' => 'There %s%u not approval torrent%s.', + 'std_confirm_remove' => 'Are you sure you want to delete it?', ); ?> diff --git a/lang/en/lang_usercp.php b/lang/en/lang_usercp.php index e7fe883f..bd355ea5 100644 --- a/lang/en/lang_usercp.php +++ b/lang/en/lang_usercp.php @@ -252,6 +252,8 @@ $lang_usercp = array 'text_two_step_secret_bind_complete_note' => 'Enter code to complete the two-step authentication', 'text_two_step_secret_unbind_note' => 'Enter code to cancel two-step authentication', 'row_passkey_login_url' => 'Passkey login URL', + 'row_seed_box' => 'SeedBox', + 'add_seed_box_btn' => 'Register', ); ?> diff --git a/nexus/Install/Update.php b/nexus/Install/Update.php index d882e001..e8d0b6f4 100644 --- a/nexus/Install/Update.php +++ b/nexus/Install/Update.php @@ -232,9 +232,12 @@ class Update extends Install $table = 'sysoppanel'; $this->addMenu($table, $menus); $menuToDel = ['amountupload.php', 'amountattendancecard.php', 'amountbonus.php', 'deletedisabled.php']; - $this->removeMenu('sysoppanel', $menuToDel); - $this->removeMenu('adminpanel', $menuToDel); - $this->removeMenu('modpanel', $menuToDel); + $this->removeMenu($menuToDel); + + /** + * @since 1.7.19 + */ + $this->removeMenu(['freeleech.php']); } @@ -271,10 +274,13 @@ class Update extends Install } } - private function removeMenu($table, array $menus) + private function removeMenu(array $menus, array $tables = ['sysoppanel', 'adminpanel', 'modpanel']) { - foreach ($menus as $menu) { - NexusDB::delete($table, "url = " . sqlesc($menu)); + if (empty($menus)) { + return; + } + foreach ($tables as $table) { + NexusDB::table($table)->whereIn('url', $menus)->delete(); } } diff --git a/public/ajax.php b/public/ajax.php index 6fd4d44a..94dc2a9f 100644 --- a/public/ajax.php +++ b/public/ajax.php @@ -93,3 +93,18 @@ function approval($params) return $rep->approval($CURUSER['id'], $params); } +function addSeedBoxRecord($params) +{ + global $CURUSER; + $rep = new \App\Repositories\SeedBoxRepository(); + $params['uid'] = $CURUSER['id']; + $params['type'] = \App\Models\SeedBoxRecord::TYPE_USER; + return $rep->store($params); +} + +function removeSeedBoxRecord($params) +{ + global $CURUSER; + $rep = new \App\Repositories\SeedBoxRepository(); + return $rep->delete($params['id'], $CURUSER['id']); +} diff --git a/public/usercp.php b/public/usercp.php index b6ae2361..116b31ef 100644 --- a/public/usercp.php +++ b/public/usercp.php @@ -945,6 +945,124 @@ if ($prolinkpoint_bonus) tr_small($lang_usercp['row_invitations'],$CURUSER['invites']." [".$lang_usercp['text_send']."]",1); tr_small($lang_usercp['row_karma_points'], $CURUSER['seedbonus']." [".$lang_usercp['text_use']."]", 1); tr_small($lang_usercp['row_written_comments'], $commentcount." [".$lang_usercp['text_view']."]", 1); + +//start seed box +$seedBox = ''; +$columnOperator = nexus_trans('label.seedbox_record.operator'); +$columnBandwidth = nexus_trans('label.seedbox_record.bandwidth'); +$columnIPBegin = nexus_trans('label.seedbox_record.ip_begin'); +$columnIPEnd = nexus_trans('label.seedbox_record.ip_end'); +$columnIP = nexus_trans('label.seedbox_record.ip'); +$columnIPHelp = nexus_trans('label.seedbox_record.ip_help'); +$columnComment = nexus_trans('label.comment'); +$res = sql_query(sprintf("SELECT * from seedbox_records where type = %s and uid = %s", \App\Models\SeedBoxRecord::TYPE_USER, $CURUSER['id'])); +if (mysql_num_rows($res) > 0) +{ + $seedBox .= ""; + while($arr = mysql_fetch_assoc($res)) + { + $seedBox .= ""; + $seedBox .= sprintf('', $arr['operator']); + $seedBox .= sprintf('', $arr['bandwidth'] ?: ''); + $seedBox .= sprintf('', $arr['ip'] ?: sprintf('%s ~ %s', $arr['ip_begin'], $arr['ip_end'])); + $seedBox .= sprintf('', $arr['comment']); + $seedBox .= sprintf('', $lang_functions['text_delete'], $arr['id']); + $seedBox .= ""; + } + $seedBox .= '
{$columnOperator}{$columnBandwidth}{$columnIP}{$columnComment}
%s%s%s%sD
'; +} +$seedBox .= sprintf('
', $lang_usercp['add_seed_box_btn']); +tr_small($lang_usercp['row_seed_box'], $seedBox, 1); +$seedBoxCss = << +
+
+
{$columnOperator}
+
+
+
+
{$columnBandwidth}
+
+
+
+
{$columnIPBegin}
+
+
+
+
{$columnIPEnd}
+
+
+
+
{$columnIP}
+
{$columnIPHelp}
+
+
+
{$columnComment}
+
+
+
+ +FORM; +$seedBoxJs = <<".$lang_usercp['text_view']."] (".$dayposts.$lang_usercp['text_posts_per_day']."; ".$percentages.$lang_usercp['text_of_total_posts'].")", 1); ?> diff --git a/resources/lang/en/admin.php b/resources/lang/en/admin.php index 5110c257..694b0349 100644 --- a/resources/lang/en/admin.php +++ b/resources/lang/en/admin.php @@ -17,6 +17,7 @@ return [ 'torrent_state' => 'Free leach', 'roles_list' => 'Roles', 'ability_list' => 'Permissions', + 'seedbox_records' => 'SeedBox', ], 'resources' => [ 'agent_allow' => [ diff --git a/resources/lang/en/label.php b/resources/lang/en/label.php index b0d6eaaa..e5ef696f 100644 --- a/resources/lang/en/label.php +++ b/resources/lang/en/label.php @@ -172,4 +172,14 @@ return [ 'role' => [ 'class' => 'Relate user class', ], + 'seedbox_record' => [ + 'label' => 'SeedBox Records', + 'type' => 'Add type', + 'operator' => 'Operator', + 'bandwidth' => 'Bandwidth(Mbps)', + 'ip' => 'IP(Block)', + 'ip_begin' => 'Begin IP', + 'ip_end' => 'End IP', + 'ip_help' => 'Begin IP/End IP, IP(Block) Choose one', + ], ]; diff --git a/resources/lang/en/seedbox.php b/resources/lang/en/seedbox.php new file mode 100644 index 00000000..cc853bbb --- /dev/null +++ b/resources/lang/en/seedbox.php @@ -0,0 +1,8 @@ + [ + \App\Models\SeedBoxRecord::TYPE_USER => 'User', + \App\Models\SeedBoxRecord::TYPE_ADMIN => 'Administrator', + ], +]; diff --git a/resources/lang/zh_CN/admin.php b/resources/lang/zh_CN/admin.php index 11f4e28e..3e3ca36a 100644 --- a/resources/lang/zh_CN/admin.php +++ b/resources/lang/zh_CN/admin.php @@ -17,6 +17,7 @@ return [ 'torrent_state' => '全站优惠', 'roles_list' => '角色', 'ability_list' => '权限', + 'seedbox_records' => 'SeedBox', ], 'resources' => [ 'agent_allow' => [ diff --git a/resources/lang/zh_CN/label.php b/resources/lang/zh_CN/label.php index 7f71d41e..791e5d6c 100644 --- a/resources/lang/zh_CN/label.php +++ b/resources/lang/zh_CN/label.php @@ -175,4 +175,14 @@ return [ 'name' => '标识', 'title' => '名称', ], + 'seedbox_record' => [ + 'label' => 'SeedBox 记录', + 'type' => '添加类型', + 'operator' => '运营商', + 'bandwidth' => '带宽(Mbps)', + 'ip' => 'IP(段)', + 'ip_begin' => '起始 IP', + 'ip_end' => '结束 IP', + 'ip_help' => '起始 IP/结束 IP、IP(段) 二选一', + ], ]; diff --git a/resources/lang/zh_CN/seedbox.php b/resources/lang/zh_CN/seedbox.php new file mode 100644 index 00000000..bd53d66d --- /dev/null +++ b/resources/lang/zh_CN/seedbox.php @@ -0,0 +1,8 @@ + [ + \App\Models\SeedBoxRecord::TYPE_USER => '用户', + \App\Models\SeedBoxRecord::TYPE_ADMIN => '管理员', + ], +]; diff --git a/resources/lang/zh_TW/admin.php b/resources/lang/zh_TW/admin.php index cf1ae424..daf9e074 100644 --- a/resources/lang/zh_TW/admin.php +++ b/resources/lang/zh_TW/admin.php @@ -17,6 +17,7 @@ return [ 'torrent_state' => '全站優惠', 'roles_list' => '角色', 'ability_list' => '權限', + 'seedbox_records' => 'SeedBox', ], 'resources' => [ 'agent_allow' => [ diff --git a/resources/lang/zh_TW/label.php b/resources/lang/zh_TW/label.php index d1e44fb4..fa34b73f 100644 --- a/resources/lang/zh_TW/label.php +++ b/resources/lang/zh_TW/label.php @@ -172,4 +172,14 @@ return [ 'role' => [ 'class' => '關聯用户等級', ], + 'seedbox_record' => [ + 'label' => 'SeedBox 記錄', + 'type' => '添加類型', + 'operator' => '運營商', + 'bandwidth' => '帶寬(Mbps)', + 'ip' => 'IP(段)', + 'ip_begin' => '起始 IP', + 'ip_end' => '結束 IP', + 'ip_help' => '起始 IP/結束 IP、IP(段) 二選一', + ], ]; diff --git a/resources/lang/zh_TW/seedbox.php b/resources/lang/zh_TW/seedbox.php new file mode 100644 index 00000000..0cc165c8 --- /dev/null +++ b/resources/lang/zh_TW/seedbox.php @@ -0,0 +1,8 @@ + [ + \App\Models\SeedBoxRecord::TYPE_USER => '用戶', + \App\Models\SeedBoxRecord::TYPE_ADMIN => '管理員', + ], +];