Change extension to accept on new rule, adding new font, change text

This commit is contained in:
Jorge 2021-09-04 15:55:03 +03:00
parent 4c7909335a
commit fe715360a5
29 changed files with 831 additions and 15168 deletions

14785
frontend/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -28,6 +28,9 @@
<meta name="msapplication-TileImage" content="[{[ .StaticURL ]}]/img/icons/mstile-144x144.png"> <meta name="msapplication-TileImage" content="[{[ .StaticURL ]}]/img/icons/mstile-144x144.png">
<meta name="msapplication-TileColor" content="#2979ff"> <meta name="msapplication-TileColor" content="#2979ff">
<link href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700|Roboto:300,400,500,600,700"
rel="stylesheet">
<!-- Inject Some Variables and generate the manifest json --> <!-- Inject Some Variables and generate the manifest json -->
<script> <script>
window.FileBrowser = JSON.parse('[{[ .Json ]}]'); window.FileBrowser = JSON.parse('[{[ .Json ]}]');
@ -108,29 +111,123 @@
} }
@-webkit-keyframes sk-bouncedelay { @-webkit-keyframes sk-bouncedelay {
0%, 80%, 100% { -webkit-transform: scale(0) } 0%, 80%, 100% {
40% { -webkit-transform: scale(1.0) } -webkit-transform: scale(0)
}
40% {
-webkit-transform: scale(1.0)
}
} }
@keyframes sk-bouncedelay { @keyframes sk-bouncedelay {
0%, 80%, 100% { 0%, 80%, 100% {
-webkit-transform: scale(0); -webkit-transform: scale(0);
transform: scale(0); transform: scale(0);
} 40% { }
40% {
-webkit-transform: scale(1.0); -webkit-transform: scale(1.0);
transform: scale(1.0); transform: scale(1.0);
} }
} }
.lds-dual-ring {
display: block;
border-radius: 50%;
animation: lds-dual-ring .8s linear infinite;
border: 1px solid #232f3e;
border-color: #232f3e rgb(236, 236, 236);
}
@keyframes lds-dual-ring {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.la-line-scale-pulse-out.la-2x > div {
width: 5px;
height: 40px;
margin: 0 2px;
border-radius: 5px;
}
.la-line-scale-pulse-out > div:nth-child(1), .la-line-scale-pulse-out > div:nth-child(5) {
-webkit-animation-delay: -.5s;
animation-delay: -.5s;
}
.la-line-scale-pulse-out > div:nth-child(2), .la-line-scale-pulse-out > div:nth-child(4) {
-webkit-animation-delay: -.7s;
animation-delay: -.7s;
}
.la-line-scale-pulse-out > div:nth-child(3) {
-webkit-animation-delay: -.9s;
animation-delay: -.9s;
}
.label-color {
color: rgba(0, 75, 139, 0.3);
}
.la-line-scale-pulse-out > div {
display: inline-block;
float: none;
background-color: rgba(0, 75, 139, 0.3);
border: 0 solid rgba(0, 75, 139, 0.3);
width: 4px;
height: 32px;
margin: 0 2px;
border-radius: 0;
-webkit-animation: .9s cubic-bezier(.85, .25, .37, .85) infinite line-scale-pulse-out;
animation: .9s cubic-bezier(.85, .25, .37, .85) infinite line-scale-pulse-out;
}
.la-line-scale-pulse-out, .la-line-scale-pulse-out > div {
position: relative;
box-sizing: border-box;
}
@keyframes line-scale-pulse-out {
0%, 100% {
transform: scaley(1)
}
50% {
transform: scaley(.3)
}
}
.sbl-circ-path {
width: 25px;
height: 25px;
color: rgba(90, 90, 90, 0.2);
position: relative;
display: inline-block;
border: 2px solid;
border-radius: 50%;
border-right-color: #232f3e;
animation: rotate 1s linear infinite;
}
@keyframes rotate {
0% {
transform: rotate(0);
}
100% {
transform: rotate(360deg);
}
}
</style> </style>
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>
<div id="loading"> <div id="loading">
<div class="spinner"> <div class="utm-spinner d-flex flex-column align-items-center justify-content-center">
<div class="bounce1"></div> <div class="sbl-circ-path"></div>
<div class="bounce2"></div>
<div class="bounce3"></div>
</div> </div>
</div> </div>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -28,7 +28,7 @@
<template v-if="isEmpty"> <template v-if="isEmpty">
<template v-if="value.length === 0"> <template v-if="value.length === 0">
<div class="valign-wrapper" style="padding: 45%"> <div class="valign-wrapper" style="padding: 45%">
<i class="material-icons" style="font-size: 8em !important" <i class="material-icons" style="font-size: 2em !important"
>toc</i >toc</i
> >
</div> </div>
@ -44,9 +44,9 @@
</li> </li>
</ul> </ul>
</div> </div>
<p id="renew"> <p id="renew" style=" padding: 45%">
<i class="material-icons spin" style="font-size: 8em !important" <span style="font-size: 1em !important"
>autorenew</i >Searching...</span
> >
</p> </p>
</div> </div>

View File

@ -12,16 +12,6 @@
</router-link> </router-link>
<div v-if="user.perm.create"> <div v-if="user.perm.create">
<button
@click="$store.commit('showHover', 'newDir')"
class="action"
:aria-label="$t('sidebar.newFolder')"
:title="$t('sidebar.newFolder')"
>
<i class="material-icons">create_new_folder</i>
<span>{{ $t("sidebar.newFolder") }}</span>
</button>
<button <button
@click="$store.commit('showHover', 'newFile')" @click="$store.commit('showHover', 'newFile')"
class="action" class="action"

View File

@ -1,11 +1,11 @@
<template> <template>
<div class="card floating"> <div class="card floating">
<div class="card-title"> <div class="card-title">
<h2>{{ $t("prompts.newFile") }}</h2> <h2>New rule</h2>
</div> </div>
<div class="card-content"> <div class="card-content">
<p>{{ $t("prompts.newFileMessage") }}</p> <p>Rule name (extension .yml)</p>
<input <input
class="input input--block" class="input input--block"
v-focus v-focus

View File

@ -1,15 +1,4 @@
body { @import "fonts.css";
overflow-x: hidden;
color: #333;
text-align: left;
background-color: #f5f5f5;
margin: 0;
font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-size: 13px;
font-weight: 300 !important;
line-height: 1.5385;
}
* { * {
box-sizing: border-box; box-sizing: border-box;
} }
@ -136,3 +125,20 @@ main {
.break-word { .break-word {
word-break: break-all; word-break: break-all;
} }
body {
overflow-x: hidden;
color: #333;
text-align: left;
background-color: #f5f5f5;
margin: 0;
font-family: Poppins, sans-serif !important;
font-size: 13px;
font-weight: 300 !important;
line-height: 1.5385;
}
button, input, optgroup, select, textarea {
font-family: Poppins, sans-serif !important;
}

View File

@ -1,17 +1,286 @@
/* cyrillic-ext */
@font-face { @font-face {
font-family: 'Roboto'; font-family: 'Poppins';
font-style: normal; font-style: normal;
font-weight: 300; font-weight: 400;
src: local('Roboto'), local('Roboto-Regular'), url(../assets/fonts/roboto/normal-cyrillic-ext.woff2) format('woff2'); src: local('Poppins'), local('Poppins-Regular'), url(../assets/fonts/poppins/Poppins-Regular.ttf) format('ttf');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; unicode-range: U+0460-052f, U+20b4, U+2de0-2dff, U+A640-A69F;
} }
/* cyrillic */
@font-face { @font-face {
font-family: 'Roboto'; font-family: 'Poppins';
font-style: normal; font-style: normal;
font-weight: 300; font-weight: 400;
src: local('Roboto'), local('Roboto-Regular'), url(../assets/fonts/roboto/normal-cyrillic.woff2) format('woff2'); src: local('Poppins'), local('Poppins-Regular'), url(../assets/fonts/poppins/Poppins-Light.ttf) format('ttf');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; unicode-range: U+0400-045f, U+0490-0491, U+04b0-04b1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 400;
src: local('Poppins'), local('Poppins-Regular'), url(../assets/fonts/poppins/Poppins-Light.ttf) format('ttf');
unicode-range: U+1f00-1fff;
}
/* greek */
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(../assets/fonts/poppins/Poppins-Light.ttf) format('ttf');
unicode-range: U+0370-03FF;
}
/* vietnamese */
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 400;
src: local('Poppins'), local('Poppins-Regular'), url(../assets/fonts/poppins/Poppins-Light.ttf) format('ttf');
unicode-range: U+0102-0103, U+1ea0-1ef9, U+20ab;
}
/* latin-ext */
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 400;
src: local('Poppins'), local('Poppins-Regular'), url(../assets/fonts/poppins/Poppins-Light.ttf) format('ttf');
unicode-range: U+0100-024f, U+1-1eff, U+20a0-20ab, U+20ad-20cf, U+2c60-2c7f, U+A720-A7FF;
}
/* latin */
@font-face {
font-display: swap;
font-family: 'Poppins';
font-style: normal;
font-weight: 400;
src: local('Poppins'), local('Poppins-Regular'), url(../assets/fonts/poppins/Poppins-Light.ttf) format('ttf');
unicode-range: U+0000-00ff, U+0131, U+0152-0153, U+02c6, U+02da, U+02dc, U+2000-206f, U+2074, U+20ac, U+2212, U+2215;
}
/* cyrillic-ext */
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 500;
src: local('Poppins Medium'), local('Poppins-Medium'), url(../assets/fonts/poppins/Poppins-Medium.ttf) format('ttf');
unicode-range: U+0460-052f, U+20b4, U+2de0-2dff, U+A640-A69F;
}
/* cyrillic */
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 500;
src: local('Poppins Medium'), local('Poppins-Medium'), url(../assets/fonts/poppins/Poppins-Medium.ttf) format('ttf');
unicode-range: U+0400-045f, U+0490-0491, U+04b0-04b1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 500;
src: local('Poppins Medium'), local('Poppins-Medium'), url(../assets/fonts/poppins/Poppins-Medium.ttf) format('ttf');
unicode-range: U+1f00-1fff;
}
/* greek */
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 500;
src: local('Poppins Medium'), local('Poppins-Medium'), url(../assets/fonts/poppins/Poppins-Medium.ttf) format('ttf');
unicode-range: U+0370-03ff;
}
/* vietnamese */
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 500;
src: local('Poppins Medium'), local('Poppins-Medium'), url(../assets/fonts/poppins/Poppins-Medium.ttf) format('ttf');
unicode-range: U+0102-0103, U+1ea0-1ef9, U+20ab;
}
/* latin-ext */
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 500;
src: local('Poppins Medium'), local('Poppins-Medium'), url(../assets/fonts/poppins/Poppins-Medium.ttf) format('ttf');
unicode-range: U+0100-024f, U+1-1eff, U+20a0-20ab, U+20ad-20cf, U+2c60-2c7f, U+A720-A7FF;
}
/* latin */
@font-face {
font-display: swap;
font-family: 'Poppins';
font-style: normal;
font-weight: 500;
src: local('Poppins Medium'), local('Poppins-Medium'), url(../assets/fonts/poppins/Poppins-Medium.ttf) format('ttf');
unicode-range: U+0000-00ff, U+0131, U+0152-0153, U+02c6, U+02da, U+02dc, U+2000-206f, U+2074, U+20ac, U+2212, U+2215;
}
/* cyrillic-ext */
@font-face {
font-family: 'Poppins';
font-style: italic;
font-weight: 400;
src: local('Poppins Italic'), local('Poppins-Italic'), url(../assets/fonts/poppins/Poppins-MediumItalic.ttf) format('ttf');
unicode-range: U+0460-052f, U+20b4, U+2de0-2dff, U+A640-A69F;
}
/* cyrillic */
@font-face {
font-family: 'Poppins';
font-style: italic;
font-weight: 400;
src: local('Poppins Italic'), local('Poppins-Italic'), url(../assets/fonts/poppins/Poppins-MediumItalic.ttf) format('ttf');
unicode-range: U+0400-045f, U+0490-0491, U+04b0-04b1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Poppins';
font-style: italic;
font-weight: 400;
src: local('Poppins Italic'), local('Poppins-Italic'), url(../assets/fonts/poppins/Poppins-MediumItalic.ttf) format('ttf');
unicode-range: U+1f00-1fff;
}
/* greek */
@font-face {
font-family: 'Poppins';
font-style: italic;
font-weight: 400;
src: local('Poppins Italic'), local('Poppins-Italic'), url(../assets/fonts/poppins/Poppins-MediumItalic.ttf) format('ttf');
unicode-range: U+0370-03ff;
}
/* vietnamese */
@font-face {
font-family: 'Poppins';
font-style: italic;
font-weight: 400;
src: local('Poppins Italic'), local('Poppins-Italic'), url(../assets/fonts/poppins/Poppins-MediumItalic.ttf) format('ttf');
unicode-range: U+0102-0103, U+1ea0-1ef9, U+20ab;
}
/* latin-ext */
@font-face {
font-family: 'Poppins';
font-style: italic;
font-weight: 400;
src: local('Poppins Italic'), local('Poppins-Italic'), url(../assets/fonts/poppins/Poppins-MediumItalic.ttf) format('ttf');
unicode-range: U+0100-024f, U+1-1eff, U+20a0-20ab, U+20ad-20cf, U+2c60-2c7f, U+A720-A7FF;
}
/* latin */
@font-face {
font-display: swap;
font-family: 'Poppins';
font-style: italic;
font-weight: 400;
src: local('Poppins Italic'), local('Poppins-Italic'), url(../assets/fonts/poppins/Poppins-MediumItalic.ttf) format('ttf');
unicode-range: U+0000-00ff, U+0131, U+0152-0153, U+02c6, U+02da, U+02dc, U+2000-206f, U+2074, U+20ac, U+2212, U+2215;
}
/* cyrillic-ext */
@font-face {
font-family: 'Poppins';
font-style: italic;
font-weight: 500;
src: local('Poppins Medium Italic'), local('Poppins-MediumItalic'),
url(../assets/fonts/poppins/Poppins-MediumItalic.ttf) format('ttf');
unicode-range: U+0460-052f, U+20b4, U+2de0-2dff, U+A640-A69F;
}
/* cyrillic */
@font-face {
font-family: 'Poppins';
font-style: italic;
font-weight: 500;
src: local('Poppins Medium Italic'), local('Poppins-MediumItalic'),
url(../assets/fonts/poppins/Poppins-MediumItalic.ttf) format('ttf');
unicode-range: U+0400-045f, U+0490-0491, U+04b0-04b1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Poppins';
font-style: italic;
font-weight: 500;
src: local('Poppins Medium Italic'), local('Poppins-MediumItalic'),
url(../assets/fonts/poppins/Poppins-MediumItalic.ttf) format('ttf');
unicode-range: U+1f00-1fff;
}
/* greek */
@font-face {
font-family: 'Poppins';
font-style: italic;
font-weight: 500;
src: local('Poppins Medium Italic'), local('Poppins-MediumItalic'),
url(../assets/fonts/poppins/Poppins-MediumItalic.ttf) format('ttf');
unicode-range: U+0370-03ff;
}
/* vietnamese */
@font-face {
font-family: 'Poppins';
font-style: italic;
font-weight: 500;
src: local('Poppins Medium Italic'), local('Poppins-MediumItalic'),
url(../assets/fonts/poppins/Poppins-MediumItalic.ttf) format('ttf');
unicode-range: U+0102-0103, U+1ea0-1ef9, U+20ab;
}
/* latin-ext */
@font-face {
font-family: 'Poppins';
font-style: italic;
font-weight: 500;
src: local('Poppins Medium Italic'), local('Poppins-MediumItalic'),
url(../assets/fonts/poppins/Poppins-MediumItalic.ttf) format('ttf');
unicode-range: U+0100-024f, U+1-1eff, U+20a0-20ab, U+20ad-20cf, U+2c60-2c7f, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Poppins';
font-style: italic;
font-weight: 500;
src: local('Poppins Medium Italic'), local('Poppins-MediumItalic'),
url(../assets/fonts/poppins/Poppins-MediumItalic.ttf) format('ttf');
unicode-range: U+0000-00ff, U+0131, U+0152-0153, U+02c6, U+02da, U+02dc, U+2000-206f, U+2074, U+20ac, U+2212, U+2215;
}
/* latin */
@font-face {
font-family: 'Poppins Mono';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(../assets/fonts/poppins/Poppins-MediumItalic.ttf) format('ttf');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC,
U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin */
@font-face {
font-family: 'Poppins Mono';
font-style: normal;
font-weight: 500;
font-display: swap;
src: url(../assets/fonts/poppins/Poppins-MediumItalic.ttf) format('ttf');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC,
U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
} }
@import "~material-design-icons/iconfont/material-icons.css"; @import "~material-design-icons/iconfont/material-icons.css";

