Skip to content

Commit

Permalink
Fix scrolling in selectuser
Browse files Browse the repository at this point in the history
  • Loading branch information
hackenbergstefan committed Jul 30, 2024
1 parent f94e1a6 commit 6ff7c2a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 22 deletions.
2 changes: 1 addition & 1 deletion coffeebuddy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from flask_sqlalchemy import SQLAlchemy
from sqlalchemy.exc import OperationalError

__version__ = "1.1.2"
__version__ = "1.1.3"

db = SQLAlchemy()
login_manager = flask_login.LoginManager()
Expand Down
45 changes: 24 additions & 21 deletions coffeebuddy/templates/selectuser.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
<style>
.scroll {
max-height: 100%;
overflow: scroll;
overflow-y: scroll;
overflow-x: hidden;
width: 100%;
}

Expand All @@ -51,34 +52,36 @@
<h1>Users</h1>
</div>

{% if top_manual_users|length > 0 %}
<h3>Most frequent users</h3>
<div class="d-flex flex-column scroll">
<div class="d-flex flex-row flex-wrap">
{% for user in top_manual_users %}
<div class="item" onclick="window.location.href = '../coffee.html?tag={{ user.tag.hex() }}&manually'">
{{ user.name }} {{ user.prename }}
</div>
{% endfor %}
</div>
</div>
{% endif %}

<h3 class="mt-5">All users</h3>
<div class="d-flex flex-column scroll">
{% for char, userlist in users %}
<div class="d-flex justify-content-start my-2">
<div class="h3 py-2 pr-2 mr-2 color-berry" style="border-right: 2px solid; min-width: 2.5ch;">{{char}}
</div>
{% if top_manual_users|length > 0 %}
<h3>Most frequent users</h3>
<div class="d-flex flex-column">
<div class="d-flex flex-row flex-wrap">
{% for user in userlist %}
{% for user in top_manual_users %}
<div class="item" onclick="window.location.href = '../coffee.html?tag={{ user.tag.hex() }}&manually'">
{{ user.name }} {{ user.prename }}
</div>
{% endfor %}
</div>
</div>
{% endfor %}
{% endif %}

<h3 class="mt-5">All users</h3>
<div class="d-flex flex-column">
{% for char, userlist in users %}
<div class="d-flex justify-content-start my-2">
<div class="h3 py-2 pr-2 mr-2 color-berry" style="border-right: 2px solid; min-width: 2.5ch;">{{char}}
</div>
<div class="d-flex flex-row flex-wrap">
{% for user in userlist %}
<div class="item" onclick="window.location.href = '../coffee.html?tag={{ user.tag.hex() }}&manually'">
{{ user.name }} {{ user.prename }}
</div>
{% endfor %}
</div>
</div>
{% endfor %}
</div>
</div>
<button id="btn-back" class="mt-auto align-self-end px-2" type="submit" name="logout">
<span class="btnbar-button-icon fas fa-backspace"></span>
Expand Down

0 comments on commit 6ff7c2a

Please sign in to comment.