Files
sepot/app/lib/core/constants/app_constants.dart
T
Julius Joska 5246a97db2 feat(app): redesigned interface, polls, drafts, forwarding and mentions
A new look across the app and a set of everyday messaging features.

Interface
- Home screen with Chats, Contacts and Settings tabs, a large title,
  search across chats and message text (diacritics-insensitive), filters
  and pinned chats.
- Conversation view with a translucent header and composer, grouped
  bubbles, author avatars and colours in groups, swipe to reply, an
  "N new messages" marker, a jump-to-latest button and in-chat search.
- Contact and group profiles: verification, shared photos, groups in
  common, disappearing messages, mute, block; members, admin badges,
  adding people, rename and leave for groups.
- Full-screen photo viewer that pages through the whole conversation.
- A stable avatar colour per person and a clearly visible read state.

Messaging
- Polls in chats and groups, single or multiple choice, with votes that
  can be changed or withdrawn; older clients see them as text.
- Drafts survive leaving a chat and show in the chat list.
- Forwarding of messages, photos, files and voice messages.
- Notes to self: a local-only, encrypted chat that never reaches the
  relay.
- @mentions in groups that notify even when the group is muted.
- Typing indicators sent as ephemeral messages, opt-in and mutual like
  read receipts.
- Delivery and read times per message and per group member.
- Profile photos, cropped, resized and stripped of metadata, delivered
  encrypted to contacts.
- Voice message playback at 1.5x and 2x.
- Call buttons in 1:1 chats and call log entries.

Fixes
- Muted groups no longer notify: muting was checked against the
  author's chat instead of the group.
- A blocked contact could unblock itself by changing its delivery
  address.
- Read receipts no longer regress to delivered when a late delivery
  receipt arrives.
- A message marked as failed corrects itself once it is delivered.
- Double ticks in groups now mean delivered to every member.
2026-10-03 22:44:53 +02:00

68 lines
2.8 KiB
Dart

/// Konstanty aplikace Šepot
class AppConstants {
AppConstants._();
static const String appName = 'Šepot';
static const String appAuthor = 'ajtak.it';
/// Id konverzace „Poznámky pro sebe“. Nekoliduje s fingerprintem (hex)
/// ani s gid skupiny (UUID); podle něj se pozná, že nic nejde do sítě.
static const String notesConversationId = 'notes';
// Relay server (REST + WS na jednom portu). Přepsatelné při buildu:
// flutter build --dart-define=SEPOT_RELAY=http://<dev-relay-host>:8470
static const String relayUrl = String.fromEnvironment(
'SEPOT_RELAY',
defaultValue: 'https://relay.sepot.cz',
);
// Tor onion vstup relaye (HiddenServicePort 80 → relay:8470; onion vrstva
// šifruje, TLS uvnitř netřeba). Používá se, když je v nastavení zapnutý
// Tor — provoz jde přes SOCKS5 (Orbot) a jméno .onion resolvuje Tor
// (viz TorTransport / MessagingService.setTorEnabled).
static const String relayOnion =
'http://cipjsctoeyf4fcrntvdvt22o2ansgr73qvthmewo246vuntd7cqmykyd.onion';
// Kryptografické konstanty
static const int pinLength = 6;
// 24 slov = 32 B identity klíče enkódovaného přes BIP39 (žádný KDF)
static const int seedPhraseWords = 24;
// Úložiště - názvy Hive boxů
static const String identityBox = 'identity';
static const String contactsBox = 'contacts';
static const String conversationsBox = 'conversations';
static const String messagesBox = 'messages';
static const String settingsBox = 'settings';
// Nastavení zpráv
static const int maxMessageLength = 4096;
static const int defaultDisappearingSeconds = 86400; // 24 hodin
// Přílohy — musí sedět s relayem (SEPOT_MAX_ATTACHMENT_BYTES, default
// 25 MiB na ŠIFROVANÝ blob; plaintext strop držíme kousek pod tím)
static const int maxAttachmentBytes = 25 * 1024 * 1024 - 64 * 1024;
// Auto-lock timeout (v sekundách)
static const int autoLockTimeout = 300; // 5 minut
// Nahlašování zneužití. Endpoint NENÍ na relayi: relay drží jen opaque
// obálky a nesmí získat čitelný kanál k obsahu. Nahlášení jde na web,
// odkud chodí e-mail — a odesílatel je o tom v UI zpraven.
static const String reportEndpoint = String.fromEnvironment(
'SEPOT_REPORT_ENDPOINT',
defaultValue: 'https://sepot.cz/api/nahlaseni',
);
/// Veřejné standardy ochrany dětí (Google Play CSAE, Apple 1.2).
static const String childSafetyUrl = 'https://sepot.cz/bezpecnost-deti';
/// Apple Guideline 5.1.1(i) žádá odkaz na zásady soukromí i UVNITŘ aplikace,
/// nejen v metadatech obchodu.
static const String privacyUrl = 'https://sepot.cz/ochrana-soukromi';
static const String termsUrl = 'https://sepot.cz/podminky';
static const String deletionUrl = 'https://sepot.cz/smazani-dat';
static const String supportEmail = 'podpora@sepot.cz';
}