mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-30 11:35:59 +00:00
v1.7 beta.1
This commit is contained in:
+2
-1
@@ -1,4 +1,4 @@
|
|||||||
APP_NAME=Laravel
|
APP_NAME=VueFileManager
|
||||||
APP_ENV=production
|
APP_ENV=production
|
||||||
APP_KEY=base64:sB1YuKsbWv7MdWugb9ZsYBqv2QZJ+QOuHZHEddOsUuo=
|
APP_KEY=base64:sB1YuKsbWv7MdWugb9ZsYBqv2QZJ+QOuHZHEddOsUuo=
|
||||||
APP_DEBUG=true
|
APP_DEBUG=true
|
||||||
@@ -68,3 +68,4 @@ CASHIER_CURRENCY=
|
|||||||
STRIPE_KEY=
|
STRIPE_KEY=
|
||||||
STRIPE_SECRET=
|
STRIPE_SECRET=
|
||||||
STRIPE_WEBHOOK_SECRET=
|
STRIPE_WEBHOOK_SECRET=
|
||||||
|
CASHIER_PAYMENT_NOTIFICATION=App\Notifications\ConfirmPayment
|
||||||
@@ -33,6 +33,7 @@ class SetupWizardController extends Controller
|
|||||||
public function __construct(StripeService $stripe)
|
public function __construct(StripeService $stripe)
|
||||||
{
|
{
|
||||||
$this->stripe = $stripe;
|
$this->stripe = $stripe;
|
||||||
|
$this->setup_done = Setting::where('name', 'setup_wizard_success')->first();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -43,6 +44,9 @@ class SetupWizardController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function verify_purchase_code(Request $request)
|
public function verify_purchase_code(Request $request)
|
||||||
{
|
{
|
||||||
|
// Check setup status
|
||||||
|
if ($this->setup_done) abort(410, 'Gone');
|
||||||
|
|
||||||
// Verify purchase code
|
// Verify purchase code
|
||||||
$response = Http::get('https://verify.vuefilemanager.com/api/verify-code/' . $request->purchaseCode);
|
$response = Http::get('https://verify.vuefilemanager.com/api/verify-code/' . $request->purchaseCode);
|
||||||
|
|
||||||
@@ -61,6 +65,9 @@ class SetupWizardController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function setup_database(StoreDatabaseCredentialsRequest $request)
|
public function setup_database(StoreDatabaseCredentialsRequest $request)
|
||||||
{
|
{
|
||||||
|
// Check setup status
|
||||||
|
if ($this->setup_done) abort(410, 'Gone');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Set temporary database connection
|
// Set temporary database connection
|
||||||
config(['database.connections.test.driver' => $request->connection]);
|
config(['database.connections.test.driver' => $request->connection]);
|
||||||
@@ -133,6 +140,9 @@ class SetupWizardController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function store_stripe_credentials(StoreStripeCredentialsRequest $request)
|
public function store_stripe_credentials(StoreStripeCredentialsRequest $request)
|
||||||
{
|
{
|
||||||
|
// Check setup status
|
||||||
|
if ($this->setup_done) abort(410, 'Gone');
|
||||||
|
|
||||||
// Create stripe instance
|
// Create stripe instance
|
||||||
$stripe = Stripe::make($request->secret, '2020-03-02');
|
$stripe = Stripe::make($request->secret, '2020-03-02');
|
||||||
|
|
||||||
@@ -184,6 +194,9 @@ class SetupWizardController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function store_stripe_billings(StoreStripeBillingRequest $request)
|
public function store_stripe_billings(StoreStripeBillingRequest $request)
|
||||||
{
|
{
|
||||||
|
// Check setup status
|
||||||
|
if ($this->setup_done) abort(410, 'Gone');
|
||||||
|
|
||||||
// Get options
|
// Get options
|
||||||
$settings = collect([
|
$settings = collect([
|
||||||
[
|
[
|
||||||
@@ -239,6 +252,9 @@ class SetupWizardController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function store_stripe_plans(StoreStripePlansRequest $request)
|
public function store_stripe_plans(StoreStripePlansRequest $request)
|
||||||
{
|
{
|
||||||
|
// Check setup status
|
||||||
|
if ($this->setup_done) abort(410, 'Gone');
|
||||||
|
|
||||||
foreach ($request->input('plans') as $plan) {
|
foreach ($request->input('plans') as $plan) {
|
||||||
$this->stripe->createPlan($plan);
|
$this->stripe->createPlan($plan);
|
||||||
}
|
}
|
||||||
@@ -252,6 +268,9 @@ class SetupWizardController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function store_environment_setup(StoreEnvironmentSetupRequest $request)
|
public function store_environment_setup(StoreEnvironmentSetupRequest $request)
|
||||||
{
|
{
|
||||||
|
// Check setup status
|
||||||
|
if ($this->setup_done) abort(410, 'Gone');
|
||||||
|
|
||||||
$storage_driver = $request->input('storage.driver');
|
$storage_driver = $request->input('storage.driver');
|
||||||
|
|
||||||
if ($storage_driver === 'local') {
|
if ($storage_driver === 'local') {
|
||||||
@@ -435,6 +454,9 @@ class SetupWizardController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function store_app_settings(StoreAppSetupRequest $request)
|
public function store_app_settings(StoreAppSetupRequest $request)
|
||||||
{
|
{
|
||||||
|
// Check setup status
|
||||||
|
if ($this->setup_done) abort(410, 'Gone');
|
||||||
|
|
||||||
// Store Logo
|
// Store Logo
|
||||||
if ($request->hasFile('logo')) {
|
if ($request->hasFile('logo')) {
|
||||||
$logo = store_system_image($request->file('logo'), 'system');
|
$logo = store_system_image($request->file('logo'), 'system');
|
||||||
@@ -510,6 +532,9 @@ class SetupWizardController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function create_admin_account(Request $request)
|
public function create_admin_account(Request $request)
|
||||||
{
|
{
|
||||||
|
// Check setup status
|
||||||
|
if ($this->setup_done) abort(410, 'Gone');
|
||||||
|
|
||||||
// Validate request
|
// Validate request
|
||||||
$request->validate([
|
$request->validate([
|
||||||
'email' => 'required|string|email|unique:users',
|
'email' => 'required|string|email|unique:users',
|
||||||
@@ -563,8 +588,14 @@ class SetupWizardController extends Controller
|
|||||||
|
|
||||||
// Create legal pages and index content
|
// Create legal pages and index content
|
||||||
if ($request->license === 'Extended') {
|
if ($request->license === 'Extended') {
|
||||||
Artisan::call('db:seed --class=PageSeeder');
|
|
||||||
Artisan::call('db:seed --class=ContentSeeder');
|
Artisan::call('db:seed --class=PageSeeder', [
|
||||||
|
'--force' => true
|
||||||
|
]);
|
||||||
|
|
||||||
|
Artisan::call('db:seed --class=ContentSeeder', [
|
||||||
|
'--force' => true
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Retrieve access token
|
// Retrieve access token
|
||||||
@@ -590,7 +621,9 @@ class SetupWizardController extends Controller
|
|||||||
Artisan::call('key:generate');
|
Artisan::call('key:generate');
|
||||||
|
|
||||||
// Migrate database
|
// Migrate database
|
||||||
Artisan::call('migrate:fresh');
|
Artisan::call('migrate:fresh', [
|
||||||
|
'--force' => true
|
||||||
|
]);
|
||||||
|
|
||||||
// Create Passport Keys
|
// Create Passport Keys
|
||||||
Artisan::call('passport:keys', [
|
Artisan::call('passport:keys', [
|
||||||
|
|||||||
@@ -23,8 +23,14 @@ class UpgradeAppController extends Controller
|
|||||||
|
|
||||||
// Create legal pages and index content
|
// Create legal pages and index content
|
||||||
if ($request->license === 'Extended') {
|
if ($request->license === 'Extended') {
|
||||||
Artisan::call('db:seed --class=PageSeeder');
|
|
||||||
Artisan::call('db:seed --class=ContentSeeder');
|
Artisan::call('db:seed --class=PageSeeder', [
|
||||||
|
'--force' => true
|
||||||
|
]);
|
||||||
|
|
||||||
|
Artisan::call('db:seed --class=ContentSeeder', [
|
||||||
|
'--force' => true
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Store Logo
|
// Store Logo
|
||||||
|
|||||||
@@ -3,10 +3,12 @@
|
|||||||
namespace App\Http\Controllers\User;
|
namespace App\Http\Controllers\User;
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Http\Requests\Payments\RegisterNewPaymentMethodRequest;
|
||||||
use App\Http\Resources\PaymentCardCollection;
|
use App\Http\Resources\PaymentCardCollection;
|
||||||
use App\Http\Resources\PaymentCardResource;
|
use App\Http\Resources\PaymentCardResource;
|
||||||
use App\Http\Resources\PaymentDefaultCardResource;
|
use App\Http\Resources\PaymentDefaultCardResource;
|
||||||
use App\Http\Tools\Demo;
|
use App\Http\Tools\Demo;
|
||||||
|
use App\Services\StripeService;
|
||||||
use Auth;
|
use Auth;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Cache;
|
use Illuminate\Support\Facades\Cache;
|
||||||
@@ -14,6 +16,14 @@ use Laravel\Cashier\PaymentMethod;
|
|||||||
|
|
||||||
class PaymentMethodsController extends Controller
|
class PaymentMethodsController extends Controller
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* PaymentMethodsController constructor.
|
||||||
|
*/
|
||||||
|
public function __construct(StripeService $stripe)
|
||||||
|
{
|
||||||
|
$this->stripe = $stripe;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get user payment methods grouped by default and others
|
* Get user payment methods grouped by default and others
|
||||||
*
|
*
|
||||||
@@ -23,7 +33,7 @@ class PaymentMethodsController extends Controller
|
|||||||
{
|
{
|
||||||
$user = Auth::user();
|
$user = Auth::user();
|
||||||
|
|
||||||
if (! $user->hasPaymentMethod()) {
|
if (!$user->hasPaymentMethod()) {
|
||||||
return abort(204, 'User don\'t have any payment methods');
|
return abort(204, 'User don\'t have any payment methods');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -61,7 +71,7 @@ class PaymentMethodsController extends Controller
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $user->card_brand || ! $user->stripe_id || is_null($paymentMethodsMapped) && is_null($paymentMethodsMapped)) {
|
if (!$user->card_brand || !$user->stripe_id || is_null($paymentMethodsMapped) && is_null($paymentMethodsMapped)) {
|
||||||
return [
|
return [
|
||||||
'default' => null,
|
'default' => null,
|
||||||
'others' => [],
|
'others' => [],
|
||||||
@@ -81,8 +91,9 @@ class PaymentMethodsController extends Controller
|
|||||||
*
|
*
|
||||||
* @param Request $request
|
* @param Request $request
|
||||||
* @param $id
|
* @param $id
|
||||||
|
* @return \Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\Response
|
||||||
*/
|
*/
|
||||||
public function update(Request $request, $id)
|
public function update($id)
|
||||||
{
|
{
|
||||||
$user = Auth::user();
|
$user = Auth::user();
|
||||||
|
|
||||||
@@ -106,6 +117,23 @@ class PaymentMethodsController extends Controller
|
|||||||
return response('Done', 204);
|
return response('Done', 204);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register new payment method for user
|
||||||
|
*
|
||||||
|
* @param Request $request
|
||||||
|
* @return \Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function store(RegisterNewPaymentMethodRequest $request)
|
||||||
|
{
|
||||||
|
// Get user
|
||||||
|
$user = Auth::user();
|
||||||
|
|
||||||
|
// Register new payment method
|
||||||
|
$this->stripe->registerNewPaymentMethod($request, $user);
|
||||||
|
|
||||||
|
return response('Done', 201);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete user payment method
|
* Delete user payment method
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -0,0 +1,68 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Notifications;
|
||||||
|
|
||||||
|
use Illuminate\Bus\Queueable;
|
||||||
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
use Illuminate\Notifications\Messages\MailMessage;
|
||||||
|
use Illuminate\Notifications\Notification;
|
||||||
|
use Laravel\Cashier\Payment;
|
||||||
|
|
||||||
|
class ConfirmPayment extends Notification implements ShouldQueue
|
||||||
|
{
|
||||||
|
use Queueable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The PaymentIntent identifier.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $paymentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The payment amount.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $amount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new payment confirmation notification.
|
||||||
|
*
|
||||||
|
* @param \Laravel\Cashier\Payment $payment
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct(Payment $payment)
|
||||||
|
{
|
||||||
|
$this->paymentId = $payment->id;
|
||||||
|
$this->amount = $payment->amount();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the notification's delivery channels.
|
||||||
|
*
|
||||||
|
* @param mixed $notifiable
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function via($notifiable)
|
||||||
|
{
|
||||||
|
return ['mail'];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the mail representation of the notification.
|
||||||
|
*
|
||||||
|
* @param mixed $notifiable
|
||||||
|
* @return \Illuminate\Notifications\Messages\MailMessage
|
||||||
|
*/
|
||||||
|
public function toMail($notifiable)
|
||||||
|
{
|
||||||
|
$url = route('cashier.payment', ['id' => $this->paymentId]);
|
||||||
|
|
||||||
|
return (new MailMessage)
|
||||||
|
->subject(__('cashier.confirm_payment'))
|
||||||
|
->greeting(__('cashier.confirm_amount', ['amount' => $this->amount]))
|
||||||
|
->line(__('cashier.confirm_description'))
|
||||||
|
->action(__('cashier.confirm_button'), $url);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Requests\Payments;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Http\FormRequest;
|
||||||
|
|
||||||
|
class RegisterNewPaymentMethodRequest extends FormRequest
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Determine if the user is authorized to make this request.
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function authorize()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the validation rules that apply to the request.
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function rules()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'token' => 'required|string',
|
||||||
|
'default' => 'required|boolean'
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -86,6 +86,30 @@ class StripeService
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register new payment method
|
||||||
|
*
|
||||||
|
* @param $request
|
||||||
|
* @param $user
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function registerNewPaymentMethod($request, $user)
|
||||||
|
{
|
||||||
|
// Clear cached payment methods
|
||||||
|
cache_forget_many([
|
||||||
|
'payment-methods-user-' . $user->id,
|
||||||
|
'default-payment-methods-user-' . $user->id
|
||||||
|
]);
|
||||||
|
|
||||||
|
// Set new payment method
|
||||||
|
$user->addPaymentMethod($request->token)->paymentMethod;
|
||||||
|
|
||||||
|
// Set new default payment
|
||||||
|
if ($request->default) {
|
||||||
|
$user->updateDefaultPaymentMethod($request->token)->paymentMethod;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create new subscription or replace by new subscription
|
* Create new subscription or replace by new subscription
|
||||||
*
|
*
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -4353,6 +4353,53 @@
|
|||||||
</concept_node>
|
</concept_node>
|
||||||
</children>
|
</children>
|
||||||
</folder_node>
|
</folder_node>
|
||||||
|
<folder_node>
|
||||||
|
<name>cookie_disclaimer</name>
|
||||||
|
<children>
|
||||||
|
<concept_node>
|
||||||
|
<name>button</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>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>
|
||||||
|
</children>
|
||||||
|
</folder_node>
|
||||||
<folder_node>
|
<folder_node>
|
||||||
<name>datatable</name>
|
<name>datatable</name>
|
||||||
<children>
|
<children>
|
||||||
@@ -10037,6 +10084,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>card_new_add</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>
|
<concept_node>
|
||||||
<name>card_set</name>
|
<name>card_set</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -10254,6 +10322,74 @@
|
|||||||
</concept_node>
|
</concept_node>
|
||||||
</children>
|
</children>
|
||||||
</folder_node>
|
</folder_node>
|
||||||
|
<folder_node>
|
||||||
|
<name>upgrade_banner</name>
|
||||||
|
<children>
|
||||||
|
<concept_node>
|
||||||
|
<name>button</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>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>
|
||||||
|
<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>
|
||||||
|
</children>
|
||||||
|
</folder_node>
|
||||||
<folder_node>
|
<folder_node>
|
||||||
<name>uploading</name>
|
<name>uploading</name>
|
||||||
<children>
|
<children>
|
||||||
@@ -10280,6 +10416,53 @@
|
|||||||
</concept_node>
|
</concept_node>
|
||||||
</children>
|
</children>
|
||||||
</folder_node>
|
</folder_node>
|
||||||
|
<folder_node>
|
||||||
|
<name>user_add_card</name>
|
||||||
|
<children>
|
||||||
|
<concept_node>
|
||||||
|
<name>default_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>default_title</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>
|
||||||
|
</children>
|
||||||
|
</folder_node>
|
||||||
<folder_node>
|
<folder_node>
|
||||||
<name>user_box_delete</name>
|
<name>user_box_delete</name>
|
||||||
<children>
|
<children>
|
||||||
@@ -10544,6 +10727,27 @@
|
|||||||
<folder_node>
|
<folder_node>
|
||||||
<name>user_payments</name>
|
<name>user_payments</name>
|
||||||
<children>
|
<children>
|
||||||
|
<concept_node>
|
||||||
|
<name>add_card</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>
|
<concept_node>
|
||||||
<name>delete_card</name>
|
<name>delete_card</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
<div id="application-wrapper" v-if="layout === 'authorized'">
|
<div id="application-wrapper" v-if="layout === 'authorized'">
|
||||||
|
|
||||||
|
<!--Mobile Navigation-->
|
||||||
<MobileNavigation />
|
<MobileNavigation />
|
||||||
|
|
||||||
<!--Confirm Popup-->
|
<!--Confirm Popup-->
|
||||||
@@ -35,6 +36,8 @@
|
|||||||
|
|
||||||
<router-view v-if="layout === 'unauthorized'"/>
|
<router-view v-if="layout === 'unauthorized'"/>
|
||||||
|
|
||||||
|
<CookieDisclaimer />
|
||||||
|
|
||||||
<!--Background vignette-->
|
<!--Background vignette-->
|
||||||
<Vignette/>
|
<Vignette/>
|
||||||
</div>
|
</div>
|
||||||
@@ -43,6 +46,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import ToastrWrapper from '@/components/Others/Notifications/ToastrWrapper'
|
import ToastrWrapper from '@/components/Others/Notifications/ToastrWrapper'
|
||||||
import MobileNavigation from '@/components/Others/MobileNavigation'
|
import MobileNavigation from '@/components/Others/MobileNavigation'
|
||||||
|
import CookieDisclaimer from '@/components/Others/CookieDisclaimer'
|
||||||
import MobileMenu from '@/components/FilesView/MobileMenu'
|
import MobileMenu from '@/components/FilesView/MobileMenu'
|
||||||
import ShareCreate from '@/components/Others/ShareCreate'
|
import ShareCreate from '@/components/Others/ShareCreate'
|
||||||
import Confirm from '@/components/Others/Popup/Confirm'
|
import Confirm from '@/components/Others/Popup/Confirm'
|
||||||
@@ -59,6 +63,7 @@
|
|||||||
name: 'app',
|
name: 'app',
|
||||||
components: {
|
components: {
|
||||||
MobileNavigation,
|
MobileNavigation,
|
||||||
|
CookieDisclaimer,
|
||||||
ToastrWrapper,
|
ToastrWrapper,
|
||||||
ShareCreate,
|
ShareCreate,
|
||||||
MobileMenu,
|
MobileMenu,
|
||||||
@@ -71,7 +76,7 @@
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters([
|
...mapGetters([
|
||||||
'isLogged', 'isGuest'
|
'isLogged', 'isGuest', 'config'
|
||||||
]),
|
]),
|
||||||
layout() {
|
layout() {
|
||||||
if (includes([
|
if (includes([
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<button class="mobile-action-button">
|
<button class="mobile-action-button">
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
|
<credit-card-icon v-if="icon === 'credit-card'" size="15" class="icon"></credit-card-icon>
|
||||||
<folder-plus-icon v-if="icon === 'folder-plus'" size="15" class="icon"></folder-plus-icon>
|
<folder-plus-icon v-if="icon === 'folder-plus'" size="15" class="icon"></folder-plus-icon>
|
||||||
<list-icon v-if="icon === 'th-list'" size="15" class="icon"></list-icon>
|
<list-icon v-if="icon === 'th-list'" size="15" class="icon"></list-icon>
|
||||||
<trash-icon v-if="icon === 'trash'" size="15" class="icon"></trash-icon>
|
<trash-icon v-if="icon === 'trash'" size="15" class="icon"></trash-icon>
|
||||||
@@ -15,7 +16,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { FolderPlusIcon, ListIcon, GridIcon, TrashIcon, UserPlusIcon, PlusIcon } from 'vue-feather-icons'
|
import { FolderPlusIcon, ListIcon, GridIcon, TrashIcon, UserPlusIcon, PlusIcon, CreditCardIcon } from 'vue-feather-icons'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'MobileActionButton',
|
name: 'MobileActionButton',
|
||||||
@@ -23,6 +24,7 @@
|
|||||||
'icon'
|
'icon'
|
||||||
],
|
],
|
||||||
components: {
|
components: {
|
||||||
|
CreditCardIcon,
|
||||||
FolderPlusIcon,
|
FolderPlusIcon,
|
||||||
UserPlusIcon,
|
UserPlusIcon,
|
||||||
TrashIcon,
|
TrashIcon,
|
||||||
|
|||||||
@@ -61,7 +61,7 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
flex: 0 0 33%;
|
flex: 0 0 33%;
|
||||||
padding: 55px 25px 75px;
|
padding: 55px 25px 75px;
|
||||||
border-right: 1px solid #F7F7F7;
|
//border-right: 1px solid #F7F7F7;
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
border-right: none;
|
border-right: none;
|
||||||
@@ -123,7 +123,7 @@
|
|||||||
.plans-wrapper {
|
.plans-wrapper {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: center;
|
justify-content: space-around;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: 960px) {
|
@media only screen and (max-width: 960px) {
|
||||||
@@ -135,6 +135,7 @@
|
|||||||
.plan {
|
.plan {
|
||||||
padding: 30px 25px;
|
padding: 30px 25px;
|
||||||
border-bottom: 1px solid #F7F7F7;
|
border-bottom: 1px solid #F7F7F7;
|
||||||
|
border-right: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -146,7 +147,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.plan {
|
.plan {
|
||||||
border-color: $dark_mode_border_color;
|
border-color: $dark_mode_border_color !important;
|
||||||
|
|
||||||
.plan-wrapper {
|
.plan-wrapper {
|
||||||
background: $dark_mode_foreground;
|
background: $dark_mode_foreground;
|
||||||
|
|||||||
@@ -0,0 +1,104 @@
|
|||||||
|
<template>
|
||||||
|
<div class="cookie-wrapper" v-if="isVisibleDisclaimer">
|
||||||
|
<span class="close-icon">
|
||||||
|
<x-icon @click="closeDisclaimer" size="12"></x-icon>
|
||||||
|
</span>
|
||||||
|
<i18n path="cookie_disclaimer.description" tag="p">
|
||||||
|
<router-link :to="{name: 'DynamicPage', params: {slug: 'cookie-policy'}}">{{ $t('cookie_disclaimer.button') }}</router-link>
|
||||||
|
</i18n>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {XIcon} from 'vue-feather-icons'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'CookieDisclaimer',
|
||||||
|
components: {
|
||||||
|
XIcon
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isVisibleDisclaimer: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
closeDisclaimer() {
|
||||||
|
localStorage.setItem('isHiddenDisclaimer', 'true')
|
||||||
|
|
||||||
|
this.isVisibleDisclaimer = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.isVisibleDisclaimer = localStorage.getItem('isHiddenDisclaimer') ? false : true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import '@assets/vue-file-manager/_variables';
|
||||||
|
@import '@assets/vue-file-manager/_mixins';
|
||||||
|
|
||||||
|
.cookie-wrapper {
|
||||||
|
@include widget-card;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 35px;
|
||||||
|
max-width: 225px;
|
||||||
|
z-index: 3;
|
||||||
|
border-bottom-left-radius: 0;
|
||||||
|
border-bottom-right-radius: 0;
|
||||||
|
|
||||||
|
.close-icon {
|
||||||
|
position: absolute;
|
||||||
|
right: -4px;
|
||||||
|
top: -4px;
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 12px;
|
||||||
|
|
||||||
|
line {
|
||||||
|
stroke: $text-muted;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 1.6;
|
||||||
|
|
||||||
|
a {
|
||||||
|
font-size: 12px;
|
||||||
|
color: $theme;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media only screen and (max-width: 690px) {
|
||||||
|
.cookie-wrapper {
|
||||||
|
padding: 10px 15px;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
max-width: 100%;
|
||||||
|
|
||||||
|
p {
|
||||||
|
max-width: 300px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
.cookie-wrapper {
|
||||||
|
background: $dark_mode_foreground;
|
||||||
|
|
||||||
|
p {
|
||||||
|
color: $dark_mode_text_primary;
|
||||||
|
}
|
||||||
|
|
||||||
|
.close-icon {
|
||||||
|
|
||||||
|
line {
|
||||||
|
stroke: $dark_mode_text_primary;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -5,12 +5,12 @@
|
|||||||
<span class="title">{{ storage.used }}% From {{ storage.capacity_formatted }}</span>
|
<span class="title">{{ storage.used }}% From {{ storage.capacity_formatted }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<p v-if="storage.used > 95" class="reach-capacity">You reach your storage capacity. Please upgrade.</p>
|
<p v-if="storage.used > 95" class="reach-capacity">{{ $t('upgrade_banner.title') }}</p>
|
||||||
<p v-else class="reach-capacity">You nearly reach your storage capacity.</p>
|
<p v-else class="reach-capacity">{{ $t('upgrade_banner.description') }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="config.app_payments_active" class="footer">
|
<div v-if="config.app_payments_active" class="footer">
|
||||||
<router-link :to="{name: 'UpgradePlan'}" class="button">
|
<router-link :to="{name: 'UpgradePlan'}" class="button">
|
||||||
Upgrade
|
{{ $t('upgrade_banner.button') }}
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -269,6 +269,10 @@
|
|||||||
"share_edit": "编辑分享设定",
|
"share_edit": "编辑分享设定",
|
||||||
"upload": "上传"
|
"upload": "上传"
|
||||||
},
|
},
|
||||||
|
"cookie_disclaimer": {
|
||||||
|
"button": "cookies policy",
|
||||||
|
"description": "By browsing this website you are agreeing to our {0}."
|
||||||
|
},
|
||||||
"datatable": {
|
"datatable": {
|
||||||
"paginate_info": "Showing 1 - {visible} from {total} records"
|
"paginate_info": "Showing 1 - {visible} from {total} records"
|
||||||
},
|
},
|
||||||
@@ -641,13 +645,14 @@
|
|||||||
"others": "Others",
|
"others": "Others",
|
||||||
"sec_capacity": "Storage Capacity",
|
"sec_capacity": "Storage Capacity",
|
||||||
"sec_details": "Capacity Used Details",
|
"sec_details": "Capacity Used Details",
|
||||||
"total_capacity": "Your storage capacity {capacity}",
|
"total_capacity": "Your storage capacity is {capacity}",
|
||||||
"total_used": "Total used {used}",
|
"total_used": "Total used {used}",
|
||||||
"videos": "Videos"
|
"videos": "Videos"
|
||||||
},
|
},
|
||||||
"toaster": {
|
"toaster": {
|
||||||
"account_upgraded": "您的帐户已成功升级。",
|
"account_upgraded": "您的帐户已成功升级。",
|
||||||
"card_deleted": "您的卡已成功删除。",
|
"card_deleted": "您的卡已成功删除。",
|
||||||
|
"card_new_add": "Your card was successfully added",
|
||||||
"card_set": "您的卡已成功设置为默认值。",
|
"card_set": "您的卡已成功设置为默认值。",
|
||||||
"changed_capacity": "You successfully changed user's storage size!",
|
"changed_capacity": "You successfully changed user's storage size!",
|
||||||
"changed_user": "You successfully changed user's role!",
|
"changed_user": "You successfully changed user's role!",
|
||||||
@@ -661,9 +666,18 @@
|
|||||||
"file": "文件",
|
"file": "文件",
|
||||||
"folder": "文件夹"
|
"folder": "文件夹"
|
||||||
},
|
},
|
||||||
|
"upgrade_banner": {
|
||||||
|
"button": "Upgrade",
|
||||||
|
"description": "You nearly reach your storage capacity.",
|
||||||
|
"title": "You reach your storage capacity. Please upgrade."
|
||||||
|
},
|
||||||
"uploading": {
|
"uploading": {
|
||||||
"progress": "上传文件 {current}/{total}"
|
"progress": "上传文件 {current}/{total}"
|
||||||
},
|
},
|
||||||
|
"user_add_card": {
|
||||||
|
"default_description": "",
|
||||||
|
"default_title": "Set as Default Payment Method"
|
||||||
|
},
|
||||||
"user_box_delete": {
|
"user_box_delete": {
|
||||||
"description": "You can delete your user, but, pay attention! This event is irreversible and all user data include user files will be deleted.",
|
"description": "You can delete your user, but, pay attention! This event is irreversible and all user data include user files will be deleted.",
|
||||||
"title": "Delete User"
|
"title": "Delete User"
|
||||||
@@ -688,6 +702,7 @@
|
|||||||
"title": "更改您的密码"
|
"title": "更改您的密码"
|
||||||
},
|
},
|
||||||
"user_payments": {
|
"user_payments": {
|
||||||
|
"add_card": "Add Payment Card",
|
||||||
"delete_card": "删除卡",
|
"delete_card": "删除卡",
|
||||||
"empty": "您还没有任何付款卡。",
|
"empty": "您还没有任何付款卡。",
|
||||||
"set_as_default": "设为默认卡",
|
"set_as_default": "设为默认卡",
|
||||||
|
|||||||
@@ -269,6 +269,10 @@
|
|||||||
"share_edit": "Edit Sharing",
|
"share_edit": "Edit Sharing",
|
||||||
"upload": "Upload"
|
"upload": "Upload"
|
||||||
},
|
},
|
||||||
|
"cookie_disclaimer": {
|
||||||
|
"button": "cookies policy",
|
||||||
|
"description": "By browsing this website you are agreeing to our {0}."
|
||||||
|
},
|
||||||
"datatable": {
|
"datatable": {
|
||||||
"paginate_info": "Showing 1 - {visible} from {total} records"
|
"paginate_info": "Showing 1 - {visible} from {total} records"
|
||||||
},
|
},
|
||||||
@@ -641,13 +645,14 @@
|
|||||||
"others": "Others",
|
"others": "Others",
|
||||||
"sec_capacity": "Your disk Usage",
|
"sec_capacity": "Your disk Usage",
|
||||||
"sec_details": "Capacity Usage Details",
|
"sec_details": "Capacity Usage Details",
|
||||||
"total_capacity": "Your storage capacity {capacity}",
|
"total_capacity": "Your storage capacity is {capacity}",
|
||||||
"total_used": "Total used {used}",
|
"total_used": "Total used {used}",
|
||||||
"videos": "Videos"
|
"videos": "Videos"
|
||||||
},
|
},
|
||||||
"toaster": {
|
"toaster": {
|
||||||
"account_upgraded": "Your account was successfully upgraded.",
|
"account_upgraded": "Your account was successfully upgraded.",
|
||||||
"card_deleted": "Your card was successfully deleted.",
|
"card_deleted": "Your card was successfully deleted.",
|
||||||
|
"card_new_add": "Your card was successfully added",
|
||||||
"card_set": "Your card was successfully set as default.",
|
"card_set": "Your card was successfully set as default.",
|
||||||
"changed_capacity": "You successfully changed user's storage size!",
|
"changed_capacity": "You successfully changed user's storage size!",
|
||||||
"changed_user": "You successfully changed user's role!",
|
"changed_user": "You successfully changed user's role!",
|
||||||
@@ -661,9 +666,18 @@
|
|||||||
"file": "File",
|
"file": "File",
|
||||||
"folder": "Folder"
|
"folder": "Folder"
|
||||||
},
|
},
|
||||||
|
"upgrade_banner": {
|
||||||
|
"button": "Upgrade",
|
||||||
|
"description": "You nearly reach your storage capacity.",
|
||||||
|
"title": "You reach your storage capacity. Please upgrade."
|
||||||
|
},
|
||||||
"uploading": {
|
"uploading": {
|
||||||
"progress": "Uploading files {current}/{total}"
|
"progress": "Uploading files {current}/{total}"
|
||||||
},
|
},
|
||||||
|
"user_add_card": {
|
||||||
|
"default_description": "Your card will be charged for billing plans as first.",
|
||||||
|
"default_title": "Set as Default Payment Method"
|
||||||
|
},
|
||||||
"user_box_delete": {
|
"user_box_delete": {
|
||||||
"description": "You can delete your user, but, pay attention! This event is irreversible and all user data include user files will be deleted.",
|
"description": "You can delete your user, but, pay attention! This event is irreversible and all user data include user files will be deleted.",
|
||||||
"title": "Delete User"
|
"title": "Delete User"
|
||||||
@@ -688,6 +702,7 @@
|
|||||||
"title": "Change Your Password"
|
"title": "Change Your Password"
|
||||||
},
|
},
|
||||||
"user_payments": {
|
"user_payments": {
|
||||||
|
"add_card": "Add Payment Card",
|
||||||
"delete_card": "Delete card",
|
"delete_card": "Delete card",
|
||||||
"empty": "You don't have any payment cards yet.",
|
"empty": "You don't have any payment cards yet.",
|
||||||
"set_as_default": "Set as default card",
|
"set_as_default": "Set as default card",
|
||||||
|
|||||||
@@ -269,6 +269,10 @@
|
|||||||
"share_edit": "Upraviť zdieľanie",
|
"share_edit": "Upraviť zdieľanie",
|
||||||
"upload": "Nahrať"
|
"upload": "Nahrať"
|
||||||
},
|
},
|
||||||
|
"cookie_disclaimer": {
|
||||||
|
"button": "politikou cookies",
|
||||||
|
"description": "Prehliadaním tejto stránky súhlasim s našou"
|
||||||
|
},
|
||||||
"datatable": {
|
"datatable": {
|
||||||
"paginate_info": "Zobrazuje sa 1 - {visible} z {total} položiek"
|
"paginate_info": "Zobrazuje sa 1 - {visible} z {total} položiek"
|
||||||
},
|
},
|
||||||
@@ -641,13 +645,14 @@
|
|||||||
"others": "Ostatné",
|
"others": "Ostatné",
|
||||||
"sec_capacity": "Kapacita úložiska",
|
"sec_capacity": "Kapacita úložiska",
|
||||||
"sec_details": "Detail využitej kapacity",
|
"sec_details": "Detail využitej kapacity",
|
||||||
"total_capacity": "Tvoja kapacita disku {capacity}",
|
"total_capacity": "Vaša kapacita disku je {capacity}",
|
||||||
"total_used": "Používané {used}",
|
"total_used": "Používané {used}",
|
||||||
"videos": "Videá"
|
"videos": "Videá"
|
||||||
},
|
},
|
||||||
"toaster": {
|
"toaster": {
|
||||||
"account_upgraded": "Váš účet bol úspešne inovovaný.",
|
"account_upgraded": "Váš účet bol úspešne inovovaný.",
|
||||||
"card_deleted": "Vaša karta bola úspešne odstránená.",
|
"card_deleted": "Vaša karta bola úspešne odstránená.",
|
||||||
|
"card_new_add": "Vaša karta bola úspešne pridaná",
|
||||||
"card_set": "Vaša karta bola úspešne nastavená ako predvolená.",
|
"card_set": "Vaša karta bola úspešne nastavená ako predvolená.",
|
||||||
"changed_capacity": "Úspešne ste zmenili kapacitu úložiska uživateľa!",
|
"changed_capacity": "Úspešne ste zmenili kapacitu úložiska uživateľa!",
|
||||||
"changed_user": "Úspešne ste zmenili rolu užívateľa",
|
"changed_user": "Úspešne ste zmenili rolu užívateľa",
|
||||||
@@ -661,9 +666,18 @@
|
|||||||
"file": "Súbor",
|
"file": "Súbor",
|
||||||
"folder": "Priečinok"
|
"folder": "Priečinok"
|
||||||
},
|
},
|
||||||
|
"upgrade_banner": {
|
||||||
|
"button": "Inovovať",
|
||||||
|
"description": "Takmer ste dosiahli kapacitu úložiska",
|
||||||
|
"title": "Dosiahli ste kapacitu úložiska. Prosím inovujte úložisko."
|
||||||
|
},
|
||||||
"uploading": {
|
"uploading": {
|
||||||
"progress": "Nahrávam súbory {current}/{total}"
|
"progress": "Nahrávam súbory {current}/{total}"
|
||||||
},
|
},
|
||||||
|
"user_add_card": {
|
||||||
|
"default_description": "Vaša karta bude uložená a použitá pre platbu ako prvá.",
|
||||||
|
"default_title": "Nastaviť ako predvolenú platobnú kartu"
|
||||||
|
},
|
||||||
"user_box_delete": {
|
"user_box_delete": {
|
||||||
"description": "Môžete vymazať svojho uživateľa, avšak, dávajte pozor! Táto událosť je nezvratná a všetke uživateľské dáta vrátane uživateľových súborov budú vymazané!",
|
"description": "Môžete vymazať svojho uživateľa, avšak, dávajte pozor! Táto událosť je nezvratná a všetke uživateľské dáta vrátane uživateľových súborov budú vymazané!",
|
||||||
"title": "Vymazať uživateľa"
|
"title": "Vymazať uživateľa"
|
||||||
@@ -688,6 +702,7 @@
|
|||||||
"title": "Zmeňte si heslo"
|
"title": "Zmeňte si heslo"
|
||||||
},
|
},
|
||||||
"user_payments": {
|
"user_payments": {
|
||||||
|
"add_card": "Pridať Platobnú Kartu",
|
||||||
"delete_card": "Odstrániť kartu",
|
"delete_card": "Odstrániť kartu",
|
||||||
"empty": "Zatiaľ nemáte žiadne platobné karty.",
|
"empty": "Zatiaľ nemáte žiadne platobné karty.",
|
||||||
"set_as_default": "Nastaviť ako predvolenú kartu",
|
"set_as_default": "Nastaviť ako predvolenú kartu",
|
||||||
|
|||||||
Vendored
+10
@@ -16,6 +16,7 @@ import Invoice from './views/User/Invoices'
|
|||||||
import Password from './views/User/Password'
|
import Password from './views/User/Password'
|
||||||
import Subscription from './views/User/Subscription'
|
import Subscription from './views/User/Subscription'
|
||||||
import PaymentMethods from './views/User/PaymentMethods'
|
import PaymentMethods from './views/User/PaymentMethods'
|
||||||
|
import CreatePaymentMethod from './views/User/CreatePaymentMethod'
|
||||||
|
|
||||||
import Trash from './views/FilePages/Trash'
|
import Trash from './views/FilePages/Trash'
|
||||||
import Files from './views/FilePages/Files'
|
import Files from './views/FilePages/Files'
|
||||||
@@ -496,6 +497,15 @@ const routesUser = [
|
|||||||
title: i18n.t('routes_title.payment_methods')
|
title: i18n.t('routes_title.payment_methods')
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'CreatePaymentMethod',
|
||||||
|
path: '/settings/create-payment-method',
|
||||||
|
component: CreatePaymentMethod,
|
||||||
|
meta: {
|
||||||
|
requiresAuth: true,
|
||||||
|
title: 'Create Payment Method'
|
||||||
|
},
|
||||||
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
</ValidationProvider>
|
</ValidationProvider>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div v-if="! config.isSaaS">
|
||||||
<i18n path="page_registration.agreement" tag="p" class="legal-agreement">
|
<i18n path="page_registration.agreement" tag="p" class="legal-agreement">
|
||||||
<router-link :to="{name: 'DynamicPage', params: {slug: 'terms-of-service'}}" target="_blank">{{ termsOfService.title }}</router-link>
|
<router-link :to="{name: 'DynamicPage', params: {slug: 'terms-of-service'}}" target="_blank">{{ termsOfService.title }}</router-link>
|
||||||
<router-link :to="{name: 'DynamicPage', params: {slug: 'privacy-policy'}}" target="_blank">{{ privacyPolicy.title }}</router-link>
|
<router-link :to="{name: 'DynamicPage', params: {slug: 'privacy-policy'}}" target="_blank">{{ privacyPolicy.title }}</router-link>
|
||||||
|
|||||||
@@ -66,6 +66,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
if (! this.config.isSaaS) return
|
||||||
|
|
||||||
// Get page content
|
// Get page content
|
||||||
axios.get('/api/content', {
|
axios.get('/api/content', {
|
||||||
params: {
|
params: {
|
||||||
|
|||||||
@@ -103,4 +103,13 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
.mobile-navigation {
|
||||||
|
|
||||||
|
.mobile-menu-label {
|
||||||
|
color: $dark_mode_text_secondary;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -102,4 +102,13 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
.mobile-navigation {
|
||||||
|
|
||||||
|
.mobile-menu-label {
|
||||||
|
color: $dark_mode_text_secondary;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -92,7 +92,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="config.storageLimit && config.isSaaS && config.app_payments_active" class="headline-actions">
|
<div v-if="config.storageLimit && config.isSaaS && config.app_payments_active" class="headline-actions">
|
||||||
<router-link :to="{name: 'UpgradePlan'}" v-if="! user.relationships.subscription || (user.relationships.subscription && ! user.relationships.subscription.data.attributes.is_highest)">
|
<router-link :to="{name: 'UpgradePlan'}" v-if="canShowUpgradeButton">
|
||||||
<ButtonBase class="upgrade-button" button-style="secondary" type="button">
|
<ButtonBase class="upgrade-button" button-style="secondary" type="button">
|
||||||
{{ $t('global.upgrade_plan') }}
|
{{ $t('global.upgrade_plan') }}
|
||||||
</ButtonBase>
|
</ButtonBase>
|
||||||
@@ -100,6 +100,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<InfoBox v-if="canShowUpgradeWarning" type="error" class="upgrade-box">
|
||||||
|
<p>{{ $t('upgrade_banner.title') }}</p>
|
||||||
|
</InfoBox>
|
||||||
|
|
||||||
<!--Router Content-->
|
<!--Router Content-->
|
||||||
<router-view :user="user" />
|
<router-view :user="user" />
|
||||||
</div>
|
</div>
|
||||||
@@ -118,11 +122,11 @@
|
|||||||
import UserImageInput from '@/components/Others/UserImageInput'
|
import UserImageInput from '@/components/Others/UserImageInput'
|
||||||
import MobileHeader from '@/components/Mobile/MobileHeader'
|
import MobileHeader from '@/components/Mobile/MobileHeader'
|
||||||
import ButtonBase from '@/components/FilesView/ButtonBase'
|
import ButtonBase from '@/components/FilesView/ButtonBase'
|
||||||
|
import InfoBox from '@/components/Others/Forms/InfoBox'
|
||||||
import PageHeader from '@/components/Others/PageHeader'
|
import PageHeader from '@/components/Others/PageHeader'
|
||||||
import ColorLabel from '@/components/Others/ColorLabel'
|
import ColorLabel from '@/components/Others/ColorLabel'
|
||||||
import Spinner from '@/components/FilesView/Spinner'
|
import Spinner from '@/components/FilesView/Spinner'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import axios from 'axios'
|
|
||||||
import {
|
import {
|
||||||
CreditCardIcon,
|
CreditCardIcon,
|
||||||
HardDriveIcon,
|
HardDriveIcon,
|
||||||
@@ -136,19 +140,20 @@
|
|||||||
name: 'Settings',
|
name: 'Settings',
|
||||||
components: {
|
components: {
|
||||||
ContentSidebar,
|
ContentSidebar,
|
||||||
ContentGroup,
|
|
||||||
CloudIcon,
|
|
||||||
ButtonBase,
|
|
||||||
CreditCardIcon,
|
CreditCardIcon,
|
||||||
UserImageInput,
|
UserImageInput,
|
||||||
|
HardDriveIcon,
|
||||||
FileTextIcon,
|
FileTextIcon,
|
||||||
MobileHeader,
|
MobileHeader,
|
||||||
|
ContentGroup,
|
||||||
|
ButtonBase,
|
||||||
ColorLabel,
|
ColorLabel,
|
||||||
PageHeader,
|
PageHeader,
|
||||||
Spinner,
|
CloudIcon,
|
||||||
HardDriveIcon,
|
|
||||||
UserIcon,
|
UserIcon,
|
||||||
LockIcon,
|
LockIcon,
|
||||||
|
Spinner,
|
||||||
|
InfoBox,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['user', 'config']),
|
...mapGetters(['user', 'config']),
|
||||||
@@ -160,6 +165,12 @@
|
|||||||
},
|
},
|
||||||
canShowSubscriptionSettings() {
|
canShowSubscriptionSettings() {
|
||||||
return this.config.isSaaS
|
return this.config.isSaaS
|
||||||
|
},
|
||||||
|
canShowUpgradeButton() {
|
||||||
|
return this.config.storageDefaultSpace === this.user.relationships.storage.data.attributes.capacity || this.config.storageLimit && this.user.relationships.storage.data.attributes.used > 95
|
||||||
|
},
|
||||||
|
canShowUpgradeWarning() {
|
||||||
|
return this.config.storageLimit && this.user.relationships.storage.data.attributes.used > 95
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -215,6 +226,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.upgrade-box {
|
||||||
|
margin-top: -30px;
|
||||||
|
}
|
||||||
|
|
||||||
@media (prefers-color-scheme: dark) {
|
@media (prefers-color-scheme: dark) {
|
||||||
.user-thumbnail {
|
.user-thumbnail {
|
||||||
|
|
||||||
@@ -235,6 +250,8 @@
|
|||||||
|
|
||||||
.page-detail-headline {
|
.page-detail-headline {
|
||||||
display: block;
|
display: block;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
margin-top: 10px;
|
||||||
|
|
||||||
.headline-actions {
|
.headline-actions {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
tag="form" class="form block-form">
|
tag="form" class="form block-form">
|
||||||
<FormLabel>Create your plans</FormLabel>
|
<FormLabel>Create your plans</FormLabel>
|
||||||
<InfoBox>
|
<InfoBox>
|
||||||
<p>Your plans will be <b>sorted automatically</b> in ascent order by plan price.</p>
|
<p>Your plans will be <b>sorted automatically</b> in ascent order by plan price. All plans is automatically created as monthly plans.</p>
|
||||||
</InfoBox>
|
</InfoBox>
|
||||||
|
|
||||||
<div class="duplicator">
|
<div class="duplicator">
|
||||||
|
|||||||
@@ -3,10 +3,16 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SetupWizard',
|
name: 'SetupWizard',
|
||||||
|
computed: {
|
||||||
|
...mapGetters(['config']),
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
//this.$router.push({name: 'PurchaseCode'})
|
if (this.config.installation === 'setup-done' || this.config.installation === 'quiet-update')
|
||||||
|
this.$router.push({name: 'SignIn'})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
<!-- Pay by new credit card -->
|
<!-- Pay by new credit card -->
|
||||||
<div class="register-card" v-show="! defaultPaymentMethod || payByNewCard">
|
<div class="register-card" v-show="! defaultPaymentMethod || payByNewCard">
|
||||||
<InfoBox>
|
<InfoBox v-if="config.isDemo">
|
||||||
<p>For test your payment please use <b>4242 4242 4242 4242</b> or <b>5555 5555 5555 4444</b> as a card number, <b>11/22</b>
|
<p>For test your payment please use <b>4242 4242 4242 4242</b> or <b>5555 5555 5555 4444</b> as a card number, <b>11/22</b>
|
||||||
as the expiration date and <b>123</b> as CVC number and ZIP <b>12345</b>.</p>
|
as the expiration date and <b>123</b> as CVC number and ZIP <b>12345</b>.</p>
|
||||||
</InfoBox>
|
</InfoBox>
|
||||||
|
|||||||
@@ -0,0 +1,223 @@
|
|||||||
|
<template>
|
||||||
|
<PageTab>
|
||||||
|
<PageTabGroup>
|
||||||
|
<div class="form block-form">
|
||||||
|
<FormLabel>{{ $t('user_payments.add_card') }}</FormLabel>
|
||||||
|
|
||||||
|
<!-- Register new credit card -->
|
||||||
|
<div class="register-card">
|
||||||
|
<InfoBox v-show="config.isDemo">
|
||||||
|
<p>For test your payment please use <b>4242 4242 4242 4242</b> or <b>5555 5555 5555 4444</b> as a card number, <b>11/22</b>
|
||||||
|
as the expiration date and <b>123</b> as CVC number and ZIP <b>12345</b>.</p>
|
||||||
|
</InfoBox>
|
||||||
|
|
||||||
|
<div ref="stripeCard" class="stripe-card" :class="{'is-error': isError }"></div>
|
||||||
|
|
||||||
|
<div class="card-error-message" v-if="isError">
|
||||||
|
<span>{{ errorMessage }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="block-wrapper">
|
||||||
|
<div class="input-wrapper">
|
||||||
|
<div class="inline-wrapper">
|
||||||
|
<div class="switch-label">
|
||||||
|
<label class="input-label">{{ $t('user_add_card.default_title') }}:</label>
|
||||||
|
<small class="input-help">{{ $t('user_add_card.default_description') }}</small>
|
||||||
|
</div>
|
||||||
|
<SwitchInput v-model="defaultPaymentMethod" class="switch" :state="defaultPaymentMethod"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ButtonBase @click.native="registerCard" :disabled="isSubmitted" :loading="isSubmitted" button-style="theme" type="submit">
|
||||||
|
{{ $t('user_payments.add_card') }}
|
||||||
|
</ButtonBase>
|
||||||
|
</div>
|
||||||
|
</PageTabGroup>
|
||||||
|
</PageTab>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import PageTabGroup from '@/components/Others/Layout/PageTabGroup'
|
||||||
|
import SwitchInput from '@/components/Others/Forms/SwitchInput'
|
||||||
|
import FormLabel from '@/components/Others/Forms/FormLabel'
|
||||||
|
import ButtonBase from '@/components/FilesView/ButtonBase'
|
||||||
|
import PageTab from '@/components/Others/Layout/PageTab'
|
||||||
|
import InfoBox from '@/components/Others/Forms/InfoBox'
|
||||||
|
import {mapGetters} from 'vuex'
|
||||||
|
import {events} from "@/bus"
|
||||||
|
import axios from 'axios'
|
||||||
|
|
||||||
|
let [stripe, card] = [undefined, undefined];
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'CreatePaymentMethod',
|
||||||
|
components: {
|
||||||
|
PageTabGroup,
|
||||||
|
SwitchInput,
|
||||||
|
ButtonBase,
|
||||||
|
FormLabel,
|
||||||
|
PageTab,
|
||||||
|
InfoBox,
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters(['config']),
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
errorMessage: undefined,
|
||||||
|
isError: false,
|
||||||
|
|
||||||
|
stripeOptions: {
|
||||||
|
hidePostalCode: false
|
||||||
|
},
|
||||||
|
|
||||||
|
isSubmitted: false,
|
||||||
|
defaultPaymentMethod: true,
|
||||||
|
clientSecret: undefined
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async registerCard() {
|
||||||
|
|
||||||
|
// Start loading
|
||||||
|
this.isSubmitted = true
|
||||||
|
|
||||||
|
const {setupIntent, error} = await stripe.confirmCardSetup(this.clientSecret, {
|
||||||
|
payment_method: {
|
||||||
|
card: card,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
if (setupIntent) {
|
||||||
|
axios
|
||||||
|
.post('/api/user/payment-cards', {
|
||||||
|
token: setupIntent.payment_method,
|
||||||
|
default: this.defaultPaymentMethod,
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
|
||||||
|
// Show toaster
|
||||||
|
events.$emit('toaster', {
|
||||||
|
type: 'success',
|
||||||
|
message: this.$t('toaster.card_new_add'),
|
||||||
|
})
|
||||||
|
|
||||||
|
// Go to payment methods page
|
||||||
|
this.$router.push({name: 'PaymentMethods'})
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
events.$emit('alert:open', {
|
||||||
|
title: this.$t('popup_error.title'),
|
||||||
|
message: this.$t('popup_error.message'),
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
this.isSubmitted = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
if (error) {
|
||||||
|
|
||||||
|
// Set error on
|
||||||
|
this.isError = true
|
||||||
|
|
||||||
|
// End button spinner
|
||||||
|
this.isSubmitted = false
|
||||||
|
|
||||||
|
// Show error message
|
||||||
|
this.errorMessage = error.message
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
initStripe() {
|
||||||
|
stripe = Stripe(this.config.stripe_public_key)
|
||||||
|
|
||||||
|
let elements = stripe.elements();
|
||||||
|
|
||||||
|
card = elements.create('card');
|
||||||
|
|
||||||
|
card.mount(this.$refs.stripeCard);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
let StripeElementsScript = document.createElement('script')
|
||||||
|
|
||||||
|
StripeElementsScript.setAttribute('src', 'https://js.stripe.com/v3/')
|
||||||
|
document.head.appendChild(StripeElementsScript)
|
||||||
|
|
||||||
|
// Get setup intent for stripe
|
||||||
|
axios.get('/api/stripe/setup-intent')
|
||||||
|
.then(response => {
|
||||||
|
this.clientSecret = response.data.client_secret
|
||||||
|
|
||||||
|
this.initStripe()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import '@assets/vue-file-manager/_variables';
|
||||||
|
@import '@assets/vue-file-manager/_mixins';
|
||||||
|
@import '@assets/vue-file-manager/_forms';
|
||||||
|
|
||||||
|
.register-card {
|
||||||
|
margin-bottom: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stripe-card {
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 13px 20px;
|
||||||
|
|
||||||
|
border: 1px solid transparent;
|
||||||
|
border-radius: 4px;
|
||||||
|
background-color: white;
|
||||||
|
|
||||||
|
box-shadow: 0 1px 3px 0 #e6ebf1;
|
||||||
|
-webkit-transition: box-shadow 150ms ease;
|
||||||
|
transition: box-shadow 150ms ease;
|
||||||
|
|
||||||
|
&.is-error {
|
||||||
|
box-shadow: 0 0 7px rgba($danger, 0.3);
|
||||||
|
border: 2px solid $danger;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.StripeElement--focus {
|
||||||
|
box-shadow: 0 1px 3px 0 #cfd7df;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.StripeElement--invalid {
|
||||||
|
border-color: #fa755a;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.StripeElement--webkit-autofill {
|
||||||
|
background-color: #fefde5 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
iframe .InputContainer .InputElement {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-error-message {
|
||||||
|
padding-top: 10px;
|
||||||
|
|
||||||
|
span, a {
|
||||||
|
@include font-size(14);
|
||||||
|
font-weight: 600;
|
||||||
|
color: $danger;
|
||||||
|
}
|
||||||
|
|
||||||
|
.link, a {
|
||||||
|
text-decoration: underline;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -2,7 +2,14 @@
|
|||||||
<PageTab :is-loading="isLoading">
|
<PageTab :is-loading="isLoading">
|
||||||
<PageTabGroup v-if="PaymentMethods && PaymentMethods.length > 0">
|
<PageTabGroup v-if="PaymentMethods && PaymentMethods.length > 0">
|
||||||
<FormLabel>{{ $t('user_payments.title') }}</FormLabel>
|
<FormLabel>{{ $t('user_payments.title') }}</FormLabel>
|
||||||
<DatatableWrapper :paginator="true" :columns="columns" :data="PaymentMethods" class="table">
|
<div class="page-actions">
|
||||||
|
<router-link :to="{name: 'CreatePaymentMethod'}">
|
||||||
|
<MobileActionButton icon="credit-card">
|
||||||
|
{{ $t('user_payments.add_card') }}
|
||||||
|
</MobileActionButton>
|
||||||
|
</router-link>
|
||||||
|
</div>
|
||||||
|
<DatatableWrapper :paginator="false" :columns="columns" :data="PaymentMethods" class="table">
|
||||||
<template scope="{ row }">
|
<template scope="{ row }">
|
||||||
<tr :class="{'is-deleting': row.data.attributes.card_id === deletingID}">
|
<tr :class="{'is-deleting': row.data.attributes.card_id === deletingID}">
|
||||||
<td style="width: 300px">
|
<td style="width: 300px">
|
||||||
@@ -29,8 +36,12 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="action-icons">
|
<div class="action-icons">
|
||||||
<credit-card-icon size="15" class="icon icon-card" :title="$t('user_payments.set_as_default')" @click="setDefaultCard(row.data.attributes)" v-if="row.data.id !== defaultPaymentCard.data.id"></credit-card-icon>
|
<label class="icon-wrapper" :title="$t('user_payments.set_as_default')">
|
||||||
<trash2-icon size="15" class="icon icon-trash" :title="$t('user_payments.delete_card')" @click="deleteCard(row.data.attributes)"></trash2-icon>
|
<credit-card-icon size="15" class="icon icon-card" @click="setDefaultCard(row.data.attributes)" v-if="row.data.id !== defaultPaymentCard.data.id"></credit-card-icon>
|
||||||
|
</label>
|
||||||
|
<label class="icon-wrapper" :title="$t('user_payments.delete_card')">
|
||||||
|
<trash2-icon size="15" class="icon icon-trash" @click="deleteCard(row.data.attributes)"></trash2-icon>
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -38,12 +49,13 @@
|
|||||||
</DatatableWrapper>
|
</DatatableWrapper>
|
||||||
</PageTabGroup>
|
</PageTabGroup>
|
||||||
<InfoBox v-else>
|
<InfoBox v-else>
|
||||||
<p>{{ $t('user_payments.empty') }}</p>
|
<p>{{ $t('user_payments.empty') }} <router-link v-if="user.data.attributes.stripe_customer" :to="{name: 'CreatePaymentMethod'}">Add new payment method.</router-link> </p>
|
||||||
</InfoBox>
|
</InfoBox>
|
||||||
</PageTab>
|
</PageTab>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import MobileActionButton from '@/components/FilesView/MobileActionButton'
|
||||||
import DatatableWrapper from '@/components/Others/Tables/DatatableWrapper'
|
import DatatableWrapper from '@/components/Others/Tables/DatatableWrapper'
|
||||||
import PageTabGroup from '@/components/Others/Layout/PageTabGroup'
|
import PageTabGroup from '@/components/Others/Layout/PageTabGroup'
|
||||||
import {CreditCardIcon, Trash2Icon} from "vue-feather-icons"
|
import {CreditCardIcon, Trash2Icon} from "vue-feather-icons"
|
||||||
@@ -51,12 +63,14 @@
|
|||||||
import PageTab from '@/components/Others/Layout/PageTab'
|
import PageTab from '@/components/Others/Layout/PageTab'
|
||||||
import ColorLabel from '@/components/Others/ColorLabel'
|
import ColorLabel from '@/components/Others/ColorLabel'
|
||||||
import InfoBox from '@/components/Others/Forms/InfoBox'
|
import InfoBox from '@/components/Others/Forms/InfoBox'
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
import {events} from "@/bus"
|
import {events} from "@/bus"
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'UserPaymentMethods',
|
name: 'UserPaymentMethods',
|
||||||
components: {
|
components: {
|
||||||
|
MobileActionButton,
|
||||||
DatatableWrapper,
|
DatatableWrapper,
|
||||||
CreditCardIcon,
|
CreditCardIcon,
|
||||||
PageTabGroup,
|
PageTabGroup,
|
||||||
@@ -66,6 +80,9 @@
|
|||||||
InfoBox,
|
InfoBox,
|
||||||
PageTab,
|
PageTab,
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters(['user']),
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
defaultPaymentCard: undefined,
|
defaultPaymentCard: undefined,
|
||||||
@@ -250,6 +267,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.page-actions {
|
||||||
|
margin-top: 45px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@media only screen and (max-width: 960px) {
|
@media only screen and (max-width: 960px) {
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
// Confirm payment notification
|
||||||
|
'confirm_payment' => 'Confirm Payment',
|
||||||
|
'confirm_amount' => 'Confirm your :amount payment',
|
||||||
|
'confirm_description' => 'Extra confirmation is needed to process your payment. Please continue to the payment page by clicking on the button below.',
|
||||||
|
'confirm_button' => 'Confirm Payment',
|
||||||
|
];
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
// Confirm payment notification
|
||||||
|
'confirm_payment' => 'Confirm Payment',
|
||||||
|
'confirm_amount' => 'Confirm your :amount payment',
|
||||||
|
'confirm_description' => 'Extra confirmation is needed to process your payment. Please continue to the payment page by clicking on the button below.',
|
||||||
|
'confirm_button' => 'Confirm Payment',
|
||||||
|
];
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
// Confirm payment notification
|
||||||
|
'confirm_payment' => 'Potvrďte platbu',
|
||||||
|
'confirm_amount' => 'Potvrďte Vašu :amount platbu',
|
||||||
|
'confirm_description' => 'Extra potvrdenie je potrebne pre sprocesovanie platby. Prosím pokračujte pre potvrdenie platby tlačítkom nižšie.',
|
||||||
|
'confirm_button' => 'Potvrdiť platbu',
|
||||||
|
];
|
||||||
Vendored
+1
-1
@@ -248,7 +248,7 @@
|
|||||||
.action-icons {
|
.action-icons {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|
||||||
a, .icon {
|
a, .icon, .icon-wrapper {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -45,8 +45,8 @@
|
|||||||
|
|
||||||
@media only screen and (max-width: 960px) {
|
@media only screen and (max-width: 960px) {
|
||||||
.page-wrapper {
|
.page-wrapper {
|
||||||
padding-left: 35px;
|
padding-left: 25px;
|
||||||
padding-right: 35px;
|
padding-right: 25px;
|
||||||
|
|
||||||
&.small {
|
&.small {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ Route::group(['middleware' => ['auth:api', 'auth.master', 'scope:master']], func
|
|||||||
// Payment cards
|
// Payment cards
|
||||||
Route::delete('/user/payment-cards/{id}', 'User\PaymentMethodsController@delete');
|
Route::delete('/user/payment-cards/{id}', 'User\PaymentMethodsController@delete');
|
||||||
Route::patch('/user/payment-cards/{id}', 'User\PaymentMethodsController@update');
|
Route::patch('/user/payment-cards/{id}', 'User\PaymentMethodsController@update');
|
||||||
|
Route::post('/user/payment-cards', 'User\PaymentMethodsController@store');
|
||||||
Route::get('/user/payments', 'User\PaymentMethodsController@index');
|
Route::get('/user/payments', 'User\PaymentMethodsController@index');
|
||||||
|
|
||||||
// Subscription
|
// Subscription
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
9999999999a:2:{i:0;a:2:{s:4:"plan";a:20:{s:2:"id";s:9:"uber-pack";s:6:"object";s:4:"plan";s:6:"active";b:1;s:15:"aggregate_usage";N;s:6:"amount";i:9990;s:14:"amount_decimal";s:4:"9990";s:14:"billing_scheme";s:8:"per_unit";s:7:"created";i:1594748654;s:8:"currency";s:3:"gbp";s:8:"interval";s:5:"month";s:14:"interval_count";i:1;s:8:"livemode";b:0;s:8:"metadata";a:0:{}s:8:"nickname";N;s:7:"product";s:19:"prod_HeAVpE4yEJ9izT";s:5:"tiers";N;s:10:"tiers_mode";N;s:15:"transform_usage";N;s:17:"trial_period_days";N;s:10:"usage_type";s:8:"licensed";}s:7:"product";a:14:{s:2:"id";s:19:"prod_HeAVpE4yEJ9izT";s:6:"object";s:7:"product";s:6:"active";b:1;s:10:"attributes";a:0:{}s:7:"created";i:1594748653;s:11:"description";s:41:"Est suspendisse eget lectus cum massa sed";s:6:"images";a:0:{}s:8:"livemode";b:0;s:8:"metadata";a:1:{s:8:"capacity";s:4:"1000";}s:4:"name";s:9:"Uber Pack";s:20:"statement_descriptor";N;s:4:"type";s:7:"service";s:10:"unit_label";N;s:7:"updated";i:1594748654;}}i:1;a:2:{s:4:"plan";a:20:{s:2:"id";s:12:"starter-pack";s:6:"object";s:4:"plan";s:6:"active";b:1;s:15:"aggregate_usage";N;s:6:"amount";i:999;s:14:"amount_decimal";s:3:"999";s:14:"billing_scheme";s:8:"per_unit";s:7:"created";i:1594748302;s:8:"currency";s:3:"gbp";s:8:"interval";s:5:"month";s:14:"interval_count";i:1;s:8:"livemode";b:0;s:8:"metadata";a:0:{}s:8:"nickname";N;s:7:"product";s:19:"prod_HeAQsoNwRMsif2";s:5:"tiers";N;s:10:"tiers_mode";N;s:15:"transform_usage";N;s:17:"trial_period_days";N;s:10:"usage_type";s:8:"licensed";}s:7:"product";a:14:{s:2:"id";s:19:"prod_HeAQsoNwRMsif2";s:6:"object";s:7:"product";s:6:"active";b:1;s:10:"attributes";a:0:{}s:7:"created";i:1594748302;s:11:"description";s:63:"Ullamcorper pulvinar nascetur litora aliquam ultricies accumsan";s:6:"images";a:0:{}s:8:"livemode";b:0;s:8:"metadata";a:1:{s:8:"capacity";s:3:"200";}s:4:"name";s:12:"Starter Pack";s:20:"statement_descriptor";N;s:4:"type";s:7:"service";s:10:"unit_label";N;s:7:"updated";i:1594748302;}}}
|
9999999999a:2:{i:0;a:2:{s:4:"plan";a:20:{s:2:"id";s:17:"professional-pack";s:6:"object";s:4:"plan";s:6:"active";b:1;s:15:"aggregate_usage";N;s:6:"amount";i:1499;s:14:"amount_decimal";s:4:"1499";s:14:"billing_scheme";s:8:"per_unit";s:7:"created";i:1594824464;s:8:"currency";s:3:"gbp";s:8:"interval";s:3:"day";s:14:"interval_count";i:1;s:8:"livemode";b:0;s:8:"metadata";a:0:{}s:8:"nickname";N;s:7:"product";s:19:"prod_HeUtX49eUU2mjk";s:5:"tiers";N;s:10:"tiers_mode";N;s:15:"transform_usage";N;s:17:"trial_period_days";N;s:10:"usage_type";s:8:"licensed";}s:7:"product";a:14:{s:2:"id";s:19:"prod_HeUtX49eUU2mjk";s:6:"object";s:7:"product";s:6:"active";b:1;s:10:"attributes";a:0:{}s:7:"created";i:1594824463;s:11:"description";s:26:"The best for professionals";s:6:"images";a:0:{}s:8:"livemode";b:0;s:8:"metadata";a:1:{s:8:"capacity";s:3:"500";}s:4:"name";s:17:"Professional Pack";s:20:"statement_descriptor";N;s:4:"type";s:7:"service";s:10:"unit_label";N;s:7:"updated";i:1594824464;}}i:1;a:2:{s:4:"plan";a:20:{s:2:"id";s:12:"starter-pack";s:6:"object";s:4:"plan";s:6:"active";b:1;s:15:"aggregate_usage";N;s:6:"amount";i:999;s:14:"amount_decimal";s:3:"999";s:14:"billing_scheme";s:8:"per_unit";s:7:"created";i:1594824411;s:8:"currency";s:3:"gbp";s:8:"interval";s:3:"day";s:14:"interval_count";i:1;s:8:"livemode";b:0;s:8:"metadata";a:0:{}s:8:"nickname";N;s:7:"product";s:19:"prod_HeUsSOeOkv4nE9";s:5:"tiers";N;s:10:"tiers_mode";N;s:15:"transform_usage";N;s:17:"trial_period_days";N;s:10:"usage_type";s:8:"licensed";}s:7:"product";a:14:{s:2:"id";s:19:"prod_HeUsSOeOkv4nE9";s:6:"object";s:7:"product";s:6:"active";b:1;s:10:"attributes";a:0:{}s:7:"created";i:1594824410;s:11:"description";s:18:"the best for start";s:6:"images";a:0:{}s:8:"livemode";b:0;s:8:"metadata";a:1:{s:8:"capacity";s:3:"200";}s:4:"name";s:12:"Starter Pack";s:20:"statement_descriptor";N;s:4:"type";s:7:"service";s:10:"unit_label";N;s:7:"updated";i:1594824516;}}}
|
||||||
Reference in New Issue
Block a user