mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-06 02:33:48 +00:00
add language setting for moobile devices, add upgrade a update app function
This commit is contained in:
@@ -7,6 +7,8 @@ use App\Page;
|
||||
use App\Setting;
|
||||
use Artisan;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Language;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Schema;
|
||||
|
||||
class UpgradeAppController extends Controller
|
||||
@@ -39,6 +41,40 @@ class UpgradeAppController extends Controller
|
||||
*/
|
||||
public function upgrade()
|
||||
{
|
||||
if(! Schema::hasTable('langauges') && ! Schema::hasTable('language_strings') ) {
|
||||
|
||||
/*
|
||||
* Create language & language_strings tables
|
||||
*
|
||||
* @since v1.8.2
|
||||
*/
|
||||
|
||||
$this->upgrade_database();
|
||||
|
||||
// Create languages & strings
|
||||
$language = Language::updateOrCreate([
|
||||
'name' => 'English',
|
||||
'locale' => 'en'
|
||||
]);
|
||||
|
||||
$license = get_setting('license') === 'Extended' ? 'extended' : 'regular';
|
||||
|
||||
$language_strings = collect(config('language_strings.' . $license));
|
||||
|
||||
$strings = $language_strings->map(function ($value , $key) use($language) {
|
||||
|
||||
return [
|
||||
'key' => $key,
|
||||
'lang' => $language->locale,
|
||||
'value' => $value
|
||||
];
|
||||
|
||||
})->toArray();
|
||||
|
||||
DB::table('language_strings')->insert($strings);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Upgrade user_settings & file_manager_folders table
|
||||
*
|
||||
|
||||
@@ -22,7 +22,7 @@ return [
|
||||
"admin_menu.plans" => "Plans",
|
||||
"admin_menu.settings" => "Settings",
|
||||
"admin_menu.users" => "Users",
|
||||
"admin_menu.language" => "Language",
|
||||
"admin_menu.languages" => "Languages",
|
||||
"admin_page_dashboard.backer_button" => "Help Us Improve",
|
||||
"admin_page_dashboard.license" => "License",
|
||||
"admin_page_dashboard.version" => "Version",
|
||||
@@ -463,6 +463,7 @@ return [
|
||||
"routes_title.dashboard" => "Dashboard",
|
||||
"routes_title.email" => "Email",
|
||||
"routes_title.invoices" => "Invoices",
|
||||
"routes_title.languages" => "Languages",
|
||||
"routes_title.others" => "Others",
|
||||
"routes_title.page_edit" => "Edit Page",
|
||||
"routes_title.pages" => "Pages",
|
||||
@@ -693,7 +694,7 @@ return [
|
||||
"admin_menu.pages" => "Pages",
|
||||
"admin_menu.settings" => "Settings",
|
||||
"admin_menu.users" => "Users",
|
||||
"admin_menu.language" => "Language",
|
||||
"admin_menu.languages" => "Languages",
|
||||
"admin_page_dashboard.backer_button" => "Help Us Improve",
|
||||
"admin_page_dashboard.license" => "License",
|
||||
"admin_page_dashboard.version" => "Version",
|
||||
@@ -1036,6 +1037,7 @@ return [
|
||||
"routes_title.billings" => "Billings",
|
||||
"routes_title.dashboard" => "Dashboard",
|
||||
"routes_title.email" => "Email",
|
||||
"routes_title.languages" => "Languages",
|
||||
"routes_title.others" => "Others",
|
||||
"routes_title.page_edit" => "Edit Page",
|
||||
"routes_title.pages" => "Pages",
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"/chunks/app-billings.js": "/chunks/app-billings.js?id=aac5bd51067578358164",
|
||||
"/chunks/app-email.js": "/chunks/app-email.js?id=9d1631b19f6492b8cae4",
|
||||
"/chunks/app-index.js": "/chunks/app-index.js?id=2dcbe307133d780b6472",
|
||||
"/chunks/app-language.js": "/chunks/app-language.js?id=bb4fa6e0ca895d1d9fcb",
|
||||
"/chunks/app-language.js": "/chunks/app-language.js?id=2aade95efcc204ea5b49",
|
||||
"/chunks/app-others.js": "/chunks/app-others.js?id=44efcfb317747ff3b508",
|
||||
"/chunks/app-payments.js": "/chunks/app-payments.js?id=187ecc16f9f7fbc4ccac",
|
||||
"/chunks/app-settings.js": "/chunks/app-settings.js?id=b6b0eba13665133c0a19",
|
||||
@@ -76,35 +76,5 @@
|
||||
"/chunks/user-storage.js": "/chunks/user-storage.js?id=5cfec8a8f8a8aef24ef2",
|
||||
"/chunks/user-subscription.js": "/chunks/user-subscription.js?id=10b3a108059d62d206c8",
|
||||
"/chunks/users.js": "/chunks/users.js?id=6e68cb068f69fba3199c",
|
||||
"/chunks/settings.74935263cd21d2747893.hot-update.js": "/chunks/settings.74935263cd21d2747893.hot-update.js",
|
||||
"/chunks/settings.7b44513c2ce22d705669.hot-update.js": "/chunks/settings.7b44513c2ce22d705669.hot-update.js",
|
||||
"/chunks/settings.814d255b22ea755d4d31.hot-update.js": "/chunks/settings.814d255b22ea755d4d31.hot-update.js",
|
||||
"/chunks/settings.5d7f9d77a665162f3938.hot-update.js": "/chunks/settings.5d7f9d77a665162f3938.hot-update.js",
|
||||
"/chunks/files.4a78e8886a71e8f5f71d.hot-update.js": "/chunks/files.4a78e8886a71e8f5f71d.hot-update.js",
|
||||
"/chunks/files.f8679a576d6dc0d384c8.hot-update.js": "/chunks/files.f8679a576d6dc0d384c8.hot-update.js",
|
||||
"/js/main.8e6b7029bddb9f943d8a.hot-update.js": "/js/main.8e6b7029bddb9f943d8a.hot-update.js",
|
||||
"/js/main.749aa3d5a7d5f33172c5.hot-update.js": "/js/main.749aa3d5a7d5f33172c5.hot-update.js",
|
||||
"/js/main.468eb76d3024538aa62f.hot-update.js": "/js/main.468eb76d3024538aa62f.hot-update.js",
|
||||
"/js/main.3bbc8989f8cbf2e45dd2.hot-update.js": "/js/main.3bbc8989f8cbf2e45dd2.hot-update.js",
|
||||
"/js/main.7bf558411a46c66e382f.hot-update.js": "/js/main.7bf558411a46c66e382f.hot-update.js",
|
||||
"/js/main.a4d8d83c090ac5a100e0.hot-update.js": "/js/main.a4d8d83c090ac5a100e0.hot-update.js",
|
||||
"/js/main.d9d2ba63d96f66aa91c5.hot-update.js": "/js/main.d9d2ba63d96f66aa91c5.hot-update.js",
|
||||
"/js/main.e6a10caa29d8935ca590.hot-update.js": "/js/main.e6a10caa29d8935ca590.hot-update.js",
|
||||
"/js/main.68ffc3ee30fdcb127fcf.hot-update.js": "/js/main.68ffc3ee30fdcb127fcf.hot-update.js",
|
||||
"/js/main.27adec0b8d0aff416c6b.hot-update.js": "/js/main.27adec0b8d0aff416c6b.hot-update.js",
|
||||
"/js/main.6e87450211904febb7d5.hot-update.js": "/js/main.6e87450211904febb7d5.hot-update.js",
|
||||
"/js/main.707bbcfb4e7b3b3947b5.hot-update.js": "/js/main.707bbcfb4e7b3b3947b5.hot-update.js",
|
||||
"/js/main.bb780a4b0316f848a691.hot-update.js": "/js/main.bb780a4b0316f848a691.hot-update.js",
|
||||
"/js/main.9ad9bc4a317640f2e443.hot-update.js": "/js/main.9ad9bc4a317640f2e443.hot-update.js",
|
||||
"/js/main.5c5624a1a012a39f9f6d.hot-update.js": "/js/main.5c5624a1a012a39f9f6d.hot-update.js",
|
||||
"/js/main.2cc0672410535a5f4ab1.hot-update.js": "/js/main.2cc0672410535a5f4ab1.hot-update.js",
|
||||
"/js/main.c25b8ad44838a7f1c663.hot-update.js": "/js/main.c25b8ad44838a7f1c663.hot-update.js",
|
||||
"/js/main.c6dc25b8b83c0006be61.hot-update.js": "/js/main.c6dc25b8b83c0006be61.hot-update.js",
|
||||
"/js/main.a40ffa66c8b1bf0fcb2e.hot-update.js": "/js/main.a40ffa66c8b1bf0fcb2e.hot-update.js",
|
||||
"/js/main.6f3ca8cba0a20a29305b.hot-update.js": "/js/main.6f3ca8cba0a20a29305b.hot-update.js",
|
||||
"/js/main.3ad6b4f926ad7c14bf58.hot-update.js": "/js/main.3ad6b4f926ad7c14bf58.hot-update.js",
|
||||
"/js/main.71a46ee364ffdae08e66.hot-update.js": "/js/main.71a46ee364ffdae08e66.hot-update.js",
|
||||
"/js/main.b2776fafe3353e1b9312.hot-update.js": "/js/main.b2776fafe3353e1b9312.hot-update.js",
|
||||
"/js/main.bb6b2cd62ef18c316d51.hot-update.js": "/js/main.bb6b2cd62ef18c316d51.hot-update.js",
|
||||
"/js/main.278597db134ff8c5ad83.hot-update.js": "/js/main.278597db134ff8c5ad83.hot-update.js"
|
||||
"/js/main.a08fa89c04b3bd6198ca.hot-update.js": "/js/main.a08fa89c04b3bd6198ca.hot-update.js"
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
<cloud-icon v-if="link.icon === 'cloud'" size="17"></cloud-icon>
|
||||
<monitor-icon v-if="link.icon === 'monitor'" size="17"></monitor-icon>
|
||||
<box-icon v-if="link.icon === 'box'" size="17"></box-icon>
|
||||
<globe-icon v-if="link.icon === 'language'" size="17"></globe-icon>
|
||||
</div>
|
||||
<b class="menu-link">
|
||||
<span>{{ link.title }}</span>
|
||||
@@ -39,6 +40,7 @@
|
||||
Trash2Icon,
|
||||
CloudIcon,
|
||||
PowerIcon,
|
||||
GlobeIcon,
|
||||
ShareIcon,
|
||||
UsersIcon,
|
||||
UserIcon,
|
||||
@@ -61,6 +63,7 @@
|
||||
Trash2Icon,
|
||||
CloudIcon,
|
||||
PowerIcon,
|
||||
GlobeIcon,
|
||||
UsersIcon,
|
||||
ShareIcon,
|
||||
LockIcon,
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Languages -->
|
||||
<div class="all-language-wrapper">
|
||||
<div class="all-language-wrapper">
|
||||
<div @click="openLanguage(language)" v-for="language in languages" :key="language.id">
|
||||
<div class="language" >
|
||||
<label class="name" :class="{'active' :activeLanguage.locale === language.locale}">
|
||||
@@ -228,21 +228,29 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
// @media only screen and (max-width: 1024px) {
|
||||
// .side-content {
|
||||
// flex: 0 0 205px;
|
||||
// }
|
||||
// }
|
||||
@media only screen and (max-width: 1024px) {
|
||||
.wrapper {
|
||||
flex-direction: column;
|
||||
.side-content{
|
||||
margin-bottom: 70px;
|
||||
}
|
||||
.languages-wrapper {
|
||||
margin-top: 0px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// @media only screen and (max-width: 690px) {
|
||||
// .side-content {
|
||||
// display: none;
|
||||
// }
|
||||
// }
|
||||
@media only screen and (max-width: 690px) {
|
||||
.side-content{
|
||||
margin-bottom: 35px !important;
|
||||
flex: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
|
||||
.language{
|
||||
|
||||
.name {
|
||||
color: $dark_mode_text_primary !important;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<!-- Serach bar -->
|
||||
<div v-if="strings" class="language-strings-wrapper form-block form">
|
||||
<div v-if="strings" class="language-strings-wrapper form">
|
||||
<div class="search-bar-wrapper">
|
||||
<div class="search-bar">
|
||||
<div v-if="!searchInput" class="icon" >
|
||||
@@ -58,8 +58,9 @@
|
||||
|
||||
<!-- Strings -->
|
||||
<FormLabel class="mt-70">Language Strings</FormLabel>
|
||||
|
||||
<Spinner class="spinner" v-if="!loadSearch || filteredStrings.length === 0 && !searchInput"/>
|
||||
<div v-if="!loadSearch || filteredStrings.length === 0 && !searchInput" class="spinner-wrapper">
|
||||
<Spinner class="spinner" />
|
||||
</div>
|
||||
|
||||
<div v-if="loadSearch && filteredStrings.length > 0">
|
||||
<div class="block-wrapper string" v-for="(string,index) in filteredStrings" :key="index">
|
||||
@@ -225,8 +226,12 @@ export default {
|
||||
@import '@assets/vue-file-manager/_mixins';
|
||||
@import '@assets/vue-file-manager/_forms';
|
||||
|
||||
.spinner {
|
||||
top: 60% !important;
|
||||
.spinner-wrapper {
|
||||
position: relative;
|
||||
height: 50%;
|
||||
.spinner {
|
||||
top: 60% !important;
|
||||
}
|
||||
}
|
||||
|
||||
.not-found-wrapper {
|
||||
@@ -249,6 +254,7 @@ export default {
|
||||
|
||||
.block-form {
|
||||
padding: 1px;
|
||||
height: 100%;
|
||||
}
|
||||
.disable-switch {
|
||||
cursor: not-allowed;
|
||||
@@ -344,23 +350,23 @@ export default {
|
||||
|
||||
@media only screen and (max-width: 690px) {
|
||||
|
||||
.search-bar {
|
||||
// .search-bar {
|
||||
|
||||
input {
|
||||
min-width: initial;
|
||||
width: 100%;
|
||||
max-width: initial;
|
||||
padding: 9px 20px 9px 30px;
|
||||
// input {
|
||||
// min-width: initial;
|
||||
// width: 100%;
|
||||
// max-width: initial;
|
||||
// padding: 9px 20px 9px 30px;
|
||||
|
||||
&:focus {
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
// &:focus {
|
||||
// box-shadow: none;
|
||||
// }
|
||||
// }
|
||||
|
||||
.icon {
|
||||
padding: 11px 15px 11px 0;
|
||||
}
|
||||
}
|
||||
// .icon {
|
||||
// padding: 11px 15px 11px 0;
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -54,6 +54,13 @@
|
||||
routeName: 'AppOthers',
|
||||
isVisible: true,
|
||||
},
|
||||
{
|
||||
icon: 'language',
|
||||
title: this.$t('admin_menu.language'),
|
||||
routeName: 'Language',
|
||||
isVisible: true,
|
||||
|
||||
}
|
||||
],
|
||||
SassNavigation: [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user