Commit d7679e32 authored by Luciano Pacheco's avatar Luciano Pacheco Committed by Commit Bot

Files app & Camera: Add custom icon for Camera folder

Fixed: 1147301
Change-Id: I760e289145fb7cf58372b9b4792e0233a8979def
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2532019
Commit-Queue: Luciano Pacheco <lucmult@chromium.org>
Auto-Submit: Luciano Pacheco <lucmult@chromium.org>
Reviewed-by: default avatarNoel Gordon <noel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#826583}
parent 222c347c
...@@ -651,6 +651,7 @@ FileType.getIconOverrides = (entry, opt_rootType) => { ...@@ -651,6 +651,7 @@ FileType.getIconOverrides = (entry, opt_rootType) => {
// Overrides per RootType and defined by fullPath. // Overrides per RootType and defined by fullPath.
const overrides = { const overrides = {
[VolumeManagerCommon.RootType.DOWNLOADS]: { [VolumeManagerCommon.RootType.DOWNLOADS]: {
'/Camera': 'camera-folder',
'/Downloads': VolumeManagerCommon.VolumeType.DOWNLOADS, '/Downloads': VolumeManagerCommon.VolumeType.DOWNLOADS,
'/PvmDefault': 'plugin_vm', '/PvmDefault': 'plugin_vm',
}, },
......
...@@ -489,6 +489,16 @@ body.files-ng [file-type-icon='downloads'] { ...@@ -489,6 +489,16 @@ body.files-ng [file-type-icon='downloads'] {
background-image: none; background-image: none;
} }
[file-type-icon='camera-folder'] {
-webkit-mask-image: url(../images/filetype/filetype_folder.svg);
background-color: currentColor;
background-image: none;
}
body.camera-folder-enabled [file-type-icon='camera-folder'] {
-webkit-mask-image: url(../images/volumes/camera.svg);
}
[volume-type-icon='drive'] { [volume-type-icon='drive'] {
background-image: -webkit-image-set( background-image: -webkit-image-set(
url(../images/volumes/drive.png) 1x, url(../images/volumes/drive.png) 1x,
......
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 3H8L6 5H3a1 1 0 00-1 1v10a1 1 0 001 1h14a1 1 0 001-1V6a1 1 0 00-1-1h-3l-2-2zM4 7h12v8H4V7z" fill="#5F6368"/>
<path d="M13 11a3 3 0 11-6 0 3 3 0 016 0z" fill="#5F6368"/>
</svg>
...@@ -794,6 +794,10 @@ class FileManager extends cr.EventTarget { ...@@ -794,6 +794,10 @@ class FileManager extends cr.EventTarget {
this.document_.documentElement.classList.remove('files-ng'); this.document_.documentElement.classList.remove('files-ng');
this.dialogDom_.classList.remove('files-ng'); this.dialogDom_.classList.remove('files-ng');
} }
this.dialogDom_.classList.toggle(
'camera-folder-enabled', util.isFilesCameraFolderEnabled());
this.initEssentialUI_(); this.initEssentialUI_();
this.initAdditionalUI_(); this.initAdditionalUI_();
await this.initSettingsPromise_; await this.initSettingsPromise_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment