Browse Source

Show Delete Icon in Breadcrumb in Trashbin

Signed-off-by: Gary Kim <gary@garykim.dev>
Gary Kim 4 years ago
parent
commit
11d01319c6

+ 3 - 2
apps/files/js/breadcrumb.js

@@ -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 it is too large
+ 0 - 0
apps/files_trashbin/js/files_trashbin.js


File diff suppressed because it is too large
+ 0 - 0
apps/files_trashbin/js/files_trashbin.js.map


+ 1 - 1
apps/files_trashbin/src/filelist.js

@@ -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)
 					}

+ 2 - 1
core/css/icons.scss

@@ -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);

+ 2 - 1
core/css/styles.scss

@@ -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;
 		}

Some files were not shown because too many files changed in this diff