Skip to content

Commit 90fae1d

Browse files
committed
Merge branch 'release/2.1.0'
2 parents 37573cb + 707cba2 commit 90fae1d

File tree

11 files changed

+130
-106
lines changed

11 files changed

+130
-106
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.0.6",
3+
"version": "2.1.0",
44
"description": "File manager for Laravel",
55
"keywords": [
66
"laravel",

src/components/manager/GridView.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
v-on:dblclick.stop="selectDirectory(directory.path)"
1818
v-on:contextmenu.prevent="contextMenu(directory, $event)">
1919
<div class="fm-item-icon">
20-
<i class="far fa-folder fa-5x pb-2"></i>
20+
<i class="fa-5x pb-2"
21+
v-bind:class="(acl && directory.acl === 0) ? 'fas fa-unlock-alt' : 'far fa-folder'"></i>
2122
</div>
2223
<div class="fm-item-info">{{ directory.basename }}</div>
2324
</div>
@@ -31,7 +32,10 @@
3132
v-on:dblclick="selectAction(file.path, file.extension)"
3233
v-on:contextmenu.prevent="contextMenu(file, $event)">
3334
<div class="fm-item-icon">
34-
<template v-if="thisImage(file.extension)">
35+
<template v-if="acl && file.acl === 0">
36+
<i class="fas fa-unlock-alt fa-5x pb-2"></i>
37+
</template>
38+
<template v-else-if="thisImage(file.extension)">
3539
<img class="img-thumbnail"
3640
v-bind:alt="file.filename"
3741
v-bind:src="createImgUrl(file.path)">

src/components/manager/TableView.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
v-on:click="selectItem('directories', directory.path, $event)"
5454
v-on:contextmenu.prevent="contextMenu(directory, $event)">
5555
<td class="fm-content-item unselectable"
56+
v-bind:class="(acl && directory.acl === 0) ? 'text-hidden' : ''"
5657
v-on:dblclick="selectDirectory(directory.path)">
5758
<i class="far fa-folder"></i> {{ directory.basename }}
5859
</td>
@@ -68,7 +69,8 @@
6869
v-on:click="selectItem('files', file.path, $event)"
6970
v-on:dblclick="selectAction(file.path, file.extension)"
7071
v-on:contextmenu.prevent="contextMenu(file, $event)">
71-
<td class="fm-content-item unselectable">
72+
<td class="fm-content-item unselectable"
73+
v-bind:class="(acl && file.acl === 0) ? 'text-hidden' : ''">
7274
<i class="far"
7375
v-bind:class="extensionToIcon(file.extension)"></i>
7476
{{ file.filename ? file.filename : file.basename }}
@@ -158,5 +160,9 @@ export default {
158160
.fm-content-item {
159161
cursor: pointer;
160162
}
163+
164+
.text-hidden {
165+
color: #cdcdcd;
166+
}
161167
}
162168
</style>

src/components/manager/mixins/manager.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ export default {
4242
selected() {
4343
return this.$store.state.fm[this.manager].selected;
4444
},
45+
46+
/**
47+
* ACL On/Off
48+
*/
49+
acl() {
50+
return this.$store.state.fm.settings.acl;
51+
},
4552
},
4653
methods: {
4754
/**

src/components/modals/views/Properties.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
<dt class="col-3">{{ lang.modal.properties.modified }}:</dt>
2727
<dd class="col-9">{{ timestampToDate(selectedItem.timestamp) }}</dd>
2828
</template>
29+
30+
<template v-if="selectedItem.hasOwnProperty('acl')">
31+
<dt class="col-3">{{ lang.modal.properties.access }}:</dt>
32+
<dd class="col-9">{{ lang.modal.properties['access_' + selectedItem.acl] }}</dd>
33+
</template>
2934
</dl>
3035
</div>
3136
</div>

src/lang/ar.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ const ar = {
9797
size: 'حجم',
9898
title: 'خصائص',
9999
type: 'نوع',
100+
access: 'Access',
101+
access_0: 'Access denied',
102+
access_1: 'Only Read',
103+
access_2: 'Read and Write',
100104
},
101105
rename: {
102106
directoryExist: 'المجلد موجود',

src/lang/en.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ const en = {
9797
size: 'Size',
9898
title: 'Properties',
9999
type: 'Type',
100+
access: 'Access',
101+
access_0: 'Access denied',
102+
access_1: 'Only Read',
103+
access_2: 'Read and Write',
100104
},
101105
rename: {
102106
directoryExist: 'Directory exists',

src/lang/ru.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ const ru = {
9797
size: 'Размер',
9898
title: 'Свойства',
9999
type: 'Тип',
100+
access: 'Доступ',
101+
access_0: 'Нет доступа',
102+
access_1: 'Только чтение',
103+
access_2: 'Чтение и Запись',
100104
},
101105
rename: {
102106
directoryExist: 'Папка существует',

src/store/settings/mutations.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,6 @@ export default {
6363
initSettings(state, data) {
6464
if (!state.lang) state.lang = data.lang;
6565
if (!state.windowsConfig) state.windowsConfig = data.windowsConfig;
66+
state.acl = data.acl;
6667
},
6768
};

src/store/settings/store.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@ export default {
1010
namespaced: true,
1111
state() {
1212
return {
13+
// ACL
14+
acl: null,
15+
1316
// App version
14-
version: '2.0.6',
17+
version: '2.1.0',
1518

1619
// this headers will be merged with default headers
1720
headers: {},

0 commit comments

Comments
 (0)