luci-base: replace filebrowser icons with SVG variants
authorJo-Philipp Wich <jo@mein.io>
Thu, 7 May 2020 17:38:50 +0000 (19:38 +0200)
committerJo-Philipp Wich <jo@mein.io>
Thu, 7 May 2020 17:40:50 +0000 (19:40 +0200)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit b34b7fc504ba4ba27dfe7c2c446c3085a923f952)

modules/luci-base/htdocs/luci-static/resources/cbi/file.svg [new file with mode: 0644]
modules/luci-base/htdocs/luci-static/resources/cbi/folder.svg [new file with mode: 0644]
modules/luci-base/htdocs/luci-static/resources/cbi/link.svg [new file with mode: 0644]
modules/luci-base/htdocs/luci-static/resources/ui.js

diff --git a/modules/luci-base/htdocs/luci-static/resources/cbi/file.svg b/modules/luci-base/htdocs/luci-static/resources/cbi/file.svg
new file mode 100644 (file)
index 0000000..9feedcf
--- /dev/null
@@ -0,0 +1,12 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50">
+       <defs>
+               <radialGradient id="a" cx="0" cy="1" r="1">
+                       <stop offset="0" stop-color="#89b"/>
+                       <stop offset="1" stop-color="#def"/>
+               </radialGradient>
+       </defs>
+       <g stroke="#000" stroke-width="2">
+               <path d="M9 2h23l2 1 9 9 1 2v31l-2 1H9l-1-1V4l1-2z" fill="url(#a)"/>
+               <path d="M32 2v11l1 1h11" fill="url(#a)"/>
+       </g>
+</svg>
diff --git a/modules/luci-base/htdocs/luci-static/resources/cbi/folder.svg b/modules/luci-base/htdocs/luci-static/resources/cbi/folder.svg
new file mode 100644 (file)
index 0000000..9a5beca
--- /dev/null
@@ -0,0 +1,12 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50">
+  <defs>
+    <radialGradient id="a" cx="0" cy="0" r="1">
+      <stop offset="0" stop-color="#ddf"/>
+      <stop offset="1" stop-color="#46b"/>
+    </radialGradient>
+  </defs>
+  <g stroke="#024" stroke-width="2">
+    <path d="M44 14l1 2v25l-1 1H4l-1-1V18v0l1-6 1-2h17l2 2v1l1 1z" fill="url(#a)"/>
+    <path d="M3 18h21l1-1v-3" fill="none"/>
+  </g>
+</svg>
diff --git a/modules/luci-base/htdocs/luci-static/resources/cbi/link.svg b/modules/luci-base/htdocs/luci-static/resources/cbi/link.svg
new file mode 100644 (file)
index 0000000..3f556fb
--- /dev/null
@@ -0,0 +1,13 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50">
+       <defs>
+               <radialGradient id="a" cx="0" cy="1" r="1">
+                       <stop offset="0" stop-color="#89b"/>
+                       <stop offset="1" stop-color="#def"/>
+               </radialGradient>
+       </defs>
+       <g stroke="#000" stroke-width="2">
+               <path d="M9 2h23l2 1 9 9 1 2v31l-2 1H9l-1-1V4l1-2z" fill="url(#a)"/>
+               <path d="M32 2v11l1 1h11" fill="url(#a)"/>
+       </g>
+       <path d="M13 33h13v6l12-10-12-11v7H13z" fill="#035"/>
+</svg>
index d860638e96861d7b4487471ac1942e5e4d08fcef..bad415b30b6511bcdbfc212db3f82b2f280e4170 100644 (file)
@@ -2614,21 +2614,24 @@ var UIFileUpload = UIElement.extend(/** @lends LuCI.ui.FileUpload.prototype */ {
                switch (type) {
                case 'symlink':
                        return E('img', {
-                               'src': L.resource('cbi/link.gif'),
+                               'src': L.resource('cbi/link.svg'),
+                               'width': 16,
                                'title': _('Symbolic link'),
                                'class': 'middle'
                        });
 
                case 'directory':
                        return E('img', {
-                               'src': L.resource('cbi/folder.gif'),
+                               'src': L.resource('cbi/folder.svg'),
+                               'width': 16,
                                'title': _('Directory'),
                                'class': 'middle'
                        });
 
                default:
                        return E('img', {
-                               'src': L.resource('cbi/file.gif'),
+                               'src': L.resource('cbi/file.svg'),
+                               'width': 16,
                                'title': _('File'),
                                'class': 'middle'
                        });