Spaces:
Sleeping
Sleeping
Update code
Browse files- dashboard.py +3 -0
- templates/users.html +1 -0
dashboard.py
CHANGED
|
@@ -173,6 +173,9 @@ def parse_timeframe(timeframe: str) -> tuple[int, int]:
|
|
| 173 |
elif timeframe == 'year':
|
| 174 |
start = today_start - timedelta(days=365)
|
| 175 |
end = now
|
|
|
|
|
|
|
|
|
|
| 176 |
elif timeframe == 'all':
|
| 177 |
return 0, int(now.timestamp())
|
| 178 |
else:
|
|
|
|
| 173 |
elif timeframe == 'year':
|
| 174 |
start = today_start - timedelta(days=365)
|
| 175 |
end = now
|
| 176 |
+
elif timeframe == '2years':
|
| 177 |
+
start = today_start - timedelta(days=730)
|
| 178 |
+
end = now
|
| 179 |
elif timeframe == 'all':
|
| 180 |
return 0, int(now.timestamp())
|
| 181 |
else:
|
templates/users.html
CHANGED
|
@@ -85,6 +85,7 @@
|
|
| 85 |
<option value="week">This Week</option>
|
| 86 |
<option value="month" selected>This Month</option>
|
| 87 |
<option value="year">This Year</option>
|
|
|
|
| 88 |
<option value="all">All Time</option>
|
| 89 |
</select>
|
| 90 |
<button onclick="loadUsers()" class="btn btn-primary">🔄 Refresh</button>
|
|
|
|
| 85 |
<option value="week">This Week</option>
|
| 86 |
<option value="month" selected>This Month</option>
|
| 87 |
<option value="year">This Year</option>
|
| 88 |
+
<option value="2years">2 Years</option>
|
| 89 |
<option value="all">All Time</option>
|
| 90 |
</select>
|
| 91 |
<button onclick="loadUsers()" class="btn btn-primary">🔄 Refresh</button>
|