Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Oct 22, 2021. It is now read-only.
/edex-uiPublic archive

Commit39c3f2d

Browse files
author
Mike Stay
authored
fix: missing icons -close#1156 (#1157)
1 parentf0dfdc4 commit39c3f2d

File tree

6 files changed

+550
-45
lines changed

6 files changed

+550
-45
lines changed

‎.gitmodules‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@
1313
[submodule "file-icons/font-awesome"]
1414
path=file-icons/font-awesome
1515
url=https://github.com/FortAwesome/Font-Awesome.git
16+
[submodule "file-icons/bytesize-icons"]
17+
path=file-icons/bytesize-icons
18+
url=git@github.com:danklammer/bytesize-icons.git

‎file-icons-generator.js‎

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ fs.readdirSync(path.join(__dirname, "file-icons", "devopicons", "svg")).forEach(
7979
svg
8080
};
8181
});
82-
// Get file icons from file-icons/devopicons
82+
// Get file icons from file-icons/mfixx
8383
fs.readdirSync(path.join(__dirname,"file-icons","mfixx","svg")).forEach(icon=>{
8484
if(!icon.endsWith(".svg"))return;
8585
leticonName=icon.toLowerCase().replace(".svg","").replace("-1","");
@@ -101,6 +101,28 @@ fs.readdirSync(path.join(__dirname, "file-icons", "mfixx", "svg")).forEach(icon
101101
svg
102102
};
103103
});
104+
// Get file icons from file-icons/bytesize-icons
105+
fs.readdirSync(path.join(__dirname,"file-icons","bytesize-icons","dist","icons")).forEach(icon=>{
106+
if(!icon.endsWith(".svg"))return;
107+
leticonName=icon.toLowerCase().replace(".svg","");
108+
109+
lettext=fs.readFileSync(path.join(__dirname,"file-icons","bytesize-icons","dist","icons",icon),{encoding:"utf8"});
110+
111+
letdimensions=text.match(/viewBox="00(\d+)(\d+)"/);
112+
letwidth=dimensions[1];
113+
letheight=dimensions[2];
114+
115+
letsvg=text.substr(text.indexOf(">")+1);
116+
svg=svg.replace("</svg>","");
117+
118+
if(width===null||height===null)console.log(icon);
119+
120+
fileIconsObject[iconName]={
121+
width,
122+
height,
123+
svg
124+
};
125+
});
104126
// Override with eDEX-specific icons
105127
fileIconsObject.showDisks={
106128
width:24,
@@ -147,6 +169,7 @@ fileIconsObject.usb = {
147169
height:24,
148170
svg:'<path d="M 14.9994,6.99807L 14.9994,10.9981L 15.9994,10.9981L 15.9994,12.9981L 12.9994,12.9981L 12.9994,4.99807L 14.9994,4.99807L 11.9994,0.998068L 8.9994,4.99807L 10.9994,4.99807L 10.9994,12.9981L 7.9994,12.9981L 7.9994,10.9281C 8.7034,10.5611 9.1994,9.84707 9.1994,8.99807C 9.1994,7.78307 8.2144,6.79807 6.9994,6.79807C 5.7844,6.79807 4.7994,7.78307 4.7994,8.99807C 4.7994,9.84707 5.2954,10.5611 5.9994,10.9281L 5.9994,12.9981C 5.9994,14.1031 6.8934,14.9981 7.9994,14.9981L 10.9994,14.9981L 10.9994,18.0491C 10.2894,18.4141 9.7994,19.1451 9.7994,19.9981C 9.7994,21.2131 10.7844,22.1981 11.9994,22.1981C 13.2144,22.1981 14.1994,21.2131 14.1994,19.9981C 14.1994,19.1451 13.7084,18.4141 12.9994,18.0491L 12.9994,14.9981L 15.9994,14.9981C 17.1044,14.9981 17.9994,14.1031 17.9994,12.9981L 17.9994,10.9981L 18.9994,10.9981L 18.9994,6.99807L 14.9994,6.99807 Z"/>'
149171
};
172+
fileIconsObject.audio=fileIconsObject.volume;
150173
// Write the file
151174
fs.writeFileSync(path.join(__dirname,"src","assets","icons","file-icons.json"),JSON.stringify(fileIconsObject,"",4));
152175
console.log("Wrote file-icons.json");

‎file-icons/bytesize-icons‎

Submodulebytesize-icons added at210d2f8

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp