Port statistics and the news tablet to the Modern UI (by Codex)

This commit is contained in:
Codex committed 2026-10-25 20:10:57 +01:00
1 parent 349c416f3a
commit a45217c362
32 files changed
+2493 -23

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
// SPDX-License-Identifier: GPL-3.0-only
#pragma once
#include "modern/ui/catalog.hpp"
namespace bmh::modern_ui {
// Presentation-only journal. Templates remain persisted, then resolve against
// the current snapshot's first manager/club. No catalogue or engine mutation.
Json demo_news(const Catalog &, const Json &full_state);
bool valid_demo_news(const Json &full_state);
bool migrate_demo_news(Json &full_state, const Catalog &);
// read{id}, read-all{folder}, move{id,folder}, undo{patch:[{id,before,after}]}.
// Patches contain only {read,folder}; every expected after-value must match.
// The DataSource owns the outer revision check and atomic publication.
std::string edit_demo_news(Json &full_state, const Json &action,
const Catalog &);
int demo_news_unread(const Json &full_state);
// Read-only projection: counts, unread, shown items, can_read, club, manager,
// date. Query and folder belong to the view and never enter a checkpoint.
Json demo_news_view(const Catalog &, const Json &full_state,
const std::string &folder = "inbox",
const std::string &query = {});
std::string news_display_date(const std::string &);
} // namespace bmh::modern_ui