register folder icon only when the file app is being loaded

if we do it earlier the theming app might not be setup yet

Fixes #397

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2019-05-07 18:36:48 +02:00
parent 678027e57c
commit 6a334e1faf
2 changed files with 12 additions and 63 deletions

View File

@ -1,55 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
height="16"
width="16"
version="1"
id="svg4"
sodipodi:docname="folder-external.svg"
inkscape:version="0.92.1 r">
<metadata
id="metadata10">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs8" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1151"
id="namedview6"
showgrid="false"
inkscape:measure-start="0.542373,19.322"
inkscape:measure-end="8.47458,11.2542"
inkscape:zoom="59"
inkscape:cx="8.3385421"
inkscape:cy="9.0662454"
inkscape:window-x="0"
inkscape:window-y="26"
inkscape:window-maximized="1"
inkscape:current-layer="svg4" />
<path
style="fill:#0082c9;fill-rule:evenodd"
d="M 1.4609375 2 C 1.2109375 2 1 2.2109375 1 2.4609375 L 1 13.539062 C 1 13.797063 1.2029375 14 1.4609375 14 L 14.539062 14 C 14.797063 14 15 13.797063 15 13.539062 L 15 4.4628906 C 15 4.2128906 14.789062 3.9980469 14.539062 3.9980469 L 8 3.9980469 L 6 2 L 1.4609375 2 z M 9.0429688 5.8203125 C 9.7141255 5.8203125 10.283203 6.3098823 10.283203 6.9433594 L 10.283203 6.9570312 C 10.276138 7.1539038 10.275796 7.3806138 10.140625 7.9257812 L 10.128906 7.9375 C 10.093581 8.0373491 10.038596 8.1120166 9.9726562 8.1972656 C 9.9064822 8.2827496 9.8280833 8.3703001 9.7539062 8.4550781 C 9.7192843 8.4946413 9.6953795 8.5232698 9.6640625 8.5585938 C 9.6508745 8.6099311 9.63489 8.6629656 9.625 8.7128906 C 9.587319 8.8996368 9.606164 9.020818 9.625 9.0625 C 9.9582232 9.2040315 10.293483 9.330364 10.580078 9.4511719 C 10.894227 9.5835192 11.164053 9.7153819 11.34375 9.9296875 A 0.20817613 0.20817613 0 0 1 11.394531 10.033203 C 11.414781 10.187923 11.430316 10.449983 11.447266 10.716797 C 11.464216 10.984082 11.482267 11.256381 11.498047 11.376953 A 0.21194402 0.21194402 0 0 1 11.394531 11.583984 C 10.82864 11.88518 9.9380792 12.017884 9.0429688 12.021484 C 8.1478583 12.025016 7.250039 11.899545 6.6660156 11.583984 A 0.21194402 0.21194402 0 0 1 6.5625 11.376953 C 6.5842848 11.205503 6.6063441 10.991581 6.6308594 10.779297 C 6.6234499 10.779352 6.6167857 10.781221 6.609375 10.78125 C 5.9954439 10.783604 5.3797963 10.697123 4.9785156 10.480469 A 0.14553489 0.14553489 0 0 1 4.9082031 10.337891 C 4.9416431 10.073668 4.9847056 9.6821229 5.0136719 9.4160156 A 0.11138836 0.11138836 0 0 1 5.0136719 9.3984375 C 5.0433441 9.2693871 5.1347201 9.2254292 5.2265625 9.1679688 C 5.3184049 9.1105085 5.430818 9.0634581 5.5546875 9.0097656 C 5.7755802 8.9139197 6.0209415 8.8311898 6.21875 8.7617188 C 6.225579 8.7308691 6.2287279 8.6408398 6.2011719 8.5136719 C 6.1910449 8.4656313 6.1773186 8.4107821 6.1660156 8.3613281 L 6.1484375 8.34375 C 6.0907416 8.2858187 6.0310998 8.2170761 5.9804688 8.1582031 C 5.929838 8.0993297 5.8916094 8.0558267 5.8652344 7.9804688 L 5.8554688 7.9726562 L 5.8554688 7.9628906 C 5.7735177 7.6047053 5.7611125 7.4361207 5.7578125 7.2988281 C 5.7578125 6.8643429 6.1489855 6.5273438 6.609375 6.5273438 C 7.0697645 6.5273438 7.4609375 6.864343 7.4609375 7.2988281 L 7.4609375 7.3085938 C 7.4562275 7.4435314 7.4558282 7.5986889 7.3632812 7.9726562 L 7.3535156 7.9824219 C 7.3294947 8.0509504 7.2932621 8.0993298 7.2480469 8.1582031 C 7.2025967 8.2166055 7.1485231 8.2775356 7.0976562 8.3359375 L 7.0351562 8.40625 C 7.0259712 8.441574 7.0148725 8.4797609 7.0078125 8.5136719 C 6.9819075 8.6415448 6.9948605 8.7236941 7.0078125 8.7519531 C 7.2364765 8.8492118 7.4671901 8.9346845 7.6640625 9.0175781 C 7.814509 9.0809501 7.940841 9.1518303 8.0507812 9.234375 C 8.1950005 9.182675 8.3482844 9.120478 8.4746094 9.0761719 C 8.4840284 9.0311926 8.4887818 8.9004125 8.4492188 8.7148438 C 8.4339127 8.6451378 8.4129684 8.5662016 8.3964844 8.4941406 C 8.3865934 8.4842496 8.3805138 8.47864 8.3710938 8.46875 C 8.2872582 8.3839724 8.19871 8.2829846 8.125 8.1972656 C 8.0512903 8.1115461 7.9951812 8.049193 7.9570312 7.9394531 L 7.9453125 7.9257812 L 7.9453125 7.9121094 C 7.8256825 7.3900205 7.8074444 7.1435288 7.8027344 6.9433594 C 7.8027344 6.3098823 8.3718125 5.8203125 9.0429688 5.8203125 z "
id="path2" />
</svg>
<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1"><path d="M1.46 2c-.25 0-.46.21-.46.46v11.08c0 .257.203.46.46.46h13.08c.257 0 .46-.203.46-.46V4.462a.47.47 0 0 0-.46-.465H8L6 2H1.46zm7.583 3.82c.671 0 1.24.49 1.24 1.123v.014c-.007.197-.007.424-.142.969l-.012.011a.914.914 0 0 1-.156.26c-.067.086-.145.173-.22.258l-.089.104c-.013.05-.03.104-.039.154-.038.187-.019.308 0 .35.333.141.668.267.955.388.314.133.584.264.764.479a.208.208 0 0 1 .05.103c.02.155.036.417.053.684.017.267.035.54.051.66a.212.212 0 0 1-.103.207c-.566.301-1.457.434-2.352.437-.895.004-1.793-.121-2.377-.437a.212.212 0 0 1-.104-.207c.022-.171.044-.385.069-.598l-.022.002c-.614.003-1.23-.084-1.63-.3a.146.146 0 0 1-.07-.143c.033-.264.076-.656.105-.922a.111.111 0 0 1 0-.018c.03-.129.12-.173.213-.23.091-.057.204-.105.328-.158.22-.096.466-.179.664-.248a.69.69 0 0 0-.018-.248l-.035-.153-.018-.017a3.558 3.558 0 0 1-.168-.186c-.05-.059-.088-.102-.115-.178l-.01-.007v-.01a3.08 3.08 0 0 1-.097-.664c0-.435.391-.772.851-.772.46 0 .852.337.852.772v.01c-.005.135-.005.29-.098.664l-.01.01a.61.61 0 0 1-.105.175c-.045.059-.1.12-.15.178l-.063.07c-.009.036-.02.074-.027.108a.448.448 0 0 0 0 .238c.228.097.46.183.656.266.15.063.277.134.387.216.144-.051.297-.114.424-.158a1.03 1.03 0 0 0-.026-.361c-.015-.07-.036-.149-.053-.22l-.025-.026a5.503 5.503 0 0 1-.246-.272c-.074-.085-.13-.148-.168-.258l-.012-.013v-.014c-.12-.522-.138-.768-.142-.969 0-.633.569-1.123 1.24-1.123z" fill="#0082c9" fill-rule="evenodd"/></svg>

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -21,15 +21,18 @@
*/
(function(OC, OCA) {
OC.Plugins.register('OCA.Files.App', {
attach: () => {
if (OCA.Theming) {
OC.MimeType._mimeTypeIcons['dir-group'] = OC.generateUrl('/apps/theming/img/groupfolders/folder-group.svg?v=' + OCA.Theming.cacheBuster);
} else {
OC.MimeType._mimeTypeIcons['dir-group'] = OC.imagePath('groupfolders', 'folder-group');
}
}
});
if (OCA.Theming) {
OC.MimeType._mimeTypeIcons['dir-group'] = OC.generateUrl('/apps/theming/img/groupfolders/folder-group.svg?v=' + OCA.Theming.cacheBuster);
} else {
OC.MimeType._mimeTypeIcons['dir-group'] = OC.imagePath('groupfolders', 'folder-group');
}
__webpack_nonce__ = btoa(OC.requestToken)
__webpack_public_path__ = OC.linkTo('groupfolders', 'build/')
__webpack_nonce__ = btoa(OC.requestToken);
__webpack_public_path__ = OC.linkTo('groupfolders', 'build/');
var ShareTabPlugin = {
attach: function (shareTabView) {