forge
Explore
Log in

Don't you dare go Hollow

The suite in the topbar, and a logout that ends the central session

Browse files at this commit

dbbff0d7ba62697a425fd7d3501cdbce8a5430f5Ahmet Kaan GümüşParent: a311758
  • feat
    • the suite in the topbar, and a logout that ends the central session
Show full message
feat(web): the suite in the topbar, and a logout that ends the central session

[[services]] entries render as a switcher beside the page nav (the app
you are in marked like the nav marks itself); no entries, no switcher.
Clearing the local cookie now walks the browser on to im's /logout with
this app's public address as back, so the central session ends too.
in-client grows logout_back for that. Carries the dev values in
config/in.toml (loopback issuer, in-dev-capture client, dev secret,
resolved storage line) and the [storage.r2] doc block from the storage
slice.
config/in.tomlmodified+57 -3
@@ -20,16 +20,70 @@ base_url = ""
2020 # created on boot. Not written here: it defaults to beside the database file,
2121 # and the boot completes this file with the value it resolved.
2222
23+# The suite the signed-in chrome's switcher links to: one [[services]]
24+# table per app — `key` the word the switcher renders, `name` its hover
25+# label, `url` the address the link points at (scheme and host, no
26+# trailing slash). In names itself among them so the switcher can mark
27+# where the reader is. Production sets these on the deploy side as
28+# https://<key>.dizey.sh; this committed copy carries only the
29+# development addresses.
30+# Where drive files, thumbnails and staged upload chunks live as files, created on boot.
31+storage = "/home/tahinli/Documents/Code/Rust/in/storage"
32+
33+[[services]]
34+key = "in"
35+name = "Files"
36+url = "http://127.0.0.1:7655"
37+
38+[[services]]
39+key = "im"
40+name = "Account"
41+url = "http://127.0.0.1:7650"
42+
43+[[services]]
44+key = "iz"
45+name = "Board"
46+url = "http://127.0.0.1:7654"
47+
2348 [oidc]
2449 # The provider that signs people in. Required: no default is guessed.
25-issuer = ""
50+issuer = "http://127.0.0.1:7650"
2651 # The client id In presents to the provider. Required.
27-client_id = ""
52+client_id = "in-dev-capture"
2853 # The client secret In presents to the provider. Required. Filled in only on
2954 # the machine that runs the server — the committed copy stays empty.
30-client_secret = ""
55+client_secret = "in-dev-secret"
3156 # Where the provider sends the browser back after sign-in. Not written here:
3257 # it defaults from `listen` on every boot, so moving the address never leaves
3358 # a stale callback behind. Set it only when the public address differs from
3459 # the bind address (a proxy in front, for instance).
3560 # redirect_uri = "http://127.0.0.1:7655/auth/callback"
61+
62+# Where the file bytes themselves live. With no [storage.r2] table, the
63+# bytes stay on local disk in the `storage` tree (files/ and thumbs/ beside
64+# the database) — the default, and the only shape every other key here
65+# describes.
66+#
67+# Setting [storage.r2] moves the file and thumbnail bytes into a Cloudflare
68+# R2 bucket. The database keeps every row, quota and piece of metadata —
69+# only the bytes move. `storage` still names the local tree either way:
70+# upload chunks stage there, then stream up to the bucket.
71+#
72+# [storage.r2]
73+# account_id — the R2 account id; the endpoint becomes
74+# https://<account_id>.r2.cloudflarestorage.com
75+# bucket — the bucket the blobs land in, under files/ and thumbs/ — the same
76+# layout the local tree uses, so an rclone maps one onto the other.
77+# key_file — a path (resolved against this config directory) to a file with
78+# two lines: the R2 access key id on the first, the secret on the second.
79+# Create it readable only by the user the server runs as (0600); it is
80+# read once at boot and never logged:
81+# (umask 077 && printf '%s\n%s\n' '<access key id>' '<secret>' > config/r2.keys)
82+#
83+# Absence is meaningful: no table, no bucket, local bytes. Nothing here is
84+# ever completed into the file for you.
85+#
86+# Migrating an existing deployment's bytes into the bucket — database and
87+# storage tree stay where they are; run once with the server stopped:
88+# rclone copy <storage>/files :r2,account=<id>,key=<id>:<bucket>/files
89+# rclone copy <storage>/thumbs :r2,account=<id>,key=<id>:<bucket>/thumbs
crates/in-client/examples/mint.rsmodified+1 -0
@@ -29,6 +29,7 @@ fn main() {
2929 redirect_uri: String::new(),
3030 cookie_name,
3131 cookie_key: key,
32+ logout_back: String::new(),
3233 };
3334 let exp = time::OffsetDateTime::now_utc() + time::Duration::days(1);
3435 println!("{}", in_client::mint_session_cookie(&config, &token, exp));
crates/in-client/src/lib.rsmodified+46 -4
@@ -44,6 +44,13 @@ pub struct Config {
4444 pub cookie_name: String,
4545 /// 32 bytes, generated once per app and kept out of the repository.
4646 pub cookie_key: [u8; 32],
47+ /// The app's public origin — `base_url` when the file sets one, else
48+ /// the address bound, derived the way the app derives its public links.
49+ /// After clearing the local cookie, `/auth/logout` walks the browser on
50+ /// to im's `/logout?back={logout_back}/`, so the central session ends
51+ /// and the person lands back at this app's front door. Empty is legal —
52+ /// im catches a stray `back` on its own `/` — but a real app sets it.
53+ pub logout_back: String,
4754 }
4855
4956 /// The registered state: the config, one HTTP client, and the JWKS cache.
@@ -534,12 +541,24 @@ async fn in_callback(cx: &Cx) -> Result<Response, topcoat::Error> {
534541 }
535542 }
536543
537-/// Signs out of the app only. To end the central session too, post to im's
538-/// `/logout` — a link there is a silent re-login, by design.
544+/// Signs out of the app, then out of im: the local cookie is cleared
545+/// first — this app forgets the person even if the central hop never
546+/// lands — and the browser is sent on to im's `/logout` with this app's
547+/// public address as `back`. im revokes the central session and returns
548+/// them here. The hop is a top-level navigation (the user menu's sign-out
549+/// link carries `data-hard`), never a fetch.
539550 #[route(GET "/auth/logout")]
540551 async fn in_logout(cx: &Cx) -> Result<Response, topcoat::Error> {
541- clear_cookie(cx, &client(cx).config.cookie_name);
542- see(cx, "/")
552+ let state = client(cx);
553+ clear_cookie(cx, &state.config.cookie_name);
554+ see(
555+ cx,
556+ &format!(
557+ "{}/logout?back={}",
558+ state.config.issuer,
559+ urlencoded(&format!("{}/", state.config.logout_back)),
560+ ),
561+ )
543562 }
544563
545564 fn urlencoded(raw: &str) -> String {
@@ -859,6 +878,7 @@ mod tests {
859878 redirect_uri: "http://app.test/auth/callback".into(),
860879 cookie_name: "in_session".into(),
861880 cookie_key: [7u8; 32],
881+ logout_back: String::new(),
862882 };
863883 assert_eq!(introspect_path(), "/introspect");
864884 let exp = OffsetDateTime::now_utc() + time::Duration::hours(1);
@@ -916,6 +936,27 @@ mod tests {
916936 );
917937 }
918938
939+ #[tokio::test]
940+ async fn logout_clears_the_cookie_and_walks_to_the_issuer() {
941+ let router = test_router(test_config("http://im.test".into()));
942+ let res = TestResponse::of(
943+ router
944+ .handle(get("/auth/logout", Some(&session_cookie("tok-1"))))
945+ .await,
946+ )
947+ .await;
948+ assert_eq!(res.status, http::StatusCode::SEE_OTHER);
949+ assert_eq!(
950+ res.location.as_deref(),
951+ Some("http://im.test/logout?back=http%3A%2F%2Fapp.test%2F"),
952+ "{}",
953+ res.text()
954+ );
955+ // This app forgets the person on the very answer, whatever im then
956+ // does with the central session.
957+ assert!(res.clears_session());
958+ }
959+
919960 #[route(GET "/whoami")]
920961 async fn whoami(cx: &Cx) -> Result<Response, topcoat::Error> {
921962 match current_user(cx).await {
@@ -932,6 +973,7 @@ mod tests {
932973 redirect_uri: "http://app.test/auth/callback".into(),
933974 cookie_name: "in_session".into(),
934975 cookie_key: [7u8; 32],
976+ logout_back: "http://app.test".into(),
935977 }
936978 }
937979
crates/in-core/src/config.rsmodified+102 -0
@@ -302,6 +302,10 @@ pub struct Config {
302302 /// banners that mint them — when the file sets one. `None` follows the
303303 /// address bound.
304304 pub base_url: Option<String>,
305+ /// The suite the signed-in chrome's switcher links to, from the
306+ /// `[[services]]` tables. An empty list is a file silent about any
307+ /// suite, and the chrome stays exactly as it has always been.
308+ pub services: Vec<ServiceConfig>,
305309 /// The OIDC provider In trusts.
306310 pub oidc: OidcConfig,
307311 /// Keys the file sets that nothing here reads, in the order the file
@@ -478,6 +482,22 @@ impl Config {
478482 })?;
479483 }
480484
485+ // The suite the chrome's switcher links to. A silent list keeps the
486+ // single-app chrome; an entry present must be whole, because a
487+ // wordmark pointing nowhere is worse than none — and its url must
488+ // be joinable to a link for the same reason `base_url` must.
489+ let mut services = Vec::new();
490+ for (i, entry) in toml.services.unwrap_or_default().into_iter().enumerate() {
491+ let key = value(entry.key)
492+ .ok_or_else(|| service_error(i, "its key is missing or empty".into()))?;
493+ let name = value(entry.name)
494+ .ok_or_else(|| service_error(i, "its name is missing or empty".into()))?;
495+ let url = value(entry.url)
496+ .ok_or_else(|| service_error(i, "its url is missing or empty".into()))?;
497+ Config::validate_base_url(&url).map_err(|why| service_error(i, why))?;
498+ services.push(ServiceConfig { key, name, url });
499+ }
500+
481501 let oidc_toml = toml.oidc.ok_or(ConfigError::Missing("[oidc]"))?;
482502 let issuer = value(oidc_toml.issuer).ok_or(ConfigError::Missing("oidc.issuer"))?;
483503 let client_id = value(oidc_toml.client_id).ok_or(ConfigError::Missing("oidc.client_id"))?;
@@ -501,6 +521,7 @@ impl Config {
501521 purge_after_days,
502522 default_quota_bytes,
503523 base_url,
524+ services,
504525 oidc: OidcConfig {
505526 issuer,
506527 client_id,
@@ -581,6 +602,15 @@ fn listen_url_of(listen: &SocketAddr) -> String {
581602 }
582603 }
583604
605+/// The boot error for a `[[services]]` entry that is not whole. Entries are
606+/// numbered from one, so the message names the offender a human can find.
607+fn service_error(index: usize, why: String) -> ConfigError {
608+ ConfigError::Invalid {
609+ key: "services",
610+ why: format!("entry {}: {why}", index + 1),
611+ }
612+}
613+
584614 impl Config {
585615 /// Whether a base URL is an origin a public link can be built on: an
586616 /// `http` or `https` scheme and no trailing slash. Shared by the file's
@@ -917,6 +947,78 @@ redirect_uri = "https://files.example.com/auth/callback"
917947 ));
918948 }
919949
950+ /// The switcher is off until the file names a suite: a `[[services]]`-less
951+ /// file is the chrome as it has always been, no half-rendered trio.
952+ #[test]
953+ fn a_file_without_services_leaves_the_switcher_off() {
954+ let scratch = Scratch::new();
955+ scratch.write(FULL);
956+ let config = scratch.load().unwrap();
957+ assert!(config.services.is_empty());
958+ }
959+
960+ #[test]
961+ fn services_parse_in_the_order_the_file_gives_them() {
962+ let scratch = Scratch::new();
963+ scratch.write(&FULL.replace(
964+ "[oidc]",
965+ "[[services]]\n\
966+ key = \"in\"\n\
967+ name = \"Files\"\n\
968+ url = \"https://files.example.com\"\n\
969+ \n\
970+ [[services]]\n\
971+ key = \"im\"\n\
972+ name = \"Account\"\n\
973+ url = \"https://id.example.com\"\n\
974+ [oidc]",
975+ ));
976+ let config = scratch.load().unwrap();
977+ assert_eq!(
978+ config.services,
979+ vec![
980+ ServiceConfig {
981+ key: "in".into(),
982+ name: "Files".into(),
983+ url: "https://files.example.com".into(),
984+ },
985+ ServiceConfig {
986+ key: "im".into(),
987+ name: "Account".into(),
988+ url: "https://id.example.com".into(),
989+ },
990+ ]
991+ );
992+ }
993+
994+ #[test]
995+ fn a_service_url_without_a_scheme_is_refused() {
996+ let scratch = Scratch::new();
997+ scratch.write(&FULL.replace(
998+ "[oidc]",
999+ "[[services]]\nkey = \"im\"\nname = \"Account\"\nurl = \"id.example.com\"\n[oidc]",
1000+ ));
1001+ assert!(matches!(
1002+ scratch.load().unwrap_err(),
1003+ ConfigError::Invalid { key: "services", .. }
1004+ ));
1005+ }
1006+
1007+ #[test]
1008+ fn an_incomplete_service_entry_names_the_offender() {
1009+ let scratch = Scratch::new();
1010+ scratch.write(&FULL.replace(
1011+ "[oidc]",
1012+ "[[services]]\nkey = \"im\"\nname = \"\"\nurl = \"https://id.example.com\"\n[oidc]",
1013+ ));
1014+ let err = scratch.load().unwrap_err();
1015+ assert!(matches!(
1016+ err,
1017+ ConfigError::Invalid { key: "services", .. }
1018+ ));
1019+ assert!(err.to_string().contains("entry 1"), "{err}");
1020+ }
1021+
9201022 #[test]
9211023 fn zero_live_seconds_is_refused() {
9221024 let scratch = Scratch::new();
crates/in-core/src/lib.rsmodified+1 -1
@@ -20,7 +20,7 @@ pub use store::{
2020 };
2121
2222 #[cfg(feature = "server")]
23-pub use config::{Config, ConfigError, OidcConfig};
23+pub use config::{Config, ConfigError, OidcConfig, ServiceConfig};
2424 #[cfg(feature = "server")]
2525 pub use live::{Change, Topic, next_seq};
2626 #[cfg(feature = "server")]
crates/in-web/src/layout.rsmodified+39 -2
@@ -221,14 +221,51 @@ pub async fn topbar_nav(cx: &Cx, active: NavPage, lang: Lang) -> Result {
221221 }
222222 }
223223
224-/// The signed-in chrome: the monogram, the page nav, the identity menu.
225-/// Wave-2 pages render their content under this.
224+/// This app's key in the `[[services]]` list: the entry matching it is the
225+/// one marked as where the reader already is.
226+const SELF_KEY: &str = "in";
227+
228+/// The topbar's suite switcher: every `[[services]]` entry as its wordmark,
229+/// beside the page nav, the current one marked. Rendered only when the file
230+/// names a suite — a file silent about the others keeps the chrome exactly
231+/// as it has always been. The links point at the services' own addresses,
232+/// so the cross-origin ones navigate the browser natively; this app's entry
233+/// lands where a soft-nav swap would have gone anyway.
234+async fn app_switcher(cx: &Cx) -> Result {
235+ let empty = app(cx).config.services.is_empty();
236+ view! {
237+ cx =>
238+ if !empty {
239+ <nav class="app-switcher">
240+ for service in &app(cx).config.services {
241+ <a
242+ class=(if service.key == SELF_KEY {
243+ "app-switcher-mark app-switcher-here"
244+ } else {
245+ "app-switcher-mark"
246+ })
247+ href=(format!("{}/", service.url))
248+ title=(service.name.clone())
249+ aria-current=((service.key == SELF_KEY).then_some("page"))
250+ >
251+ (service.key.clone())
252+ </a>
253+ }
254+ </nav>
255+ <span class="topbar-divider"></span>
256+ }
257+ }
258+}
259+
260+/// The signed-in chrome: the monogram, the page nav, the suite switcher,
261+/// the identity menu. Wave-2 pages render their content under this.
226262 pub async fn topbar(cx: &Cx, active: NavPage, user: &User, lang: Lang) -> Result {
227263 view! {
228264 cx =>
229265 <header class="topbar">
230266 (mark(cx).await?)
231267 (topbar_nav(cx, active, lang).await?)
268+ (app_switcher(cx).await?)
232269 (user_menu(cx, user, lang).await?)
233270 </header>
234271 (avatar_script(cx).await?)
crates/in-web/src/main.rsmodified+3 -0
@@ -207,6 +207,9 @@ async fn main() {
207207 redirect_uri: config.oidc.redirect_uri.clone(),
208208 cookie_name: "in_session".to_string(),
209209 cookie_key,
210+ // Where im's `/logout` sends the browser after the central
211+ // sign-out: the same origin public links carry.
212+ logout_back: config.public_origin(),
210213 };
211214
212215 // Told when the process is stopping, so the live streams end instead of
crates/in-web/tests/http.rsmodified+58 -7
@@ -9,14 +9,13 @@
99 //!
1010 //! New HTTP tests belong in this file rather than a new `tests/*.rs`: one
1111 //! test binary links and runs once.
12-
12+use in_core::{Config, OidcConfig, ServiceConfig};
1313 use std::collections::HashMap;
1414 use std::path::PathBuf;
1515 use std::sync::{Arc, Mutex};
1616
1717 use http::{HeaderValue, Request, StatusCode, header};
1818 use in_core::store::{ShareKind, Store, TursoStore};
19-use in_core::{Config, OidcConfig};
2019 use in_web::server::App;
2120 use topcoat::asset::{AssetBundle, RouterBuilderAssetExt};
2221 use topcoat::cookie::RouterBuilderCookieExt;
@@ -316,12 +315,13 @@ struct TestApp {
316315
317316 impl TestApp {
318317 async fn build() -> Self {
319- Self::build_with(None).await
318+ Self::build_with(None, Vec::new()).await
320319 }
321320
322321 /// The same workspace with a config `base_url` set — the key that
323- /// decides where the public links are told to point.
324- async fn build_with(base_url: Option<&str>) -> Self {
322+ /// decides where the public links are told to point — and optional
323+ /// `[[services]]` entries, the suite the topbar's switcher links to.
324+ async fn build_with(base_url: Option<&str>, services: Vec<ServiceConfig>) -> Self {
325325 let dir = std::env::temp_dir().join(format!("in-http-{}", Ulid::new()));
326326 std::fs::create_dir_all(&dir).unwrap();
327327 let db = dir.join("in.db");
@@ -339,6 +339,7 @@ impl TestApp {
339339 redirect_uri: "http://127.0.0.1:7655/auth/callback".to_string(),
340340 cookie_name: "in_session".to_string(),
341341 cookie_key: [7u8; 32],
342+ logout_back: "http://127.0.0.1:7655".to_string(),
342343 };
343344 let config = Config {
344345 database: db.to_str().unwrap().to_string(),
@@ -348,6 +349,7 @@ impl TestApp {
348349 purge_after_days: 30,
349350 default_quota_bytes: 10 * 1024 * 1024 * 1024,
350351 base_url: base_url.map(str::to_string),
352+ services,
351353 r2: None,
352354 oidc: OidcConfig {
353355 issuer: fake.url(),
@@ -2693,6 +2695,55 @@ async fn topbar_nav_has_no_search_link() {
26932695 assert!(!nav.contains("Search"), "search leaked into the nav: {nav}");
26942696 }
26952697
2698+#[tokio::test]
2699+async fn the_suite_switcher_renders_when_services_are_set() {
2700+ // No [[services]]: no switcher — the chrome as it always was.
2701+ let bare = TestApp::build().await;
2702+ let cookie = bare
2703+ .sign_in("sub-switch0", "switch0@in.test", "Switch0")
2704+ .await;
2705+ let page = bare.get("/drive", Some(&cookie)).await;
2706+ assert_eq!(page.status, StatusCode::OK, "{}", page.text());
2707+ assert!(!page.text().contains("app-switcher"), "{}", page.text());
2708+
2709+ let app = TestApp::build_with(
2710+ None,
2711+ vec![
2712+ ServiceConfig {
2713+ key: "in".into(),
2714+ name: "Files".into(),
2715+ url: "https://files.example.com".into(),
2716+ },
2717+ ServiceConfig {
2718+ key: "im".into(),
2719+ name: "Account".into(),
2720+ url: "https://id.example.com".into(),
2721+ },
2722+ ServiceConfig {
2723+ key: "iz".into(),
2724+ name: "Board".into(),
2725+ url: "https://board.example.com".into(),
2726+ },
2727+ ],
2728+ )
2729+ .await;
2730+ let cookie = app.sign_in("sub-switch", "switch@in.test", "Switch").await;
2731+ let page = app.get("/drive", Some(&cookie)).await;
2732+ assert_eq!(page.status, StatusCode::OK, "{}", page.text());
2733+ let body = page.text();
2734+ let nav_start = body.find("app-switcher").expect("no switcher");
2735+ let nav_end = body[nav_start..]
2736+ .find("</nav>")
2737+ .expect("switcher never closes");
2738+ let nav = &body[nav_start..nav_start + nav_end];
2739+ assert!(nav.contains("href=\"https://files.example.com/\""), "{nav}");
2740+ assert!(nav.contains("href=\"https://id.example.com/\""), "{nav}");
2741+ assert!(nav.contains("href=\"https://board.example.com/\""), "{nav}");
2742+ assert!(nav.contains("title=\"Files\""), "{nav}");
2743+ // Exactly the app the reader is already in is marked.
2744+ assert_eq!(nav.matches("aria-current").count(), 1, "{nav}");
2745+}
2746+
26962747 // -- settings ---------------------------------------------------------------
26972748
26982749 #[tokio::test]
@@ -2791,7 +2842,7 @@ async fn settings_quota_and_disable_guards() {
27912842 /// `base_url`.
27922843 #[tokio::test]
27932844 async fn share_links_carry_the_configured_base_url() {
2794- let app = TestApp::build_with(Some("https://files.example.com")).await;
2845+ let app = TestApp::build_with(Some("https://files.example.com"), Vec::new()).await;
27952846 let admin = app.sign_in("sub-admin", "ada@in.test", "Ada").await;
27962847 let owner = owner_of(&app, "sub-admin").await;
27972848 let file = file_id(&app, &owner, "notes.txt", b"hello in").await;
@@ -3118,7 +3169,7 @@ async fn server_address_setting_drives_share_links() {
31183169 /// file sets one: the setting wins only while it is non-empty.
31193170 #[tokio::test]
31203171 async fn cleared_setting_falls_back_to_the_configured_base_url() {
3121- let app = TestApp::build_with(Some("https://cfg.example.com")).await;
3172+ let app = TestApp::build_with(Some("https://cfg.example.com"), Vec::new()).await;
31223173 let admin = app.sign_in("sub-admin", "ada@in.test", "Ada").await;
31233174 let owner = owner_of(&app, "sub-admin").await;
31243175 let file = file_id(&app, &owner, "notes.txt", b"hello in").await;
style/main.scssmodified+32 -0
@@ -479,6 +479,34 @@ a {
479479 }
480480 }
481481
482+// The suite switcher: the other apps of the family, as their wordmarks,
483+// beside the page nav. Rendered only when `[[services]]` is set; the app
484+// the reader is already in is marked the way the page nav marks itself.
485+.app-switcher {
486+ display: flex;
487+ align-items: center;
488+ gap: 14px;
489+ // The trio keeps its width at every width: the page nav beside it is the
490+ // region that pans under the finger, this never squishes.
491+ flex: none;
492+
493+ &-mark {
494+ font-family: var(--font-mono);
495+ font-size: 13px;
496+ font-weight: 500;
497+ letter-spacing: 0.02em;
498+ color: var(--muted);
499+ text-decoration: none;
500+
501+ &:hover { color: var(--ink); }
502+ }
503+ // The current app, spelled out — `&` stays at the head of a compound
504+ // selector here, so the pair of classes cannot ride the ampersand.
505+ .app-switcher-mark.app-switcher-here {
506+ color: var(--ink);
507+ box-shadow: inset 0 -2px 0 var(--ink);
508+ }
509+}
482510 .scaffold-note {
483511 margin: 24px;
484512 padding: 20px 24px;
@@ -4318,6 +4346,8 @@ input[type="radio"] {
43184346 &::-webkit-scrollbar { display: none; }
43194347 }
43204348
4349+ .app-switcher { gap: 10px; }
4350+
43214351 // The avatar says who is signed in at this width; the name is the menu's.
43224352 .user-menu-trigger-name { display: none; }
43234353
@@ -4330,6 +4360,8 @@ input[type="radio"] {
43304360 }
43314361
43324362 .topbar-nav-links { gap: 10px; }
4363+
4364+ .app-switcher { gap: 8px; }
43334365 }
43344366
43354367 // -- board -----------------------------------------------------------------