alpha v1.7 alpha.1
@@ -44,7 +44,7 @@ class DashboardController extends Controller
|
||||
$license = Setting::where('name', 'license')->first();
|
||||
|
||||
return [
|
||||
'license' => $license->value,
|
||||
'license' => $license ? $license->value : null,
|
||||
'app_version' => config('vuefilemanager.version'),
|
||||
'total_users' => $total_users,
|
||||
'total_used_space' => Metric::bytes($total_used_space)->format(),
|
||||
|
||||
@@ -192,7 +192,7 @@ class UserController extends Controller
|
||||
]);
|
||||
|
||||
// Create settings
|
||||
$settings = UserSettings::forceCreate([
|
||||
UserSettings::forceCreate([
|
||||
'user_id' => $user->id,
|
||||
'storage_capacity' => $request->storage_capacity,
|
||||
]);
|
||||
|
||||
@@ -8,13 +8,11 @@ use App\Http\Resources\PageResource;
|
||||
use App\Mail\SendSupportForm;
|
||||
use App\Page;
|
||||
use App\Setting;
|
||||
use Artisan;
|
||||
use Doctrine\DBAL\Driver\PDOException;
|
||||
use Illuminate\Support\Facades\File;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Response;
|
||||
use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||
use Schema;
|
||||
|
||||
class AppFunctionsController extends Controller
|
||||
{
|
||||
@@ -56,9 +54,30 @@ class AppFunctionsController extends Controller
|
||||
// Try to connect to database
|
||||
\DB::getPdo();
|
||||
|
||||
$connection = $this->get_setup_status();
|
||||
$settings = json_decode(Setting::all()->pluck('value', 'name')->toJson());
|
||||
$legal = Page::whereIn('slug', ['terms-of-service', 'privacy-policy', 'cookie-policy'])->get(['visibility', 'title', 'slug']);
|
||||
// Check settings table
|
||||
$settings_table = Schema::hasTable('settings');
|
||||
|
||||
// If settings table don't exist, then run migrations
|
||||
if (! $settings_table) {
|
||||
Artisan::call('migrate');
|
||||
}
|
||||
|
||||
// Get settings
|
||||
$setup_wizard_success = Setting::where('name', 'setup_wizard_success')->first();
|
||||
|
||||
// Get connection string
|
||||
if (! $setup_wizard_success) {
|
||||
$connection = 'quiet-update';
|
||||
} else {
|
||||
$connection = $this->get_setup_status();
|
||||
}
|
||||
|
||||
// Get all settings
|
||||
$settings = Setting::all();
|
||||
|
||||
// Get legal pages
|
||||
$legal = Page::whereIn('slug', ['terms-of-service', 'privacy-policy', 'cookie-policy'])
|
||||
->get(['visibility', 'title', 'slug']);
|
||||
|
||||
} catch (PDOException $e) {
|
||||
$connection = 'setup-database';
|
||||
@@ -66,11 +85,25 @@ class AppFunctionsController extends Controller
|
||||
}
|
||||
|
||||
return view("index")
|
||||
->with('settings', $settings)
|
||||
->with('settings', $settings ? json_decode($settings->pluck('value', 'name')->toJson()) : null)
|
||||
->with('legal', isset($legal) ? $legal : null)
|
||||
->with('installation', $connection);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if setup wizard was passed
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function get_setup_status(): string
|
||||
{
|
||||
$setup_success = get_setting('setup_wizard_success');
|
||||
|
||||
$connection = boolval($setup_success) ? 'setup-done' : 'setup-disclaimer';
|
||||
|
||||
return $connection;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send contact message from pages
|
||||
*
|
||||
@@ -116,28 +149,14 @@ class AppFunctionsController extends Controller
|
||||
$columns = collect(explode('|', $column));
|
||||
|
||||
$columns->each(function ($column) {
|
||||
if (! in_array($column, $this->whitelist)) abort(401);
|
||||
if (!in_array($column, $this->whitelist)) abort(401);
|
||||
});
|
||||
|
||||
return Setting::whereIn('name', $columns)->pluck('value', 'name');
|
||||
}
|
||||
|
||||
if (! in_array($column, $this->whitelist)) abort(401);
|
||||
if (!in_array($column, $this->whitelist)) abort(401);
|
||||
|
||||
return Setting::where('name', $column)->pluck('value', 'name');
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if setup wizard was passed
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function get_setup_status(): string
|
||||
{
|
||||
$setup_success = Setting::where('name', 'setup_wizard_success')->first();
|
||||
|
||||
$connection = $setup_success ? 'setup-done' : 'setup-disclaimer';
|
||||
|
||||
return $connection;
|
||||
}
|
||||
}
|
||||
|
||||
116
app/Http/Controllers/General/UpgradeAppController.php
Normal file
@@ -0,0 +1,116 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\General;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Setting;
|
||||
use Artisan;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
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') {
|
||||
Artisan::call('db:seed --class=PageSeeder');
|
||||
Artisan::call('db:seed --class=ContentSeeder');
|
||||
}
|
||||
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
@@ -11,9 +11,17 @@ use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Support\Str;
|
||||
use Intervention\Image\ImageManagerStatic as Image;
|
||||
|
||||
/**
|
||||
* Get single value from settings table
|
||||
*
|
||||
* @param $setting
|
||||
* @return |null
|
||||
*/
|
||||
function get_setting($setting)
|
||||
{
|
||||
return Setting::where('name', $setting)->first()->value;
|
||||
$row = Setting::where('name', $setting)->first();
|
||||
|
||||
return $row ? $row->value : null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -123,9 +123,11 @@ class User extends Authenticatable
|
||||
{
|
||||
// Get storage limitation setup
|
||||
$storage_limitation = get_setting('storage_limitation');
|
||||
$is_storage_limit = $storage_limitation ? $storage_limitation : 1;
|
||||
|
||||
// Get user storage usage
|
||||
if (!$storage_limitation) {
|
||||
if (! $is_storage_limit) {
|
||||
|
||||
return [
|
||||
'used' => $this->used_capacity,
|
||||
'used_formatted' => Metric::bytes($this->used_capacity)->format(),
|
||||
|
||||
|
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 119 KiB |
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 108 KiB |
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 84 KiB |
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 3.8 KiB |
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="182px" height="162px" viewBox="0 0 182 162" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 55.2 (78181) - https://sketchapp.com -->
|
||||
<title>hero</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<g id="hero" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="folder-solid" transform="translate(18.000000, 22.000000)" fill-rule="nonzero">
|
||||
<path d="M116,16 L68,16 L52,0 L12,0 C5.3725,0 0,5.3725 0,12 L0,84 C0,90.6275 5.3725,96 12,96 L116,96 C122.6275,96 128,90.6275 128,84 L128,28 C128,21.3725 122.6275,16 116,16 Z" id="Path-Copy" fill="#35495D"></path>
|
||||
<path d="M135,39 L87,39 L71,23 L31,23 C24.3725,23 19,28.3725 19,35 L19,107 C19,113.6275 24.3725,119 31,119 L135,119 C141.6275,119 147,113.6275 147,107 L147,51 C147,44.3725 141.6275,39 135,39 Z" id="Path" fill="#41B883"></path>
|
||||
</g>
|
||||
<g id="file-solid" transform="translate(52.000000, 109.000000)" fill="#35495D" fill-rule="nonzero">
|
||||
<path d="M1.984,16.096 C1.64266496,16.096 1.36000112,15.9813345 1.136,15.752 C0.91199888,15.5226655 0.8,15.237335 0.8,14.896 C0.8,14.554665 0.91199888,14.2693345 1.136,14.04 C1.36000112,13.8106655 1.64266496,13.696 1.984,13.696 C2.32533504,13.696 2.60799888,13.8106655 2.832,14.04 C3.05600112,14.2693345 3.168,14.554665 3.168,14.896 C3.168,15.237335 3.05600112,15.5226655 2.832,15.752 C2.60799888,15.9813345 2.32533504,16.096 1.984,16.096 Z M12.624,5.168 C12.7946675,4.80533152 13.0773314,4.624 13.472,4.624 C13.738668,4.624 13.9786656,4.70933248 14.192,4.88 C14.4053344,5.05066752 14.512,5.26399872 14.512,5.52 C14.512,5.63733392 14.4800003,5.77066592 14.416,5.92 L9.984,15.456 C9.88799952,15.6586677 9.74133432,15.8159994 9.544,15.928 C9.34666568,16.0400006 9.13600112,16.096 8.912,16.096 C8.68799888,16.096 8.47733432,16.0400006 8.28,15.928 C8.08266568,15.8159994 7.93600048,15.6586677 7.84,15.456 L3.424,5.92 C3.35999968,5.77066592 3.328,5.6426672 3.328,5.536 C3.328,5.269332 3.43733224,5.05066752 3.656,4.88 C3.87466776,4.70933248 4.12266528,4.624 4.4,4.624 C4.58133424,4.624 4.74933256,4.66933288 4.904,4.76 C5.05866744,4.85066712 5.17866624,4.98666576 5.264,5.168 L8.944,13.344 L12.624,5.168 Z M21.04,8.016 C21.3493349,8.016 21.5946658,8.10133248 21.776,8.272 C21.9573342,8.44266752 22.048,8.67199856 22.048,8.96 L22.048,15.168 C22.048,15.4453347 21.9546676,15.6693325 21.768,15.84 C21.5813324,16.0106675 21.3386682,16.096 21.04,16.096 C20.7519986,16.096 20.5226675,16.016 20.352,15.856 C20.1813325,15.6959992 20.096,15.4773347 20.096,15.2 L20.096,14.8 C19.8506654,15.2266688 19.5200021,15.5546655 19.104,15.784 C18.6879979,16.0133345 18.2186693,16.128 17.696,16.128 C15.7759904,16.128 14.816,15.0506774 14.816,12.896 L14.816,8.96 C14.816,8.67199856 14.9066658,8.44266752 15.088,8.272 C15.2693342,8.10133248 15.5093318,8.016 15.808,8.016 C16.1173349,8.016 16.3626658,8.10133248 16.544,8.272 C16.7253342,8.44266752 16.816,8.67199856 16.816,8.96 L16.816,12.912 C16.816,13.4666694 16.9279989,13.877332 17.152,14.144 C17.3760011,14.410668 17.7279976,14.544 18.208,14.544 C18.7626694,14.544 19.2079983,14.3600018 19.544,13.992 C19.8800017,13.6239982 20.048,13.136003 20.048,12.528 L20.048,8.96 C20.048,8.67199856 20.1386658,8.44266752 20.32,8.272 C20.5013342,8.10133248 20.7413318,8.016 21.04,8.016 Z M30.32,13.856 C30.5013342,13.856 30.6479994,13.9253326 30.76,14.064 C30.8720006,14.2026674 30.928,14.3893322 30.928,14.624 C30.928,14.9546683 30.7306686,15.2319989 30.336,15.456 C29.9733315,15.6586677 29.562669,15.8213327 29.104,15.944 C28.645331,16.0666673 28.2080021,16.128 27.792,16.128 C26.533327,16.128 25.5360037,15.765337 24.8,15.04 C24.0639963,14.314663 23.696,13.322673 23.696,12.064 C23.696,11.263996 23.8559984,10.5546698 24.176,9.936 C24.4960016,9.31733024 24.9466638,8.83733504 25.528,8.496 C26.1093362,8.15466496 26.7679963,7.984 27.504,7.984 C28.2080035,7.984 28.8213307,8.13866512 29.344,8.448 C29.8666693,8.75733488 30.2719986,9.19466384 30.56,9.76 C30.8480014,10.3253362 30.992,10.9919962 30.992,11.76 C30.992,12.218669 30.7893354,12.448 30.384,12.448 L25.664,12.448 C25.7280003,13.1840037 25.9359982,13.7253316 26.288,14.072 C26.6400018,14.4186684 27.1519966,14.592 27.824,14.592 C28.165335,14.592 28.4666654,14.5493338 28.728,14.464 C28.9893346,14.3786662 29.2853317,14.2613341 29.616,14.112 C29.9360016,13.9413325 30.1706659,13.856 30.32,13.856 Z M27.552,9.392 C27.0079973,9.392 26.573335,9.56266496 26.248,9.904 C25.922665,10.245335 25.7280003,10.7359968 25.664,11.376 L29.28,11.376 C29.2586666,10.7253301 29.0986682,10.2320017 28.8,9.896 C28.5013318,9.55999832 28.085336,9.392 27.552,9.392 Z" id=".Vue"></path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 3.8 KiB |
@@ -89,5 +89,49 @@
|
||||
"/js/main.1cd1f59cdfc9a4c6ce3a.hot-update.js": "/js/main.1cd1f59cdfc9a4c6ce3a.hot-update.js",
|
||||
"/js/main.c33403bc3d43c471d34e.hot-update.js": "/js/main.c33403bc3d43c471d34e.hot-update.js",
|
||||
"/js/main.3f8cb66167146d51f4b8.hot-update.js": "/js/main.3f8cb66167146d51f4b8.hot-update.js",
|
||||
"/js/main.f109c44c2c8c6bd471f5.hot-update.js": "/js/main.f109c44c2c8c6bd471f5.hot-update.js"
|
||||
"/js/main.f109c44c2c8c6bd471f5.hot-update.js": "/js/main.f109c44c2c8c6bd471f5.hot-update.js",
|
||||
"/js/main.92a5decc545c062cf774.hot-update.js": "/js/main.92a5decc545c062cf774.hot-update.js",
|
||||
"/js/main.05a1a5f1fc7928b1fb2a.hot-update.js": "/js/main.05a1a5f1fc7928b1fb2a.hot-update.js",
|
||||
"/js/main.d5418e99db52725b4969.hot-update.js": "/js/main.d5418e99db52725b4969.hot-update.js",
|
||||
"/js/main.45ae3591ed555dad1f59.hot-update.js": "/js/main.45ae3591ed555dad1f59.hot-update.js",
|
||||
"/js/main.7abf5359f5f1466169a5.hot-update.js": "/js/main.7abf5359f5f1466169a5.hot-update.js",
|
||||
"/js/main.18b4e240bd534b894af1.hot-update.js": "/js/main.18b4e240bd534b894af1.hot-update.js",
|
||||
"/js/main.b40bf910604854eaf974.hot-update.js": "/js/main.b40bf910604854eaf974.hot-update.js",
|
||||
"/js/main.cc817df3bcd9a5bec6fc.hot-update.js": "/js/main.cc817df3bcd9a5bec6fc.hot-update.js",
|
||||
"/js/main.60768bf13aaea8e24e4a.hot-update.js": "/js/main.60768bf13aaea8e24e4a.hot-update.js",
|
||||
"/js/main.31caa8a3b1fc6160bbef.hot-update.js": "/js/main.31caa8a3b1fc6160bbef.hot-update.js",
|
||||
"/js/main.a7bb0a90ee0b32ab8678.hot-update.js": "/js/main.a7bb0a90ee0b32ab8678.hot-update.js",
|
||||
"/js/main.8864ba28636fad8ad3c2.hot-update.js": "/js/main.8864ba28636fad8ad3c2.hot-update.js",
|
||||
"/js/main.d5a2f19292f8a7653e9c.hot-update.js": "/js/main.d5a2f19292f8a7653e9c.hot-update.js",
|
||||
"/js/main.e94cd9f1704a83978a61.hot-update.js": "/js/main.e94cd9f1704a83978a61.hot-update.js",
|
||||
"/js/main.2bdd929701ae467b34b6.hot-update.js": "/js/main.2bdd929701ae467b34b6.hot-update.js",
|
||||
"/js/main.2d7ad56264ae12975872.hot-update.js": "/js/main.2d7ad56264ae12975872.hot-update.js",
|
||||
"/js/main.4bcca4dbd70c591912a9.hot-update.js": "/js/main.4bcca4dbd70c591912a9.hot-update.js",
|
||||
"/js/main.b087bf759f3c09cf4392.hot-update.js": "/js/main.b087bf759f3c09cf4392.hot-update.js",
|
||||
"/js/main.7bea8f513b32fb7a2dc6.hot-update.js": "/js/main.7bea8f513b32fb7a2dc6.hot-update.js",
|
||||
"/js/main.2bc7cdc1bc24445028a6.hot-update.js": "/js/main.2bc7cdc1bc24445028a6.hot-update.js",
|
||||
"/js/main.4ab6d1b782215cf562b3.hot-update.js": "/js/main.4ab6d1b782215cf562b3.hot-update.js",
|
||||
"/js/main.45762826ce2fe9aaf076.hot-update.js": "/js/main.45762826ce2fe9aaf076.hot-update.js",
|
||||
"/js/main.9dcbab3122976177de71.hot-update.js": "/js/main.9dcbab3122976177de71.hot-update.js",
|
||||
"/js/main.73e8e53b59255aba4dfc.hot-update.js": "/js/main.73e8e53b59255aba4dfc.hot-update.js",
|
||||
"/js/main.8bff89cb9772a5d7c5f8.hot-update.js": "/js/main.8bff89cb9772a5d7c5f8.hot-update.js",
|
||||
"/js/main.50c5535cecbf185d4dd3.hot-update.js": "/js/main.50c5535cecbf185d4dd3.hot-update.js",
|
||||
"/js/main.c7e77750811ee3feac67.hot-update.js": "/js/main.c7e77750811ee3feac67.hot-update.js",
|
||||
"/js/main.e6c1120993b2730c25ec.hot-update.js": "/js/main.e6c1120993b2730c25ec.hot-update.js",
|
||||
"/js/main.c28450331fc421825102.hot-update.js": "/js/main.c28450331fc421825102.hot-update.js",
|
||||
"/js/main.f5a0965210aee82a9d9c.hot-update.js": "/js/main.f5a0965210aee82a9d9c.hot-update.js",
|
||||
"/js/main.14a083bee734139e8393.hot-update.js": "/js/main.14a083bee734139e8393.hot-update.js",
|
||||
"/js/main.a0973368409b709e0bd5.hot-update.js": "/js/main.a0973368409b709e0bd5.hot-update.js",
|
||||
"/js/main.7b3b818f0d213721751a.hot-update.js": "/js/main.7b3b818f0d213721751a.hot-update.js",
|
||||
"/js/main.d3779cfa64c08375e5da.hot-update.js": "/js/main.d3779cfa64c08375e5da.hot-update.js",
|
||||
"/js/main.2fc180b7578b09dc1ec3.hot-update.js": "/js/main.2fc180b7578b09dc1ec3.hot-update.js",
|
||||
"/js/main.dc2ba8e4942be4ea0baf.hot-update.js": "/js/main.dc2ba8e4942be4ea0baf.hot-update.js",
|
||||
"/js/main.a7b43362a9262f0462cb.hot-update.js": "/js/main.a7b43362a9262f0462cb.hot-update.js",
|
||||
"/js/main.aee3225805c2c2372fbe.hot-update.js": "/js/main.aee3225805c2c2372fbe.hot-update.js",
|
||||
"/js/main.ce87be7dd40cdfc40d99.hot-update.js": "/js/main.ce87be7dd40cdfc40d99.hot-update.js",
|
||||
"/js/main.7f4679047e954572f307.hot-update.js": "/js/main.7f4679047e954572f307.hot-update.js",
|
||||
"/js/main.b0f60374e12655123fa3.hot-update.js": "/js/main.b0f60374e12655123fa3.hot-update.js",
|
||||
"/js/main.3bace6a430879b52f95a.hot-update.js": "/js/main.3bace6a430879b52f95a.hot-update.js",
|
||||
"/js/main.f3a7a774479629f1cfd4.hot-update.js": "/js/main.f3a7a774479629f1cfd4.hot-update.js",
|
||||
"/js/main.66e645a33bbdcbf71b3d.hot-update.js": "/js/main.66e645a33bbdcbf71b3d.hot-update.js"
|
||||
}
|
||||
|
||||
@@ -173,6 +173,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>description</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
<description></description>
|
||||
<comment></comment>
|
||||
<default_text></default_text>
|
||||
<translations>
|
||||
<translation>
|
||||
<language>en-US</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>sk-SK</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>zh-CHS</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>title</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
|
||||
@@ -93,6 +93,7 @@
|
||||
'ContactUs',
|
||||
'AppSetup',
|
||||
'Database',
|
||||
'Upgrade',
|
||||
'SignIn',
|
||||
'SignUp',
|
||||
], this.$route.name)
|
||||
@@ -127,9 +128,10 @@
|
||||
// Redirect to database verify code
|
||||
if ( installation === 'setup-database') {
|
||||
this.$router.push({name: 'PurchaseCode'})
|
||||
}
|
||||
|
||||
// Redirect to starting installation process
|
||||
} else if ( installation === 'setup-disclaimer' ) {
|
||||
if ( installation === 'setup-disclaimer' ) {
|
||||
this.$router.push({name: 'InstallationDisclaimer'})
|
||||
}
|
||||
},
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
},
|
||||
{
|
||||
label: this.$t('admin_page_user.table.storage_used'),
|
||||
field: 'data.attributes.storage.used',
|
||||
field: 'relationships.storage.data.attributes.used',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
</router-link>
|
||||
<div class="navigation">
|
||||
<ul class="navigation-links">
|
||||
<li>
|
||||
<!--<li v-if="config.stripe_public_key">
|
||||
<a href="/#pricing">
|
||||
{{ $t('page_index.menu.pricing') }}
|
||||
</a>
|
||||
</li>
|
||||
</li>-->
|
||||
<li>
|
||||
<router-link :to="{name: 'ContactUs'}">
|
||||
{{ $t('page_index.menu.contact_us') }}
|
||||
@@ -42,7 +42,7 @@
|
||||
export default {
|
||||
name: 'IndexNavigation',
|
||||
computed: {
|
||||
...mapGetters(['config']),
|
||||
...mapGetters(['config', 'index']),
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
"activation": {
|
||||
"stripe": {
|
||||
"button": "设置您的Stripe帐户",
|
||||
"description": "To charge your users, please set up your Stripe account credentials.",
|
||||
"title": "您的Stripe帐户尚未设置"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
"activation": {
|
||||
"stripe": {
|
||||
"button": "Set up your Stripe account",
|
||||
"description": "To charge your users, please set up your Stripe account credentials.",
|
||||
"title": "Your Stripe account is not set"
|
||||
}
|
||||
},
|
||||
@@ -242,7 +243,7 @@
|
||||
"appearance": "Appearance",
|
||||
"billings": "Billings",
|
||||
"email": "Email",
|
||||
"others": "Others",
|
||||
"others": "Application",
|
||||
"payments": "Payments"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
"activation": {
|
||||
"stripe": {
|
||||
"button": "Nastaviť účet Stripe",
|
||||
"description": "Pre spoplatňovanie Vaších uživateľov, prosím nastavte poverenia služby Stripe",
|
||||
"title": "Váš účet Stripe nie je nastavený"
|
||||
}
|
||||
},
|
||||
@@ -242,7 +243,7 @@
|
||||
"appearance": "Vzhľad",
|
||||
"billings": "Fakturácia",
|
||||
"email": "E-mail",
|
||||
"others": "Ostatné",
|
||||
"others": "Aplikácia",
|
||||
"payments": "Platby"
|
||||
}
|
||||
},
|
||||
|
||||
11
resources/js/router.js
vendored
@@ -63,6 +63,9 @@ import UserPassword from './views/Admin/Users/UserTabs/UserPassword'
|
||||
import UserInvoices from './views/Admin/Users/UserTabs/UserInvoices'
|
||||
import UserSubscription from './views/Admin/Users/UserTabs/UserSubscription'
|
||||
|
||||
// Upgrade
|
||||
import Upgrade from './views/Upgrade'
|
||||
|
||||
// Setup Wizard
|
||||
import SetupWizard from './views/SetupWizard'
|
||||
import Database from './views/SetupWizard/Database'
|
||||
@@ -515,6 +518,14 @@ const routesUser = [
|
||||
},
|
||||
]
|
||||
const routesMaintenance = [
|
||||
{
|
||||
name: 'Upgrade',
|
||||
path: '/upgrade',
|
||||
component: Upgrade,
|
||||
meta: {
|
||||
requiresAuth: false
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'SetupWizard',
|
||||
path: '/install',
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
{{ $t('admin_menu.users') }}
|
||||
</div>
|
||||
</router-link>
|
||||
<router-link :to="{name: 'AppAppearance'}" class="menu-list-item link">
|
||||
<router-link :to="{name: 'AppOthers'}" class="menu-list-item link">
|
||||
<div class="icon">
|
||||
<settings-icon size="17"></settings-icon>
|
||||
</div>
|
||||
|
||||
@@ -8,6 +8,16 @@
|
||||
|
||||
<!--Page Tab links-->
|
||||
<div class="menu-list-wrapper horizontal">
|
||||
<router-link replace :to="{name: 'AppOthers'}"
|
||||
class="menu-list-item link">
|
||||
<div class="icon">
|
||||
<settings-icon size="17"></settings-icon>
|
||||
</div>
|
||||
<div class="label">
|
||||
{{ $t('admin_settings.tabs.others') }}
|
||||
</div>
|
||||
</router-link>
|
||||
|
||||
<router-link replace :to="{name: 'AppAppearance'}"
|
||||
class="menu-list-item link">
|
||||
<div class="icon">
|
||||
@@ -18,15 +28,6 @@
|
||||
</div>
|
||||
</router-link>
|
||||
|
||||
<router-link v-if="config.isSaaS" replace :to="{name: 'AppIndex'}" class="menu-list-item link">
|
||||
<div class="icon">
|
||||
<book-icon size="17"></book-icon>
|
||||
</div>
|
||||
<div class="label">
|
||||
Index
|
||||
</div>
|
||||
</router-link>
|
||||
|
||||
<router-link v-if="config.isSaaS" replace :to="{name: 'AppBillings'}"
|
||||
class="menu-list-item link">
|
||||
<div class="icon">
|
||||
@@ -37,16 +38,6 @@
|
||||
</div>
|
||||
</router-link>
|
||||
|
||||
<router-link replace :to="{name: 'AppEmail'}"
|
||||
class="menu-list-item link">
|
||||
<div class="icon">
|
||||
<mail-icon size="17"></mail-icon>
|
||||
</div>
|
||||
<div class="label">
|
||||
{{ $t('admin_settings.tabs.email') }}
|
||||
</div>
|
||||
</router-link>
|
||||
|
||||
<router-link v-if="config.isSaaS" replace :to="{name: 'AppPayments'}"
|
||||
class="menu-list-item link">
|
||||
<div class="icon">
|
||||
@@ -57,13 +48,22 @@
|
||||
</div>
|
||||
</router-link>
|
||||
|
||||
<router-link replace :to="{name: 'AppOthers'}"
|
||||
class="menu-list-item link">
|
||||
<router-link v-if="config.isSaaS" replace :to="{name: 'AppIndex'}" class="menu-list-item link">
|
||||
<div class="icon">
|
||||
<code-icon size="17"></code-icon>
|
||||
<home-icon size="17"></home-icon>
|
||||
</div>
|
||||
<div class="label">
|
||||
{{ $t('admin_settings.tabs.others') }}
|
||||
Homepage
|
||||
</div>
|
||||
</router-link>
|
||||
|
||||
<router-link replace :to="{name: 'AppEmail'}"
|
||||
class="menu-list-item link">
|
||||
<div class="icon">
|
||||
<mail-icon size="17"></mail-icon>
|
||||
</div>
|
||||
<div class="label">
|
||||
{{ $t('admin_settings.tabs.email') }}
|
||||
</div>
|
||||
</router-link>
|
||||
</div>
|
||||
@@ -76,7 +76,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {UsersIcon, SettingsIcon, Trash2Icon, EyeIcon, FileTextIcon, CodeIcon, MailIcon, CreditCardIcon, BookIcon} from 'vue-feather-icons'
|
||||
import {UsersIcon, SettingsIcon, Trash2Icon, EyeIcon, FileTextIcon, CodeIcon, MailIcon, CreditCardIcon, HomeIcon} from 'vue-feather-icons'
|
||||
import MobileHeader from '@/components/Mobile/MobileHeader'
|
||||
import SectionTitle from '@/components/Others/SectionTitle'
|
||||
import PageHeader from '@/components/Others/PageHeader'
|
||||
@@ -85,7 +85,7 @@
|
||||
export default {
|
||||
name: 'AppSettings',
|
||||
components: {
|
||||
BookIcon,
|
||||
HomeIcon,
|
||||
CreditCardIcon,
|
||||
CodeIcon,
|
||||
MailIcon,
|
||||
|
||||
@@ -396,6 +396,6 @@
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 7px 25px rgba(25, 54, 60, 0.1);
|
||||
border: 1px solid #ececec;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
{{ data.app_version }}
|
||||
</ColorLabel>
|
||||
</a>
|
||||
<a href="https://codecanyon.net/item/vue-file-manager-with-laravel-backend/25815986" target="_blank" class="meta">
|
||||
<a v-if="data.license" href="https://codecanyon.net/item/vue-file-manager-with-laravel-backend/25815986" target="_blank" class="meta">
|
||||
<span class="meta-title">{{ $t('admin_page_dashboard.license') }}:</span>
|
||||
<ColorLabel color="purple">
|
||||
{{ data.license }}
|
||||
@@ -33,7 +33,7 @@
|
||||
</div>
|
||||
|
||||
<!--Stripe notice-->
|
||||
<InfoBox v-if="! config.stripe_public_key" class="dashboard-notice">
|
||||
<InfoBox v-if="config.isSaaS && ! config.stripe_public_key" class="dashboard-notice">
|
||||
<i18n path="notice.stripe_activation">
|
||||
<router-link :to="{name: 'AppPayments'}">{{ $t('notice.stripe_activation_button') }}</router-link>
|
||||
</i18n>
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
v-if="! config.stripe_public_key"
|
||||
icon="settings"
|
||||
:title="$t('activation.stripe.title')"
|
||||
:description="$t('activation.stripe.description')"
|
||||
>
|
||||
<router-link :to="{name: 'AppPayments'}">
|
||||
<ButtonBase button-style="theme">{{ $t('activation.stripe.button') }}</ButtonBase>
|
||||
|
||||
@@ -81,6 +81,7 @@
|
||||
v-if="! config.stripe_public_key"
|
||||
icon="settings"
|
||||
:title="$t('activation.stripe.title')"
|
||||
:description="$t('activation.stripe.description')"
|
||||
>
|
||||
<router-link :to="{name: 'AppPayments'}">
|
||||
<ButtonBase button-style="theme">{{ $t('activation.stripe.button') }}</ButtonBase>
|
||||
|
||||
287
resources/js/views/Upgrade.vue
Normal file
@@ -0,0 +1,287 @@
|
||||
<template>
|
||||
<AuthContentWrapper ref="auth">
|
||||
|
||||
<!--Database Credentials-->
|
||||
<AuthContent name="database-credentials" :visible="true">
|
||||
<div class="content-headline">
|
||||
<settings-icon size="40" class="title-icon"></settings-icon>
|
||||
<h1>Upgrade VueFileManager</h1>
|
||||
<h2>Please fill form bellow to upgrade VueFileManager.</h2>
|
||||
</div>
|
||||
|
||||
<ValidationObserver @submit.prevent="appSetupSubmit" ref="appSetup" v-slot="{ invalid }" tag="form"
|
||||
class="form block-form">
|
||||
<FormLabel>Set your License</FormLabel>
|
||||
|
||||
<div class="block-wrapper">
|
||||
<label>Purchase Code:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Purchase code" rules="required" v-slot="{ errors }">
|
||||
<input v-model="app.purchase_code" placeholder="Paste your purchase code" type="text" :class="{'is-error': errors[0]}"/>
|
||||
<a class="input-help" href="https://help.market.envato.com/hc/en-us/articles/202822600-Where-Is-My-Purchase-Code-" target="_blank">
|
||||
Where I can find purchase code?
|
||||
</a>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
|
||||
<FormLabel class="mt-70">General Settings</FormLabel>
|
||||
|
||||
<div class="block-wrapper">
|
||||
<label>App Title:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="App Title" rules="required" v-slot="{ errors }">
|
||||
<input v-model="app.title" placeholder="Type your app title" type="text" :class="{'is-error': errors[0]}"/>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
|
||||
<div class="block-wrapper">
|
||||
<label>App Description:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="App Description" rules="required" v-slot="{ errors }">
|
||||
<input v-model="app.description" placeholder="Type your app description" type="text" :class="{'is-error': errors[0]}"/>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
|
||||
<div class="block-wrapper">
|
||||
<label>App Logo (optional):</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="App Logo" v-slot="{ errors }">
|
||||
<ImageInput v-model="app.logo" :error="errors[0]"/>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
|
||||
<div class="block-wrapper">
|
||||
<label>App Logo Horizontal (optional):</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="App Logo" v-slot="{ errors }">
|
||||
<ImageInput v-model="app.logo_horizontal" :error="errors[0]"/>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
|
||||
<div class="block-wrapper">
|
||||
<label>App Favicon (optional):</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="App Favicon" v-slot="{ errors }">
|
||||
<ImageInput v-model="app.favicon" :error="errors[0]"/>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
|
||||
<FormLabel class="mt-70">Others Information</FormLabel>
|
||||
|
||||
<div class="block-wrapper">
|
||||
<label>Contact Email:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Contact Email"
|
||||
rules="required" v-slot="{ errors }">
|
||||
<input v-model="app.contactMail" placeholder="Type your contact email" type="email" :class="{'is-error': errors[0]}"/>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
|
||||
<div class="block-wrapper">
|
||||
<label>Google Analytics Code (optional):</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Google Analytics Code"
|
||||
v-slot="{ errors }">
|
||||
<input v-model="app.googleAnalytics" placeholder="Paste your Google Analytics Code"
|
||||
type="text" :class="{'is-error': errors[0]}"/>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
|
||||
<div class="block-wrapper">
|
||||
<div class="input-wrapper">
|
||||
<div class="inline-wrapper">
|
||||
<div class="switch-label">
|
||||
<label class="input-label">Storage Limitation:</label>
|
||||
<small class="input-help">If this value is off, all users will have infinity storage capacity and you won't be <br/>able to charge your users for storage plan.</small>
|
||||
</div>
|
||||
<SwitchInput v-model="app.storageLimitation" class="switch" :state="app.storageLimitation"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="block-wrapper" v-if="app.storageLimitation">
|
||||
<label>Default Storage Space for Accounts:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Default Storage Space" rules="required" v-slot="{ errors }">
|
||||
<input v-model="app.defaultStorage"
|
||||
min="1"
|
||||
max="999999999"
|
||||
placeholder="Set default storage space in GB"
|
||||
type="number"
|
||||
:class="{'is-error': errors[0]}"
|
||||
/>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
|
||||
<div class="block-wrapper">
|
||||
<div class="input-wrapper">
|
||||
<div class="inline-wrapper">
|
||||
<div class="switch-label">
|
||||
<label class="input-label">Allow User Registration:</label>
|
||||
<small class="input-help">You can disable public registration for new users. You will still able to <br/>create new users in administration panel.</small>
|
||||
</div>
|
||||
<SwitchInput v-model="app.userRegistration" class="switch" :state="app.userRegistration"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="submit-wrapper">
|
||||
<AuthButton icon="chevron-right" text="Save and Upgrade" :loading="isLoading" :disabled="isLoading"/>
|
||||
</div>
|
||||
|
||||
</ValidationObserver>
|
||||
</AuthContent>
|
||||
</AuthContentWrapper>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {ValidationProvider, ValidationObserver} from 'vee-validate/dist/vee-validate.full'
|
||||
import AuthContentWrapper from '@/components/Auth/AuthContentWrapper'
|
||||
import SelectInput from '@/components/Others/Forms/SelectInput'
|
||||
import SwitchInput from '@/components/Others/Forms/SwitchInput'
|
||||
import ImageInput from '@/components/Others/Forms/ImageInput'
|
||||
import FormLabel from '@/components/Others/Forms/FormLabel'
|
||||
import InfoBox from '@/components/Others/Forms/InfoBox'
|
||||
import AuthContent from '@/components/Auth/AuthContent'
|
||||
import AuthButton from '@/components/Auth/AuthButton'
|
||||
import {SettingsIcon} from 'vue-feather-icons'
|
||||
import {required} from 'vee-validate/dist/rules'
|
||||
import {mapGetters} from 'vuex'
|
||||
import axios from 'axios'
|
||||
|
||||
export default {
|
||||
name: 'EnvironmentSetup',
|
||||
components: {
|
||||
AuthContentWrapper,
|
||||
ValidationProvider,
|
||||
ValidationObserver,
|
||||
SettingsIcon,
|
||||
SelectInput,
|
||||
SwitchInput,
|
||||
AuthContent,
|
||||
ImageInput,
|
||||
AuthButton,
|
||||
FormLabel,
|
||||
required,
|
||||
InfoBox,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'config'
|
||||
]),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isLoading: false,
|
||||
app: {
|
||||
license: undefined,
|
||||
purchase_code: '8654194a-3156-4cd0-944e-3440fcecdabb',
|
||||
title: 'VueFileManager',
|
||||
description: 'The best app',
|
||||
logo: undefined,
|
||||
logo_horizontal: undefined,
|
||||
favicon: undefined,
|
||||
contactMail: 'howdy@hi5ve.digital',
|
||||
googleAnalytics: '',
|
||||
defaultStorage: '5',
|
||||
userRegistration: 1,
|
||||
storageLimitation: 1,
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
storeAppSetup() {
|
||||
// Create form
|
||||
let formData = new FormData()
|
||||
|
||||
// Add image to form
|
||||
formData.append('purchase_code', this.app.purchase_code)
|
||||
formData.append('license', this.app.license)
|
||||
formData.append('title', this.app.title)
|
||||
formData.append('description', this.app.description)
|
||||
formData.append('contactMail', this.app.contactMail)
|
||||
formData.append('userRegistration', Boolean(this.app.userRegistration) ? 1 : 0)
|
||||
formData.append('storageLimitation', Boolean(this.app.storageLimitation) ? 1 : 0)
|
||||
|
||||
if (this.app.googleAnalytics)
|
||||
formData.append('googleAnalytics', this.app.googleAnalytics)
|
||||
|
||||
if (this.app.defaultStorage)
|
||||
formData.append('defaultStorage', this.app.defaultStorage)
|
||||
|
||||
if (this.app.logo)
|
||||
formData.append('logo', this.app.logo)
|
||||
|
||||
if (this.app.logo_horizontal)
|
||||
formData.append('logo_horizontal', this.app.logo_horizontal)
|
||||
|
||||
if (this.app.favicon)
|
||||
formData.append('favicon', this.app.favicon)
|
||||
|
||||
// Send request to get verify account
|
||||
axios
|
||||
.post('/api/upgrade/app', formData, {
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
|
||||
// End loading
|
||||
this.isLoading = false
|
||||
|
||||
// Redirect to next step
|
||||
this.$router.push({name: 'SignIn'})
|
||||
})
|
||||
.catch(error => {
|
||||
|
||||
// End loading
|
||||
this.isLoading = false
|
||||
})
|
||||
},
|
||||
async appSetupSubmit() {
|
||||
|
||||
// Validate fields
|
||||
const isValid = await this.$refs.appSetup.validate();
|
||||
|
||||
if (!isValid) return;
|
||||
|
||||
// Start loading
|
||||
this.isLoading = true
|
||||
|
||||
// Send request to get verify account
|
||||
axios
|
||||
.post('/api/setup/purchase-code', {
|
||||
purchaseCode: this.app.purchase_code
|
||||
})
|
||||
.then(response => {
|
||||
|
||||
if (response.data === 'b6896a44017217c36f4a6fdc56699728') {
|
||||
this.app.license = 'Extended'
|
||||
this.$store.commit('SET_SAAS', true)
|
||||
} else {
|
||||
this.app.license = 'Regular'
|
||||
}
|
||||
|
||||
this.storeAppSetup()
|
||||
})
|
||||
.catch(error => {
|
||||
|
||||
if (error.response.status == 400) {
|
||||
// TODO: error message
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
this.isLoading = false
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
if (this.config.latest_upgrade === '1.7')
|
||||
this.$router.push({name: 'SignIn'})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import '@assets/vue-file-manager/_forms';
|
||||
@import '@assets/vue-file-manager/_auth';
|
||||
@import '@assets/vue-file-manager/_setup_wizard';
|
||||
</style>
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
userRegistration: {{ isset($settings->registration) ? $settings->registration : 1 }},
|
||||
storageLimit: {{ isset($settings->storage_limitation) ? $settings->storage_limitation : 1 }},
|
||||
storageDefaultSpace: '{{ isset($settings->storage_default) ? format_gigabytes($settings->storage_default) : 5 }}',
|
||||
storageDefaultSpace: {{ isset($settings->storage_default) ? $settings->storage_default : 5 }},
|
||||
|
||||
hasAuthCookie: {{ Cookie::has('token') ? 1 : 0 }},
|
||||
isSaaS: {{ isset($settings->license) && $settings->license === 'Extended' ? 1 : 0 }},
|
||||
@@ -56,6 +56,7 @@
|
||||
legal: {!! isset($legal) ? $legal : 'undefined' !!},
|
||||
|
||||
installation: '{{ $installation }}',
|
||||
latest_upgrade: '{{ isset($settings->latest_upgrade) && $settings->latest_upgrade ? $settings->latest_upgrade : null }}',
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -30,6 +30,11 @@ Route::group(['middleware' => ['api'], 'prefix' => 'setup'], function () {
|
||||
Route::post('/admin-setup', 'General\SetupWizardController@create_admin_account');
|
||||
});
|
||||
|
||||
// Upgrade App
|
||||
Route::group(['middleware' => ['api'], 'prefix' => 'upgrade'], function () {
|
||||
Route::post('/app', 'General\UpgradeAppController@upgrade');
|
||||
});
|
||||
|
||||
// Plans
|
||||
Route::group(['middleware' => ['api'], 'prefix' => 'public'], function () {
|
||||
Route::get('/pricing', 'General\PricingController@index');
|
||||
|
||||