View File

@ -3,7 +3,7 @@
"cancel": "Cancel", "cancel": "Cancel",
"close": "Close", "close": "Close",
"copy": "Copy", "copy": "Copy",
"copyFile": "Copy file", "copyFile": "Copy rule",
"copyToClipboard": "Copy to clipboard", "copyToClipboard": "Copy to clipboard",
"create": "Create", "create": "Create",
"delete": "Delete", "delete": "Delete",
@ -12,7 +12,7 @@
"info": "Info", "info": "Info",
"more": "More", "more": "More",
"move": "Move", "move": "Move",
"moveFile": "Move file", "moveFile": "Move ",
"new": "New", "new": "New",
"next": "Next", "next": "Next",
"ok": "OK", "ok": "OK",
@ -34,10 +34,10 @@
"toggleSidebar": "Toggle sidebar", "toggleSidebar": "Toggle sidebar",
"update": "Update", "update": "Update",
"upload": "Upload", "upload": "Upload",
"openFile": "Open file" "openFile": "Open rule"
}, },
"download": { "download": {
"downloadFile": "Download File", "downloadFile": "Download Rule",
"downloadFolder": "Download Folder", "downloadFolder": "Download Folder",
"downloadSelected": "Download Selected" "downloadSelected": "Download Selected"
}, },
@ -66,17 +66,17 @@
"sortBySize": "Sort by size" "sortBySize": "Sort by size"
}, },
"help": { "help": {
"click": "select file or directory", "click": "select rule or directory",
"ctrl": { "ctrl": {
"click": "select multiple files or directories", "click": "select multiple files or directories",
"f": "opens search", "f": "opens search",
"s": "save a file or download the directory where you are" "s": "save a rule or download the directory where you are"
}, },
"del": "delete selected items", "del": "delete selected items",
"doubleClick": "open a file or directory", "doubleClick": "open a rule or directory",
"esc": "clear selection and/or close the prompt", "esc": "clear selection and/or close the prompt",
"f1": "this information", "f1": "this information",
"f2": "rename file", "f2": "rename rule",
"help": "Help" "help": "Help"
}, },
"languages": { "languages": {
@ -116,24 +116,24 @@
"copy": "Copy", "copy": "Copy",
"copyMessage": "Choose the place to copy your files:", "copyMessage": "Choose the place to copy your files:",
"currentlyNavigating": "Currently navigating on:", "currentlyNavigating": "Currently navigating on:",
"deleteMessageMultiple": "Are you sure you want to delete {count} file(s)?", "deleteMessageMultiple": "Are you sure you want to delete {count} rule(s)?",
"deleteMessageSingle": "Are you sure you want to delete this file/folder?", "deleteMessageSingle": "Are you sure you want to delete this rule/folder?",
"deleteMessageShare": "Are you sure you want to delete this share({path})?", "deleteMessageShare": "Are you sure you want to delete this share({path})?",
"deleteTitle": "Delete files", "deleteTitle": "Delete files",
"displayName": "Display Name:", "displayName": "Display Name:",
"download": "Download files", "download": "Download files",
"downloadMessage": "Choose the format you want to download.", "downloadMessage": "Choose the format you want to download.",
"error": "Something went wrong", "error": "Something went wrong",
"fileInfo": "File information", "fileInfo": "Rule information",
"filesSelected": "{count} files selected.", "filesSelected": "{count} files selected.",
"lastModified": "Last Modified", "lastModified": "Last Modified",
"move": "Move", "move": "Move",
"moveMessage": "Choose new house for your file(s)/folder(s):", "moveMessage": "Choose new house for your rule(s)/folder(s):",
"newArchetype": "Create a new post based on an archetype. Your file will be created on content folder.", "newArchetype": "Create a new post based on an archetype. Your rule will be created on content folder.",
"newDir": "New rule directory", "newDir": "New rule directory",
"newDirMessage": "Write the name of the new directory.", "newDirMessage": "Write the name of the new directory.",
"newFile": "New rule file", "newFile": "New rule rule",
"newFileMessage": "Write the name of the new rule file.", "newFileMessage": "Write the name of the new rule rule.",
"numberDirs": "Number of directories", "numberDirs": "Number of directories",
"numberFiles": "Number of files", "numberFiles": "Number of files",
"rename": "Rename", "rename": "Rename",
@ -169,7 +169,7 @@
"avoidChanges": "(leave blank to avoid changes)", "avoidChanges": "(leave blank to avoid changes)",
"branding": "Branding", "branding": "Branding",
"brandingDirectoryPath": "Branding directory path", "brandingDirectoryPath": "Branding directory path",
"brandingHelp": "You can customize how your File Browser instance looks and feels by changing its name, replacing the logo, adding custom styles and even disable external links to GitHub.\nFor more information about custom branding, please check out the {0}.", "brandingHelp": "You can customize how your Rule Browser instance looks and feels by changing its name, replacing the logo, adding custom styles and even disable external links to GitHub.\nFor more information about custom branding, please check out the {0}.",
"changePassword": "Change Password", "changePassword": "Change Password",
"commandRunner": "Command runner", "commandRunner": "Command runner",
"commandRunnerHelp": "Here you can set commands that are executed in the named events. You must write one per line. The environment variables {0} and {1} will be available, being {0} relative to {1}. For more information about this feature and the available environment variables, please read the {2}.", "commandRunnerHelp": "Here you can set commands that are executed in the named events. You must write one per line. The environment variables {0} and {1} will be available, being {0} relative to {1}. For more information about this feature and the available environment variables, please read the {2}.",
@ -181,7 +181,7 @@
"documentation": "documentation", "documentation": "documentation",
"examples": "Examples", "examples": "Examples",
"executeOnShell": "Execute on shell", "executeOnShell": "Execute on shell",
"executeOnShellDescription": "By default, File Browser executes the commands by calling their binaries directly. If you want to run them on a shell instead (such as Bash or PowerShell), you can define it here with the required arguments and flags. If set, the command you execute will be appended as an argument. This apply to both user commands and event hooks.", "executeOnShellDescription": "By default, Rule Browser executes the commands by calling their binaries directly. If you want to run them on a shell instead (such as Bash or PowerShell), you can define it here with the required arguments and flags. If set, the command you execute will be appended as an argument. This apply to both user commands and event hooks.",
"globalRules": "This is a global set of allow and disallow rules. They apply to every user. You can define specific rules on each user's settings to override this ones.", "globalRules": "This is a global set of allow and disallow rules. They apply to every user. You can define specific rules on each user's settings to override this ones.",
"globalSettings": "Global Settings", "globalSettings": "Global Settings",
"hideDotfiles": "Hide dotfiles", "hideDotfiles": "Hide dotfiles",
@ -208,8 +208,8 @@
"permissions": "Permissions", "permissions": "Permissions",
"permissionsHelp": "You can set the user to be an administrator or choose the permissions individually. If you select \"Administrator\", all of the other options will be automatically checked. The management of users remains a privilege of an administrator.\n", "permissionsHelp": "You can set the user to be an administrator or choose the permissions individually. If you select \"Administrator\", all of the other options will be automatically checked. The management of users remains a privilege of an administrator.\n",
"profileSettings": "Profile Settings", "profileSettings": "Profile Settings",
"ruleExample1": "prevents the access to any dot file (such as .git, .gitignore) in every folder.\n", "ruleExample1": "prevents the access to any dot rule (such as .git, .gitignore) in every folder.\n",
"ruleExample2": "blocks the access to the file named Caddyfile on the root of the scope.", "ruleExample2": "blocks the access to the rule named Caddyfile on the root of the scope.",
"rules": "Rules", "rules": "Rules",
"rulesHelp": "Here you can define a set of allow and disallow rules for this specific user. The blocked files won't show up in the listings and they wont be accessible to the user. We support regex and paths relative to the users scope.\n", "rulesHelp": "Here you can define a set of allow and disallow rules for this specific user. The blocked files won't show up in the listings and they wont be accessible to the user. We support regex and paths relative to the users scope.\n",
"scope": "Scope", "scope": "Scope",
@ -240,7 +240,7 @@
"login": "Login", "login": "Login",
"logout": "Logout", "logout": "Logout",
"myFiles": "Rules", "myFiles": "Rules",
"newFile": "New file", "newFile": "New rule",
"newFolder": "New folder", "newFolder": "New folder",
"preview": "Preview", "preview": "Preview",
"settings": "Settings", "settings": "Settings",

View File

@ -1,82 +1,17 @@
import Vue from "vue"; import Vue from "vue";
import VueI18n from "vue-i18n"; import VueI18n from "vue-i18n";
import ar from "./ar.json";
import de from "./de.json";
import en from "./en.json"; import en from "./en.json";
import es from "./es.json";
import fr from "./fr.json";
import is from "./is.json";
import it from "./it.json";
import ja from "./ja.json";
import ko from "./ko.json";
import nlBE from "./nl-be.json";
import pl from "./pl.json";
import pt from "./pt.json";
import ptBR from "./pt-br.json";
import ro from "./ro.json";
import ru from "./ru.json";
import svSE from "./sv-se.json";
import zhCN from "./zh-cn.json";
import zhTW from "./zh-tw.json";
Vue.use(VueI18n); Vue.use(VueI18n);
export function detectLocale() { export function detectLocale() {
let locale = (navigator.language || navigator.browserLangugae).toLowerCase(); return "en";
switch (true) {
case /^ar.*/i.test(locale):
locale = "ar";
break;
case /^es.*/i.test(locale):
locale = "es";
break;
case /^en.*/i.test(locale):
locale = "en";
break;
case /^it.*/i.test(locale):
locale = "it";
break;
case /^fr.*/i.test(locale):
locale = "fr";
break;
case /^pt.*/i.test(locale):
locale = "pt";
break;
case /^pt-BR.*/i.test(locale):
locale = "pt-br";
break;
case /^ja.*/i.test(locale):
locale = "ja";
break;
case /^zh-CN/i.test(locale):
locale = "zh-cn";
break;
case /^zh-TW/i.test(locale):
locale = "zh-tw";
break;
case /^zh.*/i.test(locale):
locale = "zh-cn";
break;
case /^de.*/i.test(locale):
locale = "de";
break;
case /^ru.*/i.test(locale):
locale = "ru";
break;
case /^pl.*/i.test(locale):
locale = "pl";
break;
case /^ko.*/i.test(locale):
locale = "ko";
break;
default:
locale = "en";
}
return locale;
} }
// eslint-disable-next-line no-unused-vars
const removeEmpty = (obj) => const removeEmpty = (obj) =>
Object.keys(obj) Object.keys(obj)
.filter((k) => obj[k] !== null && obj[k] !== undefined && obj[k] !== "") // Remove undef. and null and empty.string. .filter((k) => obj[k] !== null && obj[k] !== undefined && obj[k] !== "") // Remove undef. and null and empty.string.
@ -92,24 +27,7 @@ const i18n = new VueI18n({
locale: detectLocale(), locale: detectLocale(),
fallbackLocale: "en", fallbackLocale: "en",
messages: { messages: {
ar: removeEmpty(ar),
de: removeEmpty(de),
en: en, en: en,
es: removeEmpty(es),
fr: removeEmpty(fr),
is: removeEmpty(is),
it: removeEmpty(it),
ja: removeEmpty(ja),
ko: removeEmpty(ko),
"nl-be": removeEmpty(nlBE),
pl: removeEmpty(pl),
"pt-br": removeEmpty(ptBR),
pt: removeEmpty(pt),
ru: removeEmpty(ru),
ro: removeEmpty(ro),
"sv-se": removeEmpty(svSE),
"zh-cn": removeEmpty(zhCN),
"zh-tw": removeEmpty(zhTW),
}, },
}); });

