Disable widget online effects while offline
This commit is contained in:
+6
-5
@@ -486,9 +486,10 @@
|
||||
}
|
||||
|
||||
function launcherEffectClasses(settings, isOnline) {
|
||||
if (!isOnline) return "mf-offline";
|
||||
const effects = settings.launcherEffects || {};
|
||||
return [
|
||||
isOnline ? "mf-online" : "mf-offline",
|
||||
"mf-online",
|
||||
effects.breathe ? "mf-effect-breathe" : "",
|
||||
effects.ring ? "mf-effect-ring" : "",
|
||||
effects.hoverLabel ? "mf-effect-hover-label" : "",
|
||||
@@ -550,7 +551,7 @@
|
||||
.mf-launcher-icon:before { transform: translateY(-8px); }
|
||||
.mf-launcher-icon:after { transform: translateY(5px); width: 18px; }
|
||||
.mf-launcher-label { position: absolute; ${labelOffset} top: 50%; transform: translateY(-50%) translateX(8px); opacity: 0; pointer-events: none; white-space: nowrap; border-radius: 999px; padding: 7px 10px; background: ${c.text}; color: white; font-size: 12px; box-shadow: 0 10px 24px rgb(0 0 0 / 18%); transition: opacity .18s ease, transform .18s ease; }
|
||||
.mf-effect-hover-label:hover .mf-launcher-label { opacity: 1; transform: translateY(-50%) translateX(0); }
|
||||
.mf-online.mf-effect-hover-label:hover .mf-launcher-label { opacity: 1; transform: translateY(-50%) translateX(0); }
|
||||
.mf-message-label { position: absolute; ${labelOffset} top: 50%; transform: translateY(-50%) translateX(8px); opacity: 0; pointer-events: none; white-space: nowrap; border-radius: 999px; padding: 7px 10px; background: ${c.text}; color: white; font-size: 12px; font-weight: 700; box-shadow: 0 10px 24px rgb(0 0 0 / 18%); transition: opacity .18s ease, transform .18s ease; }
|
||||
.mf-show-message-label .mf-message-label { opacity: 1; transform: translateY(-50%) translateX(0); }
|
||||
.mf-message-badge { position: absolute; top: -5px; right: -5px; min-width: 22px; height: 22px; display: grid; place-items: center; border-radius: 999px; border: 2px solid white; background: #ff3b30; color: white; font-size: 12px; font-weight: 800; line-height: 1; box-shadow: 0 8px 18px rgb(0 0 0 / 18%); }
|
||||
@@ -558,9 +559,9 @@
|
||||
.mf-reply-pulse { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; opacity: 0; }
|
||||
.mf-online.mf-effect-breathe { animation: mfBreathe 2.8s ease-in-out infinite; }
|
||||
.mf-online.mf-effect-ring:before { position: absolute; inset: -5px; border: 2px solid ${c.brand}; border-radius: 50%; opacity: .62; content: ""; animation: mfRing 2.2s ease-out infinite; }
|
||||
.mf-effect-avatar .mf-launcher-icon { width: 26px; height: 20px; border-radius: 12px 12px 10px 10px; background: rgb(255 255 255 / 24%); border: 2px solid ${c.brandText}; position: relative; }
|
||||
.mf-effect-avatar .mf-launcher-icon:before { position: absolute; left: 6px; top: 6px; width: 4px; height: 4px; border-radius: 50%; background: ${c.brandText}; transform: none; box-shadow: 10px 0 0 ${c.brandText}; }
|
||||
.mf-effect-avatar .mf-launcher-icon:after { position: absolute; left: 7px; top: 13px; width: 12px; height: 2px; border-radius: 999px; background: ${c.brandText}; transform: none; opacity: .88; }
|
||||
.mf-online.mf-effect-avatar .mf-launcher-icon { width: 26px; height: 20px; border-radius: 12px 12px 10px 10px; background: rgb(255 255 255 / 24%); border: 2px solid ${c.brandText}; position: relative; }
|
||||
.mf-online.mf-effect-avatar .mf-launcher-icon:before { position: absolute; left: 6px; top: 6px; width: 4px; height: 4px; border-radius: 50%; background: ${c.brandText}; transform: none; box-shadow: 10px 0 0 ${c.brandText}; }
|
||||
.mf-online.mf-effect-avatar .mf-launcher-icon:after { position: absolute; left: 7px; top: 13px; width: 12px; height: 2px; border-radius: 999px; background: ${c.brandText}; transform: none; opacity: .88; }
|
||||
.mf-offline { filter: grayscale(.2) saturate(.72); opacity: .86; }
|
||||
.mf-notify .mf-reply-pulse { animation: mfPulse 1.15s ease-out infinite; }
|
||||
.mf-wiggle .mf-launcher-icon { animation: mfWiggle .62s ease-in-out 2; }
|
||||
|
||||
Reference in New Issue
Block a user