26 lines
1.3 KiB
C++
26 lines
1.3 KiB
C++
// SPDX-License-Identifier: GPL-3.0-only
|
|
#pragma once
|
|
#include "modern/ui/catalog.hpp"
|
|
|
|
namespace bmh::modern_ui {
|
|
// Presentation-only journal with historical text/owner snapshots. Unknown v1
|
|
// ownership is retained separately, never inferred from the current manager.
|
|
Json demo_news(const Catalog &, const Json &full_state);
|
|
Json demo_news_scope(const Json &, const Catalog * = nullptr);
|
|
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 = {},
|
|
const std::string &language = "de");
|
|
std::string news_display_date(const std::string &);
|
|
} // namespace bmh::modern_ui
|