chmod view simplified, changelog updated

This commit is contained in:
Milos Stojanovic 2024-12-24 08:50:25 +01:00
parent f6ef36e546
commit 52859b6137
2 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,7 @@
# Changelog
## Upcoming...
* Added a column to display chmod permissions (see #522)
## 7.12.0 - 2024-12-13
* Dependency updates (see #506)

View File

@ -100,7 +100,7 @@
</a>
</b-table-column>
<b-table-column v-if="can(['write', 'chmod'])" :label="lang('Permissions')" field="data.permissions" sortable width="170">
<b-table-column v-if="can(['write', 'chmod'])" :label="lang('Permissions')" field="data.permissions" sortable width="130">
<span @click="togglePermissionsView" :title="showSymbolic ? lang('Hide symbolic format') : lang('Show symbolic format')" style="font-family: monospace;cursor: pointer;">
{{ formatPermissions(props.row.permissions, props.row.type) }}
</span>
@ -262,11 +262,11 @@ export default {
this.showSymbolic = !this.showSymbolic
},
formatPermissions(permissions, type) {
if (permissions === -1) return this.lang('N/A')
if (permissions === -1) return
const numeric = permissions.toString()
if (this.showSymbolic) {
const symbolic = this.convertToSymbolic(permissions, type)
return `${numeric} [${symbolic}]`
return `[${symbolic}]`
}
return numeric
},