From 9880357433f1b7805d66a9bc8bcb270271cd4833 Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Sat, 4 Feb 2023 11:29:12 +0800 Subject: [PATCH] feat: add diff online tool --- web/app/controllers/apps/diff_online.php | 49 +++ web/app/locale/basic/en.php | 1 + web/app/locale/basic/zh-cn.php | 1 + web/app/route.php | 1 + web/app/views/main-nav.php | 490 ++++++++++++----------- 5 files changed, 300 insertions(+), 242 deletions(-) create mode 100644 web/app/controllers/apps/diff_online.php diff --git a/web/app/controllers/apps/diff_online.php b/web/app/controllers/apps/diff_online.php new file mode 100644 index 0000000..c768c74 --- /dev/null +++ b/web/app/controllers/apps/diff_online.php @@ -0,0 +1,49 @@ + + + + +

+ +

+ +
+
+
+
+
+
+
+
+ +
+ + + + diff --git a/web/app/locale/basic/en.php b/web/app/locale/basic/en.php index 73e28fd..725a30f 100644 --- a/web/app/locale/basic/en.php +++ b/web/app/locale/basic/en.php @@ -102,4 +102,5 @@ return [ 'apps' => 'Apps', 'image hosting' => 'Image Hosting', 'html to markdown' => 'HTML to Markdown', + 'diff online' => 'Diff Online', ]; diff --git a/web/app/locale/basic/zh-cn.php b/web/app/locale/basic/zh-cn.php index e18d4ed..6b05853 100644 --- a/web/app/locale/basic/zh-cn.php +++ b/web/app/locale/basic/zh-cn.php @@ -102,4 +102,5 @@ return [ 'apps' => '应用', 'image hosting' => '图床', 'html to markdown' => 'HTML 转 Markdown', + 'diff online' => '在线比较', ]; diff --git a/web/app/route.php b/web/app/route.php index dba9979..b276b93 100644 --- a/web/app/route.php +++ b/web/app/route.php @@ -96,6 +96,7 @@ Route::group( // Apps Route::any('/apps/image_hosting', '/apps/image_hosting.php'); Route::any('/apps/html2markdown', '/apps/html2markdown.php'); + Route::any('/apps/diff_online', '/apps/diff_online.php'); } ); diff --git a/web/app/views/main-nav.php b/web/app/views/main-nav.php index 9625271..d4d4b12 100644 --- a/web/app/views/main-nav.php +++ b/web/app/views/main-nav.php @@ -1,252 +1,258 @@ +if (isset($REQUIRE_LIB['bootstrap5'])) { + $new_user_msg_num = DB::selectCount("select count(*) from user_msg where receiver = '" . Auth::id() . "' and read_time is null"); + $new_system_msg_num = DB::selectCount("select count(*) from user_system_msg where receiver = '" . Auth::id() . "' and read_time is null"); + $new_msg_tot = $new_user_msg_num + $new_system_msg_num; +} +?> @@ -254,22 +260,22 @@ mb-4 var zan_link = ''; - - +