From f81da1764822fd96b3d70ec0d539438a7879f21f Mon Sep 17 00:00:00 2001 From: Till Tomczak Date: Wed, 4 Jun 2025 00:15:15 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9A=20Improved=20database=20optimizati?= =?UTF-8?q?on=20&=20CSS=20refinements=20=F0=9F=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/database/myp.db-wal | Bin 37112 -> 78312 bytes backend/docs/FRONTEND_FINAL_OPTIMIZATIONS.md | 53 ++++++++++ backend/logs/queue_manager/queue_manager.log | 5 + backend/static/css/core-utilities.css.gz | Bin 749 -> 749 bytes .../static/css/performance-optimized.css.gz | Bin 1640 -> 1640 bytes backend/static/css/ui-refinements.css.gz | Bin 0 -> 1644 bytes backend/static/css/ui-refinements.min.css | 1 + backend/static/css/ui-refinements.min.css.gz | Bin 0 -> 1300 bytes backend/static/js/core-utilities.js.gz | Bin 3619 -> 3619 bytes backend/static/js/simple-notifications.js | 92 ++++++++++++++++++ backend/static/js/simple-notifications.js.gz | Bin 0 -> 1018 bytes backend/static/js/simple-notifications.min.js | 1 + .../static/js/simple-notifications.min.js.gz | Bin 0 -> 761 bytes backend/templates/base.html | 48 +++------ 14 files changed, 164 insertions(+), 36 deletions(-) create mode 100644 backend/docs/FRONTEND_FINAL_OPTIMIZATIONS.md create mode 100644 backend/static/css/ui-refinements.css.gz create mode 100644 backend/static/css/ui-refinements.min.css create mode 100644 backend/static/css/ui-refinements.min.css.gz create mode 100644 backend/static/js/simple-notifications.js create mode 100644 backend/static/js/simple-notifications.js.gz create mode 100644 backend/static/js/simple-notifications.min.js create mode 100644 backend/static/js/simple-notifications.min.js.gz diff --git a/backend/database/myp.db-wal b/backend/database/myp.db-wal index 12c8ca4415ad7d6c92893008a019ae6d16695c08..551973fffdce5e3ed77afe9041fb245050872880 100644 GIT binary patch delta 592 zcmeydkmG;F$Gs%g=W<4rezv7#!x_yt_w`Nzg>Wz`)AD$jZ<}&(PT1 z%))rHubws&$7|{5KM&UTE!rF)u$LRI$QY!^!r07Uvz!bYPQ50PIp?32u4u%kR{&zK ziIpkPNK+$o^UXebI!qkP&Iuhp|A?m!S*t17ZKfus2IgREacJF|@49z>;<*xhTA>~> zw*q;@%*@;f>e~~{krOYw9tc3zYYuiAFhEd!i=lU=w)w#>ZkxA+^%@$0ePV85WDK>J z`~9CkALlY1M$!vZ1ah3YrGdFAQYd5UWll-)JJ%p%M1)==uvaWB&5aBovFjGM-hHRo etT?bOlLYbr delta 15 WcmaFM`j(YVzMF%CKWih~b0z>NVg$Yb diff --git a/backend/static/css/performance-optimized.css.gz b/backend/static/css/performance-optimized.css.gz index 584ef744d2b10bc036ba664986159861cdbab339..79fd41ef1ba1d54859aefee5ca6ee9557ba23677 100644 GIT binary patch delta 15 WcmaFC^MZ#>zMF%?rf?%$5*q+0w*++n delta 15 WcmaFC^MZ#>zMF%CKWigf5*q*~h6F(X diff --git a/backend/static/css/ui-refinements.css.gz b/backend/static/css/ui-refinements.css.gz new file mode 100644 index 0000000000000000000000000000000000000000..c98d197c46096082d614ed6a1a018e1329802822 GIT binary patch literal 1644 zcmV-y29x<8iwFojaX)AR|8;3Ca%E;|Ze?v{Zgg`lV{>x=%~)G+n@ALX&#xG171gPN z3%K&%IHUniDGL+$(?v9hV)li&$YDXmLLvM9!_m=)_vlytgD&Uy zpU~~+72ZXu4lqSX zTwZH2cIiGbkuk`0Ir}(aAQmwirX=RK(in%iSEX{zVLpqI-XA82;6&(zq{N=jo=mi( zu1mu6qwhyqpr}3EimwJ4%!YP(MwK>qTzB(~W4mKwyk@8C z?S%RJR79Gx2=bq$%qL!2T*y)l^jfLpwd%stj;3v;80*LNw2Qwz76)0roxM#R%_d(d ziFE-$8zjOZB+;eWifaZk_8af{qsck0zN77@r`pt;GPJ)V}6M$?YY#^cGXqcjwp z6&gKoT1)6xqBJjWNl@U8XGFK_Nn{arX!^nvmAC9GzH>YMWS`lRN5zD_btYh}cF0hD zo9KA#VWFnLi?wxo2Pm;zZLBNnV!p9f%e8_OA%iMWM<5VH97HYCQ)?zulnnZnx&Q)W zaz^ZyPMg;7gXa+$lk9GQ<1Gy}o24lW3fZ4-tpu_`pl8!3!hzvOI_!-yo>s=ArM8FU z?-#=Z^f^?MZoNB^aX{S{mOt<5ZBthSb;WTu6HZ{)C_cn17 z$FT59Vd9P8r$hJ&$05v=A}&FxU7Usl!hy$(j9c%E0y2iB$K+tO&Vn!Lyz6zD(Mcol4vir*kV z6|`xlt(ANf$l?vX5mZ@S4))n#s(04y0G)Z|OP#Laj$ONT;oPj|m)7zct?#Vma&fP$ z9G_vHd@YG+7)onJj%g^WW&6x|JcRSe78$&!I*iFlnq&p6sn56M zoBHj2n%5^cFw!dqjOuI_x+YRr+42t`HvkmBuRcS+&zIJ1gPaO9(tPTrCC_hpYbm%| zN&D*XS!z-su8o2G)zb#~dqagpLMnI&ov$gGg~Y)!{ckwiIMnW!c+@lc`rxFRyemKn zWG&0QDQWYt%V$sMQU;aZw!-qQ8bs>NFGU0ch*<#5tZ+8b;{w$bdRT+8j}IFTVt4n8 z^%^a%t`-*?#W6b#wI~*}=#>l^YKDpRR;Y$GN&^qnK@ZqiHsdtN7OZywd&JD{-{_Yn5t3 z^QiAvkza4tRv|3vxQL!nzmKV5F6WU8aAnQ`X!Ewd@0<}C^L$a46XQ0`^}CYA6#xK^iA{R| literal 0 HcmV?d00001 diff --git a/backend/static/css/ui-refinements.min.css b/backend/static/css/ui-refinements.min.css new file mode 100644 index 00000000..7af00fdd --- /dev/null +++ b/backend/static/css/ui-refinements.min.css @@ -0,0 +1 @@ +.dark-mode-toggle{position:relative;width:44px;height:24px;padding:0;background:#e2e8f0;border:none;border-radius:12px;cursor:pointer;transition:background-color 0.3s ease;overflow:hidden;}.dark .dark-mode-toggle{background:#1e293b;}.dark-mode-toggle:hover{background:#cbd5e1;}.dark .dark-mode-toggle:hover{background:#334155;}.dark-mode-toggle-slider{position:absolute;top:2px;left:2px;width:20px;height:20px;background:white;border-radius:50%;transition:transform 0.3s cubic-bezier(0.4,0,0.2,1);display:flex;align-items:center;justify-content:center;box-shadow:0 1px 3px rgba(0,0,0,0.1);}.dark .dark-mode-toggle-slider{transform:translateX(20px);background:#475569;}.dark-mode-toggle-icon{font-size:12px;color:#f59e0b;transition:opacity 0.2s ease;}.dark .dark-mode-toggle-icon.sun{opacity:0;}.dark .dark-mode-toggle-icon.moon{opacity:1;color:#60a5fa;}.notification-simple{background:white;border:1px solid #e5e7eb;border-radius:8px;padding:12px 16px;margin-bottom:8px;display:flex;align-items:center;justify-content:space-between;box-shadow:0 1px 3px rgba(0,0,0,0.1);transition:opacity 0.2s ease,transform 0.2s ease;}.dark .notification-simple{background:#1f2937;border-color:#374151;}.notification-simple.notification-enter{opacity:0;transform:translateX(100%);}.notification-simple.notification-enter-active{opacity:1;transform:translateX(0);}.notification-simple.notification-exit{opacity:0;transform:translateX(100%);}.notification-content{display:flex;align-items:center;gap:12px;flex:1;}.notification-icon{font-size:18px;width:20px;text-align:center;}.notification-icon.success{color:#10b981;}.notification-icon.error{color:#ef4444;}.notification-icon.warning{color:#f59e0b;}.notification-icon.info{color:#3b82f6;}.notification-message{font-size:14px;color:#374151;}.dark .notification-message{color:#e5e7eb;}.notification-close{background:none;border:none;color:#9ca3af;cursor:pointer;font-size:20px;line-height:1;padding:0;width:24px;height:24px;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:background-color 0.2s ease;}.notification-close:hover{background-color:#f3f4f6;color:#6b7280;}.dark .notification-close:hover{background-color:#374151;color:#d1d5db;}.loading-spinner{display:inline-block;width:20px;height:20px;border:2px solid #e5e7eb;border-top-color:#3b82f6;border-radius:50%;animation:simple-spin 0.8s linear infinite;}@keyframes simple-spin{to{transform:rotate(360deg);}}.skeleton{background:#f3f4f6;background-image:linear-gradient(90deg,#f3f4f6 0%,#e5e7eb 50%,#f3f4f6 100%);background-size:200% 100%;animation:skeleton-shimmer 1.5s ease-in-out infinite;border-radius:4px;}.dark .skeleton{background:#374151;background-image:linear-gradient(90deg,#374151 0%,#4b5563 50%,#374151 100%);}@keyframes skeleton-shimmer{0%{background-position:200% 0;}100%{background-position:-200% 0;}}.skeleton-text{height:16px;margin-bottom:8px;border-radius:4px;}.skeleton-title{height:24px;width:60%;margin-bottom:12px;border-radius:4px;}.skeleton-button{height:40px;width:120px;border-radius:6px;}.hover-lift{transition:transform 0.2s ease,box-shadow 0.2s ease;}.hover-lift:hover{transform:translateY(-2px);box-shadow:0 4px 6px rgba(0,0,0,0.1);}.hover-scale{transition:transform 0.2s ease;}.hover-scale:hover{transform:scale(1.02);}.fade-in{animation:fadeIn 0.3s ease-in;}@keyframes fadeIn{from{opacity:0;}to{opacity:1;}}.btn-press{transition:transform 0.1s ease;}.btn-press:active{transform:scale(0.98);}.status-pulse{position:relative;}.status-pulse::before{content:'';position:absolute;top:50%;left:50%;width:100%;height:100%;border-radius:50%;background:currentColor;opacity:0.3;transform:translate(-50%,-50%);animation:subtle-pulse 2s ease-in-out infinite;}@keyframes subtle-pulse{0%,100%{transform:translate(-50%,-50%) scale(1);opacity:0.3;}50%{transform:translate(-50%,-50%) scale(1.2);opacity:0;}}.progress-bar{height:4px;background:#e5e7eb;border-radius:2px;overflow:hidden;}.progress-bar-fill{height:100%;background:#3b82f6;transition:width 0.3s ease;}.nav-item i{font-size:18px;width:20px;height:20px;display:inline-flex;align-items:center;justify-content:center;}.mobile-nav-item i{font-size:18px;width:20px;height:20px;display:inline-flex;align-items:center;justify-content:center;} \ No newline at end of file diff --git a/backend/static/css/ui-refinements.min.css.gz b/backend/static/css/ui-refinements.min.css.gz new file mode 100644 index 0000000000000000000000000000000000000000..14563f159d4045049d06be831fbd00a6392a9b2e GIT binary patch literal 1300 zcmV+v1?&1BiwFojaX)AR|8;3Ca%E;|Ze?v{Zgg`lZE0>UV{>x=y;sq0t2hw-6{M=V zsT3mvAx+53O8c~bu={Ah5O2Xowz*9&>c8(8OfZDx_TGnW)yg5`;mnycGq#@-`G#td zQ=~;%RNodv$$#cfb1fNopy_Hh5JWrlz zNDl=(5;CVU;eu1UMv~;LRY?%S-mH~M$fOaBYbsA#5^mo*`9hhfg!Hfm{A_?y{gX&%$yuHTg%QM3!nh-q}5%>BqLU5R-8*V%TF67X-F)0UWZ77#sk# zZswwN^O+bjK^iRgo@h*8X}U=C!6`Kpuovv%Nlj$QI7)@qqV8>eHL(iNQ;>*$r%+2@ z%I_m`x2^)0g#Uz(r=Wl$eH{b0Y(}q8TfsV;^Jjg4PVQE97GV7R@?~#`WTy8yIbL;& zzvl76^l!nlx$1tF+mbXxF&Km7hO=ea9Ohj|(~CyE*U{g~ekhMDqe^u)I{{9Qht)Uv zR7xR7J6i1EXVvbVNDiv*<`ukV$#@|~vnV};#eQj412j@nH_F}A9IjGYk>j{?#5>gB zG7*(fGs!xGZCKmw$BaazSkAWzRZn=uI7PPC2hJR|Iav>i~hyuZ^5v`u0y%pD(^wofDdcPXbVBQC`OW`mO4FTE5 zwpF@(FMxOW+11$f5Y`6``ZOL^4bW&YB?g)H*p1b?K6}^LnD#RbeZ`@Q6}r1~UK}U*bOxApgUNxd-j(_F&jyA4G0r_k z0CsP`dQ2Q#s*C_Jk3r3iZvga9H-V2sv3pcF%rL zv(w-QEu@;GMw;n&2W@agdo@k$31SHr`^SR;tDqCK3N>w|)-GLhgCt2Q_%Ksy=<(ma zoz|}wrfc + + ${message} + + + `; + + // Add to container + notificationContainer.appendChild(notification); + + // Animate in + setTimeout(() => { + notification.classList.remove('notification-enter'); + notification.classList.add('notification-enter-active'); + }, 10); + + // Close button handler + const closeBtn = notification.querySelector('.notification-close'); + closeBtn.addEventListener('click', () => removeNotification(notification)); + + // Auto remove after duration + if (duration > 0) { + setTimeout(() => removeNotification(notification), duration); + } + + return notification; + }; + + // Remove notification + function removeNotification(notification) { + notification.classList.add('notification-exit'); + setTimeout(() => { + if (notification.parentNode) { + notification.parentNode.removeChild(notification); + } + }, 200); + } + + // Convenience methods + window.notifySuccess = (message, duration) => showNotification(message, 'success', duration); + window.notifyError = (message, duration) => showNotification(message, 'error', duration); + window.notifyWarning = (message, duration) => showNotification(message, 'warning', duration); + window.notifyInfo = (message, duration) => showNotification(message, 'info', duration); + + // Replace existing toast system if present + if (typeof window.showToast === 'function') { + window.showToast = function(message, type, duration) { + showNotification(message, type, duration); + }; + } + +})(); \ No newline at end of file diff --git a/backend/static/js/simple-notifications.js.gz b/backend/static/js/simple-notifications.js.gz new file mode 100644 index 0000000000000000000000000000000000000000..827068631d72ecf4d3f688ef91762e56578cc027 GIT binary patch literal 1018 zcmVRdVX;6NY7`TtNL8fbxPhOg53?_}L;aGHTnEu1R>Ya% z$N9dQ;r#r3Le9yCr=95X-dRX75pc74n&tY zOREMB;b`k_s#}2e;Ry-<7~Ryhvd=MOv0_CE(#%*6)WEd>`(GHu{4qGYJRM@jV~i5$ zGVPITqJx*XGeNb!r774b34el^7?nluNX{R&27iA>?-xX8ltHwQ-jb9)MY~9+z2NOJ z?p3^>(JTWQUv0UF!}08N-iJx`w;^YlWt?2_?5VOz9 z({P!n;DW?O-q^lhEEXPpLvm}C)L^bkQhb#_MNw;pD%8I6UQVm)0T9b%fzi zKnaZ@;?iNmg@1$Ckg+V|@}Y;9+aKJ>SE()-!!&+CDbR>*fqjn{&zXSW!n1=sS9xUx zPl!9MFpb*oXfAR8p*7Yvl@9}ZOIu}Z-;q#zRX9>i+8VOzoBzh59v9u~PV z9MOy%W;w5R?Y@5V3Hun^4%6%1$NSTd5C+3q`&~PB0?;@f^NuKXsYh^w94^S8i+;ngypWo>Elx_|WT>j#lDbdE zb{P-Cj{@@j2D=k8Di4F%kZ*VMCW^&-{fH1Pc)*N@0TY~k$HrM@txAa7C4CZx@Stxtr8jq$nH?k^xD< zY*nn?SzU(SZ>oucV(kWW%a%Q2f24P2K|PIv0l(f3*LD`YDtpqo34Rh1o0DsgXFccsT_Wp9Ob o2?ValhNeeuV(xi*b$;|{J- ${message} `;notificationContainer.appendChild(notification);setTimeout(()=>{notification.classList.remove('notification-enter');notification.classList.add('notification-enter-active');},10);const closeBtn = notification.querySelector('.notification-close');closeBtn.addEventListener('click',()=> removeNotification(notification));if(duration > 0){setTimeout(()=> removeNotification(notification),duration);}return notification;};function removeNotification(notification){notification.classList.add('notification-exit');setTimeout(()=>{if(notification.parentNode){notification.parentNode.removeChild(notification);}},200);}window.notifySuccess =(message,duration)=> showNotification(message,'success',duration);window.notifyError =(message,duration)=> showNotification(message,'error',duration);window.notifyWarning =(message,duration)=> showNotification(message,'warning',duration);window.notifyInfo =(message,duration)=> showNotification(message,'info',duration);if(typeof window.showToast === 'function'){window.showToast = function(message,type,duration){showNotification(message,type,duration);};}})(); \ No newline at end of file diff --git a/backend/static/js/simple-notifications.min.js.gz b/backend/static/js/simple-notifications.min.js.gz new file mode 100644 index 0000000000000000000000000000000000000000..808a4333eca63dc43b787be1418acd6882a8fd09 GIT binary patch literal 761 zcmVsELRXNR7zWDFn?FLkAE%WyajG3>+{K zJBW!@>);d7V!5)o{t2#T#H<;IU>{tPjO~JLU@{t>_V=XX{e-R8Ami(mNMo;GXjqn8 zA!D_jn3dW#4Z_kV*E2ANEn#f;>uO6vCW?;ZT-TXbv)K&&?0Ot>T-s-JmWypGnvvjO zXp1^P7Cfee#SjQdkHv*sNK}}da}@HKCM@79;LiaUnx{a=ptaJ~|FFY?*@3K%Zkd)s zE<17TK_-_j!}(E#-A9cp+d_myzrQ|wzeORBWR6lvr7aq@6yRPhsu(TET+|5(GvuPE zWc+kT@T+V=Tma)PQjQk$sX#3DhV11(9_46pQ5-+Z`P5}2Xo{P{Q_HBU>}f5<<|53Xi;=~`(jJ|3T|=T8 z>`LBju!^e>DBPnw75tfwoi=h1(Y#1)GyD(-*Xi;t2;RIm_Pk4Ry1S@OgUz*U$qCEX z!TBCl@&C5&gr(i1L@_OjHPdL#or>WN_iNyI&V7wimg7sDMPWVGs_6dyaP>)a8f7N~ z(5<(l@03K3BZD^lYVqE7kn literal 0 HcmV?d00001 diff --git a/backend/templates/base.html b/backend/templates/base.html index faad1113..c8c82fb6 100644 --- a/backend/templates/base.html +++ b/backend/templates/base.html @@ -368,42 +368,18 @@ - -
- - - -
- Dark Mode aktivieren - - -
-
+ + {% if current_user.is_authenticated %}