Skip to content

Commit

Permalink
Display mount information in metadata
Browse files Browse the repository at this point in the history
Resolves #72
  • Loading branch information
pixtron committed Apr 26, 2019
1 parent 35112c6 commit 9c69e43
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 3 deletions.
7 changes: 7 additions & 0 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,13 @@ <h6 data-i18n="view.share.access_rights"></h6>
<span class="fs-value"></span>
</td>
</tr>
<tr class="fs-searchable">
<th data-i18n="view.prop.head.mount"></th>
<td id="fs-metadata-mount">
<svg class="gr-icon gr-i-folder-storage" viewBox="0 0 24 24"><use xlink:href="<%= iconsSvg %>#folder-storage"></use></svg>
<span class="fs-value"></span>
</td>
</tr>
</tbody>

<tbody>
Expand Down
10 changes: 10 additions & 0 deletions src/lib/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -7720,6 +7720,15 @@ var balloon = {
var iconId = node.shareowner.name == login.username ? 'folder-shared' : 'folder-received';
$icon.replaceWith('<svg class="gr-icon gr-i-' + iconId + '" viewBox="0 0 24 24"><use xlink:href="'+iconsSvg+'#' + iconId + '"></use></svg>');
}
break;
case 'mount':
var $fs_metadata_mount = $('#fs-metadata-mount');

value = i18next.t('view.prop.head.mount_value', node.mount.share, node.mount.username, node.mount.adapter, node.mount.host, node.mount.workgroup);

$field = $fs_metadata_mount.find('.fs-value');
$fs_metadata_mount.parent().show();

break;
default:
if($field.length != 0 && prop !== 'access' && prop != 'shareowner') {
Expand Down Expand Up @@ -8415,6 +8424,7 @@ var balloon = {
$(".fs-metadata-fileonly").hide();
$("#fs-metadata-node").hide();
$('#fs-metadata-share').parent().hide();
$('#fs-metadata-mount').parent().hide();
break;

case 'properties':
Expand Down
4 changes: 3 additions & 1 deletion src/locale/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,9 @@
"path": "Pfad",
"coordinate": "Koordinaten",
"author": "Autor",
"perma-link": "Perma Link"
"perma-link": "Perma Link",
"mount": "Externer Speicher",
"mount_value": "%s (%s@%s://%s) [%s]"
},
"data": {
"size": "%s (%s Bytes)",
Expand Down
4 changes: 3 additions & 1 deletion src/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,9 @@
"path": "Path",
"coordinate": "Coordinate",
"author": "Author",
"perma-link": "Permalink"
"perma-link": "Permalink",
"mount": "Mount",
"mount_value": "%s (%s@%s://%s) [%s]"
},
"data": {
"size": "%s (%s Bytes)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
z-index: 1;
}

&#fs-metadata-share {
&#fs-metadata-share,
&#fs-metadata-mount {
@include clearfix;

.fs-value {
Expand Down

0 comments on commit 9c69e43

Please sign in to comment.