rottg commited on
Commit
999a034
·
verified ·
1 Parent(s): a922175

Update code

Browse files
Files changed (2) hide show
  1. dashboard.py +3 -0
  2. 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>