check
This commit is contained in:
@@ -1,41 +0,0 @@
|
||||
/// Where the back office lives, and the fixed parts of a request to it.
|
||||
///
|
||||
/// Kept apart from [SyncConfig] on purpose. That one describes how *this
|
||||
/// terminal* was configured — which broker, which store, which credentials —
|
||||
/// and can be re-pointed from Settings without a rebuild. This one is the
|
||||
/// deployment's own address, needed before anyone has signed in and therefore
|
||||
/// before there is a configuration to read.
|
||||
class ApiConfig {
|
||||
const ApiConfig._();
|
||||
|
||||
/// Root of the POS API. Every other path below hangs off it.
|
||||
///
|
||||
/// The same base the catalogue and order endpoints already use, so pointing
|
||||
/// a build at staging is one edit rather than three.
|
||||
static const String baseUrl = 'https://fiesta.nearle.app/live/api/v1/pos';
|
||||
|
||||
/// `POST {baseUrl}{loginPath}`
|
||||
///
|
||||
/// ```json
|
||||
/// { "authname": "…", "password": "…", "device_id": "…", "configid": 1 }
|
||||
/// ```
|
||||
static const String loginPath = '/login';
|
||||
|
||||
/// Which configuration profile the back office should answer with. Fixed for
|
||||
/// this build; the server rejects a value it does not recognise.
|
||||
static const int configId = 1;
|
||||
|
||||
/// Sign-in is the one call a person is watching, so it fails faster than the
|
||||
/// catalogue pull does — thirty seconds of a spinner at the start of a shift
|
||||
/// reads as a hung terminal.
|
||||
static const Duration timeout = Duration(seconds: 25);
|
||||
|
||||
/// Whether the built-in demo accounts still work when the back office cannot
|
||||
/// be reached at all.
|
||||
///
|
||||
/// Set false for a real deployment. It exists so the app can be run against
|
||||
/// no server during development; it deliberately does **not** trigger on a
|
||||
/// rejected password, only on a network fault, so a wrong password never
|
||||
/// silently falls through to a local account.
|
||||
static const bool allowOfflineDemoLogin = true;
|
||||
}
|
||||
@@ -13,6 +13,10 @@ class AssetPaths {
|
||||
/// the login screen, the sidebar and the cashier header.
|
||||
static const String logo = '$_img/logo.png';
|
||||
|
||||
/// Shopfront photograph behind the sign-in screen. Blurred and darkened in
|
||||
/// place, so it reads as atmosphere rather than as something to look at.
|
||||
static const String loginBackground = '$_img/bg.webp';
|
||||
|
||||
static const String beepSuccess = '$_snd/beep_success.wav';
|
||||
static const String beepError = '$_snd/beep_error.wav';
|
||||
static const String chargeComplete = '$_snd/charge_complete.wav';
|
||||
|
||||
Reference in New Issue
Block a user