diff --git a/inventory-app/doorboy.py b/inventory-app/doorboy.py index 5e2cbda..785f852 100644 --- a/inventory-app/doorboy.py +++ b/inventory-app/doorboy.py @@ -199,7 +199,7 @@ def view_doorboy_slam(): def view_doorboy(): user = read_user() workshop_access = "k-space:workshop" in g.users_lookup.get(user["username"], User()).groups - latest_events = db.eventlog.find({"component": "doorboy", "type":"open-door"}).sort([("timestamp", -1)]).limit(10); + # latest_events = db.eventlog.find({"component": "doorboy", "type":"open-door"}).sort([("timestamp", -1)]).limit(10); latest_swipes = db.inventory.find({"component": "doorboy", "type":"token"}).sort([("last_seen", -1)]).limit(10); return render_template("doorboy.html", **locals()) diff --git a/inventory-app/static/backdoor.jpg b/inventory-app/static/backdoor.jpg new file mode 100644 index 0000000..db3b5e9 Binary files /dev/null and b/inventory-app/static/backdoor.jpg differ diff --git a/inventory-app/static/doorstairs.png b/inventory-app/static/doorstairs.png new file mode 100644 index 0000000..902c905 Binary files /dev/null and b/inventory-app/static/doorstairs.png differ diff --git a/inventory-app/static/frontdoor.jpg b/inventory-app/static/frontdoor.jpg new file mode 100644 index 0000000..29a3c7e Binary files /dev/null and b/inventory-app/static/frontdoor.jpg differ diff --git a/inventory-app/static/grounddoor.png b/inventory-app/static/grounddoor.png new file mode 100644 index 0000000..3bcfde2 Binary files /dev/null and b/inventory-app/static/grounddoor.png differ diff --git a/inventory-app/static/workshopdoor.jpg b/inventory-app/static/workshopdoor.jpg new file mode 100644 index 0000000..aad6b7b Binary files /dev/null and b/inventory-app/static/workshopdoor.jpg differ diff --git a/inventory-app/templates/base.html b/inventory-app/templates/base.html index 37198c8..20a6913 100644 --- a/inventory-app/templates/base.html +++ b/inventory-app/templates/base.html @@ -69,12 +69,18 @@ span.tooltipped { text-decoration-style: dotted; } - .horizontalRow { - display: flex; - justify-content: flex-start; - gap: 20px; - padding: 10px; - } +.horizontalRow { + display: flex; + justify-content: flex-start; + align-items: center; + gap: 20px; + padding: 10px; +} + +.buttonExtra { + border: 4px solid #2bbbad; + text-align: center; +} diff --git a/inventory-app/templates/doorboy.html b/inventory-app/templates/doorboy.html index 8faa6e3..92f9bbc 100644 --- a/inventory-app/templates/doorboy.html +++ b/inventory-app/templates/doorboy.html @@ -1,21 +1,99 @@ {% extends 'base.html' %} {% block content %} -
+ +
-

Press to open:

- +
+

Open

-

Manage your keycards or keyfobs here:

-personMy cards +
+
+
+
+ +
k6.ee/0001
+
+
+
+
+
+ +
k6.ee/????
+
+
+
+
+ +
k6.ee/0079
+
+
+
+ +
+
+
k6.ee/0020
+
+
+
+ +
+
+ +
+

Keycards

+ personLinked keycards +

Adding keycards: +

    +
  1. Swipe keycard at any door listed above
  2. +
  3. Refresh this page
  4. +
  5. Find it below, click
    Claim keycard
  6. +
+

+ +

Keycards last seen:

+Does not include door opens by webhook. + + + + + + + + + + + + + + + {% for o in latest_swipes %} + + + + + + + + + + + {% endfor %} + +
Last seen WhoUID hash tail 
{{ (o.last_seen or o.timestamp) | timeago }}{{ o.door }}{% if o.inventory and o.inventory.owner %}{{ o.inventory.owner.username | display_name }}{% else %}Unknown{% endif %}{{ o.token.uid_hash[-6:] }}{% if o.inventory and o.inventory.owner %}{{ o.token.comment }}{% else %}Claim keycard{% endif %}
+ +{% if false %} + +

Recent door open requests via Slack or the buttons above

@@ -40,40 +118,8 @@ {% endfor %} - -

Please claim keycards or keyfobs associated with you here!

- - - - - - - - - - - - - - - {% for o in latest_swipes %} - - - - - - - - - - {% endfor %} - -
 Last seen WhoUID hash tailGranted 
- {% if o.inventory and o.inventory.owner %} -   - {% else %} - error{% endif %} - {{ (o.last_seen or o.timestamp) | timeago }}{{ o.door }}{% if o.inventory and o.inventory.owner %}{{ o.inventory.owner.username | display_name }}{% else %}Unknown{% endif %}{{ o.token.uid_hash[-6:] }}{% if o.success %}check_circle{% else %} {% endif %}{% if o.inventory and o.inventory.owner %}{{ o.token.comment }}{% else %}This is mine!{% endif %}
+
+{% endif %}
{% endblock %}