mirror of
https://github.com/iFargle/headscale-webui.git
synced 2025-12-16 00:11:04 +01:00
Update logic for key_expired toggle on Users page
This commit is contained in:
@@ -484,12 +484,12 @@ def build_preauth_key_table(user_name):
|
||||
key_expired = True if expiration_parse < local_time else False
|
||||
expiration_time = str(expiration_parse.strftime('%A %m/%d/%Y, %H:%M:%S'))+" "+str(timezone)
|
||||
|
||||
# Class for the javascript function to look for to toggle the hide function
|
||||
hide_expired = "expired-row" if not key_usable else ""
|
||||
|
||||
key_usable = False
|
||||
if key["reusable"] and not key_expired: key_usable = True
|
||||
if not key["reusable"] and not key["used"] and not key_expired: key_usable = True
|
||||
|
||||
# Class for the javascript function to look for to toggle the hide function
|
||||
hide_expired = "expired-row" if not key_usable else ""
|
||||
|
||||
tooltip_expired = "Expiration: "+expiration_time
|
||||
|
||||
|
||||
Reference in New Issue
Block a user