Compare commits

..

10 Commits

Author SHA1 Message Date
xiaomlove 9995767bf7 release v1.10.2 2026-04-11 12:07:31 +07:00
xiaomlove d115a3879a takelogin bark when self-enable feature is disable 2026-04-09 13:37:05 +07:00
xiaomlove 431fbfff56 fix self enable switch 2026-04-09 11:48:21 +07:00
xiaomlove 9e632811ef self enable add switch 2026-04-09 10:52:58 +07:00
xiaomlove db4982f8f7 self enable 2026-03-29 21:42:43 +07:00
xiaomlove af66ec806d imdb force agent 2026-03-28 14:37:25 +07:00
xiaomlove 09b785902f Merge pull request #428 from ex-hentai/filament-views
replace filament custom views
2026-02-27 08:28:09 +08:00
NekoCH d79031f24d replace filament custom views 2026-02-26 21:50:59 +08:00
xiaomlove 527a2d2162 release 1.10.1 2026-02-17 15:04:05 +08:00
xiaomlove 3dae3aec8d imdbphp/imdbphp lock 8.3.1 2026-02-17 14:36:24 +08:00
34 changed files with 214 additions and 342 deletions
@@ -2,6 +2,7 @@
namespace App\Filament\Resources\System\SettingResource\Pages;
use Filament\Actions\Action;
use Filament\Forms\Contracts\HasForms;
use Filament\Forms\Concerns\InteractsWithForms;
use Filament\Schemas\Schema;
@@ -41,8 +42,6 @@ class EditSetting extends Page implements HasForms
protected static string $resource = SettingResource::class;
protected string $view = 'filament.resources.system.setting-resource.pages.edit-hit-and-run';
public ?array $data = [];
public function getTitle(): string
@@ -56,7 +55,7 @@ class EditSetting extends Page implements HasForms
$this->fillForm();
}
public function form(Schema $schema): Schema
public function content(Schema $schema): Schema
{
return $schema
->components($this->getFormSchema())
@@ -76,7 +75,7 @@ class EditSetting extends Page implements HasForms
}
Arr::set($settings, 'captcha.attendance.enabled', $normalized);
$this->form->fill($settings);
$this->content->fill($settings);
}
@@ -85,7 +84,10 @@ class EditSetting extends Page implements HasForms
{
return [
Tabs::make('Heading')
->tabs($this->getTabs())
->tabs($this->getTabs()),
Action::make('submit')
->label(__('label.save'))
->action(fn() => $this->submit()),
];
}
@@ -93,7 +95,7 @@ class EditSetting extends Page implements HasForms
{
static::authorizeResourceAccess();
$formData = $this->form->getState();
$formData = $this->content->getState();
$notAutoloadNames = ['donation_custom'];
$data = [];
foreach ($formData as $prefix => $parts) {
@@ -2,6 +2,8 @@
namespace App\Filament\Resources\User;
use Filament\Infolists\Components\RepeatableEntry;
use Filament\Infolists\Components\RepeatableEntry\TableColumn;
use Filament\Schemas\Schema;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Columns\BooleanColumn;
@@ -193,10 +195,21 @@ class ExamUserResource extends Resource
->columns(2)
,
Group::make([
ViewEntry::make('progressFormatted')
->label('进度')
->view('filament.resources.user.exam-user-resource.pages.detail-v3')
])->columnSpan(1),
RepeatableEntry::make('progressFormatted')
->hiddenLabel()
->table([
TableColumn::make(__('label.exam.index_required_label')),
TableColumn::make(__('label.exam.index_required_value')),
TableColumn::make(__('label.exam.index_current_value')),
TableColumn::make(__('label.exam.index_result')),
])
->schema([
TextEntry::make('index_formatted'),
TextEntry::make('require_value_formatted'),
TextEntry::make('current_value_formatted'),
TextEntry::make('index_result')->html(),
])
])->columnSpan(1),
]),
]);
+3
View File
@@ -21,6 +21,7 @@ class BonusLogs extends NexusModel
const DEFAULT_BONUS_BUY_TEMPORARY_INVITE = 500;
const DEFAULT_BONUS_BUY_RAINBOW_ID = 5000;
const DEFAULT_BONUS_BUY_CHANGE_USERNAME_CARD = 100000;
const DEFAULT_BONUS_SELF_ENABLE = 100000;
//扣除类,1开始
const BUSINESS_TYPE_CANCEL_HIT_AND_RUN = 1;
@@ -46,6 +47,7 @@ class BonusLogs extends NexusModel
const BUSINESS_TYPE_TASK_PASS_REWARD = 21;
const BUSINESS_TYPE_REWARD_TORRENT = 22;
const BUSINESS_TYPE_CLAIMED_UNREACHED = 23;
const BUSINESS_TYPE_SELF_ENABLE = 24;
//获得类,普通获得,1000 起步
const BUSINESS_TYPE_ROLE_WORK_SALARY = 1000;
@@ -87,6 +89,7 @@ class BonusLogs extends NexusModel
self::BUSINESS_TYPE_TASK_PASS_REWARD => ['text' => 'Task success reward'],
self::BUSINESS_TYPE_REWARD_TORRENT => ['text' => 'Reward torrent'],
self::BUSINESS_TYPE_CLAIMED_UNREACHED => ['text' => 'Claimed torrent unreached'],
self::BUSINESS_TYPE_SELF_ENABLE => ['text' => 'Self enable'],
self::BUSINESS_TYPE_ROLE_WORK_SALARY => ['text' => 'Role work salary'],
self::BUSINESS_TYPE_TORRENT_BE_DOWNLOADED => ['text' => 'Torrent be downloaded'],
+5
View File
@@ -334,4 +334,9 @@ class Setting extends NexusModel
{
return self::get('main.showimdbinfo') == 'yes';
}
public static function getSelfEnableBonus(): int
{
return (int)self::get("bonus.self_enable", BonusLogs::DEFAULT_BONUS_SELF_ENABLE);
}
}
+2
View File
@@ -8,6 +8,8 @@ class UserBanLog extends NexusModel
protected $fillable = ['uid', 'username', 'operator', 'reason'];
public $timestamps = true;
public static function clearUserBanLogDuplicate()
{
$lists = UserBanLog::query()
+2 -4
View File
@@ -2,7 +2,6 @@
namespace App\Repositories;
use App\Enums\ModelEventEnum;
use App\Enums\RedisKeysEnum;
use App\Exceptions\InsufficientPermissionException;
use App\Exceptions\NexusException;
use App\Http\Resources\ExamUserResource;
@@ -29,7 +28,6 @@ use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Arr;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\Str;
use Nexus\Database\NexusDB;
@@ -228,9 +226,9 @@ class UserRepository extends BaseRepository
'operator' => $operator->id,
];
$modCommentText = sprintf("%s - Disable by %s, reason: %s.", now()->format('Y-m-d'), $operator->username, $reason);
DB::transaction(function () use ($targetUser, $banLog, $modCommentText) {
NexusDB::transaction(function () use ($targetUser, $banLog, $modCommentText) {
$targetUser->updateWithModComment(['enabled' => User::ENABLED_NO], $modCommentText);
UserBanLog::query()->insert($banLog);
UserBanLog::query()->create($banLog);
});
do_log("user: $uid, $modCommentText");
$this->clearCache($targetUser);
+1 -1
View File
@@ -42,7 +42,7 @@
"flowframe/laravel-trend": "^0.4",
"geoip2/geoip2": "~2.0",
"google/auth": "1.44.0",
"imdbphp/imdbphp": "^8.0",
"imdbphp/imdbphp": "8.3.1",
"irazasyed/telegram-bot-sdk": "^3.11",
"laravel/framework": "^12.0",
"laravel/horizon": "^5.31",
Generated
+18 -18
View File
@@ -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": "a074b30b7cd641b75fa1b4860b805538",
"content-hash": "5b47efd58770c5bf618a2e898044ad08",
"packages": [
{
"name": "anourvalar/eloquent-serialize",
@@ -2725,16 +2725,16 @@
},
{
"name": "imdbphp/imdbphp",
"version": "v8.3.2",
"version": "v8.3.1",
"source": {
"type": "git",
"url": "https://github.com/tboothman/imdbphp.git",
"reference": "61fe9fac330914c3e61aa52ac27814c298d96cc6"
"reference": "ec21f17959c32c401635834499f93a60fdb3124a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/tboothman/imdbphp/zipball/61fe9fac330914c3e61aa52ac27814c298d96cc6",
"reference": "61fe9fac330914c3e61aa52ac27814c298d96cc6",
"url": "https://api.github.com/repos/tboothman/imdbphp/zipball/ec21f17959c32c401635834499f93a60fdb3124a",
"reference": "ec21f17959c32c401635834499f93a60fdb3124a",
"shasum": ""
},
"require": {
@@ -2745,7 +2745,7 @@
"ext-simplexml": "*",
"php": ">=5.6",
"psr/log": "^1.0 || ^2.0",
"psr/simple-cache": "^1.0|^3.0"
"psr/simple-cache": "^1.0"
},
"require-dev": {
"cache/array-adapter": "^1.2",
@@ -2767,9 +2767,9 @@
"description": "Library for retrieving film and tv information from IMDb",
"support": {
"issues": "https://github.com/tboothman/imdbphp/issues",
"source": "https://github.com/tboothman/imdbphp/tree/v8.3.2"
"source": "https://github.com/tboothman/imdbphp/tree/v8.3.1"
},
"time": "2026-01-13T18:58:23+00:00"
"time": "2025-12-22T10:34:50+00:00"
},
{
"name": "irazasyed/telegram-bot-sdk",
@@ -6763,25 +6763,25 @@
},
{
"name": "psr/simple-cache",
"version": "3.0.0",
"version": "1.0.1",
"source": {
"type": "git",
"url": "https://github.com/php-fig/simple-cache.git",
"reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865"
"reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/simple-cache/zipball/764e0b3939f5ca87cb904f570ef9be2d78a07865",
"reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865",
"url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
"reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
"shasum": ""
},
"require": {
"php": ">=8.0.0"
"php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.0.x-dev"
"dev-master": "1.0.x-dev"
}
},
"autoload": {
@@ -6796,7 +6796,7 @@
"authors": [
{
"name": "PHP-FIG",
"homepage": "https://www.php-fig.org/"
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common interfaces for simple caching",
@@ -6808,9 +6808,9 @@
"simple-cache"
],
"support": {
"source": "https://github.com/php-fig/simple-cache/tree/3.0.0"
"source": "https://github.com/php-fig/simple-cache/tree/master"
},
"time": "2021-10-29T13:26:27+00:00"
"time": "2017-10-23T01:57:42+00:00"
},
{
"name": "psy/psysh",
@@ -14031,5 +14031,5 @@
"ext-zip": "*"
},
"platform-dev": {},
"plugin-api-version": "2.6.0"
"plugin-api-version": "2.9.0"
}
+2 -2
View File
@@ -1,6 +1,6 @@
<?php
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.10.0');
defined('RELEASE_DATE') || define('RELEASE_DATE', '2026-02-01');
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.10.2');
defined('RELEASE_DATE') || define('RELEASE_DATE', '2026-04-11');
defined('IN_TRACKER') || define('IN_TRACKER', false);
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
+5 -3
View File
@@ -2072,7 +2072,6 @@ function userlogin() {
if (empty($row)) {
return $loginResult = false;
}
if (!$row["passkey"]){
$passkey = md5($row['username'].date("Y-m-d H:i:s").$row['passhash']);
sql_query("UPDATE users SET passkey = ".sqlesc($passkey)." WHERE id=" . sqlesc($row["id"]));
@@ -3168,8 +3167,9 @@ function base64 ($string, $encode=true) {
function loggedinorreturn($mainpage = false) {
global $CURUSER,$BASEURL;
$script = nexus()->getScript();
if (!$CURUSER) {
if (nexus()->getScript() == 'ajax') {
if ($script == 'ajax') {
exit(fail('Not login!', $_POST));
}
if ($mainpage) {
@@ -3181,7 +3181,9 @@ function loggedinorreturn($mainpage = false) {
}
exit();
}
// do_log("[USER]: " . $CURUSER['id']);
if ($CURUSER['enabled'] != 'yes' && $script != 'self-enable') {
nexus_redirect('self-enable.php');
}
}
function deletetorrent($id, $notify = false) {
+14 -2
View File
@@ -1505,8 +1505,16 @@ function get_user_from_cookie(array $cookie, $isArray = true): array|\App\Models
$tokenJson = $result['token_json'];
$signature = $result['signature'];
$log .= ", uid = $id";
$isAjax = nexus()->isAjax();
$selfEnableBonus = \App\Models\Setting::getSelfEnableBonus();
//only in nexus web can self-enable, and require bonus > 0
$shouldIgnoreEnabled = IN_NEXUS && !$isAjax && $selfEnableBonus > 0;
if ($isArray) {
$res = sql_query("SELECT * FROM users WHERE users.id = ".sqlesc($id)." AND users.enabled='yes' AND users.status = 'confirmed' LIMIT 1");
$whereStr = sprintf("id = %d and status = 'confirmed'", $id);
if (!$shouldIgnoreEnabled) {
$whereStr .= " and enabled = 'yes'";
}
$res = sql_query("SELECT * FROM users WHERE $whereStr LIMIT 1");
$row = mysql_fetch_array($res);
if (!$row) {
do_log("$log, user not exists");
@@ -1520,7 +1528,11 @@ function get_user_from_cookie(array $cookie, $isArray = true): array|\App\Models
do_log("$log, user not exists");
return null;
}
$row->checkIsNormal();
$checkFields = ['status'];
if (!$shouldIgnoreEnabled) {
$checkFields[] = 'enabled';
}
$row->checkIsNormal($checkFields);
$authKey = $row->auth_key;
}
$expectedSignature = hash_hmac('sha256', $tokenJson, $authKey);
+2
View File
@@ -826,6 +826,8 @@ $lang_settings = array
'text_reward_bonus_options_note' => '种子详情页的魔力值奖励选项,多个用英文逗号分割',
'row_reward_times_limit' => '魔力奖励次数限制',
'text_reward_times_limit_note' => '种子详情页的魔力奖励每人每天次数限制,设置为 0 不限制。默认:0',
'row_self_enable' => '自助解封',
'text_self_enable_note' => '个魔力值,如果他选择在被封禁 1 天内解封。封禁时长为 N 天,失去的魔力值将会是此值的 N 倍。设置为 0 禁用此功能。',
);
?>
+2
View File
@@ -826,6 +826,8 @@ $lang_settings = array
'text_reward_bonus_options_note' => '種子詳情頁的魔力值獎勵選項,多個用英文逗號分割',
'row_reward_times_limit' => '魔力獎勵次數限制',
'text_reward_times_limit_note' => '種子詳情頁的魔力獎勵每人每天次數限制,設置爲 0 不限制。默認:0',
'row_self_enable' => '自助解封',
'text_self_enable_note' => '個魔力值,如果他選擇在被封禁 1 天內解封。封禁時長為 N 天,失去的魔力值將會是此值的 N 倍。設置為 0 禁用此功能。',
);
?>
+2
View File
@@ -826,6 +826,8 @@ $lang_settings = array
'text_reward_bonus_options_note' => 'Reward bonus options on the torrent details page, multiple options separated by commas',
'row_reward_times_limit' => 'Reward Frequency Limit',
'text_reward_times_limit_note' => 'Daily limit per user for bonus rewards on seed detail pages. Set to 0 for no limit. Default: 0',
'row_self_enable' => 'Self-service unblocking',
'text_self_enable_note' => 'points. If he chooses to unblock within 1 day of being banned. If the ban duration is N days, the lost mana points will be N times this value. Setting it to 0 disables this feature.',
);
?>
+1
View File
@@ -32,6 +32,7 @@ class Imdb
$config->photoroot = $photoRoot;
$config->language = get_setting('main.imdb_language', 'en-US');
$config->cache_expire = 0;
$config->force_agent = 'Googlebot/2.1 (+http://www.google.com/bot.html)';
$this->config = $config;
}
+18
View File
@@ -176,6 +176,22 @@ final class Nexus
return false;
}
public function isAjax(): bool
{
if ($this->getScript() == 'ajax') {
return true;
}
$ajax = $this->retrieveFromServer(['HTTP_X_REQUESTED_WITH'], true);
if (!empty($ajax) && strtolower($ajax) == 'xmlhttprequest') {
return true;
}
$json = $this->retrieveFromServer(['HTTP_ACCEPT'], true);
if (!empty($json) && strtolower($json) == 'application/json') {
return true;
}
return false;
}
private function generateRequestId(): string
{
$prefix = ($_SERVER['SCRIPT_FILENAME'] ?? '') . implode('', $_SERVER['argv'] ?? []);
@@ -426,4 +442,6 @@ final class Nexus
}
}
+62
View File
@@ -0,0 +1,62 @@
<?php
require_once("../include/bittorrent.php");
dbconn();
loggedinorreturn();
parked();
\Nexus\Nexus::css('#ban-info td {border: none}', 'header', false);
$title = nexus_trans('self-enable.title');
stdhead($title);
begin_main_frame();
begin_frame($title, true,10,"100%","center");
$unit = \App\Models\Setting::getSelfEnableBonus();
if ($unit <= 0) {
printf('<h3>%s</h3>', nexus_trans('self-enable.feature_disabled'));
} elseif ($CURUSER['enabled'] == 'yes') {
printf('<h3>%s</h3>', nexus_trans('self-enable.enable_status_normal'));
} else {
$latestBanLog = \App\Models\UserBanLog::query()
->where('uid', $CURUSER['id'])
->orderBy('id', 'desc')
->first();
if (!$latestBanLog) {
printf('<h3>%s</h3>', nexus_trans('self-enable.no_ban_info'));
} else {
$elapsedDay = ceil((time() - $latestBanLog->created_at->getTimestamp()) / 86400);
$total = $unit * $elapsedDay;
$isUserBonusEnough = $CURUSER['seedbonus'] >= $total;
$userBonusNotEnoughTip = nexus_trans('self-enable.bonus_not_enough', ['bonus' => $CURUSER['seedbonus']]);
if (!empty($_POST['submit'])) {
if (!$isUserBonusEnough) {
stdmsg('Error', $userBonusNotEnoughTip);
} else {
$userRep = new \App\Repositories\UserRepository();
$bonusRep = new \App\Repositories\BonusRepository();
$operator = \App\Models\User::query()->find($CURUSER['id']);
$bonusRep->consumeUserBonus($CURUSER['id'], $total, \App\Models\BonusLogs::BUSINESS_TYPE_SELF_ENABLE, $title);
$userRep->enableUser($operator, $CURUSER['id'], $title);
nexus_redirect('index.php');
}
} else {
printf('<h3>%s</h3>', nexus_trans('self-enable.latest_ban_info'));
printf('<table id="ban-info" border="1" cellpadding="5" cellspacing="0"><tbody>');
printf('<tr><th>UID</th><td>%s</td></tr>', $latestBanLog->uid);
printf('<tr><th>Username</th><td>%s</td></tr>', $latestBanLog->username);
printf('<tr><th>Reason</th><td>%s</td></tr>', $latestBanLog->reason);
printf('<tr><th>CreatedAt</th><td>%s</td></tr>', $latestBanLog->created_at);
printf('</tbody></table>');
printf('<p>%s</p>', nexus_trans('self-enable.deduct_bonus_per_day', ['unit' => number_format($unit)]));
printf('<p>%s</p>', nexus_trans('self-enable.deduct_bonus_total', ['days' => number_format($elapsedDay), 'total' => number_format($total)]));
if ($isUserBonusEnough) {
printf('<p>%s</p>', nexus_trans('self-enable.enable_desc'));
printf('<form method="post"><input type="hidden" name="submit" value="1"><input type="submit" value="%s"></form>', nexus_trans('self-enable.enable_button'));
} else {
printf('<p>%s</p>', $userBonusNotEnoughTip);
}
}
}
}
end_frame();
end_main_frame();
stdfoot();
?>
+2 -1
View File
@@ -99,7 +99,7 @@ elseif ($action == 'savesettings_bonus') // save bonus
'tengbupload', 'ratiolimit','dlamountlimit','oneinvite','customtitle','vipstatus','bonusgift', 'basictax', 'taxpercentage',
'prolinkpoint', 'prolinktime', 'attendance_initial', 'attendance_step', 'attendance_max', 'cancel_hr', 'attendance_card',
'harem_addition', 'hundredgbupload', 'tengbdownload', 'hundredgbdownload', 'official_addition', 'official_tag', 'zero_bonus_tag', 'zero_bonus_factor',
'one_tmp_invite', 'rainbow_id', 'change_username_card', 'min_size'
'one_tmp_invite', 'rainbow_id', 'change_username_card', 'min_size', 'self_enable'
);
GetVar($validConfig);
$BONUS = [];
@@ -630,6 +630,7 @@ elseif ($action == 'bonussettings'){
tr($lang_settings['row_attendance_card'],$lang_settings['text_it_costs_user']."<input type='text' style=\"width: 50px\" name=attendance_card value='".(isset($BONUS["attendance_card"]) ? $BONUS["attendance_card"] : \App\Models\BonusLogs::DEFAULT_BONUS_BUY_ATTENDANCE_CARD )."'>".$lang_settings['text_attendance_card_note'], 1);
tr($lang_settings['row_buy_rainbow_id'],$lang_settings['text_it_costs_user']."<input type='text' style=\"width: 50px\" name=rainbow_id value='".(isset($BONUS["rainbow_id"]) ? $BONUS["rainbow_id"] : \App\Models\BonusLogs::DEFAULT_BONUS_BUY_RAINBOW_ID )."'>".$lang_settings['text_buy_rainbow_id_note'], 1);
tr($lang_settings['row_buy_change_username_card'],$lang_settings['text_it_costs_user']."<input type='text' style=\"width: 50px\" name=change_username_card value='".(isset($BONUS["change_username_card"]) ? $BONUS["change_username_card"] : \App\Models\BonusLogs::DEFAULT_BONUS_BUY_CHANGE_USERNAME_CARD )."'>".$lang_settings['text_buy_change_username_card_note'], 1);
tr($lang_settings['row_self_enable'],$lang_settings['text_it_costs_user']."<input type='text' style=\"width: 50px\" name=self_enable value='".(isset($BONUS["self_enable"]) ? $BONUS["self_enable"] : \App\Models\BonusLogs::DEFAULT_BONUS_SELF_ENABLE )."'>".$lang_settings['text_self_enable_note'], 1);
echo '<tr><td colspan="2" align="center"><b>' . $lang_settings['text_attendance_get_bonus'] . '</b></td></tr>';
+2 -1
View File
@@ -36,8 +36,9 @@ if (!$row)
failedlogins();
if ($row['status'] == 'pending')
failedlogins($lang_takelogin['std_user_account_unconfirmed']);
if ($row["enabled"] == "no")
if ($row["enabled"] == "no" && \App\Models\Setting::getSelfEnableBonus() <= 0) {
bark($lang_takelogin['std_account_disabled']);
}
if (!empty($row['two_step_secret'])) {
if (empty($_POST['two_step_code'])) {
+1 -1
View File
@@ -110,7 +110,7 @@ if ($maxPrice > 0 && isset($_POST['price']) && $_POST['price'] > $maxPrice && $p
try {
$dict = TorrentFile::load($tmpname);
$dict->unhybridizedTo();
$dict = $dict->unhybridizedTo();
$dict->parse();
} catch (ParseException $e) {
bark($e->getMessage());
+1
View File
@@ -25,6 +25,7 @@ return [
\App\Models\BonusLogs::BUSINESS_TYPE_TASK_NOT_PASS_DEDUCT => 'Task unfinished deduct',
\App\Models\BonusLogs::BUSINESS_TYPE_REWARD_TORRENT => 'Reward torrent',
\App\Models\BonusLogs::BUSINESS_TYPE_CLAIMED_UNREACHED => 'Claimed torrent unreached',
\App\Models\BonusLogs::BUSINESS_TYPE_SELF_ENABLE => 'Self enable',
\App\Models\BonusLogs::BUSINESS_TYPE_ROLE_WORK_SALARY => 'Role work salary',
\App\Models\BonusLogs::BUSINESS_TYPE_TORRENT_BE_DOWNLOADED => 'Torrent be downloaded',
+14
View File
@@ -0,0 +1,14 @@
<?php
return [
'title' => 'Self-service unblocking',
'enable_status_normal' => 'Your account status is normal, no self-service unblocking is required.',
'no_ban_info' => 'Your ban information cannot be found, self-service unblocking is not possible, please contact the administrator.',
'bonus_not_enough' => 'You currently only have :bonus bonus, self-service unblocking is not possible, please contact the administrator.',
'latest_ban_info' => 'Your latest ban information is as follows:',
'deduct_bonus_per_day' => 'Each ban day (less than 1 day is counted as 1 day) requires deducting :unit bonus.',
'deduct_bonus_total' => 'Currently banned for :days days, total bonus to be deducted :total',
'enable_desc' => 'If you need to unblock, click the button below, the corresponding bonus points will be deducted and the account will return to normal.',
'enable_button' => 'Click to unblock',
'feature_disabled' => 'Feature not enabled',
];
+1
View File
@@ -25,6 +25,7 @@ return [
\App\Models\BonusLogs::BUSINESS_TYPE_TASK_NOT_PASS_DEDUCT => '任务未完成扣除',
\App\Models\BonusLogs::BUSINESS_TYPE_REWARD_TORRENT => '奖励种子',
\App\Models\BonusLogs::BUSINESS_TYPE_CLAIMED_UNREACHED => '认领种子未达标扣除',
\App\Models\BonusLogs::BUSINESS_TYPE_SELF_ENABLE => '自助解封',
\App\Models\BonusLogs::BUSINESS_TYPE_ROLE_WORK_SALARY => '工作组工资',
\App\Models\BonusLogs::BUSINESS_TYPE_TORRENT_BE_DOWNLOADED => '种子被下载',
+14
View File
@@ -0,0 +1,14 @@
<?php
return [
'title' => '自助解封',
'enable_status_normal' => '你的账号状态是正常的,无需自助解封。',
'no_ban_info' => '找不到你的封禁信息,无法自助解封,请联系管理员。',
'bonus_not_enough' => '你目前仅有魔力 :bonus, 无法自助解封,请联系管理员。',
'latest_ban_info' => '你的最新封禁信息如下:',
'deduct_bonus_per_day' => '每封禁 1 天(不足 1 天按 1 天算)需扣除魔力 :unit',
'deduct_bonus_total' => '当前已封禁 :days 天,共需扣除魔力 :total',
'enable_desc' => '若需要解封,点击下面按钮,扣除相应魔力后账号即恢复正常。',
'enable_button' => '点我解封',
'feature_disabled' => '功能未启用',
];
+1
View File
@@ -25,6 +25,7 @@ return [
\App\Models\BonusLogs::BUSINESS_TYPE_TASK_NOT_PASS_DEDUCT => '任務未完成扣除',
\App\Models\BonusLogs::BUSINESS_TYPE_REWARD_TORRENT => '獎勵種子',
\App\Models\BonusLogs::BUSINESS_TYPE_CLAIMED_UNREACHED => '認領種子未達標扣除',
\App\Models\BonusLogs::BUSINESS_TYPE_SELF_ENABLE => '自助解封',
\App\Models\BonusLogs::BUSINESS_TYPE_ROLE_WORK_SALARY => '工作組工資',
\App\Models\BonusLogs::BUSINESS_TYPE_TORRENT_BE_DOWNLOADED => '種子被下載',
+14
View File
@@ -0,0 +1,14 @@
<?php
return [
'title' => '自助解封',
'enable_status_normal' => '妳的賬號狀態是正常的,無需自助解封。',
'no_ban_info' => '找不到妳的封禁信息,無法自助解封,請聯系管理員。',
'bonus_not_enough' => '妳目前僅有魔力 :bonus, 無法自助解封,請聯系管理員。',
'latest_ban_info' => '妳的最新封禁信息如下:',
'deduct_bonus_per_day' => '每封禁 1 天(不足 1 天按 1 天算)需扣除魔力 :unit',
'deduct_bonus_total' => '當前已封禁 :days 天,共需扣除魔力 :total',
'enable_desc' => '若需要解封,點擊下面按鈕,扣除相應魔力後賬號即恢復正常。',
'enable_button' => '點我解封',
'feature_disabled' => '功能未啟用',
];
@@ -1,17 +0,0 @@
<x-filament::page
:class="\Illuminate\Support\Arr::toCssClasses([
'filament-resources-create-record-page',
'filament-resources-' . str_replace('/', '-', $this->getResource()::getSlug()),
])"
>
<x-filament::form wire:submit.prevent="create">
<div style="margin-bottom: 40px;white-space: pre-wrap">{!! $desc !!}</div>
<hr/>
{{ $this->form }}
<x-filament::form.actions
:actions="$this->getCachedFormActions()"
:full-width="$this->hasFullWidthFormActions()"
/>
</x-filament::form>
</x-filament::page>
@@ -1,49 +0,0 @@
<x-filament::page
:widget-data="['record' => $record]"
:class="\Illuminate\Support\Arr::toCssClasses([
'filament-resources-edit-record-page',
'filament-resources-' . str_replace('/', '-', $this->getResource()::getSlug()),
'filament-resources-record-' . $record->getKey(),
])"
>
@capture($form)
<x-filament::form wire:submit.prevent="save">
<div style="margin-bottom: 40px;white-space: pre-wrap">{!! $desc !!}</div>
<hr/>
{{ $this->form }}
<x-filament::form.actions
:actions="$this->getCachedFormActions()"
:full-width="$this->hasFullWidthFormActions()"
/>
</x-filament::form>
@endcapture
@php
$relationManagers = $this->getRelationManagers();
@endphp
@if ((! $this->hasCombinedRelationManagerTabsWithForm()) || (! count($relationManagers)))
{{ $form() }}
@endif
@if (count($relationManagers))
@if (! $this->hasCombinedRelationManagerTabsWithForm())
<x-filament::hr />
@endif
<x-filament::resources.relation-managers
:active-manager="$activeRelationManager"
:form-tab-label="$this->getFormTabLabel()"
:managers="$relationManagers"
:owner-record="$record"
:page-class="static::class"
>
@if ($this->hasCombinedRelationManagerTabsWithForm())
<x-slot name="form">
{{ $form() }}
</x-slot>
@endif
</x-filament::resources.relation-managers>
@endif
</x-filament::page>
@@ -1,3 +0,0 @@
<x-filament::page>
</x-filament::page>
@@ -1,10 +0,0 @@
<x-filament::page>
<form wire:submit.prevent="submit" class="fi-sc fi-sc-has-gap fi-grid">
{{ $this->form }}
<x-filament::actions>
<x-filament::button type="submit">
{{__('filament-actions::edit.single.modal.actions.save.label')}}
</x-filament::button>
</x-filament::actions>
</form>
</x-filament::page>
@@ -1,3 +0,0 @@
<x-filament::page>
{{ $this->form }}
</x-filament::page>
@@ -1,55 +0,0 @@
<div class="fi-ta-ctn">
<div class="fi-ta-main">
<div class="fi-ta-content-ctn">
<table class="fi-ta-table">
<thead>
<tr>
<th class="fi-ta-header-cell fi-ta-header-cell-id">
{{ __('label.exam.index_required_label') }}
</th>
<th class="fi-ta-header-cell fi-ta-header-cell-id">
{{ __('label.exam.index_required_value') }}
</th>
<th class="fi-ta-header-cell fi-ta-header-cell-id">
{{ __('label.exam.index_current_value') }}
</th>
<th class="fi-ta-header-cell fi-ta-header-cell-id">
{{ __('label.exam.index_result') }}
</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-200 whitespace-nowrap dark:divide-white/5">
@foreach ($getState() as $index)
<tr class="fi-ta-row">
<td class="fi-ta-cell fi-ta-cell-id">
<div class="fi-ta-col">
<div
class="fi-size-sm fi-ta-text-item fi-ta-text">{{ $index['index_formatted'] }}</div>
</div>
</td>
<td class="fi-ta-cell fi-ta-cell-id">
<div class="fi-ta-col">
<div
class="fi-size-sm fi-ta-text-item fi-ta-text">{{ $index['require_value_formatted'] }}</div>
</div>
</td>
<td class="fi-ta-cell fi-ta-cell-id">
<div class="fi-ta-col">
<div
class="fi-size-sm fi-ta-text-item fi-ta-text">{{ $index['current_value_formatted'] }}</div>
</div>
</td>
<td class="fi-ta-cell fi-ta-cell-id">
<div class="fi-ta-col">
<div
class="fi-size-sm fi-ta-text-item fi-ta-text">{!! $index['index_result'] !!}</div>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
@@ -1,40 +0,0 @@
<x-filament::page :widget-data="['record' => $record]" class="filament-resources-view-record-page">
<div class="flex flex-col md:flex-row justify-between">
<table class="table text-left border-spacing-y-2 border-collapse divide-y w-full">
<tbody>
@foreach($cardData as $value)
<tr class="">
<th class="border-spacing-3">{{ $value['label'] }}</th>
<td class="border-spacing-3">{!! $value['value'] !!}</td>
</tr>
@endforeach
</tbody>
</table>
<table class="table text-left border-spacing-y-2 border-collapse divide-y w-full">
<thead>
<tr>
<th>{{ __('label.exam.index_required_label') }}</th>
<th>{{ __('label.exam.index_required_value') }}</th>
<th>{{ __('label.exam.index_current_value') }}</th>
<th>{{ __('label.exam.index_result') }}</th>
</tr>
</thead>
<tbody>
@foreach($record->progressFormatted as $index)
<tr>
<td>{{ $index['index_formatted'] }}</td>
<td>{{ $index['require_value_formatted'] }}</td>
<td>{{ $index['current_value_formatted'] }}</td>
<td>{!! $index['passed'] ? __($result_pass_trans_key) : __($result_not_pass_trans_key) !!}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
@if (count($relationManagers = $this->getRelationManagers()))
<x-filament::hr />
<x-filament::resources.relation-managers :active-manager="$activeRelationManager" :managers="$relationManagers" :owner-record="$record" />
@endif
</x-filament::page>
@@ -1,122 +0,0 @@
<x-filament::page>
<div class="flex">
<table class="table w-full text-left border-spacing-y-2 border-collapse divide-y w-full">
<tbody>
<tr>
<th>UID</th>
<td>{{$record->id}}</td>
<td></td>
</tr>
<tr>
<th>{{__('label.user.username')}}</th>
<td>{!! get_username($record->id, false, true, true, true) !!}</td>
<td></td>
</tr>
<tr>
<th>{{__('label.email')}}</th>
<td>{{$record->email}}</td>
<td></td>
</tr>
<tr>
<th>Passkey</th>
<td>{{$record->passkey}}</td>
<td></td>
</tr>
<tr>
<th>{{__('label.status')}}</th>
<td>{{$record->status}}</td>
<td></td>
</tr>
<tr>
<th>{{__('label.enabled')}}</th>
<td>{{$record->enabled}}</td>
<td></td>
</tr>
<tr>
<th>{{__('label.added')}}</th>
<td>{{$record->added}}</td>
<td></td>
</tr>
<tr>
<th>{{__('label.last_access')}}</th>
<td>{{$record->last_access}}</td>
<td></td>
</tr>
<tr>
<th>{{__('label.user.class')}}</th>
<td>{{$record->classText}}</td>
<td></td>
</tr>
@if($props)
<tr>
<th>{{__('user.labels.props')}}</th>
<td><div style="display: flex">{!! implode('&nbsp;|&nbsp;', $props) !!}</div></td>
<td></td>
</tr>
@endif
{!! do_action('user_detail_rows', $record->id, 'admin') !!}
<tr>
<th>{{__('label.user.invite_by')}}</th>
<td>{{$record->inviter->username ?? ''}}</td>
<td></td>
</tr>
<tr>
<th>{{__('label.user.two_step_authentication')}}</th>
<td>{{$record->two_step_secret ? 'Enabled' : 'Disabled'}}</td>
<td></td>
</tr>
<tr>
<th>{{__('label.user.downloadpos')}}</th>
<td>{{$record->downloadpos}}</td>
<td></td>
</tr>
<tr>
<th>{{__('label.user.parked')}}</th>
<td>{{$record->parked}}</td>
<td></td>
</tr>
<tr>
<th>{{__('label.user.offer_allowed_count')}}</th>
<td>{{$record->offer_allowed_count}}</td>
<td></td>
</tr>
<tr>
<th>{{__('label.user.seed_points')}}</th>
<td>{{$record->seed_points}}</td>
<td></td>
</tr>
<tr>
<th>{{ __('label.user.attendance_card') }}</th>
<td>{{$record->attendance_card}}</td>
<td></td>
</tr>
<tr>
<th>{{ __('label.user.invites') }}</th>
<td>{{sprintf('%s(%s)', $record->invites, $temporary_invite_count)}}</td>
<td></td>
</tr>
<tr>
<th>{{ __('label.uploaded') }}</th>
<td>{{$record->uploadedText}}</td>
<td></td>
</tr>
<tr>
<th>{{ __('label.downloaded') }}</th>
<td>{{$record->downloadedText}}</td>
<td></td>
</tr>
<tr>
<th>{{ __('label.user.seedbonus') }}</th>
<td>{{$record->seedbonus}}</td>
<td></td>
</tr>
</tbody>
</table>
</div>
@if (count($relationManagers = $this->getRelationManagers()))
<x-filament::hr />
<x-filament::resources.relation-managers :active-manager="$activeRelationManager" :managers="$relationManagers" :owner-record="$record" />
@endif
</x-filament::page>