From 4fa80f9124ee986068952b89158b034d9624ae15 Mon Sep 17 00:00:00 2001 From: M1Screw <14369594+M1Screw@users.noreply.github.com> Date: Wed, 25 Oct 2023 15:05:59 +0800 Subject: [PATCH 1/5] refactor: replace jquery ajax with htmx in /user --- app/routes.php | 2 +- composer.lock | 93 ++-- resources/views/tabler/user/edit.tpl | 477 ++++-------------- resources/views/tabler/user/footer.tpl | 61 +-- resources/views/tabler/user/header.tpl | 12 +- resources/views/tabler/user/index.tpl | 48 +- resources/views/tabler/user/invite.tpl | 34 +- resources/views/tabler/user/invoice/index.tpl | 2 +- resources/views/tabler/user/money.tpl | 28 +- resources/views/tabler/user/order/create.tpl | 6 +- resources/views/tabler/user/order/index.tpl | 2 +- resources/views/tabler/user/rate.tpl | 21 +- resources/views/tabler/user/ticket/index.tpl | 33 +- resources/views/tabler/user/ticket/view.tpl | 33 +- src/Controllers/User/InfoController.php | 10 +- src/Controllers/User/RateController.php | 12 +- src/Controllers/UserController.php | 44 +- src/Models/User.php | 1 + 18 files changed, 259 insertions(+), 660 deletions(-) diff --git a/app/routes.php b/app/routes.php index ad12a2f2fc..bdba86889e 100644 --- a/app/routes.php +++ b/app/routes.php @@ -27,7 +27,7 @@ $group->get('', App\Controllers\UserController::class . ':index'); $group->get('/', App\Controllers\UserController::class . ':index'); // 签到 - $group->post('/checkin', App\Controllers\UserController::class . ':doCheckin'); + $group->post('/checkin', App\Controllers\UserController::class . ':checkin'); // 公告 $group->get('/announcement', App\Controllers\UserController::class . ':announcement'); // 文档 diff --git a/composer.lock b/composer.lock index c4f3d113ca..f12f9d68cc 100644 --- a/composer.lock +++ b/composer.lock @@ -69,16 +69,16 @@ }, { "name": "aws/aws-crt-php", - "version": "v1.2.2", + "version": "v1.2.3", "source": { "type": "git", "url": "https://github.com/awslabs/aws-crt-php.git", - "reference": "2f1dc7b7eda080498be96a4a6d683a41583030e9" + "reference": "5545a4fa310aec39f54279fdacebcce33b3ff382" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/awslabs/aws-crt-php/zipball/2f1dc7b7eda080498be96a4a6d683a41583030e9", - "reference": "2f1dc7b7eda080498be96a4a6d683a41583030e9", + "url": "https://api.github.com/repos/awslabs/aws-crt-php/zipball/5545a4fa310aec39f54279fdacebcce33b3ff382", + "reference": "5545a4fa310aec39f54279fdacebcce33b3ff382", "shasum": "" }, "require": { @@ -117,26 +117,26 @@ ], "support": { "issues": "https://github.com/awslabs/aws-crt-php/issues", - "source": "https://github.com/awslabs/aws-crt-php/tree/v1.2.2" + "source": "https://github.com/awslabs/aws-crt-php/tree/v1.2.3" }, - "time": "2023-07-20T16:49:55+00:00" + "time": "2023-10-16T20:10:06+00:00" }, { "name": "aws/aws-sdk-php", - "version": "3.283.9", + "version": "3.283.11", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "0233b9f3f2155dac35c829ce4fc1b7cdb6ff8c0a" + "reference": "348b68edcc83062c329cf7540c4c92d061d27d9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/0233b9f3f2155dac35c829ce4fc1b7cdb6ff8c0a", - "reference": "0233b9f3f2155dac35c829ce4fc1b7cdb6ff8c0a", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/348b68edcc83062c329cf7540c4c92d061d27d9c", + "reference": "348b68edcc83062c329cf7540c4c92d061d27d9c", "shasum": "" }, "require": { - "aws/aws-crt-php": "^1.0.4", + "aws/aws-crt-php": "^1.2.3", "ext-json": "*", "ext-pcre": "*", "ext-simplexml": "*", @@ -212,9 +212,9 @@ "support": { "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.283.9" + "source": "https://github.com/aws/aws-sdk-php/tree/3.283.11" }, - "time": "2023-10-20T20:03:26+00:00" + "time": "2023-10-24T18:10:38+00:00" }, { "name": "bacon/bacon-qr-code", @@ -1237,7 +1237,7 @@ }, { "name": "illuminate/collections", - "version": "v10.28.0", + "version": "v10.29.0", "source": { "type": "git", "url": "https://github.com/illuminate/collections.git", @@ -1292,7 +1292,7 @@ }, { "name": "illuminate/conditionable", - "version": "v10.28.0", + "version": "v10.29.0", "source": { "type": "git", "url": "https://github.com/illuminate/conditionable.git", @@ -1338,7 +1338,7 @@ }, { "name": "illuminate/container", - "version": "v10.28.0", + "version": "v10.29.0", "source": { "type": "git", "url": "https://github.com/illuminate/container.git", @@ -1389,7 +1389,7 @@ }, { "name": "illuminate/contracts", - "version": "v10.28.0", + "version": "v10.29.0", "source": { "type": "git", "url": "https://github.com/illuminate/contracts.git", @@ -1437,16 +1437,16 @@ }, { "name": "illuminate/database", - "version": "v10.28.0", + "version": "v10.29.0", "source": { "type": "git", "url": "https://github.com/illuminate/database.git", - "reference": "7b82234921a80bfc7a8fe67ff3ba3043c384fc04" + "reference": "bfe1d2bcd955db6325709c36d098b2d9bd4d7c5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/database/zipball/7b82234921a80bfc7a8fe67ff3ba3043c384fc04", - "reference": "7b82234921a80bfc7a8fe67ff3ba3043c384fc04", + "url": "https://api.github.com/repos/illuminate/database/zipball/bfe1d2bcd955db6325709c36d098b2d9bd4d7c5d", + "reference": "bfe1d2bcd955db6325709c36d098b2d9bd4d7c5d", "shasum": "" }, "require": { @@ -1502,11 +1502,11 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2023-10-09T18:36:56+00:00" + "time": "2023-10-20T10:10:54+00:00" }, { "name": "illuminate/macroable", - "version": "v10.28.0", + "version": "v10.29.0", "source": { "type": "git", "url": "https://github.com/illuminate/macroable.git", @@ -1552,7 +1552,7 @@ }, { "name": "illuminate/pagination", - "version": "v10.28.0", + "version": "v10.29.0", "source": { "type": "git", "url": "https://github.com/illuminate/pagination.git", @@ -1602,16 +1602,16 @@ }, { "name": "illuminate/support", - "version": "v10.28.0", + "version": "v10.29.0", "source": { "type": "git", "url": "https://github.com/illuminate/support.git", - "reference": "dd3b3275a9dbd30736363f232e6bc2970d7681e9" + "reference": "e46e5864314d59fa690637e51d6cd2113acb2e7b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/support/zipball/dd3b3275a9dbd30736363f232e6bc2970d7681e9", - "reference": "dd3b3275a9dbd30736363f232e6bc2970d7681e9", + "url": "https://api.github.com/repos/illuminate/support/zipball/e46e5864314d59fa690637e51d6cd2113acb2e7b", + "reference": "e46e5864314d59fa690637e51d6cd2113acb2e7b", "shasum": "" }, "require": { @@ -1669,7 +1669,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2023-10-06T13:41:04+00:00" + "time": "2023-10-18T14:12:13+00:00" }, { "name": "irazasyed/telegram-bot-sdk", @@ -3241,31 +3241,26 @@ }, { "name": "php-http/promise", - "version": "1.1.0", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/php-http/promise.git", - "reference": "4c4c1f9b7289a2ec57cde7f1e9762a5789506f88" + "reference": "ef4905bfb492ff389eb7f12e26925a0f20073050" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/promise/zipball/4c4c1f9b7289a2ec57cde7f1e9762a5789506f88", - "reference": "4c4c1f9b7289a2ec57cde7f1e9762a5789506f88", + "url": "https://api.github.com/repos/php-http/promise/zipball/ef4905bfb492ff389eb7f12e26925a0f20073050", + "reference": "ef4905bfb492ff389eb7f12e26925a0f20073050", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, "require-dev": { - "friends-of-phpspec/phpspec-code-coverage": "^4.3.2", - "phpspec/phpspec": "^5.1.2 || ^6.2" + "friends-of-phpspec/phpspec-code-coverage": "^4.3.2 || ^6.3", + "phpspec/phpspec": "^5.1.2 || ^6.2 || ^7.4" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, "autoload": { "psr-4": { "Http\\Promise\\": "src/" @@ -3292,9 +3287,9 @@ ], "support": { "issues": "https://github.com/php-http/promise/issues", - "source": "https://github.com/php-http/promise/tree/1.1.0" + "source": "https://github.com/php-http/promise/tree/1.2.0" }, - "time": "2020-07-07T09:29:14+00:00" + "time": "2023-10-24T09:20:26+00:00" }, { "name": "phpmailer/phpmailer", @@ -4373,16 +4368,16 @@ }, { "name": "sentry/sentry", - "version": "3.21.0", + "version": "3.22.0", "source": { "type": "git", "url": "https://github.com/getsentry/sentry-php.git", - "reference": "624aafc22b84b089ffa43b71fb01e0096505ec4f" + "reference": "c0e3df5a5c1d133cd9461e7672568ff07042c19d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/624aafc22b84b089ffa43b71fb01e0096505ec4f", - "reference": "624aafc22b84b089ffa43b71fb01e0096505ec4f", + "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/c0e3df5a5c1d133cd9461e7672568ff07042c19d", + "reference": "c0e3df5a5c1d133cd9461e7672568ff07042c19d", "shasum": "" }, "require": { @@ -4400,7 +4395,7 @@ "psr/http-factory": "^1.0", "psr/http-factory-implementation": "^1.0", "psr/log": "^1.0|^2.0|^3.0", - "symfony/options-resolver": "^3.4.43|^4.4.30|^5.0.11|^6.0", + "symfony/options-resolver": "^3.4.43|^4.4.30|^5.0.11|^6.0|^7.0", "symfony/polyfill-php80": "^1.17" }, "conflict": { @@ -4457,7 +4452,7 @@ ], "support": { "issues": "https://github.com/getsentry/sentry-php/issues", - "source": "https://github.com/getsentry/sentry-php/tree/3.21.0" + "source": "https://github.com/getsentry/sentry-php/tree/3.22.0" }, "funding": [ { @@ -4469,7 +4464,7 @@ "type": "custom" } ], - "time": "2023-07-31T15:31:24+00:00" + "time": "2023-10-23T20:34:53+00:00" }, { "name": "slim/http", diff --git a/resources/views/tabler/user/edit.tpl b/resources/views/tabler/user/edit.tpl index f07a733635..394eb5ba73 100644 --- a/resources/views/tabler/user/edit.tpl +++ b/resources/views/tabler/user/edit.tpl @@ -74,13 +74,24 @@ @@ -157,7 +172,8 @@ {if $user->im_type !== 0}
-
@@ -216,9 +232,20 @@ @@ -242,7 +269,7 @@
-
@@ -250,8 +277,14 @@
@@ -279,8 +312,11 @@ @@ -294,8 +330,10 @@ @@ -310,8 +348,10 @@ @@ -325,7 +365,7 @@

每日流量报告

-
@@ -369,8 +412,11 @@ @@ -391,8 +437,11 @@ @@ -409,11 +458,11 @@

删除账户数据

@@ -432,7 +481,7 @@ - - -