Skip to content

A cross platform Audiobookshelf client for Android and iOS

Dart

Replace login files with links for easier account setup

Barnabasfe8f8f30e903
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index f3dbb0c9..2f0fed20 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -24,6 +24,7 @@
<activity android:name=".MainActivity" android:exported="true" android:launchMode="singleTask" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize">
<meta-data android:name="io.flutter.embedding.android.NormalTheme" android:resource="@style/NormalTheme"/>
+ <meta-data android:name="flutter_deeplinking_enabled" android:value="false"/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
@@ -33,6 +34,12 @@
<action android:name="com.ryanheise.audioservice.NOTIFICATION_CLICK"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
+ <intent-filter android:label="Absorb sign-in">
+ <action android:name="android.intent.action.VIEW"/>
+ <category android:name="android.intent.category.DEFAULT"/>
+ <category android:name="android.intent.category.BROWSABLE"/>
+ <data android:scheme="absorb" android:host="setup"/>
+ </intent-filter>
</activity>
<!-- OIDC callback via Chrome Custom Tab (flutter_web_auth_2) -->
@@ -214,4 +221,4 @@
<data android:mimeType="text/plain"/>
</intent>
</queries>
-</manifest>
\ No newline at end of file
+</manifest>
diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist
index 18227681..80a93c30 100644
--- a/ios/Runner/Info.plist
+++ b/ios/Runner/Info.plist
@@ -24,6 +24,8 @@
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
+ <key>FlutterDeepLinkingEnabled</key>
+ <false/>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIApplicationSceneManifest</key>
@@ -97,6 +99,16 @@
<string>audiobookshelf</string>
</array>
</dict>
+ <dict>
+ <key>CFBundleTypeRole</key>
+ <string>Viewer</string>
+ <key>CFBundleURLName</key>
+ <string>com.barnabas.absorb.setup</string>
+ <key>CFBundleURLSchemes</key>
+ <array>
+ <string>absorb</string>
+ </array>
+ </dict>
</array>
<key>UIStatusBarHidden</key>
<false/>
diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb
index bbbf672b..ee828f36 100644
--- a/lib/l10n/app_en.arb
+++ b/lib/l10n/app_en.arb
@@ -72,25 +72,55 @@
"@loginSignedInAs": {
"placeholders": { "username": { "type": "String" } }
},
- "adminCreateSetupFile": "Create setup file",
- "adminSetupFileDescription": "Creates a sign-in file for {username} that only works in the Absorb app. They import it from the login screen to sign in.",
+ "adminCreateSetupFile": "Share sign-in",
+ "adminSetupFileDescription": "Creates a private sign-in link for {username} that only works in the Absorb app.",
"@adminSetupFileDescription": {
"placeholders": { "username": { "type": "String" } }
},
"adminSetupFileServerUrl": "Server URL the new user will use",
- "adminSetupFileNoteWithHeaders": "An API key will be created for this user and your custom headers are included so they can reach the server. Treat the file like a password.",
- "adminSetupFileNote": "An API key will be created for this user. Treat the file like a password.",
- "adminSetupFileCreate": "Create",
+ "adminSetupFileNoteWithHeaders": "A dedicated API key and your custom headers will be included so they can reach the server. Treat the link like a password.",
+ "adminSetupFileNote": "A dedicated API key will be included. Treat the link like a password.",
+ "adminSetupFileCreate": "Create link",
"adminSetupFileSaveTitle": "Save setup file",
"adminSetupFileKeyError": "Could not create an API key for this user",
"adminSetupFileSaved": "Setup file for {username} saved",
"@adminSetupFileSaved": {
"placeholders": { "username": { "type": "String" } }
},
- "adminSetupFileFailed": "Failed to create setup file: {error}",
+ "adminSetupFileFailed": "Failed to create sign-in: {error}",
"@adminSetupFileFailed": {
"placeholders": { "error": { "type": "String" } }
},
+ "setupLinkShareTitle": "Share sign-in",
+ "setupLinkShareDescription": "Send this private link or have them scan the QR code to sign in as {username}.",
+ "@setupLinkShareDescription": {
+ "placeholders": { "username": { "type": "String" } }
+ },
+ "setupLinkPrivateWarning": "Anyone with this link can sign in as {username}. Treat it like a password.",
+ "@setupLinkPrivateWarning": {
+ "placeholders": { "username": { "type": "String" } }
+ },
+ "setupLinkShare": "Share link",
+ "setupLinkCopy": "Copy link",
+ "setupLinkCopied": "Sign-in link copied",
+ "setupLinkSaveFile": "Save setup file",
+ "setupLinkQrError": "This setup link is too large for a QR code. Share the link instead.",
+ "setupLinkShareSubject": "Absorb sign-in for {username}",
+ "@setupLinkShareSubject": {
+ "placeholders": { "username": { "type": "String" } }
+ },
+ "setupLinkConfirmTitle": "Sign in with this link?",
+ "setupLinkConfirmBody": "Sign in to {server} as {username}? Only continue if you trust who sent this link.",
+ "@setupLinkConfirmBody": {
+ "placeholders": {
+ "server": { "type": "String" },
+ "username": { "type": "String" }
+ }
+ },
+ "setupLinkInvalid": "This sign-in link is invalid or incomplete",
+ "setupLinkSigningIn": "Checking sign-in link...",
+ "loginPasteLink": "Paste login link",
+ "loginPasteLinkHelp": "Paste the complete sign-in link you received. Treat it like a password.",
"loginFailed": "Login failed",
"loginSsoFailed": "SSO login failed or was cancelled",
"loginSsoAuthFailed": "SSO authentication failed. Please try again.",
diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dart
index 984ec35e..1b357d7d 100644
--- a/lib/l10n/app_localizations.dart
+++ b/lib/l10n/app_localizations.dart
@@ -517,13 +517,13 @@ abstract class AppLocalizations {
/// No description provided for @adminCreateSetupFile.
///
/// In en, this message translates to:
- /// **'Create setup file'**
+ /// **'Share sign-in'**
String get adminCreateSetupFile;
/// No description provided for @adminSetupFileDescription.
///
/// In en, this message translates to:
- /// **'Creates a sign-in file for {username} that only works in the Absorb app. They import it from the login screen to sign in.'**
+ /// **'Creates a private sign-in link for {username} that only works in the Absorb app.'**
String adminSetupFileDescription(String username);
/// No description provided for @adminSetupFileServerUrl.
@@ -535,19 +535,19 @@ abstract class AppLocalizations {
/// No description provided for @adminSetupFileNoteWithHeaders.
///
/// In en, this message translates to:
- /// **'An API key will be created for this user and your custom headers are included so they can reach the server. Treat the file like a password.'**
+ /// **'A dedicated API key and your custom headers will be included so they can reach the server. Treat the link like a password.'**
String get adminSetupFileNoteWithHeaders;
/// No description provided for @adminSetupFileNote.
///
/// In en, this message translates to:
- /// **'An API key will be created for this user. Treat the file like a password.'**
+ /// **'A dedicated API key will be included. Treat the link like a password.'**
String get adminSetupFileNote;
/// No description provided for @adminSetupFileCreate.
///
/// In en, this message translates to:
- /// **'Create'**
+ /// **'Create link'**
String get adminSetupFileCreate;
/// No description provided for @adminSetupFileSaveTitle.
@@ -571,9 +571,99 @@ abstract class AppLocalizations {
/// No description provided for @adminSetupFileFailed.
///
/// In en, this message translates to:
- /// **'Failed to create setup file: {error}'**
+ /// **'Failed to create sign-in: {error}'**
String adminSetupFileFailed(String error);
+ /// No description provided for @setupLinkShareTitle.
+ ///
+ /// In en, this message translates to:
+ /// **'Share sign-in'**
+ String get setupLinkShareTitle;
+
+ /// No description provided for @setupLinkShareDescription.
+ ///
+ /// In en, this message translates to:
+ /// **'Send this private link or have them scan the QR code to sign in as {username}.'**
+ String setupLinkShareDescription(String username);
+
+ /// No description provided for @setupLinkPrivateWarning.
+ ///
+ /// In en, this message translates to:
+ /// **'Anyone with this link can sign in as {username}. Treat it like a password.'**
+ String setupLinkPrivateWarning(String username);
+
+ /// No description provided for @setupLinkShare.
+ ///
+ /// In en, this message translates to:
+ /// **'Share link'**
+ String get setupLinkShare;
+
+ /// No description provided for @setupLinkCopy.
+ ///
+ /// In en, this message translates to:
+ /// **'Copy link'**
+ String get setupLinkCopy;
+
+ /// No description provided for @setupLinkCopied.
+ ///
+ /// In en, this message translates to:
+ /// **'Sign-in link copied'**
+ String get setupLinkCopied;
+
+ /// No description provided for @setupLinkSaveFile.
+ ///
+ /// In en, this message translates to:
+ /// **'Save setup file'**
+ String get setupLinkSaveFile;
+
+ /// No description provided for @setupLinkQrError.
+ ///
+ /// In en, this message translates to:
+ /// **'This setup link is too large for a QR code. Share the link instead.'**
+ String get setupLinkQrError;
+
+ /// No description provided for @setupLinkShareSubject.
+ ///
+ /// In en, this message translates to:
+ /// **'Absorb sign-in for {username}'**
+ String setupLinkShareSubject(String username);
+
+ /// No description provided for @setupLinkConfirmTitle.
+ ///
+ /// In en, this message translates to:
+ /// **'Sign in with this link?'**
+ String get setupLinkConfirmTitle;
+
+ /// No description provided for @setupLinkConfirmBody.
+ ///
+ /// In en, this message translates to:
+ /// **'Sign in to {server} as {username}? Only continue if you trust who sent this link.'**
+ String setupLinkConfirmBody(String server, String username);
+
+ /// No description provided for @setupLinkInvalid.
+ ///
+ /// In en, this message translates to:
+ /// **'This sign-in link is invalid or incomplete'**
+ String get setupLinkInvalid;
+
+ /// No description provided for @setupLinkSigningIn.
+ ///
+ /// In en, this message translates to:
+ /// **'Checking sign-in link...'**
+ String get setupLinkSigningIn;
+
+ /// No description provided for @loginPasteLink.
+ ///
+ /// In en, this message translates to:
+ /// **'Paste login link'**
+ String get loginPasteLink;
+
+ /// No description provided for @loginPasteLinkHelp.
+ ///
+ /// In en, this message translates to:
+ /// **'Paste the complete sign-in link you received. Treat it like a password.'**
+ String get loginPasteLinkHelp;
+
/// No description provided for @loginFailed.
///
/// In en, this message translates to:
diff --git a/lib/l10n/app_localizations_de.dart b/lib/l10n/app_localizations_de.dart
index 5b652059..2db944d6 100644
--- a/lib/l10n/app_localizations_de.dart
+++ b/lib/l10n/app_localizations_de.dart
@@ -218,11 +218,11 @@ class AppLocalizationsDe extends AppLocalizations {
}
@override
- String get adminCreateSetupFile => 'Create setup file';
+ String get adminCreateSetupFile => 'Share sign-in';
@override
String adminSetupFileDescription(String username) {
- return 'Creates a sign-in file for $username that only works in the Absorb app. They import it from the login screen to sign in.';
+ return 'Creates a private sign-in link for $username that only works in the Absorb app.';
}
@override
@@ -230,14 +230,14 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get adminSetupFileNoteWithHeaders =>
- 'An API key will be created for this user and your custom headers are included so they can reach the server. Treat the file like a password.';
+ 'A dedicated API key and your custom headers will be included so they can reach the server. Treat the link like a password.';
@override
String get adminSetupFileNote =>
- 'An API key will be created for this user. Treat the file like a password.';
+ 'A dedicated API key will be included. Treat the link like a password.';
@override
- String get adminSetupFileCreate => 'Create';
+ String get adminSetupFileCreate => 'Create link';
@override
String get adminSetupFileSaveTitle => 'Save setup file';
@@ -253,9 +253,64 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String adminSetupFileFailed(String error) {
- return 'Failed to create setup file: $error';
+ return 'Failed to create sign-in: $error';
}
+ @override
+ String get setupLinkShareTitle => 'Share sign-in';
+
+ @override
+ String setupLinkShareDescription(String username) {
+ return 'Send this private link or have them scan the QR code to sign in as $username.';
+ }
+
+ @override
+ String setupLinkPrivateWarning(String username) {
+ return 'Anyone with this link can sign in as $username. Treat it like a password.';
+ }
+
+ @override
+ String get setupLinkShare => 'Share link';
+
+ @override
+ String get setupLinkCopy => 'Copy link';
+
+ @override
+ String get setupLinkCopied => 'Sign-in link copied';
+
+ @override
+ String get setupLinkSaveFile => 'Save setup file';
+
+ @override
+ String get setupLinkQrError =>
+ 'This setup link is too large for a QR code. Share the link instead.';
+
+ @override
+ String setupLinkShareSubject(String username) {
+ return 'Absorb sign-in for $username';
+ }
+
+ @override
+ String get setupLinkConfirmTitle => 'Sign in with this link?';
+
+ @override
+ String setupLinkConfirmBody(String server, String username) {
+ return 'Sign in to $server as $username? Only continue if you trust who sent this link.';
+ }
+
+ @override
+ String get setupLinkInvalid => 'This sign-in link is invalid or incomplete';
+
+ @override
+ String get setupLinkSigningIn => 'Checking sign-in link...';
+
+ @override
+ String get loginPasteLink => 'Paste login link';
+
+ @override
+ String get loginPasteLinkHelp =>
+ 'Paste the complete sign-in link you received. Treat it like a password.';
+
@override
String get loginFailed => 'Anmeldung fehlgeschlagen';
diff --git a/lib/l10n/app_localizations_el.dart b/lib/l10n/app_localizations_el.dart
index db7115b7..05065932 100644
--- a/lib/l10n/app_localizations_el.dart
+++ b/lib/l10n/app_localizations_el.dart
@@ -215,11 +215,11 @@ class AppLocalizationsEl extends AppLocalizations {
}
@override
- String get adminCreateSetupFile => 'Create setup file';
+ String get adminCreateSetupFile => 'Share sign-in';
@override
String adminSetupFileDescription(String username) {
- return 'Creates a sign-in file for $username that only works in the Absorb app. They import it from the login screen to sign in.';
+ return 'Creates a private sign-in link for $username that only works in the Absorb app.';
}
@override
@@ -227,14 +227,14 @@ class AppLocalizationsEl extends AppLocalizations {
@override
String get adminSetupFileNoteWithHeaders =>
- 'An API key will be created for this user and your custom headers are included so they can reach the server. Treat the file like a password.';
+ 'A dedicated API key and your custom headers will be included so they can reach the server. Treat the link like a password.';
@override
String get adminSetupFileNote =>
- 'An API key will be created for this user. Treat the file like a password.';
+ 'A dedicated API key will be included. Treat the link like a password.';
@override
- String get adminSetupFileCreate => 'Create';
+ String get adminSetupFileCreate => 'Create link';
@override
String get adminSetupFileSaveTitle => 'Save setup file';
@@ -250,9 +250,64 @@ class AppLocalizationsEl extends AppLocalizations {
@override
String adminSetupFileFailed(String error) {
- return 'Failed to create setup file: $error';
+ return 'Failed to create sign-in: $error';
}
+ @override
+ String get setupLinkShareTitle => 'Share sign-in';
+
+ @override
+ String setupLinkShareDescription(String username) {
+ return 'Send this private link or have them scan the QR code to sign in as $username.';
+ }
+
+ @override
+ String setupLinkPrivateWarning(String username) {
+ return 'Anyone with this link can sign in as $username. Treat it like a password.';
+ }
+
+ @override
+ String get setupLinkShare => 'Share link';
+
+ @override
+ String get setupLinkCopy => 'Copy link';
+
+ @override
+ String get setupLinkCopied => 'Sign-in link copied';
+
+ @override
+ String get setupLinkSaveFile => 'Save setup file';
+
+ @override
+ String get setupLinkQrError =>
+ 'This setup link is too large for a QR code. Share the link instead.';
+
+ @override
+ String setupLinkShareSubject(String username) {
+ return 'Absorb sign-in for $username';
+ }
+
+ @override
+ String get setupLinkConfirmTitle => 'Sign in with this link?';
+
+ @override
+ String setupLinkConfirmBody(String server, String username) {
+ return 'Sign in to $server as $username? Only continue if you trust who sent this link.';
+ }
+
+ @override
+ String get setupLinkInvalid => 'This sign-in link is invalid or incomplete';
+
+ @override
+ String get setupLinkSigningIn => 'Checking sign-in link...';
+
+ @override
+ String get loginPasteLink => 'Paste login link';
+
+ @override
+ String get loginPasteLinkHelp =>
+ 'Paste the complete sign-in link you received. Treat it like a password.';
+
@override
String get loginFailed => 'Login failed';
diff --git a/lib/l10n/app_localizations_en.dart b/lib/l10n/app_localizations_en.dart
index a22b58d9..59db1093 100644
--- a/lib/l10n/app_localizations_en.dart
+++ b/lib/l10n/app_localizations_en.dart
@@ -215,11 +215,11 @@ class AppLocalizationsEn extends AppLocalizations {
}
@override
- String get adminCreateSetupFile => 'Create setup file';
+ String get adminCreateSetupFile => 'Share sign-in';
@override
String adminSetupFileDescription(String username) {
- return 'Creates a sign-in file for $username that only works in the Absorb app. They import it from the login screen to sign in.';
+ return 'Creates a private sign-in link for $username that only works in the Absorb app.';
}
@override
@@ -227,14 +227,14 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get adminSetupFileNoteWithHeaders =>
- 'An API key will be created for this user and your custom headers are included so they can reach the server. Treat the file like a password.';
+ 'A dedicated API key and your custom headers will be included so they can reach the server. Treat the link like a password.';
@override
String get adminSetupFileNote =>
- 'An API key will be created for this user. Treat the file like a password.';
+ 'A dedicated API key will be included. Treat the link like a password.';
@override
- String get adminSetupFileCreate => 'Create';
+ String get adminSetupFileCreate => 'Create link';
@override
String get adminSetupFileSaveTitle => 'Save setup file';
@@ -250,9 +250,64 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String adminSetupFileFailed(String error) {
- return 'Failed to create setup file: $error';
+ return 'Failed to create sign-in: $error';
}
+ @override
+ String get setupLinkShareTitle => 'Share sign-in';
+
+ @override
+ String setupLinkShareDescription(String username) {
+ return 'Send this private link or have them scan the QR code to sign in as $username.';
+ }
+
+ @override
+ String setupLinkPrivateWarning(String username) {
+ return 'Anyone with this link can sign in as $username. Treat it like a password.';
+ }
+
+ @override
+ String get setupLinkShare => 'Share link';
+
+ @override
+ String get setupLinkCopy => 'Copy link';
+
+ @override
+ String get setupLinkCopied => 'Sign-in link copied';
+
+ @override
+ String get setupLinkSaveFile => 'Save setup file';
+
+ @override
+ String get setupLinkQrError =>
+ 'This setup link is too large for a QR code. Share the link instead.';
+
+ @override
+ String setupLinkShareSubject(String username) {
+ return 'Absorb sign-in for $username';
+ }
+
+ @override
+ String get setupLinkConfirmTitle => 'Sign in with this link?';
+
+ @override
+ String setupLinkConfirmBody(String server, String username) {
+ return 'Sign in to $server as $username? Only continue if you trust who sent this link.';
+ }
+
+ @override
+ String get setupLinkInvalid => 'This sign-in link is invalid or incomplete';
+
+ @override
+ String get setupLinkSigningIn => 'Checking sign-in link...';
+
+ @override
+ String get loginPasteLink => 'Paste login link';
+
+ @override
+ String get loginPasteLinkHelp =>
+ 'Paste the complete sign-in link you received. Treat it like a password.';
+
@override
String get loginFailed => 'Login failed';
diff --git a/lib/l10n/app_localizations_es.dart b/lib/l10n/app_localizations_es.dart
index 231172e5..1a22d99a 100644
--- a/lib/l10n/app_localizations_es.dart
+++ b/lib/l10n/app_localizations_es.dart
@@ -215,11 +215,11 @@ class AppLocalizationsEs extends AppLocalizations {
}
@override
- String get adminCreateSetupFile => 'Create setup file';
+ String get adminCreateSetupFile => 'Share sign-in';
@override
String adminSetupFileDescription(String username) {
- return 'Creates a sign-in file for $username that only works in the Absorb app. They import it from the login screen to sign in.';
+ return 'Creates a private sign-in link for $username that only works in the Absorb app.';
}
@override
@@ -227,14 +227,14 @@ class AppLocalizationsEs extends AppLocalizations {
@override
String get adminSetupFileNoteWithHeaders =>
- 'An API key will be created for this user and your custom headers are included so they can reach the server. Treat the file like a password.';
+ 'A dedicated API key and your custom headers will be included so they can reach the server. Treat the link like a password.';
@override
String get adminSetupFileNote =>
- 'An API key will be created for this user. Treat the file like a password.';
+ 'A dedicated API key will be included. Treat the link like a password.';
@override
- String get adminSetupFileCreate => 'Create';
+ String get adminSetupFileCreate => 'Create link';
@override
String get adminSetupFileSaveTitle => 'Save setup file';
@@ -250,9 +250,64 @@ class AppLocalizationsEs extends AppLocalizations {
@override
String adminSetupFileFailed(String error) {
- return 'Failed to create setup file: $error';
+ return 'Failed to create sign-in: $error';
}
+ @override
+ String get setupLinkShareTitle => 'Share sign-in';
+
+ @override
+ String setupLinkShareDescription(String username) {
+ return 'Send this private link or have them scan the QR code to sign in as $username.';
+ }
+
+ @override
+ String setupLinkPrivateWarning(String username) {
+ return 'Anyone with this link can sign in as $username. Treat it like a password.';
+ }
+
+ @override
+ String get setupLinkShare => 'Share link';
+
+ @override
+ String get setupLinkCopy => 'Copy link';
+
+ @override
+ String get setupLinkCopied => 'Sign-in link copied';
+
+ @override
+ String get setupLinkSaveFile => 'Save setup file';
+
+ @override
+ String get setupLinkQrError =>
+ 'This setup link is too large for a QR code. Share the link instead.';
+
+ @override
+ String setupLinkShareSubject(String username) {
+ return 'Absorb sign-in for $username';
+ }
+
+ @override
+ String get setupLinkConfirmTitle => 'Sign in with this link?';
+
+ @override
+ String setupLinkConfirmBody(String server, String username) {
+ return 'Sign in to $server as $username? Only continue if you trust who sent this link.';
+ }
+
+ @override
+ String get setupLinkInvalid => 'This sign-in link is invalid or incomplete';
+
+ @override
+ String get setupLinkSigningIn => 'Checking sign-in link...';
+
+ @override
+ String get loginPasteLink => 'Paste login link';
+
+ @override
+ String get loginPasteLinkHelp =>
+ 'Paste the complete sign-in link you received. Treat it like a password.';
+
@override
String get loginFailed => 'Login failed';
diff --git a/lib/l10n/app_localizations_fr.dart b/lib/l10n/app_localizations_fr.dart
index a6c15367..4597df01 100644
--- a/lib/l10n/app_localizations_fr.dart
+++ b/lib/l10n/app_localizations_fr.dart
@@ -217,11 +217,11 @@ class AppLocalizationsFr extends AppLocalizations {
}
@override
- String get adminCreateSetupFile => 'Create setup file';
+ String get adminCreateSetupFile => 'Share sign-in';
@override
String adminSetupFileDescription(String username) {
- return 'Creates a sign-in file for $username that only works in the Absorb app. They import it from the login screen to sign in.';
+ return 'Creates a private sign-in link for $username that only works in the Absorb app.';
}
@override
@@ -229,14 +229,14 @@ class AppLocalizationsFr extends AppLocalizations {
@override
String get adminSetupFileNoteWithHeaders =>
- 'An API key will be created for this user and your custom headers are included so they can reach the server. Treat the file like a password.';
+ 'A dedicated API key and your custom headers will be included so they can reach the server. Treat the link like a password.';
@override
String get adminSetupFileNote =>
- 'An API key will be created for this user. Treat the file like a password.';
+ 'A dedicated API key will be included. Treat the link like a password.';
@override
- String get adminSetupFileCreate => 'Create';
+ String get adminSetupFileCreate => 'Create link';
@override
String get adminSetupFileSaveTitle => 'Save setup file';
@@ -252,9 +252,64 @@ class AppLocalizationsFr extends AppLocalizations {
@override
String adminSetupFileFailed(String error) {
- return 'Failed to create setup file: $error';
+ return 'Failed to create sign-in: $error';
}
+ @override
+ String get setupLinkShareTitle => 'Share sign-in';
+
+ @override
+ String setupLinkShareDescription(String username) {
+ return 'Send this private link or have them scan the QR code to sign in as $username.';
+ }
+
+ @override
+ String setupLinkPrivateWarning(String username) {
+ return 'Anyone with this link can sign in as $username. Treat it like a password.';
+ }
+
+ @override
+ String get setupLinkShare => 'Share link';
+
+ @override
+ String get setupLinkCopy => 'Copy link';
+
+ @override
+ String get setupLinkCopied => 'Sign-in link copied';
+
+ @override
+ String get setupLinkSaveFile => 'Save setup file';
+
+ @override
+ String get setupLinkQrError =>
+ 'This setup link is too large for a QR code. Share the link instead.';
+
+ @override
+ String setupLinkShareSubject(String username) {
+ return 'Absorb sign-in for $username';
+ }
+
+ @override
+ String get setupLinkConfirmTitle => 'Sign in with this link?';
+
+ @override
+ String setupLinkConfirmBody(String server, String username) {
+ return 'Sign in to $server as $username? Only continue if you trust who sent this link.';
+ }
+
+ @override
+ String get setupLinkInvalid => 'This sign-in link is invalid or incomplete';
+
+ @override
+ String get setupLinkSigningIn => 'Checking sign-in link...';
+
+ @override
+ String get loginPasteLink => 'Paste login link';
+
+ @override
+ String get loginPasteLinkHelp =>
+ 'Paste the complete sign-in link you received. Treat it like a password.';
+
@override
String get loginFailed => 'Échec de connexion';
diff --git a/lib/l10n/app_localizations_it.dart b/lib/l10n/app_localizations_it.dart
index cc34f032..6b5c1950 100644
--- a/lib/l10n/app_localizations_it.dart
+++ b/lib/l10n/app_localizations_it.dart
@@ -215,11 +215,11 @@ class AppLocalizationsIt extends AppLocalizations {
}
@override
- String get adminCreateSetupFile => 'Create setup file';
+ String get adminCreateSetupFile => 'Share sign-in';
@override
String adminSetupFileDescription(String username) {
- return 'Creates a sign-in file for $username that only works in the Absorb app. They import it from the login screen to sign in.';
+ return 'Creates a private sign-in link for $username that only works in the Absorb app.';
}
@override
@@ -227,14 +227,14 @@ class AppLocalizationsIt extends AppLocalizations {
@override
String get adminSetupFileNoteWithHeaders =>
- 'An API key will be created for this user and your custom headers are included so they can reach the server. Treat the file like a password.';
+ 'A dedicated API key and your custom headers will be included so they can reach the server. Treat the link like a password.';
@override
String get adminSetupFileNote =>
- 'An API key will be created for this user. Treat the file like a password.';
+ 'A dedicated API key will be included. Treat the link like a password.';
@override
- String get adminSetupFileCreate => 'Create';
+ String get adminSetupFileCreate => 'Create link';
@override
String get adminSetupFileSaveTitle => 'Save setup file';
@@ -250,9 +250,64 @@ class AppLocalizationsIt extends AppLocalizations {
@override
String adminSetupFileFailed(String error) {
- return 'Failed to create setup file: $error';
+ return 'Failed to create sign-in: $error';
}
+ @override
+ String get setupLinkShareTitle => 'Share sign-in';
+
+ @override
+ String setupLinkShareDescription(String username) {
+ return 'Send this private link or have them scan the QR code to sign in as $username.';
+ }
+
+ @override
+ String setupLinkPrivateWarning(String username) {
+ return 'Anyone with this link can sign in as $username. Treat it like a password.';
+ }
+
+ @override
+ String get setupLinkShare => 'Share link';
+
+ @override
+ String get setupLinkCopy => 'Copy link';
+
+ @override
+ String get setupLinkCopied => 'Sign-in link copied';
+
+ @override
+ String get setupLinkSaveFile => 'Save setup file';
+
+ @override
+ String get setupLinkQrError =>
+ 'This setup link is too large for a QR code. Share the link instead.';
+
+ @override
+ String setupLinkShareSubject(String username) {
+ return 'Absorb sign-in for $username';
+ }
+
+ @override
+ String get setupLinkConfirmTitle => 'Sign in with this link?';
+
+ @override
+ String setupLinkConfirmBody(String server, String username) {
+ return 'Sign in to $server as $username? Only continue if you trust who sent this link.';
+ }
+
+ @override
+ String get setupLinkInvalid => 'This sign-in link is invalid or incomplete';
+
+ @override
+ String get setupLinkSigningIn => 'Checking sign-in link...';
+
+ @override
+ String get loginPasteLink => 'Paste login link';
+
+ @override
+ String get loginPasteLinkHelp =>
+ 'Paste the complete sign-in link you received. Treat it like a password.';
+
@override
String get loginFailed => 'Login failed';
diff --git a/lib/l10n/app_localizations_ja.dart b/lib/l10n/app_localizations_ja.dart
index bc0df562..f5acff78 100644
--- a/lib/l10n/app_localizations_ja.dart
+++ b/lib/l10n/app_localizations_ja.dart
@@ -215,11 +215,11 @@ class AppLocalizationsJa extends AppLocalizations {
}
@override
- String get adminCreateSetupFile => 'Create setup file';
+ String get adminCreateSetupFile => 'Share sign-in';
@override
String adminSetupFileDescription(String username) {
- return 'Creates a sign-in file for $username that only works in the Absorb app. They import it from the login screen to sign in.';
+ return 'Creates a private sign-in link for $username that only works in the Absorb app.';
}
@override
@@ -227,14 +227,14 @@ class AppLocalizationsJa extends AppLocalizations {
@override
String get adminSetupFileNoteWithHeaders =>
- 'An API key will be created for this user and your custom headers are included so they can reach the server. Treat the file like a password.';
+ 'A dedicated API key and your custom headers will be included so they can reach the server. Treat the link like a password.';
@override
String get adminSetupFileNote =>
- 'An API key will be created for this user. Treat the file like a password.';
+ 'A dedicated API key will be included. Treat the link like a password.';
@override
- String get adminSetupFileCreate => 'Create';
+ String get adminSetupFileCreate => 'Create link';
@override
String get adminSetupFileSaveTitle => 'Save setup file';
@@ -250,9 +250,64 @@ class AppLocalizationsJa extends AppLocalizations {
@override
String adminSetupFileFailed(String error) {
- return 'Failed to create setup file: $error';
+ return 'Failed to create sign-in: $error';
}
+ @override
+ String get setupLinkShareTitle => 'Share sign-in';
+
+ @override
+ String setupLinkShareDescription(String username) {
+ return 'Send this private link or have them scan the QR code to sign in as $username.';
+ }
+
+ @override
+ String setupLinkPrivateWarning(String username) {
+ return 'Anyone with this link can sign in as $username. Treat it like a password.';
+ }
+
+ @override
+ String get setupLinkShare => 'Share link';
+
+ @override
+ String get setupLinkCopy => 'Copy link';
+
+ @override
+ String get setupLinkCopied => 'Sign-in link copied';
+
+ @override
+ String get setupLinkSaveFile => 'Save setup file';
+
+ @override
+ String get setupLinkQrError =>
+ 'This setup link is too large for a QR code. Share the link instead.';
+
+ @override
+ String setupLinkShareSubject(String username) {
+ return 'Absorb sign-in for $username';
+ }
+
+ @override
+ String get setupLinkConfirmTitle => 'Sign in with this link?';
+
+ @override
+ String setupLinkConfirmBody(String server, String username) {
+ return 'Sign in to $server as $username? Only continue if you trust who sent this link.';
+ }
+
+ @override
+ String get setupLinkInvalid => 'This sign-in link is invalid or incomplete';
+
+ @override
+ String get setupLinkSigningIn => 'Checking sign-in link...';
+
+ @override
+ String get loginPasteLink => 'Paste login link';
+
+ @override
+ String get loginPasteLinkHelp =>
+ 'Paste the complete sign-in link you received. Treat it like a password.';
+
@override
String get loginFailed => 'Login failed';
diff --git a/lib/l10n/app_localizations_no.dart b/lib/l10n/app_localizations_no.dart
index 06292c3b..ce5761ef 100644
--- a/lib/l10n/app_localizations_no.dart
+++ b/lib/l10n/app_localizations_no.dart
@@ -215,11 +215,11 @@ class AppLocalizationsNo extends AppLocalizations {
}
@override
- String get adminCreateSetupFile => 'Create setup file';
+ String get adminCreateSetupFile => 'Share sign-in';
@override
String adminSetupFileDescription(String username) {
- return 'Creates a sign-in file for $username that only works in the Absorb app. They import it from the login screen to sign in.';
+ return 'Creates a private sign-in link for $username that only works in the Absorb app.';
}
@override
@@ -227,14 +227,14 @@ class AppLocalizationsNo extends AppLocalizations {
@override
String get adminSetupFileNoteWithHeaders =>
- 'An API key will be created for this user and your custom headers are included so they can reach the server. Treat the file like a password.';
+ 'A dedicated API key and your custom headers will be included so they can reach the server. Treat the link like a password.';
@override
String get adminSetupFileNote =>
- 'An API key will be created for this user. Treat the file like a password.';
+ 'A dedicated API key will be included. Treat the link like a password.';
@override
- String get adminSetupFileCreate => 'Create';
+ String get adminSetupFileCreate => 'Create link';
@override
String get adminSetupFileSaveTitle => 'Save setup file';
@@ -250,9 +250,64 @@ class AppLocalizationsNo extends AppLocalizations {
@override
String adminSetupFileFailed(String error) {
- return 'Failed to create setup file: $error';
+ return 'Failed to create sign-in: $error';
}
+ @override
+ String get setupLinkShareTitle => 'Share sign-in';
+
+ @override
+ String setupLinkShareDescription(String username) {
+ return 'Send this private link or have them scan the QR code to sign in as $username.';
+ }
+
+ @override
+ String setupLinkPrivateWarning(String username) {
+ return 'Anyone with this link can sign in as $username. Treat it like a password.';
+ }
+
+ @override
+ String get setupLinkShare => 'Share link';
+
+ @override
+ String get setupLinkCopy => 'Copy link';
+
+ @override
+ String get setupLinkCopied => 'Sign-in link copied';
+
+ @override
+ String get setupLinkSaveFile => 'Save setup file';
+
+ @override
+ String get setupLinkQrError =>
+ 'This setup link is too large for a QR code. Share the link instead.';
+
+ @override
+ String setupLinkShareSubject(String username) {
+ return 'Absorb sign-in for $username';
+ }
+
+ @override
+ String get setupLinkConfirmTitle => 'Sign in with this link?';
+
+ @override
+ String setupLinkConfirmBody(String server, String username) {
+ return 'Sign in to $server as $username? Only continue if you trust who sent this link.';
+ }
+
+ @override
+ String get setupLinkInvalid => 'This sign-in link is invalid or incomplete';
+
+ @override
+ String get setupLinkSigningIn => 'Checking sign-in link...';
+
+ @override
+ String get loginPasteLink => 'Paste login link';
+
+ @override
+ String get loginPasteLinkHelp =>
+ 'Paste the complete sign-in link you received. Treat it like a password.';
+
@override
String get loginFailed => 'Login failed';
diff --git a/lib/l10n/app_localizations_pt.dart b/lib/l10n/app_localizations_pt.dart
index 0d3d0802..0872c137 100644
--- a/lib/l10n/app_localizations_pt.dart
+++ b/lib/l10n/app_localizations_pt.dart
@@ -215,11 +215,11 @@ class AppLocalizationsPt extends AppLocalizations {
}
@override
- String get adminCreateSetupFile => 'Create setup file';
+ String get adminCreateSetupFile => 'Share sign-in';
@override
String adminSetupFileDescription(String username) {
- return 'Creates a sign-in file for $username that only works in the Absorb app. They import it from the login screen to sign in.';
+ return 'Creates a private sign-in link for $username that only works in the Absorb app.';
}
@override
@@ -227,14 +227,14 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get adminSetupFileNoteWithHeaders =>
- 'An API key will be created for this user and your custom headers are included so they can reach the server. Treat the file like a password.';
+ 'A dedicated API key and your custom headers will be included so they can reach the server. Treat the link like a password.';
@override
String get adminSetupFileNote =>
- 'An API key will be created for this user. Treat the file like a password.';
+ 'A dedicated API key will be included. Treat the link like a password.';
@override
- String get adminSetupFileCreate => 'Create';
+ String get adminSetupFileCreate => 'Create link';
@override
String get adminSetupFileSaveTitle => 'Save setup file';
@@ -250,9 +250,64 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String adminSetupFileFailed(String error) {
- return 'Failed to create setup file: $error';
+ return 'Failed to create sign-in: $error';
}
+ @override
+ String get setupLinkShareTitle => 'Share sign-in';
+
+ @override
+ String setupLinkShareDescription(String username) {
+ return 'Send this private link or have them scan the QR code to sign in as $username.';
+ }
+
+ @override
+ String setupLinkPrivateWarning(String username) {
+ return 'Anyone with this link can sign in as $username. Treat it like a password.';
+ }
+
+ @override
+ String get setupLinkShare => 'Share link';
+
+ @override
+ String get setupLinkCopy => 'Copy link';
+
+ @override
+ String get setupLinkCopied => 'Sign-in link copied';
+
+ @override
+ String get setupLinkSaveFile => 'Save setup file';
+
+ @override
+ String get setupLinkQrError =>
+ 'This setup link is too large for a QR code. Share the link instead.';
+
+ @override
+ String setupLinkShareSubject(String username) {
+ return 'Absorb sign-in for $username';
+ }
+
+ @override
+ String get setupLinkConfirmTitle => 'Sign in with this link?';
+
+ @override
+ String setupLinkConfirmBody(String server, String username) {
+ return 'Sign in to $server as $username? Only continue if you trust who sent this link.';
+ }
+
+ @override
+ String get setupLinkInvalid => 'This sign-in link is invalid or incomplete';
+
+ @override
+ String get setupLinkSigningIn => 'Checking sign-in link...';
+
+ @override
+ String get loginPasteLink => 'Paste login link';
+
+ @override
+ String get loginPasteLinkHelp =>
+ 'Paste the complete sign-in link you received. Treat it like a password.';
+
@override
String get loginFailed => 'Login failed';
diff --git a/lib/l10n/app_localizations_ro.dart b/lib/l10n/app_localizations_ro.dart
index 7200d25f..af7a4f74 100644
--- a/lib/l10n/app_localizations_ro.dart
+++ b/lib/l10n/app_localizations_ro.dart
@@ -215,11 +215,11 @@ class AppLocalizationsRo extends AppLocalizations {
}
@override
- String get adminCreateSetupFile => 'Create setup file';
+ String get adminCreateSetupFile => 'Share sign-in';
@override
String adminSetupFileDescription(String username) {
- return 'Creates a sign-in file for $username that only works in the Absorb app. They import it from the login screen to sign in.';
+ return 'Creates a private sign-in link for $username that only works in the Absorb app.';
}
@override
@@ -227,14 +227,14 @@ class AppLocalizationsRo extends AppLocalizations {
@override
String get adminSetupFileNoteWithHeaders =>
- 'An API key will be created for this user and your custom headers are included so they can reach the server. Treat the file like a password.';
+ 'A dedicated API key and your custom headers will be included so they can reach the server. Treat the link like a password.';
@override
String get adminSetupFileNote =>
- 'An API key will be created for this user. Treat the file like a password.';
+ 'A dedicated API key will be included. Treat the link like a password.';
@override
- String get adminSetupFileCreate => 'Create';
+ String get adminSetupFileCreate => 'Create link';
@override
String get adminSetupFileSaveTitle => 'Save setup file';
@@ -250,9 +250,64 @@ class AppLocalizationsRo extends AppLocalizations {
@override
String adminSetupFileFailed(String error) {
- return 'Failed to create setup file: $error';
+ return 'Failed to create sign-in: $error';
}
+ @override
+ String get setupLinkShareTitle => 'Share sign-in';
+
+ @override
+ String setupLinkShareDescription(String username) {
+ return 'Send this private link or have them scan the QR code to sign in as $username.';
+ }
+
+ @override
+ String setupLinkPrivateWarning(String username) {
+ return 'Anyone with this link can sign in as $username. Treat it like a password.';
+ }
+
+ @override
+ String get setupLinkShare => 'Share link';
+
+ @override
+ String get setupLinkCopy => 'Copy link';
+
+ @override
+ String get setupLinkCopied => 'Sign-in link copied';
+
+ @override
+ String get setupLinkSaveFile => 'Save setup file';
+
+ @override
+ String get setupLinkQrError =>
+ 'This setup link is too large for a QR code. Share the link instead.';
+
+ @override
+ String setupLinkShareSubject(String username) {
+ return 'Absorb sign-in for $username';
+ }
+
+ @override
+ String get setupLinkConfirmTitle => 'Sign in with this link?';
+
+ @override
+ String setupLinkConfirmBody(String server, String username) {
+ return 'Sign in to $server as $username? Only continue if you trust who sent this link.';
+ }
+
+ @override
+ String get setupLinkInvalid => 'This sign-in link is invalid or incomplete';
+
+ @override
+ String get setupLinkSigningIn => 'Checking sign-in link...';
+
+ @override
+ String get loginPasteLink => 'Paste login link';
+
+ @override
+ String get loginPasteLinkHelp =>
+ 'Paste the complete sign-in link you received. Treat it like a password.';
+
@override
String get loginFailed => 'Login failed';
diff --git a/lib/l10n/app_localizations_ru.dart b/lib/l10n/app_localizations_ru.dart
index e4a12d1c..43e506bc 100644
--- a/lib/l10n/app_localizations_ru.dart
+++ b/lib/l10n/app_localizations_ru.dart
@@ -216,11 +216,11 @@ class AppLocalizationsRu extends AppLocalizations {
}
@override
- String get adminCreateSetupFile => 'Create setup file';
+ String get adminCreateSetupFile => 'Share sign-in';
@override
String adminSetupFileDescription(String username) {
- return 'Creates a sign-in file for $username that only works in the Absorb app. They import it from the login screen to sign in.';
+ return 'Creates a private sign-in link for $username that only works in the Absorb app.';
}
@override
@@ -228,14 +228,14 @@ class AppLocalizationsRu extends AppLocalizations {
@override
String get adminSetupFileNoteWithHeaders =>
- 'An API key will be created for this user and your custom headers are included so they can reach the server. Treat the file like a password.';
+ 'A dedicated API key and your custom headers will be included so they can reach the server. Treat the link like a password.';
@override
String get adminSetupFileNote =>
- 'An API key will be created for this user. Treat the file like a password.';
+ 'A dedicated API key will be included. Treat the link like a password.';
@override
- String get adminSetupFileCreate => 'Create';
+ String get adminSetupFileCreate => 'Create link';
@override
String get adminSetupFileSaveTitle => 'Save setup file';
@@ -251,9 +251,64 @@ class AppLocalizationsRu extends AppLocalizations {
@override
String adminSetupFileFailed(String error) {
- return 'Failed to create setup file: $error';
+ return 'Failed to create sign-in: $error';
}
+ @override
+ String get setupLinkShareTitle => 'Share sign-in';
+
+ @override
+ String setupLinkShareDescription(String username) {
+ return 'Send this private link or have them scan the QR code to sign in as $username.';
+ }
+
+ @override
+ String setupLinkPrivateWarning(String username) {
+ return 'Anyone with this link can sign in as $username. Treat it like a password.';
+ }
+
+ @override
+ String get setupLinkShare => 'Share link';
+
+ @override
+ String get setupLinkCopy => 'Copy link';
+
+ @override
+ String get setupLinkCopied => 'Sign-in link copied';
+
+ @override
+ String get setupLinkSaveFile => 'Save setup file';
+
+ @override
+ String get setupLinkQrError =>
+ 'This setup link is too large for a QR code. Share the link instead.';
+
+ @override
+ String setupLinkShareSubject(String username) {
+ return 'Absorb sign-in for $username';
+ }
+
+ @override
+ String get setupLinkConfirmTitle => 'Sign in with this link?';
+
+ @override
+ String setupLinkConfirmBody(String server, String username) {
+ return 'Sign in to $server as $username? Only continue if you trust who sent this link.';
+ }
+
+ @override
+ String get setupLinkInvalid => 'This sign-in link is invalid or incomplete';
+
+ @override
+ String get setupLinkSigningIn => 'Checking sign-in link...';
+
+ @override
+ String get loginPasteLink => 'Paste login link';
+
+ @override
+ String get loginPasteLinkHelp =>
+ 'Paste the complete sign-in link you received. Treat it like a password.';
+
@override
String get loginFailed => 'Login failed';
diff --git a/lib/l10n/app_localizations_zh.dart b/lib/l10n/app_localizations_zh.dart
index bb016b83..683638ee 100644
--- a/lib/l10n/app_localizations_zh.dart
+++ b/lib/l10n/app_localizations_zh.dart
@@ -213,11 +213,11 @@ class AppLocalizationsZh extends AppLocalizations {
}
@override
- String get adminCreateSetupFile => 'Create setup file';
+ String get adminCreateSetupFile => 'Share sign-in';
@override
String adminSetupFileDescription(String username) {
- return 'Creates a sign-in file for $username that only works in the Absorb app. They import it from the login screen to sign in.';
+ return 'Creates a private sign-in link for $username that only works in the Absorb app.';
}
@override
@@ -225,14 +225,14 @@ class AppLocalizationsZh extends AppLocalizations {
@override
String get adminSetupFileNoteWithHeaders =>
- 'An API key will be created for this user and your custom headers are included so they can reach the server. Treat the file like a password.';
+ 'A dedicated API key and your custom headers will be included so they can reach the server. Treat the link like a password.';
@override
String get adminSetupFileNote =>
- 'An API key will be created for this user. Treat the file like a password.';
+ 'A dedicated API key will be included. Treat the link like a password.';
@override
- String get adminSetupFileCreate => 'Create';
+ String get adminSetupFileCreate => 'Create link';
@override
String get adminSetupFileSaveTitle => 'Save setup file';
@@ -248,9 +248,64 @@ class AppLocalizationsZh extends AppLocalizations {
@override
String adminSetupFileFailed(String error) {
- return 'Failed to create setup file: $error';
+ return 'Failed to create sign-in: $error';
}
+ @override
+ String get setupLinkShareTitle => 'Share sign-in';
+
+ @override
+ String setupLinkShareDescription(String username) {
+ return 'Send this private link or have them scan the QR code to sign in as $username.';
+ }
+
+ @override
+ String setupLinkPrivateWarning(String username) {
+ return 'Anyone with this link can sign in as $username. Treat it like a password.';
+ }
+
+ @override
+ String get setupLinkShare => 'Share link';
+
+ @override
+ String get setupLinkCopy => 'Copy link';
+
+ @override
+ String get setupLinkCopied => 'Sign-in link copied';
+
+ @override
+ String get setupLinkSaveFile => 'Save setup file';
+
+ @override
+ String get setupLinkQrError =>
+ 'This setup link is too large for a QR code. Share the link instead.';
+
+ @override
+ String setupLinkShareSubject(String username) {
+ return 'Absorb sign-in for $username';
+ }
+
+ @override
+ String get setupLinkConfirmTitle => 'Sign in with this link?';
+
+ @override
+ String setupLinkConfirmBody(String server, String username) {
+ return 'Sign in to $server as $username? Only continue if you trust who sent this link.';
+ }
+
+ @override
+ String get setupLinkInvalid => 'This sign-in link is invalid or incomplete';
+
+ @override
+ String get setupLinkSigningIn => 'Checking sign-in link...';
+
+ @override
+ String get loginPasteLink => 'Paste login link';
+
+ @override
+ String get loginPasteLinkHelp =>
+ 'Paste the complete sign-in link you received. Treat it like a password.';
+
@override
String get loginFailed => '登录失败';
diff --git a/lib/main.dart b/lib/main.dart
index 87429d39..164eef64 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -1,3 +1,4 @@
+import 'dart:async';
import 'dart:io';
import 'dart:ui';
// Flutter 3.44 moved CupertinoPageTransitionsBuilder from material.dart to
@@ -8,6 +9,7 @@ import 'dart:ui';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
+import 'package:app_links/app_links.dart';
import 'package:provider/provider.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:flutter_native_splash/flutter_native_splash.dart';
@@ -33,10 +35,12 @@ import 'services/episode_notification_service.dart';
import 'services/home_widget_service.dart';
import 'services/log_service.dart';
import 'services/quick_actions_service.dart';
+import 'services/setup_link_service.dart';
import 'services/wording.dart';
import 'screens/login_screen.dart';
import 'screens/app_shell.dart';
import 'widgets/absorb_wave_icon.dart';
+import 'widgets/setup_link_login.dart';
/// Global notifier so any widget (e.g. settings) can change the theme instantly.
final ValueNotifier<ThemeMode> themeNotifier = ValueNotifier(ThemeMode.dark);
@@ -75,7 +79,6 @@ ColorScheme manualColorScheme(Color seed, Brightness brightness) {
: Colors.black;
return base.copyWith(primary: seed, onPrimary: onSeed);
}
-
/// Whether to disable the fade animation when switching bottom nav tabs.
final ValueNotifier<bool> snappyTransitionsNotifier = ValueNotifier(false);
@@ -158,6 +161,7 @@ Future<void> applyOrientationLock() async {
void main() async {
HttpOverrides.global = _CertOverrides();
final widgetsBinding = WidgetsFlutterBinding.ensureInitialized();
+ final appLinks = AppLinks();
// These calls use platform channels that require an Activity. When Android
// Auto cold-starts the app for the MediaBrowserService, no Activity exists
@@ -236,13 +240,15 @@ void main() async {
update: (_, auth, lib) => lib!..updateAuth(auth),
),
],
- child: const AbsorbApp(),
+ child: AbsorbApp(setupLinkStream: appLinks.uriLinkStream),
),
);
}
class AbsorbApp extends StatelessWidget {
- const AbsorbApp({super.key});
+ final Stream<Uri>? setupLinkStream;
+
+ const AbsorbApp({super.key, this.setupLinkStream});
@override
Widget build(BuildContext context) {
@@ -478,7 +484,7 @@ class AbsorbApp extends StatelessWidget {
),
pageTransitionsTheme: pageTransition,
),
- home: const AuthGate(),
+ home: AuthGate(setupLinkStream: setupLinkStream),
);
},
);
@@ -486,19 +492,70 @@ class AbsorbApp extends StatelessWidget {
}
class AuthGate extends StatefulWidget {
- const AuthGate({super.key});
+ final Stream<Uri>? setupLinkStream;
+
+ const AuthGate({super.key, this.setupLinkStream});
@override
State<AuthGate> createState() => _AuthGateState();
}
class _AuthGateState extends State<AuthGate> {
+ StreamSubscription<Uri>? _setupLinkSubscription;
+ Uri? _pendingSetupLink;
+ Uri? _activeSetupLink;
+ bool _servicesReady = false;
+ bool _handlingSetupLink = false;
+
@override
void initState() {
super.initState();
+ _setupLinkSubscription = widget.setupLinkStream?.listen(
+ _queueSetupLink,
+ onError: (_) {},
+ );
_initServices();
}
+ @override
+ void dispose() {
+ _setupLinkSubscription?.cancel();
+ super.dispose();
+ }
+
+ void _queueSetupLink(Uri uri) {
+ if (!SetupLinkService.isSetupLink(uri)) return;
+ if (_pendingSetupLink == uri || _activeSetupLink == uri) return;
+ _pendingSetupLink = uri;
+ _tryHandleSetupLink();
+ }
+
+ void _tryHandleSetupLink() {
+ final link = _pendingSetupLink;
+ if (!_servicesReady ||
+ _handlingSetupLink ||
+ link == null ||
+ !mounted ||
+ context.read<AuthProvider>().isLoading) {
+ return;
+ }
+
+ _pendingSetupLink = null;
+ _activeSetupLink = link;
+ _handlingSetupLink = true;
+ WidgetsBinding.instance.addPostFrameCallback((_) async {
+ if (!mounted) return;
+ await _handleSetupLink(link);
+ _activeSetupLink = null;
+ _handlingSetupLink = false;
+ _tryHandleSetupLink();
+ });
+ }
+
+ Future<void> _handleSetupLink(Uri link) async {
+ await handleSetupLinkLogin(context, link);
+ }
+
Future<void> _initServices() async {
// Load device info before log service so the log header has the real
// app version and device model instead of fallback values.
@@ -665,11 +722,16 @@ class _AuthGateState extends State<AuthGate> {
debugPrint('[Init] Service init failed: $e');
}
debugPrint('[Init] _initServices complete (${sw.elapsedMilliseconds}ms)');
+ _servicesReady = true;
+ _tryHandleSetupLink();
}
@override
Widget build(BuildContext context) {
final auth = context.watch<AuthProvider>();
+ if (!auth.isLoading && _pendingSetupLink != null) {
+ WidgetsBinding.instance.addPostFrameCallback((_) => _tryHandleSetupLink());
+ }
if (auth.isLoading) {
return Scaffold(
diff --git a/lib/screens/admin_users_screen.dart b/lib/screens/admin_users_screen.dart
index 2d6937df..f55010cf 100644
--- a/lib/screens/admin_users_screen.dart
+++ b/lib/screens/admin_users_screen.dart
@@ -1,16 +1,19 @@
import 'dart:convert';
import 'dart:io';
-import 'dart:typed_data';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:file_picker/file_picker.dart';
import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
import 'package:provider/provider.dart';
+import 'package:share_plus/share_plus.dart';
import '../providers/auth_provider.dart';
import '../providers/library_provider.dart';
import '../services/backup_service.dart';
+import '../services/setup_link_service.dart';
import '../widgets/absorb_page_header.dart';
import '../widgets/absorb_wave_icon.dart';
import '../widgets/overlay_toast.dart';
+import '../widgets/setup_link_share_sheet.dart';
import '../l10n/app_localizations.dart';
import '../utils/duration_format.dart';
@@ -783,9 +786,7 @@ class _UserDetailScreenState extends State<_UserDetailScreen> {
}));
}
- /// Mint an API key for this user and write a one-account .absorb setup file.
- /// The new user imports it from the login screen and is signed straight in.
- /// The file carries a working credential, so it must be handed over privately.
+ /// Mint an API key for this user and package it into a private sign-in link.
Future<void> _exportSetupFile() async {
final auth = context.read<AuthProvider>();
final api = auth.apiService;
@@ -850,26 +851,38 @@ class _UserDetailScreenState extends State<_UserDetailScreen> {
userId: userId,
customHeaders: auth.customHeaders,
);
- final jsonStr = const JsonEncoder.withIndent(' ').convert(payload);
- final safeName = username.replaceAll(RegExp(r'[^A-Za-z0-9_-]'), '_');
- final bytes = Uint8List.fromList(utf8.encode(jsonStr));
-
- final result = await FilePicker.platform.saveFile(
- dialogTitle: l.adminSetupFileSaveTitle,
- fileName: 'absorb_setup_$safeName.absorb',
- type: FileType.any,
- bytes: bytes,
+ final setupLink = SetupLinkService.createLink(payload);
+ if (!mounted) return;
+
+ await showModalBottomSheet<void>(
+ context: context,
+ isScrollControlled: true,
+ useSafeArea: true,
+ showDragHandle: false,
+ builder: (sheetContext) => SetupLinkShareSheet(
+ username: username,
+ setupLink: setupLink,
+ onShare: () async {
+ final box = sheetContext.findRenderObject() as RenderBox?;
+ final origin = box == null
+ ? null
+ : box.localToGlobal(Offset.zero) & box.size;
+ await Share.share(
+ setupLink.toString(),
+ subject: l.setupLinkShareSubject(username),
+ sharePositionOrigin: origin,
+ );
+ },
+ onCopy: () async {
+ await Clipboard.setData(ClipboardData(text: setupLink.toString()));
+ if (sheetContext.mounted) {
+ showOverlayToast(sheetContext, l.setupLinkCopied,
+ icon: Icons.content_copy_rounded);
+ }
+ },
+ onSaveFile: () => _saveSetupFile(payload, username),
+ ),
);
-
- if (result != null) {
- if (Platform.isWindows || Platform.isLinux || Platform.isMacOS) {
- await File(result).writeAsString(jsonStr);
- }
- if (mounted) {
- showOverlayToast(context, l.adminSetupFileSaved(username),
- icon: Icons.check_circle_outline_rounded);
- }
- }
} catch (e) {
if (mounted) {
showOverlayToast(context, l.adminSetupFileFailed(e.toString()),
@@ -878,6 +891,29 @@ class _UserDetailScreenState extends State<_UserDetailScreen> {
}
}
+ Future<void> _saveSetupFile(Map<String, dynamic> payload, String username) async {
+ final l = AppLocalizations.of(context)!;
+ final jsonStr = const JsonEncoder.withIndent(' ').convert(payload);
+ final safeName = username.replaceAll(RegExp(r'[^A-Za-z0-9_-]'), '_');
+ final bytes = Uint8List.fromList(utf8.encode(jsonStr));
+
+ final result = await FilePicker.platform.saveFile(
+ dialogTitle: l.adminSetupFileSaveTitle,
+ fileName: 'absorb_setup_$safeName.absorb',
+ type: FileType.any,
+ bytes: bytes,
+ );
+
+ if (result == null) return;
+ if (Platform.isWindows || Platform.isLinux || Platform.isMacOS) {
+ await File(result).writeAsString(jsonStr);
+ }
+ if (mounted) {
+ showOverlayToast(context, l.adminSetupFileSaved(username),
+ icon: Icons.check_circle_outline_rounded);
+ }
+ }
+
String _timeAgo(DateTime dt) {
final l = AppLocalizations.of(context)!;
final d = DateTime.now().difference(dt);
diff --git a/lib/screens/login_screen.dart b/lib/screens/login_screen.dart
index 09135c0a..e03f7cca 100644
--- a/lib/screens/login_screen.dart
+++ b/lib/screens/login_screen.dart
@@ -11,9 +11,11 @@ import '../providers/auth_provider.dart';
import '../services/api_service.dart';
import '../services/backup_service.dart';
import '../services/oidc_service.dart';
+import '../services/setup_link_service.dart';
import '../services/user_account_service.dart';
import '../widgets/absorb_wave_icon.dart';
import '../widgets/overlay_toast.dart';
+import '../widgets/setup_link_login.dart';
import '../services/audio_player_service.dart';
import '../main.dart' show applyTrustAllCerts, flatNotifier;
import '../l10n/app_localizations.dart';
@@ -25,7 +27,6 @@ class LoginScreen extends StatefulWidget {
@override
State<LoginScreen> createState() => _LoginScreenState();
}
-
class _LoginScreenState extends State<LoginScreen>
with SingleTickerProviderStateMixin {
final _formKey = GlobalKey<FormState>();
@@ -743,20 +744,42 @@ class _LoginScreenState extends State<LoginScreen>
),
),
const SizedBox(height: 12),
- ActionChip(
- avatar: Icon(Icons.restore_rounded, size: 16,
- color: cs.onSurfaceVariant.withValues(alpha: 0.6)),
- label: Text(l.loginRestoreFromBackup,
- style: tt.labelSmall?.copyWith(
- color: cs.onSurfaceVariant.withValues(alpha: 0.6),
- )),
- backgroundColor: cs.surfaceContainerHighest.withValues(alpha: 0.3),
- side: BorderSide(color: cs.outlineVariant.withValues(alpha: 0.15)),
- shape: RoundedRectangleBorder(
- borderRadius: BorderRadius.circular(20),
- ),
- onPressed: _restoreFromBackup,
- ),
+ Wrap(
+ alignment: WrapAlignment.center,
+ spacing: 8,
+ runSpacing: 8,
+ children: [
+ ActionChip(
+ avatar: Icon(Icons.restore_rounded, size: 16,
+ color: cs.onSurfaceVariant.withValues(alpha: 0.6)),
+ label: Text(l.loginRestoreFromBackup,
+ style: tt.labelSmall?.copyWith(
+ color: cs.onSurfaceVariant.withValues(alpha: 0.6),
+ )),
+ backgroundColor: cs.surfaceContainerHighest.withValues(alpha: 0.3),
+ side: BorderSide(color: cs.outlineVariant.withValues(alpha: 0.15)),
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(20),
+ ),
+ onPressed: _restoreFromBackup,
+ ),
+ ActionChip(
+ key: const Key('paste-login-link'),
+ avatar: Icon(Icons.content_paste_rounded, size: 16,
+ color: cs.onSurfaceVariant.withValues(alpha: 0.6)),
+ label: Text(l.loginPasteLink,
+ style: tt.labelSmall?.copyWith(
+ color: cs.onSurfaceVariant.withValues(alpha: 0.6),
+ )),
+ backgroundColor: cs.surfaceContainerHighest.withValues(alpha: 0.3),
+ side: BorderSide(color: cs.outlineVariant.withValues(alpha: 0.15)),
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(20),
+ ),
+ onPressed: _pasteLoginLink,
+ ),
+ ],
+ )
],
),
),
@@ -948,6 +971,78 @@ class _LoginScreenState extends State<LoginScreen>
}
}
+ Future<void> _pasteLoginLink() async {
+ final l = AppLocalizations.of(context)!;
+ final controller = TextEditingController();
+ String? errorText;
+ final link = await showDialog<Uri>(
+ context: context,
+ builder: (dialogContext) => StatefulBuilder(
+ builder: (context, setDialogState) {
+ void submit() {
+ final uri = Uri.tryParse(controller.text.trim());
+ try {
+ if (uri == null) throw const SetupLinkException('Invalid link');
+ SetupLinkService.parseLink(uri);
+ Navigator.pop(dialogContext, uri);
+ } on SetupLinkException {
+ setDialogState(() => errorText = l.setupLinkInvalid);
+ }
+ }
+
+ return AlertDialog(
+ title: Text(l.loginPasteLink),
+ content: Column(
+ mainAxisSize: MainAxisSize.min,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(l.loginPasteLinkHelp),
+ const SizedBox(height: 16),
+ TextField(
+ key: const Key('login-link-field'),
+ controller: controller,
+ autofocus: true,
+ autocorrect: false,
+ enableSuggestions: false,
+ keyboardType: TextInputType.url,
+ minLines: 2,
+ maxLines: 4,
+ decoration: InputDecoration(
+ hintText: 'absorb://setup/...',
+ errorText: errorText,
+ suffixIcon: IconButton(
+ tooltip: l.loginPasteLink,
+ icon: const Icon(Icons.content_paste_rounded),
+ onPressed: () async {
+ final data = await Clipboard.getData('text/plain');
+ controller.text = data?.text ?? '';
+ setDialogState(() => errorText = null);
+ },
+ ),
+ ),
+ ),
+ ],
+ ),
+ actions: [
+ TextButton(
+ onPressed: () => Navigator.pop(dialogContext),
+ child: Text(l.cancel),
+ ),
+ FilledButton(
+ key: const Key('submit-login-link'),
+ onPressed: submit,
+ child: Text(l.loginSignIn),
+ ),
+ ],
+ );
+ },
+ ),
+ );
+ controller.dispose();
+ if (link == null || !mounted) return;
+ await handleSetupLinkLogin(context, link, askForConfirmation: false);
+ }
+
Future<void> _quickSwitch(SavedAccount account) async {
setState(() => _isConnecting = true);
diff --git a/lib/services/setup_link_service.dart b/lib/services/setup_link_service.dart
new file mode 100644
index 00000000..1706b716
--- /dev/null
+++ b/lib/services/setup_link_service.dart
@@ -0,0 +1,127 @@
+import 'dart:convert';
+
+import '../utils/server_url.dart';
+
+class SetupLinkData {
+ final String serverUrl;
+ final String username;
+ final String apiKey;
+ final String? userId;
+ final Map<String, String> customHeaders;
+
+ const SetupLinkData({
+ required this.serverUrl,
+ required this.username,
+ required this.apiKey,
+ required this.userId,
+ required this.customHeaders,
+ });
+}
+
+class SetupLinkException implements Exception {
+ final String message;
+
+ const SetupLinkException(this.message);
+
+ @override
+ String toString() => 'SetupLinkException: $message';
+}
+
+class SetupLinkService {
+ static const scheme = 'absorb';
+ static const host = 'setup';
+ static const _maxEncodedLength = 16000;
+
+ static bool isSetupLink(Uri uri) =>
+ uri.scheme.toLowerCase() == scheme && uri.host.toLowerCase() == host;
+
+ static Uri createLink(Map<String, dynamic> payload) {
+ parsePayload(payload);
+ final json = jsonEncode(payload);
+ final encoded = base64Url.encode(utf8.encode(json)).replaceAll('=', '');
+ return Uri(scheme: scheme, host: host, pathSegments: [encoded]);
+ }
+
+ static SetupLinkData parseLink(Uri uri) {
+ if (!isSetupLink(uri) || uri.pathSegments.length != 1) {
+ throw const SetupLinkException('Not an Absorb setup link');
+ }
+
+ final encoded = uri.pathSegments.single;
+ if (encoded.isEmpty || encoded.length > _maxEncodedLength) {
+ throw const SetupLinkException('Invalid setup link length');
+ }
+
+ try {
+ final decoded = utf8.decode(
+ base64Url.decode(base64Url.normalize(encoded)),
+ );
+ final payload = jsonDecode(decoded);
+ if (payload is! Map<String, dynamic>) {
+ throw const SetupLinkException('Setup payload is not an object');
+ }
+ return parsePayload(payload);
+ } on SetupLinkException {
+ rethrow;
+ } catch (_) {
+ throw const SetupLinkException('Setup link could not be decoded');
+ }
+ }
+
+ static SetupLinkData parsePayload(Map<String, dynamic> payload) {
+ if (payload['setup'] != true || payload['version'] is! int) {
+ throw const SetupLinkException('Setup payload is missing its version');
+ }
+
+ final accounts = payload['accounts'];
+ if (accounts is! List || accounts.length != 1 || accounts.single is! Map) {
+ throw const SetupLinkException('Setup payload must contain one account');
+ }
+
+ final account = Map<String, dynamic>.from(accounts.single as Map);
+ final rawServerUrl = account['serverUrl'];
+ final username = account['username'];
+ final apiKey = account['token'];
+ final userId = account['userId'];
+
+ if (rawServerUrl is! String ||
+ username is! String ||
+ apiKey is! String ||
+ (userId != null && userId is! String)) {
+ throw const SetupLinkException('Setup account fields are invalid');
+ }
+
+ final serverUrl = normalizeServerUrl(rawServerUrl);
+ final parsedServerUrl = Uri.tryParse(serverUrl);
+ if (serverUrl.isEmpty ||
+ parsedServerUrl == null ||
+ !parsedServerUrl.hasAuthority ||
+ !{'http', 'https'}.contains(parsedServerUrl.scheme.toLowerCase()) ||
+ username.trim().isEmpty ||
+ apiKey.trim().isEmpty) {
+ throw const SetupLinkException('Setup account is incomplete');
+ }
+
+ final rawHeaders = payload['customHeaders'];
+ final headers = <String, String>{};
+ if (rawHeaders != null) {
+ if (rawHeaders is! Map) {
+ throw const SetupLinkException('Custom headers are invalid');
+ }
+ for (final entry in rawHeaders.entries) {
+ if (entry.key is! String || entry.value is! String) {
+ throw const SetupLinkException('Custom headers are invalid');
+ }
+ headers[entry.key as String] = entry.value as String;
+ }
+ }
+
+ return SetupLinkData(
+ serverUrl: serverUrl,
+ username: username.trim(),
+ apiKey: apiKey,
+ userId: userId as String?,
+ customHeaders: Map.unmodifiable(headers),
+ );
+ }
+}
diff --git a/lib/widgets/setup_link_login.dart b/lib/widgets/setup_link_login.dart
new file mode 100644
index 00000000..be3073fa
--- /dev/null
+++ b/lib/widgets/setup_link_login.dart
@@ -0,0 +1,74 @@
+import 'package:flutter/material.dart';
+import 'package:provider/provider.dart';
+
+import '../l10n/app_localizations.dart';
+import '../providers/auth_provider.dart';
+import '../services/setup_link_service.dart';
+import 'overlay_toast.dart';
+
+Future<bool> handleSetupLinkLogin(
+ BuildContext context,
+ Uri link, {
+ bool askForConfirmation = true,
+}) async {
+ final l = AppLocalizations.of(context)!;
+ late final SetupLinkData setup;
+ try {
+ setup = SetupLinkService.parseLink(link);
+ } on SetupLinkException {
+ showOverlayToast(
+ context,
+ l.setupLinkInvalid,
+ icon: Icons.error_outline_rounded,
+ );
+ return false;
+ }
+
+ if (askForConfirmation) {
+ final server = Uri.parse(setup.serverUrl);
+ final serverLabel = [
+ server.host,
+ if (server.hasPort) ':${server.port}',
+ if (server.path.isNotEmpty && server.path != '/') server.path,
+ ].join();
+ final confirmed = await showDialog<bool>(
+ context: context,
+ builder: (dialogContext) => AlertDialog(
+ title: Text(l.setupLinkConfirmTitle),
+ content: Text(l.setupLinkConfirmBody(serverLabel, setup.username)),
+ actions: [
+ TextButton(
+ onPressed: () => Navigator.pop(dialogContext, false),
+ child: Text(l.cancel),
+ ),
+ FilledButton(
+ onPressed: () => Navigator.pop(dialogContext, true),
+ child: Text(l.loginSignIn),
+ ),
+ ],
+ ),
+ );
+ if (confirmed != true || !context.mounted) return false;
+ }
+
+ showOverlayToast(context, l.setupLinkSigningIn, icon: Icons.login_rounded);
+ final auth = context.read<AuthProvider>();
+ final success = await auth.loginWithApiKey(
+ serverUrl: setup.serverUrl,
+ apiKey: setup.apiKey,
+ customHeaders: setup.customHeaders,
+ l: l,
+ );
+ if (!context.mounted) return success;
+
+ showOverlayToast(
+ context,
+ success
+ ? l.loginSignedInAs(auth.username ?? setup.username)
+ : auth.errorMessage ?? l.loginFailed,
+ icon: success
+ ? Icons.check_circle_outline_rounded
+ : Icons.error_outline_rounded,
+ );
+ return success;
+}
diff --git a/lib/widgets/setup_link_share_sheet.dart b/lib/widgets/setup_link_share_sheet.dart
new file mode 100644
index 00000000..226e5a3d
--- /dev/null
+++ b/lib/widgets/setup_link_share_sheet.dart
@@ -0,0 +1,153 @@
+import 'package:flutter/material.dart';
+import 'package:qr_flutter/qr_flutter.dart';
+
+import '../l10n/app_localizations.dart';
+
+class SetupLinkShareSheet extends StatelessWidget {
+ final String username;
+ final Uri setupLink;
+ final Future<void> Function() onShare;
+ final Future<void> Function() onCopy;
+ final Future<void> Function() onSaveFile;
+
+ const SetupLinkShareSheet({
+ super.key,
+ required this.username,
+ required this.setupLink,
+ required this.onShare,
+ required this.onCopy,
+ required this.onSaveFile,
+ });
+
+ @override
+ Widget build(BuildContext context) {
+ final l = AppLocalizations.of(context)!;
+ final cs = Theme.of(context).colorScheme;
+
+ return SafeArea(
+ child: SingleChildScrollView(
+ padding: const EdgeInsets.fromLTRB(24, 12, 24, 24),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Container(
+ width: 36,
+ height: 4,
+ decoration: BoxDecoration(
+ color: cs.onSurfaceVariant.withValues(alpha: 0.3),
+ borderRadius: BorderRadius.circular(2),
+ ),
+ ),
+ const SizedBox(height: 20),
+ Text(
+ l.setupLinkShareTitle,
+ style: Theme.of(
+ context,
+ ).textTheme.headlineSmall?.copyWith(fontWeight: FontWeight.w600),
+ ),
+ const SizedBox(height: 8),
+ Text(
+ l.setupLinkShareDescription(username),
+ textAlign: TextAlign.center,
+ style: Theme.of(
+ context,
+ ).textTheme.bodyMedium?.copyWith(color: cs.onSurfaceVariant),
+ ),
+ const SizedBox(height: 20),
+ Semantics(
+ label: l.setupLinkShareTitle,
+ child: Container(
+ padding: const EdgeInsets.all(14),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(18),
+ ),
+ child: QrImageView(
+ key: const Key('setup-link-qr'),
+ data: setupLink.toString(),
+ version: QrVersions.auto,
+ size: 220,
+ padding: EdgeInsets.zero,
+ backgroundColor: Colors.white,
+ eyeStyle: const QrEyeStyle(
+ eyeShape: QrEyeShape.square,
+ color: Colors.black,
+ ),
+ dataModuleStyle: const QrDataModuleStyle(
+ dataModuleShape: QrDataModuleShape.square,
+ color: Colors.black,
+ ),
+ errorStateBuilder: (_, __) => SizedBox(
+ width: 220,
+ height: 220,
+ child: Center(
+ child: Text(
+ l.setupLinkQrError,
+ textAlign: TextAlign.center,
+ style: TextStyle(color: cs.onSurfaceVariant),
+ ),
+ ),
+ ),
+ ),
+ ),
+ ),
+ const SizedBox(height: 20),
+ Container(
+ padding: const EdgeInsets.all(12),
+ decoration: BoxDecoration(
+ color: cs.errorContainer.withValues(alpha: 0.45),
+ borderRadius: BorderRadius.circular(12),
+ ),
+ child: Row(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Icon(
+ Icons.lock_outline_rounded,
+ size: 20,
+ color: cs.onErrorContainer,
+ ),
+ const SizedBox(width: 10),
+ Expanded(
+ child: Text(
+ l.setupLinkPrivateWarning(username),
+ style: Theme.of(context).textTheme.bodySmall?.copyWith(
+ color: cs.onErrorContainer,
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ const SizedBox(height: 20),
+ FilledButton.icon(
+ key: const Key('setup-link-share'),
+ onPressed: onShare,
+ icon: const Icon(Icons.ios_share_rounded),
+ label: Text(l.setupLinkShare),
+ style: FilledButton.styleFrom(
+ minimumSize: const Size.fromHeight(48),
+ ),
+ ),
+ const SizedBox(height: 10),
+ OutlinedButton.icon(
+ key: const Key('setup-link-copy'),
+ onPressed: onCopy,
+ icon: const Icon(Icons.content_copy_rounded),
+ label: Text(l.setupLinkCopy),
+ style: OutlinedButton.styleFrom(
+ minimumSize: const Size.fromHeight(48),
+ ),
+ ),
+ const SizedBox(height: 6),
+ TextButton.icon(
+ key: const Key('setup-link-save-file'),
+ onPressed: onSaveFile,
+ icon: const Icon(Icons.download_rounded),
+ label: Text(l.setupLinkSaveFile),
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+}
diff --git a/pubspec.lock b/pubspec.lock
index 6a2d6d0c..701e8758 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -9,6 +9,38 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.3"
+ app_links:
+ dependency: "direct main"
+ description:
+ name: app_links
+ sha256: f8db46d2ea9ff6f3a37191a7fd5b7813da1253ace8c32c1b9eadace41d1188ea
+ url: "https://pub.dev"
+ source: hosted
+ version: "7.2.1"
+ app_links_linux:
+ dependency: transitive
+ description:
+ name: app_links_linux
+ sha256: f5f7173a78609f3dfd4c2ff2c95bd559ab43c80a87dc6a095921d96c05688c81
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.3"
+ app_links_platform_interface:
+ dependency: transitive
+ description:
+ name: app_links_platform_interface
+ sha256: "7546f09a6e93f4a2df2fe2bd40a5c6c64310ac461b036d82b43033be7a59f809"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.0.4"
+ app_links_web:
+ dependency: transitive
+ description:
+ name: app_links_web
+ sha256: af060ed76183f9e2b87510a9480e56a5352b6c249778d07bd2c95fc35632a555
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.4"
archive:
dependency: transitive
description:
@@ -483,6 +515,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "4.7.3"
+ gtk:
+ dependency: transitive
+ description:
+ name: gtk
+ sha256: "4ff85b2a16724029dd9e5bbb5a94b6918f9973f74ba571c949d2002801879cf5"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.2.0"
home_widget:
dependency: "direct main"
description:
@@ -930,6 +970,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.2.0"
+ qr:
+ dependency: transitive
+ description:
+ name: qr
+ sha256: "5a1d2586170e172b8a8c8470bbbffd5eb0cd38a66c0d77155ea138d3af3a4445"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.0.2"
+ qr_flutter:
+ dependency: "direct main"
+ description:
+ name: qr_flutter
+ sha256: "5095f0fc6e3f71d08adef8feccc8cea4f12eec18a2e31c2e8d82cb6019f4b097"
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.1.0"
quick_actions:
dependency: "direct main"
description:
@@ -1440,5 +1496,5 @@ packages:
source: hosted
version: "3.1.3"
sdks:
- dart: ">=3.10.0 <4.0.0"
- flutter: ">=3.41.0"
+ dart: ">=3.12.0 <4.0.0"
+ flutter: ">=3.44.0"
diff --git a/pubspec.yaml b/pubspec.yaml
index ae7bc237..6485a0fb 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,7 +1,7 @@
name: absorb
description: An Audiobookshelf Client
publish_to: 'none'
-version: 1.9.3+219
+version: 1.9.3+220
environment:
sdk: '>=3.10.0 <4.0.0'
@@ -79,6 +79,8 @@ dependencies:
# Log sharing
share_plus: ^10.0.0
+ app_links: ^7.2.1
+ qr_flutter: ^4.1.0
# Homescreen widget
home_widget: ^0.7.0