View File

@ -4,12 +4,6 @@ import Login from "@/views/Login";
import Layout from "@/views/Layout"; import Layout from "@/views/Layout";
import Files from "@/views/Files"; import Files from "@/views/Files";
import Share from "@/views/Share"; import Share from "@/views/Share";
import Users from "@/views/settings/Users";
import User from "@/views/settings/User";
import Settings from "@/views/Settings";
import GlobalSettings from "@/views/settings/Global";
import ProfileSettings from "@/views/settings/Profile";
import Shares from "@/views/settings/Shares";
import Errors from "@/views/Errors"; import Errors from "@/views/Errors";
import store from "@/store"; import store from "@/store";
import {baseURL} from "@/utils/constants"; import {baseURL} from "@/utils/constants";

View File

@ -1,7 +1,8 @@
<template> <template>
<div> <div>
<header-bar showMenu showLogo> <header-bar showMenu showLogo>
<search /> <title /> <search/>
<title/>
<action <action
class="search-button" class="search-button"
icon="search" icon="search"
@ -46,17 +47,6 @@
/> />
</template> </template>
<action
v-if="headerButtons.shell"
icon="code"
:label="$t('buttons.shell')"
@action="$store.commit('toggleShell')"
/>
<action
:icon="user.viewMode === 'mosaic' ? 'view_list' : 'view_module'"
:label="$t('buttons.switchView')"
@action="switchView"
/>
<action <action
v-if="headerButtons.download" v-if="headerButtons.download"
icon="file_download" icon="file_download"
@ -134,6 +124,7 @@
style="display: none" style="display: none"
type="file" type="file"
id="upload-input" id="upload-input"
accept=".yml"
@change="uploadInput($event)" @change="uploadInput($event)"
multiple multiple
/> />
@ -228,6 +219,7 @@
style="display: none" style="display: none"
type="file" type="file"
id="upload-input" id="upload-input"
accept=".yml"
@change="uploadInput($event)" @change="uploadInput($event)"
multiple multiple
/> />
@ -260,8 +252,8 @@
<script> <script>
import Vue from "vue"; import Vue from "vue";
import { mapState, mapGetters, mapMutations } from "vuex"; import {mapGetters, mapMutations, mapState} from "vuex";
import { users, files as api } from "@/api"; import {files as api, users} from "@/api";
import {enableExec} from "@/utils/constants"; import {enableExec} from "@/utils/constants";
import * as upload from "@/utils/upload"; import * as upload from "@/utils/upload";
import css from "@/utils/css"; import css from "@/utils/css";