Compare commits
31 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
24a15d33f3
|
|||
|
862e3b451b
|
|||
|
62a3ea26e3
|
|||
|
5414dfd4f0
|
|||
|
f2819a9d92
|
|||
|
bc02eb6923
|
|||
|
dd6bc3cc99
|
|||
|
863a84a2a0
|
|||
|
4b1c9b5820
|
|||
|
0237e457fc
|
|||
|
f6f1c99da7
|
|||
|
583902ad52
|
|||
|
cfd2a47064
|
|||
|
5cdeb7bd22
|
|||
|
6e5255550a
|
|||
|
8a9de6f43f
|
|||
|
c9c362d3d1
|
|||
|
617d22847b
|
|||
|
|
3c77a4d5be | ||
|
|
f9061a3dc6 | ||
|
|
e12a26d5c0 | ||
|
|
6b31d28cd3 | ||
|
bff301fdb3
|
|||
|
|
2049ee4401 | ||
|
18c071826f
|
|||
|
5bfc301088
|
|||
|
a39853ba5a
|
|||
|
639417e952
|
|||
|
|
9de4def4d4 | ||
|
fa0051b606
|
|||
|
9d867fd888
|
BIN
assets/audio/alert.reversed.wav
Normal file
BIN
assets/audio/alert.reversed.wav
Normal file
Binary file not shown.
BIN
assets/audio/alert.wav
Normal file
BIN
assets/audio/alert.wav
Normal file
Binary file not shown.
Binary file not shown.
BIN
assets/audio/messages.wav
Normal file
BIN
assets/audio/messages.wav
Normal file
Binary file not shown.
Binary file not shown.
BIN
assets/audio/notification.wav
Normal file
BIN
assets/audio/notification.wav
Normal file
Binary file not shown.
@@ -1652,5 +1652,80 @@
|
||||
"dashboardCardActivityColumnDescription": "Check In, Fortune Graph & Fortune",
|
||||
"dashboardCardPostsColumnDescription": "Featured Posts",
|
||||
"dashboardCardSocialColumnDescription": "Friends & Notifications",
|
||||
"dashboardCardChatsColumnDescription": "Recent Chats"
|
||||
"dashboardCardChatsColumnDescription": "Recent Chats",
|
||||
"searchAccountsHint": "Search across the Solar Network and fediverse network.",
|
||||
"fitnessActivity": "Fitness Activity",
|
||||
"loadingFitnessData": "Loading fitness data...",
|
||||
"fitnessDataNotAvailable": "Fitness Data Not Available",
|
||||
"fitnessDataNotAvailableDescription": "Fitness data is only available on iOS and Android devices.",
|
||||
"fitnessPermissionRequired": "Permission Required",
|
||||
"fitnessPermissionRequiredDescription": "To access your fitness data, we need permission to read your health information.",
|
||||
"requestPermission": "Request Permission",
|
||||
"noFitnessData": "No Fitness Data",
|
||||
"noFitnessDataDescription": "No fitness data found. Start tracking your workouts to see them here.",
|
||||
"totalWorkouts": "Total Workouts",
|
||||
"totalDuration": "Total Duration",
|
||||
"totalCalories": "Total Calories",
|
||||
"noWorkoutsOnDate": "No workouts on {}",
|
||||
"noWorkoutsOnDateDescription": "No workouts found for this date.",
|
||||
"workoutsOnDate": "Workouts on {}",
|
||||
"refresh": "Refresh",
|
||||
"fitnessWorkoutTypeBadminton": "Badminton",
|
||||
"fitnessWorkoutTypeBaseball": "Baseball",
|
||||
"fitnessWorkoutTypeBasketball": "Basketball",
|
||||
"fitnessWorkoutTypeBiking": "Biking",
|
||||
"fitnessWorkoutTypeCalisthenics": "Calisthenics",
|
||||
"fitnessWorkoutTypeCricket": "Cricket",
|
||||
"fitnessWorkoutTypeDancing": "Dancing",
|
||||
"fitnessWorkoutTypeElliptical": "Elliptical",
|
||||
"fitnessWorkoutTypeFencing": "Fencing",
|
||||
"fitnessWorkoutTypeFrisbeeDisc": "Frisbee Disc",
|
||||
"fitnessWorkoutTypeGolf": "Golf",
|
||||
"fitnessWorkoutTypeGymnastics": "Gymnastics",
|
||||
"fitnessWorkoutTypeHiking": "Hiking",
|
||||
"fitnessWorkoutTypeHockey": "Hockey",
|
||||
"fitnessWorkoutTypeJumpRope": "Jump Rope",
|
||||
"fitnessWorkoutTypeKickboxing": "Kickboxing",
|
||||
"fitnessWorkoutTypeLacrosse": "Lacrosse",
|
||||
"fitnessWorkoutTypeMartialArts": "Martial Arts",
|
||||
"fitnessWorkoutTypeMindAndBody": "Mind and Body",
|
||||
"fitnessWorkoutTypePilates": "Pilates",
|
||||
"fitnessWorkoutTypeRowing": "Rowing",
|
||||
"fitnessWorkoutTypeRowingMachine": "Rowing Machine",
|
||||
"fitnessWorkoutTypeRugby": "Rugby",
|
||||
"fitnessWorkoutTypeRunning": "Running",
|
||||
"fitnessWorkoutTypeSailing": "Sailing",
|
||||
"fitnessWorkoutTypeSkiing": "Skiing",
|
||||
"fitnessWorkoutTypeSnowSports": "Snow Sports",
|
||||
"fitnessWorkoutTypeSoftball": "Softball",
|
||||
"fitnessWorkoutTypeStairClimbing": "Stair Climbing",
|
||||
"fitnessWorkoutTypeStairClimbingMachine": "Stair Climbing Machine",
|
||||
"fitnessWorkoutTypeStepTraining": "Step Training",
|
||||
"fitnessWorkoutTypeSurfing": "Surfing",
|
||||
"fitnessWorkoutTypeSwimming": "Swimming",
|
||||
"fitnessWorkoutTypeTableTennis": "Table Tennis",
|
||||
"fitnessWorkoutTypeTennis": "Tennis",
|
||||
"fitnessWorkoutTypeCrossTraining": "Cross Training",
|
||||
"fitnessWorkoutTypeCurling": "Curling",
|
||||
"fitnessWorkoutTypeCrossCountrySkiing": "Cross Country Skiing",
|
||||
"fitnessWorkoutTypeEquestrianSports": "Equestrian Sports",
|
||||
"fitnessWorkoutTypeFishing": "Fishing",
|
||||
"fitnessWorkoutTypeFunctionalStrengthTraining": "Functional Strength Training",
|
||||
"fitnessWorkoutTypeHandCycling": "Hand Cycling",
|
||||
"fitnessWorkoutTypeMixedCardio": "Mixed Cardio",
|
||||
"fitnessWorkoutTypeOther": "Other",
|
||||
"fitnessWorkoutTypePaddleSports": "Paddle Sports",
|
||||
"fitnessWorkoutTypePickleball": "Pickleball",
|
||||
"fitnessWorkoutTypeRacquetball": "Racquetball",
|
||||
"fitnessWorkoutTypeRockClimbing": "Rock Climbing",
|
||||
"fitnessWorkoutTypeSkating": "Skating",
|
||||
"fitnessWorkoutTypeSnowboarding": "Snowboarding",
|
||||
"fitnessWorkoutTypeSoccer": "Soccer",
|
||||
"fitnessWorkoutTypeSquash": "Squash",
|
||||
"fitnessWorkoutTypeStrengthTraining": "Strength Training",
|
||||
"fitnessWorkoutTypeVolleyball": "Volleyball",
|
||||
"fitnessWorkoutTypeWalking": "Walking",
|
||||
"fitnessWorkoutTypeWeightlifting": "Weightlifting",
|
||||
"fitnessWorkoutTypeYoga": "Yoga",
|
||||
"fitnessWorkoutTypeDefault": "Fitness"
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -191,6 +191,7 @@
|
||||
"statusActivityEndedTitle": "{} 正在 {} {} 直到 {}",
|
||||
"appSettings": "应用设置",
|
||||
"accountSettings": "账号设置",
|
||||
"accounts": "账号",
|
||||
"settings": "设置",
|
||||
"language": "语言",
|
||||
"accountLanguageHint": "此语言将用于电子邮件和推送通知。",
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
140
ios/Podfile.lock
140
ios/Podfile.lock
@@ -1,5 +1,5 @@
|
||||
PODS:
|
||||
- Alamofire (5.11.0)
|
||||
- Alamofire (5.11.1)
|
||||
- audio_session (0.0.1):
|
||||
- Flutter
|
||||
- connectivity_plus (0.0.1):
|
||||
@@ -44,83 +44,83 @@ PODS:
|
||||
- Flutter
|
||||
- file_saver (0.0.1):
|
||||
- Flutter
|
||||
- Firebase/CoreOnly (12.6.0):
|
||||
- FirebaseCore (~> 12.6.0)
|
||||
- Firebase/Crashlytics (12.6.0):
|
||||
- Firebase/CoreOnly (12.8.0):
|
||||
- FirebaseCore (~> 12.8.0)
|
||||
- Firebase/Crashlytics (12.8.0):
|
||||
- Firebase/CoreOnly
|
||||
- FirebaseCrashlytics (~> 12.6.0)
|
||||
- Firebase/Messaging (12.6.0):
|
||||
- FirebaseCrashlytics (~> 12.8.0)
|
||||
- Firebase/Messaging (12.8.0):
|
||||
- Firebase/CoreOnly
|
||||
- FirebaseMessaging (~> 12.6.0)
|
||||
- firebase_analytics (12.1.0):
|
||||
- FirebaseMessaging (~> 12.8.0)
|
||||
- firebase_analytics (12.1.1):
|
||||
- firebase_core
|
||||
- FirebaseAnalytics (= 12.6.0)
|
||||
- FirebaseAnalytics (= 12.8.0)
|
||||
- Flutter
|
||||
- firebase_core (4.3.0):
|
||||
- Firebase/CoreOnly (= 12.6.0)
|
||||
- firebase_core (4.4.0):
|
||||
- Firebase/CoreOnly (= 12.8.0)
|
||||
- Flutter
|
||||
- firebase_crashlytics (5.0.6):
|
||||
- Firebase/Crashlytics (= 12.6.0)
|
||||
- firebase_crashlytics (5.0.7):
|
||||
- Firebase/Crashlytics (= 12.8.0)
|
||||
- firebase_core
|
||||
- Flutter
|
||||
- firebase_messaging (16.1.0):
|
||||
- Firebase/Messaging (= 12.6.0)
|
||||
- firebase_messaging (16.1.1):
|
||||
- Firebase/Messaging (= 12.8.0)
|
||||
- firebase_core
|
||||
- Flutter
|
||||
- FirebaseAnalytics (12.6.0):
|
||||
- FirebaseAnalytics/Default (= 12.6.0)
|
||||
- FirebaseCore (~> 12.6.0)
|
||||
- FirebaseInstallations (~> 12.6.0)
|
||||
- FirebaseAnalytics (12.8.0):
|
||||
- FirebaseAnalytics/Default (= 12.8.0)
|
||||
- FirebaseCore (~> 12.8.0)
|
||||
- FirebaseInstallations (~> 12.8.0)
|
||||
- GoogleUtilities/AppDelegateSwizzler (~> 8.1)
|
||||
- GoogleUtilities/MethodSwizzler (~> 8.1)
|
||||
- GoogleUtilities/Network (~> 8.1)
|
||||
- "GoogleUtilities/NSData+zlib (~> 8.1)"
|
||||
- nanopb (~> 3.30910.0)
|
||||
- FirebaseAnalytics/Default (12.6.0):
|
||||
- FirebaseCore (~> 12.6.0)
|
||||
- FirebaseInstallations (~> 12.6.0)
|
||||
- GoogleAppMeasurement/Default (= 12.6.0)
|
||||
- FirebaseAnalytics/Default (12.8.0):
|
||||
- FirebaseCore (~> 12.8.0)
|
||||
- FirebaseInstallations (~> 12.8.0)
|
||||
- GoogleAppMeasurement/Default (= 12.8.0)
|
||||
- GoogleUtilities/AppDelegateSwizzler (~> 8.1)
|
||||
- GoogleUtilities/MethodSwizzler (~> 8.1)
|
||||
- GoogleUtilities/Network (~> 8.1)
|
||||
- "GoogleUtilities/NSData+zlib (~> 8.1)"
|
||||
- nanopb (~> 3.30910.0)
|
||||
- FirebaseCore (12.6.0):
|
||||
- FirebaseCoreInternal (~> 12.6.0)
|
||||
- FirebaseCore (12.8.0):
|
||||
- FirebaseCoreInternal (~> 12.8.0)
|
||||
- GoogleUtilities/Environment (~> 8.1)
|
||||
- GoogleUtilities/Logger (~> 8.1)
|
||||
- FirebaseCoreExtension (12.6.0):
|
||||
- FirebaseCore (~> 12.6.0)
|
||||
- FirebaseCoreInternal (12.6.0):
|
||||
- FirebaseCoreExtension (12.8.0):
|
||||
- FirebaseCore (~> 12.8.0)
|
||||
- FirebaseCoreInternal (12.8.0):
|
||||
- "GoogleUtilities/NSData+zlib (~> 8.1)"
|
||||
- FirebaseCrashlytics (12.6.0):
|
||||
- FirebaseCore (~> 12.6.0)
|
||||
- FirebaseInstallations (~> 12.6.0)
|
||||
- FirebaseRemoteConfigInterop (~> 12.6.0)
|
||||
- FirebaseSessions (~> 12.6.0)
|
||||
- FirebaseCrashlytics (12.8.0):
|
||||
- FirebaseCore (~> 12.8.0)
|
||||
- FirebaseInstallations (~> 12.8.0)
|
||||
- FirebaseRemoteConfigInterop (~> 12.8.0)
|
||||
- FirebaseSessions (~> 12.8.0)
|
||||
- GoogleDataTransport (~> 10.1)
|
||||
- GoogleUtilities/Environment (~> 8.1)
|
||||
- nanopb (~> 3.30910.0)
|
||||
- PromisesObjC (~> 2.4)
|
||||
- FirebaseInstallations (12.6.0):
|
||||
- FirebaseCore (~> 12.6.0)
|
||||
- FirebaseInstallations (12.8.0):
|
||||
- FirebaseCore (~> 12.8.0)
|
||||
- GoogleUtilities/Environment (~> 8.1)
|
||||
- GoogleUtilities/UserDefaults (~> 8.1)
|
||||
- PromisesObjC (~> 2.4)
|
||||
- FirebaseMessaging (12.6.0):
|
||||
- FirebaseCore (~> 12.6.0)
|
||||
- FirebaseInstallations (~> 12.6.0)
|
||||
- FirebaseMessaging (12.8.0):
|
||||
- FirebaseCore (~> 12.8.0)
|
||||
- FirebaseInstallations (~> 12.8.0)
|
||||
- GoogleDataTransport (~> 10.1)
|
||||
- GoogleUtilities/AppDelegateSwizzler (~> 8.1)
|
||||
- GoogleUtilities/Environment (~> 8.1)
|
||||
- GoogleUtilities/Reachability (~> 8.1)
|
||||
- GoogleUtilities/UserDefaults (~> 8.1)
|
||||
- nanopb (~> 3.30910.0)
|
||||
- FirebaseRemoteConfigInterop (12.6.0)
|
||||
- FirebaseSessions (12.6.0):
|
||||
- FirebaseCore (~> 12.6.0)
|
||||
- FirebaseCoreExtension (~> 12.6.0)
|
||||
- FirebaseInstallations (~> 12.6.0)
|
||||
- FirebaseRemoteConfigInterop (12.8.0)
|
||||
- FirebaseSessions (12.8.0):
|
||||
- FirebaseCore (~> 12.8.0)
|
||||
- FirebaseCoreExtension (~> 12.8.0)
|
||||
- FirebaseInstallations (~> 12.8.0)
|
||||
- GoogleDataTransport (~> 10.1)
|
||||
- GoogleUtilities/Environment (~> 8.1)
|
||||
- GoogleUtilities/UserDefaults (~> 8.1)
|
||||
@@ -161,23 +161,23 @@ PODS:
|
||||
- GoogleUtilities/Logger (~> 8.1)
|
||||
- GoogleUtilities/Network (~> 8.1)
|
||||
- nanopb (~> 3.30910.0)
|
||||
- GoogleAppMeasurement/Core (12.6.0):
|
||||
- GoogleAppMeasurement/Core (12.8.0):
|
||||
- GoogleUtilities/AppDelegateSwizzler (~> 8.1)
|
||||
- GoogleUtilities/MethodSwizzler (~> 8.1)
|
||||
- GoogleUtilities/Network (~> 8.1)
|
||||
- "GoogleUtilities/NSData+zlib (~> 8.1)"
|
||||
- nanopb (~> 3.30910.0)
|
||||
- GoogleAppMeasurement/Default (12.6.0):
|
||||
- GoogleAppMeasurement/Default (12.8.0):
|
||||
- GoogleAdsOnDeviceConversion (~> 3.2.0)
|
||||
- GoogleAppMeasurement/Core (= 12.6.0)
|
||||
- GoogleAppMeasurement/IdentitySupport (= 12.6.0)
|
||||
- GoogleAppMeasurement/Core (= 12.8.0)
|
||||
- GoogleAppMeasurement/IdentitySupport (= 12.8.0)
|
||||
- GoogleUtilities/AppDelegateSwizzler (~> 8.1)
|
||||
- GoogleUtilities/MethodSwizzler (~> 8.1)
|
||||
- GoogleUtilities/Network (~> 8.1)
|
||||
- "GoogleUtilities/NSData+zlib (~> 8.1)"
|
||||
- nanopb (~> 3.30910.0)
|
||||
- GoogleAppMeasurement/IdentitySupport (12.6.0):
|
||||
- GoogleAppMeasurement/Core (= 12.6.0)
|
||||
- GoogleAppMeasurement/IdentitySupport (12.8.0):
|
||||
- GoogleAppMeasurement/Core (= 12.8.0)
|
||||
- GoogleUtilities/AppDelegateSwizzler (~> 8.1)
|
||||
- GoogleUtilities/MethodSwizzler (~> 8.1)
|
||||
- GoogleUtilities/Network (~> 8.1)
|
||||
@@ -213,6 +213,8 @@ PODS:
|
||||
- GoogleUtilities/UserDefaults (8.1.0):
|
||||
- GoogleUtilities/Logger
|
||||
- GoogleUtilities/Privacy
|
||||
- health (13.1.4):
|
||||
- Flutter
|
||||
- image_picker_ios (0.0.1):
|
||||
- Flutter
|
||||
- in_app_review (2.0.0):
|
||||
@@ -275,7 +277,7 @@ PODS:
|
||||
- Flutter
|
||||
- receive_sharing_intent (1.8.1):
|
||||
- Flutter
|
||||
- record_ios (1.1.0):
|
||||
- record_ios (1.2.0):
|
||||
- Flutter
|
||||
- SDWebImage (5.21.5):
|
||||
- SDWebImage/Core (= 5.21.5)
|
||||
@@ -354,6 +356,7 @@ DEPENDENCIES:
|
||||
- flutter_udid (from `.symlinks/plugins/flutter_udid/ios`)
|
||||
- flutter_webrtc (from `.symlinks/plugins/flutter_webrtc/ios`)
|
||||
- gal (from `.symlinks/plugins/gal/darwin`)
|
||||
- health (from `.symlinks/plugins/health/ios`)
|
||||
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
|
||||
- in_app_review (from `.symlinks/plugins/in_app_review/ios`)
|
||||
- irondash_engine_context (from `.symlinks/plugins/irondash_engine_context/ios`)
|
||||
@@ -460,6 +463,8 @@ EXTERNAL SOURCES:
|
||||
:path: ".symlinks/plugins/flutter_webrtc/ios"
|
||||
gal:
|
||||
:path: ".symlinks/plugins/gal/darwin"
|
||||
health:
|
||||
:path: ".symlinks/plugins/health/ios"
|
||||
image_picker_ios:
|
||||
:path: ".symlinks/plugins/image_picker_ios/ios"
|
||||
in_app_review:
|
||||
@@ -518,7 +523,7 @@ EXTERNAL SOURCES:
|
||||
:path: ".symlinks/plugins/wakelock_plus/ios"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
Alamofire: bd5e7b23a1a750975288482c1831d71e74415f86
|
||||
Alamofire: eec6cd8f73b242b59e34153a606a909eb9864b14
|
||||
audio_session: 9bb7f6c970f21241b19f5a3658097ae459681ba0
|
||||
connectivity_plus: cb623214f4e1f6ef8fe7403d580fdad517d2f7dd
|
||||
croppy: 979e8ddc254f4642bffe7d52dc7193354b27ba30
|
||||
@@ -527,20 +532,20 @@ SPEC CHECKSUMS:
|
||||
DKPhotoGallery: b3834fecb755ee09a593d7c9e389d8b5d6deed60
|
||||
file_picker: a0560bc09d61de87f12d246fc47d2119e6ef37be
|
||||
file_saver: 6cdbcddd690cb02b0c1a0c225b37cd805c2bf8b6
|
||||
Firebase: a451a7b61536298fd5cbfe3a746fd40443a50679
|
||||
firebase_analytics: 4f9cca09e65f6c2944a862c6dc86f6bed9fb769c
|
||||
firebase_core: ba00a168e719694f38960502ceb560285603d073
|
||||
firebase_crashlytics: 13f4b77e9ce2a84b1f8ea07f293db5b6213ce1cf
|
||||
firebase_messaging: bf0e29321927edc02a563c984dbfa5b063864b15
|
||||
FirebaseAnalytics: d0a97a0db6425e5a5d966340b87f92ca7b13a557
|
||||
FirebaseCore: 0e38ad5d62d980a47a64b8e9301ffa311457be04
|
||||
FirebaseCoreExtension: 032fd6f8509e591fda8cb76f6651f20d926b121f
|
||||
FirebaseCoreInternal: 69bf1306a05b8ac43004f6cc1f804bb7b05b229e
|
||||
FirebaseCrashlytics: 3d6248c50726ee7832aef0e53cb84c9e64d9fa7e
|
||||
FirebaseInstallations: 631b38da2e11a83daa4bfb482f79d286a5dfa7ad
|
||||
FirebaseMessaging: a61bc42dcab3f7a346d94bbb54dab2c9435b18b2
|
||||
FirebaseRemoteConfigInterop: 3443b8cb8fffd76bb3e03b2a84bfd3db952fcda4
|
||||
FirebaseSessions: 2e8f808347e665dff3e5843f275715f07045297d
|
||||
Firebase: 9a58fdbc9d8655ed7b79a19cf9690bb007d3d46d
|
||||
firebase_analytics: b5a19eaf3e4bf4187b0815ef4850b8916e2bc549
|
||||
firebase_core: ee30637e6744af8e0c12a6a1e8a9718506ec2398
|
||||
firebase_crashlytics: 28b8f39df8104131376393e6af658b8b77dd120f
|
||||
firebase_messaging: 343de01a8d3e18b60df0c6d37f7174c44ae38e02
|
||||
FirebaseAnalytics: f20bbad8cb7f65d8a5eaefeb424ae8800a31bdfc
|
||||
FirebaseCore: 0dbad74bda10b8fb9ca34ad8f375fb9dd3ebef7c
|
||||
FirebaseCoreExtension: 6605938d51f765d8b18bfcafd2085276a252bee2
|
||||
FirebaseCoreInternal: fe5fa466aeb314787093a7dce9f0beeaad5a2a21
|
||||
FirebaseCrashlytics: fb31c6907e5b52aa252668394d3f1ab326df1511
|
||||
FirebaseInstallations: 6a14ab3d694ebd9f839c48d330da5547e9ca9dc0
|
||||
FirebaseMessaging: 7f42cfd10ec64181db4e01b305a613791c8e782c
|
||||
FirebaseRemoteConfigInterop: 869ddca16614f979e5c931ece11fbb0b8729ed41
|
||||
FirebaseSessions: d614ca154c63dbbc6c10d6c38259c2162c4e7c9b
|
||||
Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467
|
||||
flutter_app_update: 816fdb2e30e4832a7c45e3f108d391c42ef040a9
|
||||
flutter_inappwebview_ios: b89ba3482b96fb25e00c967aae065701b66e9b99
|
||||
@@ -553,9 +558,10 @@ SPEC CHECKSUMS:
|
||||
flutter_webrtc: c3e21fc0dcd9d8eb246ae4d5256fcbeb2f5ecd22
|
||||
gal: baecd024ebfd13c441269ca7404792a7152fde89
|
||||
GoogleAdsOnDeviceConversion: d68c69dd9581a0f5da02617b6f377e5be483970f
|
||||
GoogleAppMeasurement: 3bf40aff49a601af5da1c3345702fcb4991d35ee
|
||||
GoogleAppMeasurement: 72c9a682fec6290327ea5e3c4b829b247fcb2c17
|
||||
GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7
|
||||
GoogleUtilities: 00c88b9a86066ef77f0da2fab05f65d7768ed8e1
|
||||
health: 32d2fbc7f26f9a2388d1a514ce168adbfa5bda65
|
||||
image_picker_ios: e0ece4aa2a75771a7de3fa735d26d90817041326
|
||||
in_app_review: 7dd1ea365263f834b8464673f9df72c80c17c937
|
||||
irondash_engine_context: 8e58ca8e0212ee9d1c7dc6a42121849986c88486
|
||||
@@ -580,7 +586,7 @@ SPEC CHECKSUMS:
|
||||
protocol_handler_ios: 59f23ee71f3ec602d67902ca7f669a80957888d5
|
||||
quick_actions_ios: 500fcc11711d9f646739093395c4ae8eec25f779
|
||||
receive_sharing_intent: 222384f00ffe7e952bbfabaa9e3967cb87e5fe00
|
||||
record_ios: f75fa1d57f840012775c0e93a38a7f3ceea1a374
|
||||
record_ios: 412daca2350b228e698fffcd08f1f94ceb1e3844
|
||||
SDWebImage: e9c98383c7572d713c1a0d7dd2783b10599b9838
|
||||
sensors_plus: 6a11ed0c2e1d0bd0b20b4029d3bad27d96e0c65b
|
||||
share_plus: 50da8cb520a8f0f65671c6c6a99b3617ed10a58a
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 54;
|
||||
objectVersion = 77;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
@@ -222,8 +222,6 @@
|
||||
};
|
||||
7310A7D52EB10962002C0FD3 /* Solian Watch App */ = {
|
||||
isa = PBXFileSystemSynchronizedRootGroup;
|
||||
exceptions = (
|
||||
);
|
||||
path = "Solian Watch App";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
@@ -771,10 +769,14 @@
|
||||
inputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "[CP] Copy Pods Resources";
|
||||
outputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
|
||||
@@ -832,10 +834,14 @@
|
||||
inputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
|
||||
@@ -886,10 +892,14 @@
|
||||
inputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Solian Watch App/Pods-Solian Watch App-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Solian Watch App/Pods-Solian Watch App-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Solian Watch App/Pods-Solian Watch App-frameworks.sh\"\n";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<dict>
|
||||
<key>AppGroupId</key>
|
||||
<string>$(CUSTOM_GROUP_ID)</string>
|
||||
<key>BUNDLE_ID</key>
|
||||
@@ -55,16 +55,6 @@
|
||||
<false/>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>NSCalendarsUsageDescription</key>
|
||||
<string>Grant access to Calander help us to shows Solar Calander with your own events.</string>
|
||||
<key>NSCameraUsageDescription</key>
|
||||
<string>Grant access to Camera will allow Solian take photo or video for your post.</string>
|
||||
<key>NSFaceIDUsageDescription</key>
|
||||
<string>Allow the Solar Network verify your ownership of the logged in account and continue your action quickly.</string>
|
||||
<key>NSMicrophoneUsageDescription</key>
|
||||
<string>Grant access to Microphone will allow Solian record audio for your post.</string>
|
||||
<key>NSSpeechRecognitionUsageDescription</key>
|
||||
<string>Solian uses speech recognition for Siri integration</string>
|
||||
<key>NSAppIntentsConfiguration</key>
|
||||
<dict>
|
||||
<key>NSAppIntentsPackage</key>
|
||||
@@ -75,10 +65,25 @@
|
||||
<key>NSAppIntentsSupported</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>NSCalendarsUsageDescription</key>
|
||||
<string>Grant access to Calander help us to shows Solar Calander with your own events.</string>
|
||||
<key>NSCameraUsageDescription</key>
|
||||
<string>Grant access to Camera will allow Solian take photo or video for your post.</string>
|
||||
<key>NSFaceIDUsageDescription</key>
|
||||
<string>Allow the Solar Network verify your ownership of the logged in account and continue
|
||||
your action quickly.</string>
|
||||
<key>NSHealthShareUsageDescription</key>
|
||||
<string>Allow us to share your fitness data with your friends.</string>
|
||||
<key>NSHealthUpdateUsageDescription</key>
|
||||
<string>Allow us to update your fitness data with your friends.</string>
|
||||
<key>NSMicrophoneUsageDescription</key>
|
||||
<string>Grant access to Microphone will allow Solian record audio for your post.</string>
|
||||
<key>NSPhotoLibraryAddUsageDescription</key>
|
||||
<string>Grant access to Photo Library will allow Solian download photo to album for you.</string>
|
||||
<key>NSPhotoLibraryUsageDescription</key>
|
||||
<string>Grant access to Photo Library will allow Solian upload photo or video for your post.</string>
|
||||
<key>NSSpeechRecognitionUsageDescription</key>
|
||||
<string>Solian uses speech recognition for Siri integration</string>
|
||||
<key>NSUserActivityTypes</key>
|
||||
<array>
|
||||
<string>INStartCallIntent</string>
|
||||
@@ -109,8 +114,6 @@
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
</array>
|
||||
<key>WKCompanionAppBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
@@ -118,5 +121,7 @@
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
</array>
|
||||
</dict>
|
||||
<key>WKCompanionAppBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
</array>
|
||||
<key>com.apple.developer.device-information.user-assigned-device-name</key>
|
||||
<true/>
|
||||
<key>com.apple.developer.healthkit</key>
|
||||
<true/>
|
||||
<key>com.apple.developer.usernotifications.communication</key>
|
||||
<true/>
|
||||
<key>com.apple.security.application-groups</key>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/models/abuse_report.dart';
|
||||
import 'package:island/pods/network.dart';
|
||||
import 'package:island/accounts/accounts_models/abuse_report.dart';
|
||||
import 'package:island/core/network.dart';
|
||||
|
||||
final abuseReportServiceProvider = Provider<AbuseReportService>((ref) {
|
||||
return AbuseReportService(ref);
|
||||
@@ -4,11 +4,11 @@ import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/models/account.dart';
|
||||
import 'package:island/pods/network.dart';
|
||||
import 'package:island/pods/paging.dart';
|
||||
import 'package:island/services/time.dart';
|
||||
import 'package:island/widgets/paging/pagination_list.dart';
|
||||
import 'package:island/accounts/accounts_models/account.dart';
|
||||
import 'package:island/core/network.dart';
|
||||
import 'package:island/pagination/pagination.dart';
|
||||
import 'package:island/core/services/time.dart';
|
||||
import 'package:island/shared/widgets/pagination_list.dart';
|
||||
import 'package:material_symbols_icons/material_symbols_icons.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
@@ -3,17 +3,17 @@ import 'dart:async';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/models/account.dart';
|
||||
import 'package:island/pods/network.dart';
|
||||
import 'package:island/pods/paging.dart';
|
||||
import 'package:island/pods/userinfo.dart';
|
||||
import 'package:island/screens/account/credits.dart';
|
||||
import 'package:island/services/time.dart';
|
||||
import 'package:island/widgets/account/leveling_progress.dart';
|
||||
import 'package:island/widgets/account/stellar_program_tab.dart';
|
||||
import 'package:island/widgets/app_scaffold.dart';
|
||||
import 'package:island/accounts/accounts_models/account.dart';
|
||||
import 'package:island/accounts/accounts_widgets/account/leveling_progress.dart';
|
||||
import 'package:island/accounts/accounts_widgets/account/stellar_program_tab.dart';
|
||||
import 'package:island/core/network.dart';
|
||||
import 'package:island/pagination/pagination.dart';
|
||||
import 'package:island/accounts/accounts_pod.dart';
|
||||
import 'package:island/accounts/account/credits.dart';
|
||||
import 'package:island/core/services/time.dart';
|
||||
import 'package:island/shared/widgets/app_scaffold.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:island/widgets/paging/pagination_list.dart';
|
||||
import 'package:island/shared/widgets/pagination_list.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
|
||||
final levelingHistoryNotifierProvider =
|
||||
@@ -6,19 +6,19 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/models/auth.dart';
|
||||
import 'package:island/models/account.dart';
|
||||
import 'package:island/pods/network.dart';
|
||||
import 'package:island/pods/userinfo.dart';
|
||||
import 'package:island/screens/account/me/settings_auth_factors.dart';
|
||||
import 'package:island/screens/account/me/settings_connections.dart';
|
||||
import 'package:island/screens/account/me/settings_contacts.dart';
|
||||
import 'package:island/screens/auth/captcha.dart';
|
||||
import 'package:island/screens/auth/login.dart';
|
||||
import 'package:island/widgets/account/account_devices.dart';
|
||||
import 'package:island/widgets/alert.dart';
|
||||
import 'package:island/widgets/app_scaffold.dart';
|
||||
import 'package:island/widgets/response.dart';
|
||||
import 'package:island/accounts/accounts_widgets/account/account_devices.dart';
|
||||
import 'package:island/auth/auth_models/auth.dart';
|
||||
import 'package:island/accounts/accounts_models/account.dart';
|
||||
import 'package:island/core/network.dart';
|
||||
import 'package:island/accounts/accounts_pod.dart';
|
||||
import 'package:island/accounts/account/me/settings_auth_factors.dart';
|
||||
import 'package:island/accounts/account/me/settings_connections.dart';
|
||||
import 'package:island/accounts/account/me/settings_contacts.dart';
|
||||
import 'package:island/auth/captcha.dart';
|
||||
import 'package:island/auth/login.dart';
|
||||
import 'package:island/shared/widgets/alert.dart';
|
||||
import 'package:island/shared/widgets/app_scaffold.dart';
|
||||
import 'package:island/shared/widgets/response.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
@@ -7,17 +7,17 @@ import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
import 'package:island/models/file.dart';
|
||||
import 'package:island/models/account.dart';
|
||||
import 'package:island/pods/network.dart';
|
||||
import 'package:island/pods/userinfo.dart';
|
||||
import 'package:island/services/file.dart';
|
||||
import 'package:island/services/file_uploader.dart';
|
||||
import 'package:island/services/timezone.dart';
|
||||
import 'package:island/widgets/account/account_name.dart';
|
||||
import 'package:island/widgets/alert.dart';
|
||||
import 'package:island/widgets/app_scaffold.dart';
|
||||
import 'package:island/widgets/content/cloud_files.dart';
|
||||
import 'package:island/accounts/accounts_widgets/account/account_name.dart';
|
||||
import 'package:island/core/services/image.dart';
|
||||
import 'package:island/drive/drive_models/file.dart';
|
||||
import 'package:island/accounts/accounts_models/account.dart';
|
||||
import 'package:island/core/network.dart';
|
||||
import 'package:island/accounts/accounts_pod.dart';
|
||||
import 'package:island/drive/drive_service.dart';
|
||||
import 'package:island/core/services/timezone.dart';
|
||||
import 'package:island/shared/widgets/alert.dart';
|
||||
import 'package:island/shared/widgets/app_scaffold.dart';
|
||||
import 'package:island/drive/drive_widgets/cloud_files.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
|
||||
@@ -7,11 +7,11 @@ import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:flutter_otp_text_field/flutter_otp_text_field.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/models/auth.dart';
|
||||
import 'package:island/pods/network.dart';
|
||||
import 'package:island/screens/auth/login.dart';
|
||||
import 'package:island/widgets/alert.dart';
|
||||
import 'package:island/widgets/content/sheet.dart';
|
||||
import 'package:island/auth/auth_models/auth.dart';
|
||||
import 'package:island/core/network.dart';
|
||||
import 'package:island/auth/login.dart';
|
||||
import 'package:island/shared/widgets/alert.dart';
|
||||
import 'package:island/core/widgets/content/sheet.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import 'package:qr_flutter/qr_flutter.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
@@ -64,8 +64,7 @@ class AuthFactorSheet extends HookConsumerWidget {
|
||||
if ([3].contains(factor.type)) {
|
||||
final confirmed = await showDialog<bool>(
|
||||
context: context,
|
||||
builder:
|
||||
(context) => AlertDialog(
|
||||
builder: (context) => AlertDialog(
|
||||
title: Text('authFactorEnable').tr(),
|
||||
content: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
@@ -233,8 +232,7 @@ class AuthFactorNewSheet extends HookConsumerWidget {
|
||||
labelText: 'authFactor'.tr(),
|
||||
border: const OutlineInputBorder(),
|
||||
),
|
||||
items:
|
||||
kFactorTypes.entries.map((entry) {
|
||||
items: kFactorTypes.entries.map((entry) {
|
||||
return DropdownMenuItem<int>(
|
||||
value: entry.key,
|
||||
child: Row(
|
||||
@@ -261,8 +259,8 @@ class AuthFactorNewSheet extends HookConsumerWidget {
|
||||
hintText: 'authFactorSecretHint'.tr(),
|
||||
border: const OutlineInputBorder(),
|
||||
),
|
||||
onTapOutside:
|
||||
(_) => FocusManager.instance.primaryFocus?.unfocus(),
|
||||
onTapOutside: (_) =>
|
||||
FocusManager.instance.primaryFocus?.unfocus(),
|
||||
)
|
||||
else if ([4].contains(factorType.value))
|
||||
OtpTextField(
|
||||
@@ -4,15 +4,15 @@ import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/models/auth.dart';
|
||||
import 'package:island/pods/config.dart';
|
||||
import 'package:island/pods/network.dart';
|
||||
import 'package:island/screens/account/me/account_settings.dart';
|
||||
import 'package:island/utils/text.dart';
|
||||
import 'package:island/services/time.dart';
|
||||
import 'package:island/widgets/alert.dart';
|
||||
import 'package:island/widgets/content/sheet.dart';
|
||||
import 'package:island/widgets/response.dart';
|
||||
import 'package:island/auth/auth_models/auth.dart';
|
||||
import 'package:island/core/config.dart';
|
||||
import 'package:island/core/network.dart';
|
||||
import 'package:island/accounts/account/me/account_settings.dart';
|
||||
import 'package:island/core/utils/text.dart';
|
||||
import 'package:island/core/services/time.dart';
|
||||
import 'package:island/shared/widgets/alert.dart';
|
||||
import 'package:island/core/widgets/content/sheet.dart';
|
||||
import 'package:island/shared/widgets/response.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import 'package:sign_in_with_apple/sign_in_with_apple.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
@@ -233,14 +233,11 @@ class AccountConnectionNewSheet extends HookConsumerWidget {
|
||||
labelText: 'accountConnectionProvider'.tr(),
|
||||
border: const OutlineInputBorder(),
|
||||
),
|
||||
items:
|
||||
providers.map((String provider) {
|
||||
items: providers.map((String provider) {
|
||||
return DropdownMenuItem<String>(
|
||||
value: provider,
|
||||
child: Row(
|
||||
children: [
|
||||
Text(getLocalizedProviderName(provider)).tr(),
|
||||
],
|
||||
children: [Text(getLocalizedProviderName(provider)).tr()],
|
||||
),
|
||||
);
|
||||
}).toList(),
|
||||
@@ -296,14 +293,10 @@ class AccountConnectionsSheet extends HookConsumerWidget {
|
||||
),
|
||||
],
|
||||
child: connections.when(
|
||||
data:
|
||||
(data) => RefreshIndicator(
|
||||
onRefresh:
|
||||
() => Future.sync(
|
||||
() => ref.invalidate(accountConnectionsProvider),
|
||||
),
|
||||
child:
|
||||
data.isEmpty
|
||||
data: (data) => RefreshIndicator(
|
||||
onRefresh: () =>
|
||||
Future.sync(() => ref.invalidate(accountConnectionsProvider)),
|
||||
child: data.isEmpty
|
||||
? Center(
|
||||
child: Text(
|
||||
'accountConnectionsEmpty'.tr(),
|
||||
@@ -321,13 +314,8 @@ class AccountConnectionsSheet extends HookConsumerWidget {
|
||||
background: Container(
|
||||
color: Colors.red,
|
||||
alignment: Alignment.centerRight,
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 20,
|
||||
),
|
||||
child: const Icon(
|
||||
Icons.delete,
|
||||
color: Colors.white,
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20),
|
||||
child: const Icon(Icons.delete, color: Colors.white),
|
||||
),
|
||||
confirmDismiss: (direction) async {
|
||||
final confirm = await showConfirmAlert(
|
||||
@@ -355,14 +343,10 @@ class AccountConnectionsSheet extends HookConsumerWidget {
|
||||
connection.provider,
|
||||
color: Theme.of(context).colorScheme.onSurface,
|
||||
),
|
||||
title:
|
||||
Text(
|
||||
getLocalizedProviderName(
|
||||
connection.provider,
|
||||
),
|
||||
title: Text(
|
||||
getLocalizedProviderName(connection.provider),
|
||||
).tr(),
|
||||
subtitle:
|
||||
connection.meta['email'] != null
|
||||
subtitle: connection.meta['email'] != null
|
||||
? Text(connection.meta['email'])
|
||||
: Text(connection.providedIdentifier),
|
||||
trailing: Text(
|
||||
@@ -375,10 +359,8 @@ class AccountConnectionsSheet extends HookConsumerWidget {
|
||||
final result = await showModalBottomSheet<bool>(
|
||||
context: context,
|
||||
isScrollControlled: true,
|
||||
builder:
|
||||
(context) => AccountConnectionSheet(
|
||||
connection: connection,
|
||||
),
|
||||
builder: (context) =>
|
||||
AccountConnectionSheet(connection: connection),
|
||||
);
|
||||
if (result == true) {
|
||||
ref.invalidate(accountConnectionsProvider);
|
||||
@@ -389,8 +371,7 @@ class AccountConnectionsSheet extends HookConsumerWidget {
|
||||
},
|
||||
),
|
||||
),
|
||||
error:
|
||||
(err, _) => ResponseErrorWidget(
|
||||
error: (err, _) => ResponseErrorWidget(
|
||||
error: err,
|
||||
onRetry: () => ref.invalidate(accountConnectionsProvider),
|
||||
),
|
||||
@@ -3,10 +3,10 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/models/account.dart';
|
||||
import 'package:island/pods/network.dart';
|
||||
import 'package:island/widgets/alert.dart';
|
||||
import 'package:island/widgets/content/sheet.dart';
|
||||
import 'package:island/accounts/accounts_models/account.dart';
|
||||
import 'package:island/core/network.dart';
|
||||
import 'package:island/shared/widgets/alert.dart';
|
||||
import 'package:island/core/widgets/content/sheet.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
|
||||
@@ -153,8 +153,7 @@ class ContactMethodSheet extends HookConsumerWidget {
|
||||
child: Badge(
|
||||
label: Text('contactMethodPrivate'.tr()),
|
||||
textColor: Theme.of(context).colorScheme.onSurface,
|
||||
backgroundColor:
|
||||
Theme.of(
|
||||
backgroundColor: Theme.of(
|
||||
context,
|
||||
).colorScheme.surfaceContainerHighest,
|
||||
),
|
||||
@@ -319,8 +318,7 @@ class ContactMethodNewSheet extends HookConsumerWidget {
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||
child:
|
||||
Text(switch (contactType.value) {
|
||||
child: Text(switch (contactType.value) {
|
||||
0 => 'contactMethodEmailDescription',
|
||||
1 => 'contactMethodPhoneDescription',
|
||||
_ => 'contactMethodAddressDescription',
|
||||
@@ -7,33 +7,33 @@ import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/models/chat.dart';
|
||||
import 'package:island/models/developer.dart';
|
||||
import 'package:island/models/publisher.dart';
|
||||
import 'package:island/models/relationship.dart';
|
||||
import 'package:island/models/account.dart';
|
||||
import 'package:island/pods/config.dart';
|
||||
import 'package:island/pods/event_calendar.dart';
|
||||
import 'package:island/pods/network.dart';
|
||||
import 'package:island/pods/userinfo.dart';
|
||||
import 'package:island/services/color.dart';
|
||||
import 'package:island/services/responsive.dart';
|
||||
import 'package:island/utils/text.dart';
|
||||
import 'package:island/services/time.dart';
|
||||
import 'package:island/services/timezone/native.dart';
|
||||
import 'package:island/widgets/account/account_name.dart';
|
||||
import 'package:island/widgets/account/activity_presence.dart';
|
||||
import 'package:island/widgets/account/badge.dart';
|
||||
import 'package:island/widgets/account/fortune_graph.dart';
|
||||
import 'package:island/widgets/account/leveling_progress.dart';
|
||||
import 'package:island/widgets/account/status.dart';
|
||||
import 'package:island/widgets/alert.dart';
|
||||
import 'package:island/widgets/app_scaffold.dart';
|
||||
import 'package:island/widgets/content/cloud_files.dart';
|
||||
import 'package:island/widgets/content/markdown.dart';
|
||||
import 'package:island/widgets/safety/abuse_report_helper.dart';
|
||||
import 'package:island/accounts/accounts_widgets/account/account_name.dart';
|
||||
import 'package:island/accounts/accounts_widgets/account/activity_presence.dart';
|
||||
import 'package:island/accounts/accounts_widgets/account/badge.dart';
|
||||
import 'package:island/accounts/accounts_widgets/account/fortune_graph.dart';
|
||||
import 'package:island/accounts/accounts_widgets/account/leveling_progress.dart';
|
||||
import 'package:island/accounts/accounts_widgets/account/status.dart';
|
||||
import 'package:island/chat/chat_models/chat.dart';
|
||||
import 'package:island/developers/developers_models/developer.dart';
|
||||
import 'package:island/posts/posts_models/publisher.dart';
|
||||
import 'package:island/accounts/accounts_models/relationship.dart';
|
||||
import 'package:island/accounts/accounts_models/account.dart';
|
||||
import 'package:island/core/config.dart';
|
||||
import 'package:island/accounts/event_calendar.dart';
|
||||
import 'package:island/core/network.dart';
|
||||
import 'package:island/accounts/accounts_pod.dart';
|
||||
import 'package:island/core/services/color.dart';
|
||||
import 'package:island/core/services/responsive.dart';
|
||||
import 'package:island/core/utils/text.dart';
|
||||
import 'package:island/core/services/time.dart';
|
||||
import 'package:island/core/services/timezone/native.dart';
|
||||
import 'package:island/shared/widgets/alert.dart';
|
||||
import 'package:island/shared/widgets/app_scaffold.dart';
|
||||
import 'package:island/drive/drive_widgets/cloud_files.dart';
|
||||
import 'package:island/core/widgets/content/markdown.dart';
|
||||
import 'package:island/reports/reports_widgets/safety/abuse_report_helper.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import 'package:island/services/color_extraction.dart';
|
||||
import 'package:island/core/services/color_extraction.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
import 'package:share_plus/share_plus.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
@@ -6,19 +6,19 @@ import 'package:flutter/services.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/pods/paging.dart';
|
||||
import 'package:island/pods/userinfo.dart';
|
||||
import 'package:island/widgets/account/account_pfc.dart';
|
||||
import 'package:island/widgets/account/account_picker.dart';
|
||||
import 'package:island/widgets/alert.dart';
|
||||
import 'package:island/widgets/app_scaffold.dart';
|
||||
import 'package:island/widgets/content/cloud_files.dart';
|
||||
import 'package:island/widgets/paging/pagination_list.dart';
|
||||
import 'package:island/accounts/accounts_widgets/account/account_pfc.dart';
|
||||
import 'package:island/accounts/accounts_widgets/account/account_picker.dart';
|
||||
import 'package:island/pagination/pagination.dart';
|
||||
import 'package:island/accounts/accounts_pod.dart';
|
||||
import 'package:island/shared/widgets/alert.dart';
|
||||
import 'package:island/shared/widgets/app_scaffold.dart';
|
||||
import 'package:island/drive/drive_widgets/cloud_files.dart';
|
||||
import 'package:island/shared/widgets/pagination_list.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import 'package:relative_time/relative_time.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
import 'package:island/models/relationship.dart';
|
||||
import 'package:island/pods/network.dart';
|
||||
import 'package:island/accounts/accounts_models/relationship.dart';
|
||||
import 'package:island/core/network.dart';
|
||||
|
||||
part 'relationship.g.dart';
|
||||
|
||||
@@ -112,7 +112,7 @@ class RelationshipListTile extends StatelessWidget {
|
||||
|
||||
return ListTile(
|
||||
contentPadding: const EdgeInsets.only(left: 16, right: 12),
|
||||
leading: AccountPfcGestureDetector(
|
||||
leading: AccountPfcRegion(
|
||||
uname: account.name,
|
||||
child: ProfilePictureWidget(file: account.profile.picture),
|
||||
),
|
||||
@@ -1,8 +1,8 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
import 'package:island/models/activity.dart';
|
||||
import 'package:island/models/auth.dart';
|
||||
import 'package:island/models/file.dart';
|
||||
import 'package:island/models/wallet.dart';
|
||||
import 'package:island/core/models/activity.dart';
|
||||
import 'package:island/auth/auth_models/auth.dart';
|
||||
import 'package:island/drive/drive_models/file.dart';
|
||||
import 'package:island/wallet/wallet_models/wallet.dart';
|
||||
|
||||
part 'account.freezed.dart';
|
||||
part 'account.g.dart';
|
||||
@@ -1,6 +1,6 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
import 'package:island/models/account.dart';
|
||||
import 'package:island/accounts/accounts_models/account.dart';
|
||||
|
||||
part 'relationship.freezed.dart';
|
||||
part 'relationship.g.dart';
|
||||
@@ -2,14 +2,14 @@ import 'dart:convert';
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:island/widgets/alert.dart';
|
||||
import 'package:island/shared/widgets/alert.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/models/account.dart';
|
||||
import 'package:island/pods/config.dart';
|
||||
import 'package:island/pods/network.dart';
|
||||
import 'package:island/accounts/accounts_models/account.dart';
|
||||
import 'package:island/core/config.dart';
|
||||
import 'package:island/core/network.dart';
|
||||
import 'package:island/talker.dart';
|
||||
import 'package:island/services/analytics_service.dart';
|
||||
import 'package:island/core/services/analytics_service.dart';
|
||||
|
||||
class UserInfoNotifier extends AsyncNotifier<SnAccount?> {
|
||||
@override
|
||||
@@ -3,20 +3,20 @@ import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/pods/message.dart';
|
||||
import 'package:island/pods/network.dart';
|
||||
import 'package:island/pods/userinfo.dart';
|
||||
import 'package:island/pods/websocket.dart';
|
||||
import 'package:island/screens/notification.dart';
|
||||
import 'package:island/services/responsive.dart';
|
||||
import 'package:island/widgets/account/account_name.dart';
|
||||
import 'package:island/widgets/account/activity_presence.dart';
|
||||
import 'package:island/widgets/account/status.dart';
|
||||
import 'package:island/widgets/account/leveling_progress.dart';
|
||||
import 'package:island/widgets/alert.dart';
|
||||
import 'package:island/widgets/app_scaffold.dart';
|
||||
import 'package:island/widgets/content/cloud_files.dart';
|
||||
import 'package:island/widgets/debug_sheet.dart';
|
||||
import 'package:island/accounts/accounts_widgets/account/account_name.dart';
|
||||
import 'package:island/accounts/accounts_widgets/account/activity_presence.dart';
|
||||
import 'package:island/accounts/accounts_widgets/account/leveling_progress.dart';
|
||||
import 'package:island/accounts/accounts_widgets/account/status.dart';
|
||||
import 'package:island/core/websocket.dart';
|
||||
import 'package:island/core/database.dart';
|
||||
import 'package:island/core/network.dart';
|
||||
import 'package:island/accounts/accounts_pod.dart';
|
||||
import 'package:island/core/services/responsive.dart';
|
||||
import 'package:island/shared/widgets/alert.dart';
|
||||
import 'package:island/shared/widgets/app_scaffold.dart';
|
||||
import 'package:island/drive/drive_widgets/cloud_files.dart';
|
||||
import 'package:island/core/debug_sheet.dart';
|
||||
import 'package:island/notifications/notification.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
|
||||
@@ -419,6 +419,13 @@ class AccountScreen extends HookConsumerWidget {
|
||||
context.pushNamed('reportList');
|
||||
},
|
||||
},
|
||||
{
|
||||
'icon': Symbols.fitness_center,
|
||||
'title': 'fitnessActivity',
|
||||
'onTap': () {
|
||||
context.pushNamed('fitnessActivity');
|
||||
},
|
||||
},
|
||||
];
|
||||
return Column(
|
||||
children: menuItems.map((item) {
|
||||
@@ -4,19 +4,19 @@ import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/models/account.dart';
|
||||
import 'package:island/pods/network.dart';
|
||||
import 'package:island/services/responsive.dart';
|
||||
import 'package:island/services/time.dart';
|
||||
import 'package:island/services/udid.dart';
|
||||
import 'package:island/widgets/alert.dart';
|
||||
import 'package:island/widgets/content/sheet.dart';
|
||||
import 'package:island/widgets/response.dart';
|
||||
import 'package:island/widgets/sites/info_row.dart';
|
||||
import 'package:island/accounts/accounts_models/account.dart';
|
||||
import 'package:island/core/network.dart';
|
||||
import 'package:island/core/services/responsive.dart';
|
||||
import 'package:island/core/services/time.dart';
|
||||
import 'package:island/core/services/udid.dart';
|
||||
import 'package:island/shared/widgets/alert.dart';
|
||||
import 'package:island/core/widgets/content/sheet.dart';
|
||||
import 'package:island/shared/widgets/response.dart';
|
||||
import 'package:island/shared/widgets/info_row.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
import 'package:island/widgets/extended_refresh_indicator.dart';
|
||||
import 'package:island/shared/widgets/extended_refresh_indicator.dart';
|
||||
|
||||
part 'account_devices.g.dart';
|
||||
|
||||
@@ -26,8 +26,7 @@ Future<List<SnAuthDeviceWithSession>> authDevices(Ref ref) async {
|
||||
.watch(apiClientProvider)
|
||||
.get('/pass/accounts/me/devices');
|
||||
final currentId = await getUdid();
|
||||
final data =
|
||||
resp.data.map<SnAuthDeviceWithSession>((e) {
|
||||
final data = resp.data.map<SnAuthDeviceWithSession>((e) {
|
||||
final ele = SnAuthDeviceWithSession.fromJson(e);
|
||||
return ele.copyWith(isCurrent: ele.deviceId == currentId);
|
||||
}).toList();
|
||||
@@ -91,8 +90,7 @@ class _DeviceListTile extends StatelessWidget {
|
||||
6 => Icons.computer, // Linux
|
||||
_ => Icons.device_unknown, // fallback
|
||||
}).padding(top: 4),
|
||||
trailing:
|
||||
isWideScreen(context)
|
||||
trailing: isWideScreen(context)
|
||||
? Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
@@ -216,8 +214,7 @@ class AccountSessionSheet extends HookConsumerWidget {
|
||||
final controller = TextEditingController();
|
||||
final label = await showDialog<String>(
|
||||
context: context,
|
||||
builder:
|
||||
(context) => AlertDialog(
|
||||
builder: (context) => AlertDialog(
|
||||
title: Text('authDeviceLabelTitle'.tr()),
|
||||
content: TextField(
|
||||
controller: controller,
|
||||
@@ -283,12 +280,9 @@ class AccountSessionSheet extends HookConsumerWidget {
|
||||
),
|
||||
Expanded(
|
||||
child: authDevices.when(
|
||||
data:
|
||||
(data) => ExtendedRefreshIndicator(
|
||||
onRefresh:
|
||||
() => Future.sync(
|
||||
() => ref.invalidate(authDevicesProvider),
|
||||
),
|
||||
data: (data) => ExtendedRefreshIndicator(
|
||||
onRefresh: () =>
|
||||
Future.sync(() => ref.invalidate(authDevicesProvider)),
|
||||
child: ListView.builder(
|
||||
padding: EdgeInsets.zero,
|
||||
itemCount: data.length,
|
||||
@@ -304,8 +298,7 @@ class AccountSessionSheet extends HookConsumerWidget {
|
||||
} else {
|
||||
return Dismissible(
|
||||
key: Key('device-${device.id}'),
|
||||
direction:
|
||||
device.isCurrent
|
||||
direction: device.isCurrent
|
||||
? DismissDirection.startToEnd
|
||||
: DismissDirection.horizontal,
|
||||
background: Container(
|
||||
@@ -333,9 +326,7 @@ class AccountSessionSheet extends HookConsumerWidget {
|
||||
if (confirm && context.mounted) {
|
||||
try {
|
||||
showLoadingModal(context);
|
||||
final apiClient = ref.watch(
|
||||
apiClientProvider,
|
||||
);
|
||||
final apiClient = ref.watch(apiClientProvider);
|
||||
await apiClient.delete(
|
||||
'/pass/accounts/me/devices/${device.deviceId}',
|
||||
);
|
||||
@@ -362,8 +353,7 @@ class AccountSessionSheet extends HookConsumerWidget {
|
||||
},
|
||||
),
|
||||
),
|
||||
error:
|
||||
(err, _) => ResponseErrorWidget(
|
||||
error: (err, _) => ResponseErrorWidget(
|
||||
error: err,
|
||||
onRetry: () => ref.invalidate(authDevicesProvider),
|
||||
),
|
||||
@@ -2,10 +2,10 @@ import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/models/account.dart';
|
||||
import 'package:island/models/wallet.dart';
|
||||
import 'package:island/pods/network.dart';
|
||||
import 'package:island/widgets/alert.dart';
|
||||
import 'package:island/accounts/accounts_models/account.dart';
|
||||
import 'package:island/wallet/wallet_models/wallet.dart';
|
||||
import 'package:island/core/network.dart';
|
||||
import 'package:island/shared/widgets/alert.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:island/widgets/account/account_name.dart';
|
||||
import 'package:island/accounts/account/profile.dart';
|
||||
import 'package:island/accounts/accounts_widgets/account/account_name.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/screens/account/profile.dart';
|
||||
import 'package:island/widgets/content/cloud_files.dart';
|
||||
import 'package:island/drive/drive_widgets/cloud_files.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
|
||||
@@ -7,16 +7,15 @@ import 'package:go_router/go_router.dart';
|
||||
import 'package:flutter_popup_card/flutter_popup_card.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/screens/account/profile.dart';
|
||||
import 'package:island/services/time.dart';
|
||||
import 'package:island/services/timezone/native.dart';
|
||||
import 'package:island/widgets/account/account_name.dart';
|
||||
import 'package:island/widgets/account/activity_presence.dart';
|
||||
import 'package:island/widgets/account/badge.dart';
|
||||
|
||||
import 'package:island/widgets/account/status.dart';
|
||||
import 'package:island/widgets/content/cloud_files.dart';
|
||||
import 'package:island/widgets/response.dart';
|
||||
import 'package:island/accounts/account/profile.dart';
|
||||
import 'package:island/accounts/accounts_widgets/account/account_name.dart';
|
||||
import 'package:island/accounts/accounts_widgets/account/activity_presence.dart';
|
||||
import 'package:island/accounts/accounts_widgets/account/badge.dart';
|
||||
import 'package:island/accounts/accounts_widgets/account/status.dart';
|
||||
import 'package:island/core/services/time.dart';
|
||||
import 'package:island/core/services/timezone/native.dart';
|
||||
import 'package:island/drive/drive_widgets/cloud_files.dart';
|
||||
import 'package:island/shared/widgets/response.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
|
||||
@@ -225,14 +224,10 @@ class AccountProfileCard extends HookConsumerWidget {
|
||||
}
|
||||
}
|
||||
|
||||
class AccountPfcGestureDetector extends StatelessWidget {
|
||||
class AccountPfcRegion extends StatelessWidget {
|
||||
final String? uname;
|
||||
final Widget child;
|
||||
const AccountPfcGestureDetector({
|
||||
super.key,
|
||||
required this.uname,
|
||||
required this.child,
|
||||
});
|
||||
const AccountPfcRegion({super.key, required this.uname, required this.child});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -4,9 +4,9 @@ import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/models/account.dart';
|
||||
import 'package:island/pods/network.dart';
|
||||
import 'package:island/widgets/content/cloud_files.dart';
|
||||
import 'package:island/accounts/accounts_models/account.dart';
|
||||
import 'package:island/core/network.dart';
|
||||
import 'package:island/drive/drive_widgets/cloud_files.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
|
||||
part 'account_picker.g.dart';
|
||||
618
lib/accounts/accounts_widgets/account/activity_presence.dart
Normal file
618
lib/accounts/accounts_widgets/account/activity_presence.dart
Normal file
@@ -0,0 +1,618 @@
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/core/models/activity.dart';
|
||||
import 'package:island/activity/activity_rpc.dart';
|
||||
import 'package:island/core/widgets/content/image.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
import 'package:url_launcher/url_launcher_string.dart';
|
||||
|
||||
part 'activity_presence.g.dart';
|
||||
|
||||
@riverpod
|
||||
Future<Map<String, String>?> discordAssets(
|
||||
Ref ref,
|
||||
SnPresenceActivity activity,
|
||||
) async {
|
||||
final hasDiscordSmall =
|
||||
activity.smallImage != null &&
|
||||
activity.smallImage!.startsWith('discord:');
|
||||
final hasDiscordLarge =
|
||||
activity.largeImage != null &&
|
||||
activity.largeImage!.startsWith('discord:');
|
||||
|
||||
if (hasDiscordSmall || hasDiscordLarge) {
|
||||
final dio = Dio();
|
||||
final response = await dio.get(
|
||||
'https://discordapp.com/api/oauth2/applications/${activity.manualId}/assets',
|
||||
);
|
||||
final data = response.data as List<dynamic>;
|
||||
return {
|
||||
for (final item in data) item['name'] as String: item['id'] as String,
|
||||
};
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@riverpod
|
||||
Future<String?> discordAssetsUrl(
|
||||
Ref ref,
|
||||
SnPresenceActivity activity,
|
||||
String key,
|
||||
) async {
|
||||
final assets = await ref.watch(discordAssetsProvider(activity).future);
|
||||
if (assets != null && assets.containsKey(key)) {
|
||||
final assetId = assets[key]!;
|
||||
return 'https://cdn.discordapp.com/app-assets/${activity.manualId}/$assetId.png';
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
const kPresenceActivityTypes = [
|
||||
'unknown',
|
||||
'presenceTypeGaming',
|
||||
'presenceTypeMusic',
|
||||
'presenceTypeWorkout',
|
||||
];
|
||||
|
||||
const kPresenceActivityIcons = <IconData>[
|
||||
Symbols.question_mark_rounded,
|
||||
Symbols.play_arrow_rounded,
|
||||
Symbols.music_note_rounded,
|
||||
Symbols.running_with_errors,
|
||||
];
|
||||
|
||||
class ActivityPresenceWidget extends StatefulWidget {
|
||||
final String uname;
|
||||
final bool isCompact;
|
||||
final EdgeInsets compactPadding;
|
||||
|
||||
const ActivityPresenceWidget({
|
||||
super.key,
|
||||
required this.uname,
|
||||
this.isCompact = false,
|
||||
this.compactPadding = EdgeInsets.zero,
|
||||
});
|
||||
|
||||
@override
|
||||
State<ActivityPresenceWidget> createState() => _ActivityPresenceWidgetState();
|
||||
}
|
||||
|
||||
class _ActivityPresenceWidgetState extends State<ActivityPresenceWidget>
|
||||
with TickerProviderStateMixin {
|
||||
late AnimationController _progressController;
|
||||
late Animation<double> _progressAnimation;
|
||||
double _startProgress = 0.0;
|
||||
double _endProgress = 0.0;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_progressController = AnimationController(
|
||||
vsync: this,
|
||||
duration: const Duration(seconds: 1),
|
||||
);
|
||||
_progressAnimation = Tween<double>(
|
||||
begin: 0.0,
|
||||
end: 0.0,
|
||||
).animate(_progressController);
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_progressController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
List<Widget> _buildImages(WidgetRef ref, SnPresenceActivity activity) {
|
||||
final List<Widget> images = [];
|
||||
|
||||
if (activity.largeImage != null) {
|
||||
if (activity.largeImage!.startsWith('discord:')) {
|
||||
final key = activity.largeImage!.substring('discord:'.length);
|
||||
final urlAsync = ref.watch(discordAssetsUrlProvider(activity, key));
|
||||
images.add(
|
||||
urlAsync.when(
|
||||
data: (url) => url != null
|
||||
? ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: url,
|
||||
width: 64,
|
||||
height: 64,
|
||||
),
|
||||
)
|
||||
: const SizedBox.shrink(),
|
||||
loading: () => const SizedBox(
|
||||
width: 64,
|
||||
height: 64,
|
||||
child: CircularProgressIndicator(strokeWidth: 2),
|
||||
),
|
||||
error: (error, stack) => const SizedBox.shrink(),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
images.add(
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
child: UniversalImage(
|
||||
uri: activity.largeImage!,
|
||||
width: 64,
|
||||
height: 64,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (activity.smallImage != null) {
|
||||
if (activity.smallImage!.startsWith('discord:')) {
|
||||
final key = activity.smallImage!.substring('discord:'.length);
|
||||
final urlAsync = ref.watch(discordAssetsUrlProvider(activity, key));
|
||||
images.add(
|
||||
urlAsync.when(
|
||||
data: (url) => url != null
|
||||
? ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: url,
|
||||
width: 32,
|
||||
height: 32,
|
||||
),
|
||||
)
|
||||
: const SizedBox.shrink(),
|
||||
loading: () => const SizedBox(
|
||||
width: 16,
|
||||
height: 16,
|
||||
child: CircularProgressIndicator(strokeWidth: 2),
|
||||
),
|
||||
error: (error, stack) => const SizedBox.shrink(),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
images.add(
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
child: UniversalImage(
|
||||
uri: activity.smallImage!,
|
||||
width: 32,
|
||||
height: 32,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return images;
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Consumer(
|
||||
builder: (BuildContext context, WidgetRef ref, Widget? child) {
|
||||
final activitiesAsync = ref.watch(
|
||||
presenceActivitiesProvider(widget.uname),
|
||||
);
|
||||
|
||||
if (widget.isCompact) {
|
||||
return activitiesAsync.when(
|
||||
data: (activities) {
|
||||
if (activities.isEmpty) return const SizedBox.shrink();
|
||||
final activity = activities.first;
|
||||
return Padding(
|
||||
padding: widget.compactPadding,
|
||||
child: Row(
|
||||
spacing: 8,
|
||||
children: [
|
||||
if (activity.largeImage != null)
|
||||
activity.largeImage!.startsWith('discord:')
|
||||
? ref
|
||||
.watch(
|
||||
discordAssetsUrlProvider(
|
||||
activity,
|
||||
activity.largeImage!.substring(
|
||||
'discord:'.length,
|
||||
),
|
||||
),
|
||||
)
|
||||
.when(
|
||||
data: (url) => url != null
|
||||
? ClipRRect(
|
||||
borderRadius: BorderRadius.circular(
|
||||
4,
|
||||
),
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: url,
|
||||
width: 32,
|
||||
height: 32,
|
||||
),
|
||||
)
|
||||
: const SizedBox.shrink(),
|
||||
loading: () => const SizedBox(
|
||||
width: 32,
|
||||
height: 32,
|
||||
child: CircularProgressIndicator(
|
||||
strokeWidth: 1,
|
||||
),
|
||||
),
|
||||
error: (error, stack) =>
|
||||
const SizedBox.shrink(),
|
||||
)
|
||||
: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
child: UniversalImage(
|
||||
uri: activity.largeImage!,
|
||||
width: 32,
|
||||
height: 32,
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
(activity.title?.isEmpty ?? true)
|
||||
? 'unknown'.tr()
|
||||
: activity.title!,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
).fontSize(13),
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
kPresenceActivityTypes[activity.type],
|
||||
).tr().fontSize(11),
|
||||
Icon(
|
||||
kPresenceActivityIcons[activity.type],
|
||||
size: 15,
|
||||
fill: 1,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
StreamBuilder(
|
||||
stream: Stream.periodic(const Duration(seconds: 1)),
|
||||
builder: (context, snapshot) {
|
||||
final now = DateTime.now();
|
||||
|
||||
if (activity.manualId == 'spotify' &&
|
||||
activity.meta != null) {
|
||||
final meta = activity.meta as Map<String, dynamic>;
|
||||
final progressMs = meta['progress_ms'] as int? ?? 0;
|
||||
final durationMs =
|
||||
meta['track_duration_ms'] as int? ?? 1;
|
||||
final elapsed = now
|
||||
.difference(activity.createdAt)
|
||||
.inMilliseconds;
|
||||
final currentProgressMs =
|
||||
(progressMs + elapsed) % durationMs;
|
||||
final progressValue = currentProgressMs / durationMs;
|
||||
if (progressValue != _endProgress) {
|
||||
_startProgress = _endProgress;
|
||||
_endProgress = progressValue;
|
||||
_progressAnimation = Tween<double>(
|
||||
begin: _startProgress,
|
||||
end: _endProgress,
|
||||
).animate(_progressController);
|
||||
_progressController.forward(from: 0.0);
|
||||
}
|
||||
return AnimatedBuilder(
|
||||
animation: _progressAnimation,
|
||||
builder: (context, child) {
|
||||
final animatedValue = _progressAnimation.value;
|
||||
final animatedProgressMs =
|
||||
(animatedValue * durationMs).toInt();
|
||||
final currentMin = animatedProgressMs ~/ 60000;
|
||||
final currentSec =
|
||||
(animatedProgressMs % 60000) ~/ 1000;
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
spacing: 2,
|
||||
children: [
|
||||
Text(
|
||||
'${currentMin.toString().padLeft(2, '0')}:${currentSec.toString().padLeft(2, '0')}',
|
||||
style: TextStyle(
|
||||
fontSize: 10,
|
||||
color: Colors.green,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 120,
|
||||
child: LinearProgressIndicator(
|
||||
value: animatedValue,
|
||||
backgroundColor: Colors.grey.shade300,
|
||||
stopIndicatorColor: Colors.green,
|
||||
trackGap: 0,
|
||||
valueColor: AlwaysStoppedAnimation<Color>(
|
||||
Colors.green,
|
||||
),
|
||||
),
|
||||
).padding(top: 2),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
} else {
|
||||
final duration = now.difference(activity.createdAt);
|
||||
final hours = duration.inHours.toString().padLeft(
|
||||
2,
|
||||
'0',
|
||||
);
|
||||
final minutes = (duration.inMinutes % 60)
|
||||
.toString()
|
||||
.padLeft(2, '0');
|
||||
final seconds = (duration.inSeconds % 60)
|
||||
.toString()
|
||||
.padLeft(2, '0');
|
||||
return Text(
|
||||
'$hours:$minutes:$seconds',
|
||||
).textColor(Colors.green).fontSize(12);
|
||||
}
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
loading: () => const SizedBox.shrink(),
|
||||
error: (error, stack) => const SizedBox.shrink(),
|
||||
);
|
||||
}
|
||||
|
||||
return activitiesAsync.when(
|
||||
data: (activities) => Card(
|
||||
margin: EdgeInsets.zero,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
spacing: 8,
|
||||
children: [
|
||||
Text(
|
||||
'activities',
|
||||
).tr().bold().padding(horizontal: 16, vertical: 4),
|
||||
if (activities.isEmpty)
|
||||
Row(
|
||||
spacing: 4,
|
||||
children: [
|
||||
const Icon(Symbols.inbox, size: 16),
|
||||
Text('dataEmpty').tr().fontSize(13),
|
||||
],
|
||||
).opacity(0.75).padding(horizontal: 16, bottom: 8),
|
||||
...activities.map((activity) {
|
||||
final images = _buildImages(ref, activity);
|
||||
|
||||
return Stack(
|
||||
children: [
|
||||
Card(
|
||||
elevation: 0,
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(
|
||||
color: Colors.grey.shade300,
|
||||
width: 1,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
margin: EdgeInsets.zero,
|
||||
child: ListTile(
|
||||
title: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (images.isNotEmpty)
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
spacing: 8,
|
||||
children: images,
|
||||
).padding(vertical: 4),
|
||||
Row(
|
||||
spacing: 2,
|
||||
children: [
|
||||
Flexible(
|
||||
child: Text(
|
||||
(activity.title?.isEmpty ?? true)
|
||||
? 'unknown'.tr()
|
||||
: activity.title!,
|
||||
),
|
||||
),
|
||||
if (activity.titleUrl != null &&
|
||||
activity.titleUrl!.isNotEmpty)
|
||||
IconButton(
|
||||
visualDensity: const VisualDensity(
|
||||
vertical: -4,
|
||||
),
|
||||
onPressed: () {
|
||||
launchUrlString(activity.titleUrl!);
|
||||
},
|
||||
icon: const Icon(Symbols.launch_rounded),
|
||||
iconSize: 16,
|
||||
padding: EdgeInsets.all(4),
|
||||
constraints: const BoxConstraints(
|
||||
maxWidth: 28,
|
||||
maxHeight: 28,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
subtitle: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
spacing: 4,
|
||||
children: [
|
||||
Text(
|
||||
kPresenceActivityTypes[activity.type],
|
||||
).tr(),
|
||||
Icon(
|
||||
kPresenceActivityIcons[activity.type],
|
||||
size: 16,
|
||||
fill: 1,
|
||||
),
|
||||
],
|
||||
),
|
||||
if (activity.manualId == 'spotify' &&
|
||||
activity.meta != null)
|
||||
StreamBuilder(
|
||||
stream: Stream.periodic(
|
||||
const Duration(seconds: 1),
|
||||
),
|
||||
builder: (context, snapshot) {
|
||||
final now = DateTime.now();
|
||||
final meta =
|
||||
activity.meta as Map<String, dynamic>;
|
||||
final progressMs =
|
||||
meta['progress_ms'] as int? ?? 0;
|
||||
final durationMs =
|
||||
meta['track_duration_ms'] as int? ?? 1;
|
||||
final elapsed = now
|
||||
.difference(activity.createdAt)
|
||||
.inMilliseconds;
|
||||
final currentProgressMs =
|
||||
(progressMs + elapsed) % durationMs;
|
||||
final progressValue =
|
||||
currentProgressMs / durationMs;
|
||||
if (progressValue != _endProgress) {
|
||||
_startProgress = _endProgress;
|
||||
_endProgress = progressValue;
|
||||
_progressAnimation = Tween<double>(
|
||||
begin: _startProgress,
|
||||
end: _endProgress,
|
||||
).animate(_progressController);
|
||||
_progressController.forward(from: 0.0);
|
||||
}
|
||||
return AnimatedBuilder(
|
||||
animation: _progressAnimation,
|
||||
builder: (context, child) {
|
||||
final animatedValue =
|
||||
_progressAnimation.value;
|
||||
final animatedProgressMs =
|
||||
(animatedValue * durationMs)
|
||||
.toInt();
|
||||
final currentMin =
|
||||
animatedProgressMs ~/ 60000;
|
||||
final currentSec =
|
||||
(animatedProgressMs % 60000) ~/
|
||||
1000;
|
||||
final totalMin = durationMs ~/ 60000;
|
||||
final totalSec =
|
||||
(durationMs % 60000) ~/ 1000;
|
||||
return Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
spacing: 4,
|
||||
children: [
|
||||
LinearProgressIndicator(
|
||||
value: animatedValue,
|
||||
backgroundColor:
|
||||
Colors.grey.shade300,
|
||||
trackGap: 0,
|
||||
stopIndicatorColor: Colors.green,
|
||||
valueColor:
|
||||
AlwaysStoppedAnimation<Color>(
|
||||
Colors.green,
|
||||
),
|
||||
).padding(top: 3),
|
||||
Text(
|
||||
'${currentMin.toString().padLeft(2, '0')}:${currentSec.toString().padLeft(2, '0')} / ${totalMin.toString().padLeft(2, '0')}:${totalSec.toString().padLeft(2, '0')}',
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: Colors.green,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
else
|
||||
StreamBuilder(
|
||||
stream: Stream.periodic(
|
||||
const Duration(seconds: 1),
|
||||
),
|
||||
builder: (context, snapshot) {
|
||||
final now = DateTime.now();
|
||||
|
||||
final duration = now.difference(
|
||||
activity.createdAt,
|
||||
);
|
||||
final hours = duration.inHours
|
||||
.toString()
|
||||
.padLeft(2, '0');
|
||||
final minutes = (duration.inMinutes % 60)
|
||||
.toString()
|
||||
.padLeft(2, '0');
|
||||
final seconds = (duration.inSeconds % 60)
|
||||
.toString()
|
||||
.padLeft(2, '0');
|
||||
return Text(
|
||||
'$hours:$minutes:$seconds',
|
||||
).textColor(Colors.green);
|
||||
},
|
||||
),
|
||||
if (activity.subtitle?.isNotEmpty ?? false)
|
||||
Row(
|
||||
spacing: 2,
|
||||
children: [
|
||||
Flexible(child: Text(activity.subtitle!)),
|
||||
if (activity.titleUrl != null &&
|
||||
activity.titleUrl!.isNotEmpty)
|
||||
IconButton(
|
||||
visualDensity: const VisualDensity(
|
||||
vertical: -4,
|
||||
),
|
||||
onPressed: () {
|
||||
launchUrlString(activity.titleUrl!);
|
||||
},
|
||||
icon: const Icon(
|
||||
Symbols.launch_rounded,
|
||||
),
|
||||
iconSize: 16,
|
||||
padding: EdgeInsets.all(4),
|
||||
constraints: const BoxConstraints(
|
||||
maxWidth: 28,
|
||||
maxHeight: 28,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
if (activity.caption?.isNotEmpty ?? false)
|
||||
Text(activity.caption!),
|
||||
],
|
||||
),
|
||||
),
|
||||
).padding(horizontal: 8),
|
||||
if (activity.manualId == 'spotify')
|
||||
Positioned(
|
||||
top: 16,
|
||||
right: 24,
|
||||
child: Tooltip(
|
||||
message: 'Listening on Spotify',
|
||||
child: Image.asset(
|
||||
'assets/images/oidc/spotify.png',
|
||||
width: 24,
|
||||
height: 24,
|
||||
color: Theme.of(context).colorScheme.onSurface,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}),
|
||||
],
|
||||
).padding(horizontal: 8, top: 8, bottom: 16),
|
||||
),
|
||||
loading: () => const Center(child: CircularProgressIndicator()),
|
||||
error: (error, stack) =>
|
||||
Center(child: Text('Error loading activities: $error')),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:island/models/account.dart';
|
||||
import 'package:island/models/badge.dart';
|
||||
import 'package:island/accounts/accounts_models/account.dart';
|
||||
import 'package:island/accounts/accounts_models/badge.dart';
|
||||
|
||||
class BadgeList extends StatelessWidget {
|
||||
final List<SnAccountBadge> badges;
|
||||
@@ -2,11 +2,11 @@ import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/models/account.dart';
|
||||
import 'package:island/models/activity.dart';
|
||||
import 'package:island/accounts/accounts_models/account.dart';
|
||||
import 'package:island/accounts/accounts_widgets/account/event_details_widget.dart';
|
||||
import 'package:island/core/models/activity.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
import 'package:island/widgets/account/event_details_widget.dart';
|
||||
import 'package:table_calendar/table_calendar.dart';
|
||||
|
||||
/// A reusable widget for displaying an event calendar with event details
|
||||
@@ -89,12 +89,12 @@ class EventCalendarWidget extends HookConsumerWidget {
|
||||
return Center(child: Text(text));
|
||||
},
|
||||
markerBuilder: (context, day, events) {
|
||||
final checkInResult =
|
||||
events.whereType<SnCheckInResult>().firstOrNull;
|
||||
final checkInResult = events
|
||||
.whereType<SnCheckInResult>()
|
||||
.firstOrNull;
|
||||
final statuses = events.whereType<SnAccountStatus>().toList();
|
||||
|
||||
final textColor =
|
||||
isSameDay(selectedDay.value, day)
|
||||
final textColor = isSameDay(selectedDay.value, day)
|
||||
? Colors.white
|
||||
: isSameDay(DateTime.now(), day)
|
||||
? Colors.white
|
||||
@@ -152,8 +152,7 @@ class EventCalendarWidget extends HookConsumerWidget {
|
||||
duration: const Duration(milliseconds: 300),
|
||||
child: Builder(
|
||||
builder: (context) {
|
||||
final event =
|
||||
events.value
|
||||
final event = events.value
|
||||
?.where((e) => isSameDay(e.date, selectedDay.value))
|
||||
.firstOrNull;
|
||||
return EventDetailsWidget(
|
||||
@@ -2,11 +2,11 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/pods/event_calendar.dart';
|
||||
import 'package:island/screens/account/profile.dart';
|
||||
import 'package:island/widgets/account/account_nameplate.dart';
|
||||
import 'package:island/widgets/account/event_calendar.dart';
|
||||
import 'package:island/widgets/account/fortune_graph.dart';
|
||||
import 'package:island/accounts/account/profile.dart';
|
||||
import 'package:island/accounts/accounts_widgets/account/account_nameplate.dart';
|
||||
import 'package:island/accounts/accounts_widgets/account/event_calendar.dart';
|
||||
import 'package:island/accounts/accounts_widgets/account/fortune_graph.dart';
|
||||
import 'package:island/accounts/event_calendar.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
|
||||
/// A reusable content widget for event calendar that can be used in screens or sheets
|
||||
@@ -85,8 +85,7 @@ class EventCalendarContent extends HookConsumerWidget {
|
||||
} else {
|
||||
// Screen layout - with responsive design
|
||||
return SingleChildScrollView(
|
||||
child:
|
||||
MediaQuery.of(context).size.width > 480
|
||||
child: MediaQuery.of(context).size.width > 480
|
||||
? ConstrainedBox(
|
||||
constraints: BoxConstraints(maxWidth: 480),
|
||||
child: Column(
|
||||
@@ -1,9 +1,9 @@
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:island/models/activity.dart';
|
||||
import 'package:island/services/time.dart';
|
||||
import 'package:island/utils/activity_utils.dart';
|
||||
import 'package:island/core/models/activity.dart';
|
||||
import 'package:island/core/services/time.dart';
|
||||
import 'package:island/core/utils/activity_utils.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
|
||||
@@ -2,9 +2,9 @@ import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:fl_chart/fl_chart.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/models/activity.dart';
|
||||
import 'package:island/widgets/account/event_calendar_content.dart';
|
||||
import 'package:island/widgets/content/sheet.dart';
|
||||
import 'package:island/accounts/accounts_widgets/account/event_calendar_content.dart';
|
||||
import 'package:island/core/models/activity.dart';
|
||||
import 'package:island/core/widgets/content/sheet.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
|
||||
/// A widget that displays a graph of fortune levels over time
|
||||
@@ -73,8 +73,7 @@ class FortuneGraphWidget extends HookConsumerWidget {
|
||||
showModalBottomSheet(
|
||||
context: context,
|
||||
isScrollControlled: true,
|
||||
builder:
|
||||
(context) => SheetScaffold(
|
||||
builder: (context) => SheetScaffold(
|
||||
titleText: 'eventCalendar'.tr(),
|
||||
child: EventCalendarContent(
|
||||
name: eventCalandarUser!,
|
||||
@@ -95,8 +94,7 @@ class FortuneGraphWidget extends HookConsumerWidget {
|
||||
}
|
||||
|
||||
// Create spots for the line chart
|
||||
final spots =
|
||||
data
|
||||
final spots = data
|
||||
.map(
|
||||
(e) => FlSpot(
|
||||
e.date.millisecondsSinceEpoch.toDouble(),
|
||||
@@ -194,8 +192,9 @@ class FortuneGraphWidget extends HookConsumerWidget {
|
||||
TextSpan(
|
||||
text: 'checkInResultLevel$level'.tr(),
|
||||
style: TextStyle(
|
||||
color:
|
||||
Theme.of(context).colorScheme.onSurface,
|
||||
color: Theme.of(
|
||||
context,
|
||||
).colorScheme.onSurface,
|
||||
fontWeight: FontWeight.normal,
|
||||
),
|
||||
),
|
||||
@@ -204,10 +203,8 @@ class FortuneGraphWidget extends HookConsumerWidget {
|
||||
}).toList();
|
||||
},
|
||||
),
|
||||
touchCallback: (
|
||||
FlTouchEvent event,
|
||||
LineTouchResponse? response,
|
||||
) {
|
||||
touchCallback:
|
||||
(FlTouchEvent event, LineTouchResponse? response) {
|
||||
if (event is FlTapUpEvent &&
|
||||
response != null &&
|
||||
response.lineBarSpots != null &&
|
||||
@@ -234,8 +231,9 @@ class FortuneGraphWidget extends HookConsumerWidget {
|
||||
radius: 4,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
strokeWidth: 2,
|
||||
strokeColor:
|
||||
Theme.of(context).colorScheme.surface,
|
||||
strokeColor: Theme.of(
|
||||
context,
|
||||
).colorScheme.surface,
|
||||
);
|
||||
},
|
||||
),
|
||||
@@ -4,10 +4,10 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:island/models/account.dart';
|
||||
import 'package:island/pods/network.dart';
|
||||
import 'package:island/pods/config.dart';
|
||||
import 'package:island/widgets/account/account_pfc.dart';
|
||||
import 'package:island/accounts/accounts_models/account.dart';
|
||||
import 'package:island/accounts/accounts_widgets/account/account_pfc.dart';
|
||||
import 'package:island/core/network.dart';
|
||||
import 'package:island/core/config.dart';
|
||||
import 'package:material_symbols_icons/material_symbols_icons.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
@@ -101,7 +101,7 @@ class FriendsOverviewWidget extends HookConsumerWidget {
|
||||
itemCount: onlineFriends.length,
|
||||
itemBuilder: (context, index) {
|
||||
final friend = onlineFriends[index];
|
||||
return AccountPfcGestureDetector(
|
||||
return AccountPfcRegion(
|
||||
uname: friend.account.name,
|
||||
child: _FriendTile(friend: friend),
|
||||
);
|
||||
@@ -2,10 +2,10 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/pods/network.dart';
|
||||
import 'package:island/screens/account/me/settings_connections.dart';
|
||||
import 'package:island/widgets/alert.dart';
|
||||
import 'package:island/widgets/content/sheet.dart';
|
||||
import 'package:island/core/network.dart';
|
||||
import 'package:island/accounts/account/me/settings_connections.dart';
|
||||
import 'package:island/shared/widgets/alert.dart';
|
||||
import 'package:island/core/widgets/content/sheet.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
|
||||
@@ -31,7 +31,7 @@ class RestorePurchaseSheet extends HookConsumerWidget {
|
||||
try {
|
||||
final client = ref.read(apiClientProvider);
|
||||
await client.post(
|
||||
'/pass/subscriptions/order/restore/${selectedProvider.value!}',
|
||||
'/wallet/subscriptions/order/restore/${selectedProvider.value!}',
|
||||
data: {'order_id': orderIdController.text.trim()},
|
||||
);
|
||||
|
||||
@@ -79,8 +79,7 @@ class RestorePurchaseSheet extends HookConsumerWidget {
|
||||
hint: Text('selectProvider'.tr()),
|
||||
isExpanded: true,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||
items:
|
||||
providers.map((provider) {
|
||||
items: providers.map((provider) {
|
||||
return DropdownMenuItem<String>(
|
||||
value: provider,
|
||||
child: Row(
|
||||
@@ -122,8 +121,7 @@ class RestorePurchaseSheet extends HookConsumerWidget {
|
||||
// Restore Button
|
||||
FilledButton(
|
||||
onPressed: isLoading.value ? null : restorePurchase,
|
||||
child:
|
||||
isLoading.value
|
||||
child: isLoading.value
|
||||
? const SizedBox(
|
||||
height: 20,
|
||||
width: 20,
|
||||
@@ -2,13 +2,13 @@ import 'package:dio/dio.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/models/account.dart';
|
||||
import 'package:island/pods/network.dart';
|
||||
import 'package:island/pods/userinfo.dart';
|
||||
import 'package:island/screens/account/profile.dart';
|
||||
import 'package:island/services/time.dart';
|
||||
import 'package:island/utils/activity_utils.dart';
|
||||
import 'package:island/widgets/account/status_creation.dart';
|
||||
import 'package:island/accounts/account/profile.dart';
|
||||
import 'package:island/accounts/accounts_models/account.dart';
|
||||
import 'package:island/accounts/accounts_widgets/account/status_creation.dart';
|
||||
import 'package:island/core/network.dart';
|
||||
import 'package:island/accounts/accounts_pod.dart';
|
||||
import 'package:island/core/services/time.dart';
|
||||
import 'package:island/core/utils/activity_utils.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
@@ -78,9 +78,7 @@ class AccountStatusCreationWidget extends HookConsumerWidget {
|
||||
return InkWell(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
child: userStatus.when(
|
||||
data:
|
||||
(status) =>
|
||||
(status?.isCustomized ?? false)
|
||||
data: (status) => (status?.isCustomized ?? false)
|
||||
? Padding(
|
||||
padding: const EdgeInsets.only(left: 4),
|
||||
child: AccountStatusWidget(
|
||||
@@ -108,8 +106,7 @@ class AccountStatusCreationWidget extends HookConsumerWidget {
|
||||
],
|
||||
),
|
||||
).opacity(0.85),
|
||||
error:
|
||||
(error, _) => Padding(
|
||||
error: (error, _) => Padding(
|
||||
padding:
|
||||
padding ?? EdgeInsets.symmetric(horizontal: 26, vertical: 12),
|
||||
child: Row(
|
||||
@@ -117,8 +114,7 @@ class AccountStatusCreationWidget extends HookConsumerWidget {
|
||||
children: [Icon(Symbols.close), Text('Error: $error')],
|
||||
),
|
||||
).opacity(0.85),
|
||||
loading:
|
||||
() => Padding(
|
||||
loading: () => Padding(
|
||||
padding:
|
||||
padding ?? EdgeInsets.symmetric(horizontal: 26, vertical: 12),
|
||||
child: Row(
|
||||
@@ -132,10 +128,8 @@ class AccountStatusCreationWidget extends HookConsumerWidget {
|
||||
context: context,
|
||||
isScrollControlled: true,
|
||||
useRootNavigator: true,
|
||||
builder:
|
||||
(context) => AccountStatusCreationSheet(
|
||||
initialStatus:
|
||||
(userStatus.value?.isCustomized ?? false)
|
||||
builder: (context) => AccountStatusCreationSheet(
|
||||
initialStatus: (userStatus.value?.isCustomized ?? false)
|
||||
? userStatus.value
|
||||
: null,
|
||||
),
|
||||
@@ -187,8 +181,7 @@ class AccountStatusWidget extends HookConsumerWidget {
|
||||
onLongPress: () {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder:
|
||||
(context) => AlertDialog(
|
||||
builder: (context) => AlertDialog(
|
||||
title: Text('Activity Details'),
|
||||
content: buildActivityDetails(status.value),
|
||||
actions: [
|
||||
@@ -213,8 +206,7 @@ class AccountStatusWidget extends HookConsumerWidget {
|
||||
)
|
||||
else
|
||||
Flexible(
|
||||
child:
|
||||
Text(
|
||||
child: Text(
|
||||
(status.value?.label ?? 'offline').toLowerCase(),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
@@ -4,12 +4,12 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/models/account.dart';
|
||||
import 'package:island/pods/network.dart';
|
||||
import 'package:island/pods/userinfo.dart';
|
||||
import 'package:island/widgets/account/status.dart';
|
||||
import 'package:island/widgets/alert.dart';
|
||||
import 'package:island/widgets/content/sheet.dart';
|
||||
import 'package:island/accounts/accounts_models/account.dart';
|
||||
import 'package:island/accounts/accounts_widgets/account/status.dart';
|
||||
import 'package:island/core/network.dart';
|
||||
import 'package:island/accounts/accounts_pod.dart';
|
||||
import 'package:island/shared/widgets/alert.dart';
|
||||
import 'package:island/core/widgets/content/sheet.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
|
||||
class AccountStatusCreationSheet extends HookConsumerWidget {
|
||||
@@ -74,12 +74,12 @@ class AccountStatusCreationSheet extends HookConsumerWidget {
|
||||
|
||||
return SheetScaffold(
|
||||
heightFactor: 0.6,
|
||||
titleText:
|
||||
initialStatus == null ? 'statusCreate'.tr() : 'statusUpdate'.tr(),
|
||||
titleText: initialStatus == null
|
||||
? 'statusCreate'.tr()
|
||||
: 'statusUpdate'.tr(),
|
||||
actions: [
|
||||
TextButton.icon(
|
||||
onPressed:
|
||||
submitting.value
|
||||
onPressed: submitting.value
|
||||
? null
|
||||
: () {
|
||||
submitStatus();
|
||||
@@ -116,8 +116,8 @@ class AccountStatusCreationSheet extends HookConsumerWidget {
|
||||
borderRadius: BorderRadius.all(Radius.circular(12)),
|
||||
),
|
||||
),
|
||||
onTapOutside:
|
||||
(_) => FocusManager.instance.primaryFocus?.unfocus(),
|
||||
onTapOutside: (_) =>
|
||||
FocusManager.instance.primaryFocus?.unfocus(),
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
Text(
|
||||
@@ -7,18 +7,18 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/models/account.dart';
|
||||
import 'package:island/models/wallet.dart';
|
||||
import 'package:island/pods/network.dart';
|
||||
import 'package:island/pods/userinfo.dart';
|
||||
import 'package:island/services/time.dart';
|
||||
import 'package:island/widgets/account/account_pfc.dart';
|
||||
import 'package:island/widgets/account/account_picker.dart';
|
||||
import 'package:island/widgets/account/restore_purchase_sheet.dart';
|
||||
import 'package:island/widgets/alert.dart';
|
||||
import 'package:island/widgets/content/cloud_files.dart';
|
||||
import 'package:island/widgets/content/sheet.dart';
|
||||
import 'package:island/widgets/payment/payment_overlay.dart';
|
||||
import 'package:island/accounts/accounts_models/account.dart';
|
||||
import 'package:island/accounts/accounts_widgets/account/account_pfc.dart';
|
||||
import 'package:island/accounts/accounts_widgets/account/account_picker.dart';
|
||||
import 'package:island/accounts/accounts_widgets/account/restore_purchase_sheet.dart';
|
||||
import 'package:island/wallet/wallet_models/wallet.dart';
|
||||
import 'package:island/core/network.dart';
|
||||
import 'package:island/accounts/accounts_pod.dart';
|
||||
import 'package:island/core/services/time.dart';
|
||||
import 'package:island/shared/widgets/alert.dart';
|
||||
import 'package:island/drive/drive_widgets/cloud_files.dart';
|
||||
import 'package:island/core/widgets/content/sheet.dart';
|
||||
import 'package:island/core/widgets/payment/payment_overlay.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
@@ -30,7 +30,7 @@ part 'stellar_program_tab.g.dart';
|
||||
Future<SnWalletSubscription?> accountStellarSubscription(Ref ref) async {
|
||||
try {
|
||||
final client = ref.watch(apiClientProvider);
|
||||
final resp = await client.get('/pass/subscriptions/fuzzy/solian.stellar');
|
||||
final resp = await client.get('/wallet/subscriptions/fuzzy/solian.stellar');
|
||||
return SnWalletSubscription.fromJson(resp.data);
|
||||
} catch (err) {
|
||||
if (err is DioException && err.response?.statusCode == 404) return null;
|
||||
@@ -46,7 +46,7 @@ Future<List<SnWalletGift>> accountSentGifts(
|
||||
}) async {
|
||||
final client = ref.watch(apiClientProvider);
|
||||
final resp = await client.get(
|
||||
'/pass/subscriptions/gifts/sent?offset=$offset&take=$take',
|
||||
'/wallet/subscriptions/gifts/sent?offset=$offset&take=$take',
|
||||
);
|
||||
return (resp.data as List).map((e) => SnWalletGift.fromJson(e)).toList();
|
||||
}
|
||||
@@ -59,7 +59,7 @@ Future<List<SnWalletGift>> accountReceivedGifts(
|
||||
}) async {
|
||||
final client = ref.watch(apiClientProvider);
|
||||
final resp = await client.get(
|
||||
'/pass/subscriptions/gifts/received?offset=$offset&take=$take',
|
||||
'/wallet/subscriptions/gifts/received?offset=$offset&take=$take',
|
||||
);
|
||||
return (resp.data as List).map((e) => SnWalletGift.fromJson(e)).toList();
|
||||
}
|
||||
@@ -67,7 +67,7 @@ Future<List<SnWalletGift>> accountReceivedGifts(
|
||||
@riverpod
|
||||
Future<SnWalletGift> accountGift(Ref ref, String giftId) async {
|
||||
final client = ref.watch(apiClientProvider);
|
||||
final resp = await client.get('/pass/subscriptions/gifts/$giftId');
|
||||
final resp = await client.get('/wallet/subscriptions/gifts/$giftId');
|
||||
return SnWalletGift.fromJson(resp.data);
|
||||
}
|
||||
|
||||
@@ -120,8 +120,7 @@ class _PurchaseGiftSheetState extends State<PurchaseGiftSheet> {
|
||||
).colorScheme.outline.withOpacity(0.2),
|
||||
),
|
||||
),
|
||||
child:
|
||||
selectedRecipient != null
|
||||
child: selectedRecipient != null
|
||||
? ListTile(
|
||||
contentPadding: const EdgeInsets.only(
|
||||
left: 20,
|
||||
@@ -139,20 +138,16 @@ class _PurchaseGiftSheetState extends State<PurchaseGiftSheet> {
|
||||
),
|
||||
subtitle: Text(
|
||||
'selectedRecipient'.tr(),
|
||||
style: Theme.of(
|
||||
context,
|
||||
).textTheme.bodySmall?.copyWith(
|
||||
color:
|
||||
Theme.of(
|
||||
style: Theme.of(context).textTheme.bodySmall
|
||||
?.copyWith(
|
||||
color: Theme.of(
|
||||
context,
|
||||
).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
),
|
||||
trailing: IconButton(
|
||||
onPressed:
|
||||
() => setState(
|
||||
() => selectedRecipient = null,
|
||||
),
|
||||
onPressed: () =>
|
||||
setState(() => selectedRecipient = null),
|
||||
icon: Icon(
|
||||
Icons.clear,
|
||||
color: Theme.of(context).colorScheme.error,
|
||||
@@ -166,19 +161,16 @@ class _PurchaseGiftSheetState extends State<PurchaseGiftSheet> {
|
||||
Icon(
|
||||
Icons.person_add_outlined,
|
||||
size: 48,
|
||||
color:
|
||||
Theme.of(
|
||||
color: Theme.of(
|
||||
context,
|
||||
).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
const Gap(8),
|
||||
Text(
|
||||
'noRecipientSelected'.tr(),
|
||||
style: Theme.of(
|
||||
context,
|
||||
).textTheme.bodyMedium?.copyWith(
|
||||
color:
|
||||
Theme.of(
|
||||
style: Theme.of(context).textTheme.bodyMedium
|
||||
?.copyWith(
|
||||
color: Theme.of(
|
||||
context,
|
||||
).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
@@ -186,11 +178,9 @@ class _PurchaseGiftSheetState extends State<PurchaseGiftSheet> {
|
||||
const Gap(4),
|
||||
Text(
|
||||
'thisWillBeAnOpenGift'.tr(),
|
||||
style: Theme.of(
|
||||
context,
|
||||
).textTheme.bodySmall?.copyWith(
|
||||
color:
|
||||
Theme.of(
|
||||
style: Theme.of(context).textTheme.bodySmall
|
||||
?.copyWith(
|
||||
color: Theme.of(
|
||||
context,
|
||||
).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
@@ -259,8 +249,8 @@ class _PurchaseGiftSheetState extends State<PurchaseGiftSheet> {
|
||||
),
|
||||
),
|
||||
maxLines: 3,
|
||||
onTapOutside:
|
||||
(_) => FocusManager.instance.primaryFocus?.unfocus(),
|
||||
onTapOutside: (_) =>
|
||||
FocusManager.instance.primaryFocus?.unfocus(),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -274,11 +264,10 @@ class _PurchaseGiftSheetState extends State<PurchaseGiftSheet> {
|
||||
children: [
|
||||
Expanded(
|
||||
child: OutlinedButton(
|
||||
onPressed:
|
||||
() => Navigator.of(context).pop(<String, dynamic>{
|
||||
onPressed: () =>
|
||||
Navigator.of(context).pop(<String, dynamic>{
|
||||
'recipient': null,
|
||||
'message':
|
||||
messageController.text.trim().isEmpty
|
||||
'message': messageController.text.trim().isEmpty
|
||||
? null
|
||||
: messageController.text.trim(),
|
||||
}),
|
||||
@@ -288,11 +277,10 @@ class _PurchaseGiftSheetState extends State<PurchaseGiftSheet> {
|
||||
const Gap(8),
|
||||
Expanded(
|
||||
child: FilledButton(
|
||||
onPressed:
|
||||
() => Navigator.of(context).pop(<String, dynamic>{
|
||||
onPressed: () =>
|
||||
Navigator.of(context).pop(<String, dynamic>{
|
||||
'recipient': selectedRecipient,
|
||||
'message':
|
||||
messageController.text.trim().isEmpty
|
||||
'message': messageController.text.trim().isEmpty
|
||||
? null
|
||||
: messageController.text.trim(),
|
||||
}),
|
||||
@@ -336,8 +324,7 @@ class StellarProgramTab extends HookConsumerWidget {
|
||||
) {
|
||||
return stellarSubscriptionAsync.when(
|
||||
data: (membership) => _buildMembershipContent(context, ref, membership),
|
||||
loading:
|
||||
() => Container(
|
||||
loading: () => Container(
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
@@ -353,8 +340,7 @@ class StellarProgramTab extends HookConsumerWidget {
|
||||
),
|
||||
child: const Center(child: CircularProgressIndicator()),
|
||||
),
|
||||
error:
|
||||
(error, stack) => Container(
|
||||
error: (error, stack) => Container(
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
@@ -393,7 +379,7 @@ class StellarProgramTab extends HookConsumerWidget {
|
||||
showLoadingModal(context);
|
||||
final client = ref.watch(apiClientProvider);
|
||||
await client.post(
|
||||
'/pass/subscriptions/${membership.identifier}/cancel',
|
||||
'/wallet/subscriptions/${membership.identifier}/cancel',
|
||||
);
|
||||
ref.invalidate(accountStellarSubscriptionProvider);
|
||||
ref.read(userInfoProvider.notifier).fetchUser();
|
||||
@@ -544,8 +530,7 @@ class StellarProgramTab extends HookConsumerWidget {
|
||||
];
|
||||
|
||||
return Column(
|
||||
children:
|
||||
tiers.map((tier) {
|
||||
children: tiers.map((tier) {
|
||||
final isCurrentTier = currentMembership?.identifier == tier['id'];
|
||||
final tierColor = tier['color'] as Color;
|
||||
|
||||
@@ -554,26 +539,20 @@ class StellarProgramTab extends HookConsumerWidget {
|
||||
child: Material(
|
||||
color: Colors.transparent,
|
||||
child: InkWell(
|
||||
onTap:
|
||||
isCurrentTier
|
||||
onTap: isCurrentTier
|
||||
? null
|
||||
: () => _purchaseMembership(
|
||||
context,
|
||||
ref,
|
||||
tier['id'] as String,
|
||||
),
|
||||
: () =>
|
||||
_purchaseMembership(context, ref, tier['id'] as String),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color:
|
||||
isCurrentTier
|
||||
color: isCurrentTier
|
||||
? tierColor.withOpacity(0.1)
|
||||
: Theme.of(context).colorScheme.surface,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
border: Border.all(
|
||||
color:
|
||||
isCurrentTier
|
||||
color: isCurrentTier
|
||||
? tierColor
|
||||
: Theme.of(
|
||||
context,
|
||||
@@ -630,11 +609,9 @@ class StellarProgramTab extends HookConsumerWidget {
|
||||
),
|
||||
Text(
|
||||
tier['price'] as String,
|
||||
style: Theme.of(
|
||||
context,
|
||||
).textTheme.bodyMedium?.copyWith(
|
||||
color:
|
||||
Theme.of(
|
||||
style: Theme.of(context).textTheme.bodyMedium
|
||||
?.copyWith(
|
||||
color: Theme.of(
|
||||
context,
|
||||
).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
@@ -646,8 +623,7 @@ class StellarProgramTab extends HookConsumerWidget {
|
||||
Icon(
|
||||
Icons.arrow_forward_ios,
|
||||
size: 16,
|
||||
color:
|
||||
Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -704,7 +680,7 @@ class StellarProgramTab extends HookConsumerWidget {
|
||||
try {
|
||||
showLoadingModal(context);
|
||||
final resp = await client.post(
|
||||
'/pass/subscriptions',
|
||||
'/wallet/subscriptions',
|
||||
data: {
|
||||
'identifier': tierId,
|
||||
'payment_method': 'solian.wallet',
|
||||
@@ -716,7 +692,7 @@ class StellarProgramTab extends HookConsumerWidget {
|
||||
final subscription = SnWalletSubscription.fromJson(resp.data);
|
||||
if (subscription.status == 1) return;
|
||||
final orderResp = await client.post(
|
||||
'/pass/subscriptions/${subscription.identifier}/order',
|
||||
'/wallet/subscriptions/${subscription.identifier}/order',
|
||||
);
|
||||
final order = SnWalletOrder.fromJson(orderResp.data);
|
||||
|
||||
@@ -825,8 +801,7 @@ class StellarProgramTab extends HookConsumerWidget {
|
||||
];
|
||||
|
||||
return Column(
|
||||
children:
|
||||
tiers.map((tier) {
|
||||
children: tiers.map((tier) {
|
||||
final tierColor = tier['color'] as Color;
|
||||
|
||||
return Container(
|
||||
@@ -834,12 +809,8 @@ class StellarProgramTab extends HookConsumerWidget {
|
||||
child: Material(
|
||||
color: Colors.transparent,
|
||||
child: InkWell(
|
||||
onTap:
|
||||
() => _showPurchaseGiftDialog(
|
||||
context,
|
||||
ref,
|
||||
tier['id'] as String,
|
||||
),
|
||||
onTap: () =>
|
||||
_showPurchaseGiftDialog(context, ref, tier['id'] as String),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(12),
|
||||
@@ -877,11 +848,9 @@ class StellarProgramTab extends HookConsumerWidget {
|
||||
),
|
||||
Text(
|
||||
tier['price'] as String,
|
||||
style: Theme.of(
|
||||
context,
|
||||
).textTheme.bodyMedium?.copyWith(
|
||||
color:
|
||||
Theme.of(
|
||||
style: Theme.of(context).textTheme.bodyMedium
|
||||
?.copyWith(
|
||||
color: Theme.of(
|
||||
context,
|
||||
).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
@@ -944,8 +913,8 @@ class StellarProgramTab extends HookConsumerWidget {
|
||||
),
|
||||
suffixIcon: IconButton(
|
||||
icon: Icon(Icons.redeem),
|
||||
onPressed:
|
||||
() => _redeemGift(context, ref, codeController.text.trim()),
|
||||
onPressed: () =>
|
||||
_redeemGift(context, ref, codeController.text.trim()),
|
||||
),
|
||||
),
|
||||
onTapOutside: (_) => FocusManager.instance.primaryFocus?.unfocus(),
|
||||
@@ -966,16 +935,16 @@ class StellarProgramTab extends HookConsumerWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: OutlinedButton(
|
||||
onPressed:
|
||||
() => _showGiftHistorySheet(context, ref, sentGifts, true),
|
||||
onPressed: () =>
|
||||
_showGiftHistorySheet(context, ref, sentGifts, true),
|
||||
child: Text('sentGifts'.tr()),
|
||||
),
|
||||
),
|
||||
const Gap(8),
|
||||
Expanded(
|
||||
child: OutlinedButton(
|
||||
onPressed:
|
||||
() => _showGiftHistorySheet(context, ref, receivedGifts, false),
|
||||
onPressed: () =>
|
||||
_showGiftHistorySheet(context, ref, receivedGifts, false),
|
||||
child: Text('receivedGifts'.tr()),
|
||||
),
|
||||
),
|
||||
@@ -993,31 +962,21 @@ class StellarProgramTab extends HookConsumerWidget {
|
||||
isScrollControlled: true,
|
||||
useRootNavigator: true,
|
||||
context: context,
|
||||
builder:
|
||||
(context) => SheetScaffold(
|
||||
builder: (context) => SheetScaffold(
|
||||
titleText: isSent ? 'sentGifts'.tr() : 'receivedGifts'.tr(),
|
||||
child: giftsAsync.when(
|
||||
data:
|
||||
(gifts) =>
|
||||
gifts.isEmpty
|
||||
data: (gifts) => gifts.isEmpty
|
||||
? Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Text(
|
||||
isSent
|
||||
? 'noSentGifts'.tr()
|
||||
: 'noReceivedGifts'.tr(),
|
||||
isSent ? 'noSentGifts'.tr() : 'noReceivedGifts'.tr(),
|
||||
),
|
||||
)
|
||||
: ListView.builder(
|
||||
padding: const EdgeInsets.only(top: 16),
|
||||
itemCount: gifts.length,
|
||||
itemBuilder:
|
||||
(context, index) => _buildGiftItem(
|
||||
context,
|
||||
ref,
|
||||
gifts[index],
|
||||
isSent,
|
||||
),
|
||||
itemBuilder: (context, index) =>
|
||||
_buildGiftItem(context, ref, gifts[index], isSent),
|
||||
),
|
||||
loading: () => const Center(child: CircularProgressIndicator()),
|
||||
error: (error, stack) => Center(child: Text('Error: $error')),
|
||||
@@ -1088,7 +1047,7 @@ class StellarProgramTab extends HookConsumerWidget {
|
||||
),
|
||||
),
|
||||
if (gift.status == 2 && gift.redeemer != null)
|
||||
AccountPfcGestureDetector(
|
||||
AccountPfcRegion(
|
||||
uname: gift.redeemer!.name,
|
||||
child: ProfilePictureWidget(
|
||||
file: gift.redeemer!.profile.picture,
|
||||
@@ -1229,13 +1188,13 @@ class StellarProgramTab extends HookConsumerWidget {
|
||||
try {
|
||||
showLoadingModal(context);
|
||||
final resp = await client.post(
|
||||
'/pass/subscriptions/gifts/purchase',
|
||||
'/wallet/subscriptions/gifts/purchase',
|
||||
data: {
|
||||
'subscription_identifier': subscriptionId,
|
||||
if (recipientId != null) 'recipient_id': recipientId,
|
||||
'recipient_id': ?recipientId,
|
||||
'payment_method': 'solian.wallet',
|
||||
'payment_details': {'currency': 'golds'},
|
||||
if (message != null) 'message': message,
|
||||
'message': ?message,
|
||||
'gift_duration_days': 30,
|
||||
'subscription_duration_days': 30,
|
||||
},
|
||||
@@ -1245,7 +1204,7 @@ class StellarProgramTab extends HookConsumerWidget {
|
||||
if (gift.status == 1) return; // Already paid
|
||||
|
||||
final orderResp = await client.post(
|
||||
'/pass/subscriptions/gifts/${gift.id}/order',
|
||||
'/wallet/subscriptions/gifts/${gift.id}/order',
|
||||
);
|
||||
final order = SnWalletOrder.fromJson(orderResp.data);
|
||||
|
||||
@@ -1267,7 +1226,7 @@ class StellarProgramTab extends HookConsumerWidget {
|
||||
|
||||
// Get the updated gift
|
||||
final giftResp = await client.get(
|
||||
'/pass/subscriptions/gifts/${gift.id}',
|
||||
'/wallet/subscriptions/gifts/${gift.id}',
|
||||
);
|
||||
final updatedGift = SnWalletGift.fromJson(giftResp.data);
|
||||
|
||||
@@ -1277,8 +1236,7 @@ class StellarProgramTab extends HookConsumerWidget {
|
||||
if (context.mounted) {
|
||||
await showModalBottomSheet(
|
||||
context: context,
|
||||
builder:
|
||||
(context) => SheetScaffold(
|
||||
builder: (context) => SheetScaffold(
|
||||
titleText: 'giftPurchased'.tr(),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
@@ -1315,9 +1273,7 @@ class StellarProgramTab extends HookConsumerWidget {
|
||||
ClipboardData(text: updatedGift.giftCode),
|
||||
);
|
||||
if (context.mounted) {
|
||||
showSnackBar(
|
||||
'giftCodeCopiedToClipboard'.tr(),
|
||||
);
|
||||
showSnackBar('giftCodeCopiedToClipboard'.tr());
|
||||
}
|
||||
},
|
||||
icon: const Icon(Icons.copy),
|
||||
@@ -1335,13 +1291,8 @@ class StellarProgramTab extends HookConsumerWidget {
|
||||
const Gap(8),
|
||||
Text(
|
||||
'openGiftAnyoneCanRedeem'.tr(),
|
||||
style: Theme.of(
|
||||
context,
|
||||
).textTheme.bodySmall?.copyWith(
|
||||
color:
|
||||
Theme.of(
|
||||
context,
|
||||
).colorScheme.onSurfaceVariant,
|
||||
style: Theme.of(context).textTheme.bodySmall?.copyWith(
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -1377,7 +1328,7 @@ class StellarProgramTab extends HookConsumerWidget {
|
||||
|
||||
// First check if gift can be redeemed
|
||||
final checkResp = await client.get(
|
||||
'/pass/subscriptions/gifts/check/$giftCode',
|
||||
'/wallet/subscriptions/gifts/check/$giftCode',
|
||||
);
|
||||
final checkData = checkResp.data as Map<String, dynamic>;
|
||||
|
||||
@@ -1389,7 +1340,7 @@ class StellarProgramTab extends HookConsumerWidget {
|
||||
|
||||
// Redeem the gift
|
||||
await client.post(
|
||||
'/pass/subscriptions/gifts/redeem',
|
||||
'/wallet/subscriptions/gifts/redeem',
|
||||
data: {'gift_code': giftCode},
|
||||
);
|
||||
|
||||
@@ -1397,8 +1348,7 @@ class StellarProgramTab extends HookConsumerWidget {
|
||||
hideLoadingModal(context);
|
||||
await showDialog(
|
||||
context: context,
|
||||
builder:
|
||||
(context) => AlertDialog(
|
||||
builder: (context) => AlertDialog(
|
||||
title: Text('giftRedeemed'.tr()),
|
||||
content: Text('giftRedeemedSuccessfully'.tr()),
|
||||
actions: [
|
||||
@@ -1434,7 +1384,7 @@ class StellarProgramTab extends HookConsumerWidget {
|
||||
final client = ref.watch(apiClientProvider);
|
||||
try {
|
||||
showLoadingModal(context);
|
||||
await client.post('/pass/subscriptions/gifts/${gift.id}/cancel');
|
||||
await client.post('/wallet/subscriptions/gifts/${gift.id}/cancel');
|
||||
ref.invalidate(accountSentGiftsProvider);
|
||||
if (context.mounted) {
|
||||
hideLoadingModal(context);
|
||||
@@ -50,7 +50,7 @@ final class AccountStellarSubscriptionProvider
|
||||
}
|
||||
|
||||
String _$accountStellarSubscriptionHash() =>
|
||||
r'7cdfc7ca29aac240fc8704f4493498d87f307400';
|
||||
r'fd0aa9b7110e5d0ba68d8a57bd0e4dc191586e3b';
|
||||
|
||||
@ProviderFor(accountSentGifts)
|
||||
final accountSentGiftsProvider = AccountSentGiftsFamily._();
|
||||
@@ -109,7 +109,7 @@ final class AccountSentGiftsProvider
|
||||
}
|
||||
}
|
||||
|
||||
String _$accountSentGiftsHash() => r'460af8d22e16dc402848cb94e9b8a8a26d023c41';
|
||||
String _$accountSentGiftsHash() => r'9fa99729b9efa1a74695645ee1418677b5e63027';
|
||||
|
||||
final class AccountSentGiftsFamily extends $Family
|
||||
with
|
||||
@@ -198,7 +198,7 @@ final class AccountReceivedGiftsProvider
|
||||
}
|
||||
|
||||
String _$accountReceivedGiftsHash() =>
|
||||
r'1208c27cca49e154af073071a197b37a2703f56d';
|
||||
r'b9e9ad5e8de8916f881ceeca7f2032f344c5c58b';
|
||||
|
||||
final class AccountReceivedGiftsFamily extends $Family
|
||||
with
|
||||
@@ -280,7 +280,7 @@ final class AccountGiftProvider
|
||||
}
|
||||
}
|
||||
|
||||
String _$accountGiftHash() => r'70ca553e0b84cba9dfbee428f9bf44207138713a';
|
||||
String _$accountGiftHash() => r'78890be44865accadeabdc26a96447bb3e841a5d';
|
||||
|
||||
final class AccountGiftFamily extends $Family
|
||||
with $FunctionalFamilyOverride<FutureOr<SnWalletGift>, String> {
|
||||
@@ -1,6 +1,6 @@
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:island/models/activitypub.dart';
|
||||
import 'package:island/core/models/activitypub.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
|
||||
class ApActorListItem extends StatelessWidget {
|
||||
@@ -1,6 +1,6 @@
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:island/models/activitypub.dart';
|
||||
import 'package:island/core/models/activitypub.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
|
||||
class ActorPictureWidget extends StatelessWidget {
|
||||
@@ -1,6 +1,6 @@
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:island/models/activitypub.dart';
|
||||
import 'package:island/core/models/activitypub.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import 'package:relative_time/relative_time.dart';
|
||||
|
||||
@@ -7,15 +7,15 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/models/activity.dart';
|
||||
import 'package:island/models/fortune.dart';
|
||||
import 'package:island/pods/network.dart';
|
||||
import 'package:island/pods/userinfo.dart';
|
||||
import 'package:island/screens/auth/captcha.dart';
|
||||
import 'package:island/widgets/alert.dart';
|
||||
import 'package:island/widgets/content/cloud_files.dart';
|
||||
import 'package:island/widgets/content/sheet.dart';
|
||||
import 'package:island/widgets/account/event_calendar_content.dart';
|
||||
import 'package:island/accounts/accounts_widgets/account/event_calendar_content.dart';
|
||||
import 'package:island/core/models/activity.dart';
|
||||
import 'package:island/accounts/accounts_models/fortune.dart';
|
||||
import 'package:island/core/network.dart';
|
||||
import 'package:island/accounts/accounts_pod.dart';
|
||||
import 'package:island/auth/captcha.dart';
|
||||
import 'package:island/shared/widgets/alert.dart';
|
||||
import 'package:island/drive/drive_widgets/cloud_files.dart';
|
||||
import 'package:island/core/widgets/content/sheet.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:island/models/activity.dart';
|
||||
import 'package:island/pods/network.dart';
|
||||
import 'package:island/core/models/activity.dart';
|
||||
import 'package:island/core/network.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
|
||||
part 'event_calendar.g.dart';
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:fl_chart/fl_chart.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:island/utils/format.dart';
|
||||
import 'package:island/core/utils/format.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
|
||||
class UsageOverviewWidget extends StatelessWidget {
|
||||
@@ -4,8 +4,8 @@ import 'dart:io';
|
||||
import 'package:dio/dio.dart' hide Response;
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/models/activity.dart';
|
||||
import 'package:island/pods/network.dart';
|
||||
import 'package:island/core/models/activity.dart';
|
||||
import 'package:island/core/network.dart';
|
||||
import 'package:island/talker.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
import 'package:shelf/shelf.dart';
|
||||
@@ -1,4 +1,4 @@
|
||||
import 'package:island/pods/network.dart';
|
||||
import 'package:island/core/network.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
|
||||
part 'captcha.config.g.dart';
|
||||
@@ -1,8 +1,8 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:island/screens/auth/captcha.config.dart';
|
||||
import 'package:island/widgets/content/sheet.dart';
|
||||
import 'package:island/auth/captcha.config.dart';
|
||||
import 'package:island/core/widgets/content/sheet.dart';
|
||||
|
||||
class CaptchaScreen extends ConsumerWidget {
|
||||
static Future<String?> show(BuildContext context) {
|
||||
@@ -1,8 +1,8 @@
|
||||
import 'dart:ui_web' as ui;
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/pods/config.dart';
|
||||
import 'package:island/screens/auth/captcha.config.dart';
|
||||
import 'package:island/widgets/content/sheet.dart';
|
||||
import 'package:island/core/config.dart';
|
||||
import 'package:island/auth/captcha.config.dart';
|
||||
import 'package:island/core/widgets/content/sheet.dart';
|
||||
import 'package:web/web.dart' as web;
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/widgets/app_scaffold.dart';
|
||||
import 'package:island/shared/widgets/app_scaffold.dart';
|
||||
|
||||
import 'create_account_content.dart';
|
||||
|
||||
@@ -9,14 +9,14 @@ import 'package:go_router/go_router.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:island/pods/config.dart';
|
||||
import 'package:island/pods/network.dart';
|
||||
import 'package:island/pods/userinfo.dart';
|
||||
import 'package:island/pods/websocket.dart';
|
||||
import 'package:island/services/event_bus.dart';
|
||||
import 'package:island/services/notify.dart';
|
||||
import 'package:island/services/udid.dart';
|
||||
import 'package:island/widgets/alert.dart';
|
||||
import 'package:island/core/config.dart';
|
||||
import 'package:island/core/network.dart';
|
||||
import 'package:island/accounts/accounts_pod.dart';
|
||||
import 'package:island/core/websocket.dart';
|
||||
import 'package:island/core/services/event_bus.dart';
|
||||
import 'package:island/core/services/notify.dart';
|
||||
import 'package:island/core/services/udid.dart';
|
||||
import 'package:island/shared/widgets/alert.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
import 'package:url_launcher/url_launcher_string.dart';
|
||||
@@ -42,8 +42,9 @@ Widget getProviderIcon(String provider, {double size = 24, Color? color}) {
|
||||
'assets/images/oidc/$providerLower.svg',
|
||||
width: size,
|
||||
height: size,
|
||||
colorFilter:
|
||||
color != null ? ColorFilter.mode(color, BlendMode.srcIn) : null,
|
||||
colorFilter: color != null
|
||||
? ColorFilter.mode(color, BlendMode.srcIn)
|
||||
: null,
|
||||
);
|
||||
case 'spotify':
|
||||
return Image.asset(
|
||||
@@ -844,8 +845,7 @@ class CreateAccountContent extends HookConsumerWidget {
|
||||
.toString();
|
||||
final isLaunched = await launchUrlString(
|
||||
url,
|
||||
mode:
|
||||
kIsWeb
|
||||
mode: kIsWeb
|
||||
? LaunchMode.platformDefault
|
||||
: LaunchMode.externalApplication,
|
||||
);
|
||||
@@ -875,10 +875,10 @@ class CreateAccountContent extends HookConsumerWidget {
|
||||
value: period.value / 5,
|
||||
),
|
||||
Expanded(
|
||||
child:
|
||||
SingleChildScrollView(
|
||||
child: SingleChildScrollView(
|
||||
child: PageTransitionSwitcher(
|
||||
transitionBuilder: (
|
||||
transitionBuilder:
|
||||
(
|
||||
Widget child,
|
||||
Animation<double> primaryAnimation,
|
||||
Animation<double> secondaryAnimation,
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/widgets/content/sheet.dart';
|
||||
import 'package:island/core/widgets/content/sheet.dart';
|
||||
|
||||
import 'create_account_content.dart';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/widgets/app_scaffold.dart';
|
||||
import 'package:island/shared/widgets/app_scaffold.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
|
||||
import 'login_content.dart';
|
||||
@@ -9,16 +9,16 @@ import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:flutter_otp_text_field/flutter_otp_text_field.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:island/models/auth.dart';
|
||||
import 'package:island/pods/config.dart';
|
||||
import 'package:island/pods/network.dart';
|
||||
import 'package:island/pods/userinfo.dart';
|
||||
import 'package:island/pods/websocket.dart';
|
||||
import 'package:island/screens/account/me/settings_connections.dart';
|
||||
import 'package:island/services/event_bus.dart';
|
||||
import 'package:island/services/notify.dart';
|
||||
import 'package:island/services/udid.dart';
|
||||
import 'package:island/widgets/alert.dart';
|
||||
import 'package:island/auth/auth_models/auth.dart';
|
||||
import 'package:island/core/config.dart';
|
||||
import 'package:island/core/network.dart';
|
||||
import 'package:island/accounts/accounts_pod.dart';
|
||||
import 'package:island/core/websocket.dart';
|
||||
import 'package:island/accounts/account/me/settings_connections.dart';
|
||||
import 'package:island/core/services/event_bus.dart';
|
||||
import 'package:island/core/services/notify.dart';
|
||||
import 'package:island/core/services/udid.dart';
|
||||
import 'package:island/shared/widgets/alert.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import 'package:sign_in_with_apple/sign_in_with_apple.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
@@ -274,10 +274,10 @@ class LoginContent extends HookConsumerWidget {
|
||||
else
|
||||
const Gap(4),
|
||||
Expanded(
|
||||
child:
|
||||
SingleChildScrollView(
|
||||
child: SingleChildScrollView(
|
||||
child: PageTransitionSwitcher(
|
||||
transitionBuilder: (
|
||||
transitionBuilder:
|
||||
(
|
||||
Widget child,
|
||||
Animation<double> primaryAnimation,
|
||||
Animation<double> secondaryAnimation,
|
||||
@@ -297,10 +297,9 @@ class LoginContent extends HookConsumerWidget {
|
||||
key: const ValueKey(1),
|
||||
challenge: currentTicket.value,
|
||||
factors: factors.value,
|
||||
onChallenge:
|
||||
(SnAuthChallenge? p0) => currentTicket.value = p0,
|
||||
onPickFactor:
|
||||
(SnAuthFactor p0) => factorPicked.value = p0,
|
||||
onChallenge: (SnAuthChallenge? p0) =>
|
||||
currentTicket.value = p0,
|
||||
onPickFactor: (SnAuthFactor p0) => factorPicked.value = p0,
|
||||
onNext: () => period.value++,
|
||||
onBusy: (value) => isBusy.value = value,
|
||||
),
|
||||
@@ -308,18 +307,17 @@ class LoginContent extends HookConsumerWidget {
|
||||
key: const ValueKey(2),
|
||||
challenge: currentTicket.value,
|
||||
factor: factorPicked.value,
|
||||
onChallenge:
|
||||
(SnAuthChallenge? p0) => currentTicket.value = p0,
|
||||
onChallenge: (SnAuthChallenge? p0) =>
|
||||
currentTicket.value = p0,
|
||||
onNext: () => period.value = 1,
|
||||
onBusy: (value) => isBusy.value = value,
|
||||
),
|
||||
_ => _LoginLookupScreen(
|
||||
key: const ValueKey(0),
|
||||
ticket: currentTicket.value,
|
||||
onChallenge:
|
||||
(SnAuthChallenge? p0) => currentTicket.value = p0,
|
||||
onFactor:
|
||||
(List<SnAuthFactor>? p0) =>
|
||||
onChallenge: (SnAuthChallenge? p0) =>
|
||||
currentTicket.value = p0,
|
||||
onFactor: (List<SnAuthFactor>? p0) =>
|
||||
factors.value = p0 ?? [],
|
||||
onNext: () => period.value++,
|
||||
onBusy: (value) => isBusy.value = value,
|
||||
@@ -388,8 +386,7 @@ class _LoginPickerScreen extends HookConsumerWidget {
|
||||
try {
|
||||
await client.post(
|
||||
'/pass/auth/challenge/${challenge!.id}/factors/${factorPicked.value!.id}',
|
||||
data:
|
||||
hintController.text.isNotEmpty
|
||||
data: hintController.text.isNotEmpty
|
||||
? jsonEncode(hintController.text)
|
||||
: null,
|
||||
);
|
||||
@@ -581,8 +578,7 @@ class _LoginLookupScreen extends HookConsumerWidget {
|
||||
'account': uname,
|
||||
'device_id': await getUdid(),
|
||||
'device_name': await getDeviceName(),
|
||||
'platform':
|
||||
kIsWeb
|
||||
'platform': kIsWeb
|
||||
? 1
|
||||
: switch (defaultTargetPlatform) {
|
||||
TargetPlatform.iOS => 2,
|
||||
@@ -663,18 +659,17 @@ class _LoginLookupScreen extends HookConsumerWidget {
|
||||
if (token?.token != null) {
|
||||
queryParams['token'] = token!.token;
|
||||
}
|
||||
final url =
|
||||
Uri.parse(
|
||||
final url = Uri.parse(
|
||||
'$serverUrl/pass/auth/login/${provider.toLowerCase()}',
|
||||
).replace(queryParameters: queryParams).toString();
|
||||
final isLaunched = await launchUrlString(
|
||||
url,
|
||||
mode:
|
||||
kIsWeb
|
||||
mode: kIsWeb
|
||||
? LaunchMode.platformDefault
|
||||
: LaunchMode.externalApplication,
|
||||
webOnlyWindowName:
|
||||
token?.token != null ? 'auth-${token!.token}' : 'auth',
|
||||
webOnlyWindowName: token?.token != null
|
||||
? 'auth-${token!.token}'
|
||||
: 'auth',
|
||||
);
|
||||
if (!isLaunched) {
|
||||
waitingForOidc.value = false;
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/widgets/content/sheet.dart';
|
||||
import 'package:island/core/widgets/content/sheet.dart';
|
||||
|
||||
import 'login_content.dart';
|
||||
|
||||
@@ -7,11 +7,11 @@ import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:island/pods/config.dart';
|
||||
import 'package:island/pods/network.dart';
|
||||
import 'package:island/services/udid.dart';
|
||||
import 'package:island/widgets/alert.dart';
|
||||
import 'package:island/widgets/app_scaffold.dart';
|
||||
import 'package:island/core/config.dart';
|
||||
import 'package:island/core/network.dart';
|
||||
import 'package:island/core/services/udid.dart';
|
||||
import 'package:island/shared/widgets/alert.dart';
|
||||
import 'package:island/shared/widgets/app_scaffold.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
|
||||
class OidcScreen extends ConsumerStatefulWidget {
|
||||
@@ -70,8 +70,7 @@ class _OidcScreenState extends ConsumerState<OidcScreen> {
|
||||
Expanded(
|
||||
child: InAppWebView(
|
||||
initialSettings: InAppWebViewSettings(
|
||||
userAgent:
|
||||
kIsWeb
|
||||
userAgent: kIsWeb
|
||||
? null
|
||||
: Platform.isIOS
|
||||
? 'Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Mobile/15E148 Safari/604.1'
|
||||
@@ -106,10 +105,8 @@ class _OidcScreenState extends ConsumerState<OidcScreen> {
|
||||
},
|
||||
);
|
||||
},
|
||||
shouldOverrideUrlLoading: (
|
||||
controller,
|
||||
navigationAction,
|
||||
) async {
|
||||
shouldOverrideUrlLoading:
|
||||
(controller, navigationAction) async {
|
||||
final url = navigationAction.request.url;
|
||||
if (url != null) {
|
||||
setState(() {
|
||||
@@ -3,9 +3,9 @@
|
||||
import 'dart:ui_web' as ui;
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:island/pods/config.dart';
|
||||
import 'package:island/pods/network.dart';
|
||||
import 'package:island/widgets/app_scaffold.dart';
|
||||
import 'package:island/core/config.dart';
|
||||
import 'package:island/core/network.dart';
|
||||
import 'package:island/shared/widgets/app_scaffold.dart';
|
||||
import 'package:web/web.dart' as web;
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
@@ -38,10 +38,8 @@ class _OidcScreenState extends ConsumerState<OidcScreen> {
|
||||
|
||||
// Create the iframe for the OIDC login
|
||||
final token = ref.watch(tokenProvider);
|
||||
final iframe =
|
||||
web.HTMLIFrameElement()
|
||||
..src =
|
||||
(token?.token.isNotEmpty ?? false)
|
||||
final iframe = web.HTMLIFrameElement()
|
||||
..src = (token?.token.isNotEmpty ?? false)
|
||||
? '$serverUrl/auth/login/${widget.provider}?tk=${token!.token}'
|
||||
: '$serverUrl/auth/login/${widget.provider}'
|
||||
..style.border = 'none'
|
||||
@@ -77,8 +75,7 @@ class _OidcScreenState extends ConsumerState<OidcScreen> {
|
||||
appBar: AppBar(
|
||||
title: widget.title != null ? Text(widget.title!) : Text('login').tr(),
|
||||
),
|
||||
body:
|
||||
_isInitialized
|
||||
body: _isInitialized
|
||||
? HtmlElementView(viewType: _viewType)
|
||||
: Center(child: CircularProgressIndicator()),
|
||||
);
|
||||
@@ -3,7 +3,7 @@ import 'dart:convert';
|
||||
import 'dart:math';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:island/pods/network.dart';
|
||||
import 'package:island/core/network.dart';
|
||||
import 'package:island/talker.dart';
|
||||
|
||||
class WebAuthServer {
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
import 'package:island/models/file.dart';
|
||||
import 'package:island/models/realm.dart';
|
||||
import 'package:island/models/account.dart';
|
||||
import 'package:island/drive/drive_models/file.dart';
|
||||
import 'package:island/realms/realms_models/realm.dart';
|
||||
import 'package:island/accounts/accounts_models/account.dart';
|
||||
|
||||
part 'chat.freezed.dart';
|
||||
part 'chat.g.dart';
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user