Show Delete Icon in Breadcrumb in Trashbin

Signed-off-by: Gary Kim <gary@garykim.dev>
This commit is contained in:
Gary Kim 2019-10-05 15:53:07 +08:00
parent 049628a3f5
commit 11d01319c6
No known key found for this signature in database
GPG Key ID: 9349B59FB54594AC
6 changed files with 10 additions and 7 deletions

View File

@ -200,9 +200,10 @@
* Makes a breadcrumb structure based on the given path
*
* @param {String} dir path to split into a breadcrumb structure
* @param {String} [rootIcon=icon-home] icon to use for root
* @return {Object.<String, String>} map of {dir: path, name: displayName}
*/
_makeCrumbs: function(dir) {
_makeCrumbs: function(dir, rootIcon) {
var crumbs = [];
var pathToHere = '';
// trim leading and trailing slashes
@ -221,7 +222,7 @@
name: t('core', 'Home'),
dir: '/',
class: 'crumbhome',
linkclass: 'icon-home'
linkclass: rootIcon || 'icon-home'
});
for (var i = 0; i < parts.length; i++) {
var part = parts[i];

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -78,7 +78,7 @@
* user friendly name.
*/
this.breadcrumb._makeCrumbs = function() {
var parts = OCA.Files.BreadCrumb.prototype._makeCrumbs.apply(this, arguments)
var parts = OCA.Files.BreadCrumb.prototype._makeCrumbs.apply(this, [...arguments, 'icon-delete no-hover'])
for (var i = 1; i < parts.length; i++) {
parts[i].name = getDeletedFileName(parts[i].name)
}

View File

@ -165,7 +165,8 @@ img, object, video, button, textarea, input, select, div[contenteditable='true']
.icon-delete {
@include icon-color('delete', 'actions', $color-black, 1, true);
&.no-permission {
&.no-permission,
&.no-hover {
&:hover,
&:focus {
@include icon-color('delete', 'actions', $color-black, 1, true);

View File

@ -1197,7 +1197,8 @@ div.crumb {
// Some sane max-width for each folder name
max-width: 200px;
&.icon-home {
&.icon-home,
&.icon-delete {
// Hide home text
text-indent: -9999px;
}