Skip to content

Commit b537a38

Browse files
committed
merge: fix Android release build and docs dark mode
2 parents b15292a + c10a7bd commit b537a38

9 files changed

Lines changed: 58 additions & 46 deletions

File tree

android/app/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ android {
1212
project.ext.set("appName", "Admincraft")
1313

1414
compileOptions {
15-
sourceCompatibility = JavaVersion.VERSION_1_8
16-
targetCompatibility = JavaVersion.VERSION_1_8
15+
sourceCompatibility = JavaVersion.VERSION_17
16+
targetCompatibility = JavaVersion.VERSION_17
1717
}
1818

1919
kotlinOptions {
20-
jvmTarget = JavaVersion.VERSION_1_8
20+
jvmTarget = JavaVersion.VERSION_17
2121
}
2222

2323
defaultConfig {

android/build.gradle

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
buildscript {
2-
repositories {
3-
google()
4-
mavenCentral()
5-
}
6-
dependencies {
7-
classpath 'com.android.tools.build:gradle:8.1.0'
8-
}
9-
}
10-
111
allprojects {
122
repositories {
133
google()

android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip

android/settings.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ pluginManagement {
1818

1919
plugins {
2020
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21-
id "com.android.application" version "8.1.0" apply false
22-
id "org.jetbrains.kotlin.android" version "1.9.22" apply false
21+
id "com.android.application" version "8.11.1" apply false
22+
id "org.jetbrains.kotlin.android" version "2.2.20" apply false
2323
}
2424

2525
include ":app"

docs/guides/web-app.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,18 @@ The hosted Admincraft page uses HTTPS. Browsers block an HTTPS page from connect
1414

1515
For the hosted web app, **Public certificate** (`wss://`) is the most reliable choice. A private-network connection can work from an Admincraft build served over HTTP, but should never be exposed to the public internet.
1616

17+
### Tailscale in the web app
18+
19+
A Tailscale address such as `100.x.y.z` cannot be used from the hosted page. **Private network** connects over `ws://`, which the browser blocks, and `wss://` is impossible for a tailnet address because no certificate authority will issue a certificate for it.
20+
21+
Use **[Tailscale Funnel](../server/SERVER_SETUP.md#alternative-tailscale-funnel-no-app-on-the-client)** instead. Funnel publishes the WebSocket on a `ts.net` hostname with a certificate that renews itself, which is exactly what the browser requires:
22+
23+
- **IP / Hostname:** the `ts.net` hostname from `tailscale funnel status`
24+
- **Port:** `443`
25+
- **Connection security:** `Public certificate`
26+
27+
The private tailnet address still works in the Windows and Android builds, which are not subject to mixed-content rules. So the rule of thumb is Funnel for the browser, tailnet address for the installed app.
28+
1729
## Self-signed certificates
1830

1931
Web pages cannot install or pin a certificate for a WebSocket connection. The **Self-signed certificate** option is therefore hidden in the web app.

docs/stylesheets/extra.css

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,23 @@
88
--md-accent-fg-color: #658746;
99
}
1010

11-
[data-md-color-scheme="admincraft-light"] {
12-
color-scheme: light;
11+
/* Tint Material's own schemes rather than declaring new ones.
12+
*
13+
* Material derives a lot from each scheme: --md-default-fg-color--light and
14+
* --lighter, --md-code-fg-color, table and border colours. Those are only
15+
* defined by the built-in schemes, so overriding the background alone leaves
16+
* every derived colour at its light-mode value. Extending "slate" keeps its
17+
* dark derivatives and changes just the brand colours. */
18+
[data-md-color-scheme="default"] {
1319
--md-default-bg-color: #fbf9f4;
1420
--md-default-fg-color: var(--admincraft-ink);
1521
--md-code-bg-color: #eee9dd;
1622
}
1723

18-
[data-md-color-scheme="admincraft-dark"] {
19-
color-scheme: dark;
24+
[data-md-color-scheme="slate"] {
25+
/* Warm the neutrals; the foreground colours stay Material's, which is what
26+
* keeps text and code readable here. */
2027
--md-default-bg-color: #171510;
21-
--md-default-fg-color: #eee9dd;
2228
--md-code-bg-color: #242018;
2329
--md-primary-fg-color: #543824;
2430
--md-accent-fg-color: #9dbc6f;

macos/Flutter/GeneratedPluginRegistrant.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
2020
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
2121
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
2222
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
23-
FLTWebViewFlutterPlugin.register(with: registry.registrar(forPlugin: "FLTWebViewFlutterPlugin"))
23+
WebViewFlutterPlugin.register(with: registry.registrar(forPlugin: "WebViewFlutterPlugin"))
2424
}

mkdocs.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,17 @@ theme:
1414
icon:
1515
repo: fontawesome/brands/github
1616
palette:
17+
# Built-in schemes, tinted in stylesheets/extra.css. A custom scheme name
18+
# inherits Material's light palette for every variable it does not set, so
19+
# the derived text, code and border colours stayed dark on a dark
20+
# background and much of the page became unreadable.
1721
- media: "(prefers-color-scheme: light)"
18-
scheme: admincraft-light
22+
scheme: default
1923
toggle:
2024
icon: material/weather-night
2125
name: Use dark mode
2226
- media: "(prefers-color-scheme: dark)"
23-
scheme: admincraft-dark
27+
scheme: slate
2428
toggle:
2529
icon: material/weather-sunny
2630
name: Use light mode

pubspec.lock

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ packages:
9393
dependency: "direct main"
9494
description:
9595
name: cupertino_icons
96-
sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6
96+
sha256: "41e005c33bd814be4d3096aff55b1908d419fde52ca656c8c47719ec745873cd"
9797
url: "https://pub.dev"
9898
source: hosted
99-
version: "1.0.8"
99+
version: "1.0.9"
100100
dart_jsonwebtoken:
101101
dependency: "direct main"
102102
description:
@@ -540,26 +540,26 @@ packages:
540540
dependency: "direct main"
541541
description:
542542
name: provider
543-
sha256: c8a055ee5ce3fd98d6fc872478b03823ffdb448699c6ebdbbc71d59b596fd48c
543+
sha256: "4e82183fa20e5ca25703ead7e05de9e4cceed1fbd1eadc1ac3cb6f565a09f272"
544544
url: "https://pub.dev"
545545
source: hosted
546-
version: "6.1.2"
546+
version: "6.1.5+1"
547547
shared_preferences:
548548
dependency: "direct main"
549549
description:
550550
name: shared_preferences
551-
sha256: "746e5369a43170c25816cc472ee016d3a66bc13fcf430c0bc41ad7b4b2922051"
551+
sha256: c3025c5534b01739267eb7d76959bbc25a6d10f6988e1c2a3036940133dd10bf
552552
url: "https://pub.dev"
553553
source: hosted
554-
version: "2.3.2"
554+
version: "2.5.5"
555555
shared_preferences_android:
556556
dependency: transitive
557557
description:
558558
name: shared_preferences_android
559-
sha256: "480ba4345773f56acda9abf5f50bd966f581dac5d514e5fc4a18c62976bbba7e"
559+
sha256: "0634e64bd719f89c012f392938e173521f535d3ecaf66558fa94a056d22b5cc7"
560560
url: "https://pub.dev"
561561
source: hosted
562-
version: "2.3.2"
562+
version: "2.4.27"
563563
shared_preferences_foundation:
564564
dependency: transitive
565565
description:
@@ -681,10 +681,10 @@ packages:
681681
dependency: "direct main"
682682
description:
683683
name: url_launcher
684-
sha256: "21b704ce5fa560ea9f3b525b43601c678728ba46725bab9b01187b4831377ed3"
684+
sha256: f6a7e5c4835bb4e3026a04793a4199ca2d14c739ec378fdfe23fc8075d0439f8
685685
url: "https://pub.dev"
686686
source: hosted
687-
version: "6.3.0"
687+
version: "6.3.2"
688688
url_launcher_android:
689689
dependency: transitive
690690
description:
@@ -769,10 +769,10 @@ packages:
769769
dependency: "direct main"
770770
description:
771771
name: web
772-
sha256: d43c1d6b787bf0afad444700ae7f4db8827f701bc61c255ac8d328c6f4d52062
772+
sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a"
773773
url: "https://pub.dev"
774774
source: hosted
775-
version: "1.0.0"
775+
version: "1.1.1"
776776
web_socket:
777777
dependency: transitive
778778
description:
@@ -785,42 +785,42 @@ packages:
785785
dependency: "direct main"
786786
description:
787787
name: web_socket_channel
788-
sha256: "9f187088ed104edd8662ca07af4b124465893caf063ba29758f97af57e61da8f"
788+
sha256: d645757fb0f4773d602444000a8131ff5d48c9e47adfe9772652dd1a4f2d45c8
789789
url: "https://pub.dev"
790790
source: hosted
791-
version: "3.0.1"
791+
version: "3.0.3"
792792
webview_flutter:
793793
dependency: "direct main"
794794
description:
795795
name: webview_flutter
796-
sha256: ec81f57aa1611f8ebecf1d2259da4ef052281cb5ad624131c93546c79ccc7736
796+
sha256: d53e1ccf5516f25017e3c9d44c39034db352d20fa34fe200674270242c2c5111
797797
url: "https://pub.dev"
798798
source: hosted
799-
version: "4.9.0"
799+
version: "4.14.1"
800800
webview_flutter_android:
801801
dependency: transitive
802802
description:
803803
name: webview_flutter_android
804-
sha256: "6e64fcb1c19d92024da8f33503aaeeda35825d77142c01d0ea2aa32edc79fdc8"
804+
sha256: b98656fa4461f8cc05c48a778b4d4883e60ec63e1778348f363f9bb9a477745d
805805
url: "https://pub.dev"
806806
source: hosted
807-
version: "3.16.7"
807+
version: "4.14.0"
808808
webview_flutter_platform_interface:
809809
dependency: transitive
810810
description:
811811
name: webview_flutter_platform_interface
812-
sha256: d937581d6e558908d7ae3dc1989c4f87b786891ab47bb9df7de548a151779d8d
812+
sha256: "1221c1b12f5278791042f2ec2841743784cf25c5a644e23d6680e5d718824f04"
813813
url: "https://pub.dev"
814814
source: hosted
815-
version: "2.10.0"
815+
version: "2.15.1"
816816
webview_flutter_wkwebview:
817817
dependency: transitive
818818
description:
819819
name: webview_flutter_wkwebview
820-
sha256: "1942a12224ab31e9508cf00c0c6347b931b023b8a4f0811e5dec3b06f94f117d"
820+
sha256: c879dd64b87c452aa84381b244d5469da57ba7e8cca6884c7b1e0d406372c12d
821821
url: "https://pub.dev"
822822
source: hosted
823-
version: "3.15.0"
823+
version: "3.26.0"
824824
win32:
825825
dependency: transitive
826826
description:

0 commit comments

Comments
 (0)