mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 04:20:49 +08:00
improve medal time range no limit display
This commit is contained in:
@@ -95,8 +95,8 @@ class Test extends Command
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$work = new WorkRepository();
|
||||
$work->settleRole(6, 1, true);
|
||||
$r = extension_loaded('Zend OPcache');
|
||||
dd($r);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -99,11 +99,11 @@ class MedalResource extends Resource
|
||||
Tables\Columns\IconColumn::make('display_on_medal_page')->label(__('label.medal.display_on_medal_page'))->boolean(),
|
||||
Tables\Columns\TextColumn::make('sale_begin_end_time')
|
||||
->label(__('medal.fields.sale_begin_end_time'))
|
||||
->formatStateUsing(fn ($record) => new HtmlString(sprintf('%s ~<br/>%s', $record->sale_begin_time ?? '--', $record->sale_end_time ?? '--')))
|
||||
->formatStateUsing(fn ($record) => new HtmlString(sprintf('%s ~<br/>%s', $record->sale_begin_time ?? nexus_trans('nexus.no_limit'), $record->sale_end_time ?? nexus_trans('nexus.no_limit'))))
|
||||
,
|
||||
Tables\Columns\TextColumn::make('bonus_addition_factor')->label(__('medal.fields.bonus_addition_factor')),
|
||||
Tables\Columns\TextColumn::make('gift_fee_factor')->label(__('medal.fields.gift_fee_factor')),
|
||||
Tables\Columns\TextColumn::make('price')->label(__('label.price')),
|
||||
Tables\Columns\TextColumn::make('price')->label(__('label.price'))->formatStateUsing(fn ($state) => number_format($state)),
|
||||
|
||||
Tables\Columns\TextColumn::make('duration')->label(__('label.medal.duration')),
|
||||
|
||||
|
||||
@@ -462,6 +462,7 @@ class UserRepository extends BaseRepository
|
||||
$targetUser->usernameChangeLogs()->create($changeLog);
|
||||
$targetUser->username = $changeLog['username_new'];
|
||||
$targetUser->save();
|
||||
$this->clearCache($targetUser);
|
||||
});
|
||||
return true;
|
||||
}
|
||||
@@ -498,6 +499,7 @@ class UserRepository extends BaseRepository
|
||||
$modComment = date('Y-m-d') . " - " . $message['msg'];
|
||||
$targetUser->updateWithModComment(['class' => $newClass], $modComment);
|
||||
Message::add($message);
|
||||
$this->clearCache($targetUser);
|
||||
});
|
||||
|
||||
return true;
|
||||
@@ -561,7 +563,7 @@ class UserRepository extends BaseRepository
|
||||
}
|
||||
}
|
||||
if ($result) {
|
||||
clear_user_cache($user->id, $user->passkey);
|
||||
$this->clearCache($user);
|
||||
if ($notify) {
|
||||
Message::add($message);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.8.0');
|
||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2023-02-08');
|
||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2023-02-09');
|
||||
defined('IN_TRACKER') || define('IN_TRACKER', false);
|
||||
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
|
||||
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
|
||||
|
||||
@@ -5881,7 +5881,7 @@ function build_medal_image(\Illuminate\Support\Collection $medals, $maxHeight =
|
||||
$wrapBefore = '<form><div style="display: flex;justify-content: center;margin-top: 10px;">';
|
||||
$wrapAfter = '</div></form>';
|
||||
foreach ($medals as $medal) {
|
||||
$html = sprintf('<div style="display: flex;flex-direction: column;justify-content: space-between;margin-right: 10px"><img src="%s" title="%s" class="preview" style="max-height: %spx;max-width: %spx"/>', $medal->image_large, $medal->name, $maxHeight, $maxHeight);
|
||||
$html = sprintf('<div style="display: flex;flex-direction: column;justify-content: space-between;margin-right: 10px"><div><img src="%s" title="%s" class="preview" style="max-height: %spx;max-width: %spx"/></div>', $medal->image_large, $medal->name, $maxHeight, $maxHeight);
|
||||
if ($withActions) {
|
||||
$html .= sprintf(
|
||||
'<div style="display: flex;flex-direction: column;align-items:flex-start"><span>%s: %s</span><span>%s: %s</span><label>%s: <input type="number" name="priority_%s" value="%s" style="width: 50px" placeholder="%s"></label>',
|
||||
|
||||
@@ -32,7 +32,7 @@ class Install
|
||||
'UID_STARTS',
|
||||
];
|
||||
|
||||
protected array $requiredExtensions = ['ctype', 'curl', 'fileinfo', 'json', 'mbstring', 'openssl', 'pdo_mysql', 'tokenizer', 'xml', 'mysqli', 'bcmath', 'redis', 'gd', 'gmp'];
|
||||
protected array $requiredExtensions = ['ctype', 'curl', 'fileinfo', 'json', 'mbstring', 'openssl', 'pdo_mysql', 'tokenizer', 'xml', 'mysqli', 'bcmath', 'redis', 'gd', 'gmp', 'Zend OPcache'];
|
||||
protected array $optionalExtensions = [
|
||||
['name' => 'pcntl', 'desc' => "If use Octane and 'Current' showing 0, make sure it's on php -m"],
|
||||
['name' => 'posix', 'desc' => "If use Octane and 'Current' showing 0, make sure it's on php -m"],
|
||||
|
||||
@@ -93,7 +93,7 @@ foreach ($rows as $row) {
|
||||
);
|
||||
$table .= sprintf(
|
||||
'<tr><td><img src="%s" style="max-width: 60px;max-height: 60px;" class="preview" /></td><td><h1>%s</h1>%s</td><td>%s ~<br>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td>',
|
||||
$row->image_large, $row->name, $row->description, $row->sale_begin_time ?? '--', $row->sale_end_time ?? '--', $row->durationText, (($row->bonus_addition_factor ?? 0) * 100).'%', number_format($row->price), $row->inventory ?? nexus_trans('label.infinite'), $buyAction, $giftAction
|
||||
$row->image_large, $row->name, $row->description, $row->sale_begin_time ?? nexus_trans('nexus.no_limit'), $row->sale_end_time ?? nexus_trans('nexus.no_limit'), $row->durationText, (($row->bonus_addition_factor ?? 0) * 100).'%', number_format($row->price), $row->inventory ?? nexus_trans('label.infinite'), $buyAction, $giftAction
|
||||
);
|
||||
}
|
||||
$table .= '</tbody></table>';
|
||||
|
||||
@@ -13,4 +13,5 @@ return [
|
||||
'increment' => 'increment',
|
||||
'decrement' => 'decrement',
|
||||
'action' => 'Action',
|
||||
'no_limit' => 'No limit',
|
||||
];
|
||||
|
||||
@@ -13,4 +13,5 @@ return [
|
||||
'increment' => '增加',
|
||||
'decrement' => '减少',
|
||||
'action' => '操作',
|
||||
'no_limit' => '不限',
|
||||
];
|
||||
|
||||
@@ -13,4 +13,5 @@ return [
|
||||
'increment' => '增加',
|
||||
'decrement' => '減少',
|
||||
'action' => '操作',
|
||||
'no_limit' => '不限',
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user