diff --git a/app/Http/Controllers/General/SetupWizardController.php b/app/Http/Controllers/General/SetupWizardController.php index 95e336f1..497acc9b 100644 --- a/app/Http/Controllers/General/SetupWizardController.php +++ b/app/Http/Controllers/General/SetupWizardController.php @@ -466,19 +466,16 @@ class SetupWizardController extends Controller ]); // Create legal pages and index content - if ($request->license === 'Extended') { + $pages = collect(config('content.pages')); + $content = $request->license === 'Extended' ? collect(config('content.content_extended')) : collect(config('content.content_regular')); - $pages = collect(config('content.pages')); - $content = collect(config('content.content')); + $content->each(function ($content) { + Setting::updateOrCreate($content); + }); - $content->each(function ($content) { - Setting::updateOrCreate($content); - }); - - $pages->each(function ($page) { - Page::updateOrCreate($page); - }); - } + $pages->each(function ($page) { + Page::updateOrCreate($page); + }); // Retrieve access token $response = Route::dispatch(self::make_login_request($request)); diff --git a/app/Http/Controllers/General/UpgradeAppController.php b/app/Http/Controllers/General/UpgradeAppController.php index 8d7cab47..3dfbd630 100644 --- a/app/Http/Controllers/General/UpgradeAppController.php +++ b/app/Http/Controllers/General/UpgradeAppController.php @@ -11,119 +11,6 @@ use Schema; class UpgradeAppController extends Controller { - /** - * Upgrade account from 1.6 to 1.7 - * - * @param Request $request - * @return \Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\Response - */ - public function upgrade(Request $request) - { - $upgraded = Setting::where('name', 'latest_upgrade')->first(); - - if ($upgraded && $upgraded->value === '1.7') abort(401); - - // Create legal pages and index content - if ($request->license === 'Extended') { - - $pages = collect(config('content.pages')); - $content = collect(config('content.content')); - - $content->each(function ($content) { - Setting::updateOrCreate($content); - }); - - $pages->each(function ($page) { - Page::updateOrCreate($page); - }); - } - - // Store Logo - if ($request->hasFile('logo')) { - $logo = store_system_image($request->file('logo'), 'system'); - } - - // Store Logo horizontal - if ($request->hasFile('logo_horizontal')) { - $logo_horizontal = store_system_image($request->file('logo_horizontal'), 'system'); - } - - // Store favicon - if ($request->hasFile('favicon')) { - $favicon = store_system_image($request->file('favicon'), 'system'); - } - - // Get options - $settings = collect([ - [ - 'name' => 'setup_wizard_database', - 'value' => 1, - ], - [ - 'name' => 'setup_wizard_success', - 'value' => 1, - ], - [ - 'name' => 'license', - 'value' => $request->license, - ], - [ - 'name' => 'purchase_code', - 'value' => $request->purchase_code, - ], - [ - 'name' => 'app_title', - 'value' => $request->title, - ], - [ - 'name' => 'app_description', - 'value' => $request->description, - ], - [ - 'name' => 'app_logo', - 'value' => $request->hasFile('logo') ? $logo : null, - ], - [ - 'name' => 'app_logo_horizontal', - 'value' => $request->hasFile('logo_horizontal') ? $logo_horizontal : null, - ], - [ - 'name' => 'app_favicon', - 'value' => $request->hasFile('favicon') ? $favicon : null, - ], - [ - 'name' => 'google_analytics', - 'value' => $request->googleAnalytics, - ], - [ - 'name' => 'contact_email', - 'value' => $request->contactMail, - ], - [ - 'name' => 'registration', - 'value' => $request->userRegistration, - ], - [ - 'name' => 'storage_limitation', - 'value' => $request->storageLimitation, - ], - [ - 'name' => 'storage_default', - 'value' => $request->defaultStorage ? $request->defaultStorage : 5, - ], - [ - 'name' => 'latest_upgrade', - 'value' => '1.7', - ], - ]); - - // Store options - $settings->each(function ($col) { - Setting::updateOrCreate(['name' => $col['name']], $col); - }); - - return response('Done', 200); - } /** * Start maintenance mode @@ -150,8 +37,33 @@ class UpgradeAppController extends Controller /** * Upgrade database */ - public function upgrade_database() + public function upgrade() { + /* + * Upgrade user_settings & file_manager_folders table + * + * @since v1.8.1 + */ + if (! Schema::hasColumn('user_settings', 'timezone') && ! Schema::hasColumn('file_manager_folders', 'icon_color')) { + + $this->upgrade_database(); + + // Create legal pages and index content for regular license + if (get_setting('license') === 'Regular') { + + $pages = collect(config('content.pages')); + $content = collect(config('content.content_regular')); + + $content->each(function ($content) { + Setting::updateOrCreate($content); + }); + + $pages->each(function ($page) { + Page::updateOrCreate($page); + }); + } + } + /* * Upgrade expire_in in shares table * @@ -159,17 +71,16 @@ class UpgradeAppController extends Controller */ if (! Schema::hasTable('traffic') && ! Schema::hasTable('zips') && ! Schema::hasTable('jobs')) { - $command = Artisan::call('migrate', [ - '--force' => true - ]); + $this->upgrade_database(); + } + /* + * Upgrade expire_in in shares table + * + * @since v1.8 + */ + if (! Schema::hasTable('traffic') && ! Schema::hasTable('zips') && ! Schema::hasTable('jobs')) { - if ($command === 0) { - echo 'Operation was successful.'; - } - - if ($command === 1) { - echo 'Operation failed.'; - } + $this->upgrade_database(); } /* @@ -179,17 +90,7 @@ class UpgradeAppController extends Controller */ if (! Schema::hasColumn('shares', 'expire_in')) { - $command = Artisan::call('migrate', [ - '--force' => true - ]); - - if ($command === 0) { - echo 'Operation was successful.'; - } - - if ($command === 1) { - echo 'Operation failed.'; - } + $this->upgrade_database(); } /* @@ -199,17 +100,26 @@ class UpgradeAppController extends Controller */ if (! Schema::hasColumn('file_manager_files', 'metadata')) { - $command = Artisan::call('migrate', [ - '--force' => true - ]); - - if ($command === 0) { - echo 'Operation was successful.'; - } - - if ($command === 1) { - echo 'Operation failed.'; - } + $this->upgrade_database(); } } + + /** + * @return int|mixed + */ + private function upgrade_database() + { + $command = Artisan::call('migrate', [ + '--force' => true + ]); + + if ($command === 0) { + echo 'Operation was successful.'; + } + + if ($command === 1) { + echo 'Operation failed.'; + } + return $command; + } } diff --git a/app/Http/Tools/Editor.php b/app/Http/Tools/Editor.php index c37b1bfe..c4c81696 100644 --- a/app/Http/Tools/Editor.php +++ b/app/Http/Tools/Editor.php @@ -44,14 +44,14 @@ class Editor // If request have emoji set folder icon emoji if(isset($folder_icon['emoji'])) { - $folder->folder_icon_emoji = $folder_icon['emoji']; - $folder->folder_icon_color = null; + $folder->icon_emoji = $folder_icon['emoji']; + $folder->icon_color = null; } // If request have color set folder icon color if(isset($folder_icon['color'])) { - $folder->folder_icon_emoji = null; - $folder->folder_icon_color = $folder_icon['color']; + $folder->icon_emoji = null; + $folder->icon_color = $folder_icon['color']; } // Save changes diff --git a/config/content.php b/config/content.php index d0e27006..ae12f9ab 100644 --- a/config/content.php +++ b/config/content.php @@ -21,7 +21,73 @@ return [ 'content' => 'Metus penatibus ligula dolor natoque non habitasse laoreet facilisis, libero vivamus eget semper vulputate interdum integer, phasellus lorem enim blandit consectetur nullam sollicitudin. Hendrerit interdum luctus ut in molestie himenaeos eros cum laoreet parturient est, eu lectus hac et netus viverra dictumst congue elit sem senectus litora, fames scelerisque adipiscing inceptos fringilla montes sociosqu suscipit auctor potenti. Elementum lacus vulputate viverra ac morbi ligula ipsum facilisi, sit eu imperdiet lacinia congue dis vitae.', ], ], - 'content' => [ + 'content_regular' => [ + [ + 'name' => 'section_features', + 'value' => '1', + ], + [ + 'name' => 'section_feature_boxes', + 'value' => '1', + ], + [ + 'name' => 'section_get_started', + 'value' => '1', + ], + [ + 'name' => 'header_title', + 'value' => 'Simple & Powerful Personal Cloud Storage', + ], + [ + 'name' => 'header_description', + 'value' => 'Your private cloud storage software build on Laravel & Vue.js. No limits & no monthly fees. Truly freedom.', + ], + [ + 'name' => 'features_title', + 'value' => 'The Fastest Growing File Manager on the CodeCanyon Market', + ], + [ + 'name' => 'features_description', + 'value' => 'Your private cloud storage software build on Laravel & Vue.js. No limits & no monthly fees. Truly freedom.', + ], + [ + 'name' => 'feature_title_1', + 'value' => 'Truly Freedom', + ], + [ + 'name' => 'feature_description_1', + 'value' => 'You have full control over VueFileManager, no third authorities will control your service or usage, only you.', + ], + [ + 'name' => 'feature_title_2', + 'value' => 'The Sky is the Limit', + ], + [ + 'name' => 'feature_description_2', + 'value' => 'VueFileManager is cloud storage software. You have to install and running application on your own server hosting.', + ], + [ + 'name' => 'feature_title_3', + 'value' => 'No Monthly Fees', + ], + [ + 'name' => 'feature_description_3', + 'value' => 'When you running VueFileManager on your own server hosting, anybody can\'t control your content or resell your user data. Your data is safe.', + ], + [ + 'name' => 'get_started_title', + 'value' => 'Ready to Get Started
With Us?', + ], + [ + 'name' => 'get_started_description', + 'value' => 'Your private cloud storage software build on Laravel & Vue.js. No limits & no monthly fees. Truly freedom.', + ], + [ + 'name' => 'footer_content', + 'value' => '© 2021 Simple & Powerful Personal Cloud Storage. Developed by Hi5Ve.Digital', + ], + ], + 'content_extended' => [ [ 'name' => 'section_features', 'value' => '1', @@ -96,7 +162,7 @@ return [ ], [ 'name' => 'footer_content', - 'value' => '© 2020 Simple & Powerful Personal Cloud Storage. Developed by Hi5Ve.Digital', + 'value' => '© 2021 Simple & Powerful Personal Cloud Storage. Developed by Hi5Ve.Digital', ], ], ]; \ No newline at end of file diff --git a/database/migrations/2021_01_13_162117_add_folder_icon_options_to_file_manager_folders_table.php b/database/migrations/2021_01_13_162117_add_folder_icon_options_to_file_manager_folders_table.php index 20a93eb5..89bee859 100644 --- a/database/migrations/2021_01_13_162117_add_folder_icon_options_to_file_manager_folders_table.php +++ b/database/migrations/2021_01_13_162117_add_folder_icon_options_to_file_manager_folders_table.php @@ -14,8 +14,8 @@ class AddFolderIconOptionsToFileManagerFoldersTable extends Migration public function up() { Schema::table('file_manager_folders', function (Blueprint $table) { - $table->string('folder_icon_color')->after('user_scope')->nullable(); - $table->string('folder_icon_emoji')->after('folder_icon_color')->nullable(); + $table->string('icon_color')->after('user_scope')->nullable(); + $table->string('icon_emoji')->after('icon_color')->nullable(); }); } diff --git a/resources/js/components/FilesView/FileItemGrid.vue b/resources/js/components/FilesView/FileItemGrid.vue index 8a0f7c37..a746896b 100644 --- a/resources/js/components/FilesView/FileItemGrid.vue +++ b/resources/js/components/FilesView/FileItemGrid.vue @@ -89,16 +89,16 @@ export default { folderIconHandle(){ // If folder have set some color - if(this.data.folder_icon_color) { + if(this.data.icon_color) { this.$nextTick(() => { - this.$refs[`folder${this.data.unique_id}`].firstElementChild.style.fill = `${this.data.folder_icon_color}` + this.$refs[`folder${this.data.unique_id}`].firstElementChild.style.fill = `${this.data.icon_color}` }) return false } // If folder have set some emoji - if(this.data.folder_icon_emoji) - return JSON.parse(this.data.folder_icon_emoji).char + if(this.data.icon_emoji) + return JSON.parse(this.data.icon_emoji).char }, ...mapGetters({ allData: 'data' }), diff --git a/resources/js/components/FilesView/FileItemList.vue b/resources/js/components/FilesView/FileItemList.vue index 1d0ff01f..5cd7dd15 100644 --- a/resources/js/components/FilesView/FileItemList.vue +++ b/resources/js/components/FilesView/FileItemList.vue @@ -91,16 +91,16 @@ export default { folderIconHandle(){ // If folder have set some icon color - if(this.data.folder_icon_color) { + if(this.data.icon_color) { this.$nextTick(() => { - this.$refs[`folder${this.data.unique_id}`].firstElementChild.style.fill = `${this.data.folder_icon_color}` + this.$refs[`folder${this.data.unique_id}`].firstElementChild.style.fill = `${this.data.icon_color}` }) return false } // If folder have set some emoji - if(this.data.folder_icon_emoji) - return JSON.parse(this.data.folder_icon_emoji).char + if(this.data.icon_emoji) + return JSON.parse(this.data.icon_emoji).char }, isClicked() { diff --git a/resources/js/components/Index/IndexPageHeader.vue b/resources/js/components/Index/IndexPageHeader.vue index 5471a50c..92095cf0 100644 --- a/resources/js/components/Index/IndexPageHeader.vue +++ b/resources/js/components/Index/IndexPageHeader.vue @@ -5,11 +5,17 @@ :description="index.header_description" > - + + -
+ + + +
{{ $t('page_index.sign_feature_1') }} diff --git a/resources/js/components/Others/ThumbnailItem.vue b/resources/js/components/Others/ThumbnailItem.vue index cb523674..61cc8ebd 100644 --- a/resources/js/components/Others/ThumbnailItem.vue +++ b/resources/js/components/Others/ThumbnailItem.vue @@ -50,6 +50,7 @@ computed: { ...mapGetters(['currentFolder']), + // TODO: revision folderIconHandle(){ let icon = undefined @@ -67,14 +68,14 @@ } // If folder have already set some icon - if(!this.setFolderIcon && (this.item.folder_icon_emoji || this.item.folder_icon_color)){ + if(!this.setFolderIcon && (this.item.icon_emoji || this.item.icon_color)){ - if(this.item.folder_icon_emoji !== null) - icon = JSON.parse(this.item.folder_icon_emoji).char + if(this.item.icon_emoji !== null) + icon = JSON.parse(this.item.icon_emoji).char - if(this.item.folder_icon_color !== null){ + if(this.item.icon_color !== null){ this.$nextTick(() => { - this.$refs.folderIcon.firstElementChild.style.fill = `${this.item.folder_icon_color}` + this.$refs.folderIcon.firstElementChild.style.fill = `${this.item.icon_color}` }) icon = false } diff --git a/resources/js/i18n/lang/cn.json b/resources/js/i18n/lang/cn.json index fc56dba0..e9eaedad 100644 --- a/resources/js/i18n/lang/cn.json +++ b/resources/js/i18n/lang/cn.json @@ -26,7 +26,7 @@ "users": "Users" }, "admin_page_dashboard": { - "backer_button": "成为支持者", + "backer_button": "Help Us Improve", "license": "执照", "version": "版", "w_latest_users": { diff --git a/resources/js/i18n/lang/en.json b/resources/js/i18n/lang/en.json index b72db136..16974b8c 100644 --- a/resources/js/i18n/lang/en.json +++ b/resources/js/i18n/lang/en.json @@ -28,7 +28,7 @@ "users": "Users" }, "admin_page_dashboard": { - "backer_button": "Become a Backer", + "backer_button": "Help Us Improve", "license": "License", "version": "Version", "w_latest_users": { diff --git a/resources/js/i18n/lang/sk.json b/resources/js/i18n/lang/sk.json index 8175f8bf..c15d88f1 100644 --- a/resources/js/i18n/lang/sk.json +++ b/resources/js/i18n/lang/sk.json @@ -28,7 +28,7 @@ "users": "Uživatelia" }, "admin_page_dashboard": { - "backer_button": "Staňte sa podporovateľom", + "backer_button": "Pomôžte nám zlepšiť sa", "license": "Licencia", "version": "Verzia", "w_latest_users": { diff --git a/resources/js/store/modules/fileBrowser.js b/resources/js/store/modules/fileBrowser.js index df717b15..41bcd9c2 100644 --- a/resources/js/store/modules/fileBrowser.js +++ b/resources/js/store/modules/fileBrowser.js @@ -236,8 +236,8 @@ const mutations = { state.data.find(item => { if (item.unique_id == updatedFile.unique_id) { item.name = updatedFile.name - item.folder_icon_color = updatedFile.folder_icon_color ? updatedFile.folder_icon_color : null - item.folder_icon_emoji = updatedFile.folder_icon_emoji ? updatedFile.folder_icon_emoji : null + item.icon_color = updatedFile.icon_color ? updatedFile.icon_color : null + item.icon_emoji = updatedFile.icon_emoji ? updatedFile.icon_emoji : null } }) }, diff --git a/resources/js/views/Admin.vue b/resources/js/views/Admin.vue index 12ef9d51..9ad7d86c 100644 --- a/resources/js/views/Admin.vue +++ b/resources/js/views/Admin.vue @@ -30,6 +30,14 @@ {{ $t('admin_menu.settings') }}
+ +
+ +
+
+ {{ $t('admin_menu.pages') }} +
+
@@ -52,14 +60,6 @@ {{ $t('admin_menu.invoices') }}
- -
- -
-
- {{ $t('admin_menu.pages') }} -
-
diff --git a/resources/js/views/Admin/AppSettings/AppSettings.vue b/resources/js/views/Admin/AppSettings/AppSettings.vue index 9e7f3855..80f22a26 100644 --- a/resources/js/views/Admin/AppSettings/AppSettings.vue +++ b/resources/js/views/Admin/AppSettings/AppSettings.vue @@ -48,7 +48,7 @@ - +
diff --git a/resources/js/views/Admin/AppSettings/AppSettingsTabs/Index.vue b/resources/js/views/Admin/AppSettings/AppSettingsTabs/Index.vue index d38206da..1597017f 100644 --- a/resources/js/views/Admin/AppSettings/AppSettingsTabs/Index.vue +++ b/resources/js/views/Admin/AppSettings/AppSettingsTabs/Index.vue @@ -162,7 +162,7 @@ -
+
Pricing Content
@@ -183,7 +183,6 @@
-
Main Features @@ -290,6 +289,7 @@ import InfoBox from '@/components/Others/Forms/InfoBox' import {required} from 'vee-validate/dist/rules' import axios from 'axios' + import { mapGetters } from 'vuex' export default { name: 'AppIndex', @@ -308,6 +308,9 @@ PageTab, InfoBox, }, + computed: { + ...mapGetters(['config']), + }, data() { return { isLoading: true, diff --git a/resources/js/views/Admin/Dashboard.vue b/resources/js/views/Admin/Dashboard.vue index f3872f40..d22472b5 100644 --- a/resources/js/views/Admin/Dashboard.vue +++ b/resources/js/views/Admin/Dashboard.vue @@ -22,7 +22,7 @@ {{ data.license }} - +
@@ -177,7 +177,7 @@ } .became-backer { - background: rgba($yellow, 0.1); + background: rgba($theme, 0.1); display: inline-block; padding: 5px 10px; border-radius: 6px; @@ -194,12 +194,12 @@ line-height: 0; rect, line { - stroke: $yellow; + stroke: $theme; } } .content { - color: $yellow; + color: $theme; font-weight: 700; @include font-size(14); } diff --git a/resources/js/views/Auth/SignUp.vue b/resources/js/views/Auth/SignUp.vue index d5415437..3869c7d1 100644 --- a/resources/js/views/Auth/SignUp.vue +++ b/resources/js/views/Auth/SignUp.vue @@ -53,7 +53,7 @@
- + {{ termsOfService.title }} {{ privacyPolicy.title }} diff --git a/resources/js/views/Index/SaaSLandingPage.vue b/resources/js/views/Index/SaaSLandingPage.vue index 0a21ccf7..7983b028 100644 --- a/resources/js/views/Index/SaaSLandingPage.vue +++ b/resources/js/views/Index/SaaSLandingPage.vue @@ -14,7 +14,7 @@ - + @@ -60,13 +60,7 @@ isLoading: true, } }, - beforeMount() { - if (! this.config.isSaaS) { - this.$router.push({name: 'SignIn'}) - } - }, mounted() { - if (! this.config.isSaaS) return // Get page content axios.get('/api/content', { diff --git a/routes/web.php b/routes/web.php index 2f68261c..e5b59621 100644 --- a/routes/web.php +++ b/routes/web.php @@ -40,7 +40,7 @@ Route::group(['middleware' => ['auth:api', 'auth.master', 'scope:master']], func // Admin system tools Route::group(['middleware' => ['auth:api', 'auth.master', 'auth.admin', 'scope:master'], 'prefix' => 'service'], function () { - Route::get('/upgrade-database', 'General\UpgradeAppController@upgrade_database'); + Route::get('/upgrade', 'General\UpgradeAppController@upgrade'); Route::get('/down', 'General\UpgradeAppController@down'); Route::get('/up', 'General\UpgradeAppController@up'); });