Skip to content

Commit de26565

Browse files
committed
Merge branch 'release/v2.4.7'
2 parents 1263867 + b3077a4 commit de26565

33 files changed

+1063
-885
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "laravel-file-manager",
3-
"version": "2.4.6",
3+
"version": "2.4.7",
44
"description": "File manager for Laravel",
55
"keywords": [
66
"laravel",

public/index.html

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@
66
<meta name="viewport" content="width=device-width,initial-scale=1.0">
77
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
88
<title>new-file-manager</title>
9-
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
10-
integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
11-
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.4.1/css/all.css"
12-
integrity="sha384-5sAR7xN1Nv6T6+dT2mhtzEpVJvfS3NScPQTrOxhwjIuvcA67KV2R5Jz6kr4abQsz" crossorigin="anonymous">
9+
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
10+
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.11.2/css/all.css">
1311
</head>
1412
<body>
1513
<noscript>
16-
<strong>We're sorry but file-manager doesn't work properly without JavaScript enabled. Please enable it to
17-
continue.</strong>
14+
<strong>
15+
We're sorry but file-manager doesn't work properly without JavaScript enabled. Please enable it to continue.
16+
</strong>
1817
</noscript>
1918
<div class="container">
2019
<div style="height: 800px;">

src/components/blocks/Navbar.vue

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@
7171
<i class="fas fa-paste"></i>
7272
</button>
7373
</div>
74+
<div class="btn-group" role="group">
75+
<button type="button" class="btn btn-secondary"
76+
v-bind:title="lang.btn.hidden"
77+
v-on:click="toggleHidden">
78+
<i class="fas" v-bind:class="[hiddenFiles ? 'fa-eye': 'fa-eye-slash']"></i>
79+
</button>
80+
</div>
7481
</div>
7582
<div class="col-auto text-right">
7683
<div class="btn-group" role="group">
@@ -179,6 +186,14 @@ export default {
179186
fullScreen() {
180187
return this.$store.state.fm.fullScreen;
181188
},
189+
190+
/**
191+
* Show or Hide hidden files
192+
* @returns {boolean}
193+
*/
194+
hiddenFiles() {
195+
return this.$store.state.fm.settings.hiddenFiles;
196+
},
182197
},
183198
methods: {
184199
/**
@@ -230,6 +245,13 @@ export default {
230245
this.$store.dispatch('fm/paste');
231246
},
232247
248+
/**
249+
* Set Hide or Show hidden files
250+
*/
251+
toggleHidden() {
252+
this.$store.commit('fm/settings/toggleHiddenFiles');
253+
},
254+
233255
/**
234256
* Show modal window
235257
* @param modalName

src/components/manager/mixins/manager.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ export default {
2424
* @returns {*}
2525
*/
2626
files() {
27-
return this.$store.state.fm[this.manager].files;
27+
return this.$store.getters[`fm/${this.manager}/files`];
2828
},
2929

3030
/**
3131
* Directories list for selected directory
3232
* @returns {*}
3333
*/
3434
directories() {
35-
return this.$store.state.fm[this.manager].directories;
35+
return this.$store.getters[`fm/${this.manager}/directories`];
3636
},
3737

3838
/**

src/components/modals/additions/Cropper.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
</button>
123123
</div>
124124
<span class="d-block">
125-
<button v-on:click="$emit('closeCropper')" class="btn btn-default">{{ lang.btn.back }}</button>
125+
<button v-on:click="$emit('closeCropper')" class="btn btn-light">{{ lang.btn.back }}</button>
126126
</span>
127127
</div>
128128
</div>

src/components/modals/views/Clipboard.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
v-bind:disabled="!clipboard.type"
6565
v-on:click="resetClipboard">{{ lang.btn.clear }}
6666
</button>
67-
<button class="btn btn-default" v-on:click="hideModal">{{ lang.btn.cancel }}</button>
67+
<button class="btn btn-light" v-on:click="hideModal">{{ lang.btn.cancel }}</button>
6868
</div>
6969
</div>
7070
</template>

src/components/modals/views/Delete.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<div class="modal-footer">
1818
<button class="btn btn-danger" v-on:click="deleteItems">{{ lang.modal.delete.title }}
1919
</button>
20-
<button class="btn btn-default" v-on:click="hideModal">{{ lang.btn.cancel }}</button>
20+
<button class="btn btn-light" v-on:click="hideModal">{{ lang.btn.cancel }}</button>
2121
</div>
2222
</div>
2323
</template>

src/components/modals/views/NewFile.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
v-bind:disabled="!submitActive"
2525
v-on:click="addFile">{{ lang.btn.submit }}
2626
</button>
27-
<button class="btn btn-default" v-on:click="hideModal">{{ lang.btn.cancel }}</button>
27+
<button class="btn btn-light" v-on:click="hideModal">{{ lang.btn.cancel }}</button>
2828
</div>
2929
</div>
3030
</template>

src/components/modals/views/NewFolder.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
v-bind:disabled="!submitActive"
2525
v-on:click="addFolder">{{ lang.btn.submit }}
2626
</button>
27-
<button class="btn btn-default" v-on:click="hideModal">{{ lang.btn.cancel }}</button>
27+
<button class="btn btn-light" v-on:click="hideModal">{{ lang.btn.cancel }}</button>
2828
</div>
2929
</div>
3030
</template>

src/components/modals/views/Preview.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
</button>
3232
</span>
3333
<span class="d-block">
34-
<button class="btn btn-default" v-on:click="hideModal">{{ lang.btn.cancel }}</button>
34+
<button class="btn btn-light" v-on:click="hideModal">{{ lang.btn.cancel }}</button>
3535
</span>
3636
</div>
3737
</div>

src/components/modals/views/Rename.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
v-bind:disabled="submitDisable"
2727
v-on:click="rename">{{ lang.btn.submit }}
2828
</button>
29-
<button class="btn btn-default" v-on:click="hideModal">{{ lang.btn.cancel }}</button>
29+
<button class="btn btn-light" v-on:click="hideModal">{{ lang.btn.cancel }}</button>
3030
</div>
3131
</div>
3232
</template>

src/components/modals/views/Status.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<button class="btn btn-danger"
2323
v-bind:disabled="!errors.length"
2424
v-on:click="clearErrors">{{ lang.btn.clear }}</button>
25-
<button class="btn btn-default" v-on:click="hideModal">{{ lang.btn.cancel }}</button>
25+
<button class="btn btn-light" v-on:click="hideModal">{{ lang.btn.cancel }}</button>
2626
</div>
2727
</div>
2828
</template>

src/components/modals/views/TextEdit.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<button class="btn btn-info"
1616
v-on:click="updateFile">{{ lang.btn.submit }}
1717
</button>
18-
<button class="btn btn-default" v-on:click="hideModal">{{ lang.btn.cancel }}</button>
18+
<button class="btn btn-light" v-on:click="hideModal">{{ lang.btn.cancel }}</button>
1919
</div>
2020
</div>
2121
</template>
@@ -60,7 +60,12 @@ export default {
6060
path: this.selectedItem.path,
6161
}).then((response) => {
6262
// add code
63-
this.code = response.data;
63+
if (this.selectedItem.extension === 'json') {
64+
this.code = JSON.stringify(response.data, null, 4);
65+
} else {
66+
this.code = response.data;
67+
}
68+
6469
// set size
6570
this.$refs.fmCodeEditor.codemirror.setSize(null, this.editorHeight);
6671
});

src/components/modals/views/Unzip.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
v-bind:disabled="!submitActive"
5656
v-on:click="unpackArchive">{{ lang.btn.submit }}
5757
</button>
58-
<button class="btn btn-default" v-on:click="hideModal">{{ lang.btn.cancel }}</button>
58+
<button class="btn btn-light" v-on:click="hideModal">{{ lang.btn.cancel }}</button>
5959
</div>
6060
</div>
6161
</template>

src/components/modals/views/Upload.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@
8484
</div>
8585
<div class="modal-footer">
8686
<button class="btn"
87-
v-bind:class="[countFiles ? 'btn-info' : 'btn-default']"
87+
v-bind:class="[countFiles ? 'btn-info' : 'btn-light']"
8888
v-bind:disabled="!countFiles"
8989
v-on:click="uploadFiles">{{ lang.btn.submit }}
9090
</button>
91-
<button class="btn btn-default" v-on:click="hideModal()">{{ lang.btn.cancel }}</button>
91+
<button class="btn btn-light" v-on:click="hideModal()">{{ lang.btn.cancel }}</button>
9292
</div>
9393
</div>
9494
</template>

src/components/modals/views/Zip.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
v-bind:disabled="!submitActive"
3030
v-on:click="createArchive">{{ lang.btn.submit }}
3131
</button>
32-
<button class="btn btn-default" v-on:click="hideModal">{{ lang.btn.cancel }}</button>
32+
<button class="btn btn-light" v-on:click="hideModal">{{ lang.btn.cancel }}</button>
3333
</div>
3434
</div>
3535
</template>

src/components/tree/Branch.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export default {
4040
* @returns {*}
4141
*/
4242
subDirectories() {
43-
return this.$store.state.fm.tree.directories.filter(item => item.parentId === this.parentId);
43+
return this.$store.getters['fm/tree/directories'].filter(item => item.parentId === this.parentId);
4444
},
4545
},
4646
methods: {

src/lang/ar.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const ar = {
2323
table: 'جدول',
2424
upload: 'رفع',
2525
uploadSelect: 'اختر الملفات',
26+
hidden: 'الملفات المخفية',
2627
},
2728
clipboard: {
2829
actionType: 'نوع',

src/lang/cs.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const cs = {
2424
table: 'Tabulka',
2525
upload: 'Nahrát',
2626
uploadSelect: 'Vybrat soubory',
27+
hidden: ' Skryté soubory',
2728
},
2829
clipboard: {
2930
actionType: 'Typ',

src/lang/de.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const de = {
2323
table: 'Detailansicht',
2424
upload: 'Hochladen',
2525
uploadSelect: 'Auswählen',
26+
hidden: ' Versteckte Dateien',
2627
},
2728
clipboard: {
2829
actionType: 'Type',

src/lang/en.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const en = {
2323
table: 'Table',
2424
upload: 'Upload',
2525
uploadSelect: 'Select files',
26+
hidden: ' Hidden files',
2627
},
2728
clipboard: {
2829
actionType: 'Type',

src/lang/es.js

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const es = {
2424
table: 'Tabla',
2525
upload: 'Subir',
2626
uploadSelect: 'Seleccionar archivos',
27+
hidden: ' Archivos ocultos',
2728
},
2829
clipboard: {
2930
actionType: 'Tipo',
@@ -160,31 +161,31 @@ const es = {
160161
},
161162
// todo - need to translate
162163
response: {
163-
noConfig: 'Config not found!',
164-
notFound: 'Not found!',
165-
diskNotFound: 'Disk not found!',
166-
pathNotFound: 'Path not found!',
167-
diskSelected: 'Disk selected!',
164+
noConfig: 'Configuración no encontrada!',
165+
notFound: 'Extraviado!',
166+
diskNotFound: 'Disco no encontrado!',
167+
pathNotFound: 'Camino no encontrado!',
168+
diskSelected: 'Disco seleccionado!',
168169
// files
169-
fileExist: 'File already exists!',
170-
fileCreated: 'File created!',
171-
fileUpdated: 'File updated!',
172-
fileNotFound: 'File not found!',
170+
fileExist: 'El archivo ya existe!',
171+
fileCreated: 'Archivo creado!',
172+
fileUpdated: 'Archivo actualizado!',
173+
fileNotFound: 'Archivo no encontrado!',
173174
// directories
174-
dirExist: 'Directory already exists!',
175-
dirCreated: 'Directory created!',
176-
dirNotFound: 'Directory not found',
175+
dirExist: 'El directorio ya existe!',
176+
dirCreated: 'Directorio creado!',
177+
dirNotFound: 'Directorio no encontrado',
177178
// actions
178-
uploaded: 'All files uploaded!',
179-
notAllUploaded: 'Some files weren\'t uploaded!',
180-
delNotFound: 'Some items weren\'t founded!',
181-
deleted: 'Deleted!',
182-
renamed: 'Renamed!',
183-
copied: 'Copied successfully!',
179+
uploaded: 'Todos los archivos cargados!',
180+
notAllUploaded: 'Algunos archivos no fueron subidos!',
181+
delNotFound: 'Algunos artículos no fueron encontrados!',
182+
deleted: 'Eliminado!',
183+
renamed: 'Renombrado!',
184+
copied: 'Copiado exitosamente!',
184185
// zip
185-
zipError: 'Error creating archive!',
186+
zipError: 'Error al crear archivo!',
186187
// acl
187-
aclError: 'Access denied!',
188+
aclError: 'Acceso denegado!',
188189
},
189190
};
190191

src/lang/nl.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const nl = {
2525
table: 'Table',
2626
upload: 'Upload',
2727
uploadSelect: 'Select files',
28+
hidden: ' Verborgen bestanden',
2829
},
2930
clipboard: {
3031
actionType: 'Type',

src/lang/ru.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const ru = {
2323
table: 'Таблица',
2424
upload: 'Загрузить',
2525
uploadSelect: 'Выбрать файлы',
26+
hidden: 'Скрытые файлы',
2627
},
2728
clipboard: {
2829
actionType: 'Тип операции',

src/lang/sr.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const sr = {
2424
table: 'Tabela',
2525
upload: 'Upload',
2626
uploadSelect: 'Izaberi datoteke',
27+
hidden: ' Skrivene datoteke',
2728
},
2829
clipboard: {
2930
actionType: 'Tip operacije',

src/lang/zh_CN.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const zh_CN = {
2525
table: '表格',
2626
upload: '上传',
2727
uploadSelect: '选择文件',
28+
hidden: ' 隐藏文件',
2829
},
2930
clipboard: {
3031
actionType: '类型',

src/mixins/helper.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,12 @@ export default {
139139

140140
// text
141141
txt: 'fa-file-alt',
142+
json: 'fa-file-alt',
143+
log: 'fa-file-alt',
144+
ini: 'fa-file-alt',
145+
xml: 'fa-file-alt',
146+
md: 'fa-file-alt',
147+
env: 'fa-file-alt',
142148

143149
// code
144150
js: 'fa-file-code',

0 commit comments

Comments
 (0)