dismess popups
This commit is contained in:
3 files changed
+48
-2
No files matched your search
+1
-1
@@ -8,7 +8,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
|||||||
DEFAULT_DATABASE_URL = f"sqlite:///{BASE_DIR / 'data' / 'boker-dev.sqlite3'}"
|
DEFAULT_DATABASE_URL = f"sqlite:///{BASE_DIR / 'data' / 'boker-dev.sqlite3'}"
|
||||||
DEFAULT_SECRET_KEY = "change-this-before-deploying"
|
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:
|
def load_local_env(env_path: Path) -> None:
|
||||||
|
|||||||
@@ -627,12 +627,37 @@ h1, h2, h3, h4 { margin: 0; }
|
|||||||
================================================================ */
|
================================================================ */
|
||||||
.flash-stack { display: grid; gap: 10px; margin-bottom: 24px; }
|
.flash-stack { display: grid; gap: 10px; margin-bottom: 24px; }
|
||||||
.flash {
|
.flash {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 12px;
|
||||||
padding: 11px 16px;
|
padding: 11px 16px;
|
||||||
border-radius: var(--r-sm);
|
border-radius: var(--r-sm);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
line-height: 1.45;
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
background: var(--surface);
|
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 {
|
.flash.success {
|
||||||
color: var(--pos);
|
color: var(--pos);
|
||||||
border-color: var(--pos-tint-bd);
|
border-color: var(--pos-tint-bd);
|
||||||
@@ -5738,6 +5763,12 @@ select.control { cursor: pointer; }
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
max-width: none;
|
max-width: none;
|
||||||
}
|
}
|
||||||
|
.page--auth > .flash-stack {
|
||||||
|
width: min(380px, calc(100% - 48px));
|
||||||
|
margin: 24px auto -20px;
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
|
||||||
.auth-split {
|
.auth-split {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
+16
-1
@@ -76,7 +76,10 @@
|
|||||||
{% if messages %}
|
{% if messages %}
|
||||||
<div class="flash-stack">
|
<div class="flash-stack">
|
||||||
{% for category, message in messages %}
|
{% 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>×</button>
|
||||||
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -133,6 +136,18 @@
|
|||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
<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) {
|
function positionBubble(tip) {
|
||||||
const bubble = tip.querySelector('.info-tip__bubble');
|
const bubble = tip.querySelector('.info-tip__bubble');
|
||||||
|
|||||||
Reference in new issue
Block a user