From 3f8fc1c9ce1c6dce6b13e65592d5d1c1575267cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=8Carodej?= Date: Wed, 30 Mar 2022 18:12:41 +0200 Subject: [PATCH] dashboard alert box for new system upgrade --- config/vuefilemanager.php | 1 + ..._03_30_143926_create_app_updates_table.php | 32 +++ public/mix-manifest.json | 32 +-- resources/js/views/Admin/AlertBox.vue | 40 ++++ resources/js/views/Admin/Dashboard.vue | 68 ++----- routes/maintenance.php | 4 +- .../Console/Commands/SetupDevEnvironment.php | 189 +++++++++--------- .../Dashboard/GetDashboardDataController.php | 23 ++- src/Domain/Files/Actions/UploadFileAction.php | 14 +- src/Domain/Files/Models/File.php | 2 +- .../Folders/Actions/CreateFolderAction.php | 3 +- .../Controllers/UpgradeSystemController.php | 39 ++-- src/Domain/Maintenance/Models/AppUpdate.php | 15 ++ .../Actions/SeedDefaultSettingsAction.php | 6 + .../Controllers/LeaveTeamFolderController.php | 2 +- tests/Domain/Admin/DashboardTest.php | 3 +- tests/Domain/Maintenance/AppUpgradeTest.php | 18 ++ tests/Domain/Teams/TeamManagementTest.php | 3 - tests/Domain/Teams/TeamsTest.php | 3 +- 19 files changed, 299 insertions(+), 198 deletions(-) create mode 100644 database/migrations/2022_03_30_143926_create_app_updates_table.php create mode 100644 resources/js/views/Admin/AlertBox.vue create mode 100644 src/Domain/Maintenance/Models/AppUpdate.php diff --git a/config/vuefilemanager.php b/config/vuefilemanager.php index 559b5bdc..146dc624 100644 --- a/config/vuefilemanager.php +++ b/config/vuefilemanager.php @@ -61,6 +61,7 @@ return [ ], ], + // The update versions which need to run upgrade process 'updates' => [ '2_0_10', ], diff --git a/database/migrations/2022_03_30_143926_create_app_updates_table.php b/database/migrations/2022_03_30_143926_create_app_updates_table.php new file mode 100644 index 00000000..9dcda64c --- /dev/null +++ b/database/migrations/2022_03_30_143926_create_app_updates_table.php @@ -0,0 +1,32 @@ +id(); + $table->string('version'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('app_updates'); + } +}; diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 2dd55f28..f7bf9c94 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -1,7 +1,7 @@ { "/js/main.js": "/js/main.js", - "/chunks/request.js": "/chunks/request.js?id=14b4eff14acc96f0", - "/chunks/request-upload.js": "/chunks/request-upload.js?id=5cf8338c7200a1bf", + "/chunks/request.js": "/chunks/request.js?id=53076a8a4ef4dc5a", + "/chunks/request-upload.js": "/chunks/request-upload.js?id=2a6e79fa8211e8dd", "/chunks/setup-wizard.js": "/chunks/setup-wizard.js?id=19a0784e59d768ec", "/chunks/status-check.js": "/chunks/status-check.js?id=51a75f0b3b260189", "/chunks/purchase-code.js": "/chunks/purchase-code.js?id=df5bd89528649783", @@ -9,14 +9,14 @@ "/chunks/environment-setup.js": "/chunks/environment-setup.js?id=e1ad83583367917a", "/chunks/app-setup.js": "/chunks/app-setup.js?id=288594cd7f628cf8", "/chunks/admin-account.js": "/chunks/admin-account.js?id=916450217130f3b8", - "/chunks/shared.js": "/chunks/shared.js?id=b493900394d77a9c", - "/chunks/shared/browser.js": "/chunks/shared/browser.js?id=09c2c58a5688eddb", - "/chunks/shared/single-file.js": "/chunks/shared/single-file.js?id=9ae0babfa7134c29", + "/chunks/shared.js": "/chunks/shared.js?id=11da834fce6ab9c3", + "/chunks/shared/browser.js": "/chunks/shared/browser.js?id=6b2316ea14852488", + "/chunks/shared/single-file.js": "/chunks/shared/single-file.js?id=70ee7ce098c77d54", "/chunks/shared/authenticate.js": "/chunks/shared/authenticate.js?id=672e931a9fb0b672", "/chunks/not-found.js": "/chunks/not-found.js?id=9f6ce23ce5d969f1", "/chunks/temporary-unavailable.js": "/chunks/temporary-unavailable.js?id=f564565faa09d6d6", - "/chunks/admin.js": "/chunks/admin.js?id=a0c8318fb3480cb0", - "/chunks/dashboard.js": "/chunks/dashboard.js?id=ec5474f5a9da434c", + "/chunks/admin.js": "/chunks/admin.js?id=330579ff4d2878d1", + "/chunks/dashboard.js": "/chunks/dashboard.js?id=65471d4c175c7cf5", "/chunks/invoices.js": "/chunks/invoices.js?id=1416cbf6d1a593ac", "/chunks/subscriptions.js": "/chunks/subscriptions.js?id=5bf6704f5b599f36", "/chunks/pages.js": "/chunks/pages.js?id=c8380d571e91e8be", @@ -57,18 +57,18 @@ "/chunks/sign-up.js": "/chunks/sign-up.js?id=bb92bad614e60d45", "/chunks/forgotten-password.js": "/chunks/forgotten-password.js?id=50a1bc5e4ed86ec9", "/chunks/create-new-password.js": "/chunks/create-new-password.js?id=f652de052dba55c1", - "/chunks/settings.js": "/chunks/settings.js?id=9e0671d49295178e", + "/chunks/settings.js": "/chunks/settings.js?id=45c48f36b841bb77", "/chunks/profile.js": "/chunks/profile.js?id=0eca231475e267ab", "/chunks/settings-password.js": "/chunks/settings-password.js?id=11d4331650cac280", "/chunks/settings-storage.js": "/chunks/settings-storage.js?id=994b669a56fd417b", - "/chunks/billing.js": "/chunks/billing.js?id=4ea77ab501b8c575", - "/chunks/platform.js": "/chunks/platform.js?id=9d926efeacb4d530", - "/chunks/files.js": "/chunks/files.js?id=053fc46f0a783697", - "/chunks/recent-uploads.js": "/chunks/recent-uploads.js?id=aefaf719fbafa603", - "/chunks/my-shared-items.js": "/chunks/my-shared-items.js?id=ea72dbc73a771e4a", - "/chunks/trash.js": "/chunks/trash.js?id=6bc564374cb24449", - "/chunks/team-folders.js": "/chunks/team-folders.js?id=f2c2722451de236c", - "/chunks/shared-with-me.js": "/chunks/shared-with-me.js?id=fcf601ec2d9e3318", + "/chunks/billing.js": "/chunks/billing.js?id=40e758c87bcf6e89", + "/chunks/platform.js": "/chunks/platform.js?id=018b4aa10f3627f8", + "/chunks/files.js": "/chunks/files.js?id=bed8debe238dd68f", + "/chunks/recent-uploads.js": "/chunks/recent-uploads.js?id=a27d80d1e54995ca", + "/chunks/my-shared-items.js": "/chunks/my-shared-items.js?id=c1379a64bd5fa0d3", + "/chunks/trash.js": "/chunks/trash.js?id=6c877d7ddc2654fb", + "/chunks/team-folders.js": "/chunks/team-folders.js?id=5873488d325a3309", + "/chunks/shared-with-me.js": "/chunks/shared-with-me.js?id=99ca76a487bca899", "/chunks/invitation.js": "/chunks/invitation.js?id=9ed8456c9d6d5ce1", "/css/tailwind.css": "/css/tailwind.css", "/css/app.css": "/css/app.css" diff --git a/resources/js/views/Admin/AlertBox.vue b/resources/js/views/Admin/AlertBox.vue new file mode 100644 index 00000000..d98b14ef --- /dev/null +++ b/resources/js/views/Admin/AlertBox.vue @@ -0,0 +1,40 @@ + + diff --git a/resources/js/views/Admin/Dashboard.vue b/resources/js/views/Admin/Dashboard.vue index 0de52d85..8f6a0afc 100644 --- a/resources/js/views/Admin/Dashboard.vue +++ b/resources/js/views/Admin/Dashboard.vue @@ -54,56 +54,24 @@ -
- -

- There is a new update that need upgrade some stuff on your backend. Please click on this box to upgrade. -

-
+ + There is a new update that needs to upgrade some stuff on your backend. Please click on this box to upgrade. + -
- -

- We detect new language strings. You should upgrade your translations. After that, you can find new translations at the bottom page of your translations in language editor. Please click on this box. -

-
+ + We detect new language strings. You should upgrade your translations. After that, you can find new translations at the bottom page of your translations in language editor. Please click on this box. + -
- -

- As you installed app with metered subscription type, you have to - create your plan - as soon as possible to prevent new user registration without automatically assigned subscription - plan. -

-
+ + As you installed app with metered subscription type, you have to create your plan as soon as possible to prevent new user registration without automatically assigned subscription plan. + -
- -

- We detect your cron jobs probably doesn't work correctly, please check it, you need it for running - app correctly. If you set your cron job, please get back one minute later. -

-
+ + We detect your cron jobs probably doesn't work correctly, please check it, you need it for running app correctly. If you set your cron job, please get back one minute later. +
@@ -221,26 +189,24 @@