From 90147353395be749789c2b9d033e919ba02f683f Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Sat, 26 Nov 2022 15:12:54 +0100 Subject: [PATCH] use svg icon --- _admin.php | 10 +++++----- icon-big.png | Bin 1744 -> 0 bytes icon.png | Bin 799 -> 0 bytes icon.svg | 27 +++++++++++++++++++++++++++ 4 files changed, 32 insertions(+), 5 deletions(-) delete mode 100644 icon-big.png delete mode 100644 icon.png create mode 100644 icon.svg diff --git a/_admin.php b/_admin.php index a7b8201..d54a90a 100644 --- a/_admin.php +++ b/_admin.php @@ -16,12 +16,12 @@ if (!defined('DC_CONTEXT_ADMIN')) { dcCore::app()->addBehavior('adminModulesListGetActions', ['translaterAdminBehaviors', 'adminModulesGetActions']); dcCore::app()->addBehavior('adminModulesListDoActions', ['translaterAdminBehaviors', 'adminModulesDoActions']); -dcCore::app()->addBehavior('adminDashboardFavoritesV2', ['translaterAdminBehaviors', 'adminDashboardFavorites']); +dcCore::app()->addBehavior('adminDashboardFavoritesV2', ['translaterAdminBehaviors', 'adminDashboardFavoritesV2']); dcCore::app()->menu[dcAdmin::MENU_PLUGINS]->addItem( __('Translater'), dcCore::app()->adminurl->get('translater'), - dcPage::getPF('translater/icon.png'), + dcPage::getPF('translater/icon.svg'), preg_match( '/' . preg_quote(dcCore::app()->adminurl->get('translater')) . '(&.*)?$/', $_SERVER['REQUEST_URI'] @@ -102,13 +102,13 @@ class translaterAdminBehaviors * * @param dcFavorites $favs dcFavorites instance */ - public static function adminDashboardFavorites(dcFavorites$favs): void + public static function adminDashboardFavoritesV2(dcFavorites $favs): void { $favs->register('translater', [ 'title' => __('Translater'), 'url' => dcCore::app()->adminurl->get('translater'), - 'small-icon' => urldecode(dcPage::getPF('translater/icon.png')), - 'large-icon' => urldecode(dcPage::getPF('translater/icon-big.png')), + 'small-icon' => urldecode(dcPage::getPF('translater/icon.svg')), + 'large-icon' => urldecode(dcPage::getPF('translater/icon.svg')), 'permissions' => dcCore::app()->auth->isSuperAdmin(), ]); } diff --git a/icon-big.png b/icon-big.png deleted file mode 100644 index ad8442eb1a25675598923fc68445f9ae77fd8691..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1744 zcmX9d*B!rMh0b|5)2| z1nK)yWw0nqnjuS&Nz-!K_(M_`MiBfD8tn9zsC*EC2-9HPyMS zdtwwM+<*C|SEJQB4Slq-pH~f1+k(0iF%WzjZNX1b_ug^Fx|I45q=jZjhS>pIDj!m< zt+l#rt;C^r=2vPKz|sq03u%CedblsZfQrOAzp+SZm|Z9Wre#hLX7cThfnrkZQadbo0thRYGOeX+Dk_T`+@S9(x2Wb*3i$xwN@>aasAD&82T%W4yi1u)pTLcZ z?Cnev2Y`Z9kAS(7lhP$I6z&g>S6Xc_uobTWdx;h#ZlC+;p9BBfw?s@wOQH%zA=zj#q&AD3hH7vrqSMbO_l)!`$# z-&q++b-d%=xH=>oqn$7H0VOk3MhM2`3i_$=%c34d(|ZntD=q8Boe&qQ%a`kPRvv}B z9pLXh131^|2&iBJq4Hv0MeT%TQA;k;Ib)@>)gT?daF~D(uNK$;tM~P3cz&T%6$gFX zZ(`Xew1s{*%c9|jyxd3r{V(wNmbl}_sxD@18qS&<)X~N|Zgk!@1$VAmSZ4Uo+`=jK zyza~5x?%67;zdg&i?MVqRz?gNoETm|RrQDW?9lK!pIgn3E3Qjs?-BUDmKm4gW4AwL zyvh41+#!oiVPecodGO_3t)2;eyX7S#tdqmfR7#sTkB5DIyvlIX19)*fpxSb#VszDS zmi(3Z1G4(&^za@O=9N$ zN%ix$tk4bH@mA6<^k28{`QQ~aS+MEDAysq(c(on*t9?iRu=2)6IP4MfA7+6t)6=k44HkZJtyQ2}5E5g8;WUDi!3UQuoqdAseYb zwWXieU{{*&5%}!u$OFvgw{(0v)%2wtQH?;@iOWwW>eF7P$g`otMFQoCEh;bj{{>&_ z+*^=kwq+2$KpAgTJK;qqm&edR+Fc}G@ZH}&gJl#lH%-1b(Z3o;A_QZ7voZTjhu{JE zDXFccF6kgbS%xIKbPcNN)7ZSWYf3y4$h8a282q$GO&g1fIQj`r)gNL+{jBP6nhp_2 z;3;r<4sk2sIIdjt5S`^v$9v6mOVZVWd(o0q3 ziO1wRCax3wdy|(0nmc3bnanqzSL3RnNlYo3)SOo59V3?q}8ysV_n7_pVq^Nk;FU~~L&B0Df&x>+hU|>ioRN4w6MFp_ zzy$B7IFo0^I2~hU*eUcTBj95gNw-1appWPF7QS#?ae1)>!tgixpw+r$@ix)ZZv!w| zmXJzeLx?VcHd0E zSmHV68Hqpp$@zqF8`HgnLLPljFxE}Srr-VsAUvq2-T$Ro(B+RkNk9~}MR+wrQt*Ft CH?fxh diff --git a/icon.png b/icon.png deleted file mode 100644 index 4dcb2e05a2043d76c039c78987a7bb1ec7a2adb6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 799 zcmV+)1K|9LP)Ab^;lv$w=-F>x?({re483^EKLfItRtKn-{V#54aeGBNyOWWL1l z?+-9!|MMvRc*ij3`bw~-t4}{Nyk`Bw!2S0Z*nqQ-KQaIW5GW8;fLP%lBjXchV4VJB zWMN2te$pGLnc*`t`$?c-49pDw7=8k2b`~ZE4kXOS!NLF#Kp+=bf&!EAKZDtSMg}hy zhJUYrFtOAZJU+y5gG=l>$fkclx3K;H3vv+yda3~kAdm~3fcOhgaz0SudbWRmPR*9G z{PB#PKcoKs&Lp5*JV@bPPGPMdOsw(j|Nia-a!-Q13&d&w0R(bEH4xVV@f{$Z2#P|^ zzrQX5o&W9&3;S{)zXFJ--{KN;`oO}e#{cKXhJOqUSAcFC7{PO?-#G)d?1y=}TJF5yYJbCvOlBgkIDiE7Nll)mA-UbRl dApQ*yU;v5<(x~GiPtyPZ002ovPDHLkV1jkST(kfH diff --git a/icon.svg b/icon.svg new file mode 100644 index 0000000..35795e4 --- /dev/null +++ b/icon.svg @@ -0,0 +1,27 @@ + + + +