implement cooldown config option for cards

This commit is contained in:
joBr99
2023-02-01 22:44:18 +01:00
parent 0ca1982ebc
commit 5050e430ec
2 changed files with 10 additions and 2 deletions

View File

@@ -648,6 +648,13 @@ class LuiPagesGen(object):
def render_card(self, card, send_page_type=True):
# page type is false, so this request is from a callback
if not send_page_type and card.cooldown != 0:
if (time.time()-card.last_update) < card.cooldown:
return
card.last_update = time.time()
leftBtn = "delete~~~~~"
if card.uuid_prev is not None:
leftBtn = self.generate_entities_item(Entity(