Merge remote-tracking branch 'origin/v2' into oasis

# Conflicts:
#	app/Http/Controllers/User/AccountController.php
#	app/Http/helpers.php
#	public/mix-manifest.json
#	resources/js/components/FilesView/Icons/AlphabetIcon.vue
#	resources/js/components/FilesView/MobileActionButton.vue
#	resources/js/views/Admin/AppSettings/AppSettingsTabs/Appearance.vue
#	resources/js/views/Admin/Users/UserTabs/UserDetail.vue
#	resources/js/views/Upgrade/UpgradeBilling.vue
#	resources/views/index.blade.php
#	resources/views/vuefilemanager/invoice.blade.php
#	resources/views/vuefilemanager/others/color-template.blade.php
This commit is contained in:
Peter Papp
2021-04-01 10:45:10 +02:00
124 changed files with 3745 additions and 3576 deletions

View File

@@ -4,15 +4,12 @@ namespace App\Console\Commands;
use App\Models\File;
use App\Models\Folder;
use App\Models\Page;
use App\Models\Share;
use App\Services\HelperService;
use App\Services\SetupService;
use App\Models\Setting;
use App\Models\User;
use Carbon\Carbon;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Hash;
use Faker;
use Illuminate\Support\Str;
@@ -24,6 +21,7 @@ class SetupDevEnvironment extends Command
* @var string
*/
protected $signature = 'setup:dev';
protected $license = 'Extended';
/**
* The console command description.
@@ -66,7 +64,8 @@ class SetupDevEnvironment extends Command
$this->info('Storing default settings and content...');
$this->store_default_settings();
$this->setup->seed_default_pages();
$this->setup->seed_default_settings('Extended');
$this->setup->seed_default_settings($this->license);
$this->setup->seed_default_language();
$this->info('Creating default admin...');
$this->create_admin();
@@ -97,7 +96,7 @@ class SetupDevEnvironment extends Command
$user = User::forceCreate([
'role' => 'admin',
'email' => 'howdy@hi5ve.digital',
'password' => Hash::make('vuefilemanager'),
'password' => bcrypt('vuefilemanager'),
]);
$user
@@ -138,7 +137,7 @@ class SetupDevEnvironment extends Command
$newbie = User::forceCreate([
'role' => 'user',
'email' => $this->faker->email,
'password' => Hash::make('vuefilemanager'),
'password' => bcrypt('vuefilemanager'),
]);
$newbie
@@ -184,7 +183,7 @@ class SetupDevEnvironment extends Command
"group" => "Travel & Places",
"subgroup" => "transport-air"
],
'created_at' => Carbon::now(),
'created_at' => now(),
]);
Share::factory(Share::class)
@@ -220,7 +219,7 @@ class SetupDevEnvironment extends Command
'group' => 'Objects',
'subgroup' => 'light & video',
],
'created_at' => Carbon::now()->subMinutes(1),
'created_at' => now()->subMinutes(1),
]);
$nature = Folder::factory(Folder::class)
@@ -261,7 +260,7 @@ class SetupDevEnvironment extends Command
'user_id' => $user->id,
'author' => 'user',
'name' => 'Playable Media',
'created_at' => Carbon::now()->subMinutes(2),
'created_at' => now()->subMinutes(2),
]);
$video = Folder::factory(Folder::class)
@@ -286,7 +285,7 @@ class SetupDevEnvironment extends Command
'user_id' => $user->id,
'author' => 'user',
'name' => 'Multi Level Folder',
'created_at' => Carbon::now()->subMinutes(3),
'created_at' => now()->subMinutes(3),
]);
$first_level = Folder::factory(Folder::class)
@@ -319,7 +318,7 @@ class SetupDevEnvironment extends Command
'user_id' => $user->id,
'author' => 'user',
'name' => 'Documents',
'created_at' => Carbon::now()->subMinutes(4),
'created_at' => now()->subMinutes(4),
]);
Share::factory(Share::class)
@@ -339,7 +338,7 @@ class SetupDevEnvironment extends Command
'user_id' => $user->id,
'author' => 'user',
'name' => 'Videohive by MakingCG',
'created_at' => Carbon::now()->subMinutes(5),
'created_at' => now()->subMinutes(5),
]);
$user
@@ -391,7 +390,7 @@ class SetupDevEnvironment extends Command
'author' => 'user',
'mimetype' => $file['mimetype'],
'filesize' => rand(1000000, 4000000),
'created_at' => Carbon::now()->subMinutes(rand(1, 5)),
'created_at' => now()->subMinutes(rand(1, 5)),
]);
});
@@ -435,7 +434,7 @@ class SetupDevEnvironment extends Command
'author' => 'user',
'mimetype' => $file['mimetype'],
'filesize' => rand(1000000, 4000000),
'created_at' => Carbon::now()->subMinutes(rand(1, 5)),
'created_at' => now()->subMinutes(rand(1, 5)),
]);
});
@@ -469,7 +468,7 @@ class SetupDevEnvironment extends Command
'author' => 'user',
'mimetype' => $file['mimetype'],
'filesize' => rand(1000000, 4000000),
'created_at' => Carbon::now()->subMinutes(rand(1, 5)),
'created_at' => now()->subMinutes(rand(1, 5)),
]);
});
@@ -528,7 +527,7 @@ class SetupDevEnvironment extends Command
'author' => 'visitor',
'mimetype' => $file['mimetype'],
'filesize' => rand(1000000, 4000000),
'created_at' => Carbon::now()->subMinutes(rand(1, 5)),
'created_at' => now()->subMinutes(rand(1, 5)),
]);
});
@@ -556,7 +555,7 @@ class SetupDevEnvironment extends Command
'author' => 'user',
'mimetype' => 'mp4',
'filesize' => rand(1000000, 4000000),
'created_at' => Carbon::now()->subMinutes(rand(1, 5)),
'created_at' => now()->subMinutes(rand(1, 5)),
]);
});
@@ -581,7 +580,7 @@ class SetupDevEnvironment extends Command
'author' => 'user',
'mimetype' => 'mp4',
'filesize' => rand(1000000, 4000000),
'created_at' => Carbon::now()->subMinutes(rand(1, 5)),
'created_at' => now()->subMinutes(rand(1, 5)),
]);
});
@@ -606,7 +605,7 @@ class SetupDevEnvironment extends Command
'author' => 'user',
'mimetype' => 'mp3',
'filesize' => rand(1000000, 4000000),
'created_at' => Carbon::now()->subMinutes(rand(1, 5)),
'created_at' => now()->subMinutes(rand(1, 5)),
]);
});
@@ -645,7 +644,7 @@ class SetupDevEnvironment extends Command
'mimetype' => 'jpg',
'filesize' => rand(1000000, 4000000),
'thumbnail' => $this->helper->create_image_thumbnail("files/$user->id/$basename", $file, $user->id),
'created_at' => Carbon::now()->subMinutes(rand(1, 5)),
'created_at' => now()->subMinutes(rand(1, 5)),
]);
});
@@ -679,7 +678,7 @@ class SetupDevEnvironment extends Command
'mimetype' => 'jpg',
'filesize' => rand(1000000, 4000000),
'thumbnail' => $this->helper->create_image_thumbnail("files/$user->id/$basename", $file, $user->id),
'created_at' => Carbon::now()->subMinutes(rand(1, 5)),
'created_at' => now()->subMinutes(rand(1, 5)),
]);
});
@@ -717,7 +716,7 @@ class SetupDevEnvironment extends Command
'mimetype' => 'jpg',
'filesize' => rand(1000000, 4000000),
'thumbnail' => $this->helper->create_image_thumbnail("files/$user->id/$basename", $file, $user->id),
'created_at' => Carbon::now()->subMinutes(rand(1, 5)),
'created_at' => now()->subMinutes(rand(1, 5)),
]);
});
}
@@ -793,6 +792,14 @@ class SetupDevEnvironment extends Command
'name' => 'app_favicon',
'value' => 'system/favicon.png',
],
[
'name' => 'app_og_image',
'value' => 'system/og-image.jpg',
],
[
'name' => 'app_touch_icon',
'value' => 'system/touch-icon.png',
],
[
'name' => 'google_analytics',
'value' => '',
@@ -823,7 +830,7 @@ class SetupDevEnvironment extends Command
],
[
'name' => 'license',
'value' => 'Extended',
'value' => $this->license,
],
[
'name' => 'purchase_code',
@@ -869,7 +876,7 @@ class SetupDevEnvironment extends Command
});
// Get system images
collect(['logo.svg', 'logo-horizontal.svg', 'favicon.png'])
collect(['logo.svg', 'logo-horizontal.svg', 'favicon.png', 'og-image.jpg', 'touch-icon.png'])
->each(function ($file) {
\File::copy(storage_path("demo/app/$file"), storage_path("app/system/$file"));
});