Change extension to accept on new rule, adding new font, change text
This commit is contained in:
parent
4c7909335a
commit
fe715360a5
14785
frontend/package-lock.json
generated
14785
frontend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,144 +1,241 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
||||||
|
|
||||||
[{[ if .ReCaptcha -]}]
|
[{[ if .ReCaptcha -]}]
|
||||||
<script src="[{[ .ReCaptchaHost ]}]/recaptcha/api.js?render=explicit"></script>
|
<script src="[{[ .ReCaptchaHost ]}]/recaptcha/api.js?render=explicit"></script>
|
||||||
[{[ end ]}]
|
[{[ end ]}]
|
||||||
|
|
||||||
<title>[{[ if .Name -]}][{[ .Name ]}][{[ else ]}]File Browser[{[ end ]}]</title>
|
<title>[{[ if .Name -]}][{[ .Name ]}][{[ else ]}]File Browser[{[ end ]}]</title>
|
||||||
|
|
||||||
<link rel="icon" type="image/png" sizes="32x32" href="[{[ .StaticURL ]}]/img/icons/favicon-32x32.png">
|
<link rel="icon" type="image/png" sizes="32x32" href="[{[ .StaticURL ]}]/img/icons/favicon-32x32.png">
|
||||||
<link rel="icon" type="image/png" sizes="16x16" href="[{[ .StaticURL ]}]/img/icons/favicon-16x16.png">
|
<link rel="icon" type="image/png" sizes="16x16" href="[{[ .StaticURL ]}]/img/icons/favicon-16x16.png">
|
||||||
|
|
||||||
<!-- Add to home screen for Android and modern mobile browsers -->
|
<!-- Add to home screen for Android and modern mobile browsers -->
|
||||||
<link rel="manifest" id="manifestPlaceholder" crossorigin="use-credentials">
|
<link rel="manifest" id="manifestPlaceholder" crossorigin="use-credentials">
|
||||||
<meta name="theme-color" content="#2979ff">
|
<meta name="theme-color" content="#2979ff">
|
||||||
|
|
||||||
<!-- Add to home screen for Safari on iOS/iPadOS -->
|
<!-- Add to home screen for Safari on iOS/iPadOS -->
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||||
<meta name="apple-mobile-web-app-title" content="assets">
|
<meta name="apple-mobile-web-app-title" content="assets">
|
||||||
<link rel="apple-touch-icon" href="[{[ .StaticURL ]}]/img/icons/apple-touch-icon.png">
|
<link rel="apple-touch-icon" href="[{[ .StaticURL ]}]/img/icons/apple-touch-icon.png">
|
||||||
|
|
||||||
<!-- Add to home screen for Windows -->
|
<!-- Add to home screen for Windows -->
|
||||||
<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">
|
||||||
|
|
||||||
<!-- Inject Some Variables and generate the manifest json -->
|
<link href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700|Roboto:300,400,500,600,700"
|
||||||
<script>
|
rel="stylesheet">
|
||||||
window.FileBrowser = JSON.parse('[{[ .Json ]}]');
|
|
||||||
|
|
||||||
var fullStaticURL = window.location.origin + window.FileBrowser.StaticURL;
|
<!-- Inject Some Variables and generate the manifest json -->
|
||||||
var dynamicManifest = {
|
<script>
|
||||||
"name": window.FileBrowser.Name || 'File Browser',
|
window.FileBrowser = JSON.parse('[{[ .Json ]}]');
|
||||||
"short_name": window.FileBrowser.Name || 'File Browser',
|
|
||||||
"icons": [
|
var fullStaticURL = window.location.origin + window.FileBrowser.StaticURL;
|
||||||
{
|
var dynamicManifest = {
|
||||||
"src": fullStaticURL + "/img/icons/android-chrome-192x192.png",
|
"name": window.FileBrowser.Name || 'File Browser',
|
||||||
"sizes": "192x192",
|
"short_name": window.FileBrowser.Name || 'File Browser',
|
||||||
"type": "image/png"
|
"icons": [
|
||||||
},
|
{
|
||||||
{
|
"src": fullStaticURL + "/img/icons/android-chrome-192x192.png",
|
||||||
"src": fullStaticURL + "/img/icons/android-chrome-512x512.png",
|
"sizes": "192x192",
|
||||||
"sizes": "512x512",
|
"type": "image/png"
|
||||||
"type": "image/png"
|
},
|
||||||
|
{
|
||||||
|
"src": fullStaticURL + "/img/icons/android-chrome-512x512.png",
|
||||||
|
"sizes": "512x512",
|
||||||
|
"type": "image/png"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"start_url": window.location.origin + window.FileBrowser.BaseURL,
|
||||||
|
"display": "standalone",
|
||||||
|
"background_color": "#ffffff",
|
||||||
|
"theme_color": "#455a64"
|
||||||
}
|
}
|
||||||
],
|
|
||||||
"start_url": window.location.origin + window.FileBrowser.BaseURL,
|
|
||||||
"display": "standalone",
|
|
||||||
"background_color": "#ffffff",
|
|
||||||
"theme_color": "#455a64"
|
|
||||||
}
|
|
||||||
|
|
||||||
const stringManifest = JSON.stringify(dynamicManifest);
|
const stringManifest = JSON.stringify(dynamicManifest);
|
||||||
const blob = new Blob([stringManifest], {type: 'application/json'});
|
const blob = new Blob([stringManifest], {type: 'application/json'});
|
||||||
const manifestURL = URL.createObjectURL(blob);
|
const manifestURL = URL.createObjectURL(blob);
|
||||||
document.querySelector('#manifestPlaceholder').setAttribute('href', manifestURL);
|
document.querySelector('#manifestPlaceholder').setAttribute('href', manifestURL);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
#loading {
|
#loading {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
z-index: 9999;
|
z-index: 9999;
|
||||||
transition: .1s ease opacity;
|
transition: .1s ease opacity;
|
||||||
-webkit-transition: .1s ease opacity;
|
-webkit-transition: .1s ease opacity;
|
||||||
}
|
}
|
||||||
|
|
||||||
#loading.done {
|
#loading.done {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#loading .spinner {
|
#loading .spinner {
|
||||||
width: 70px;
|
width: 70px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
-webkit-transform: translate(-50%, -50%);
|
-webkit-transform: translate(-50%, -50%);
|
||||||
transform: translate(-50%, -50%);
|
transform: translate(-50%, -50%);
|
||||||
}
|
}
|
||||||
|
|
||||||
#loading .spinner > div {
|
#loading .spinner > div {
|
||||||
width: 18px;
|
width: 18px;
|
||||||
height: 18px;
|
height: 18px;
|
||||||
background-color: #333;
|
background-color: #333;
|
||||||
border-radius: 100%;
|
border-radius: 100%;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
-webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;
|
-webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;
|
||||||
animation: sk-bouncedelay 1.4s infinite ease-in-out both;
|
animation: sk-bouncedelay 1.4s infinite ease-in-out both;
|
||||||
}
|
}
|
||||||
|
|
||||||
#loading .spinner .bounce1 {
|
#loading .spinner .bounce1 {
|
||||||
-webkit-animation-delay: -0.32s;
|
-webkit-animation-delay: -0.32s;
|
||||||
animation-delay: -0.32s;
|
animation-delay: -0.32s;
|
||||||
}
|
}
|
||||||
|
|
||||||
#loading .spinner .bounce2 {
|
#loading .spinner .bounce2 {
|
||||||
-webkit-animation-delay: -0.16s;
|
-webkit-animation-delay: -0.16s;
|
||||||
animation-delay: -0.16s;
|
animation-delay: -0.16s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@-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% {
|
}
|
||||||
-webkit-transform: scale(1.0);
|
40% {
|
||||||
transform: scale(1.0);
|
-webkit-transform: scale(1.0);
|
||||||
}
|
transform: scale(1.0);
|
||||||
}
|
}
|
||||||
</style>
|
}
|
||||||
|
.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>
|
||||||
</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>
|
||||||
|
|
||||||
[{[ if .Theme -]}]
|
[{[ if .Theme -]}]
|
||||||
<link rel="stylesheet" href="[{[ .StaticURL ]}]/themes/[{[ .Theme ]}].css" />
|
<link rel="stylesheet" href="[{[ .StaticURL ]}]/themes/[{[ .Theme ]}].css"/>
|
||||||
[{[ end ]}]
|
[{[ end ]}]
|
||||||
[{[ if .CSS -]}]
|
[{[ if .CSS -]}]
|
||||||
<link rel="stylesheet" href="[{[ .StaticURL ]}]/custom.css" />
|
<link rel="stylesheet" href="[{[ .StaticURL ]}]/custom.css"/>
|
||||||
[{[ end ]}]
|
[{[ end ]}]
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
BIN
frontend/src/assets/fonts/poppins/Poppins-Black.ttf
Normal file
BIN
frontend/src/assets/fonts/poppins/Poppins-Black.ttf
Normal file
Binary file not shown.
BIN
frontend/src/assets/fonts/poppins/Poppins-BlackItalic.ttf
Normal file
BIN
frontend/src/assets/fonts/poppins/Poppins-BlackItalic.ttf
Normal file
Binary file not shown.
BIN
frontend/src/assets/fonts/poppins/Poppins-Bold.ttf
Normal file
BIN
frontend/src/assets/fonts/poppins/Poppins-Bold.ttf
Normal file
Binary file not shown.
BIN
frontend/src/assets/fonts/poppins/Poppins-BoldItalic.ttf
Normal file
BIN
frontend/src/assets/fonts/poppins/Poppins-BoldItalic.ttf
Normal file
Binary file not shown.
BIN
frontend/src/assets/fonts/poppins/Poppins-ExtraBold.ttf
Normal file
BIN
frontend/src/assets/fonts/poppins/Poppins-ExtraBold.ttf
Normal file
Binary file not shown.
BIN
frontend/src/assets/fonts/poppins/Poppins-ExtraBoldItalic.ttf
Normal file
BIN
frontend/src/assets/fonts/poppins/Poppins-ExtraBoldItalic.ttf
Normal file
Binary file not shown.
BIN
frontend/src/assets/fonts/poppins/Poppins-ExtraLight.ttf
Normal file
BIN
frontend/src/assets/fonts/poppins/Poppins-ExtraLight.ttf
Normal file
Binary file not shown.
BIN
frontend/src/assets/fonts/poppins/Poppins-ExtraLightItalic.ttf
Normal file
BIN
frontend/src/assets/fonts/poppins/Poppins-ExtraLightItalic.ttf
Normal file
Binary file not shown.
BIN
frontend/src/assets/fonts/poppins/Poppins-Italic.ttf
Normal file
BIN
frontend/src/assets/fonts/poppins/Poppins-Italic.ttf
Normal file
Binary file not shown.
BIN
frontend/src/assets/fonts/poppins/Poppins-Light.ttf
Normal file
BIN
frontend/src/assets/fonts/poppins/Poppins-Light.ttf
Normal file
Binary file not shown.
BIN
frontend/src/assets/fonts/poppins/Poppins-LightItalic.ttf
Normal file
BIN
frontend/src/assets/fonts/poppins/Poppins-LightItalic.ttf
Normal file
Binary file not shown.
BIN
frontend/src/assets/fonts/poppins/Poppins-Medium.ttf
Normal file
BIN
frontend/src/assets/fonts/poppins/Poppins-Medium.ttf
Normal file
Binary file not shown.
BIN
frontend/src/assets/fonts/poppins/Poppins-MediumItalic.ttf
Normal file
BIN
frontend/src/assets/fonts/poppins/Poppins-MediumItalic.ttf
Normal file
Binary file not shown.
BIN
frontend/src/assets/fonts/poppins/Poppins-Regular.ttf
Normal file
BIN
frontend/src/assets/fonts/poppins/Poppins-Regular.ttf
Normal file
Binary file not shown.
BIN
frontend/src/assets/fonts/poppins/Poppins-SemiBold.ttf
Normal file
BIN
frontend/src/assets/fonts/poppins/Poppins-SemiBold.ttf
Normal file
Binary file not shown.
BIN
frontend/src/assets/fonts/poppins/Poppins-SemiBoldItalic.ttf
Normal file
BIN
frontend/src/assets/fonts/poppins/Poppins-SemiBoldItalic.ttf
Normal file
Binary file not shown.
BIN
frontend/src/assets/fonts/poppins/Poppins-Thin.ttf
Normal file
BIN
frontend/src/assets/fonts/poppins/Poppins-Thin.ttf
Normal file
Binary file not shown.
BIN
frontend/src/assets/fonts/poppins/Poppins-ThinItalic.ttf
Normal file
BIN
frontend/src/assets/fonts/poppins/Poppins-ThinItalic.ttf
Normal file
Binary file not shown.
@ -2,21 +2,21 @@
|
|||||||
<div id="search" @click="open" v-bind:class="{ active, ongoing }">
|
<div id="search" @click="open" v-bind:class="{ active, ongoing }">
|
||||||
<div id="input">
|
<div id="input">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
@keyup.exact="keyup"
|
@keyup.exact="keyup"
|
||||||
@keyup.enter="submit"
|
@keyup.enter="submit"
|
||||||
ref="input"
|
ref="input"
|
||||||
:autofocus="active"
|
:autofocus="active"
|
||||||
v-model.trim="value"
|
v-model.trim="value"
|
||||||
:aria-label="$t('search.pressToSearch')"
|
:aria-label="$t('search.pressToSearch')"
|
||||||
:placeholder="$t('search.pressToSearch')"
|
:placeholder="$t('search.pressToSearch')"
|
||||||
/>
|
/>
|
||||||
<button
|
<button
|
||||||
v-if="active"
|
v-if="active"
|
||||||
class="action"
|
class="action"
|
||||||
@click="close"
|
@click="close"
|
||||||
:aria-label="$t('buttons.close')"
|
:aria-label="$t('buttons.close')"
|
||||||
:title="$t('buttons.close')"
|
:title="$t('buttons.close')"
|
||||||
>
|
>
|
||||||
<i class="material-icons">arrow_back</i>
|
<i class="material-icons">arrow_back</i>
|
||||||
</button>
|
</button>
|
||||||
@ -28,8 +28,8 @@
|
|||||||
<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>
|
||||||
</template>
|
</template>
|
||||||
@ -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>
|
||||||
@ -54,15 +54,15 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters, mapMutations, mapState } from "vuex";
|
import {mapGetters, mapMutations, mapState} from "vuex";
|
||||||
import url from "@/utils/url";
|
import url from "@/utils/url";
|
||||||
import { search } from "@/api";
|
import {search} from "@/api";
|
||||||
|
|
||||||
var boxes = {
|
var boxes = {
|
||||||
image: { label: "images", icon: "insert_photo" },
|
image: {label: "images", icon: "insert_photo"},
|
||||||
audio: { label: "music", icon: "volume_up" },
|
audio: {label: "music", icon: "volume_up"},
|
||||||
video: { label: "video", icon: "movie" },
|
video: {label: "video", icon: "movie"},
|
||||||
pdf: { label: "pdf", icon: "picture_as_pdf" },
|
pdf: {label: "pdf", icon: "picture_as_pdf"},
|
||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -119,8 +119,8 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return this.value === ""
|
return this.value === ""
|
||||||
? this.$t("search.typeToSearch")
|
? this.$t("search.typeToSearch")
|
||||||
: this.$t("search.pressToSearch");
|
: this.$t("search.pressToSearch");
|
||||||
},
|
},
|
||||||
filteredResults() {
|
filteredResults() {
|
||||||
return this.results.slice(0, this.resultsCount);
|
return this.results.slice(0, this.resultsCount);
|
||||||
@ -129,8 +129,8 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$refs.result.addEventListener("scroll", (event) => {
|
this.$refs.result.addEventListener("scroll", (event) => {
|
||||||
if (
|
if (
|
||||||
event.target.offsetHeight + event.target.scrollTop >=
|
event.target.offsetHeight + event.target.scrollTop >=
|
||||||
event.target.scrollHeight - 100
|
event.target.scrollHeight - 100
|
||||||
) {
|
) {
|
||||||
this.resultsCount += 50;
|
this.resultsCount += 50;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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"
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -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;
|
||||||
|
}
|
||||||
|
|||||||
@ -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";
|
||||||
|
|||||||
@ -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",
|
||||||
|
|||||||
@ -1,116 +1,34 @@
|
|||||||
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.
|
||||||
.reduce(
|
.reduce(
|
||||||
(newObj, k) =>
|
(newObj, k) =>
|
||||||
typeof obj[k] === "object"
|
typeof obj[k] === "object"
|
||||||
? Object.assign(newObj, { [k]: removeEmpty(obj[k]) }) // Recurse.
|
? Object.assign(newObj, {[k]: removeEmpty(obj[k])}) // Recurse.
|
||||||
: Object.assign(newObj, { [k]: obj[k] }), // Copy value.
|
: Object.assign(newObj, {[k]: obj[k]}), // Copy value.
|
||||||
{}
|
{}
|
||||||
);
|
);
|
||||||
|
|
||||||
const i18n = new VueI18n({
|
const i18n = new VueI18n({
|
||||||
locale: detectLocale(),
|
locale: detectLocale(),
|
||||||
fallbackLocale: "en",
|
fallbackLocale: "en",
|
||||||
messages: {
|
messages: {
|
||||||
ar: removeEmpty(ar),
|
en: en,
|
||||||
de: removeEmpty(de),
|
},
|
||||||
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),
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default i18n;
|
export default i18n;
|
||||||
|
|||||||
@ -4,15 +4,9 @@ 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";
|
||||||
|
|
||||||
Vue.use(Router);
|
Vue.use(Router);
|
||||||
|
|
||||||
|
|||||||
@ -1,81 +1,71 @@
|
|||||||
<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"
|
||||||
:label="$t('buttons.search')"
|
:label="$t('buttons.search')"
|
||||||
@action="openSearch()"
|
@action="openSearch()"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<template #actions>
|
<template #actions>
|
||||||
<template v-if="!isMobile">
|
<template v-if="!isMobile">
|
||||||
<action
|
<action
|
||||||
v-if="headerButtons.share"
|
v-if="headerButtons.share"
|
||||||
icon="share"
|
icon="share"
|
||||||
:label="$t('buttons.share')"
|
:label="$t('buttons.share')"
|
||||||
show="share"
|
show="share"
|
||||||
/>
|
/>
|
||||||
<action
|
<action
|
||||||
v-if="headerButtons.rename"
|
v-if="headerButtons.rename"
|
||||||
icon="mode_edit"
|
icon="mode_edit"
|
||||||
:label="$t('buttons.rename')"
|
:label="$t('buttons.rename')"
|
||||||
show="rename"
|
show="rename"
|
||||||
/>
|
/>
|
||||||
<action
|
<action
|
||||||
v-if="headerButtons.copy"
|
v-if="headerButtons.copy"
|
||||||
id="copy-button"
|
id="copy-button"
|
||||||
icon="content_copy"
|
icon="content_copy"
|
||||||
:label="$t('buttons.copyFile')"
|
:label="$t('buttons.copyFile')"
|
||||||
show="copy"
|
show="copy"
|
||||||
/>
|
/>
|
||||||
<action
|
<action
|
||||||
v-if="headerButtons.move"
|
v-if="headerButtons.move"
|
||||||
id="move-button"
|
id="move-button"
|
||||||
icon="forward"
|
icon="forward"
|
||||||
:label="$t('buttons.moveFile')"
|
:label="$t('buttons.moveFile')"
|
||||||
show="move"
|
show="move"
|
||||||
/>
|
/>
|
||||||
<action
|
<action
|
||||||
v-if="headerButtons.delete"
|
v-if="headerButtons.delete"
|
||||||
id="delete-button"
|
id="delete-button"
|
||||||
icon="delete"
|
icon="delete"
|
||||||
:label="$t('buttons.delete')"
|
:label="$t('buttons.delete')"
|
||||||
show="delete"
|
show="delete"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<action
|
<action
|
||||||
v-if="headerButtons.shell"
|
v-if="headerButtons.download"
|
||||||
icon="code"
|
icon="file_download"
|
||||||
:label="$t('buttons.shell')"
|
:label="$t('buttons.download')"
|
||||||
@action="$store.commit('toggleShell')"
|
@action="download"
|
||||||
|
:counter="selectedCount"
|
||||||
/>
|
/>
|
||||||
<action
|
<action
|
||||||
:icon="user.viewMode === 'mosaic' ? 'view_list' : 'view_module'"
|
v-if="headerButtons.upload"
|
||||||
:label="$t('buttons.switchView')"
|
icon="file_upload"
|
||||||
@action="switchView"
|
id="upload-button"
|
||||||
|
:label="$t('buttons.upload')"
|
||||||
|
@action="upload"
|
||||||
/>
|
/>
|
||||||
|
<action icon="info" :label="$t('buttons.info')" show="info"/>
|
||||||
<action
|
<action
|
||||||
v-if="headerButtons.download"
|
icon="check_circle"
|
||||||
icon="file_download"
|
:label="$t('buttons.selectMultiple')"
|
||||||
:label="$t('buttons.download')"
|
@action="toggleMultipleSelection"
|
||||||
@action="download"
|
|
||||||
:counter="selectedCount"
|
|
||||||
/>
|
|
||||||
<action
|
|
||||||
v-if="headerButtons.upload"
|
|
||||||
icon="file_upload"
|
|
||||||
id="upload-button"
|
|
||||||
:label="$t('buttons.upload')"
|
|
||||||
@action="upload"
|
|
||||||
/>
|
|
||||||
<action icon="info" :label="$t('buttons.info')" show="info" />
|
|
||||||
<action
|
|
||||||
icon="check_circle"
|
|
||||||
:label="$t('buttons.selectMultiple')"
|
|
||||||
@action="toggleMultipleSelection"
|
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</header-bar>
|
</header-bar>
|
||||||
@ -83,34 +73,34 @@
|
|||||||
<div v-if="isMobile" id="file-selection">
|
<div v-if="isMobile" id="file-selection">
|
||||||
<span v-if="selectedCount > 0">{{ selectedCount }} selected</span>
|
<span v-if="selectedCount > 0">{{ selectedCount }} selected</span>
|
||||||
<action
|
<action
|
||||||
v-if="headerButtons.share"
|
v-if="headerButtons.share"
|
||||||
icon="share"
|
icon="share"
|
||||||
:label="$t('buttons.share')"
|
:label="$t('buttons.share')"
|
||||||
show="share"
|
show="share"
|
||||||
/>
|
/>
|
||||||
<action
|
<action
|
||||||
v-if="headerButtons.rename"
|
v-if="headerButtons.rename"
|
||||||
icon="mode_edit"
|
icon="mode_edit"
|
||||||
:label="$t('buttons.rename')"
|
:label="$t('buttons.rename')"
|
||||||
show="rename"
|
show="rename"
|
||||||
/>
|
/>
|
||||||
<action
|
<action
|
||||||
v-if="headerButtons.copy"
|
v-if="headerButtons.copy"
|
||||||
icon="content_copy"
|
icon="content_copy"
|
||||||
:label="$t('buttons.copyFile')"
|
:label="$t('buttons.copyFile')"
|
||||||
show="copy"
|
show="copy"
|
||||||
/>
|
/>
|
||||||
<action
|
<action
|
||||||
v-if="headerButtons.move"
|
v-if="headerButtons.move"
|
||||||
icon="forward"
|
icon="forward"
|
||||||
:label="$t('buttons.moveFile')"
|
:label="$t('buttons.moveFile')"
|
||||||
show="move"
|
show="move"
|
||||||
/>
|
/>
|
||||||
<action
|
<action
|
||||||
v-if="headerButtons.delete"
|
v-if="headerButtons.delete"
|
||||||
icon="delete"
|
icon="delete"
|
||||||
:label="$t('buttons.delete')"
|
:label="$t('buttons.delete')"
|
||||||
show="delete"
|
show="delete"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -131,19 +121,20 @@
|
|||||||
<span>{{ $t("files.lonely") }}</span>
|
<span>{{ $t("files.lonely") }}</span>
|
||||||
</h2>
|
</h2>
|
||||||
<input
|
<input
|
||||||
style="display: none"
|
style="display: none"
|
||||||
type="file"
|
type="file"
|
||||||
id="upload-input"
|
id="upload-input"
|
||||||
@change="uploadInput($event)"
|
accept=".yml"
|
||||||
multiple
|
@change="uploadInput($event)"
|
||||||
|
multiple
|
||||||
/>
|
/>
|
||||||
<input
|
<input
|
||||||
style="display: none"
|
style="display: none"
|
||||||
type="file"
|
type="file"
|
||||||
id="upload-folder-input"
|
id="upload-folder-input"
|
||||||
@change="uploadInput($event)"
|
@change="uploadInput($event)"
|
||||||
webkitdirectory
|
webkitdirectory
|
||||||
multiple
|
multiple
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div v-else id="listing" ref="listing" :class="user.viewMode">
|
<div v-else id="listing" ref="listing" :class="user.viewMode">
|
||||||
@ -152,38 +143,38 @@
|
|||||||
<div></div>
|
<div></div>
|
||||||
<div>
|
<div>
|
||||||
<p
|
<p
|
||||||
:class="{ active: nameSorted }"
|
:class="{ active: nameSorted }"
|
||||||
class="name"
|
class="name"
|
||||||
role="button"
|
role="button"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
@click="sort('name')"
|
@click="sort('name')"
|
||||||
:title="$t('files.sortByName')"
|
:title="$t('files.sortByName')"
|
||||||
:aria-label="$t('files.sortByName')"
|
:aria-label="$t('files.sortByName')"
|
||||||
>
|
>
|
||||||
<span>{{ $t("files.name") }}</span>
|
<span>{{ $t("files.name") }}</span>
|
||||||
<i class="material-icons">{{ nameIcon }}</i>
|
<i class="material-icons">{{ nameIcon }}</i>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p
|
<p
|
||||||
:class="{ active: sizeSorted }"
|
:class="{ active: sizeSorted }"
|
||||||
class="size"
|
class="size"
|
||||||
role="button"
|
role="button"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
@click="sort('size')"
|
@click="sort('size')"
|
||||||
:title="$t('files.sortBySize')"
|
:title="$t('files.sortBySize')"
|
||||||
:aria-label="$t('files.sortBySize')"
|
:aria-label="$t('files.sortBySize')"
|
||||||
>
|
>
|
||||||
<span>{{ $t("files.size") }}</span>
|
<span>{{ $t("files.size") }}</span>
|
||||||
<i class="material-icons">{{ sizeIcon }}</i>
|
<i class="material-icons">{{ sizeIcon }}</i>
|
||||||
</p>
|
</p>
|
||||||
<p
|
<p
|
||||||
:class="{ active: modifiedSorted }"
|
:class="{ active: modifiedSorted }"
|
||||||
class="modified"
|
class="modified"
|
||||||
role="button"
|
role="button"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
@click="sort('modified')"
|
@click="sort('modified')"
|
||||||
:title="$t('files.sortByLastModified')"
|
:title="$t('files.sortByLastModified')"
|
||||||
:aria-label="$t('files.sortByLastModified')"
|
:aria-label="$t('files.sortByLastModified')"
|
||||||
>
|
>
|
||||||
<span>{{ $t("files.lastModified") }}</span>
|
<span>{{ $t("files.lastModified") }}</span>
|
||||||
<i class="material-icons">{{ modifiedIcon }}</i>
|
<i class="material-icons">{{ modifiedIcon }}</i>
|
||||||
@ -195,15 +186,15 @@
|
|||||||
<h2 v-if="req.numDirs > 0">{{ $t("files.folders") }}</h2>
|
<h2 v-if="req.numDirs > 0">{{ $t("files.folders") }}</h2>
|
||||||
<div v-if="req.numDirs > 0">
|
<div v-if="req.numDirs > 0">
|
||||||
<item
|
<item
|
||||||
v-for="item in dirs"
|
v-for="item in dirs"
|
||||||
:key="base64(item.name)"
|
:key="base64(item.name)"
|
||||||
v-bind:index="item.index"
|
v-bind:index="item.index"
|
||||||
v-bind:name="item.name"
|
v-bind:name="item.name"
|
||||||
v-bind:isDir="item.isDir"
|
v-bind:isDir="item.isDir"
|
||||||
v-bind:url="item.url"
|
v-bind:url="item.url"
|
||||||
v-bind:modified="item.modified"
|
v-bind:modified="item.modified"
|
||||||
v-bind:type="item.type"
|
v-bind:type="item.type"
|
||||||
v-bind:size="item.size"
|
v-bind:size="item.size"
|
||||||
>
|
>
|
||||||
</item>
|
</item>
|
||||||
</div>
|
</div>
|
||||||
@ -211,44 +202,45 @@
|
|||||||
<h2 v-if="req.numFiles > 0">{{ $t("files.files") }}</h2>
|
<h2 v-if="req.numFiles > 0">{{ $t("files.files") }}</h2>
|
||||||
<div v-if="req.numFiles > 0">
|
<div v-if="req.numFiles > 0">
|
||||||
<item
|
<item
|
||||||
v-for="item in files"
|
v-for="item in files"
|
||||||
:key="base64(item.name)"
|
:key="base64(item.name)"
|
||||||
v-bind:index="item.index"
|
v-bind:index="item.index"
|
||||||
v-bind:name="item.name"
|
v-bind:name="item.name"
|
||||||
v-bind:isDir="item.isDir"
|
v-bind:isDir="item.isDir"
|
||||||
v-bind:url="item.url"
|
v-bind:url="item.url"
|
||||||
v-bind:modified="item.modified"
|
v-bind:modified="item.modified"
|
||||||
v-bind:type="item.type"
|
v-bind:type="item.type"
|
||||||
v-bind:size="item.size"
|
v-bind:size="item.size"
|
||||||
>
|
>
|
||||||
</item>
|
</item>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<input
|
<input
|
||||||
style="display: none"
|
style="display: none"
|
||||||
type="file"
|
type="file"
|
||||||
id="upload-input"
|
id="upload-input"
|
||||||
@change="uploadInput($event)"
|
accept=".yml"
|
||||||
multiple
|
@change="uploadInput($event)"
|
||||||
|
multiple
|
||||||
/>
|
/>
|
||||||
<input
|
<input
|
||||||
style="display: none"
|
style="display: none"
|
||||||
type="file"
|
type="file"
|
||||||
id="upload-folder-input"
|
id="upload-folder-input"
|
||||||
@change="uploadInput($event)"
|
@change="uploadInput($event)"
|
||||||
webkitdirectory
|
webkitdirectory
|
||||||
multiple
|
multiple
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div :class="{ active: $store.state.multiple }" id="multiple-selection">
|
<div :class="{ active: $store.state.multiple }" id="multiple-selection">
|
||||||
<p>{{ $t("files.multipleSelectionEnabled") }}</p>
|
<p>{{ $t("files.multipleSelectionEnabled") }}</p>
|
||||||
<div
|
<div
|
||||||
@click="$store.commit('multiple', false)"
|
@click="$store.commit('multiple', false)"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
role="button"
|
role="button"
|
||||||
:title="$t('files.clear')"
|
:title="$t('files.clear')"
|
||||||
:aria-label="$t('files.clear')"
|
:aria-label="$t('files.clear')"
|
||||||
class="action"
|
class="action"
|
||||||
>
|
>
|
||||||
<i class="material-icons">clear</i>
|
<i class="material-icons">clear</i>
|
||||||
</div>
|
</div>
|
||||||
@ -260,9 +252,9 @@
|
|||||||
|
|
||||||
<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";
|
||||||
import throttle from "lodash.throttle";
|
import throttle from "lodash.throttle";
|
||||||
@ -323,7 +315,7 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return { dirs, files };
|
return {dirs, files};
|
||||||
},
|
},
|
||||||
dirs() {
|
dirs() {
|
||||||
return this.items.dirs.slice(0, this.showLimit);
|
return this.items.dirs.slice(0, this.showLimit);
|
||||||
@ -528,10 +520,10 @@ export default {
|
|||||||
|
|
||||||
for (let item of this.$store.state.clipboard.items) {
|
for (let item of this.$store.state.clipboard.items) {
|
||||||
const from = item.from.endsWith("/")
|
const from = item.from.endsWith("/")
|
||||||
? item.from.slice(0, -1)
|
? item.from.slice(0, -1)
|
||||||
: item.from;
|
: item.from;
|
||||||
const to = this.$route.path + encodeURIComponent(item.name);
|
const to = this.$route.path + encodeURIComponent(item.name);
|
||||||
items.push({ from, to, name: item.name });
|
items.push({from, to, name: item.name});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (items.length === 0) {
|
if (items.length === 0) {
|
||||||
@ -540,22 +532,22 @@ export default {
|
|||||||
|
|
||||||
let action = (overwrite, rename) => {
|
let action = (overwrite, rename) => {
|
||||||
api
|
api
|
||||||
.copy(items, overwrite, rename)
|
.copy(items, overwrite, rename)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.$store.commit("setReload", true);
|
this.$store.commit("setReload", true);
|
||||||
})
|
})
|
||||||
.catch(this.$showError);
|
.catch(this.$showError);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.$store.state.clipboard.key === "x") {
|
if (this.$store.state.clipboard.key === "x") {
|
||||||
action = (overwrite, rename) => {
|
action = (overwrite, rename) => {
|
||||||
api
|
api
|
||||||
.move(items, overwrite, rename)
|
.move(items, overwrite, rename)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.$store.commit("resetClipboard");
|
this.$store.commit("resetClipboard");
|
||||||
this.$store.commit("setReload", true);
|
this.$store.commit("setReload", true);
|
||||||
})
|
})
|
||||||
.catch(this.$showError);
|
.catch(this.$showError);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -591,7 +583,7 @@ export default {
|
|||||||
colunmsResize() {
|
colunmsResize() {
|
||||||
// Update the columns size based on the window width.
|
// Update the columns size based on the window width.
|
||||||
let columns = Math.floor(
|
let columns = Math.floor(
|
||||||
document.querySelector("main").offsetWidth / 300
|
document.querySelector("main").offsetWidth / 300
|
||||||
);
|
);
|
||||||
let items = css(["#listing.mosaic .item", ".mosaic#listing .item"]);
|
let items = css(["#listing.mosaic .item", ".mosaic#listing .item"]);
|
||||||
if (columns === 0) columns = 1;
|
if (columns === 0) columns = 1;
|
||||||
@ -611,7 +603,7 @@ export default {
|
|||||||
if (currentPos > triggerPos) {
|
if (currentPos > triggerPos) {
|
||||||
// Quantity of items needed to fill 2x of the window height
|
// Quantity of items needed to fill 2x of the window height
|
||||||
const showQuantity = Math.ceil(
|
const showQuantity = Math.ceil(
|
||||||
(window.innerHeight * 2) / this.itemWeight
|
(window.innerHeight * 2) / this.itemWeight
|
||||||
);
|
);
|
||||||
|
|
||||||
// Increase the number of displayed items
|
// Increase the number of displayed items
|
||||||
@ -655,13 +647,13 @@ export default {
|
|||||||
let files = await upload.scanFiles(dt);
|
let files = await upload.scanFiles(dt);
|
||||||
let items = this.req.items;
|
let items = this.req.items;
|
||||||
let path = this.$route.path.endsWith("/")
|
let path = this.$route.path.endsWith("/")
|
||||||
? this.$route.path
|
? this.$route.path
|
||||||
: this.$route.path + "/";
|
: this.$route.path + "/";
|
||||||
|
|
||||||
if (
|
if (
|
||||||
el !== null &&
|
el !== null &&
|
||||||
el.classList.contains("item") &&
|
el.classList.contains("item") &&
|
||||||
el.dataset.dir === "true"
|
el.dataset.dir === "true"
|
||||||
) {
|
) {
|
||||||
// Get url from ListingItem instance
|
// Get url from ListingItem instance
|
||||||
path = el.__vue__.url;
|
path = el.__vue__.url;
|
||||||
@ -695,8 +687,8 @@ export default {
|
|||||||
|
|
||||||
let files = event.currentTarget.files;
|
let files = event.currentTarget.files;
|
||||||
let folder_upload =
|
let folder_upload =
|
||||||
files[0].webkitRelativePath !== undefined &&
|
files[0].webkitRelativePath !== undefined &&
|
||||||
files[0].webkitRelativePath !== "";
|
files[0].webkitRelativePath !== "";
|
||||||
|
|
||||||
if (folder_upload) {
|
if (folder_upload) {
|
||||||
for (let i = 0; i < files.length; i++) {
|
for (let i = 0; i < files.length; i++) {
|
||||||
@ -706,8 +698,8 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let path = this.$route.path.endsWith("/")
|
let path = this.$route.path.endsWith("/")
|
||||||
? this.$route.path
|
? this.$route.path
|
||||||
: this.$route.path + "/";
|
: this.$route.path + "/";
|
||||||
let conflict = upload.checkConflict(files, this.req.items);
|
let conflict = upload.checkConflict(files, this.req.items);
|
||||||
|
|
||||||
if (conflict) {
|
if (conflict) {
|
||||||
@ -750,7 +742,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await users.update({ id: this.user.id, sorting: { by, asc } }, [
|
await users.update({id: this.user.id, sorting: {by, asc}}, [
|
||||||
"sorting",
|
"sorting",
|
||||||
]);
|
]);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@ -822,8 +814,8 @@ export default {
|
|||||||
},
|
},
|
||||||
upload: function () {
|
upload: function () {
|
||||||
if (
|
if (
|
||||||
typeof window.DataTransferItem !== "undefined" &&
|
typeof window.DataTransferItem !== "undefined" &&
|
||||||
typeof DataTransferItem.prototype.webkitGetAsEntry !== "undefined"
|
typeof DataTransferItem.prototype.webkitGetAsEntry !== "undefined"
|
||||||
) {
|
) {
|
||||||
this.$store.commit("showHover", "upload");
|
this.$store.commit("showHover", "upload");
|
||||||
} else {
|
} else {
|
||||||
@ -850,7 +842,7 @@ export default {
|
|||||||
|
|
||||||
// Quantity of items needed to fill 2x of the window height
|
// Quantity of items needed to fill 2x of the window height
|
||||||
const showQuantity = Math.ceil(
|
const showQuantity = Math.ceil(
|
||||||
(windowHeight + windowHeight * 2) / this.itemWeight
|
(windowHeight + windowHeight * 2) / this.itemWeight
|
||||||
);
|
);
|
||||||
|
|
||||||
// Less items to display than current
|
// Less items to display than current
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user