dismess popups

This commit is contained in:
SowinskiBraeden committed 2026-06-29 20:48:28 -07:00
1 parent c49c84ad4e
commit 2df37688e1
3 files changed
+48 -2

No files matched your search

+1 -1
View File
@@ -8,7 +8,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
DEFAULT_DATABASE_URL = f"sqlite:///{BASE_DIR / 'data' / 'boker-dev.sqlite3'}"
DEFAULT_SECRET_KEY = "change-this-before-deploying"
APP_VERSION = "2.5.33"
APP_VERSION = "2.5.34"
def load_local_env(env_path: Path) -> None:
+31
View File
@@ -627,12 +627,37 @@ h1, h2, h3, h4 { margin: 0; }
================================================================ */
.flash-stack { display: grid; gap: 10px; margin-bottom: 24px; }
.flash {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 12px;
padding: 11px 16px;
border-radius: var(--r-sm);
font-size: 14px;
line-height: 1.45;
border: 1px solid var(--border);
background: var(--surface);
}
.flash__message {
min-width: 0;
overflow-wrap: anywhere;
}
.flash__dismiss {
appearance: none;
border: 0;
background: transparent;
color: currentColor;
opacity: .62;
font-size: 20px;
line-height: 1;
padding: 0 0 0 8px;
cursor: pointer;
flex: none;
}
.flash__dismiss:hover,
.flash__dismiss:focus-visible {
opacity: 1;
}
.flash.success {
color: var(--pos);
border-color: var(--pos-tint-bd);
@@ -5738,6 +5763,12 @@ select.control { cursor: pointer; }
padding: 0;
max-width: none;
}
.page--auth > .flash-stack {
width: min(380px, calc(100% - 48px));
margin: 24px auto -20px;
position: relative;
z-index: 2;
}
.auth-split {
display: flex;
+16 -1
View File
@@ -76,7 +76,10 @@
{% if messages %}
<div class="flash-stack">
{% for category, message in messages %}
<div class="flash {{ category }}">{{ message }}</div>
<div class="flash {{ category }}" role="{{ 'alert' if category == 'error' else 'status' }}">
<span class="flash__message">{{ message }}</span>
<button class="flash__dismiss" type="button" aria-label="Dismiss message" data-dismiss-flash>&times;</button>
</div>
{% endfor %}
</div>
{% endif %}
@@ -133,6 +136,18 @@
})();
</script>
<script>
(() => {
document.addEventListener('click', (event) => {
const button = event.target.closest('[data-dismiss-flash]');
if (!button) return;
const flash = button.closest('.flash');
const stack = button.closest('.flash-stack');
if (flash) flash.remove();
if (stack && !stack.querySelector('.flash')) stack.remove();
});
})();
</script>
<script>
(() => {
function positionBubble(tip) {
const bubble = tip.querySelector('.info-tip__bubble');