Limits are now account-tied rather than task-tied
This commit is contained in:
1 parent
315a2102a7
commit
0af468f47c
9 files changed
+235
-14
No files matched your search
@@ -26,9 +26,23 @@ std::optional<Status> parse(const std::string& text, std::time_t now);
|
||||
std::string serialize(const Status& status);
|
||||
std::optional<Status> deserialize(const std::string& text);
|
||||
|
||||
// Prompt and Testing tasks follow their account's wait; Uploading, Frozen and
|
||||
// Done tasks do not.
|
||||
bool followsAccountWait(StatusKind kind);
|
||||
|
||||
// The status to show for a task. If its account has a wait, the tasks that
|
||||
// follow it show Wait until then and Limit reset after; otherwise the stored
|
||||
// status is used (see effective).
|
||||
Status resolve(const Status& stored, const std::optional<std::time_t>& accountWait, std::time_t now);
|
||||
|
||||
// The status shown to the user: an expired wait becomes LimitReset.
|
||||
Status effective(const Status& status, std::time_t now);
|
||||
|
||||
// Times kept outside a Status (an account's cooldown): "2026-10-17T16:30".
|
||||
std::string timeToText(std::time_t value);
|
||||
std::optional<std::time_t> timeFromText(const std::string& text);
|
||||
std::string clockLabel(std::time_t value); // "16:30"
|
||||
|
||||
std::string label(const Status& status); // "Prompt", "Limit reset", "Wait 16:30", ...
|
||||
std::string kindName(StatusKind kind); // lowercase token: "prompt", "limit-reset", ...
|
||||
std::vector<StatusKind> allKinds();
|
||||
|
||||
Reference in new issue
Block a user