1
0
mirror of https://git.sr.ht/~cadence/bibliogram synced 2025-12-14 18:45:06 +00:00

Add request quota system

This commit is contained in:
Cadence Ember
2020-07-23 00:58:21 +12:00
parent 2095be2742
commit 112d9cc90e
17 changed files with 253 additions and 38 deletions

View File

@@ -0,0 +1,7 @@
.error-fragment
.message Quota reached
.explanation.
Each person has a limited number of requests to Bibliogram.
You have reached that limit. You cannot load any more data on this instance.
Your quota will reset automatically after some time has passed.
Or, you could try #[a(href="https://git.sr.ht/~cadence/bibliogram-docs/tree/master/docs/Instances.md") browsing Bibliogram on another instance.]

View File

@@ -95,6 +95,8 @@ html
.links
a(href="/")= ll.t_home
a(href=settingsReferrer)= ll.t_settings
if constants.quota.enabled
.quota Quota left: #[span#quota= remaining]
- const hasPosts = !user.data.is_private && selectedTimeline.pages.length && selectedTimeline.pages[0].length
.timeline-section