Polish widget notification settings
This commit is contained in:
@@ -29,6 +29,17 @@ input, textarea, select {
|
|||||||
background: white;
|
background: white;
|
||||||
color: var(--ink);
|
color: var(--ink);
|
||||||
}
|
}
|
||||||
|
input[type="color"] {
|
||||||
|
width: 100%;
|
||||||
|
height: 44px;
|
||||||
|
padding: 4px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
|
||||||
|
input[type="color"]::-webkit-color-swatch {
|
||||||
|
border: 0;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
|
label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
|
||||||
|
|
||||||
.hidden { display: none !important; }
|
.hidden { display: none !important; }
|
||||||
@@ -73,6 +84,40 @@ label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
|
|||||||
.brand button, .sitebar button { background: #edf3ef; color: var(--ink); }
|
.brand button, .sitebar button { background: #edf3ef; color: var(--ink); }
|
||||||
.switch { display: flex; align-items: center; gap: 8px; }
|
.switch { display: flex; align-items: center; gap: 8px; }
|
||||||
.switch input { width: auto; }
|
.switch input { width: auto; }
|
||||||
|
.setting-switch {
|
||||||
|
justify-content: space-between;
|
||||||
|
flex-direction: row-reverse;
|
||||||
|
border: 1px solid var(--line);
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 10px 12px;
|
||||||
|
background: #f8fbf9;
|
||||||
|
color: var(--ink);
|
||||||
|
}
|
||||||
|
.setting-switch input {
|
||||||
|
appearance: none;
|
||||||
|
width: 42px;
|
||||||
|
height: 24px;
|
||||||
|
border: 0;
|
||||||
|
border-radius: 999px;
|
||||||
|
padding: 0;
|
||||||
|
background: #cbd6d0;
|
||||||
|
position: relative;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.setting-switch input:before {
|
||||||
|
position: absolute;
|
||||||
|
top: 3px;
|
||||||
|
left: 3px;
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: white;
|
||||||
|
content: "";
|
||||||
|
transition: transform .16s ease;
|
||||||
|
}
|
||||||
|
.setting-switch input:checked { background: var(--brand); }
|
||||||
|
.setting-switch input:checked:before { transform: translateX(18px); }
|
||||||
|
.color-field input { margin-top: 2px; }
|
||||||
.list-tools {
|
.list-tools {
|
||||||
padding: 10px 14px;
|
padding: 10px 14px;
|
||||||
border-bottom: 1px solid var(--line);
|
border-bottom: 1px solid var(--line);
|
||||||
|
|||||||
+5
-3
@@ -78,16 +78,18 @@
|
|||||||
<label>Intro CS <textarea name="introCs" rows="2"></textarea></label>
|
<label>Intro CS <textarea name="introCs" rows="2"></textarea></label>
|
||||||
<label>Titulek EN <input name="titleEn"></label>
|
<label>Titulek EN <input name="titleEn"></label>
|
||||||
<label>Intro EN <textarea name="introEn" rows="2"></textarea></label>
|
<label>Intro EN <textarea name="introEn" rows="2"></textarea></label>
|
||||||
<label>Barva <input name="brand" type="color"></label>
|
<label class="color-field">Barva
|
||||||
|
<input name="brand" type="color">
|
||||||
|
</label>
|
||||||
<label>Pozice desktop <select name="desktopSide"><option>right</option><option>left</option></select></label>
|
<label>Pozice desktop <select name="desktopSide"><option>right</option><option>left</option></select></label>
|
||||||
<label>Desktop bottom px <input name="desktopBottom" type="number"></label>
|
<label>Desktop bottom px <input name="desktopBottom" type="number"></label>
|
||||||
<label>Desktop offset px <input name="desktopOffset" type="number"></label>
|
<label>Desktop offset px <input name="desktopOffset" type="number"></label>
|
||||||
<label>Pozice mobil <select name="mobileSide"><option>right</option><option>left</option></select></label>
|
<label>Pozice mobil <select name="mobileSide"><option>right</option><option>left</option></select></label>
|
||||||
<label>Mobil bottom px <input name="mobileBottom" type="number"></label>
|
<label>Mobil bottom px <input name="mobileBottom" type="number"></label>
|
||||||
<label>Mobil offset px <input name="mobileOffset" type="number"></label>
|
<label>Mobil offset px <input name="mobileOffset" type="number"></label>
|
||||||
<label class="switch">
|
<label class="switch setting-switch">
|
||||||
<input name="pulseOnAdminReply" type="checkbox">
|
<input name="pulseOnAdminReply" type="checkbox">
|
||||||
<span>Widget ma pulzovat pri odpovedi</span>
|
<span>Pulzovani widgetu pri odpovedi</span>
|
||||||
</label>
|
</label>
|
||||||
<button type="submit">Ulozit</button>
|
<button type="submit">Ulozit</button>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ $("#settingsForm").addEventListener("submit", async (event) => {
|
|||||||
settings.notifications = settings.notifications || {};
|
settings.notifications = settings.notifications || {};
|
||||||
settings.notifications.pulseOnAdminReply = form.get("pulseOnAdminReply") === "on";
|
settings.notifications.pulseOnAdminReply = form.get("pulseOnAdminReply") === "on";
|
||||||
await saveSite({ settings, isOnline: state.site.isOnline });
|
await saveSite({ settings, isOnline: state.site.isOnline });
|
||||||
|
$("#settingsPanel").classList.add("hidden");
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#replyForm").addEventListener("submit", async (event) => {
|
$("#replyForm").addEventListener("submit", async (event) => {
|
||||||
|
|||||||
@@ -287,10 +287,6 @@
|
|||||||
.mf-launcher span:before { transform: translateY(-8px); }
|
.mf-launcher span:before { transform: translateY(-8px); }
|
||||||
.mf-launcher span:after { transform: translateY(5px); width: 18px; }
|
.mf-launcher span:after { transform: translateY(5px); width: 18px; }
|
||||||
.mf-launcher.mf-notify { animation: mfPulse 1.15s ease-out infinite; }
|
.mf-launcher.mf-notify { animation: mfPulse 1.15s ease-out infinite; }
|
||||||
.mf-launcher.mf-notify:after {
|
|
||||||
position: absolute; top: 5px; right: 5px; width: 13px; height: 13px; border-radius: 50%;
|
|
||||||
background: #ff3b30; border: 2px solid ${c.surface}; content: "";
|
|
||||||
}
|
|
||||||
.mf-panel {
|
.mf-panel {
|
||||||
position: fixed; z-index: 2147483001; ${desktop.side}: ${desktop.sideOffsetPx}px; bottom: ${desktop.bottomPx + 72}px;
|
position: fixed; z-index: 2147483001; ${desktop.side}: ${desktop.sideOffsetPx}px; bottom: ${desktop.bottomPx + 72}px;
|
||||||
width: min(${desktop.widthPx}px, calc(100vw - 24px)); max-height: min(680px, calc(100vh - 110px)); display: none;
|
width: min(${desktop.widthPx}px, calc(100vw - 24px)); max-height: min(680px, calc(100vh - 110px)); display: none;
|
||||||
|
|||||||
Reference in New Issue
Block a user