From 83c467618405f0dc11fed710b9da9bcc3ab39c8a Mon Sep 17 00:00:00 2001 From: Chenx221 Date: Fri, 8 Mar 2024 15:25:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9Euser=E8=A1=A8=E5=AD=97?= =?UTF-8?q?=E6=AE=B5dark=5Fmode=20=E7=94=A8=E9=80=94=E6=88=91=E5=B0=B1?= =?UTF-8?q?=E4=B8=8D=E5=A4=9A=E8=AF=B4=E4=BA=86=E5=90=A7=200=E5=85=B31?= =?UTF-8?q?=E5=BC=802=E8=87=AA=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/User.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/models/User.php b/models/User.php index eb68afd..0918f5a 100644 --- a/models/User.php +++ b/models/User.php @@ -28,6 +28,7 @@ use yii\web\IdentityInterface; * @property int|null $is_otp_enabled 启用otp * @property int|null $storage_limit 存储容量限制,MB * @property string|null $recovery_codes OTP恢复代码 + * @property int|null $dark_mode 夜间模式(0 off,1 on,2 auto) * * @property CollectionTasks[] $collectionTasks * @property Share[] $shares @@ -56,7 +57,7 @@ class User extends ActiveRecord implements IdentityInterface public function rules(): array { return [ - [['status', 'is_encryption_enabled', 'is_otp_enabled'], 'integer'], + [['status', 'is_encryption_enabled', 'is_otp_enabled','dark_mode'], 'integer'], [['created_at', 'last_login'], 'safe'], [['bio', 'totp_input'], 'string'], [['encryption_key', 'otp_secret', 'recovery_codes'], 'string', 'max' => 255], @@ -115,7 +116,7 @@ class User extends ActiveRecord implements IdentityInterface 'is_otp_enabled' => 'Is Otp Enabled', 'storage_limit' => 'Storage Limit', 'recovery_codes' => 'Recovery Codes', - + 'dark_mode' =>'Dark Mode' ]; }