Compare commits
339 Commits
dd17b2b9c1
...
v3
| Author | SHA1 | Date | |
|---|---|---|---|
|
3670fe0f10
|
|||
|
bb1a5155ed
|
|||
|
eb90dbbc5a
|
|||
|
a73d9f8ec0
|
|||
|
4c8f2e3251
|
|||
|
bc9d2ab8ce
|
|||
|
8bc01f1b97
|
|||
|
200cf3ec80
|
|||
|
d910d837eb
|
|||
|
56d1f14206
|
|||
|
a7c8a8d2ee
|
|||
|
411c71dae0
|
|||
|
a8430604f9
|
|||
|
fe37d219b7
|
|||
|
bc1ebc799a
|
|||
|
37940ef12a
|
|||
|
5d0469e187
|
|||
|
7ad7ab53a6
|
|||
|
6b0343d3dc
|
|||
|
f541580281
|
|||
|
6e7eedc026
|
|||
|
5d5bda7925
|
|||
|
48e66580c3
|
|||
|
836449e3f4
|
|||
|
804dd029b1
|
|||
|
e13928b03f
|
|||
|
5c14236603
|
|||
|
738ed357bf
|
|||
|
0876ab9b74
|
|||
|
7071399cd8
|
|||
|
af23df6e48
|
|||
|
e7e7cc424b
|
|||
|
56ad8f60ea
|
|||
|
026dd3eb01
|
|||
|
72baf0ca5c
|
|||
|
82cb8c7ff9
|
|||
|
a266177628
|
|||
|
2474c7f97c
|
|||
|
1716afd66c
|
|||
|
78a3cd6dd2
|
|||
|
d655840e85
|
|||
|
2e3e988125
|
|||
|
2a94ed5171
|
|||
|
0948810993
|
|||
|
689965c582
|
|||
|
ac82fdb8c8
|
|||
|
d94baab877
|
|||
|
0a179acb13
|
|||
|
33686b83e3
|
|||
|
09abe79f6a
|
|||
|
b0b227f36b
|
|||
|
62a45317a9
|
|||
|
f727882b93
|
|||
|
ba6d6ef97a
|
|||
|
c904826c49
|
|||
|
595aa45378
|
|||
|
a481b1b82f
|
|||
|
2df31e4244
|
|||
|
9c1eb8e5bc
|
|||
|
4d095aa333
|
|||
|
fb62ce7735
|
|||
|
b258df56c9
|
|||
|
2bf54099f9
|
|||
|
eb89d9223a
|
|||
|
87a54625aa
|
|||
|
30b2c0a0b4
|
|||
|
59c34ada40
|
|||
|
67a522753e
|
|||
|
e6338e8a5a
|
|||
|
cb7eef943c
|
|||
|
7a56e7882e
|
|||
|
b0085c2ab0
|
|||
|
d3f990691e
|
|||
|
46a773cfe9
|
|||
|
f5fb5d8a98
|
|||
|
4d87ca7cca
|
|||
|
e16a04bd5a
|
|||
|
d68b39f80f
|
|||
|
b7360f1f91
|
|||
|
5f094aca4b
|
|||
|
6010c17900
|
|||
|
2ee6b3514c
|
|||
|
8c83ee9b88
|
|||
|
18c81503f1
|
|||
|
53137aed3f
|
|||
|
b2aa8b8ec1
|
|||
|
b13a4f5bcf
|
|||
|
8fe703ef6d
|
|||
|
2297fb3c47
|
|||
|
580663dcda
|
|||
|
de20803119
|
|||
|
fb51d2076f
|
|||
|
d8485954fa
|
|||
|
d7746d14e4
|
|||
|
648d5225f6
|
|||
|
9d4d0f2e48
|
|||
|
fe386163f4
|
|||
|
ac2cee10e5
|
|||
|
9c370647dd
|
|||
|
7516e197fe
|
|||
|
71c372ab6c
|
|||
|
25f23f7f93
|
|||
|
51853698b9
|
|||
|
39ed5393ab
|
|||
|
782b3f1b08
|
|||
|
3ef2f13dd3
|
|||
|
36b0f55a47
|
|||
|
bc7a6e865e
|
|||
|
2ff60fc4ff
|
|||
|
ea93aa144e
|
|||
|
e4cd0c99df
|
|||
|
dff84dde58
|
|||
|
16c7b7e764
|
|||
|
240509ceff
|
|||
|
91da9768c1
|
|||
|
60b8e2bcad
|
|||
|
504e4d55ad
|
|||
|
38a15bb62a
|
|||
|
9d03faf594
|
|||
|
fd79c11d18
|
|||
|
c4ac256896
|
|||
|
c1fc8ea3fe
|
|||
|
29574ada88
|
|||
|
7369f5d88c
|
|||
|
5b3c138ebe
|
|||
|
562bdf62e9
|
|||
|
a73672925e
|
|||
|
c585522c35
|
|||
|
6aba84e506
|
|||
|
c6f104afc7
|
|||
|
4181fd0090
|
|||
|
84bca9601a
|
|||
|
31b83b2d27
|
|||
|
dfcb089c69
|
|||
|
fe365e8c6d
|
|||
|
b5262137ad
|
|||
|
11e93314c7
|
|||
|
c8658bc0ca
|
|||
|
b2f689693b
|
|||
|
33ec0b1d9a
|
|||
|
f698385494
|
|||
|
6ecdf89d20
|
|||
|
683f686540
|
|||
|
6a115ab1cc
|
|||
|
d05283d3b1
|
|||
|
b9653e7264
|
|||
|
87d1c8b320
|
|||
|
22eb54b61f
|
|||
|
a90ad2debc
|
|||
|
2f00bf660d
|
|||
|
322a93324c
|
|||
|
c3a3be0807
|
|||
|
27c7c8f039
|
|||
|
a7960da362
|
|||
|
64ab30b0a9
|
|||
|
935e6d5833
|
|||
|
938b128b1e
|
|||
|
c9764daa20
|
|||
|
7bc44e8f06
|
|||
|
4a7ff96a8b
|
|||
|
e759d5f46c
|
|||
|
f5ca6a37bf
|
|||
|
5fc8859f3b
|
|||
|
e30e7adbe2
|
|||
|
68be4db160
|
|||
|
aa91e376ca
|
|||
|
caffb85588
|
|||
|
521b192205
|
|||
|
77ac0428ea
|
|||
|
88c8227c66
|
|||
|
b20d8350a8
|
|||
|
98b27bed0e
|
|||
|
3a7d8b1a0d
|
|||
|
b4801d6af6
|
|||
|
aab5b957af
|
|||
|
43d706a184
|
|||
|
98df275f88
|
|||
|
5663df6ef1
|
|||
|
e996a0c95f
|
|||
|
a090e93f57
|
|||
|
c69034c071
|
|||
|
369ea6cf5b
|
|||
|
2e371b5296
|
|||
|
2e9d61bcfa
|
|||
|
9c2b5b0dfa
|
|||
|
3b40f515b3
|
|||
|
5ee61dbef2
|
|||
|
b151ef6686
|
|||
|
ff934d0f08
|
|||
|
abe5ded896
|
|||
|
f1d72a5215
|
|||
|
864cbe73b7
|
|||
|
108a6da074
|
|||
|
f9a09599c9
|
|||
|
9067dadd3e
|
|||
|
09f8df1e78
|
|||
|
2c5f246c55
|
|||
|
a66c6ea654
|
|||
|
3ad4bb4518
|
|||
|
53f0dcb825
|
|||
|
557f5a2389
|
|||
|
78f14f890f
|
|||
|
77b2effb34
|
|||
|
f02b4abf65
|
|||
|
3f37c4f761
|
|||
|
5deb910fa4
|
|||
|
f50a19f573
|
|||
|
98c8a356e8
|
|||
|
d0c16ea08f
|
|||
|
f2c1b2a531
|
|||
|
3061f0c5a9
|
|||
|
98f7f33c65
|
|||
|
d9af5d32fd
|
|||
|
f2031697ec
|
|||
|
9b85b7573c
|
|||
|
4fb739b33b
|
|||
|
c03ba3bc3a
|
|||
|
fc65440420
|
|||
|
7b85533184
|
|||
|
77d9eb60c6
|
|||
|
4d8953cd22
|
|||
|
fafa460fe8
|
|||
|
faf3a677d4
|
|||
|
0f644a0234
|
|||
|
18d16fdd57
|
|||
|
18e890d63c
|
|||
|
9c5e50c16a
|
|||
|
96a2c8182e
|
|||
|
56b27c3e82
|
|||
|
ad4bf94195
|
|||
|
b77a832d8a
|
|||
|
5e61805db7
|
|||
|
35b96b0bd2
|
|||
|
c8ad791ff3
|
|||
|
1e908502dc
|
|||
|
715ce1a368
|
|||
|
548c9963ee
|
|||
|
db5199438a
|
|||
|
4409a6fb1e
|
|||
|
26a24b0e41
|
|||
|
9b948d259b
|
|||
|
1f713b5b2b
|
|||
|
f92cfafda4
|
|||
|
fa208b44d7
|
|||
|
94adecafbb
|
|||
|
0303ef4a93
|
|||
|
c2b18ce10b
|
|||
|
0767bb53ce
|
|||
|
b233f9a410
|
|||
|
256024fb46
|
|||
|
4a80aaf24d
|
|||
|
aafd160c44
|
|||
|
4a800725e3
|
|||
|
24791b3293
|
|||
|
3ac263d483
|
|||
|
2445d8adf8
|
|||
|
d4f95bbbf4
|
|||
|
943e4b7b5c
|
|||
|
7edc02a1d3
|
|||
|
3f9881e943
|
|||
|
50c25e919c
|
|||
|
99fb08dd55
|
|||
|
e43bc6b8a8
|
|||
|
c247cdf81c
|
|||
|
3ffa730505
|
|||
|
1cc34d3073
|
|||
|
96a919cc4e
|
|||
|
e7e3bfcadf
|
|||
|
a8617a5040
|
|||
|
d94f8d004f
|
|||
|
d93b066979
|
|||
|
320664a547
|
|||
|
98f4698d5b
|
|||
|
82397dd087
|
|||
|
4ec10ceb47
|
|||
|
4b03b45a0d
|
|||
|
7a72d32649
|
|||
|
5152dd13ea
|
|||
|
fd377aa7af
|
|||
|
67044148f1
|
|||
|
92bc43e4df
|
|||
|
a1a7b34c86
|
|||
|
40c0e052cf
|
|||
|
9a75228e38
|
|||
|
a9fd75cc45
|
|||
|
a713b30d93
|
|||
|
e516f0a862
|
|||
|
429b966c4b
|
|||
|
f14da0d3a2
|
|||
|
d201182bd2
|
|||
|
6f6422c15e
|
|||
|
9f6ae639ee
|
|||
|
35f4d7d885
|
|||
|
a9c8f49797
|
|||
|
5e9341a19c
|
|||
|
645a6dca93
|
|||
|
ea8e7ead2d
|
|||
|
5f2f083d72
|
|||
|
5cf40e27de
|
|||
|
1ab7295918
|
|||
|
07f191171c
|
|||
|
4a5dac248e
|
|||
|
3b983a6444
|
|||
|
4607b77355
|
|||
|
7957e4894a
|
|||
|
f94f80c375
|
|||
|
74fa2215a6
|
|||
|
0d11435feb
|
|||
|
e22598b0a6
|
|||
|
84cfe643f5
|
|||
|
05ac04e9a2
|
|||
|
66f283d6e8
|
|||
|
c779c7523c
|
|||
|
ac7cb29afe
|
|||
|
935aa77223
|
|||
|
24e5b3b824
|
|||
|
0391893b32
|
|||
|
b8d24876c8
|
|||
|
0493661f9a
|
|||
|
b40afde00f
|
|||
|
78a4022531
|
|||
|
8a291c80b7
|
|||
|
1395d65b76
|
|||
|
eb4942e0ed
|
|||
|
f254cfa81e
|
|||
|
4927795260
|
|||
|
e4019dadc8
|
|||
|
5e7d77e1a1
|
|||
|
bfcbed035c
|
|||
|
5ebefae961
|
|||
|
d4758674bb
|
|||
|
f5f1ddc0ea
|
|||
|
2720b59485
|
|||
|
29b1ac7fce
|
|||
|
83ca5551ad
|
|||
| 611cb024a9 | |||
|
74fb56891d
|
|||
|
ac4fa5eb85
|
|||
|
8857718709
|
@@ -12,6 +12,8 @@
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" android:maxSdkVersion="30" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
|
||||
android:maxSdkVersion="29" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
|
||||
@@ -43,6 +45,16 @@
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
|
||||
<!-- App protocol -->
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<!-- Accepts URIs that begin with YOUR_SCHEME://YOUR_HOST -->
|
||||
<data android:scheme="solian" />
|
||||
</intent-filter>
|
||||
|
||||
<!-- Deeplinking -->
|
||||
<intent-filter android:autoVerify="true">
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
@@ -149,4 +161,4 @@
|
||||
<data android:mimeType="text/plain" />
|
||||
</intent>
|
||||
</queries>
|
||||
</manifest>
|
||||
</manifest>
|
||||
@@ -48,8 +48,6 @@
|
||||
"deletePublisherHint": "Are you sure to delete this publisher? This will also deleted all the post and collections under this publisher.",
|
||||
"deletePost": "Delete Post",
|
||||
"deletePostHint": "Are you sure to delete this post?",
|
||||
"deleteMessage": "Delete Message",
|
||||
"deleteMessageConfirmation": "Are you sure you want to delete this message?",
|
||||
"copyLink": "Copy Link",
|
||||
"postCreateAccountTitle": "Thanks for joining!",
|
||||
"postCreateAccountNext": "What's next?",
|
||||
@@ -135,11 +133,6 @@
|
||||
"reactionPositive": "Postive",
|
||||
"reactionNegative": "Negative",
|
||||
"reactionNeutral": "Neutral",
|
||||
"customReaction": "Custom Reaction",
|
||||
"customReactions": "Custom Reactions",
|
||||
"stickerPlaceholder": "Sticker Placeholder",
|
||||
"reactionAttitude": "Reaction Attitude",
|
||||
"addReaction": "Add Reaction",
|
||||
"connectionConnected": "Connected",
|
||||
"connectionDisconnected": "Disconnected",
|
||||
"connectionReconnecting": "Reconnecting",
|
||||
@@ -162,18 +155,15 @@
|
||||
"accountConnectionProviderGithub": "GitHub",
|
||||
"accountConnectionProviderDiscord": "Discord",
|
||||
"accountConnectionProviderAfdian": "Afdian",
|
||||
"accountConnectionProviderSpotify": "Spotify",
|
||||
"checkIn": "Check In",
|
||||
"checkInNone": "Not checked-in yet",
|
||||
"checkInNoneHint": "Get your fortune tips and daily rewards by checking in.",
|
||||
"checkInResultLevel0": "Wrost Luck",
|
||||
"checkInResultLevel0": "Worst Luck",
|
||||
"checkInResultLevel1": "Bad Luck",
|
||||
"checkInResultLevel2": "A Normal Day",
|
||||
"checkInResultLevel3": "Good Luck",
|
||||
"checkInResultLevel4": "Best Luck",
|
||||
"checkInActivityTitle": "{} checked in on {} and got a {}",
|
||||
"eventCalendar": "Event Calendar",
|
||||
"eventCalendarEmpty": "No events on that day.",
|
||||
"fortuneGraph": "Fortune Trend",
|
||||
"noFortuneData": "No fortune data available for this month.",
|
||||
"creatorHub": "Creator Hub",
|
||||
@@ -259,16 +249,11 @@
|
||||
"translatorBadgeName": "Translator",
|
||||
"translatorBadgeDescription": "Helping translate Solar Network into different languages",
|
||||
"wallet": "Wallet",
|
||||
"walletStats": "Wallet Statistics",
|
||||
"totalTransactions": "Total Transactions",
|
||||
"totalOrders": "Total Orders",
|
||||
"totalIncome": "Total Income",
|
||||
"totalOutgoing": "Total Outgoing",
|
||||
"netBalance": "Net Balance",
|
||||
"walletCurrencyPoints": "New Solar Points",
|
||||
"walletCurrencyShortPoints": "NSP",
|
||||
"walletCurrencyGolds": "The Solar Dollars",
|
||||
"walletCurrencyShortGolds": "NSD",
|
||||
"retry": "Retry",
|
||||
"creatorHubUnselectedHint": "Pick / create a publisher to get started.",
|
||||
"relationships": "Relationships",
|
||||
"addFriend": "Send a Friend Request",
|
||||
@@ -319,8 +304,6 @@
|
||||
"settingsBackgroundImageClear": "Clear Background Image",
|
||||
"settingsBackgroundGenerateColor": "Generate color scheme from Bacground Image",
|
||||
"messageNone": "No content to display",
|
||||
"messageUpdateLinks": "Server generated links previews",
|
||||
"messageUpdateEdited": "Edited a message",
|
||||
"unreadMessages": {
|
||||
"one": "{} unread message",
|
||||
"other": "{} unread messages"
|
||||
@@ -331,10 +314,8 @@
|
||||
"settingsAutoTranslate": "Auto Translate",
|
||||
"settingsHideBottomNav": "Hide Bottom Navigation",
|
||||
"settingsSoundEffects": "Sound Effects",
|
||||
"settingsAprilFoolFeatures": "April Fool Features",
|
||||
"settingsEnterToSend": "Enter to Send",
|
||||
"settingsTransparentAppBar": "Transparent App Bar",
|
||||
"settingsCardBackgroundOpacity": "Card Background Opacity",
|
||||
"settingsCustomFonts": "Custom Fonts",
|
||||
"settingsCustomFontsHint": "Custom fonts will be used for all text in the app. Make sure it is installed on your device.",
|
||||
"settingsColorScheme": "Color Scheme",
|
||||
@@ -382,6 +363,7 @@
|
||||
"authFactorSecretHint": "Create an secret for this factor.",
|
||||
"authFactorQrCodeScan": "Scan this QR code with your authenticator app to set up TOTP authentication",
|
||||
"authFactorNoQrCode": "No QR code available for this authentication factor",
|
||||
"cancel": "Cancel",
|
||||
"confirm": "Confirm",
|
||||
"authFactorAdditional": "One more step",
|
||||
"authFactorHint": "Contact method hint",
|
||||
@@ -406,10 +388,6 @@
|
||||
"other": "{} are typing..."
|
||||
},
|
||||
"settingsAppearance": "Appearance",
|
||||
"settingsThemeMode": "Theme Mode",
|
||||
"settingsThemeModeSystem": "System",
|
||||
"settingsThemeModeLight": "Light",
|
||||
"settingsThemeModeDark": "Dark",
|
||||
"settingsServer": "Server",
|
||||
"settingsBehavior": "Behavior",
|
||||
"settingsDesktop": "Desktop",
|
||||
@@ -470,7 +448,6 @@
|
||||
"pronouns": "Pronouns",
|
||||
"location": "Location",
|
||||
"timeZone": "Time Zone",
|
||||
"timezoneNotFound": "Time zone not found",
|
||||
"birthday": "Birthday",
|
||||
"selectADate": "Select a date",
|
||||
"checkInResultT0": "Worst",
|
||||
@@ -481,6 +458,7 @@
|
||||
"accountProfileView": "View Profile",
|
||||
"unspecified": "Unspecified",
|
||||
"added": "Added",
|
||||
"preview": "Preview",
|
||||
"togglePreview": "Toggle Preview",
|
||||
"subscribe": "Subscribe",
|
||||
"unsubscribe": "Unsubscribe",
|
||||
@@ -491,7 +469,6 @@
|
||||
"pinCode": "PIN Code",
|
||||
"biometric": "Biometric",
|
||||
"enterPinToConfirm": "Enter your 6-digit PIN to confirm payment",
|
||||
"enterPin": "Enter your PIN code",
|
||||
"clearPin": "Clear PIN",
|
||||
"useBiometricToConfirm": "Use biometric authentication to confirm payment",
|
||||
"touchSensorToAuthenticate": "Touch the sensor to authenticate",
|
||||
@@ -641,10 +618,6 @@
|
||||
"chatNotJoined": "You have not joined this chat yet.",
|
||||
"chatUnableJoin": "You can't join this chat due to it's access control settings.",
|
||||
"chatJoin": "Join the Chat",
|
||||
"chatReplyingTo": "Replying to {}",
|
||||
"chatForwarding": "Forwarding message",
|
||||
"chatEditing": "Editing message",
|
||||
"chatNoContent": "No content",
|
||||
"realmJoin": "Join the Realm",
|
||||
"realmJoinSuccess": "Successfully joined the realm.",
|
||||
"search": "Search",
|
||||
@@ -708,9 +681,9 @@
|
||||
"articleAttachmentHint": "Attachments must be uploaded and inserted into the article body to be visible.",
|
||||
"postVisibility": "Post Visibility",
|
||||
"currentMembershipMember": "A member of Stellar Program · {}",
|
||||
"membershipPriceStellar": "1200 NSP per month, level 3+ required",
|
||||
"membershipPriceNova": "2400 NSP per month, level 6+ required",
|
||||
"membershipPriceSupernova": "3600 NSP per month, level 9+ required",
|
||||
"membershipPriceStellar": "1200 NSP per month, level 20+ required",
|
||||
"membershipPriceNova": "2400 NSP per month, level 40+ required",
|
||||
"membershipPriceSupernova": "3600 NSP per month, level 60+ required",
|
||||
"sharePostPhoto": "Share Post as Photo",
|
||||
"wouldYouLikeToNavigateToChat": "Would You like to navigate to the chat?",
|
||||
"abuseReports": "Abuse Reports",
|
||||
@@ -731,7 +704,7 @@
|
||||
"aboutScreenDeveloperSectionTitle": "Developer",
|
||||
"aboutScreenContactUsTitle": "Contact Us",
|
||||
"aboutScreenLicenseTitle": "License",
|
||||
"aboutScreenLicenseContent": "GNU Affero General Public License v3.0",
|
||||
"aboutScreenLicenseContent": "AGPLv3",
|
||||
"aboutScreenCopyright": "All rights reserved © Solsynth {}",
|
||||
"aboutScreenMadeWith": "Made with ❤︎️ by Solar Network Team",
|
||||
"aboutScreenFailedToLoadPackageInfo": "Failed to load package info: {error}",
|
||||
@@ -776,21 +749,6 @@
|
||||
"rename": "Rename",
|
||||
"markAsSensitive": "Mark as Sensitive",
|
||||
"fileName": "File name",
|
||||
"sensitiveCategories": {
|
||||
"language": "Language",
|
||||
"sexualContent": "Sexual Content",
|
||||
"violence": "Violence",
|
||||
"profanity": "Profanity",
|
||||
"hateSpeech": "Hate Speech",
|
||||
"racism": "Racism",
|
||||
"adultContent": "Adult Content",
|
||||
"drugAbuse": "Drug Abuse",
|
||||
"alcoholAbuse": "Alcohol Abuse",
|
||||
"gambling": "Gambling",
|
||||
"selfHarm": "Self-harm",
|
||||
"childAbuse": "Child Abuse",
|
||||
"other": "Other"
|
||||
},
|
||||
"poll": "Poll",
|
||||
"pollsRecent": "Recent Polls",
|
||||
"pollCreateNew": "Create New",
|
||||
@@ -873,7 +831,6 @@
|
||||
"pollShortTextAnswerPreview": "Short text answer (preview)",
|
||||
"award": "Award",
|
||||
"awardPost": "Award Post",
|
||||
"awardPoints": "Awarded {} points",
|
||||
"awardMessage": "Message",
|
||||
"awardMessageHint": "Enter your award message...",
|
||||
"awardAttitude": "Attitude",
|
||||
@@ -1030,10 +987,6 @@
|
||||
"searchLinks": "Links",
|
||||
"searchAttachments": "Attachments",
|
||||
"noMessagesFound": "No messages found",
|
||||
"Searching...": "Searching...",
|
||||
"searchError": "Search failed. Please try again.",
|
||||
"tryDifferentKeywords": "Try different keywords or remove search filters",
|
||||
"retry": "Retry",
|
||||
"openInBrowser": "Open in Browser",
|
||||
"highlightPost": "Highlight Post",
|
||||
"filters": "Filters",
|
||||
@@ -1065,14 +1018,12 @@
|
||||
"authDeviceChallenges": "Device Usage",
|
||||
"authDeviceHint": "Swipe left to edit label, swipe right to logout device.",
|
||||
"settingsMessageDisplayStyle": "Message Display Style",
|
||||
"settingsWindowOpacity": "Window Opacity",
|
||||
"auto": "Auto",
|
||||
"manual": "Manual",
|
||||
"iframeCode": "Iframe Code",
|
||||
"iframeCodeHint": "<iframe src=\"...\" width=\"...\" height=\"...\">",
|
||||
"parseIframe": "Parse Iframe",
|
||||
"messageActions": "Message Actions",
|
||||
"messageContent": "Message Content",
|
||||
"viewEmbedLoadHint": "Tap to load",
|
||||
"levelingStage1": "Novice",
|
||||
"levelingStage2": "Apprentice",
|
||||
@@ -1107,6 +1058,53 @@
|
||||
"recycledFilesDeleted": "Recycled files deleted successfully",
|
||||
"failedToDeleteRecycledFiles": "Failed to delete recycled files",
|
||||
"upload": "Upload",
|
||||
"deleteMessage": "Delete Message",
|
||||
"deleteMessageConfirmation": "Are you sure you want to delete this message?",
|
||||
"customReaction": "Custom Reaction",
|
||||
"customReactions": "Custom Reactions",
|
||||
"stickerPlaceholder": "Sticker Placeholder",
|
||||
"reactionAttitude": "Reaction Attitude",
|
||||
"addReaction": "Add Reaction",
|
||||
"eventCalendar": "Event Calendar",
|
||||
"eventCalendarEmpty": "No events on that day.",
|
||||
"walletStats": "Wallet Statistics",
|
||||
"totalTransactions": "Total Transactions",
|
||||
"totalOrders": "Total Orders",
|
||||
"totalIncome": "Total Income",
|
||||
"totalOutgoing": "Total Outgoing",
|
||||
"netBalance": "Net Balance",
|
||||
"messageUpdateLinks": "Server generated links previews",
|
||||
"messageUpdateEdited": "Edited a message",
|
||||
"settingsCardBackgroundOpacity": "Card Background Opacity",
|
||||
"settingsThemeMode": "Theme Mode",
|
||||
"settingsThemeModeSystem": "System",
|
||||
"settingsThemeModeLight": "Light",
|
||||
"settingsThemeModeDark": "Dark",
|
||||
"enterPin": "Enter your PIN code",
|
||||
"chatReplyingTo": "Replying to {}",
|
||||
"chatForwarding": "Forwarding message",
|
||||
"chatEditing": "Editing message",
|
||||
"chatNoContent": "No content",
|
||||
"sensitiveCategories": {
|
||||
"language": "Language",
|
||||
"sexualContent": "Sexual Content",
|
||||
"violence": "Violence",
|
||||
"profanity": "Profanity",
|
||||
"hateSpeech": "Hate Speech",
|
||||
"racism": "Racism",
|
||||
"adultContent": "Adult Content",
|
||||
"drugAbuse": "Drug Abuse",
|
||||
"alcoholAbuse": "Alcohol Abuse",
|
||||
"gambling": "Gambling",
|
||||
"selfHarm": "Self-harm",
|
||||
"childAbuse": "Child Abuse",
|
||||
"other": "Other"
|
||||
},
|
||||
"Searching...": "Searching...",
|
||||
"searchError": "Search failed. Please try again.",
|
||||
"tryDifferentKeywords": "Try different keywords or remove search filters",
|
||||
"settingsWindowOpacity": "Window Opacity",
|
||||
"messageContent": "Message Content",
|
||||
"updateAvailable": "Update available",
|
||||
"noChangelogProvided": "No changelog provided.",
|
||||
"useSecondarySourceForDownload": "Use secondary source for download",
|
||||
@@ -1145,7 +1143,6 @@
|
||||
"thisWillBeAnOpenGift": "This will be an open gift",
|
||||
"personalMessage": "Personal Message",
|
||||
"addPersonalMessageForRecipient": "Add a personal message for the recipient",
|
||||
"cancel": "Cancel",
|
||||
"giftStatusCreated": "Created",
|
||||
"giftStatusSent": "Sent",
|
||||
"giftStatusRedeemed": "Redeemed",
|
||||
@@ -1251,11 +1248,14 @@
|
||||
"gradientColors": "Gradient Colors",
|
||||
"color": "Color",
|
||||
"addColor": "Add Color",
|
||||
"preview": "Preview",
|
||||
"availableWithYourPlan": "Available with your plan",
|
||||
"upgradeRequired": "Upgrade required",
|
||||
"settingsDisableAnimation": "Disable Animation",
|
||||
"addTag": "Add Tag",
|
||||
"accountConnectionProviderSpotify": "Spotify",
|
||||
"accountConnectionProviderSteam": "Steam",
|
||||
"timezoneNotFound": "Time zone not found",
|
||||
"awardPoints": "Awarded {} points",
|
||||
"postFeaturedOn": "Post featured on {}",
|
||||
"messageSentAt": "Sent at {}",
|
||||
"myTickets": "My Tickets",
|
||||
@@ -1300,11 +1300,10 @@
|
||||
"thoughtInputHint": "Ask sn-chan anything...",
|
||||
"thoughtNewConversation": "Start New Conversation",
|
||||
"thoughtParseError": "Failed to parse AI response",
|
||||
"thoughtFunctionCall": "Function Call",
|
||||
"thoughtFunctionCall": "Use {}",
|
||||
"aiThought": "AI Thought",
|
||||
"aiThoughtTitle": "Let sn-chan think",
|
||||
"postReferenceUnavailable": "Referenced post is unavailable",
|
||||
"fabLocation": "FAB Location",
|
||||
"activities": "Activities",
|
||||
"presenceTypeGaming": "Playing",
|
||||
"presenceTypeMusic": "Listening to Music",
|
||||
@@ -1319,5 +1318,246 @@
|
||||
"popularity": "Popularity",
|
||||
"descendingOrder": "Descending Order",
|
||||
"selectDate": "Select Date",
|
||||
"pinnedPosts": "Pinned Posts"
|
||||
}
|
||||
"pinnedPosts": "Pinned Posts",
|
||||
"customReactionHint": "Custom Reaction allow you to use user uploaded stickers as the symbol of the reaction for the post. Exclusive for Stellar Program members.",
|
||||
"publicationSites": "Publication Sites",
|
||||
"uploadTasks": "Upload Tasks",
|
||||
"thoughtFunctionCallBegin": "Calling tool {}",
|
||||
"thoughtFunctionCallFinish": "{} responded",
|
||||
"thoughtUnpaidHint": "Thinking unavaiable due to unpaid orders",
|
||||
"more": "More",
|
||||
"collapse": "Collapse",
|
||||
"pollConfirmDiscard": "Are you sure you want to leave? All the poll data you're editing will not be saved.",
|
||||
"discard": "Discard",
|
||||
"fund": "Fund",
|
||||
"fundsRecent": "Recent Funds",
|
||||
"fundCreateNew": "Create New",
|
||||
"fundCreateNewHint": "Create a new fund for your message. Select recipients and amount.",
|
||||
"amountOfSplits": "Amount of Splits",
|
||||
"enterNumberOfSplits": "Enter Splits Amount",
|
||||
"orCreateWith": "Or\ncreate with",
|
||||
"unindexedFiles": "Unindexed files",
|
||||
"folder": "Folder",
|
||||
"clearCompleted": "Clear Completed",
|
||||
"uploadSuccess": "Upload successful!",
|
||||
"wouldYouLikeToViewFile": "Would you like to view the file?",
|
||||
"contentCantEmpty": "Content cannot be empty",
|
||||
"features": "Features",
|
||||
"unnamed": "Unnamed",
|
||||
"fundEnvelopeLoadFailed": "Failed to load fund envelope",
|
||||
"fundEnvelope": "Fund Envelope",
|
||||
"fundEnvelopeRemaining": "Remaining: {} {}",
|
||||
"fundEnvelopeSplit": "Split: {}",
|
||||
"fundEnvelopeSplitEvenly": "Evenly",
|
||||
"fundEnvelopeSplitRandomly": "Randomly",
|
||||
"fundEnvelopeClaimSuccess": "Fund claimed successfully!",
|
||||
"fundEnvelopeStatusCreated": "Created",
|
||||
"fundEnvelopeStatusPartial": "Partially Claimed",
|
||||
"fundEnvelopeStatusCompleted": "Fully Claimed",
|
||||
"fundEnvelopeStatusExpired": "Expired",
|
||||
"fundEnvelopeStatusUnknown": "Unknown",
|
||||
"fundEnvelopeRecipients": "Recipients ({}/{} claimed)",
|
||||
"fundEnvelopeExpiredDaysAgo": {
|
||||
"one": "Expired {} day ago",
|
||||
"other": "Expired {} days ago"
|
||||
},
|
||||
"fundEnvelopeExpiresSoon": "Expires soon",
|
||||
"fundEnvelopeExpiresInHours": {
|
||||
"one": "Expires in {} hour",
|
||||
"other": "Expires in {} hours"
|
||||
},
|
||||
"fundEnvelopeExpiresInDays": {
|
||||
"one": "Expires in {} day",
|
||||
"other": "Expires in {} days"
|
||||
},
|
||||
"fundEnvelopeRemainingWithSplits": "{} {} / {} splits",
|
||||
"fundEnvelopeUnknownUser": "Unknown User",
|
||||
"deleteSite": "Delete Site",
|
||||
"deleteSiteConfirm": "Are you sure you want to delete this site?",
|
||||
"siteDeletedSuccess": "Site deleted successfully",
|
||||
"siteSlug": "Slug",
|
||||
"siteSlugHint": "my-site",
|
||||
"siteSlugRequired": "Please enter a slug",
|
||||
"siteSlugInvalid": "Slug can only contain lowercase letters, numbers, and dashes",
|
||||
"siteName": "Site Name",
|
||||
"siteNameHint": "My Publication Site",
|
||||
"siteNameRequired": "Please enter a site name",
|
||||
"siteMode": "Mode",
|
||||
"siteModeFullyManaged": "Fully Managed",
|
||||
"siteModeSelfManaged": "Self-Managed",
|
||||
"editPublicationSite": "Edit Publication Site",
|
||||
"deletePublicationSite": "Delete Publication Site",
|
||||
"publicationSiteSavedSuccess": "Publication site saved successfully",
|
||||
"publicationSiteDeleteConfirm": "Are you sure you want to delete this publication site? This action cannot be undone.",
|
||||
"publicationSiteDeletedSuccess": "Publication site deleted successfully",
|
||||
"newPublicationSite": "New Publication Site",
|
||||
"siteDetails": "Site Details",
|
||||
"siteInformation": "Site Information",
|
||||
"siteDomain": "Domain",
|
||||
"siteCreated": "Created",
|
||||
"siteUpdated": "Updated",
|
||||
"failedToLoadSite": "Failed to load site",
|
||||
"sitePages": "Pages",
|
||||
"noPagesYet": "No pages yet",
|
||||
"createFirstPage": "Create your first page to get started",
|
||||
"failedToLoadPages": "Failed to load pages",
|
||||
"fileManagement": "File Management",
|
||||
"siteFiles": "Files",
|
||||
"siteFolder": "Folder",
|
||||
"siteRoot": "Root",
|
||||
"noFilesUploadedYet": "No files uploaded yet",
|
||||
"uploadFirstFile": "Upload your first file to get started",
|
||||
"failedToLoadFiles": "Failed to load files",
|
||||
"noFilesFoundInFolder": "No files found in the selected folder",
|
||||
"fileActions": "File Actions",
|
||||
"purgeFiles": "Purge Files",
|
||||
"purgeFilesDescription": "Remove all uploaded files from the site",
|
||||
"deploySite": "Deploy Site",
|
||||
"deploySiteDescription": "Upload and deploy a new version from ZIP archive",
|
||||
"confirmPurge": "Confirm Purge",
|
||||
"purgeFilesConfirm": "This will permanently delete all files uploaded to this site. This action cannot be undone. Are you sure you want to continue?",
|
||||
"purgeAllFiles": "Purge All Files",
|
||||
"allFilesPurgedSuccess": "All files purged successfully",
|
||||
"failedToPurgeFiles": "Failed to purge files: {}",
|
||||
"siteDeployedSuccess": "Site deployed successfully",
|
||||
"failedToDeploySite": "Failed to deploy site: {}",
|
||||
"createPage": "Create Page",
|
||||
"editPage": "Edit Page",
|
||||
"pageType": "Page Type",
|
||||
"htmlPage": "HTML Page",
|
||||
"redirectPage": "Redirect Page",
|
||||
"pageTypeRequired": "Please select a page type",
|
||||
"pagePath": "Page Path",
|
||||
"pagePathHint": "/about, /contact, etc.",
|
||||
"pagePathRequired": "Please enter a page path",
|
||||
"pagePathInvalid": "Page path can only contain letters, numbers, hyphens, underscores, and slashes",
|
||||
"pagePathMustStartWithSlash": "Page path must start with /",
|
||||
"pagePathNoConsecutiveSlashes": "Page path cannot have consecutive slashes",
|
||||
"pageTitle": "Page Title",
|
||||
"pageTitleHint": "About Us, Contact, etc.",
|
||||
"pageTitleRequired": "Please enter a page title",
|
||||
"pageContentHtml": "Page Content (HTML)",
|
||||
"pageContentHint": "<h1>Hello World</h1><p>This is my page content...</p>",
|
||||
"pageContentRequired": "Please enter HTML content for the page",
|
||||
"redirectTarget": "Redirect Target",
|
||||
"redirectTargetHint": "/new-page, https://example.com, etc.",
|
||||
"redirectTargetRequired": "Please enter a redirect target",
|
||||
"redirectTargetInvalid": "Target must be a relative path (/) or absolute URL (http/https)",
|
||||
"deletePage": "Delete Page",
|
||||
"deletePageConfirm": "Are you sure you want to delete this page?",
|
||||
"savePage": "Save Page",
|
||||
"pageCreatedSuccess": "Page created successfully",
|
||||
"pageUpdatedSuccess": "Page updated successfully",
|
||||
"pageDeletedSuccess": "Page deleted successfully",
|
||||
"uploadFiles": "Upload Files",
|
||||
"uploadPath": "Upload Path",
|
||||
"uploadPathHint": "/ (root) or /assets/images/",
|
||||
"uploadPathRequired": "Please enter an upload path",
|
||||
"uploadPathMustStartWithSlash": "Path must start with /",
|
||||
"uploadPathNoSpaces": "Path cannot contain spaces",
|
||||
"uploadPathNoConsecutiveSlashes": "Path cannot have consecutive slashes",
|
||||
"percentCompleted": "{}% completed",
|
||||
"filesToUpload": "{} files to upload",
|
||||
"fileSizeKb": "Size: {} KB",
|
||||
"uploadingEllipsis": "Uploading...",
|
||||
"uploadFilesCount": {
|
||||
"one": "Upload {} File",
|
||||
"other": "Upload {} Files"
|
||||
},
|
||||
"allUploadsCompleted": "All uploads completed",
|
||||
"someUploadsFailed": "Some uploads failed",
|
||||
"uploadingInProgress": "Uploading in progress",
|
||||
"readyToUpload": "Ready to upload",
|
||||
"allFilesUploadedSuccess": "All files uploaded successfully",
|
||||
"lotteryLastNumberSpecial": "The last selected number will be your special number.",
|
||||
"lotteryMultiplierRequired": "Please enter a multiplier",
|
||||
"lotteryMultiplierRange": "Multiplier must be between 1 and 10",
|
||||
"dropToShare": "Drop to share",
|
||||
"affiliationSpell": "Affiliation Spell",
|
||||
"affiliationSpellHint": "If you have an affiliation spell, enter it here.",
|
||||
"friendsOnline": "Friends Online",
|
||||
"createAccountAlmostThere": "Almost There",
|
||||
"createAccountAlmostThereHint": "You're one step away from joining the Solar Network! Please solve the captcha puzzle shows next.",
|
||||
"createAccountNotice": "Things you need to know before you create an account:",
|
||||
"createAccountConfirmEmail": "After your account being created, you need go to your email inbox to active your account to get permission to use all features.",
|
||||
"createAccountNoAltAccounts": "Multiple or alternative accounts are banned from the Solar Network, that will violates our terms of services.",
|
||||
"createAccountAgreeTerms": "I've read these terms and agree to the terms of service.",
|
||||
"createAccountProfile": "Create your profile",
|
||||
"createAccountToS": "Review Terms & Conditions",
|
||||
"updateYourProfileDescription": "Adjust how you looks on the Solar Network.",
|
||||
"realmsDescription": "Manage realms you've joined.",
|
||||
"exploreDescription": "Explore contents on the Solar Network.",
|
||||
"accountDescription": "Information about your account.",
|
||||
"chatDescription": "Group Chats and Direct Messages",
|
||||
"connectionServerDown": "Unable to Connect",
|
||||
"appSettingsDescription": "Customize your app.",
|
||||
"accountSettingsDescription": "Manage your preferences on the Solar Network.",
|
||||
"walletDescription": "Your source point wallet.",
|
||||
"relationshipsDescription": "Friends and connections.",
|
||||
"notificationsDescription": "See what's happended related to you recently.",
|
||||
"settingsFestivalFeatures": "Festival Limited Features",
|
||||
"categoriesAndTags": "Categories & Tags",
|
||||
"webArticlesStandDescription": "Explore external sites articles.",
|
||||
"aboutDescription": "Learn more about the Solar Network.",
|
||||
"abuseReportsDescription": "View and manage abuse reports.",
|
||||
"stickerMarketplaceDescription": "Browse and add sticker packs from the Solar Network marketplace.",
|
||||
"webFeedsDescription": "Browse and subscribe to web feeds from the Solar Network.",
|
||||
"discoverRealmsDescription": "Discover new realms and join them.",
|
||||
"postShuffleDescription": "Shuffle posts to see the posts randomly.",
|
||||
"levelingDescription": "See your leveling progress and history.",
|
||||
"notableDayToday": "{} is today!",
|
||||
"authSessionLogout": "Logout Session",
|
||||
"authSessionLogoutHint": "Are you sure you want to logout this session? This will terminate this specific login session.",
|
||||
"filesDescription": "Manage your files on the Solar Network Drive.",
|
||||
"postComposeDescription": "Compose a new post",
|
||||
"searchPostsDescription": "Search posts by title, content, or else.",
|
||||
"accountActivationAlert": "Activate your account",
|
||||
"accountActivationAlertHint": "Unactivated account may leads to various of permission issues, activate your account by clicking the link we sent to your email inbox.",
|
||||
"accountActivationResendHint": "Didn't see it? Try click the button below to resend one. If you need to update your email while your account was unactivated, feel free to contact our customer service.",
|
||||
"accountActivationResend": "Resend",
|
||||
"ipAddress": "IP Address",
|
||||
"noFurtherData": "No further data",
|
||||
"searchAnything": "Search Anything...",
|
||||
"tapToViewAllNotifications": "Tap to view all notifications",
|
||||
"mostRecent": "Most Recent",
|
||||
"noNotificationsYet": "No notifications yet",
|
||||
"recentChats": "Recent Chats",
|
||||
"noFeaturedPostsAvailable": "No featured posts available",
|
||||
"searchChatsAndPages": "Search chats and pages...",
|
||||
"dashboard": "Dashboard",
|
||||
"dashboardDescription": "All your data in one place.",
|
||||
"postTagsCategories": "Post Tags and Categories",
|
||||
"postTagsCategoriesDescription": "Browse posts by category and tags.",
|
||||
"debugLogs": "Debug Logs",
|
||||
"debugLogsDescription": "View debug logs for troubleshooting.",
|
||||
"pinChatRoom": "Pin Chat Room",
|
||||
"pinChatRoomDescription": "Pin this chat room to the top.",
|
||||
"chatRoomPinned": "Chat room pinned successfully.",
|
||||
"chatRoomUnpinned": "Chat room unpinned successfully.",
|
||||
"pinnedChatRoom": "Pinned Rooms",
|
||||
"settingsGroupedChatList": "Grouped Chat List",
|
||||
"settingsNotifyWithHaptic": "Notification with Haptic Feedback",
|
||||
"settingsDashSearchEngine": "Search Engine for web",
|
||||
"settingsDashSearchEngineHelper": "Use %s as the placeholder for the query.",
|
||||
"settingsDefaultScreen": "Default Screen",
|
||||
"notableDayChristmas": "Christmas",
|
||||
"notableDayNewYear": "New Year",
|
||||
"noSubscription": "No subscriptions",
|
||||
"embedLinks": {
|
||||
"one": "{} link",
|
||||
"other": "{} links"
|
||||
},
|
||||
"searchFediverse": "Search Fediverse",
|
||||
"searchFediverseHint": "Search by address, e.g. {}",
|
||||
"searchFediverseEmpty": "Search for users on other ActivityPub instances",
|
||||
"searchFediverseNoResults": "No users found for this search",
|
||||
"following": "Following",
|
||||
"followers": "Followers",
|
||||
"follow": "Follow",
|
||||
"unfollow": "Unfollow",
|
||||
"followedUser": "Followed @{}",
|
||||
"unfollowedUser": "Unfollowed @{}",
|
||||
"followingEmpty": "You're not following anyone yet",
|
||||
"followersEmpty": "No followers yet",
|
||||
"followingEmptyHint": "Start by searching for users or explore other instances"
|
||||
}
|
||||
@@ -158,14 +158,12 @@
|
||||
"checkIn": "Check In",
|
||||
"checkInNone": "Not checked-in yet",
|
||||
"checkInNoneHint": "Get your fortune tips and daily rewards by checking in.",
|
||||
"checkInResultLevel0": "Wrost Luck",
|
||||
"checkInResultLevel0": "Worst Luck",
|
||||
"checkInResultLevel1": "Bad Luck",
|
||||
"checkInResultLevel2": "A Normal Day",
|
||||
"checkInResultLevel3": "Good Luck",
|
||||
"checkInResultLevel4": "Best Luck",
|
||||
"checkInActivityTitle": "{} checked in on {} and got a {}",
|
||||
"eventCalander": "Event Calander",
|
||||
"eventCalanderEmpty": "No events on that day.",
|
||||
"fortuneGraph": "Fortune Trend",
|
||||
"noFortuneData": "No fortune data available for this month.",
|
||||
"creatorHub": "Creator Hub",
|
||||
@@ -316,7 +314,6 @@
|
||||
"settingsAutoTranslate": "Auto Translate",
|
||||
"settingsHideBottomNav": "Hide Bottom Navigation",
|
||||
"settingsSoundEffects": "Sound Effects",
|
||||
"settingsAprilFoolFeatures": "April Fool Features",
|
||||
"settingsEnterToSend": "Enter to Send",
|
||||
"settingsTransparentAppBar": "Transparent App Bar",
|
||||
"settingsCustomFonts": "Custom Fonts",
|
||||
@@ -684,9 +681,9 @@
|
||||
"articleAttachmentHint": "Attachments must be uploaded and inserted into the article body to be visible.",
|
||||
"postVisibility": "Post Visibility",
|
||||
"currentMembershipMember": "A member of Stellar Program · {}",
|
||||
"membershipPriceStellar": "1200 NSP per month, level 3+ required",
|
||||
"membershipPriceNova": "2400 NSP per month, level 6+ required",
|
||||
"membershipPriceSupernova": "3600 NSP per month, level 9+ required",
|
||||
"membershipPriceStellar": "1200 NSP per month, level 20+ required",
|
||||
"membershipPriceNova": "2400 NSP per month, level 40+ required",
|
||||
"membershipPriceSupernova": "3600 NSP per month, level 60+ required",
|
||||
"sharePostPhoto": "Share Post as Photo",
|
||||
"wouldYouLikeToNavigateToChat": "Would You like to navigate to the chat?",
|
||||
"abuseReports": "Abuse Reports",
|
||||
@@ -707,7 +704,7 @@
|
||||
"aboutScreenDeveloperSectionTitle": "Developer",
|
||||
"aboutScreenContactUsTitle": "Contact Us",
|
||||
"aboutScreenLicenseTitle": "License",
|
||||
"aboutScreenLicenseContent": "GNU Affero General Public License v3.0",
|
||||
"aboutScreenLicenseContent": "AGPLv3",
|
||||
"aboutScreenCopyright": "All rights reserved © Solsynth {}",
|
||||
"aboutScreenMadeWith": "Made with ❤︎️ by Solar Network Team",
|
||||
"aboutScreenFailedToLoadPackageInfo": "Failed to load package info: {error}",
|
||||
@@ -752,21 +749,6 @@
|
||||
"rename": "Rename",
|
||||
"markAsSensitive": "Mark as Sensitive",
|
||||
"fileName": "File name",
|
||||
"sensitiveCategories": {
|
||||
"language": "Language",
|
||||
"sexualContent": "Sexual Content",
|
||||
"violence": "Violence",
|
||||
"profanity": "Profanity",
|
||||
"hateSpeech": "Hate Speech",
|
||||
"racism": "Racism",
|
||||
"adultContent": "Adult Content",
|
||||
"drugAbuse": "Drug Abuse",
|
||||
"alcoholAbuse": "Alcohol Abuse",
|
||||
"gambling": "Gambling",
|
||||
"selfHarm": "Self-harm",
|
||||
"childAbuse": "Child Abuse",
|
||||
"other": "Other"
|
||||
},
|
||||
"poll": "Poll",
|
||||
"pollsRecent": "Recent Polls",
|
||||
"pollCreateNew": "Create New",
|
||||
@@ -1075,5 +1057,490 @@
|
||||
"deleteRecycledFiles": "Delete Recycled Files",
|
||||
"recycledFilesDeleted": "Recycled files deleted successfully",
|
||||
"failedToDeleteRecycledFiles": "Failed to delete recycled files",
|
||||
"upload": "Upload"
|
||||
"upload": "Upload",
|
||||
"deleteMessage": "Delete Message",
|
||||
"deleteMessageConfirmation": "Are you sure you want to delete this message?",
|
||||
"customReaction": "Custom Reaction",
|
||||
"customReactions": "Custom Reactions",
|
||||
"stickerPlaceholder": "Sticker Placeholder",
|
||||
"reactionAttitude": "Reaction Attitude",
|
||||
"addReaction": "Add Reaction",
|
||||
"eventCalendar": "Event Calendar",
|
||||
"eventCalendarEmpty": "No events on that day.",
|
||||
"walletStats": "Wallet Statistics",
|
||||
"totalTransactions": "Total Transactions",
|
||||
"totalOrders": "Total Orders",
|
||||
"totalIncome": "Total Income",
|
||||
"totalOutgoing": "Total Outgoing",
|
||||
"netBalance": "Net Balance",
|
||||
"messageUpdateLinks": "Server generated links previews",
|
||||
"messageUpdateEdited": "Edited a message",
|
||||
"settingsCardBackgroundOpacity": "Card Background Opacity",
|
||||
"settingsThemeMode": "Theme Mode",
|
||||
"settingsThemeModeSystem": "System",
|
||||
"settingsThemeModeLight": "Light",
|
||||
"settingsThemeModeDark": "Dark",
|
||||
"enterPin": "Enter your PIN code",
|
||||
"chatReplyingTo": "Replying to {}",
|
||||
"chatForwarding": "Forwarding message",
|
||||
"chatEditing": "Editing message",
|
||||
"chatNoContent": "No content",
|
||||
"sensitiveCategories": {
|
||||
"language": "Language",
|
||||
"sexualContent": "Sexual Content",
|
||||
"violence": "Violence",
|
||||
"profanity": "Profanity",
|
||||
"hateSpeech": "Hate Speech",
|
||||
"racism": "Racism",
|
||||
"adultContent": "Adult Content",
|
||||
"drugAbuse": "Drug Abuse",
|
||||
"alcoholAbuse": "Alcohol Abuse",
|
||||
"gambling": "Gambling",
|
||||
"selfHarm": "Self-harm",
|
||||
"childAbuse": "Child Abuse",
|
||||
"other": "Other"
|
||||
},
|
||||
"Searching...": "Searching...",
|
||||
"searchError": "Search failed. Please try again.",
|
||||
"tryDifferentKeywords": "Try different keywords or remove search filters",
|
||||
"settingsWindowOpacity": "Window Opacity",
|
||||
"messageContent": "Message Content",
|
||||
"updateAvailable": "Update available",
|
||||
"noChangelogProvided": "No changelog provided.",
|
||||
"useSecondarySourceForDownload": "Use secondary source for download",
|
||||
"installUpdate": "Install update",
|
||||
"openReleasePage": "Open release page",
|
||||
"postCompose": "Compose Post",
|
||||
"postPublish": "Publish Post",
|
||||
"restoreDraftTitle": "Restore Draft",
|
||||
"restoreDraftMessage": "A draft was found. Do you want to restore it?",
|
||||
"draft": "Draft",
|
||||
"purchaseGift": "Purchase Gift",
|
||||
"selectRecipient": "Select Recipient",
|
||||
"changeRecipient": "Change Recipient",
|
||||
"addMessage": "Add Message",
|
||||
"skipRecipient": "Skip Recipient",
|
||||
"giftSubscriptions": "Gift Subscriptions",
|
||||
"purchaseAGift": "Purchase a Gift",
|
||||
"redeemAGift": "Redeem a Gift",
|
||||
"giftHistory": "Gift History",
|
||||
"sentGifts": "Sent Gifts",
|
||||
"receivedGifts": "Received Gifts",
|
||||
"noSentGifts": "No sent gifts",
|
||||
"noReceivedGifts": "No received gifts",
|
||||
"stellarGift": "Stellar Gift",
|
||||
"novaGift": "Nova Gift",
|
||||
"supernovaGift": "Supernova Gift",
|
||||
"sameAsMembership": "Same as membership",
|
||||
"enterGiftCodeToRedeem": "Enter gift code to redeem",
|
||||
"enterGiftCode": "Enter gift code",
|
||||
"giftPurchased": "Gift Purchased!",
|
||||
"shareCodeWithRecipient": "Share this code with the recipient to redeem the gift.",
|
||||
"openGiftAnyoneCanRedeem": "This is an open gift that anyone can redeem.",
|
||||
"ok": "OK",
|
||||
"selectedRecipient": "Selected recipient",
|
||||
"noRecipientSelected": "No recipient selected",
|
||||
"thisWillBeAnOpenGift": "This will be an open gift",
|
||||
"personalMessage": "Personal Message",
|
||||
"addPersonalMessageForRecipient": "Add a personal message for the recipient",
|
||||
"giftStatusCreated": "Created",
|
||||
"giftStatusSent": "Sent",
|
||||
"giftStatusRedeemed": "Redeemed",
|
||||
"giftStatusCancelled": "Cancelled",
|
||||
"giftStatusExpired": "Expired",
|
||||
"giftStatusUnknown": "Unknown",
|
||||
"giftCodeCopiedToClipboard": "Gift code copied to clipboard",
|
||||
"codeLabel": "Code: ",
|
||||
"subscriptionLabel": "Subscription: ",
|
||||
"toLabel": "To: ",
|
||||
"fromLabel": "From: ",
|
||||
"messageLabel": "Message: ",
|
||||
"giftRedeemed": "Gift Redeemed!",
|
||||
"giftRedeemedSuccessfully": "You have successfully redeemed the gift. Your new subscription is now active.",
|
||||
"cancelGift": "Cancel Gift",
|
||||
"cancelGiftConfirm": "Are you sure you want to cancel this gift? This action cannot be undone.",
|
||||
"giftCancelledSuccessfully": "Gift cancelled successfully",
|
||||
"createFund": "Create Fund",
|
||||
"fundAmount": "Fund Amount",
|
||||
"enterAmount": "Enter Amount",
|
||||
"selectCurrency": "Select Currency",
|
||||
"splitType": "Split Type",
|
||||
"evenSplit": "Even Split",
|
||||
"equalAmountEach": "Equal amount for each recipient",
|
||||
"randomSplit": "Random Split",
|
||||
"randomAmountEach": "Random amount for each recipient",
|
||||
"recipientCount": "Recipient Count",
|
||||
"numberOfRecipients": "Number of Recipients",
|
||||
"addPersonalMessageForRecipients": "Add a personal message for recipients",
|
||||
"invalidAmount": "Invalid amount",
|
||||
"invalidRecipientCount": "Invalid recipient count",
|
||||
"fundOverview": "Fund Overview",
|
||||
"totalFundsSent": "Total Funds Sent",
|
||||
"totalFundsReceived": "Total Funds Received",
|
||||
"transactions": "Transactions",
|
||||
"myFunds": "My Funds",
|
||||
"availableFunds": "Available Funds",
|
||||
"fundStatusCreated": "Created",
|
||||
"fundStatusPartial": "Partially Claimed",
|
||||
"fundStatusCompleted": "Fully Claimed",
|
||||
"fundStatusExpired": "Expired",
|
||||
"fundStatusUnknown": "Unknown",
|
||||
"recipients": "Recipients",
|
||||
"fundClaimedSuccessfully": "Fund claimed successfully!",
|
||||
"claim": "Claim",
|
||||
"noFundsCreated": "No funds created yet",
|
||||
"createYourFirstFund": "Create your first fund to get started",
|
||||
"noAvailableFunds": "No available funds",
|
||||
"fundsWillAppearHere": "Funds you can claim will appear here",
|
||||
"fundCreatedSuccessfully": "Fund created successfully!",
|
||||
"selectRecipients": "Select Recipients",
|
||||
"noRecipientsSelected": "No recipients selected",
|
||||
"selectRecipientsToSendFund": "Select recipients to send the fund to",
|
||||
"addRecipient": "Add Recipient",
|
||||
"addMoreRecipients": "Add More Recipients",
|
||||
"transactionDetails": "Transaction Details",
|
||||
"remarks": "Remarks",
|
||||
"payer": "Payer",
|
||||
"payee": "Payee",
|
||||
"transactionType": "Transaction Type",
|
||||
"transfer": "Transfer",
|
||||
"payment": "Payment",
|
||||
"systemWallet": "System Wallet",
|
||||
"date": "Date",
|
||||
"createTransfer": "Create Transfer",
|
||||
"transferAmount": "Transfer Amount",
|
||||
"selectPayee": "Select Payee",
|
||||
"selectedPayee": "Selected Payee",
|
||||
"noPayeeSelected": "No payee selected",
|
||||
"selectPayeeToTransfer": "Select payee to transfer to",
|
||||
"addRemark": "Add Remark",
|
||||
"transferRemark": "Transfer Remark",
|
||||
"addRemarkForTransfer": "Add remark for transfer",
|
||||
"enterPinToConfirmTransfer": "Enter your 6-digit PIN to confirm transfer",
|
||||
"transferCreatedSuccessfully": "Transfer created successfully!",
|
||||
"postUpdate": "Update",
|
||||
"fileMetadata": "File Metadata",
|
||||
"resend": "Resend",
|
||||
"fileInfoTitle": "File Information",
|
||||
"download": "Download",
|
||||
"info": "Info",
|
||||
"noStickers": "No Stickers",
|
||||
"noStickersInPack": "This pack does not contains stickers",
|
||||
"noStickerPacks": "No Sticker Packs",
|
||||
"refresh": "Refresh",
|
||||
"spoiler": "Spoiler",
|
||||
"activityHeatmap": "Activity Heatmap",
|
||||
"custom": "Custom",
|
||||
"usernameColor": "Username Color",
|
||||
"colorType": "Color Type",
|
||||
"plain": "Plain",
|
||||
"gradient": "Gradient",
|
||||
"colorValue": "Color Value",
|
||||
"gradientDirection": "Gradient Direction",
|
||||
"gradientDirectionToRight": "To Right",
|
||||
"gradientDirectionToLeft": "To Left",
|
||||
"gradientDirectionToBottom": "To Bottom",
|
||||
"gradientDirectionToTop": "To Top",
|
||||
"gradientDirectionToBottomRight": "To Bottom Right",
|
||||
"gradientDirectionToBottomLeft": "To Bottom Left",
|
||||
"gradientDirectionToTopRight": "To Top Right",
|
||||
"gradientDirectionToTopLeft": "To Top Left",
|
||||
"gradientColors": "Gradient Colors",
|
||||
"color": "Color",
|
||||
"addColor": "Add Color",
|
||||
"availableWithYourPlan": "Available with your plan",
|
||||
"upgradeRequired": "Upgrade required",
|
||||
"settingsDisableAnimation": "Disable Animation",
|
||||
"addTag": "Add Tag",
|
||||
"accountConnectionProviderSpotify": "Spotify",
|
||||
"accountConnectionProviderSteam": "Steam",
|
||||
"timezoneNotFound": "Time zone not found",
|
||||
"awardPoints": "Awarded {} points",
|
||||
"postFeaturedOn": "Post featured on {}",
|
||||
"messageSentAt": "Sent at {}",
|
||||
"myTickets": "My Tickets",
|
||||
"drawHistory": "Draw History",
|
||||
"lottery": "Lottery",
|
||||
"noLotteryTickets": "No lottery tickets yet",
|
||||
"buyYourFirstTicket": "Buy your first lottery ticket to get started!",
|
||||
"buyTicket": "Buy Ticket",
|
||||
"ticketNumbers": "Numbers: {}, Special: {}",
|
||||
"cost": "Cost",
|
||||
"multiplier": "Multiplier",
|
||||
"prizeWon": "Prize Won",
|
||||
"pending": "Pending",
|
||||
"drawn": "Drawn",
|
||||
"won": "Won",
|
||||
"lost": "Lost",
|
||||
"noDrawHistory": "No draw history yet",
|
||||
"buyLotteryTicket": "Buy Lottery Ticket",
|
||||
"selectNumbers": "Select Numbers",
|
||||
"select5UniqueNumbers": "Select 5 unique numbers",
|
||||
"selectSpecialNumber": "Select Special Number",
|
||||
"selectMultiplier": "Select Multiplier",
|
||||
"baseCost": "Base Cost",
|
||||
"totalCost": "Total Cost",
|
||||
"prizeStructure": "Prize Structure",
|
||||
"enterPinToConfirmPurchase": "Enter your PIN to confirm purchase",
|
||||
"ticketPurchasedSuccessfully": "Ticket purchased successfully!",
|
||||
"winningNumbers": "Winning Numbers",
|
||||
"specialNumber": "Special Number",
|
||||
"totalTickets": "Total Tickets",
|
||||
"totalWinners": "Total Winners",
|
||||
"prizePool": "Prize Pool",
|
||||
"enterPinToConfirmPayment": "Enter your PIN code to confirm payment",
|
||||
"purchase": "Purchase",
|
||||
"multiplierLabel": "Multiplier",
|
||||
"specialOnly": "Special Only",
|
||||
"matches": "Matches",
|
||||
"thoughtDefaultTopic": "Reflection",
|
||||
"thoughtAiName": "SN-chan",
|
||||
"thoughtUserName": "You",
|
||||
"thoughtStreamingHint": "Sn-chan is thinking...",
|
||||
"thoughtInputHint": "Ask sn-chan anything...",
|
||||
"thoughtNewConversation": "Start New Conversation",
|
||||
"thoughtParseError": "Failed to parse AI response",
|
||||
"thoughtFunctionCall": "Use {}",
|
||||
"aiThought": "AI Thought",
|
||||
"aiThoughtTitle": "Let sn-chan think",
|
||||
"postReferenceUnavailable": "Referenced post is unavailable",
|
||||
"fabLocation": "FAB Location",
|
||||
"activities": "Activities",
|
||||
"presenceTypeGaming": "Playing",
|
||||
"presenceTypeMusic": "Listening to Music",
|
||||
"presenceTypeWorkout": "Working out",
|
||||
"articleCompose": "Compose Article",
|
||||
"backToHub": "Back to Hub",
|
||||
"advancedFilters": "Advanced Filters",
|
||||
"searchPosts": "Search Posts",
|
||||
"sortBy": "Sort by",
|
||||
"fromDate": "From Date",
|
||||
"toDate": "To Date",
|
||||
"popularity": "Popularity",
|
||||
"descendingOrder": "Descending Order",
|
||||
"selectDate": "Select Date",
|
||||
"pinnedPosts": "Pinned Posts",
|
||||
"customReactionHint": "Custom Reaction allow you to use user uploaded stickers as the symbol of the reaction for the post. Exclusive for Stellar Program members.",
|
||||
"publicationSites": "Publication Sites",
|
||||
"uploadTasks": "Upload Tasks",
|
||||
"thoughtFunctionCallBegin": "Calling tool {}",
|
||||
"thoughtFunctionCallFinish": "{} responded",
|
||||
"thoughtUnpaidHint": "Thinking unavaiable due to unpaid orders",
|
||||
"more": "More",
|
||||
"collapse": "Collapse",
|
||||
"pollConfirmDiscard": "Are you sure you want to leave? All the poll data you're editing will not be saved.",
|
||||
"discard": "Discard",
|
||||
"fund": "Fund",
|
||||
"fundsRecent": "Recent Funds",
|
||||
"fundCreateNew": "Create New",
|
||||
"fundCreateNewHint": "Create a new fund for your message. Select recipients and amount.",
|
||||
"amountOfSplits": "Amount of Splits",
|
||||
"enterNumberOfSplits": "Enter Splits Amount",
|
||||
"orCreateWith": "Or\ncreate with",
|
||||
"unindexedFiles": "Unindexed files",
|
||||
"folder": "Folder",
|
||||
"clearCompleted": "Clear Completed",
|
||||
"uploadSuccess": "Upload successful!",
|
||||
"wouldYouLikeToViewFile": "Would you like to view the file?",
|
||||
"contentCantEmpty": "Content cannot be empty",
|
||||
"features": "Features",
|
||||
"unnamed": "Unnamed",
|
||||
"fundEnvelopeLoadFailed": "Failed to load fund envelope",
|
||||
"fundEnvelope": "Fund Envelope",
|
||||
"fundEnvelopeRemaining": "Remaining: {} {}",
|
||||
"fundEnvelopeSplit": "Split: {}",
|
||||
"fundEnvelopeSplitEvenly": "Evenly",
|
||||
"fundEnvelopeSplitRandomly": "Randomly",
|
||||
"fundEnvelopeClaimSuccess": "Fund claimed successfully!",
|
||||
"fundEnvelopeStatusCreated": "Created",
|
||||
"fundEnvelopeStatusPartial": "Partially Claimed",
|
||||
"fundEnvelopeStatusCompleted": "Fully Claimed",
|
||||
"fundEnvelopeStatusExpired": "Expired",
|
||||
"fundEnvelopeStatusUnknown": "Unknown",
|
||||
"fundEnvelopeRecipients": "Recipients ({}/{} claimed)",
|
||||
"fundEnvelopeExpiredDaysAgo": {
|
||||
"one": "Expired {} day ago",
|
||||
"other": "Expired {} days ago"
|
||||
},
|
||||
"fundEnvelopeExpiresSoon": "Expires soon",
|
||||
"fundEnvelopeExpiresInHours": {
|
||||
"one": "Expires in {} hour",
|
||||
"other": "Expires in {} hours"
|
||||
},
|
||||
"fundEnvelopeExpiresInDays": {
|
||||
"one": "Expires in {} day",
|
||||
"other": "Expires in {} days"
|
||||
},
|
||||
"fundEnvelopeRemainingWithSplits": "{} {} / {} splits",
|
||||
"fundEnvelopeUnknownUser": "Unknown User",
|
||||
"deleteSite": "Delete Site",
|
||||
"deleteSiteConfirm": "Are you sure you want to delete this site?",
|
||||
"siteDeletedSuccess": "Site deleted successfully",
|
||||
"siteSlug": "Slug",
|
||||
"siteSlugHint": "my-site",
|
||||
"siteSlugRequired": "Please enter a slug",
|
||||
"siteSlugInvalid": "Slug can only contain lowercase letters, numbers, and dashes",
|
||||
"siteName": "Site Name",
|
||||
"siteNameHint": "My Publication Site",
|
||||
"siteNameRequired": "Please enter a site name",
|
||||
"siteMode": "Mode",
|
||||
"siteModeFullyManaged": "Fully Managed",
|
||||
"siteModeSelfManaged": "Self-Managed",
|
||||
"editPublicationSite": "Edit Publication Site",
|
||||
"deletePublicationSite": "Delete Publication Site",
|
||||
"publicationSiteSavedSuccess": "Publication site saved successfully",
|
||||
"publicationSiteDeleteConfirm": "Are you sure you want to delete this publication site? This action cannot be undone.",
|
||||
"publicationSiteDeletedSuccess": "Publication site deleted successfully",
|
||||
"newPublicationSite": "New Publication Site",
|
||||
"siteDetails": "Site Details",
|
||||
"siteInformation": "Site Information",
|
||||
"siteDomain": "Domain",
|
||||
"siteCreated": "Created",
|
||||
"siteUpdated": "Updated",
|
||||
"failedToLoadSite": "Failed to load site",
|
||||
"sitePages": "Pages",
|
||||
"noPagesYet": "No pages yet",
|
||||
"createFirstPage": "Create your first page to get started",
|
||||
"failedToLoadPages": "Failed to load pages",
|
||||
"fileManagement": "File Management",
|
||||
"siteFiles": "Files",
|
||||
"siteFolder": "Folder",
|
||||
"siteRoot": "Root",
|
||||
"noFilesUploadedYet": "No files uploaded yet",
|
||||
"uploadFirstFile": "Upload your first file to get started",
|
||||
"failedToLoadFiles": "Failed to load files",
|
||||
"noFilesFoundInFolder": "No files found in the selected folder",
|
||||
"fileActions": "File Actions",
|
||||
"purgeFiles": "Purge Files",
|
||||
"purgeFilesDescription": "Remove all uploaded files from the site",
|
||||
"deploySite": "Deploy Site",
|
||||
"deploySiteDescription": "Upload and deploy a new version from ZIP archive",
|
||||
"confirmPurge": "Confirm Purge",
|
||||
"purgeFilesConfirm": "This will permanently delete all files uploaded to this site. This action cannot be undone. Are you sure you want to continue?",
|
||||
"purgeAllFiles": "Purge All Files",
|
||||
"allFilesPurgedSuccess": "All files purged successfully",
|
||||
"failedToPurgeFiles": "Failed to purge files: {}",
|
||||
"siteDeployedSuccess": "Site deployed successfully",
|
||||
"failedToDeploySite": "Failed to deploy site: {}",
|
||||
"createPage": "Create Page",
|
||||
"editPage": "Edit Page",
|
||||
"pageType": "Page Type",
|
||||
"htmlPage": "HTML Page",
|
||||
"redirectPage": "Redirect Page",
|
||||
"pageTypeRequired": "Please select a page type",
|
||||
"pagePath": "Page Path",
|
||||
"pagePathHint": "/about, /contact, etc.",
|
||||
"pagePathRequired": "Please enter a page path",
|
||||
"pagePathInvalid": "Page path can only contain letters, numbers, hyphens, underscores, and slashes",
|
||||
"pagePathMustStartWithSlash": "Page path must start with /",
|
||||
"pagePathNoConsecutiveSlashes": "Page path cannot have consecutive slashes",
|
||||
"pageTitle": "Page Title",
|
||||
"pageTitleHint": "About Us, Contact, etc.",
|
||||
"pageTitleRequired": "Please enter a page title",
|
||||
"pageContentHtml": "Page Content (HTML)",
|
||||
"pageContentHint": "<h1>Hello World</h1><p>This is my page content...</p>",
|
||||
"pageContentRequired": "Please enter HTML content for the page",
|
||||
"redirectTarget": "Redirect Target",
|
||||
"redirectTargetHint": "/new-page, https://example.com, etc.",
|
||||
"redirectTargetRequired": "Please enter a redirect target",
|
||||
"redirectTargetInvalid": "Target must be a relative path (/) or absolute URL (http/https)",
|
||||
"deletePage": "Delete Page",
|
||||
"deletePageConfirm": "Are you sure you want to delete this page?",
|
||||
"savePage": "Save Page",
|
||||
"pageCreatedSuccess": "Page created successfully",
|
||||
"pageUpdatedSuccess": "Page updated successfully",
|
||||
"pageDeletedSuccess": "Page deleted successfully",
|
||||
"uploadFiles": "Upload Files",
|
||||
"uploadPath": "Upload Path",
|
||||
"uploadPathHint": "/ (root) or /assets/images/",
|
||||
"uploadPathRequired": "Please enter an upload path",
|
||||
"uploadPathMustStartWithSlash": "Path must start with /",
|
||||
"uploadPathNoSpaces": "Path cannot contain spaces",
|
||||
"uploadPathNoConsecutiveSlashes": "Path cannot have consecutive slashes",
|
||||
"percentCompleted": "{}% completed",
|
||||
"filesToUpload": "{} files to upload",
|
||||
"fileSizeKb": "Size: {} KB",
|
||||
"uploadingEllipsis": "Uploading...",
|
||||
"uploadFilesCount": {
|
||||
"one": "Upload {} File",
|
||||
"other": "Upload {} Files"
|
||||
},
|
||||
"allUploadsCompleted": "All uploads completed",
|
||||
"someUploadsFailed": "Some uploads failed",
|
||||
"uploadingInProgress": "Uploading in progress",
|
||||
"readyToUpload": "Ready to upload",
|
||||
"allFilesUploadedSuccess": "All files uploaded successfully",
|
||||
"lotteryLastNumberSpecial": "The last selected number will be your special number.",
|
||||
"lotteryMultiplierRequired": "Please enter a multiplier",
|
||||
"lotteryMultiplierRange": "Multiplier must be between 1 and 10",
|
||||
"dropToShare": "Drop to share",
|
||||
"affiliationSpell": "Affiliation Spell",
|
||||
"affiliationSpellHint": "If you have an affiliation spell, enter it here.",
|
||||
"friendsOnline": "Friends Online",
|
||||
"createAccountAlmostThere": "Almost There",
|
||||
"createAccountAlmostThereHint": "You're one step away from joining the Solar Network! Please solve the captcha puzzle shows next.",
|
||||
"createAccountNotice": "Things you need to know before you create an account:",
|
||||
"createAccountConfirmEmail": "After your account being created, you need go to your email inbox to active your account to get permission to use all features.",
|
||||
"createAccountNoAltAccounts": "Multiple or alternative accounts are banned from the Solar Network, that will violates our terms of services.",
|
||||
"createAccountAgreeTerms": "I've read these terms and agree to the terms of service.",
|
||||
"createAccountProfile": "Create your profile",
|
||||
"createAccountToS": "Review Terms & Conditions",
|
||||
"updateYourProfileDescription": "Adjust how you looks on the Solar Network.",
|
||||
"realmsDescription": "Manage realms you've joined.",
|
||||
"exploreDescription": "Explore contents on the Solar Network.",
|
||||
"accountDescription": "Information about your account.",
|
||||
"chatDescription": "Group Chats and Direct Messages",
|
||||
"connectionServerDown": "Unable to Connect",
|
||||
"appSettingsDescription": "Customize your app.",
|
||||
"accountSettingsDescription": "Manage your preferences on the Solar Network.",
|
||||
"walletDescription": "Your source point wallet.",
|
||||
"relationshipsDescription": "Friends and connections.",
|
||||
"notificationsDescription": "See what's happended related to you recently.",
|
||||
"settingsFestivalFeatures": "Festival Limited Features",
|
||||
"categoriesAndTags": "Categories & Tags",
|
||||
"webArticlesStandDescription": "Explore external sites articles.",
|
||||
"aboutDescription": "Learn more about the Solar Network.",
|
||||
"abuseReportsDescription": "View and manage abuse reports.",
|
||||
"stickerMarketplaceDescription": "Browse and add sticker packs from the Solar Network marketplace.",
|
||||
"webFeedsDescription": "Browse and subscribe to web feeds from the Solar Network.",
|
||||
"discoverRealmsDescription": "Discover new realms and join them.",
|
||||
"postShuffleDescription": "Shuffle posts to see the posts randomly.",
|
||||
"levelingDescription": "See your leveling progress and history.",
|
||||
"notableDayToday": "{} is today!",
|
||||
"authSessionLogout": "Logout Session",
|
||||
"authSessionLogoutHint": "Are you sure you want to logout this session? This will terminate this specific login session.",
|
||||
"filesDescription": "Manage your files on the Solar Network Drive.",
|
||||
"postComposeDescription": "Compose a new post",
|
||||
"searchPostsDescription": "Search posts by title, content, or else.",
|
||||
"accountActivationAlert": "Activate your account",
|
||||
"accountActivationAlertHint": "Unactivated account may leads to various of permission issues, activate your account by clicking the link we sent to your email inbox.",
|
||||
"accountActivationResendHint": "Didn't see it? Try click the button below to resend one. If you need to update your email while your account was unactivated, feel free to contact our customer service.",
|
||||
"accountActivationResend": "Resend",
|
||||
"ipAddress": "IP Address",
|
||||
"noFurtherData": "No further data",
|
||||
"searchAnything": "Search Anything...",
|
||||
"tapToViewAllNotifications": "Tap to view all notifications",
|
||||
"mostRecent": "Most Recent",
|
||||
"noNotificationsYet": "No notifications yet",
|
||||
"recentChats": "Recent Chats",
|
||||
"noFeaturedPostsAvailable": "No featured posts available",
|
||||
"searchChatsAndPages": "Search chats and pages...",
|
||||
"dashboard": "Dashboard",
|
||||
"dashboardDescription": "All your data in one place.",
|
||||
"postTagsCategories": "Post Tags and Categories",
|
||||
"postTagsCategoriesDescription": "Browse posts by category and tags.",
|
||||
"debugLogs": "Debug Logs",
|
||||
"debugLogsDescription": "View debug logs for troubleshooting.",
|
||||
"pinChatRoom": "Pin Chat Room",
|
||||
"pinChatRoomDescription": "Pin this chat room to the top.",
|
||||
"chatRoomPinned": "Chat room pinned successfully.",
|
||||
"chatRoomUnpinned": "Chat room unpinned successfully.",
|
||||
"pinnedChatRoom": "Pinned Rooms",
|
||||
"settingsGroupedChatList": "Grouped Chat List",
|
||||
"settingsNotifyWithHaptic": "Notification with Haptic Feedback",
|
||||
"settingsDashSearchEngine": "Search Engine for web",
|
||||
"settingsDashSearchEngineHelper": "Use %s as the placeholder for the query.",
|
||||
"settingsDefaultScreen": "Default Screen",
|
||||
"notableDayChristmas": "Christmas",
|
||||
"notableDayNewYear": "New Year"
|
||||
}
|
||||
@@ -158,14 +158,12 @@
|
||||
"checkIn": "Check In",
|
||||
"checkInNone": "Not checked-in yet",
|
||||
"checkInNoneHint": "Get your fortune tips and daily rewards by checking in.",
|
||||
"checkInResultLevel0": "Wrost Luck",
|
||||
"checkInResultLevel0": "Worst Luck",
|
||||
"checkInResultLevel1": "Bad Luck",
|
||||
"checkInResultLevel2": "A Normal Day",
|
||||
"checkInResultLevel3": "Good Luck",
|
||||
"checkInResultLevel4": "Best Luck",
|
||||
"checkInActivityTitle": "{} checked in on {} and got a {}",
|
||||
"eventCalander": "Event Calander",
|
||||
"eventCalanderEmpty": "No events on that day.",
|
||||
"fortuneGraph": "Fortune Trend",
|
||||
"noFortuneData": "No fortune data available for this month.",
|
||||
"creatorHub": "Creator Hub",
|
||||
@@ -316,7 +314,6 @@
|
||||
"settingsAutoTranslate": "Auto Translate",
|
||||
"settingsHideBottomNav": "Hide Bottom Navigation",
|
||||
"settingsSoundEffects": "Sound Effects",
|
||||
"settingsAprilFoolFeatures": "April Fool Features",
|
||||
"settingsEnterToSend": "Enter to Send",
|
||||
"settingsTransparentAppBar": "Transparent App Bar",
|
||||
"settingsCustomFonts": "Custom Fonts",
|
||||
@@ -684,9 +681,9 @@
|
||||
"articleAttachmentHint": "Attachments must be uploaded and inserted into the article body to be visible.",
|
||||
"postVisibility": "Post Visibility",
|
||||
"currentMembershipMember": "A member of Stellar Program · {}",
|
||||
"membershipPriceStellar": "1200 NSP per month, level 3+ required",
|
||||
"membershipPriceNova": "2400 NSP per month, level 6+ required",
|
||||
"membershipPriceSupernova": "3600 NSP per month, level 9+ required",
|
||||
"membershipPriceStellar": "1200 NSP per month, level 20+ required",
|
||||
"membershipPriceNova": "2400 NSP per month, level 40+ required",
|
||||
"membershipPriceSupernova": "3600 NSP per month, level 60+ required",
|
||||
"sharePostPhoto": "Share Post as Photo",
|
||||
"wouldYouLikeToNavigateToChat": "Would You like to navigate to the chat?",
|
||||
"abuseReports": "Abuse Reports",
|
||||
@@ -707,7 +704,7 @@
|
||||
"aboutScreenDeveloperSectionTitle": "Developer",
|
||||
"aboutScreenContactUsTitle": "Contact Us",
|
||||
"aboutScreenLicenseTitle": "License",
|
||||
"aboutScreenLicenseContent": "GNU Affero General Public License v3.0",
|
||||
"aboutScreenLicenseContent": "AGPLv3",
|
||||
"aboutScreenCopyright": "All rights reserved © Solsynth {}",
|
||||
"aboutScreenMadeWith": "Made with ❤︎️ by Solar Network Team",
|
||||
"aboutScreenFailedToLoadPackageInfo": "Failed to load package info: {error}",
|
||||
@@ -752,21 +749,6 @@
|
||||
"rename": "Rename",
|
||||
"markAsSensitive": "Mark as Sensitive",
|
||||
"fileName": "File name",
|
||||
"sensitiveCategories": {
|
||||
"language": "Language",
|
||||
"sexualContent": "Sexual Content",
|
||||
"violence": "Violence",
|
||||
"profanity": "Profanity",
|
||||
"hateSpeech": "Hate Speech",
|
||||
"racism": "Racism",
|
||||
"adultContent": "Adult Content",
|
||||
"drugAbuse": "Drug Abuse",
|
||||
"alcoholAbuse": "Alcohol Abuse",
|
||||
"gambling": "Gambling",
|
||||
"selfHarm": "Self-harm",
|
||||
"childAbuse": "Child Abuse",
|
||||
"other": "Other"
|
||||
},
|
||||
"poll": "Poll",
|
||||
"pollsRecent": "Recent Polls",
|
||||
"pollCreateNew": "Create New",
|
||||
@@ -1075,5 +1057,490 @@
|
||||
"deleteRecycledFiles": "Delete Recycled Files",
|
||||
"recycledFilesDeleted": "Recycled files deleted successfully",
|
||||
"failedToDeleteRecycledFiles": "Failed to delete recycled files",
|
||||
"upload": "Upload"
|
||||
"upload": "Upload",
|
||||
"deleteMessage": "Delete Message",
|
||||
"deleteMessageConfirmation": "Are you sure you want to delete this message?",
|
||||
"customReaction": "Custom Reaction",
|
||||
"customReactions": "Custom Reactions",
|
||||
"stickerPlaceholder": "Sticker Placeholder",
|
||||
"reactionAttitude": "Reaction Attitude",
|
||||
"addReaction": "Add Reaction",
|
||||
"eventCalendar": "Event Calendar",
|
||||
"eventCalendarEmpty": "No events on that day.",
|
||||
"walletStats": "Wallet Statistics",
|
||||
"totalTransactions": "Total Transactions",
|
||||
"totalOrders": "Total Orders",
|
||||
"totalIncome": "Total Income",
|
||||
"totalOutgoing": "Total Outgoing",
|
||||
"netBalance": "Net Balance",
|
||||
"messageUpdateLinks": "Server generated links previews",
|
||||
"messageUpdateEdited": "Edited a message",
|
||||
"settingsCardBackgroundOpacity": "Card Background Opacity",
|
||||
"settingsThemeMode": "Theme Mode",
|
||||
"settingsThemeModeSystem": "System",
|
||||
"settingsThemeModeLight": "Light",
|
||||
"settingsThemeModeDark": "Dark",
|
||||
"enterPin": "Enter your PIN code",
|
||||
"chatReplyingTo": "Replying to {}",
|
||||
"chatForwarding": "Forwarding message",
|
||||
"chatEditing": "Editing message",
|
||||
"chatNoContent": "No content",
|
||||
"sensitiveCategories": {
|
||||
"language": "Language",
|
||||
"sexualContent": "Sexual Content",
|
||||
"violence": "Violence",
|
||||
"profanity": "Profanity",
|
||||
"hateSpeech": "Hate Speech",
|
||||
"racism": "Racism",
|
||||
"adultContent": "Adult Content",
|
||||
"drugAbuse": "Drug Abuse",
|
||||
"alcoholAbuse": "Alcohol Abuse",
|
||||
"gambling": "Gambling",
|
||||
"selfHarm": "Self-harm",
|
||||
"childAbuse": "Child Abuse",
|
||||
"other": "Other"
|
||||
},
|
||||
"Searching...": "Searching...",
|
||||
"searchError": "Search failed. Please try again.",
|
||||
"tryDifferentKeywords": "Try different keywords or remove search filters",
|
||||
"settingsWindowOpacity": "Window Opacity",
|
||||
"messageContent": "Message Content",
|
||||
"updateAvailable": "Update available",
|
||||
"noChangelogProvided": "No changelog provided.",
|
||||
"useSecondarySourceForDownload": "Use secondary source for download",
|
||||
"installUpdate": "Install update",
|
||||
"openReleasePage": "Open release page",
|
||||
"postCompose": "Compose Post",
|
||||
"postPublish": "Publish Post",
|
||||
"restoreDraftTitle": "Restore Draft",
|
||||
"restoreDraftMessage": "A draft was found. Do you want to restore it?",
|
||||
"draft": "Draft",
|
||||
"purchaseGift": "Purchase Gift",
|
||||
"selectRecipient": "Select Recipient",
|
||||
"changeRecipient": "Change Recipient",
|
||||
"addMessage": "Add Message",
|
||||
"skipRecipient": "Skip Recipient",
|
||||
"giftSubscriptions": "Gift Subscriptions",
|
||||
"purchaseAGift": "Purchase a Gift",
|
||||
"redeemAGift": "Redeem a Gift",
|
||||
"giftHistory": "Gift History",
|
||||
"sentGifts": "Sent Gifts",
|
||||
"receivedGifts": "Received Gifts",
|
||||
"noSentGifts": "No sent gifts",
|
||||
"noReceivedGifts": "No received gifts",
|
||||
"stellarGift": "Stellar Gift",
|
||||
"novaGift": "Nova Gift",
|
||||
"supernovaGift": "Supernova Gift",
|
||||
"sameAsMembership": "Same as membership",
|
||||
"enterGiftCodeToRedeem": "Enter gift code to redeem",
|
||||
"enterGiftCode": "Enter gift code",
|
||||
"giftPurchased": "Gift Purchased!",
|
||||
"shareCodeWithRecipient": "Share this code with the recipient to redeem the gift.",
|
||||
"openGiftAnyoneCanRedeem": "This is an open gift that anyone can redeem.",
|
||||
"ok": "OK",
|
||||
"selectedRecipient": "Selected recipient",
|
||||
"noRecipientSelected": "No recipient selected",
|
||||
"thisWillBeAnOpenGift": "This will be an open gift",
|
||||
"personalMessage": "Personal Message",
|
||||
"addPersonalMessageForRecipient": "Add a personal message for the recipient",
|
||||
"giftStatusCreated": "Created",
|
||||
"giftStatusSent": "Sent",
|
||||
"giftStatusRedeemed": "Redeemed",
|
||||
"giftStatusCancelled": "Cancelled",
|
||||
"giftStatusExpired": "Expired",
|
||||
"giftStatusUnknown": "Unknown",
|
||||
"giftCodeCopiedToClipboard": "Gift code copied to clipboard",
|
||||
"codeLabel": "Code: ",
|
||||
"subscriptionLabel": "Subscription: ",
|
||||
"toLabel": "To: ",
|
||||
"fromLabel": "From: ",
|
||||
"messageLabel": "Message: ",
|
||||
"giftRedeemed": "Gift Redeemed!",
|
||||
"giftRedeemedSuccessfully": "You have successfully redeemed the gift. Your new subscription is now active.",
|
||||
"cancelGift": "Cancel Gift",
|
||||
"cancelGiftConfirm": "Are you sure you want to cancel this gift? This action cannot be undone.",
|
||||
"giftCancelledSuccessfully": "Gift cancelled successfully",
|
||||
"createFund": "Create Fund",
|
||||
"fundAmount": "Fund Amount",
|
||||
"enterAmount": "Enter Amount",
|
||||
"selectCurrency": "Select Currency",
|
||||
"splitType": "Split Type",
|
||||
"evenSplit": "Even Split",
|
||||
"equalAmountEach": "Equal amount for each recipient",
|
||||
"randomSplit": "Random Split",
|
||||
"randomAmountEach": "Random amount for each recipient",
|
||||
"recipientCount": "Recipient Count",
|
||||
"numberOfRecipients": "Number of Recipients",
|
||||
"addPersonalMessageForRecipients": "Add a personal message for recipients",
|
||||
"invalidAmount": "Invalid amount",
|
||||
"invalidRecipientCount": "Invalid recipient count",
|
||||
"fundOverview": "Fund Overview",
|
||||
"totalFundsSent": "Total Funds Sent",
|
||||
"totalFundsReceived": "Total Funds Received",
|
||||
"transactions": "Transactions",
|
||||
"myFunds": "My Funds",
|
||||
"availableFunds": "Available Funds",
|
||||
"fundStatusCreated": "Created",
|
||||
"fundStatusPartial": "Partially Claimed",
|
||||
"fundStatusCompleted": "Fully Claimed",
|
||||
"fundStatusExpired": "Expired",
|
||||
"fundStatusUnknown": "Unknown",
|
||||
"recipients": "Recipients",
|
||||
"fundClaimedSuccessfully": "Fund claimed successfully!",
|
||||
"claim": "Claim",
|
||||
"noFundsCreated": "No funds created yet",
|
||||
"createYourFirstFund": "Create your first fund to get started",
|
||||
"noAvailableFunds": "No available funds",
|
||||
"fundsWillAppearHere": "Funds you can claim will appear here",
|
||||
"fundCreatedSuccessfully": "Fund created successfully!",
|
||||
"selectRecipients": "Select Recipients",
|
||||
"noRecipientsSelected": "No recipients selected",
|
||||
"selectRecipientsToSendFund": "Select recipients to send the fund to",
|
||||
"addRecipient": "Add Recipient",
|
||||
"addMoreRecipients": "Add More Recipients",
|
||||
"transactionDetails": "Transaction Details",
|
||||
"remarks": "Remarks",
|
||||
"payer": "Payer",
|
||||
"payee": "Payee",
|
||||
"transactionType": "Transaction Type",
|
||||
"transfer": "Transfer",
|
||||
"payment": "Payment",
|
||||
"systemWallet": "System Wallet",
|
||||
"date": "Date",
|
||||
"createTransfer": "Create Transfer",
|
||||
"transferAmount": "Transfer Amount",
|
||||
"selectPayee": "Select Payee",
|
||||
"selectedPayee": "Selected Payee",
|
||||
"noPayeeSelected": "No payee selected",
|
||||
"selectPayeeToTransfer": "Select payee to transfer to",
|
||||
"addRemark": "Add Remark",
|
||||
"transferRemark": "Transfer Remark",
|
||||
"addRemarkForTransfer": "Add remark for transfer",
|
||||
"enterPinToConfirmTransfer": "Enter your 6-digit PIN to confirm transfer",
|
||||
"transferCreatedSuccessfully": "Transfer created successfully!",
|
||||
"postUpdate": "Update",
|
||||
"fileMetadata": "File Metadata",
|
||||
"resend": "Resend",
|
||||
"fileInfoTitle": "File Information",
|
||||
"download": "Download",
|
||||
"info": "Info",
|
||||
"noStickers": "No Stickers",
|
||||
"noStickersInPack": "This pack does not contains stickers",
|
||||
"noStickerPacks": "No Sticker Packs",
|
||||
"refresh": "Refresh",
|
||||
"spoiler": "Spoiler",
|
||||
"activityHeatmap": "Activity Heatmap",
|
||||
"custom": "Custom",
|
||||
"usernameColor": "Username Color",
|
||||
"colorType": "Color Type",
|
||||
"plain": "Plain",
|
||||
"gradient": "Gradient",
|
||||
"colorValue": "Color Value",
|
||||
"gradientDirection": "Gradient Direction",
|
||||
"gradientDirectionToRight": "To Right",
|
||||
"gradientDirectionToLeft": "To Left",
|
||||
"gradientDirectionToBottom": "To Bottom",
|
||||
"gradientDirectionToTop": "To Top",
|
||||
"gradientDirectionToBottomRight": "To Bottom Right",
|
||||
"gradientDirectionToBottomLeft": "To Bottom Left",
|
||||
"gradientDirectionToTopRight": "To Top Right",
|
||||
"gradientDirectionToTopLeft": "To Top Left",
|
||||
"gradientColors": "Gradient Colors",
|
||||
"color": "Color",
|
||||
"addColor": "Add Color",
|
||||
"availableWithYourPlan": "Available with your plan",
|
||||
"upgradeRequired": "Upgrade required",
|
||||
"settingsDisableAnimation": "Disable Animation",
|
||||
"addTag": "Add Tag",
|
||||
"accountConnectionProviderSpotify": "Spotify",
|
||||
"accountConnectionProviderSteam": "Steam",
|
||||
"timezoneNotFound": "Time zone not found",
|
||||
"awardPoints": "Awarded {} points",
|
||||
"postFeaturedOn": "Post featured on {}",
|
||||
"messageSentAt": "Sent at {}",
|
||||
"myTickets": "My Tickets",
|
||||
"drawHistory": "Draw History",
|
||||
"lottery": "Lottery",
|
||||
"noLotteryTickets": "No lottery tickets yet",
|
||||
"buyYourFirstTicket": "Buy your first lottery ticket to get started!",
|
||||
"buyTicket": "Buy Ticket",
|
||||
"ticketNumbers": "Numbers: {}, Special: {}",
|
||||
"cost": "Cost",
|
||||
"multiplier": "Multiplier",
|
||||
"prizeWon": "Prize Won",
|
||||
"pending": "Pending",
|
||||
"drawn": "Drawn",
|
||||
"won": "Won",
|
||||
"lost": "Lost",
|
||||
"noDrawHistory": "No draw history yet",
|
||||
"buyLotteryTicket": "Buy Lottery Ticket",
|
||||
"selectNumbers": "Select Numbers",
|
||||
"select5UniqueNumbers": "Select 5 unique numbers",
|
||||
"selectSpecialNumber": "Select Special Number",
|
||||
"selectMultiplier": "Select Multiplier",
|
||||
"baseCost": "Base Cost",
|
||||
"totalCost": "Total Cost",
|
||||
"prizeStructure": "Prize Structure",
|
||||
"enterPinToConfirmPurchase": "Enter your PIN to confirm purchase",
|
||||
"ticketPurchasedSuccessfully": "Ticket purchased successfully!",
|
||||
"winningNumbers": "Winning Numbers",
|
||||
"specialNumber": "Special Number",
|
||||
"totalTickets": "Total Tickets",
|
||||
"totalWinners": "Total Winners",
|
||||
"prizePool": "Prize Pool",
|
||||
"enterPinToConfirmPayment": "Enter your PIN code to confirm payment",
|
||||
"purchase": "Purchase",
|
||||
"multiplierLabel": "Multiplier",
|
||||
"specialOnly": "Special Only",
|
||||
"matches": "Matches",
|
||||
"thoughtDefaultTopic": "Reflection",
|
||||
"thoughtAiName": "SN-chan",
|
||||
"thoughtUserName": "You",
|
||||
"thoughtStreamingHint": "Sn-chan is thinking...",
|
||||
"thoughtInputHint": "Ask sn-chan anything...",
|
||||
"thoughtNewConversation": "Start New Conversation",
|
||||
"thoughtParseError": "Failed to parse AI response",
|
||||
"thoughtFunctionCall": "Use {}",
|
||||
"aiThought": "AI Thought",
|
||||
"aiThoughtTitle": "Let sn-chan think",
|
||||
"postReferenceUnavailable": "Referenced post is unavailable",
|
||||
"fabLocation": "FAB Location",
|
||||
"activities": "Activities",
|
||||
"presenceTypeGaming": "Playing",
|
||||
"presenceTypeMusic": "Listening to Music",
|
||||
"presenceTypeWorkout": "Working out",
|
||||
"articleCompose": "Compose Article",
|
||||
"backToHub": "Back to Hub",
|
||||
"advancedFilters": "Advanced Filters",
|
||||
"searchPosts": "Search Posts",
|
||||
"sortBy": "Sort by",
|
||||
"fromDate": "From Date",
|
||||
"toDate": "To Date",
|
||||
"popularity": "Popularity",
|
||||
"descendingOrder": "Descending Order",
|
||||
"selectDate": "Select Date",
|
||||
"pinnedPosts": "Pinned Posts",
|
||||
"customReactionHint": "Custom Reaction allow you to use user uploaded stickers as the symbol of the reaction for the post. Exclusive for Stellar Program members.",
|
||||
"publicationSites": "Publication Sites",
|
||||
"uploadTasks": "Upload Tasks",
|
||||
"thoughtFunctionCallBegin": "Calling tool {}",
|
||||
"thoughtFunctionCallFinish": "{} responded",
|
||||
"thoughtUnpaidHint": "Thinking unavaiable due to unpaid orders",
|
||||
"more": "More",
|
||||
"collapse": "Collapse",
|
||||
"pollConfirmDiscard": "Are you sure you want to leave? All the poll data you're editing will not be saved.",
|
||||
"discard": "Discard",
|
||||
"fund": "Fund",
|
||||
"fundsRecent": "Recent Funds",
|
||||
"fundCreateNew": "Create New",
|
||||
"fundCreateNewHint": "Create a new fund for your message. Select recipients and amount.",
|
||||
"amountOfSplits": "Amount of Splits",
|
||||
"enterNumberOfSplits": "Enter Splits Amount",
|
||||
"orCreateWith": "Or\ncreate with",
|
||||
"unindexedFiles": "Unindexed files",
|
||||
"folder": "Folder",
|
||||
"clearCompleted": "Clear Completed",
|
||||
"uploadSuccess": "Upload successful!",
|
||||
"wouldYouLikeToViewFile": "Would you like to view the file?",
|
||||
"contentCantEmpty": "Content cannot be empty",
|
||||
"features": "Features",
|
||||
"unnamed": "Unnamed",
|
||||
"fundEnvelopeLoadFailed": "Failed to load fund envelope",
|
||||
"fundEnvelope": "Fund Envelope",
|
||||
"fundEnvelopeRemaining": "Remaining: {} {}",
|
||||
"fundEnvelopeSplit": "Split: {}",
|
||||
"fundEnvelopeSplitEvenly": "Evenly",
|
||||
"fundEnvelopeSplitRandomly": "Randomly",
|
||||
"fundEnvelopeClaimSuccess": "Fund claimed successfully!",
|
||||
"fundEnvelopeStatusCreated": "Created",
|
||||
"fundEnvelopeStatusPartial": "Partially Claimed",
|
||||
"fundEnvelopeStatusCompleted": "Fully Claimed",
|
||||
"fundEnvelopeStatusExpired": "Expired",
|
||||
"fundEnvelopeStatusUnknown": "Unknown",
|
||||
"fundEnvelopeRecipients": "Recipients ({}/{} claimed)",
|
||||
"fundEnvelopeExpiredDaysAgo": {
|
||||
"one": "Expired {} day ago",
|
||||
"other": "Expired {} days ago"
|
||||
},
|
||||
"fundEnvelopeExpiresSoon": "Expires soon",
|
||||
"fundEnvelopeExpiresInHours": {
|
||||
"one": "Expires in {} hour",
|
||||
"other": "Expires in {} hours"
|
||||
},
|
||||
"fundEnvelopeExpiresInDays": {
|
||||
"one": "Expires in {} day",
|
||||
"other": "Expires in {} days"
|
||||
},
|
||||
"fundEnvelopeRemainingWithSplits": "{} {} / {} splits",
|
||||
"fundEnvelopeUnknownUser": "Unknown User",
|
||||
"deleteSite": "Delete Site",
|
||||
"deleteSiteConfirm": "Are you sure you want to delete this site?",
|
||||
"siteDeletedSuccess": "Site deleted successfully",
|
||||
"siteSlug": "Slug",
|
||||
"siteSlugHint": "my-site",
|
||||
"siteSlugRequired": "Please enter a slug",
|
||||
"siteSlugInvalid": "Slug can only contain lowercase letters, numbers, and dashes",
|
||||
"siteName": "Site Name",
|
||||
"siteNameHint": "My Publication Site",
|
||||
"siteNameRequired": "Please enter a site name",
|
||||
"siteMode": "Mode",
|
||||
"siteModeFullyManaged": "Fully Managed",
|
||||
"siteModeSelfManaged": "Self-Managed",
|
||||
"editPublicationSite": "Edit Publication Site",
|
||||
"deletePublicationSite": "Delete Publication Site",
|
||||
"publicationSiteSavedSuccess": "Publication site saved successfully",
|
||||
"publicationSiteDeleteConfirm": "Are you sure you want to delete this publication site? This action cannot be undone.",
|
||||
"publicationSiteDeletedSuccess": "Publication site deleted successfully",
|
||||
"newPublicationSite": "New Publication Site",
|
||||
"siteDetails": "Site Details",
|
||||
"siteInformation": "Site Information",
|
||||
"siteDomain": "Domain",
|
||||
"siteCreated": "Created",
|
||||
"siteUpdated": "Updated",
|
||||
"failedToLoadSite": "Failed to load site",
|
||||
"sitePages": "Pages",
|
||||
"noPagesYet": "No pages yet",
|
||||
"createFirstPage": "Create your first page to get started",
|
||||
"failedToLoadPages": "Failed to load pages",
|
||||
"fileManagement": "File Management",
|
||||
"siteFiles": "Files",
|
||||
"siteFolder": "Folder",
|
||||
"siteRoot": "Root",
|
||||
"noFilesUploadedYet": "No files uploaded yet",
|
||||
"uploadFirstFile": "Upload your first file to get started",
|
||||
"failedToLoadFiles": "Failed to load files",
|
||||
"noFilesFoundInFolder": "No files found in the selected folder",
|
||||
"fileActions": "File Actions",
|
||||
"purgeFiles": "Purge Files",
|
||||
"purgeFilesDescription": "Remove all uploaded files from the site",
|
||||
"deploySite": "Deploy Site",
|
||||
"deploySiteDescription": "Upload and deploy a new version from ZIP archive",
|
||||
"confirmPurge": "Confirm Purge",
|
||||
"purgeFilesConfirm": "This will permanently delete all files uploaded to this site. This action cannot be undone. Are you sure you want to continue?",
|
||||
"purgeAllFiles": "Purge All Files",
|
||||
"allFilesPurgedSuccess": "All files purged successfully",
|
||||
"failedToPurgeFiles": "Failed to purge files: {}",
|
||||
"siteDeployedSuccess": "Site deployed successfully",
|
||||
"failedToDeploySite": "Failed to deploy site: {}",
|
||||
"createPage": "Create Page",
|
||||
"editPage": "Edit Page",
|
||||
"pageType": "Page Type",
|
||||
"htmlPage": "HTML Page",
|
||||
"redirectPage": "Redirect Page",
|
||||
"pageTypeRequired": "Please select a page type",
|
||||
"pagePath": "Page Path",
|
||||
"pagePathHint": "/about, /contact, etc.",
|
||||
"pagePathRequired": "Please enter a page path",
|
||||
"pagePathInvalid": "Page path can only contain letters, numbers, hyphens, underscores, and slashes",
|
||||
"pagePathMustStartWithSlash": "Page path must start with /",
|
||||
"pagePathNoConsecutiveSlashes": "Page path cannot have consecutive slashes",
|
||||
"pageTitle": "Page Title",
|
||||
"pageTitleHint": "About Us, Contact, etc.",
|
||||
"pageTitleRequired": "Please enter a page title",
|
||||
"pageContentHtml": "Page Content (HTML)",
|
||||
"pageContentHint": "<h1>Hello World</h1><p>This is my page content...</p>",
|
||||
"pageContentRequired": "Please enter HTML content for the page",
|
||||
"redirectTarget": "Redirect Target",
|
||||
"redirectTargetHint": "/new-page, https://example.com, etc.",
|
||||
"redirectTargetRequired": "Please enter a redirect target",
|
||||
"redirectTargetInvalid": "Target must be a relative path (/) or absolute URL (http/https)",
|
||||
"deletePage": "Delete Page",
|
||||
"deletePageConfirm": "Are you sure you want to delete this page?",
|
||||
"savePage": "Save Page",
|
||||
"pageCreatedSuccess": "Page created successfully",
|
||||
"pageUpdatedSuccess": "Page updated successfully",
|
||||
"pageDeletedSuccess": "Page deleted successfully",
|
||||
"uploadFiles": "Upload Files",
|
||||
"uploadPath": "Upload Path",
|
||||
"uploadPathHint": "/ (root) or /assets/images/",
|
||||
"uploadPathRequired": "Please enter an upload path",
|
||||
"uploadPathMustStartWithSlash": "Path must start with /",
|
||||
"uploadPathNoSpaces": "Path cannot contain spaces",
|
||||
"uploadPathNoConsecutiveSlashes": "Path cannot have consecutive slashes",
|
||||
"percentCompleted": "{}% completed",
|
||||
"filesToUpload": "{} files to upload",
|
||||
"fileSizeKb": "Size: {} KB",
|
||||
"uploadingEllipsis": "Uploading...",
|
||||
"uploadFilesCount": {
|
||||
"one": "Upload {} File",
|
||||
"other": "Upload {} Files"
|
||||
},
|
||||
"allUploadsCompleted": "All uploads completed",
|
||||
"someUploadsFailed": "Some uploads failed",
|
||||
"uploadingInProgress": "Uploading in progress",
|
||||
"readyToUpload": "Ready to upload",
|
||||
"allFilesUploadedSuccess": "All files uploaded successfully",
|
||||
"lotteryLastNumberSpecial": "The last selected number will be your special number.",
|
||||
"lotteryMultiplierRequired": "Please enter a multiplier",
|
||||
"lotteryMultiplierRange": "Multiplier must be between 1 and 10",
|
||||
"dropToShare": "Drop to share",
|
||||
"affiliationSpell": "Affiliation Spell",
|
||||
"affiliationSpellHint": "If you have an affiliation spell, enter it here.",
|
||||
"friendsOnline": "Friends Online",
|
||||
"createAccountAlmostThere": "Almost There",
|
||||
"createAccountAlmostThereHint": "You're one step away from joining the Solar Network! Please solve the captcha puzzle shows next.",
|
||||
"createAccountNotice": "Things you need to know before you create an account:",
|
||||
"createAccountConfirmEmail": "After your account being created, you need go to your email inbox to active your account to get permission to use all features.",
|
||||
"createAccountNoAltAccounts": "Multiple or alternative accounts are banned from the Solar Network, that will violates our terms of services.",
|
||||
"createAccountAgreeTerms": "I've read these terms and agree to the terms of service.",
|
||||
"createAccountProfile": "Create your profile",
|
||||
"createAccountToS": "Review Terms & Conditions",
|
||||
"updateYourProfileDescription": "Adjust how you looks on the Solar Network.",
|
||||
"realmsDescription": "Manage realms you've joined.",
|
||||
"exploreDescription": "Explore contents on the Solar Network.",
|
||||
"accountDescription": "Information about your account.",
|
||||
"chatDescription": "Group Chats and Direct Messages",
|
||||
"connectionServerDown": "Unable to Connect",
|
||||
"appSettingsDescription": "Customize your app.",
|
||||
"accountSettingsDescription": "Manage your preferences on the Solar Network.",
|
||||
"walletDescription": "Your source point wallet.",
|
||||
"relationshipsDescription": "Friends and connections.",
|
||||
"notificationsDescription": "See what's happended related to you recently.",
|
||||
"settingsFestivalFeatures": "Festival Limited Features",
|
||||
"categoriesAndTags": "Categories & Tags",
|
||||
"webArticlesStandDescription": "Explore external sites articles.",
|
||||
"aboutDescription": "Learn more about the Solar Network.",
|
||||
"abuseReportsDescription": "View and manage abuse reports.",
|
||||
"stickerMarketplaceDescription": "Browse and add sticker packs from the Solar Network marketplace.",
|
||||
"webFeedsDescription": "Browse and subscribe to web feeds from the Solar Network.",
|
||||
"discoverRealmsDescription": "Discover new realms and join them.",
|
||||
"postShuffleDescription": "Shuffle posts to see the posts randomly.",
|
||||
"levelingDescription": "See your leveling progress and history.",
|
||||
"notableDayToday": "{} is today!",
|
||||
"authSessionLogout": "Logout Session",
|
||||
"authSessionLogoutHint": "Are you sure you want to logout this session? This will terminate this specific login session.",
|
||||
"filesDescription": "Manage your files on the Solar Network Drive.",
|
||||
"postComposeDescription": "Compose a new post",
|
||||
"searchPostsDescription": "Search posts by title, content, or else.",
|
||||
"accountActivationAlert": "Activate your account",
|
||||
"accountActivationAlertHint": "Unactivated account may leads to various of permission issues, activate your account by clicking the link we sent to your email inbox.",
|
||||
"accountActivationResendHint": "Didn't see it? Try click the button below to resend one. If you need to update your email while your account was unactivated, feel free to contact our customer service.",
|
||||
"accountActivationResend": "Resend",
|
||||
"ipAddress": "IP Address",
|
||||
"noFurtherData": "No further data",
|
||||
"searchAnything": "Search Anything...",
|
||||
"tapToViewAllNotifications": "Tap to view all notifications",
|
||||
"mostRecent": "Most Recent",
|
||||
"noNotificationsYet": "No notifications yet",
|
||||
"recentChats": "Recent Chats",
|
||||
"noFeaturedPostsAvailable": "No featured posts available",
|
||||
"searchChatsAndPages": "Search chats and pages...",
|
||||
"dashboard": "Dashboard",
|
||||
"dashboardDescription": "All your data in one place.",
|
||||
"postTagsCategories": "Post Tags and Categories",
|
||||
"postTagsCategoriesDescription": "Browse posts by category and tags.",
|
||||
"debugLogs": "Debug Logs",
|
||||
"debugLogsDescription": "View debug logs for troubleshooting.",
|
||||
"pinChatRoom": "Pin Chat Room",
|
||||
"pinChatRoomDescription": "Pin this chat room to the top.",
|
||||
"chatRoomPinned": "Chat room pinned successfully.",
|
||||
"chatRoomUnpinned": "Chat room unpinned successfully.",
|
||||
"pinnedChatRoom": "Pinned Rooms",
|
||||
"settingsGroupedChatList": "Grouped Chat List",
|
||||
"settingsNotifyWithHaptic": "Notification with Haptic Feedback",
|
||||
"settingsDashSearchEngine": "Search Engine for web",
|
||||
"settingsDashSearchEngineHelper": "Use %s as the placeholder for the query.",
|
||||
"settingsDefaultScreen": "Default Screen",
|
||||
"notableDayChristmas": "Christmas",
|
||||
"notableDayNewYear": "New Year"
|
||||
}
|
||||
@@ -158,14 +158,12 @@
|
||||
"checkIn": "Check In",
|
||||
"checkInNone": "Not checked-in yet",
|
||||
"checkInNoneHint": "Get your fortune tips and daily rewards by checking in.",
|
||||
"checkInResultLevel0": "Wrost Luck",
|
||||
"checkInResultLevel0": "Worst Luck",
|
||||
"checkInResultLevel1": "Bad Luck",
|
||||
"checkInResultLevel2": "A Normal Day",
|
||||
"checkInResultLevel3": "Good Luck",
|
||||
"checkInResultLevel4": "Best Luck",
|
||||
"checkInActivityTitle": "{} checked in on {} and got a {}",
|
||||
"eventCalander": "Event Calander",
|
||||
"eventCalanderEmpty": "No events on that day.",
|
||||
"fortuneGraph": "Fortune Trend",
|
||||
"noFortuneData": "No fortune data available for this month.",
|
||||
"creatorHub": "Creator Hub",
|
||||
@@ -316,7 +314,6 @@
|
||||
"settingsAutoTranslate": "Auto Translate",
|
||||
"settingsHideBottomNav": "Hide Bottom Navigation",
|
||||
"settingsSoundEffects": "Sound Effects",
|
||||
"settingsAprilFoolFeatures": "April Fool Features",
|
||||
"settingsEnterToSend": "Enter to Send",
|
||||
"settingsTransparentAppBar": "Transparent App Bar",
|
||||
"settingsCustomFonts": "Custom Fonts",
|
||||
@@ -684,9 +681,9 @@
|
||||
"articleAttachmentHint": "Attachments must be uploaded and inserted into the article body to be visible.",
|
||||
"postVisibility": "Post Visibility",
|
||||
"currentMembershipMember": "A member of Stellar Program · {}",
|
||||
"membershipPriceStellar": "1200 NSP per month, level 3+ required",
|
||||
"membershipPriceNova": "2400 NSP per month, level 6+ required",
|
||||
"membershipPriceSupernova": "3600 NSP per month, level 9+ required",
|
||||
"membershipPriceStellar": "1200 NSP per month, level 20+ required",
|
||||
"membershipPriceNova": "2400 NSP per month, level 40+ required",
|
||||
"membershipPriceSupernova": "3600 NSP per month, level 60+ required",
|
||||
"sharePostPhoto": "Share Post as Photo",
|
||||
"wouldYouLikeToNavigateToChat": "Would You like to navigate to the chat?",
|
||||
"abuseReports": "Abuse Reports",
|
||||
@@ -707,7 +704,7 @@
|
||||
"aboutScreenDeveloperSectionTitle": "Developer",
|
||||
"aboutScreenContactUsTitle": "Contact Us",
|
||||
"aboutScreenLicenseTitle": "License",
|
||||
"aboutScreenLicenseContent": "GNU Affero General Public License v3.0",
|
||||
"aboutScreenLicenseContent": "AGPLv3",
|
||||
"aboutScreenCopyright": "All rights reserved © Solsynth {}",
|
||||
"aboutScreenMadeWith": "Made with ❤︎️ by Solar Network Team",
|
||||
"aboutScreenFailedToLoadPackageInfo": "Failed to load package info: {error}",
|
||||
@@ -752,21 +749,6 @@
|
||||
"rename": "Rename",
|
||||
"markAsSensitive": "Mark as Sensitive",
|
||||
"fileName": "File name",
|
||||
"sensitiveCategories": {
|
||||
"language": "Language",
|
||||
"sexualContent": "Sexual Content",
|
||||
"violence": "Violence",
|
||||
"profanity": "Profanity",
|
||||
"hateSpeech": "Hate Speech",
|
||||
"racism": "Racism",
|
||||
"adultContent": "Adult Content",
|
||||
"drugAbuse": "Drug Abuse",
|
||||
"alcoholAbuse": "Alcohol Abuse",
|
||||
"gambling": "Gambling",
|
||||
"selfHarm": "Self-harm",
|
||||
"childAbuse": "Child Abuse",
|
||||
"other": "Other"
|
||||
},
|
||||
"poll": "Poll",
|
||||
"pollsRecent": "Recent Polls",
|
||||
"pollCreateNew": "Create New",
|
||||
@@ -1075,5 +1057,490 @@
|
||||
"deleteRecycledFiles": "Delete Recycled Files",
|
||||
"recycledFilesDeleted": "Recycled files deleted successfully",
|
||||
"failedToDeleteRecycledFiles": "Failed to delete recycled files",
|
||||
"upload": "Upload"
|
||||
"upload": "Upload",
|
||||
"deleteMessage": "Delete Message",
|
||||
"deleteMessageConfirmation": "Are you sure you want to delete this message?",
|
||||
"customReaction": "Custom Reaction",
|
||||
"customReactions": "Custom Reactions",
|
||||
"stickerPlaceholder": "Sticker Placeholder",
|
||||
"reactionAttitude": "Reaction Attitude",
|
||||
"addReaction": "Add Reaction",
|
||||
"eventCalendar": "Event Calendar",
|
||||
"eventCalendarEmpty": "No events on that day.",
|
||||
"walletStats": "Wallet Statistics",
|
||||
"totalTransactions": "Total Transactions",
|
||||
"totalOrders": "Total Orders",
|
||||
"totalIncome": "Total Income",
|
||||
"totalOutgoing": "Total Outgoing",
|
||||
"netBalance": "Net Balance",
|
||||
"messageUpdateLinks": "Server generated links previews",
|
||||
"messageUpdateEdited": "Edited a message",
|
||||
"settingsCardBackgroundOpacity": "Card Background Opacity",
|
||||
"settingsThemeMode": "Theme Mode",
|
||||
"settingsThemeModeSystem": "System",
|
||||
"settingsThemeModeLight": "Light",
|
||||
"settingsThemeModeDark": "Dark",
|
||||
"enterPin": "Enter your PIN code",
|
||||
"chatReplyingTo": "Replying to {}",
|
||||
"chatForwarding": "Forwarding message",
|
||||
"chatEditing": "Editing message",
|
||||
"chatNoContent": "No content",
|
||||
"sensitiveCategories": {
|
||||
"language": "Language",
|
||||
"sexualContent": "Sexual Content",
|
||||
"violence": "Violence",
|
||||
"profanity": "Profanity",
|
||||
"hateSpeech": "Hate Speech",
|
||||
"racism": "Racism",
|
||||
"adultContent": "Adult Content",
|
||||
"drugAbuse": "Drug Abuse",
|
||||
"alcoholAbuse": "Alcohol Abuse",
|
||||
"gambling": "Gambling",
|
||||
"selfHarm": "Self-harm",
|
||||
"childAbuse": "Child Abuse",
|
||||
"other": "Other"
|
||||
},
|
||||
"Searching...": "Searching...",
|
||||
"searchError": "Search failed. Please try again.",
|
||||
"tryDifferentKeywords": "Try different keywords or remove search filters",
|
||||
"settingsWindowOpacity": "Window Opacity",
|
||||
"messageContent": "Message Content",
|
||||
"updateAvailable": "Update available",
|
||||
"noChangelogProvided": "No changelog provided.",
|
||||
"useSecondarySourceForDownload": "Use secondary source for download",
|
||||
"installUpdate": "Install update",
|
||||
"openReleasePage": "Open release page",
|
||||
"postCompose": "Compose Post",
|
||||
"postPublish": "Publish Post",
|
||||
"restoreDraftTitle": "Restore Draft",
|
||||
"restoreDraftMessage": "A draft was found. Do you want to restore it?",
|
||||
"draft": "Draft",
|
||||
"purchaseGift": "Purchase Gift",
|
||||
"selectRecipient": "Select Recipient",
|
||||
"changeRecipient": "Change Recipient",
|
||||
"addMessage": "Add Message",
|
||||
"skipRecipient": "Skip Recipient",
|
||||
"giftSubscriptions": "Gift Subscriptions",
|
||||
"purchaseAGift": "Purchase a Gift",
|
||||
"redeemAGift": "Redeem a Gift",
|
||||
"giftHistory": "Gift History",
|
||||
"sentGifts": "Sent Gifts",
|
||||
"receivedGifts": "Received Gifts",
|
||||
"noSentGifts": "No sent gifts",
|
||||
"noReceivedGifts": "No received gifts",
|
||||
"stellarGift": "Stellar Gift",
|
||||
"novaGift": "Nova Gift",
|
||||
"supernovaGift": "Supernova Gift",
|
||||
"sameAsMembership": "Same as membership",
|
||||
"enterGiftCodeToRedeem": "Enter gift code to redeem",
|
||||
"enterGiftCode": "Enter gift code",
|
||||
"giftPurchased": "Gift Purchased!",
|
||||
"shareCodeWithRecipient": "Share this code with the recipient to redeem the gift.",
|
||||
"openGiftAnyoneCanRedeem": "This is an open gift that anyone can redeem.",
|
||||
"ok": "OK",
|
||||
"selectedRecipient": "Selected recipient",
|
||||
"noRecipientSelected": "No recipient selected",
|
||||
"thisWillBeAnOpenGift": "This will be an open gift",
|
||||
"personalMessage": "Personal Message",
|
||||
"addPersonalMessageForRecipient": "Add a personal message for the recipient",
|
||||
"giftStatusCreated": "Created",
|
||||
"giftStatusSent": "Sent",
|
||||
"giftStatusRedeemed": "Redeemed",
|
||||
"giftStatusCancelled": "Cancelled",
|
||||
"giftStatusExpired": "Expired",
|
||||
"giftStatusUnknown": "Unknown",
|
||||
"giftCodeCopiedToClipboard": "Gift code copied to clipboard",
|
||||
"codeLabel": "Code: ",
|
||||
"subscriptionLabel": "Subscription: ",
|
||||
"toLabel": "To: ",
|
||||
"fromLabel": "From: ",
|
||||
"messageLabel": "Message: ",
|
||||
"giftRedeemed": "Gift Redeemed!",
|
||||
"giftRedeemedSuccessfully": "You have successfully redeemed the gift. Your new subscription is now active.",
|
||||
"cancelGift": "Cancel Gift",
|
||||
"cancelGiftConfirm": "Are you sure you want to cancel this gift? This action cannot be undone.",
|
||||
"giftCancelledSuccessfully": "Gift cancelled successfully",
|
||||
"createFund": "Create Fund",
|
||||
"fundAmount": "Fund Amount",
|
||||
"enterAmount": "Enter Amount",
|
||||
"selectCurrency": "Select Currency",
|
||||
"splitType": "Split Type",
|
||||
"evenSplit": "Even Split",
|
||||
"equalAmountEach": "Equal amount for each recipient",
|
||||
"randomSplit": "Random Split",
|
||||
"randomAmountEach": "Random amount for each recipient",
|
||||
"recipientCount": "Recipient Count",
|
||||
"numberOfRecipients": "Number of Recipients",
|
||||
"addPersonalMessageForRecipients": "Add a personal message for recipients",
|
||||
"invalidAmount": "Invalid amount",
|
||||
"invalidRecipientCount": "Invalid recipient count",
|
||||
"fundOverview": "Fund Overview",
|
||||
"totalFundsSent": "Total Funds Sent",
|
||||
"totalFundsReceived": "Total Funds Received",
|
||||
"transactions": "Transactions",
|
||||
"myFunds": "My Funds",
|
||||
"availableFunds": "Available Funds",
|
||||
"fundStatusCreated": "Created",
|
||||
"fundStatusPartial": "Partially Claimed",
|
||||
"fundStatusCompleted": "Fully Claimed",
|
||||
"fundStatusExpired": "Expired",
|
||||
"fundStatusUnknown": "Unknown",
|
||||
"recipients": "Recipients",
|
||||
"fundClaimedSuccessfully": "Fund claimed successfully!",
|
||||
"claim": "Claim",
|
||||
"noFundsCreated": "No funds created yet",
|
||||
"createYourFirstFund": "Create your first fund to get started",
|
||||
"noAvailableFunds": "No available funds",
|
||||
"fundsWillAppearHere": "Funds you can claim will appear here",
|
||||
"fundCreatedSuccessfully": "Fund created successfully!",
|
||||
"selectRecipients": "Select Recipients",
|
||||
"noRecipientsSelected": "No recipients selected",
|
||||
"selectRecipientsToSendFund": "Select recipients to send the fund to",
|
||||
"addRecipient": "Add Recipient",
|
||||
"addMoreRecipients": "Add More Recipients",
|
||||
"transactionDetails": "Transaction Details",
|
||||
"remarks": "Remarks",
|
||||
"payer": "Payer",
|
||||
"payee": "Payee",
|
||||
"transactionType": "Transaction Type",
|
||||
"transfer": "Transfer",
|
||||
"payment": "Payment",
|
||||
"systemWallet": "System Wallet",
|
||||
"date": "Date",
|
||||
"createTransfer": "Create Transfer",
|
||||
"transferAmount": "Transfer Amount",
|
||||
"selectPayee": "Select Payee",
|
||||
"selectedPayee": "Selected Payee",
|
||||
"noPayeeSelected": "No payee selected",
|
||||
"selectPayeeToTransfer": "Select payee to transfer to",
|
||||
"addRemark": "Add Remark",
|
||||
"transferRemark": "Transfer Remark",
|
||||
"addRemarkForTransfer": "Add remark for transfer",
|
||||
"enterPinToConfirmTransfer": "Enter your 6-digit PIN to confirm transfer",
|
||||
"transferCreatedSuccessfully": "Transfer created successfully!",
|
||||
"postUpdate": "Update",
|
||||
"fileMetadata": "File Metadata",
|
||||
"resend": "Resend",
|
||||
"fileInfoTitle": "File Information",
|
||||
"download": "Download",
|
||||
"info": "Info",
|
||||
"noStickers": "No Stickers",
|
||||
"noStickersInPack": "This pack does not contains stickers",
|
||||
"noStickerPacks": "No Sticker Packs",
|
||||
"refresh": "Refresh",
|
||||
"spoiler": "Spoiler",
|
||||
"activityHeatmap": "Activity Heatmap",
|
||||
"custom": "Custom",
|
||||
"usernameColor": "Username Color",
|
||||
"colorType": "Color Type",
|
||||
"plain": "Plain",
|
||||
"gradient": "Gradient",
|
||||
"colorValue": "Color Value",
|
||||
"gradientDirection": "Gradient Direction",
|
||||
"gradientDirectionToRight": "To Right",
|
||||
"gradientDirectionToLeft": "To Left",
|
||||
"gradientDirectionToBottom": "To Bottom",
|
||||
"gradientDirectionToTop": "To Top",
|
||||
"gradientDirectionToBottomRight": "To Bottom Right",
|
||||
"gradientDirectionToBottomLeft": "To Bottom Left",
|
||||
"gradientDirectionToTopRight": "To Top Right",
|
||||
"gradientDirectionToTopLeft": "To Top Left",
|
||||
"gradientColors": "Gradient Colors",
|
||||
"color": "Color",
|
||||
"addColor": "Add Color",
|
||||
"availableWithYourPlan": "Available with your plan",
|
||||
"upgradeRequired": "Upgrade required",
|
||||
"settingsDisableAnimation": "Disable Animation",
|
||||
"addTag": "Add Tag",
|
||||
"accountConnectionProviderSpotify": "Spotify",
|
||||
"accountConnectionProviderSteam": "Steam",
|
||||
"timezoneNotFound": "Time zone not found",
|
||||
"awardPoints": "Awarded {} points",
|
||||
"postFeaturedOn": "Post featured on {}",
|
||||
"messageSentAt": "Sent at {}",
|
||||
"myTickets": "My Tickets",
|
||||
"drawHistory": "Draw History",
|
||||
"lottery": "Lottery",
|
||||
"noLotteryTickets": "No lottery tickets yet",
|
||||
"buyYourFirstTicket": "Buy your first lottery ticket to get started!",
|
||||
"buyTicket": "Buy Ticket",
|
||||
"ticketNumbers": "Numbers: {}, Special: {}",
|
||||
"cost": "Cost",
|
||||
"multiplier": "Multiplier",
|
||||
"prizeWon": "Prize Won",
|
||||
"pending": "Pending",
|
||||
"drawn": "Drawn",
|
||||
"won": "Won",
|
||||
"lost": "Lost",
|
||||
"noDrawHistory": "No draw history yet",
|
||||
"buyLotteryTicket": "Buy Lottery Ticket",
|
||||
"selectNumbers": "Select Numbers",
|
||||
"select5UniqueNumbers": "Select 5 unique numbers",
|
||||
"selectSpecialNumber": "Select Special Number",
|
||||
"selectMultiplier": "Select Multiplier",
|
||||
"baseCost": "Base Cost",
|
||||
"totalCost": "Total Cost",
|
||||
"prizeStructure": "Prize Structure",
|
||||
"enterPinToConfirmPurchase": "Enter your PIN to confirm purchase",
|
||||
"ticketPurchasedSuccessfully": "Ticket purchased successfully!",
|
||||
"winningNumbers": "Winning Numbers",
|
||||
"specialNumber": "Special Number",
|
||||
"totalTickets": "Total Tickets",
|
||||
"totalWinners": "Total Winners",
|
||||
"prizePool": "Prize Pool",
|
||||
"enterPinToConfirmPayment": "Enter your PIN code to confirm payment",
|
||||
"purchase": "Purchase",
|
||||
"multiplierLabel": "Multiplier",
|
||||
"specialOnly": "Special Only",
|
||||
"matches": "Matches",
|
||||
"thoughtDefaultTopic": "Reflection",
|
||||
"thoughtAiName": "SN-chan",
|
||||
"thoughtUserName": "You",
|
||||
"thoughtStreamingHint": "Sn-chan is thinking...",
|
||||
"thoughtInputHint": "Ask sn-chan anything...",
|
||||
"thoughtNewConversation": "Start New Conversation",
|
||||
"thoughtParseError": "Failed to parse AI response",
|
||||
"thoughtFunctionCall": "Use {}",
|
||||
"aiThought": "AI Thought",
|
||||
"aiThoughtTitle": "Let sn-chan think",
|
||||
"postReferenceUnavailable": "Referenced post is unavailable",
|
||||
"fabLocation": "FAB Location",
|
||||
"activities": "Activities",
|
||||
"presenceTypeGaming": "Playing",
|
||||
"presenceTypeMusic": "Listening to Music",
|
||||
"presenceTypeWorkout": "Working out",
|
||||
"articleCompose": "Compose Article",
|
||||
"backToHub": "Back to Hub",
|
||||
"advancedFilters": "Advanced Filters",
|
||||
"searchPosts": "Search Posts",
|
||||
"sortBy": "Sort by",
|
||||
"fromDate": "From Date",
|
||||
"toDate": "To Date",
|
||||
"popularity": "Popularity",
|
||||
"descendingOrder": "Descending Order",
|
||||
"selectDate": "Select Date",
|
||||
"pinnedPosts": "Pinned Posts",
|
||||
"customReactionHint": "Custom Reaction allow you to use user uploaded stickers as the symbol of the reaction for the post. Exclusive for Stellar Program members.",
|
||||
"publicationSites": "Publication Sites",
|
||||
"uploadTasks": "Upload Tasks",
|
||||
"thoughtFunctionCallBegin": "Calling tool {}",
|
||||
"thoughtFunctionCallFinish": "{} responded",
|
||||
"thoughtUnpaidHint": "Thinking unavaiable due to unpaid orders",
|
||||
"more": "More",
|
||||
"collapse": "Collapse",
|
||||
"pollConfirmDiscard": "Are you sure you want to leave? All the poll data you're editing will not be saved.",
|
||||
"discard": "Discard",
|
||||
"fund": "Fund",
|
||||
"fundsRecent": "Recent Funds",
|
||||
"fundCreateNew": "Create New",
|
||||
"fundCreateNewHint": "Create a new fund for your message. Select recipients and amount.",
|
||||
"amountOfSplits": "Amount of Splits",
|
||||
"enterNumberOfSplits": "Enter Splits Amount",
|
||||
"orCreateWith": "Or\ncreate with",
|
||||
"unindexedFiles": "Unindexed files",
|
||||
"folder": "Folder",
|
||||
"clearCompleted": "Clear Completed",
|
||||
"uploadSuccess": "Upload successful!",
|
||||
"wouldYouLikeToViewFile": "Would you like to view the file?",
|
||||
"contentCantEmpty": "Content cannot be empty",
|
||||
"features": "Features",
|
||||
"unnamed": "Unnamed",
|
||||
"fundEnvelopeLoadFailed": "Failed to load fund envelope",
|
||||
"fundEnvelope": "Fund Envelope",
|
||||
"fundEnvelopeRemaining": "Remaining: {} {}",
|
||||
"fundEnvelopeSplit": "Split: {}",
|
||||
"fundEnvelopeSplitEvenly": "Evenly",
|
||||
"fundEnvelopeSplitRandomly": "Randomly",
|
||||
"fundEnvelopeClaimSuccess": "Fund claimed successfully!",
|
||||
"fundEnvelopeStatusCreated": "Created",
|
||||
"fundEnvelopeStatusPartial": "Partially Claimed",
|
||||
"fundEnvelopeStatusCompleted": "Fully Claimed",
|
||||
"fundEnvelopeStatusExpired": "Expired",
|
||||
"fundEnvelopeStatusUnknown": "Unknown",
|
||||
"fundEnvelopeRecipients": "Recipients ({}/{} claimed)",
|
||||
"fundEnvelopeExpiredDaysAgo": {
|
||||
"one": "Expired {} day ago",
|
||||
"other": "Expired {} days ago"
|
||||
},
|
||||
"fundEnvelopeExpiresSoon": "Expires soon",
|
||||
"fundEnvelopeExpiresInHours": {
|
||||
"one": "Expires in {} hour",
|
||||
"other": "Expires in {} hours"
|
||||
},
|
||||
"fundEnvelopeExpiresInDays": {
|
||||
"one": "Expires in {} day",
|
||||
"other": "Expires in {} days"
|
||||
},
|
||||
"fundEnvelopeRemainingWithSplits": "{} {} / {} splits",
|
||||
"fundEnvelopeUnknownUser": "Unknown User",
|
||||
"deleteSite": "Delete Site",
|
||||
"deleteSiteConfirm": "Are you sure you want to delete this site?",
|
||||
"siteDeletedSuccess": "Site deleted successfully",
|
||||
"siteSlug": "Slug",
|
||||
"siteSlugHint": "my-site",
|
||||
"siteSlugRequired": "Please enter a slug",
|
||||
"siteSlugInvalid": "Slug can only contain lowercase letters, numbers, and dashes",
|
||||
"siteName": "Site Name",
|
||||
"siteNameHint": "My Publication Site",
|
||||
"siteNameRequired": "Please enter a site name",
|
||||
"siteMode": "Mode",
|
||||
"siteModeFullyManaged": "Fully Managed",
|
||||
"siteModeSelfManaged": "Self-Managed",
|
||||
"editPublicationSite": "Edit Publication Site",
|
||||
"deletePublicationSite": "Delete Publication Site",
|
||||
"publicationSiteSavedSuccess": "Publication site saved successfully",
|
||||
"publicationSiteDeleteConfirm": "Are you sure you want to delete this publication site? This action cannot be undone.",
|
||||
"publicationSiteDeletedSuccess": "Publication site deleted successfully",
|
||||
"newPublicationSite": "New Publication Site",
|
||||
"siteDetails": "Site Details",
|
||||
"siteInformation": "Site Information",
|
||||
"siteDomain": "Domain",
|
||||
"siteCreated": "Created",
|
||||
"siteUpdated": "Updated",
|
||||
"failedToLoadSite": "Failed to load site",
|
||||
"sitePages": "Pages",
|
||||
"noPagesYet": "No pages yet",
|
||||
"createFirstPage": "Create your first page to get started",
|
||||
"failedToLoadPages": "Failed to load pages",
|
||||
"fileManagement": "File Management",
|
||||
"siteFiles": "Files",
|
||||
"siteFolder": "Folder",
|
||||
"siteRoot": "Root",
|
||||
"noFilesUploadedYet": "No files uploaded yet",
|
||||
"uploadFirstFile": "Upload your first file to get started",
|
||||
"failedToLoadFiles": "Failed to load files",
|
||||
"noFilesFoundInFolder": "No files found in the selected folder",
|
||||
"fileActions": "File Actions",
|
||||
"purgeFiles": "Purge Files",
|
||||
"purgeFilesDescription": "Remove all uploaded files from the site",
|
||||
"deploySite": "Deploy Site",
|
||||
"deploySiteDescription": "Upload and deploy a new version from ZIP archive",
|
||||
"confirmPurge": "Confirm Purge",
|
||||
"purgeFilesConfirm": "This will permanently delete all files uploaded to this site. This action cannot be undone. Are you sure you want to continue?",
|
||||
"purgeAllFiles": "Purge All Files",
|
||||
"allFilesPurgedSuccess": "All files purged successfully",
|
||||
"failedToPurgeFiles": "Failed to purge files: {}",
|
||||
"siteDeployedSuccess": "Site deployed successfully",
|
||||
"failedToDeploySite": "Failed to deploy site: {}",
|
||||
"createPage": "Create Page",
|
||||
"editPage": "Edit Page",
|
||||
"pageType": "Page Type",
|
||||
"htmlPage": "HTML Page",
|
||||
"redirectPage": "Redirect Page",
|
||||
"pageTypeRequired": "Please select a page type",
|
||||
"pagePath": "Page Path",
|
||||
"pagePathHint": "/about, /contact, etc.",
|
||||
"pagePathRequired": "Please enter a page path",
|
||||
"pagePathInvalid": "Page path can only contain letters, numbers, hyphens, underscores, and slashes",
|
||||
"pagePathMustStartWithSlash": "Page path must start with /",
|
||||
"pagePathNoConsecutiveSlashes": "Page path cannot have consecutive slashes",
|
||||
"pageTitle": "Page Title",
|
||||
"pageTitleHint": "About Us, Contact, etc.",
|
||||
"pageTitleRequired": "Please enter a page title",
|
||||
"pageContentHtml": "Page Content (HTML)",
|
||||
"pageContentHint": "<h1>Hello World</h1><p>This is my page content...</p>",
|
||||
"pageContentRequired": "Please enter HTML content for the page",
|
||||
"redirectTarget": "Redirect Target",
|
||||
"redirectTargetHint": "/new-page, https://example.com, etc.",
|
||||
"redirectTargetRequired": "Please enter a redirect target",
|
||||
"redirectTargetInvalid": "Target must be a relative path (/) or absolute URL (http/https)",
|
||||
"deletePage": "Delete Page",
|
||||
"deletePageConfirm": "Are you sure you want to delete this page?",
|
||||
"savePage": "Save Page",
|
||||
"pageCreatedSuccess": "Page created successfully",
|
||||
"pageUpdatedSuccess": "Page updated successfully",
|
||||
"pageDeletedSuccess": "Page deleted successfully",
|
||||
"uploadFiles": "Upload Files",
|
||||
"uploadPath": "Upload Path",
|
||||
"uploadPathHint": "/ (root) or /assets/images/",
|
||||
"uploadPathRequired": "Please enter an upload path",
|
||||
"uploadPathMustStartWithSlash": "Path must start with /",
|
||||
"uploadPathNoSpaces": "Path cannot contain spaces",
|
||||
"uploadPathNoConsecutiveSlashes": "Path cannot have consecutive slashes",
|
||||
"percentCompleted": "{}% completed",
|
||||
"filesToUpload": "{} files to upload",
|
||||
"fileSizeKb": "Size: {} KB",
|
||||
"uploadingEllipsis": "Uploading...",
|
||||
"uploadFilesCount": {
|
||||
"one": "Upload {} File",
|
||||
"other": "Upload {} Files"
|
||||
},
|
||||
"allUploadsCompleted": "All uploads completed",
|
||||
"someUploadsFailed": "Some uploads failed",
|
||||
"uploadingInProgress": "Uploading in progress",
|
||||
"readyToUpload": "Ready to upload",
|
||||
"allFilesUploadedSuccess": "All files uploaded successfully",
|
||||
"lotteryLastNumberSpecial": "The last selected number will be your special number.",
|
||||
"lotteryMultiplierRequired": "Please enter a multiplier",
|
||||
"lotteryMultiplierRange": "Multiplier must be between 1 and 10",
|
||||
"dropToShare": "Drop to share",
|
||||
"affiliationSpell": "Affiliation Spell",
|
||||
"affiliationSpellHint": "If you have an affiliation spell, enter it here.",
|
||||
"friendsOnline": "Friends Online",
|
||||
"createAccountAlmostThere": "Almost There",
|
||||
"createAccountAlmostThereHint": "You're one step away from joining the Solar Network! Please solve the captcha puzzle shows next.",
|
||||
"createAccountNotice": "Things you need to know before you create an account:",
|
||||
"createAccountConfirmEmail": "After your account being created, you need go to your email inbox to active your account to get permission to use all features.",
|
||||
"createAccountNoAltAccounts": "Multiple or alternative accounts are banned from the Solar Network, that will violates our terms of services.",
|
||||
"createAccountAgreeTerms": "I've read these terms and agree to the terms of service.",
|
||||
"createAccountProfile": "Create your profile",
|
||||
"createAccountToS": "Review Terms & Conditions",
|
||||
"updateYourProfileDescription": "Adjust how you looks on the Solar Network.",
|
||||
"realmsDescription": "Manage realms you've joined.",
|
||||
"exploreDescription": "Explore contents on the Solar Network.",
|
||||
"accountDescription": "Information about your account.",
|
||||
"chatDescription": "Group Chats and Direct Messages",
|
||||
"connectionServerDown": "Unable to Connect",
|
||||
"appSettingsDescription": "Customize your app.",
|
||||
"accountSettingsDescription": "Manage your preferences on the Solar Network.",
|
||||
"walletDescription": "Your source point wallet.",
|
||||
"relationshipsDescription": "Friends and connections.",
|
||||
"notificationsDescription": "See what's happended related to you recently.",
|
||||
"settingsFestivalFeatures": "Festival Limited Features",
|
||||
"categoriesAndTags": "Categories & Tags",
|
||||
"webArticlesStandDescription": "Explore external sites articles.",
|
||||
"aboutDescription": "Learn more about the Solar Network.",
|
||||
"abuseReportsDescription": "View and manage abuse reports.",
|
||||
"stickerMarketplaceDescription": "Browse and add sticker packs from the Solar Network marketplace.",
|
||||
"webFeedsDescription": "Browse and subscribe to web feeds from the Solar Network.",
|
||||
"discoverRealmsDescription": "Discover new realms and join them.",
|
||||
"postShuffleDescription": "Shuffle posts to see the posts randomly.",
|
||||
"levelingDescription": "See your leveling progress and history.",
|
||||
"notableDayToday": "{} is today!",
|
||||
"authSessionLogout": "Logout Session",
|
||||
"authSessionLogoutHint": "Are you sure you want to logout this session? This will terminate this specific login session.",
|
||||
"filesDescription": "Manage your files on the Solar Network Drive.",
|
||||
"postComposeDescription": "Compose a new post",
|
||||
"searchPostsDescription": "Search posts by title, content, or else.",
|
||||
"accountActivationAlert": "Activate your account",
|
||||
"accountActivationAlertHint": "Unactivated account may leads to various of permission issues, activate your account by clicking the link we sent to your email inbox.",
|
||||
"accountActivationResendHint": "Didn't see it? Try click the button below to resend one. If you need to update your email while your account was unactivated, feel free to contact our customer service.",
|
||||
"accountActivationResend": "Resend",
|
||||
"ipAddress": "IP Address",
|
||||
"noFurtherData": "No further data",
|
||||
"searchAnything": "Search Anything...",
|
||||
"tapToViewAllNotifications": "Tap to view all notifications",
|
||||
"mostRecent": "Most Recent",
|
||||
"noNotificationsYet": "No notifications yet",
|
||||
"recentChats": "Recent Chats",
|
||||
"noFeaturedPostsAvailable": "No featured posts available",
|
||||
"searchChatsAndPages": "Search chats and pages...",
|
||||
"dashboard": "Dashboard",
|
||||
"dashboardDescription": "All your data in one place.",
|
||||
"postTagsCategories": "Post Tags and Categories",
|
||||
"postTagsCategoriesDescription": "Browse posts by category and tags.",
|
||||
"debugLogs": "Debug Logs",
|
||||
"debugLogsDescription": "View debug logs for troubleshooting.",
|
||||
"pinChatRoom": "Pin Chat Room",
|
||||
"pinChatRoomDescription": "Pin this chat room to the top.",
|
||||
"chatRoomPinned": "Chat room pinned successfully.",
|
||||
"chatRoomUnpinned": "Chat room unpinned successfully.",
|
||||
"pinnedChatRoom": "Pinned Rooms",
|
||||
"settingsGroupedChatList": "Grouped Chat List",
|
||||
"settingsNotifyWithHaptic": "Notification with Haptic Feedback",
|
||||
"settingsDashSearchEngine": "Search Engine for web",
|
||||
"settingsDashSearchEngineHelper": "Use %s as the placeholder for the query.",
|
||||
"settingsDefaultScreen": "Default Screen",
|
||||
"notableDayChristmas": "Christmas",
|
||||
"notableDayNewYear": "New Year"
|
||||
}
|
||||
@@ -64,8 +64,8 @@
|
||||
"authFactorTOTPDescription": "由 TOTP 验证器生成的一次性验证码。",
|
||||
"authFactorInAppNotify": "应用内通知",
|
||||
"authFactorInAppNotifyDescription": "通过应用内通知发送的一次性验证码。",
|
||||
"authFactorPin": "Pin 码",
|
||||
"authFactorPinDescription": "它由6位数字组成。它不能用于登录。 当执行一些危险的操作时,系统将要求您输入此 PIN 进行确认。",
|
||||
"authFactorPin": "PIN 码",
|
||||
"authFactorPinDescription": "此 PIN 码由 6 位数字组成,不可用于登录。执行高风险操作时,系统会要求输入此 PIN 码进行确认。",
|
||||
"realms": "领域",
|
||||
"createRealm": "创建领域",
|
||||
"createRealmHint": "结识志同道合的朋友、建立社区等等。",
|
||||
@@ -164,8 +164,6 @@
|
||||
"checkInResultLevel3": "吉",
|
||||
"checkInResultLevel4": "大吉",
|
||||
"checkInActivityTitle": "{} 在 {} 签到并获得了 {}",
|
||||
"eventCalander": "活动日历",
|
||||
"eventCalanderEmpty": "该日无活动。",
|
||||
"fortuneGraph": "时运趋势",
|
||||
"noFortuneData": "本月沒有时运數據。",
|
||||
"creatorHub": "创作者中心",
|
||||
@@ -316,7 +314,6 @@
|
||||
"settingsAutoTranslate": "自动翻译",
|
||||
"settingsHideBottomNav": "隐藏底部导航",
|
||||
"settingsSoundEffects": "音效",
|
||||
"settingsAprilFoolFeatures": "愚人节功能",
|
||||
"settingsEnterToSend": "按下 Enter 发送",
|
||||
"settingsTransparentAppBar": "使用完全透明的状态栏",
|
||||
"settingsCustomFonts": "自定义字体",
|
||||
@@ -413,7 +410,7 @@
|
||||
"contactMethodAddressHint": "输入您的现实地址",
|
||||
"contactMethodEmailDescription": "您的电子邮件将用于帐户恢复和通知",
|
||||
"contactMethodPhoneDescription": "您的电话号码将用于帐户恢复和通知",
|
||||
"contactMethodAddressDescription": "您的实际地址将用于运输和计费目的。",
|
||||
"contactMethodAddressDescription": "您的地址将用于物流和账单。",
|
||||
"contactMethodVerified": "已验证",
|
||||
"contactMethodUnverified": "未认证",
|
||||
"contactMethodVerify": "验证联系方式",
|
||||
@@ -471,8 +468,8 @@
|
||||
"description": "描述",
|
||||
"pinCode": "PIN 码",
|
||||
"biometric": "生物识别",
|
||||
"enterPinToConfirm": "请输入您的6位数字 PIN 以确认付款",
|
||||
"clearPin": "清除 PIN 码",
|
||||
"enterPinToConfirm": "请输入您的 6 位数字 PIN 以确认付款",
|
||||
"clearPin": "清除 PIN",
|
||||
"useBiometricToConfirm": "使用生物特征认证来确认付款",
|
||||
"touchSensorToAuthenticate": "触摸传感器进行身份验证",
|
||||
"authenticating": "认证中……",
|
||||
@@ -481,7 +478,7 @@
|
||||
"processingPayment": "处理付款中……",
|
||||
"pleaseWait": "请稍候",
|
||||
"paymentFailed": "付款失败,请重试。",
|
||||
"invalidPin": "错误的 PIN。请再试一次。",
|
||||
"invalidPin": "PIN 码错误,请重试。",
|
||||
"biometricAuthFailed": "生物识别身份验证失败。请重试。",
|
||||
"paymentSuccess": "付款成功完成!",
|
||||
"membershipPurchaseSuccess": "好耶,会员购买成功!",
|
||||
@@ -525,7 +522,7 @@
|
||||
"safetyReportReasonHint": "请提供更多证据……",
|
||||
"safetyReportSubmit": "提交举报",
|
||||
"safetyReportSubmitting": "提交中……",
|
||||
"safetyReportSuccess": "举报成功,感谢您参与维护社区健康发展。",
|
||||
"safetyReportSuccess": "举报提交成功,感谢您协助维护社区安全。",
|
||||
"safetyReportError": "举报失败,请稍后重试。",
|
||||
"safetyReportReasonRequired": "请提供举报证据",
|
||||
"safetyReportTypeSpam": "垃圾或导向错误",
|
||||
@@ -599,7 +596,7 @@
|
||||
"abuseReportReason": "补充详情",
|
||||
"abuseReportReasonHint": "请提供更多详情……",
|
||||
"abuseReportSubmit": "提交举报",
|
||||
"abuseReportSuccess": "举报提交成功,感谢你为社区维护作出贡献。",
|
||||
"abuseReportSuccess": "举报提交成功,感谢您协助维护社区安全。",
|
||||
"abuseReportError": "无法提交举报,请稍后再试。",
|
||||
"abuseReportReasonRequired": "请提供关于此事件的细节",
|
||||
"abuseReportSuccessTitle": "举报已提交",
|
||||
@@ -684,9 +681,9 @@
|
||||
"articleAttachmentHint": "附件必须上传并插入到文章主体中才能显示出来。",
|
||||
"postVisibility": "可见性",
|
||||
"currentMembershipMember": "恒星计划成员 · {}",
|
||||
"membershipPriceStellar": "需要用户等级 3+,每月价格 1200 NSP",
|
||||
"membershipPriceNova": "需要用户等级 6+,每月价格 2400 NSP",
|
||||
"membershipPriceSupernova": "需要用户等级 9+,每月价格 3600 NSP",
|
||||
"membershipPriceStellar": "需要用户等级达到 20 以上,每月价格 1200 NSP",
|
||||
"membershipPriceNova": "需要用户等级达到 40 以上,每月价格 2400 NSP",
|
||||
"membershipPriceSupernova": "需要用户等级达到 60 以上,每月价格 3600 NSP",
|
||||
"sharePostPhoto": "通过图片分享帖子",
|
||||
"wouldYouLikeToNavigateToChat": "你想要前往聊天页面吗?",
|
||||
"abuseReports": "举报",
|
||||
@@ -707,7 +704,7 @@
|
||||
"aboutScreenDeveloperSectionTitle": "开发者",
|
||||
"aboutScreenContactUsTitle": "联系我们",
|
||||
"aboutScreenLicenseTitle": "许可",
|
||||
"aboutScreenLicenseContent": "无法翻译",
|
||||
"aboutScreenLicenseContent": "GNU Affero 通用公共许可证 v3.0",
|
||||
"aboutScreenCopyright": "版权所有 © Solsynth {}",
|
||||
"aboutScreenMadeWith": "由 Solar Network 团队用 ❤︎️ 制作",
|
||||
"aboutScreenFailedToLoadPackageInfo": "无法加载包信息:{error}",
|
||||
@@ -752,21 +749,6 @@
|
||||
"rename": "重命名",
|
||||
"markAsSensitive": "标记为敏感",
|
||||
"fileName": "文件名",
|
||||
"sensitiveCategories": {
|
||||
"language": "语言",
|
||||
"sexualContent": "色情内容",
|
||||
"violence": "暴力",
|
||||
"profanity": "亵渎",
|
||||
"hateSpeech": "仇恨言论",
|
||||
"racism": "种族主义",
|
||||
"adultContent": "成人内容",
|
||||
"drugAbuse": "药物滥用",
|
||||
"alcoholAbuse": "酗酒",
|
||||
"gambling": "赌博",
|
||||
"selfHarm": "自残",
|
||||
"childAbuse": "虐待儿童",
|
||||
"other": "其他"
|
||||
},
|
||||
"poll": "投票",
|
||||
"pollsRecent": "最近投票",
|
||||
"pollCreateNew": "创建新投票",
|
||||
@@ -952,8 +934,8 @@
|
||||
"keyName": "密钥名称",
|
||||
"newKeyGenerated": "新密钥已生成",
|
||||
"copyKeyHint": "请安全的保存该密钥,你不会再次看到它。",
|
||||
"rotateKey": "旋转密钥",
|
||||
"rotateBotKey": "旋转密钥",
|
||||
"rotateKey": "轮换密钥",
|
||||
"rotateBotKey": "轮换机器人密钥",
|
||||
"rotateBotKeyHint": "你确认要旋转这个密钥?久的密钥会立即失效,该操作无法撤销。",
|
||||
"webFeedArticleCount": {
|
||||
"zero": "没有文章",
|
||||
@@ -1076,12 +1058,241 @@
|
||||
"recycledFilesDeleted": "被回收文件成功删除",
|
||||
"failedToDeleteRecycledFiles": "删除被回收文件失败",
|
||||
"upload": "上传",
|
||||
"systemWallet": "中央统筹",
|
||||
"deleteMessage": "删除消息",
|
||||
"deleteMessageConfirmation": "您确定要删除这条消息吗?",
|
||||
"customReaction": "自定义反应",
|
||||
"customReactions": "自定义反应",
|
||||
"stickerPlaceholder": "贴图占位符",
|
||||
"reactionAttitude": "反应属性",
|
||||
"addReaction": "添加反应",
|
||||
"eventCalendar": "活动日历",
|
||||
"eventCalendarEmpty": "该日无活动。",
|
||||
"walletStats": "钱包统计",
|
||||
"totalTransactions": "交易总额",
|
||||
"totalOrders": "总订单",
|
||||
"totalIncome": "总收入",
|
||||
"totalOutgoing": "总支出",
|
||||
"netBalance": "净余额",
|
||||
"messageUpdateLinks": "服务器生成的链接预览",
|
||||
"messageUpdateEdited": "编辑一条消息",
|
||||
"settingsCardBackgroundOpacity": "卡片背景不透明度",
|
||||
"settingsThemeMode": "主题模式",
|
||||
"settingsThemeModeSystem": "跟随系统",
|
||||
"settingsThemeModeLight": "亮色",
|
||||
"settingsThemeModeDark": "暗色",
|
||||
"enterPin": "请输入您的PIN码",
|
||||
"chatReplyingTo": "回复给 {}",
|
||||
"chatForwarding": "正在转发消息",
|
||||
"chatEditing": "编辑消息",
|
||||
"chatNoContent": "没有内容",
|
||||
"sensitiveCategories": {
|
||||
"language": "语言",
|
||||
"sexualContent": "色情内容",
|
||||
"violence": "暴力",
|
||||
"profanity": "亵渎",
|
||||
"hateSpeech": "仇恨言论",
|
||||
"racism": "种族主义",
|
||||
"adultContent": "成人内容",
|
||||
"drugAbuse": "药物滥用",
|
||||
"alcoholAbuse": "酗酒",
|
||||
"gambling": "赌博",
|
||||
"selfHarm": "自残",
|
||||
"childAbuse": "虐待儿童",
|
||||
"other": "其他"
|
||||
},
|
||||
"Searching...": "搜索中……",
|
||||
"searchError": "搜索失败,请重试。",
|
||||
"tryDifferentKeywords": "尝试不同的关键字或删除搜索过滤器",
|
||||
"settingsWindowOpacity": "窗口不透明度",
|
||||
"messageContent": "消息内容",
|
||||
"updateAvailable": "更新可用",
|
||||
"noChangelogProvided": "没有提供更新日志。",
|
||||
"useSecondarySourceForDownload": "使用次要源下载",
|
||||
"installUpdate": "安装更新",
|
||||
"openReleasePage": "打开发行页面",
|
||||
"postCompose": "撰写帖子",
|
||||
"postPublish": "发布帖子",
|
||||
"restoreDraftTitle": "恢复草稿",
|
||||
"restoreDraftMessage": "发现了一个草稿。你想要恢复它吗?",
|
||||
"draft": "草稿",
|
||||
"purchaseGift": "购买礼物",
|
||||
"selectRecipient": "选择款件人",
|
||||
"changeRecipient": "修改款件人",
|
||||
"addMessage": "添加信息",
|
||||
"skipRecipient": "跳过款件人",
|
||||
"giftSubscriptions": "礼物订阅",
|
||||
"purchaseAGift": "购买礼物",
|
||||
"redeemAGift": "兑换礼物",
|
||||
"giftHistory": "礼物历史",
|
||||
"sentGifts": "发送礼物",
|
||||
"receivedGifts": "接收礼物",
|
||||
"noSentGifts": "没有发送过礼物",
|
||||
"noReceivedGifts": "没有收到过礼物",
|
||||
"stellarGift": "恒星订阅",
|
||||
"novaGift": "新星订阅",
|
||||
"supernovaGift": "超新星订阅",
|
||||
"sameAsMembership": "与成员相同",
|
||||
"enterGiftCodeToRedeem": "输入礼品代码以兑换",
|
||||
"enterGiftCode": "输入礼物代码",
|
||||
"giftPurchased": "已购买礼物!",
|
||||
"shareCodeWithRecipient": "与收件人分享此代码来兑换礼物。",
|
||||
"openGiftAnyoneCanRedeem": "这是一份任何人都可以兑换的公开礼物。",
|
||||
"ok": "确定",
|
||||
"selectedRecipient": "选定收件人",
|
||||
"noRecipientSelected": "未选择收件人",
|
||||
"thisWillBeAnOpenGift": "这将是一份公开的礼物",
|
||||
"personalMessage": "个人消息",
|
||||
"addPersonalMessageForRecipient": "为收件人添加个人消息",
|
||||
"giftStatusCreated": "已创建",
|
||||
"giftStatusSent": "发送",
|
||||
"giftStatusRedeemed": "已兑换",
|
||||
"giftStatusCancelled": "已取消",
|
||||
"giftStatusExpired": "已过期",
|
||||
"giftStatusUnknown": "未知",
|
||||
"giftCodeCopiedToClipboard": "礼物代码已复制到剪贴板",
|
||||
"codeLabel": "代码: ",
|
||||
"subscriptionLabel": "订阅: ",
|
||||
"toLabel": "发送至: ",
|
||||
"fromLabel": "来自: ",
|
||||
"messageLabel": "消息: ",
|
||||
"giftRedeemed": "礼物兑换成功!",
|
||||
"giftRedeemedSuccessfully": "您已成功兑换了礼物。您的新订阅现在已经生效。",
|
||||
"cancelGift": "取消礼物",
|
||||
"cancelGiftConfirm": "您确定要取消此礼物?此操作不能撤消。",
|
||||
"giftCancelledSuccessfully": "已成功取消礼物",
|
||||
"createFund": "创建红包",
|
||||
"fundAmount": "红包金额",
|
||||
"enterAmount": "输入金额",
|
||||
"selectCurrency": "选择币种",
|
||||
"splitType": "拆分类型",
|
||||
"evenSplit": "平均分配",
|
||||
"equalAmountEach": "每个收款人的金额相同",
|
||||
"randomSplit": "随机分配",
|
||||
"randomAmountEach": "每个收款人的金额随机",
|
||||
"recipientCount": "收款人总计",
|
||||
"numberOfRecipients": "收款人数量",
|
||||
"addPersonalMessageForRecipients": "为收款人添加个人信息",
|
||||
"invalidAmount": "无效的金额",
|
||||
"invalidRecipientCount": "收款人数量无效",
|
||||
"fundOverview": "红包概述",
|
||||
"totalFundsSent": "已发送的红包总额",
|
||||
"totalFundsReceived": "收到的红包总额",
|
||||
"transactions": "交易",
|
||||
"myFunds": "我的支票",
|
||||
"availableFunds": "可用支票",
|
||||
"fundStatusCreated": "已创建",
|
||||
"fundStatusPartial": "部分领取",
|
||||
"fundStatusCompleted": "已领完",
|
||||
"fundStatusExpired": "已过期",
|
||||
"fundStatusUnknown": "未知",
|
||||
"recipients": "收款人",
|
||||
"fundClaimedSuccessfully": "支票领取成功!",
|
||||
"claim": "申请",
|
||||
"noFundsCreated": "尚未创建任何支票",
|
||||
"createYourFirstFund": "创建您的第一个支票来开始",
|
||||
"noAvailableFunds": "暂无可用支票",
|
||||
"fundsWillAppearHere": "您可以领取的支票将出现在这里",
|
||||
"fundCreatedSuccessfully": "支票创建成功!",
|
||||
"selectRecipients": "选择收款人",
|
||||
"noRecipientsSelected": "尚未选择收款人",
|
||||
"selectRecipientsToSendFund": "选择收款人将支票发送到",
|
||||
"addRecipient": "添加收款人",
|
||||
"addMoreRecipients": "添加更多收款人",
|
||||
"transactionDetails": "交易详情",
|
||||
"remarks": "备注",
|
||||
"payer": "付款方",
|
||||
"payee": "交易方",
|
||||
"transactionType": "交易类型",
|
||||
"transfer": "转账",
|
||||
"payment": "支付",
|
||||
"systemWallet": "中央统筹",
|
||||
"date": "日期",
|
||||
"createTransfer": "创建转账",
|
||||
"transferAmount": "转账金额",
|
||||
"selectPayee": "请选择收款人",
|
||||
"selectedPayee": "选定的收款人",
|
||||
"noPayeeSelected": "没有选择收款人",
|
||||
"selectPayeeToTransfer": "选择要转账的收款人",
|
||||
"addRemark": "添加备注",
|
||||
"transferRemark": "转账备注",
|
||||
"addRemarkForTransfer": "为转账添加备注",
|
||||
"enterPinToConfirmTransfer": "输入您的 6 位 PIN 码以确认转账",
|
||||
"transferCreatedSuccessfully": "转账成功创建!",
|
||||
"postUpdate": "更新",
|
||||
"fileMetadata": "文件元数据",
|
||||
"resend": "重新发送",
|
||||
"fileInfoTitle": "文件信息",
|
||||
"download": "下载",
|
||||
"info": "信息",
|
||||
"noStickers": "无贴图",
|
||||
"noStickersInPack": "这个包没有贴纸",
|
||||
"noStickerPacks": "无贴图包",
|
||||
"refresh": "刷新",
|
||||
"spoiler": "已隐藏",
|
||||
"activityHeatmap": "活动热力图",
|
||||
"custom": "自定义",
|
||||
"usernameColor": "用户名颜色",
|
||||
"colorType": "颜色类型",
|
||||
"plain": "纯色",
|
||||
"gradient": "渐变",
|
||||
"colorValue": "色值",
|
||||
"gradientDirection": "渐变方向",
|
||||
"gradientDirectionToRight": "向右",
|
||||
"gradientDirectionToLeft": "向左",
|
||||
"gradientDirectionToBottom": "向底部",
|
||||
"gradientDirectionToTop": "向上",
|
||||
"gradientDirectionToBottomRight": "向右下角",
|
||||
"gradientDirectionToBottomLeft": "向左下角",
|
||||
"gradientDirectionToTopRight": "向右上角",
|
||||
"gradientDirectionToTopLeft": "向左下角",
|
||||
"gradientColors": "渐变颜色",
|
||||
"color": "颜色",
|
||||
"addColor": "添加颜色",
|
||||
"availableWithYourPlan": "适用于您的计划",
|
||||
"upgradeRequired": "需要升级恒星计划等级",
|
||||
"settingsDisableAnimation": "禁用动画",
|
||||
"addTag": "添加标签",
|
||||
"accountConnectionProviderSpotify": "Spotify",
|
||||
"accountConnectionProviderSteam": "Steam",
|
||||
"timezoneNotFound": "未找到时区",
|
||||
"awardPoints": "收到 {} 点奖励",
|
||||
"postFeaturedOn": "帖子在 {} 被精选",
|
||||
"messageSentAt": "在 {} 发送",
|
||||
"myTickets": "我的彩票",
|
||||
"drawHistory": "抽奖历史",
|
||||
"lottery": "彩票",
|
||||
"noLotteryTickets": "暂无彩票",
|
||||
"buyYourFirstTicket": "购买您的第一张彩票开始!",
|
||||
"buyTicket": "购买彩票",
|
||||
"ticketNumbers": "数字: {}, 特殊数字: {}",
|
||||
"cost": "花费",
|
||||
"multiplier": "倍率",
|
||||
"prizeWon": "获奖者",
|
||||
"pending": "准备中",
|
||||
"drawn": "已开奖",
|
||||
"won": "赢",
|
||||
"lost": "输",
|
||||
"noDrawHistory": "暂无开奖历史",
|
||||
"buyLotteryTicket": "购买彩票",
|
||||
"selectNumbers": "选择数字",
|
||||
"select5UniqueNumbers": "选择 5 个唯一数字",
|
||||
"selectSpecialNumber": "选择特殊数字",
|
||||
"selectMultiplier": "选择倍数",
|
||||
"baseCost": "基础花费",
|
||||
"totalCost": "总费用",
|
||||
"prizeStructure": "奖金分级",
|
||||
"enterPinToConfirmPurchase": "输入您的 PIN 码以确认购买",
|
||||
"ticketPurchasedSuccessfully": "彩票购买成功!",
|
||||
"winningNumbers": "获胜数字",
|
||||
"specialNumber": "特殊数字",
|
||||
"totalTickets": "总售出票数",
|
||||
"totalWinners": "中奖者总人数",
|
||||
"prizePool": "奖金池",
|
||||
"enterPinToConfirmPayment": "输入您的 PIN 码以确认付款",
|
||||
"purchase": "购买",
|
||||
"multiplierLabel": "倍率",
|
||||
"specialOnly": "仅特殊的",
|
||||
"matches": "场次",
|
||||
"thoughtDefaultTopic": "寻思",
|
||||
"thoughtAiName": "SN 酱",
|
||||
"thoughtUserName": "您",
|
||||
@@ -1089,6 +1300,247 @@
|
||||
"thoughtInputHint": "问 SN 酱任何问题...",
|
||||
"thoughtNewConversation": "开始新对话",
|
||||
"thoughtParseError": "解析 AI 响应失败",
|
||||
"thoughtFunctionCall": "调用 {} 函数",
|
||||
"aiThought": "寻思",
|
||||
"aiThoughtTitle": "让 SN 酱寻思寻思"
|
||||
}
|
||||
"aiThoughtTitle": "让 SN 酱寻思寻思",
|
||||
"postReferenceUnavailable": "引用的帖子不可用",
|
||||
"fabLocation": "底部导航按钮位置",
|
||||
"activities": "活动",
|
||||
"presenceTypeGaming": "正在玩",
|
||||
"presenceTypeMusic": "正在听音乐",
|
||||
"presenceTypeWorkout": "锻炼中",
|
||||
"articleCompose": "撰写文章",
|
||||
"backToHub": "返回至主页",
|
||||
"advancedFilters": "高级筛选",
|
||||
"searchPosts": "搜索帖子",
|
||||
"sortBy": "排序方式",
|
||||
"fromDate": "起始日期",
|
||||
"toDate": "截止日期",
|
||||
"popularity": "按热度",
|
||||
"descendingOrder": "降序排序",
|
||||
"selectDate": "选择日期",
|
||||
"pinnedPosts": "已置顶的帖子",
|
||||
"customReactionHint": "自定义反应允许你使用用户上传贴纸作为帖子反应的符号,需要恒星计划订阅。",
|
||||
"publicationSites": "发布者站点",
|
||||
"uploadTasks": "上传任务",
|
||||
"thoughtFunctionCallBegin": "调用工具 {}",
|
||||
"thoughtFunctionCallFinish": "工具 {} 响应",
|
||||
"thoughtUnpaidHint": "寻思因为有未支付的订单而被禁用",
|
||||
"more": "更多",
|
||||
"collapse": "折叠",
|
||||
"pollConfirmDiscard": "您确定要离开吗?您编辑的所有数据都不会被保存。",
|
||||
"discard": "放弃",
|
||||
"fund": "支票",
|
||||
"fundsRecent": "最近支票",
|
||||
"fundCreateNew": "创建新支票",
|
||||
"fundCreateNewHint": "为您的消息创建一个新的红包。选择接收者和金额。",
|
||||
"amountOfSplits": "份数",
|
||||
"enterNumberOfSplits": "单份金额",
|
||||
"orCreateWith": "或\n使用第三方帐户注册",
|
||||
"unindexedFiles": "未索引的文件",
|
||||
"folder": "文件夹",
|
||||
"clearCompleted": "清除已完成的",
|
||||
"uploadSuccess": "上传成功!",
|
||||
"wouldYouLikeToViewFile": "预览此文件?",
|
||||
"contentCantEmpty": "内容不能为空",
|
||||
"features": "特征",
|
||||
"unnamed": "未命名",
|
||||
"fundEnvelopeLoadFailed": "加载支票信封失败",
|
||||
"fundEnvelope": "支票信封",
|
||||
"fundEnvelopeRemaining": "剩余:{} {}",
|
||||
"fundEnvelopeSplit": "拆分:{}",
|
||||
"fundEnvelopeSplitEvenly": "均分",
|
||||
"fundEnvelopeSplitRandomly": "随机",
|
||||
"fundEnvelopeClaimSuccess": "支票领取成功!",
|
||||
"fundEnvelopeStatusCreated": "已创建",
|
||||
"fundEnvelopeStatusPartial": "已领取部分",
|
||||
"fundEnvelopeStatusCompleted": "已全部领取",
|
||||
"fundEnvelopeStatusExpired": "已过期",
|
||||
"fundEnvelopeStatusUnknown": "未知",
|
||||
"fundEnvelopeRecipients": "收款人 ({}/{} 已领取)",
|
||||
"fundEnvelopeExpiredDaysAgo": {
|
||||
"one": "{} 天前过期",
|
||||
"other": "{} 天前过期"
|
||||
},
|
||||
"fundEnvelopeExpiresSoon": "即将到期",
|
||||
"fundEnvelopeExpiresInHours": {
|
||||
"one": "{} 小时后到期",
|
||||
"other": "{}小时后到期"
|
||||
},
|
||||
"fundEnvelopeExpiresInDays": {
|
||||
"one": "{} 天后到期",
|
||||
"other": "{} 天后到期"
|
||||
},
|
||||
"fundEnvelopeRemainingWithSplits": "{} {} / {} 份",
|
||||
"fundEnvelopeUnknownUser": "未知用户",
|
||||
"deleteSite": "删除网站",
|
||||
"deleteSiteConfirm": "您确定要删除此网站?",
|
||||
"siteDeletedSuccess": "网站成功删除",
|
||||
"siteSlug": "标识符",
|
||||
"siteSlugHint": "我的网站",
|
||||
"siteSlugRequired": "请输入一个标识符",
|
||||
"siteSlugInvalid": "标识符只能包含小写字母、数字和短横线",
|
||||
"siteName": "网站名称",
|
||||
"siteNameHint": "我的发布者网站",
|
||||
"siteNameRequired": "请输入网站名称",
|
||||
"siteMode": "模式",
|
||||
"siteModeFullyManaged": "全托管",
|
||||
"siteModeSelfManaged": "自托管",
|
||||
"editPublicationSite": "编辑发布者网站",
|
||||
"deletePublicationSite": "删除发布者网站",
|
||||
"publicationSiteSavedSuccess": "发布者网站成功删除",
|
||||
"publicationSiteDeleteConfirm": "您确定要删除该发布者网站吗?此操作不能撤销。",
|
||||
"publicationSiteDeletedSuccess": "发布者网站成功删除",
|
||||
"newPublicationSite": "新建发布者网站",
|
||||
"siteDetails": "网站描述",
|
||||
"siteInformation": "网站信息",
|
||||
"siteDomain": "域名",
|
||||
"siteCreated": "创建于",
|
||||
"siteUpdated": "更新于",
|
||||
"failedToLoadSite": "加载网站失败",
|
||||
"sitePages": "页面",
|
||||
"noPagesYet": "还没有页面",
|
||||
"createFirstPage": "创建您的第一个页面以开始",
|
||||
"failedToLoadPages": "加载页面失败",
|
||||
"fileManagement": "文件管理",
|
||||
"siteFiles": "文件",
|
||||
"siteFolder": "文件夹",
|
||||
"siteRoot": "根",
|
||||
"noFilesUploadedYet": "还没有文件被删除",
|
||||
"uploadFirstFile": "上传您的第一个文件以开始",
|
||||
"failedToLoadFiles": "加载文件失败",
|
||||
"noFilesFoundInFolder": "选择的文件夹里没有文件",
|
||||
"fileActions": "文件选项",
|
||||
"purgeFiles": "清除文件",
|
||||
"purgeFilesDescription": "从这个网站删除全部文件",
|
||||
"deploySite": "部署网站",
|
||||
"deploySiteDescription": "从ZIP存档上传和部署新版本",
|
||||
"confirmPurge": "确认清空",
|
||||
"purgeFilesConfirm": "这将永久删除上传到本网站的所有文件。此操作无法撤销。您确定要继续吗?",
|
||||
"purgeAllFiles": "清除所有文件",
|
||||
"allFilesPurgedSuccess": "所有文件都清除成功",
|
||||
"failedToPurgeFiles": "清除文件失败:{}",
|
||||
"siteDeployedSuccess": "网站部署成功",
|
||||
"failedToDeploySite": "部署网站失败:{}",
|
||||
"createPage": "创建页面",
|
||||
"editPage": "编辑页面",
|
||||
"pageType": "页面类型",
|
||||
"htmlPage": "HTML 页面",
|
||||
"redirectPage": "重定向页面",
|
||||
"pageTypeRequired": "请选择一个页面类型",
|
||||
"pagePath": "页面路径",
|
||||
"pagePathHint": "例如 /about, /contact 等。",
|
||||
"pagePathRequired": "请输入一个页面路径",
|
||||
"pagePathInvalid": "页面路径只能包含字母、数字、连字符、下划线和斜杠",
|
||||
"pagePathMustStartWithSlash": "页面路径必须以 / 开头",
|
||||
"pagePathNoConsecutiveSlashes": "页面路径不能有连续的斜杠",
|
||||
"pageTitle": "页面标题",
|
||||
"pageTitleHint": "例如关于我们,联系方式等。",
|
||||
"pageTitleRequired": "请输入一个页面标题",
|
||||
"pageContentHtml": "页面内容 (HTML)",
|
||||
"pageContentHint": "<h1>Hello World</h1><p>这是我的页面内容…</p>",
|
||||
"pageContentRequired": "请为这个页面输入HTML内容",
|
||||
"redirectTarget": "重定向目标",
|
||||
"redirectTargetHint": "例如 /new-page, https://example.com 等。",
|
||||
"redirectTargetRequired": "请输入重定向目标",
|
||||
"redirectTargetInvalid": "目标必须是相对路径 (/) 或绝对URL (http/https)",
|
||||
"deletePage": "删除页面",
|
||||
"deletePageConfirm": "您确定要删除此页面?",
|
||||
"savePage": "保存页面",
|
||||
"pageCreatedSuccess": "页面成功创建",
|
||||
"pageUpdatedSuccess": "页面上传成功",
|
||||
"pageDeletedSuccess": "页面已成功删除",
|
||||
"uploadFiles": "上传文件",
|
||||
"uploadPath": "上传路径",
|
||||
"uploadPathHint": "/ (根) 或 /assets/images/",
|
||||
"uploadPathRequired": "请输入一个上传路径",
|
||||
"uploadPathMustStartWithSlash": "路径必须以/开头",
|
||||
"uploadPathNoSpaces": "路径不能包含空格",
|
||||
"uploadPathNoConsecutiveSlashes": "路径不能有连续的斜杠",
|
||||
"percentCompleted": "{}% 已完成",
|
||||
"filesToUpload": "{} 个文件已上传",
|
||||
"fileSizeKb": "大小:{} KB",
|
||||
"uploadingEllipsis": "上传中……",
|
||||
"uploadFilesCount": {
|
||||
"one": "上传 {} 个文件",
|
||||
"other": "上传 {} 个文件"
|
||||
},
|
||||
"allUploadsCompleted": "所有文件已上传",
|
||||
"someUploadsFailed": "一些上传失败",
|
||||
"uploadingInProgress": "上传正在进行中",
|
||||
"readyToUpload": "准备好上传",
|
||||
"allFilesUploadedSuccess": "所有文件已成功上传",
|
||||
"lotteryLastNumberSpecial": "最后选择的数字将是您的特殊数字。",
|
||||
"lotteryMultiplierRequired": "请输入倍率",
|
||||
"lotteryMultiplierRange": "倍率必须在 1 到 10 之间",
|
||||
"dropToShare": "拖到此处以分享",
|
||||
"affiliationSpell": "邀请码",
|
||||
"affiliationSpellHint": "如果您有邀请码,请在这里输入。",
|
||||
"friendsOnline": "在线好友",
|
||||
"createAccountAlmostThere": "即将完成",
|
||||
"createAccountAlmostThereHint": "您距离加入 Solar Network 只差一步了!请完成接下来显示的人机验证。",
|
||||
"createAccountNotice": "在创建账户之前需要了解的事项:",
|
||||
"createAccountConfirmEmail": "在账户创建后,您需要去邮箱激活您的账户,以获得使用所有功能的权限。",
|
||||
"createAccountNoAltAccounts": "在 Solar Network 上禁止使用多个账户或替代账户,这将违反我们的服务条款。",
|
||||
"createAccountAgreeTerms": "我已经阅读并同意这些服务协议。",
|
||||
"createAccountProfile": "创建您的个人资料",
|
||||
"createAccountToS": "查看用户协议 & 服务条款",
|
||||
"updateYourProfileDescription": "在 Solar Network 上完善你的个人形象。",
|
||||
"realmsDescription": "管理您已加入的领域。",
|
||||
"exploreDescription": "探索 Solar Network 上的内容。",
|
||||
"accountDescription": "关于您账户的信息。",
|
||||
"chatDescription": "群组聊天与私聊",
|
||||
"connectionServerDown": "无法连接",
|
||||
"appSettingsDescription": "自定义您的应用程序。",
|
||||
"accountSettingsDescription": "管理您在 Solar Network 上的偏好设置。",
|
||||
"walletDescription": "您的源点钱包。",
|
||||
"relationshipsDescription": "好友与联系人。",
|
||||
"notificationsDescription": "查看最近与您相关的事情。",
|
||||
"settingsFestivalFeatures": "节日限定功能",
|
||||
"categoriesAndTags": "类别 & 标签",
|
||||
"webArticlesStandDescription": "浏览外部网站文章。",
|
||||
"aboutDescription": "了解更多有关 Solar Network 的信息。",
|
||||
"abuseReportsDescription": "查看并管理滥用报告。",
|
||||
"stickerMarketplaceDescription": "浏览并从 Solar Network 市场添加贴纸包。",
|
||||
"webFeedsDescription": "浏览并订阅 Solar Network 的网页订阅源。",
|
||||
"discoverRealmsDescription": "发现领域并加入它们。",
|
||||
"postShuffleDescription": "打乱帖子以随机查看帖子。",
|
||||
"levelingDescription": "查看您的升级进度和历史记录。",
|
||||
"notableDayToday": "{} 就是今天!",
|
||||
"authSessionLogout": "注销登录",
|
||||
"authSessionLogoutHint": "确认要退出登录吗?此操作将仅结束当前浏览会话,不会影响其他已登录的设备。",
|
||||
"filesDescription": "在 Solar Network Drive 管理您的文件。",
|
||||
"postComposeDescription": "撰写一篇新帖子",
|
||||
"searchPostsDescription": "输入标题、正文或关键词进行搜索。",
|
||||
"accountActivationAlert": "激活您的账号",
|
||||
"accountActivationAlertHint": "账户未激活将无法使用完整功能,请查收邮件并点击链接完成激活。",
|
||||
"accountActivationResendHint": "没收到邮件?请点击下方按钮重新发送。若需在账户未激活时更新邮箱,请联系我们的客服。",
|
||||
"accountActivationResend": "重新发送",
|
||||
"ipAddress": "IP 地址",
|
||||
"noFurtherData": "没有更多数据",
|
||||
"searchAnything": "搜索任何内容……",
|
||||
"tapToViewAllNotifications": "轻点显示所有通知",
|
||||
"mostRecent": "最近",
|
||||
"noNotificationsYet": "没有通知",
|
||||
"recentChats": "最近聊天",
|
||||
"noFeaturedPostsAvailable": "没有可用的精选文章",
|
||||
"searchChatsAndPages": "搜索聊天或页面……",
|
||||
"dashboard": "仪表板",
|
||||
"dashboardDescription": "在一处整合您的所有数据。",
|
||||
"postTagsCategories": "文章标签和分类",
|
||||
"postTagsCategoriesDescription": "按类别和标签浏览帖子。",
|
||||
"debugLogs": "调试日志",
|
||||
"debugLogsDescription": "查看调试日志以进行故障排除。",
|
||||
"pinChatRoom": "置顶聊天室",
|
||||
"pinChatRoomDescription": "将此聊天室固定到顶部。",
|
||||
"chatRoomPinned": "聊天室已置顶。",
|
||||
"chatRoomUnpinned": "聊天室已取消置顶。",
|
||||
"pinnedChatRoom": "已置顶的聊天室",
|
||||
"settingsGroupedChatList": "启用群组聊天列表分组",
|
||||
"settingsNotifyWithHaptic": "通知触感反馈",
|
||||
"settingsDashSearchEngine": "网络搜索引擎",
|
||||
"settingsDashSearchEngineHelper": "请使用 %s 作为搜索词的占位符。",
|
||||
"settingsDefaultScreen": "默认起始页面",
|
||||
"notableDayChristmas": "圣诞节",
|
||||
"notableDayNewYear": "新年"
|
||||
}
|
||||
@@ -164,179 +164,176 @@
|
||||
"checkInResultLevel3": "吉",
|
||||
"checkInResultLevel4": "大吉",
|
||||
"checkInActivityTitle": "{} 於 {} 簽到,獲 {} 籤",
|
||||
"eventCalander": "Event Calander",
|
||||
"eventCalanderEmpty": "No events on that day.",
|
||||
"fortuneGraph": "Fortune Trend",
|
||||
"noFortuneData": "No fortune data available for this month.",
|
||||
"creatorHub": "Creator Hub",
|
||||
"creatorHubDescription": "Manage posts, analytics, and more.",
|
||||
"developerPortal": "Developer Portal",
|
||||
"developerPortalDescription": "Build with Solar Network™.",
|
||||
"statusCreateHint": "What's on your mind? Add a status.",
|
||||
"statusCreate": "Add a Status",
|
||||
"statusUpdate": "Update Status",
|
||||
"statusLabel": "Status",
|
||||
"statusAttitude": "Attitude",
|
||||
"attitudePositive": "Positive",
|
||||
"attitudeNeutral": "Neutral",
|
||||
"attitudeNegative": "Negative",
|
||||
"statusInvisible": "Invisible",
|
||||
"statusInvisibleDescription": "Your will be showing as offline to others.",
|
||||
"statusNotDisturb": "Do Not Disturb",
|
||||
"statusNotDisturbDescription": "Push notification will be disabled.",
|
||||
"statusClearTime": "Cleared At",
|
||||
"statusNoAutoClear": "Do not auto clear",
|
||||
"online": "Online",
|
||||
"offline": "Offline",
|
||||
"status": "Status",
|
||||
"statusActivityTitle": "{} is {} {}",
|
||||
"statusActivityEndedTitle": "{} is {} {} until {}",
|
||||
"appSettings": "App Settings",
|
||||
"accountSettings": "Account Settings",
|
||||
"settings": "Settings",
|
||||
"language": "Language",
|
||||
"accountLanguageHint": "This language will be used for email and push notifications.",
|
||||
"settingsDisplayLanguage": "Display Language",
|
||||
"languageFollowSystem": "Follow System",
|
||||
"postsCreatedCount": "Posts",
|
||||
"stickerPacksCreatedCount": "Sticker Packs",
|
||||
"stickersCreatedCount": "Stickers",
|
||||
"upvoteReceived": "Upvotes Recieved",
|
||||
"downvoteReceived": "Downvotes Recieved",
|
||||
"stickerPacks": "Sticker Packs",
|
||||
"createStickerPack": "Create a Sticker Pack",
|
||||
"editStickerPack": "Edit Sticker Pack",
|
||||
"deleteStickerPack": "Delete Sticker Pack",
|
||||
"deleteStickerPackHint": "Are you sure to delete this sticker pack? This action cannot be undone.",
|
||||
"stickerPackPrefix": "Prefix",
|
||||
"stickerPackPrefixHint": "The prefix will be added before each stickers' slug in this pack.",
|
||||
"stickers": "Stickers",
|
||||
"createSticker": "Create a Sticker",
|
||||
"editSticker": "Edit Sticker",
|
||||
"deleteSticker": "Delete Sticker",
|
||||
"deleteStickerHint": "Are you sure to delete this sticker? This action cannot be undone.",
|
||||
"stickerImage": "Image",
|
||||
"stickerSlug": "Slug",
|
||||
"stickerSlugHint": "The slug will be combined with the prefix to form the sticker's unique identifier.",
|
||||
"dataEmpty": "Nothing's here yet.",
|
||||
"pickFile": "Pick a file",
|
||||
"uploading": "Uploading",
|
||||
"uploadingProgress": "Uploading {} of {}",
|
||||
"uploadAll": "Upload All",
|
||||
"stickerCopyPlaceholder": "Copy Placeholder",
|
||||
"realmSelection": "Select a Realm",
|
||||
"individual": "Individual",
|
||||
"firstPostBadgeName": "First Post",
|
||||
"firstPostBadgeDescription": "Created your first post on Solar Network",
|
||||
"popularPostBadgeName": "Popular Post",
|
||||
"popularPostBadgeDescription": "Your post received significant engagement from the community",
|
||||
"viralPostBadgeName": "Viral Post",
|
||||
"viralPostBadgeDescription": "Your post went viral and reached a wide audience",
|
||||
"helpfulCommentBadgeName": "Helpful Comment",
|
||||
"helpfulCommentBadgeDescription": "Your comment was marked as helpful by others",
|
||||
"newcomerBadgeName": "Newcomer",
|
||||
"newcomerBadgeDescription": "Welcome to Solar Network! Start exploring and connecting",
|
||||
"contributorBadgeName": "Contributor",
|
||||
"contributorBadgeDescription": "Actively contributing to the Solar Network community",
|
||||
"expertBadgeName": "Expert",
|
||||
"expertBadgeDescription": "Recognized for your expertise and valuable contributions",
|
||||
"founderBadgeName": "Founder",
|
||||
"founderBadgeDescription": "One of the earliest members of Solar Network",
|
||||
"betaTesterBadgeName": "Beta Tester",
|
||||
"betaTesterBadgeDescription": "Helped test and improve Solar Network during beta",
|
||||
"moderatorBadgeName": "Moderator",
|
||||
"moderatorBadgeDescription": "Helping maintain and moderate the community",
|
||||
"developerBadgeName": "Developer",
|
||||
"developerBadgeDescription": "Contributing to Solar Network's development",
|
||||
"translatorBadgeName": "Translator",
|
||||
"translatorBadgeDescription": "Helping translate Solar Network into different languages",
|
||||
"wallet": "Wallet",
|
||||
"walletCurrencyPoints": "New Solar Points",
|
||||
"fortuneGraph": "运程谶",
|
||||
"noFortuneData": "本月气数未显。",
|
||||
"creatorHub": "著書閣",
|
||||
"creatorHubDescription": "司理帖文、析策諸務。",
|
||||
"developerPortal": "匠造司",
|
||||
"developerPortalDescription": "築基於 Solar Network™。",
|
||||
"statusCreateHint": "何所思?可添近況。",
|
||||
"statusCreate": "增境況",
|
||||
"statusUpdate": "更境況",
|
||||
"statusLabel": "心境",
|
||||
"statusAttitude": "意態",
|
||||
"attitudePositive": "昂揚",
|
||||
"attitudeNeutral": "平瀾",
|
||||
"attitudeNegative": "消沉",
|
||||
"statusInvisible": "隱跡",
|
||||
"statusInvisibleDescription": "汝之形跡不現於人前。",
|
||||
"statusNotDisturb": "勿擾",
|
||||
"statusNotDisturbDescription": "急報皆止。",
|
||||
"statusClearTime": "滌除於",
|
||||
"statusNoAutoClear": "不自滌",
|
||||
"online": "在朝",
|
||||
"offline": "在野",
|
||||
"status": "心境",
|
||||
"statusActivityTitle": "{} 正於 {} {}",
|
||||
"statusActivityEndedTitle": "{} 正於 {} {} 迄於 {}",
|
||||
"appSettings": "應用設置",
|
||||
"accountSettings": "賬戶設置",
|
||||
"settings": "設置",
|
||||
"language": "言語",
|
||||
"accountLanguageHint": "此言語將行於電郵並推送告示。",
|
||||
"settingsDisplayLanguage": "顯示言語",
|
||||
"languageFollowSystem": "從系統之制",
|
||||
"postsCreatedCount": "貼文",
|
||||
"stickerPacksCreatedCount": "貼札集",
|
||||
"stickersCreatedCount": "貼札",
|
||||
"upvoteReceived": "收擢",
|
||||
"downvoteReceived": "收黜",
|
||||
"stickerPacks": "貼札集",
|
||||
"createStickerPack": "始創一貼札集",
|
||||
"editStickerPack": "修訂貼札集",
|
||||
"deleteStickerPack": "革去貼札集",
|
||||
"deleteStickerPackHint": "決革去此貼札譜否?此令無可更赦。",
|
||||
"stickerPackPrefix": "首綴",
|
||||
"stickerPackPrefixHint": "此首綴將加於本帙諸貼札縮略名之前。",
|
||||
"stickers": "貼札",
|
||||
"createSticker": "始創一貼札",
|
||||
"editSticker": "修訂貼札",
|
||||
"deleteSticker": "革去貼札",
|
||||
"deleteStickerHint": "確欲革去此貼札乎?此勢無可逆轉。",
|
||||
"stickerImage": "圖像",
|
||||
"stickerSlug": "籤碼",
|
||||
"stickerSlugHint": "此籤碼將聯題端以構貼札獨契。",
|
||||
"dataEmpty": "此間尚虛。",
|
||||
"pickFile": "擇一卷宗",
|
||||
"uploading": "上呈中",
|
||||
"uploadingProgress": "正呈 {} 於 {}",
|
||||
"uploadAll": "全盤呈上",
|
||||
"stickerCopyPlaceholder": "摹寫虛位",
|
||||
"realmSelection": "擇一界域",
|
||||
"individual": "獨詣",
|
||||
"firstPostBadgeName": "處女作",
|
||||
"firstPostBadgeDescription": "始發帖於 Solar Network",
|
||||
"popularPostBadgeName": "熱帖",
|
||||
"popularPostBadgeDescription": "君作得眾譽",
|
||||
"viralPostBadgeName": "洛陽紙",
|
||||
"viralPostBadgeDescription": "君文傳抄殆遍",
|
||||
"helpfulCommentBadgeName": "裨益論",
|
||||
"helpfulCommentBadgeDescription": "諸君以為斯論足以啟迪來者",
|
||||
"newcomerBadgeName": "新客",
|
||||
"newcomerBadgeDescription": "欣迎加入 Solar Network!請開始遊覽結緣",
|
||||
"contributorBadgeName": "資士",
|
||||
"contributorBadgeDescription": "勤力貢獻於 Solar Network 社群",
|
||||
"expertBadgeName": "達人",
|
||||
"expertBadgeDescription": "以專精與厚獻見稱於世",
|
||||
"founderBadgeName": "肇基",
|
||||
"founderBadgeDescription": "屬 Solar Network 草創先驅",
|
||||
"betaTesterBadgeName": "預勘師",
|
||||
"betaTesterBadgeDescription": "嘗輔試 Solar Network 於初創之境",
|
||||
"moderatorBadgeName": "持衡官",
|
||||
"moderatorBadgeDescription": "協理談筵規矩與秩序",
|
||||
"developerBadgeName": "開物者",
|
||||
"developerBadgeDescription": "獻力於 Solar Network 之功業",
|
||||
"translatorBadgeName": "譯介士",
|
||||
"translatorBadgeDescription": "助譯 Solar Network 為諸邦之言",
|
||||
"wallet": "荷包",
|
||||
"walletCurrencyPoints": "新太陽點",
|
||||
"walletCurrencyShortPoints": "NSP",
|
||||
"walletCurrencyGolds": "The Solar Dollars",
|
||||
"walletCurrencyGolds": "太陽幣",
|
||||
"walletCurrencyShortGolds": "NSD",
|
||||
"retry": "Retry",
|
||||
"creatorHubUnselectedHint": "Pick / create a publisher to get started.",
|
||||
"relationships": "Relationships",
|
||||
"addFriend": "Send a Friend Request",
|
||||
"addFriendShort": "Add as Friend",
|
||||
"addFriendHint": "Add a friend to your relationship list.",
|
||||
"pendingRequest": "Pending",
|
||||
"waitingRequest": "Waiting",
|
||||
"relationshipStatusFriend": "Friend",
|
||||
"relationshipStatusBlocked": "Blocked",
|
||||
"blockUser": "Block User",
|
||||
"unblockUser": "Unblock User",
|
||||
"friendRequestAccepted": "Accepted friend request from {}",
|
||||
"friendRequestDeclined": "Declined friend request from {}",
|
||||
"requestExpiredIn": "Expired in {}",
|
||||
"friendSentRequest": "Sent Friend Requests",
|
||||
"friendSentRequestEmpty": "No sent friend requests",
|
||||
"retry": "復行",
|
||||
"creatorHubUnselectedHint": "擇/創發布者以啟程。",
|
||||
"relationships": "交誼錄",
|
||||
"addFriend": "送締交書",
|
||||
"addFriendShort": "結為知交",
|
||||
"addFriendHint": "添友於交誼錄中。",
|
||||
"pendingRequest": "待決",
|
||||
"waitingRequest": "候音",
|
||||
"relationshipStatusFriend": "知交",
|
||||
"relationshipStatusBlocked": "已阻",
|
||||
"blockUser": "禁此戶",
|
||||
"unblockUser": "解禁",
|
||||
"friendRequestAccepted": "已納 {} 締交書",
|
||||
"friendRequestDeclined": "已謝 {} 締交書",
|
||||
"requestExpiredIn": "效期 {}",
|
||||
"friendSentRequest": "已送締交書",
|
||||
"friendSentRequestEmpty": "未送締交書",
|
||||
"friendSentRequestHint": {
|
||||
"one": "{} friend request sent",
|
||||
"other": "{} friend requests sent"
|
||||
"one": "已送{}締交書",
|
||||
"other": "已送{}締交書"
|
||||
},
|
||||
"levelingProgress": "Leveling Progress",
|
||||
"levelingProgressExperience": "{} EXP",
|
||||
"levelingProgressLevel": "Level {}",
|
||||
"fileUploadingProgress": "Uploading file #{}: {}%",
|
||||
"removeChatMember": "Remove Chat Room Member",
|
||||
"removeChatMemberHint": "Are you sure to remove this member from the room?",
|
||||
"removeRealmMember": "Remove Realm Member",
|
||||
"removeRealmMemberHint": "Are you sure to remove this member from the realm?",
|
||||
"memberRole": "Member Role",
|
||||
"memberRoleHint": "Greater number has higher permission.",
|
||||
"memberRoleEdit": "Edit role for @{}",
|
||||
"openLinkConfirm": "Leaving the Solar Network",
|
||||
"openLinkConfirmDescription": "You're going to leave the Solar Network and open the link ({}) in your browser. It is not related to Solar Network. Beware of phishing and scams.",
|
||||
"brokenLink": "Unable open link {}... It might be broken or missing uri parts...",
|
||||
"copyToClipboard": "Copy to clipboard",
|
||||
"leaveChatRoom": "Leave Chat Room",
|
||||
"leaveChatRoomHint": "Are you sure to leave this chat room?",
|
||||
"leaveRealm": "Leave Realm",
|
||||
"leaveRealmHint": "Are you sure to leave this realm?",
|
||||
"walletNotFound": "Wallet not found",
|
||||
"walletCreateHint": "You don't have a wallet yet. Create one to start using the Solar Network eWallet.",
|
||||
"walletCreate": "Create a Wallet",
|
||||
"settingsServerUrl": "Server URL",
|
||||
"settingsApplied": "The settings has been applied.",
|
||||
"notifications": "Notifications",
|
||||
"posts": "Posts",
|
||||
"settingsBackgroundImage": "Background Image",
|
||||
"settingsBackgroundImageClear": "Clear Background Image",
|
||||
"settingsBackgroundGenerateColor": "Generate color scheme from Bacground Image",
|
||||
"messageNone": "No content to display",
|
||||
"levelingProgress": "修為進境",
|
||||
"levelingProgressExperience": "{} 修為",
|
||||
"levelingProgressLevel": "第 {} 重",
|
||||
"fileUploadingProgress": "傳輸第 {} 宗卷:{}%",
|
||||
"removeChatMember": "逐出談席",
|
||||
"removeChatMemberHint": "確欲逐此客出談筵乎?",
|
||||
"removeRealmMember": "革出界域",
|
||||
"removeRealmMemberHint": "確欲革此員出界域乎?",
|
||||
"memberRole": "成員權階",
|
||||
"memberRoleHint": "數高則權重。",
|
||||
"memberRoleEdit": "修訂 @{} 之職",
|
||||
"openLinkConfirm": "行將離 Solar Network",
|
||||
"openLinkConfirmDescription": "君將辭 Solar Network 而啟 {} 之徑於瀏覽器,此徑與 Solar Network 無干,當心詐偽之害。",
|
||||
"brokenLink": "未能開啟 {} 之鏈……或為殘鏈佚址……",
|
||||
"copyToClipboard": "抄入剪貼板",
|
||||
"leaveChatRoom": "辭離談席",
|
||||
"leaveChatRoomHint": "君確要辭此談席否?",
|
||||
"leaveRealm": "辭離界域",
|
||||
"leaveRealmHint": "君確要辭此界域否?",
|
||||
"walletNotFound": "未見荷包",
|
||||
"walletCreateHint": "君尚未備荷包,請創之以啟用 Solar Network 電子荷包。",
|
||||
"walletCreate": "始創一荷包",
|
||||
"settingsServerUrl": "伺服器網址",
|
||||
"settingsApplied": "諸設定已施畢。",
|
||||
"notifications": "報聞",
|
||||
"posts": "貼文",
|
||||
"settingsBackgroundImage": "底圖",
|
||||
"settingsBackgroundImageClear": "清底圖",
|
||||
"settingsBackgroundGenerateColor": "取背景畫配色",
|
||||
"messageNone": "無文可示",
|
||||
"unreadMessages": {
|
||||
"one": "{} unread message",
|
||||
"other": "{} unread messages"
|
||||
"one": "{} 條未讀訊",
|
||||
"other": "{} 條未讀訊"
|
||||
},
|
||||
"chatBreakNone": "None",
|
||||
"settingsRealmCompactView": "Compact Realm View",
|
||||
"settingsMixedFeed": "Mixed Feed",
|
||||
"settingsAutoTranslate": "Auto Translate",
|
||||
"settingsHideBottomNav": "Hide Bottom Navigation",
|
||||
"settingsSoundEffects": "Sound Effects",
|
||||
"settingsAprilFoolFeatures": "April Fool Features",
|
||||
"settingsEnterToSend": "Enter to Send",
|
||||
"settingsTransparentAppBar": "Transparent App Bar",
|
||||
"settingsCustomFonts": "Custom Fonts",
|
||||
"settingsCustomFontsHint": "Custom fonts will be used for all text in the app. Make sure it is installed on your device.",
|
||||
"settingsColorScheme": "Color Scheme",
|
||||
"postTitle": "Title",
|
||||
"postDescription": "Description",
|
||||
"call": "Call",
|
||||
"done": "Done",
|
||||
"loginResetPasswordSent": "Password reset link sent, please check your email inbox.",
|
||||
"accountDeletion": "Delete Account",
|
||||
"accountDeletionHint": "Are you sure to delete your account? If you confirmed, we will send an confirmation email to your primary email address, you can continue the deletion process by follow the insturctions in the email.",
|
||||
"accountDeletionSent": "Account deletion confirmation email sent, please check your email inbox.",
|
||||
"accountSecurityTitle": "Security",
|
||||
"accountDangerZoneTitle": "Danger Zone",
|
||||
"accountPassword": "Password",
|
||||
"accountPasswordDescription": "Change your account password",
|
||||
"accountPasswordChange": "Change Password",
|
||||
"accountPasswordChangeSent": "Password reset link sent, please check your email inbox.",
|
||||
"accountPasswordChangeDescription": "We will send an email to your primary email address to reset your password.",
|
||||
"chatBreakNone": "無",
|
||||
"settingsRealmCompactView": "緊湊界域視圖",
|
||||
"settingsMixedFeed": "混流饋訊",
|
||||
"settingsAutoTranslate": "自轉譯",
|
||||
"settingsHideBottomNav": "隱底航",
|
||||
"settingsSoundEffects": "音效",
|
||||
"settingsEnterToSend": "叩回車鍵即送",
|
||||
"settingsTransparentAppBar": "透光應用欄",
|
||||
"settingsCustomFonts": "自定字體",
|
||||
"settingsCustomFontsHint": "此字體將通施於應用內文,請先確安於裝置。",
|
||||
"settingsColorScheme": "設置色彩方案",
|
||||
"postTitle": "標題",
|
||||
"postDescription": "状",
|
||||
"call": "传信",
|
||||
"done": "已成矣",
|
||||
"loginResetPasswordSent": "密码重置之链已送至,恳愿于汝之邮址查阅。",
|
||||
"accountDeletion": "除去此账户",
|
||||
"accountDeletionHint": "汝已存心除此账户?如已一意,信将至汝邮址,随信中之言续此行。",
|
||||
"accountDeletionSent": "除此账户之信已送至,请于汝之邮址查阅。",
|
||||
"accountSecurityTitle": "保护措施",
|
||||
"accountDangerZoneTitle": "危险地区",
|
||||
"accountPassword": "密碼",
|
||||
"accountPasswordDescription": "變更账户密碼",
|
||||
"accountPasswordChange": "變更密碼",
|
||||
"accountPasswordChangeSent": "密码重置链接已发送,请查看您的电子邮箱收件箱。",
|
||||
"accountPasswordChangeDescription": "我们将向您的主要电子邮箱发送一封邮件以重置您的密码。",
|
||||
"accountAuthFactor": "Auth factors",
|
||||
"accountAuthFactorDescription": "Multi-factor authentication to ensure safety and convience",
|
||||
"accountDeletionDescription": "Permanently delete your account and all your data",
|
||||
@@ -346,14 +343,14 @@
|
||||
"unauthorizedHint": "You're not signed in or session expired, please sign in again.",
|
||||
"publisherBelongsTo": "Belongs to {}",
|
||||
"postContent": "Content",
|
||||
"postSettings": "Settings",
|
||||
"postPublisherUnselected": "Publisher Unspecified",
|
||||
"postVisibilityPublic": "Public",
|
||||
"postVisibilityFriends": "Friends Only",
|
||||
"postVisibilityUnlisted": "Unlisted",
|
||||
"postVisibilityPrivate": "Private",
|
||||
"postSettings": "設定",
|
||||
"postPublisherUnselected": "发信者未定",
|
||||
"postVisibilityPublic": "众以见",
|
||||
"postVisibilityFriends": "唯友以见",
|
||||
"postVisibilityUnlisted": "非指之人以见",
|
||||
"postVisibilityPrivate": "唯己可见",
|
||||
"postTruncated": "Content truncated, tap to view full post",
|
||||
"copyMessage": "Copy Message",
|
||||
"copyMessage": "抄文",
|
||||
"authFactor": "Authentication Factor",
|
||||
"authFactorDelete": "Delete the Factor",
|
||||
"authFactorDeleteHint": "Are you sure you want to delete this authentication factor? This action cannot be undone.",
|
||||
@@ -366,8 +363,8 @@
|
||||
"authFactorSecretHint": "Create an secret for this factor.",
|
||||
"authFactorQrCodeScan": "Scan this QR code with your authenticator app to set up TOTP authentication",
|
||||
"authFactorNoQrCode": "No QR code available for this authentication factor",
|
||||
"cancel": "Cancel",
|
||||
"confirm": "Confirm",
|
||||
"cancel": "止",
|
||||
"confirm": "认",
|
||||
"authFactorAdditional": "One more step",
|
||||
"authFactorHint": "Contact method hint",
|
||||
"authFactorHintHelper": "You need provide a part of your contact method and we will send the verification code to that contact method if it matched our records",
|
||||
@@ -387,12 +384,12 @@
|
||||
"authDeviceSwipeEditHint": "Swipe left to edit label",
|
||||
"authDeviceSwipeLogoutHint": "Swipe right to logout device",
|
||||
"typingHint": {
|
||||
"one": "{} is typing...",
|
||||
"other": "{} are typing..."
|
||||
"one": "{} 正在执笔……",
|
||||
"other": "{} 正在执笔……"
|
||||
},
|
||||
"settingsAppearance": "Appearance",
|
||||
"settingsServer": "Server",
|
||||
"settingsBehavior": "Behavior",
|
||||
"settingsServer": "伺服器",
|
||||
"settingsBehavior": "为",
|
||||
"settingsDesktop": "Desktop",
|
||||
"settingsKeyboardShortcuts": "Keyboard Shortcuts",
|
||||
"settingsEnterToSendDesktopHint": "Press Enter to send messages, use Shift+Enter for new line.",
|
||||
@@ -684,9 +681,9 @@
|
||||
"articleAttachmentHint": "Attachments must be uploaded and inserted into the article body to be visible.",
|
||||
"postVisibility": "Post Visibility",
|
||||
"currentMembershipMember": "A member of Stellar Program · {}",
|
||||
"membershipPriceStellar": "1200 NSP per month, level 3+ required",
|
||||
"membershipPriceNova": "2400 NSP per month, level 6+ required",
|
||||
"membershipPriceSupernova": "3600 NSP per month, level 9+ required",
|
||||
"membershipPriceStellar": "1200 NSP per month, level 20+ required",
|
||||
"membershipPriceNova": "2400 NSP per month, level 40+ required",
|
||||
"membershipPriceSupernova": "3600 NSP per month, level 60+ required",
|
||||
"sharePostPhoto": "Share Post as Photo",
|
||||
"wouldYouLikeToNavigateToChat": "Would You like to navigate to the chat?",
|
||||
"abuseReports": "Abuse Reports",
|
||||
@@ -707,7 +704,7 @@
|
||||
"aboutScreenDeveloperSectionTitle": "Developer",
|
||||
"aboutScreenContactUsTitle": "Contact Us",
|
||||
"aboutScreenLicenseTitle": "License",
|
||||
"aboutScreenLicenseContent": "GNU Affero General Public License v3.0",
|
||||
"aboutScreenLicenseContent": "AGPLv3",
|
||||
"aboutScreenCopyright": "All rights reserved © Solsynth {}",
|
||||
"aboutScreenMadeWith": "Made with ❤︎️ by Solar Network Team",
|
||||
"aboutScreenFailedToLoadPackageInfo": "Failed to load package info: {error}",
|
||||
@@ -752,21 +749,6 @@
|
||||
"rename": "Rename",
|
||||
"markAsSensitive": "Mark as Sensitive",
|
||||
"fileName": "File name",
|
||||
"sensitiveCategories": {
|
||||
"language": "Language",
|
||||
"sexualContent": "Sexual Content",
|
||||
"violence": "Violence",
|
||||
"profanity": "Profanity",
|
||||
"hateSpeech": "Hate Speech",
|
||||
"racism": "Racism",
|
||||
"adultContent": "Adult Content",
|
||||
"drugAbuse": "Drug Abuse",
|
||||
"alcoholAbuse": "Alcohol Abuse",
|
||||
"gambling": "Gambling",
|
||||
"selfHarm": "Self-harm",
|
||||
"childAbuse": "Child Abuse",
|
||||
"other": "Other"
|
||||
},
|
||||
"poll": "Poll",
|
||||
"pollsRecent": "Recent Polls",
|
||||
"pollCreateNew": "Create New",
|
||||
@@ -1075,5 +1057,490 @@
|
||||
"deleteRecycledFiles": "Delete Recycled Files",
|
||||
"recycledFilesDeleted": "Recycled files deleted successfully",
|
||||
"failedToDeleteRecycledFiles": "Failed to delete recycled files",
|
||||
"upload": "Upload"
|
||||
"upload": "Upload",
|
||||
"deleteMessage": "Delete Message",
|
||||
"deleteMessageConfirmation": "Are you sure you want to delete this message?",
|
||||
"customReaction": "Custom Reaction",
|
||||
"customReactions": "Custom Reactions",
|
||||
"stickerPlaceholder": "Sticker Placeholder",
|
||||
"reactionAttitude": "Reaction Attitude",
|
||||
"addReaction": "Add Reaction",
|
||||
"eventCalendar": "Event Calendar",
|
||||
"eventCalendarEmpty": "No events on that day.",
|
||||
"walletStats": "Wallet Statistics",
|
||||
"totalTransactions": "Total Transactions",
|
||||
"totalOrders": "Total Orders",
|
||||
"totalIncome": "Total Income",
|
||||
"totalOutgoing": "Total Outgoing",
|
||||
"netBalance": "Net Balance",
|
||||
"messageUpdateLinks": "Server generated links previews",
|
||||
"messageUpdateEdited": "Edited a message",
|
||||
"settingsCardBackgroundOpacity": "Card Background Opacity",
|
||||
"settingsThemeMode": "Theme Mode",
|
||||
"settingsThemeModeSystem": "System",
|
||||
"settingsThemeModeLight": "Light",
|
||||
"settingsThemeModeDark": "Dark",
|
||||
"enterPin": "Enter your PIN code",
|
||||
"chatReplyingTo": "Replying to {}",
|
||||
"chatForwarding": "Forwarding message",
|
||||
"chatEditing": "Editing message",
|
||||
"chatNoContent": "No content",
|
||||
"sensitiveCategories": {
|
||||
"language": "Language",
|
||||
"sexualContent": "Sexual Content",
|
||||
"violence": "Violence",
|
||||
"profanity": "Profanity",
|
||||
"hateSpeech": "Hate Speech",
|
||||
"racism": "Racism",
|
||||
"adultContent": "Adult Content",
|
||||
"drugAbuse": "Drug Abuse",
|
||||
"alcoholAbuse": "Alcohol Abuse",
|
||||
"gambling": "Gambling",
|
||||
"selfHarm": "Self-harm",
|
||||
"childAbuse": "Child Abuse",
|
||||
"other": "Other"
|
||||
},
|
||||
"Searching...": "Searching...",
|
||||
"searchError": "Search failed. Please try again.",
|
||||
"tryDifferentKeywords": "Try different keywords or remove search filters",
|
||||
"settingsWindowOpacity": "Window Opacity",
|
||||
"messageContent": "Message Content",
|
||||
"updateAvailable": "Update available",
|
||||
"noChangelogProvided": "No changelog provided.",
|
||||
"useSecondarySourceForDownload": "Use secondary source for download",
|
||||
"installUpdate": "Install update",
|
||||
"openReleasePage": "Open release page",
|
||||
"postCompose": "Compose Post",
|
||||
"postPublish": "Publish Post",
|
||||
"restoreDraftTitle": "Restore Draft",
|
||||
"restoreDraftMessage": "A draft was found. Do you want to restore it?",
|
||||
"draft": "Draft",
|
||||
"purchaseGift": "Purchase Gift",
|
||||
"selectRecipient": "Select Recipient",
|
||||
"changeRecipient": "Change Recipient",
|
||||
"addMessage": "Add Message",
|
||||
"skipRecipient": "Skip Recipient",
|
||||
"giftSubscriptions": "Gift Subscriptions",
|
||||
"purchaseAGift": "Purchase a Gift",
|
||||
"redeemAGift": "Redeem a Gift",
|
||||
"giftHistory": "Gift History",
|
||||
"sentGifts": "Sent Gifts",
|
||||
"receivedGifts": "Received Gifts",
|
||||
"noSentGifts": "No sent gifts",
|
||||
"noReceivedGifts": "No received gifts",
|
||||
"stellarGift": "Stellar Gift",
|
||||
"novaGift": "Nova Gift",
|
||||
"supernovaGift": "Supernova Gift",
|
||||
"sameAsMembership": "Same as membership",
|
||||
"enterGiftCodeToRedeem": "Enter gift code to redeem",
|
||||
"enterGiftCode": "Enter gift code",
|
||||
"giftPurchased": "Gift Purchased!",
|
||||
"shareCodeWithRecipient": "Share this code with the recipient to redeem the gift.",
|
||||
"openGiftAnyoneCanRedeem": "This is an open gift that anyone can redeem.",
|
||||
"ok": "OK",
|
||||
"selectedRecipient": "Selected recipient",
|
||||
"noRecipientSelected": "No recipient selected",
|
||||
"thisWillBeAnOpenGift": "This will be an open gift",
|
||||
"personalMessage": "Personal Message",
|
||||
"addPersonalMessageForRecipient": "Add a personal message for the recipient",
|
||||
"giftStatusCreated": "Created",
|
||||
"giftStatusSent": "Sent",
|
||||
"giftStatusRedeemed": "Redeemed",
|
||||
"giftStatusCancelled": "Cancelled",
|
||||
"giftStatusExpired": "Expired",
|
||||
"giftStatusUnknown": "Unknown",
|
||||
"giftCodeCopiedToClipboard": "Gift code copied to clipboard",
|
||||
"codeLabel": "Code: ",
|
||||
"subscriptionLabel": "Subscription: ",
|
||||
"toLabel": "To: ",
|
||||
"fromLabel": "From: ",
|
||||
"messageLabel": "Message: ",
|
||||
"giftRedeemed": "Gift Redeemed!",
|
||||
"giftRedeemedSuccessfully": "You have successfully redeemed the gift. Your new subscription is now active.",
|
||||
"cancelGift": "Cancel Gift",
|
||||
"cancelGiftConfirm": "Are you sure you want to cancel this gift? This action cannot be undone.",
|
||||
"giftCancelledSuccessfully": "Gift cancelled successfully",
|
||||
"createFund": "Create Fund",
|
||||
"fundAmount": "Fund Amount",
|
||||
"enterAmount": "Enter Amount",
|
||||
"selectCurrency": "Select Currency",
|
||||
"splitType": "Split Type",
|
||||
"evenSplit": "Even Split",
|
||||
"equalAmountEach": "Equal amount for each recipient",
|
||||
"randomSplit": "Random Split",
|
||||
"randomAmountEach": "Random amount for each recipient",
|
||||
"recipientCount": "Recipient Count",
|
||||
"numberOfRecipients": "Number of Recipients",
|
||||
"addPersonalMessageForRecipients": "Add a personal message for recipients",
|
||||
"invalidAmount": "Invalid amount",
|
||||
"invalidRecipientCount": "Invalid recipient count",
|
||||
"fundOverview": "Fund Overview",
|
||||
"totalFundsSent": "Total Funds Sent",
|
||||
"totalFundsReceived": "Total Funds Received",
|
||||
"transactions": "Transactions",
|
||||
"myFunds": "My Funds",
|
||||
"availableFunds": "Available Funds",
|
||||
"fundStatusCreated": "Created",
|
||||
"fundStatusPartial": "Partially Claimed",
|
||||
"fundStatusCompleted": "Fully Claimed",
|
||||
"fundStatusExpired": "Expired",
|
||||
"fundStatusUnknown": "Unknown",
|
||||
"recipients": "Recipients",
|
||||
"fundClaimedSuccessfully": "Fund claimed successfully!",
|
||||
"claim": "Claim",
|
||||
"noFundsCreated": "No funds created yet",
|
||||
"createYourFirstFund": "Create your first fund to get started",
|
||||
"noAvailableFunds": "No available funds",
|
||||
"fundsWillAppearHere": "Funds you can claim will appear here",
|
||||
"fundCreatedSuccessfully": "Fund created successfully!",
|
||||
"selectRecipients": "Select Recipients",
|
||||
"noRecipientsSelected": "No recipients selected",
|
||||
"selectRecipientsToSendFund": "Select recipients to send the fund to",
|
||||
"addRecipient": "Add Recipient",
|
||||
"addMoreRecipients": "Add More Recipients",
|
||||
"transactionDetails": "Transaction Details",
|
||||
"remarks": "Remarks",
|
||||
"payer": "Payer",
|
||||
"payee": "Payee",
|
||||
"transactionType": "Transaction Type",
|
||||
"transfer": "Transfer",
|
||||
"payment": "Payment",
|
||||
"systemWallet": "System Wallet",
|
||||
"date": "Date",
|
||||
"createTransfer": "Create Transfer",
|
||||
"transferAmount": "Transfer Amount",
|
||||
"selectPayee": "Select Payee",
|
||||
"selectedPayee": "Selected Payee",
|
||||
"noPayeeSelected": "No payee selected",
|
||||
"selectPayeeToTransfer": "Select payee to transfer to",
|
||||
"addRemark": "Add Remark",
|
||||
"transferRemark": "Transfer Remark",
|
||||
"addRemarkForTransfer": "Add remark for transfer",
|
||||
"enterPinToConfirmTransfer": "Enter your 6-digit PIN to confirm transfer",
|
||||
"transferCreatedSuccessfully": "Transfer created successfully!",
|
||||
"postUpdate": "Update",
|
||||
"fileMetadata": "File Metadata",
|
||||
"resend": "Resend",
|
||||
"fileInfoTitle": "File Information",
|
||||
"download": "Download",
|
||||
"info": "Info",
|
||||
"noStickers": "No Stickers",
|
||||
"noStickersInPack": "This pack does not contains stickers",
|
||||
"noStickerPacks": "No Sticker Packs",
|
||||
"refresh": "Refresh",
|
||||
"spoiler": "Spoiler",
|
||||
"activityHeatmap": "Activity Heatmap",
|
||||
"custom": "Custom",
|
||||
"usernameColor": "Username Color",
|
||||
"colorType": "Color Type",
|
||||
"plain": "Plain",
|
||||
"gradient": "Gradient",
|
||||
"colorValue": "Color Value",
|
||||
"gradientDirection": "Gradient Direction",
|
||||
"gradientDirectionToRight": "To Right",
|
||||
"gradientDirectionToLeft": "To Left",
|
||||
"gradientDirectionToBottom": "To Bottom",
|
||||
"gradientDirectionToTop": "To Top",
|
||||
"gradientDirectionToBottomRight": "To Bottom Right",
|
||||
"gradientDirectionToBottomLeft": "To Bottom Left",
|
||||
"gradientDirectionToTopRight": "To Top Right",
|
||||
"gradientDirectionToTopLeft": "To Top Left",
|
||||
"gradientColors": "Gradient Colors",
|
||||
"color": "Color",
|
||||
"addColor": "Add Color",
|
||||
"availableWithYourPlan": "Available with your plan",
|
||||
"upgradeRequired": "Upgrade required",
|
||||
"settingsDisableAnimation": "Disable Animation",
|
||||
"addTag": "Add Tag",
|
||||
"accountConnectionProviderSpotify": "Spotify",
|
||||
"accountConnectionProviderSteam": "Steam",
|
||||
"timezoneNotFound": "Time zone not found",
|
||||
"awardPoints": "Awarded {} points",
|
||||
"postFeaturedOn": "Post featured on {}",
|
||||
"messageSentAt": "Sent at {}",
|
||||
"myTickets": "My Tickets",
|
||||
"drawHistory": "Draw History",
|
||||
"lottery": "Lottery",
|
||||
"noLotteryTickets": "No lottery tickets yet",
|
||||
"buyYourFirstTicket": "Buy your first lottery ticket to get started!",
|
||||
"buyTicket": "Buy Ticket",
|
||||
"ticketNumbers": "Numbers: {}, Special: {}",
|
||||
"cost": "Cost",
|
||||
"multiplier": "Multiplier",
|
||||
"prizeWon": "Prize Won",
|
||||
"pending": "Pending",
|
||||
"drawn": "Drawn",
|
||||
"won": "Won",
|
||||
"lost": "Lost",
|
||||
"noDrawHistory": "No draw history yet",
|
||||
"buyLotteryTicket": "Buy Lottery Ticket",
|
||||
"selectNumbers": "Select Numbers",
|
||||
"select5UniqueNumbers": "Select 5 unique numbers",
|
||||
"selectSpecialNumber": "Select Special Number",
|
||||
"selectMultiplier": "Select Multiplier",
|
||||
"baseCost": "Base Cost",
|
||||
"totalCost": "Total Cost",
|
||||
"prizeStructure": "Prize Structure",
|
||||
"enterPinToConfirmPurchase": "Enter your PIN to confirm purchase",
|
||||
"ticketPurchasedSuccessfully": "Ticket purchased successfully!",
|
||||
"winningNumbers": "Winning Numbers",
|
||||
"specialNumber": "Special Number",
|
||||
"totalTickets": "Total Tickets",
|
||||
"totalWinners": "Total Winners",
|
||||
"prizePool": "Prize Pool",
|
||||
"enterPinToConfirmPayment": "Enter your PIN code to confirm payment",
|
||||
"purchase": "Purchase",
|
||||
"multiplierLabel": "Multiplier",
|
||||
"specialOnly": "Special Only",
|
||||
"matches": "Matches",
|
||||
"thoughtDefaultTopic": "Reflection",
|
||||
"thoughtAiName": "SN-chan",
|
||||
"thoughtUserName": "You",
|
||||
"thoughtStreamingHint": "Sn-chan is thinking...",
|
||||
"thoughtInputHint": "Ask sn-chan anything...",
|
||||
"thoughtNewConversation": "Start New Conversation",
|
||||
"thoughtParseError": "Failed to parse AI response",
|
||||
"thoughtFunctionCall": "Use {}",
|
||||
"aiThought": "AI Thought",
|
||||
"aiThoughtTitle": "Let sn-chan think",
|
||||
"postReferenceUnavailable": "Referenced post is unavailable",
|
||||
"fabLocation": "FAB Location",
|
||||
"activities": "Activities",
|
||||
"presenceTypeGaming": "Playing",
|
||||
"presenceTypeMusic": "Listening to Music",
|
||||
"presenceTypeWorkout": "Working out",
|
||||
"articleCompose": "Compose Article",
|
||||
"backToHub": "Back to Hub",
|
||||
"advancedFilters": "Advanced Filters",
|
||||
"searchPosts": "Search Posts",
|
||||
"sortBy": "Sort by",
|
||||
"fromDate": "From Date",
|
||||
"toDate": "To Date",
|
||||
"popularity": "Popularity",
|
||||
"descendingOrder": "Descending Order",
|
||||
"selectDate": "Select Date",
|
||||
"pinnedPosts": "Pinned Posts",
|
||||
"customReactionHint": "Custom Reaction allow you to use user uploaded stickers as the symbol of the reaction for the post. Exclusive for Stellar Program members.",
|
||||
"publicationSites": "Publication Sites",
|
||||
"uploadTasks": "Upload Tasks",
|
||||
"thoughtFunctionCallBegin": "Calling tool {}",
|
||||
"thoughtFunctionCallFinish": "{} responded",
|
||||
"thoughtUnpaidHint": "Thinking unavaiable due to unpaid orders",
|
||||
"more": "More",
|
||||
"collapse": "Collapse",
|
||||
"pollConfirmDiscard": "Are you sure you want to leave? All the poll data you're editing will not be saved.",
|
||||
"discard": "Discard",
|
||||
"fund": "Fund",
|
||||
"fundsRecent": "Recent Funds",
|
||||
"fundCreateNew": "Create New",
|
||||
"fundCreateNewHint": "Create a new fund for your message. Select recipients and amount.",
|
||||
"amountOfSplits": "Amount of Splits",
|
||||
"enterNumberOfSplits": "Enter Splits Amount",
|
||||
"orCreateWith": "Or\ncreate with",
|
||||
"unindexedFiles": "Unindexed files",
|
||||
"folder": "Folder",
|
||||
"clearCompleted": "Clear Completed",
|
||||
"uploadSuccess": "Upload successful!",
|
||||
"wouldYouLikeToViewFile": "Would you like to view the file?",
|
||||
"contentCantEmpty": "Content cannot be empty",
|
||||
"features": "Features",
|
||||
"unnamed": "Unnamed",
|
||||
"fundEnvelopeLoadFailed": "Failed to load fund envelope",
|
||||
"fundEnvelope": "Fund Envelope",
|
||||
"fundEnvelopeRemaining": "Remaining: {} {}",
|
||||
"fundEnvelopeSplit": "Split: {}",
|
||||
"fundEnvelopeSplitEvenly": "Evenly",
|
||||
"fundEnvelopeSplitRandomly": "Randomly",
|
||||
"fundEnvelopeClaimSuccess": "Fund claimed successfully!",
|
||||
"fundEnvelopeStatusCreated": "Created",
|
||||
"fundEnvelopeStatusPartial": "Partially Claimed",
|
||||
"fundEnvelopeStatusCompleted": "Fully Claimed",
|
||||
"fundEnvelopeStatusExpired": "Expired",
|
||||
"fundEnvelopeStatusUnknown": "Unknown",
|
||||
"fundEnvelopeRecipients": "Recipients ({}/{} claimed)",
|
||||
"fundEnvelopeExpiredDaysAgo": {
|
||||
"one": "Expired {} day ago",
|
||||
"other": "Expired {} days ago"
|
||||
},
|
||||
"fundEnvelopeExpiresSoon": "Expires soon",
|
||||
"fundEnvelopeExpiresInHours": {
|
||||
"one": "Expires in {} hour",
|
||||
"other": "Expires in {} hours"
|
||||
},
|
||||
"fundEnvelopeExpiresInDays": {
|
||||
"one": "Expires in {} day",
|
||||
"other": "Expires in {} days"
|
||||
},
|
||||
"fundEnvelopeRemainingWithSplits": "{} {} / {} splits",
|
||||
"fundEnvelopeUnknownUser": "Unknown User",
|
||||
"deleteSite": "Delete Site",
|
||||
"deleteSiteConfirm": "Are you sure you want to delete this site?",
|
||||
"siteDeletedSuccess": "Site deleted successfully",
|
||||
"siteSlug": "Slug",
|
||||
"siteSlugHint": "my-site",
|
||||
"siteSlugRequired": "Please enter a slug",
|
||||
"siteSlugInvalid": "Slug can only contain lowercase letters, numbers, and dashes",
|
||||
"siteName": "Site Name",
|
||||
"siteNameHint": "My Publication Site",
|
||||
"siteNameRequired": "Please enter a site name",
|
||||
"siteMode": "Mode",
|
||||
"siteModeFullyManaged": "Fully Managed",
|
||||
"siteModeSelfManaged": "Self-Managed",
|
||||
"editPublicationSite": "Edit Publication Site",
|
||||
"deletePublicationSite": "Delete Publication Site",
|
||||
"publicationSiteSavedSuccess": "Publication site saved successfully",
|
||||
"publicationSiteDeleteConfirm": "Are you sure you want to delete this publication site? This action cannot be undone.",
|
||||
"publicationSiteDeletedSuccess": "Publication site deleted successfully",
|
||||
"newPublicationSite": "New Publication Site",
|
||||
"siteDetails": "Site Details",
|
||||
"siteInformation": "Site Information",
|
||||
"siteDomain": "Domain",
|
||||
"siteCreated": "Created",
|
||||
"siteUpdated": "Updated",
|
||||
"failedToLoadSite": "Failed to load site",
|
||||
"sitePages": "Pages",
|
||||
"noPagesYet": "No pages yet",
|
||||
"createFirstPage": "Create your first page to get started",
|
||||
"failedToLoadPages": "Failed to load pages",
|
||||
"fileManagement": "File Management",
|
||||
"siteFiles": "Files",
|
||||
"siteFolder": "Folder",
|
||||
"siteRoot": "Root",
|
||||
"noFilesUploadedYet": "No files uploaded yet",
|
||||
"uploadFirstFile": "Upload your first file to get started",
|
||||
"failedToLoadFiles": "Failed to load files",
|
||||
"noFilesFoundInFolder": "No files found in the selected folder",
|
||||
"fileActions": "File Actions",
|
||||
"purgeFiles": "Purge Files",
|
||||
"purgeFilesDescription": "Remove all uploaded files from the site",
|
||||
"deploySite": "Deploy Site",
|
||||
"deploySiteDescription": "Upload and deploy a new version from ZIP archive",
|
||||
"confirmPurge": "Confirm Purge",
|
||||
"purgeFilesConfirm": "This will permanently delete all files uploaded to this site. This action cannot be undone. Are you sure you want to continue?",
|
||||
"purgeAllFiles": "Purge All Files",
|
||||
"allFilesPurgedSuccess": "All files purged successfully",
|
||||
"failedToPurgeFiles": "Failed to purge files: {}",
|
||||
"siteDeployedSuccess": "Site deployed successfully",
|
||||
"failedToDeploySite": "Failed to deploy site: {}",
|
||||
"createPage": "Create Page",
|
||||
"editPage": "Edit Page",
|
||||
"pageType": "Page Type",
|
||||
"htmlPage": "HTML Page",
|
||||
"redirectPage": "Redirect Page",
|
||||
"pageTypeRequired": "Please select a page type",
|
||||
"pagePath": "Page Path",
|
||||
"pagePathHint": "/about, /contact, etc.",
|
||||
"pagePathRequired": "Please enter a page path",
|
||||
"pagePathInvalid": "Page path can only contain letters, numbers, hyphens, underscores, and slashes",
|
||||
"pagePathMustStartWithSlash": "Page path must start with /",
|
||||
"pagePathNoConsecutiveSlashes": "Page path cannot have consecutive slashes",
|
||||
"pageTitle": "Page Title",
|
||||
"pageTitleHint": "About Us, Contact, etc.",
|
||||
"pageTitleRequired": "Please enter a page title",
|
||||
"pageContentHtml": "Page Content (HTML)",
|
||||
"pageContentHint": "<h1>Hello World</h1><p>This is my page content...</p>",
|
||||
"pageContentRequired": "Please enter HTML content for the page",
|
||||
"redirectTarget": "Redirect Target",
|
||||
"redirectTargetHint": "/new-page, https://example.com, etc.",
|
||||
"redirectTargetRequired": "Please enter a redirect target",
|
||||
"redirectTargetInvalid": "Target must be a relative path (/) or absolute URL (http/https)",
|
||||
"deletePage": "Delete Page",
|
||||
"deletePageConfirm": "Are you sure you want to delete this page?",
|
||||
"savePage": "Save Page",
|
||||
"pageCreatedSuccess": "Page created successfully",
|
||||
"pageUpdatedSuccess": "Page updated successfully",
|
||||
"pageDeletedSuccess": "Page deleted successfully",
|
||||
"uploadFiles": "Upload Files",
|
||||
"uploadPath": "Upload Path",
|
||||
"uploadPathHint": "/ (root) or /assets/images/",
|
||||
"uploadPathRequired": "Please enter an upload path",
|
||||
"uploadPathMustStartWithSlash": "Path must start with /",
|
||||
"uploadPathNoSpaces": "Path cannot contain spaces",
|
||||
"uploadPathNoConsecutiveSlashes": "Path cannot have consecutive slashes",
|
||||
"percentCompleted": "{}% completed",
|
||||
"filesToUpload": "{} files to upload",
|
||||
"fileSizeKb": "Size: {} KB",
|
||||
"uploadingEllipsis": "Uploading...",
|
||||
"uploadFilesCount": {
|
||||
"one": "Upload {} File",
|
||||
"other": "Upload {} Files"
|
||||
},
|
||||
"allUploadsCompleted": "All uploads completed",
|
||||
"someUploadsFailed": "Some uploads failed",
|
||||
"uploadingInProgress": "Uploading in progress",
|
||||
"readyToUpload": "Ready to upload",
|
||||
"allFilesUploadedSuccess": "All files uploaded successfully",
|
||||
"lotteryLastNumberSpecial": "The last selected number will be your special number.",
|
||||
"lotteryMultiplierRequired": "Please enter a multiplier",
|
||||
"lotteryMultiplierRange": "Multiplier must be between 1 and 10",
|
||||
"dropToShare": "Drop to share",
|
||||
"affiliationSpell": "Affiliation Spell",
|
||||
"affiliationSpellHint": "If you have an affiliation spell, enter it here.",
|
||||
"friendsOnline": "Friends Online",
|
||||
"createAccountAlmostThere": "Almost There",
|
||||
"createAccountAlmostThereHint": "You're one step away from joining the Solar Network! Please solve the captcha puzzle shows next.",
|
||||
"createAccountNotice": "Things you need to know before you create an account:",
|
||||
"createAccountConfirmEmail": "After your account being created, you need go to your email inbox to active your account to get permission to use all features.",
|
||||
"createAccountNoAltAccounts": "Multiple or alternative accounts are banned from the Solar Network, that will violates our terms of services.",
|
||||
"createAccountAgreeTerms": "I've read these terms and agree to the terms of service.",
|
||||
"createAccountProfile": "Create your profile",
|
||||
"createAccountToS": "Review Terms & Conditions",
|
||||
"updateYourProfileDescription": "Adjust how you looks on the Solar Network.",
|
||||
"realmsDescription": "Manage realms you've joined.",
|
||||
"exploreDescription": "Explore contents on the Solar Network.",
|
||||
"accountDescription": "Information about your account.",
|
||||
"chatDescription": "Group Chats and Direct Messages",
|
||||
"connectionServerDown": "Unable to Connect",
|
||||
"appSettingsDescription": "Customize your app.",
|
||||
"accountSettingsDescription": "Manage your preferences on the Solar Network.",
|
||||
"walletDescription": "Your source point wallet.",
|
||||
"relationshipsDescription": "Friends and connections.",
|
||||
"notificationsDescription": "See what's happended related to you recently.",
|
||||
"settingsFestivalFeatures": "Festival Limited Features",
|
||||
"categoriesAndTags": "Categories & Tags",
|
||||
"webArticlesStandDescription": "Explore external sites articles.",
|
||||
"aboutDescription": "Learn more about the Solar Network.",
|
||||
"abuseReportsDescription": "View and manage abuse reports.",
|
||||
"stickerMarketplaceDescription": "Browse and add sticker packs from the Solar Network marketplace.",
|
||||
"webFeedsDescription": "Browse and subscribe to web feeds from the Solar Network.",
|
||||
"discoverRealmsDescription": "Discover new realms and join them.",
|
||||
"postShuffleDescription": "Shuffle posts to see the posts randomly.",
|
||||
"levelingDescription": "See your leveling progress and history.",
|
||||
"notableDayToday": "{} is today!",
|
||||
"authSessionLogout": "Logout Session",
|
||||
"authSessionLogoutHint": "Are you sure you want to logout this session? This will terminate this specific login session.",
|
||||
"filesDescription": "Manage your files on the Solar Network Drive.",
|
||||
"postComposeDescription": "Compose a new post",
|
||||
"searchPostsDescription": "Search posts by title, content, or else.",
|
||||
"accountActivationAlert": "Activate your account",
|
||||
"accountActivationAlertHint": "Unactivated account may leads to various of permission issues, activate your account by clicking the link we sent to your email inbox.",
|
||||
"accountActivationResendHint": "Didn't see it? Try click the button below to resend one. If you need to update your email while your account was unactivated, feel free to contact our customer service.",
|
||||
"accountActivationResend": "Resend",
|
||||
"ipAddress": "IP Address",
|
||||
"noFurtherData": "No further data",
|
||||
"searchAnything": "Search Anything...",
|
||||
"tapToViewAllNotifications": "Tap to view all notifications",
|
||||
"mostRecent": "Most Recent",
|
||||
"noNotificationsYet": "No notifications yet",
|
||||
"recentChats": "Recent Chats",
|
||||
"noFeaturedPostsAvailable": "No featured posts available",
|
||||
"searchChatsAndPages": "Search chats and pages...",
|
||||
"dashboard": "Dashboard",
|
||||
"dashboardDescription": "All your data in one place.",
|
||||
"postTagsCategories": "Post Tags and Categories",
|
||||
"postTagsCategoriesDescription": "Browse posts by category and tags.",
|
||||
"debugLogs": "Debug Logs",
|
||||
"debugLogsDescription": "View debug logs for troubleshooting.",
|
||||
"pinChatRoom": "Pin Chat Room",
|
||||
"pinChatRoomDescription": "Pin this chat room to the top.",
|
||||
"chatRoomPinned": "Chat room pinned successfully.",
|
||||
"chatRoomUnpinned": "Chat room unpinned successfully.",
|
||||
"pinnedChatRoom": "Pinned Rooms",
|
||||
"settingsGroupedChatList": "Grouped Chat List",
|
||||
"settingsNotifyWithHaptic": "Notification with Haptic Feedback",
|
||||
"settingsDashSearchEngine": "Search Engine for web",
|
||||
"settingsDashSearchEngineHelper": "Use %s as the placeholder for the query.",
|
||||
"settingsDefaultScreen": "Default Screen",
|
||||
"notableDayChristmas": "Christmas",
|
||||
"notableDayNewYear": "New Year"
|
||||
}
|
||||
@@ -164,8 +164,6 @@
|
||||
"checkInResultLevel3": "好運",
|
||||
"checkInResultLevel4": "最佳運氣",
|
||||
"checkInActivityTitle": "{} 在 {} 簽到並獲得了 {}",
|
||||
"eventCalander": "活動日曆",
|
||||
"eventCalanderEmpty": "該日無活動。",
|
||||
"fortuneGraph": "時運趨勢",
|
||||
"noFortuneData": "本月沒有時運數據。",
|
||||
"creatorHub": "創作者中心",
|
||||
@@ -316,7 +314,6 @@
|
||||
"settingsAutoTranslate": "自動翻譯",
|
||||
"settingsHideBottomNav": "隱藏底部導航",
|
||||
"settingsSoundEffects": "音效",
|
||||
"settingsAprilFoolFeatures": "愚人節功能",
|
||||
"settingsEnterToSend": "按下 Enter 發送",
|
||||
"settingsTransparentAppBar": "使用完全透明的狀態欄",
|
||||
"settingsCustomFonts": "自定義字體",
|
||||
@@ -684,9 +681,9 @@
|
||||
"articleAttachmentHint": "附件必須上傳並插入到文章主體中才能顯示出來。",
|
||||
"postVisibility": "可見性",
|
||||
"currentMembershipMember": "恆星計劃成員 · {}",
|
||||
"membershipPriceStellar": "需要用戶等級 3+,每月價格 1200 NSP",
|
||||
"membershipPriceNova": "需要用戶等級 6+,每月價格 2400 NSP",
|
||||
"membershipPriceSupernova": "需要用戶等級 9+,每月價格 3600 NSP",
|
||||
"membershipPriceStellar": "需要用戶等級 20+,每月價格 1200 NSP",
|
||||
"membershipPriceNova": "需要用戶等級 40+,每月價格 2400 NSP",
|
||||
"membershipPriceSupernova": "需要用戶等級 60+,每月價格 3600 NSP",
|
||||
"sharePostPhoto": "通過圖片分享帖子",
|
||||
"wouldYouLikeToNavigateToChat": "你想要前往聊天頁面嗎?",
|
||||
"abuseReports": "舉報",
|
||||
@@ -752,21 +749,6 @@
|
||||
"rename": "重命名",
|
||||
"markAsSensitive": "標記為敏感",
|
||||
"fileName": "文件名",
|
||||
"sensitiveCategories": {
|
||||
"language": "語言",
|
||||
"sexualContent": "色情內容",
|
||||
"violence": "暴力",
|
||||
"profanity": "褻瀆",
|
||||
"hateSpeech": "仇恨言論",
|
||||
"racism": "種族主義",
|
||||
"adultContent": "成人內容",
|
||||
"drugAbuse": "藥物濫用",
|
||||
"alcoholAbuse": "酗酒",
|
||||
"gambling": "賭博",
|
||||
"selfHarm": "自殘",
|
||||
"childAbuse": "虐待兒童",
|
||||
"other": "其他"
|
||||
},
|
||||
"poll": "投票",
|
||||
"pollsRecent": "最近投票",
|
||||
"pollCreateNew": "創建新投票",
|
||||
@@ -1076,6 +1058,489 @@
|
||||
"recycledFilesDeleted": "已回收檔案刪除成功",
|
||||
"failedToDeleteRecycledFiles": "已回收檔案刪除失敗",
|
||||
"upload": "上傳",
|
||||
"deleteMessage": "刪除訊息",
|
||||
"deleteMessageConfirmation": "確定要刪除此郵件嗎?",
|
||||
"customReaction": "自訂反應",
|
||||
"customReactions": "自訂反應",
|
||||
"stickerPlaceholder": "貼紙佔位符",
|
||||
"reactionAttitude": "反應態度",
|
||||
"addReaction": "添加反應",
|
||||
"eventCalendar": "事件日曆",
|
||||
"eventCalendarEmpty": "該日無活動。",
|
||||
"walletStats": "錢包統計",
|
||||
"totalTransactions": "交易總數",
|
||||
"totalOrders": "訂單總數",
|
||||
"totalIncome": "總收入",
|
||||
"totalOutgoing": "總支出",
|
||||
"netBalance": "淨餘額",
|
||||
"messageUpdateLinks": "伺服器產生的連結預覽",
|
||||
"messageUpdateEdited": "編輯一則訊息",
|
||||
"settingsCardBackgroundOpacity": "卡片背景不透明度",
|
||||
"settingsThemeMode": "主題模式",
|
||||
"settingsThemeModeSystem": "跟隨系統",
|
||||
"settingsThemeModeLight": "淺色",
|
||||
"settingsThemeModeDark": "暗色",
|
||||
"enterPin": "請輸入您的PIN碼",
|
||||
"chatReplyingTo": "回復給 {}",
|
||||
"chatForwarding": "正在轉傳訊息",
|
||||
"chatEditing": "訊息編輯中",
|
||||
"chatNoContent": "內容為空",
|
||||
"sensitiveCategories": {
|
||||
"language": "語言",
|
||||
"sexualContent": "色情內容",
|
||||
"violence": "暴力",
|
||||
"profanity": "褻瀆",
|
||||
"hateSpeech": "仇恨言論",
|
||||
"racism": "種族主義",
|
||||
"adultContent": "成人內容",
|
||||
"drugAbuse": "藥物濫用",
|
||||
"alcoholAbuse": "酗酒",
|
||||
"gambling": "賭博",
|
||||
"selfHarm": "自殘",
|
||||
"childAbuse": "虐待兒童",
|
||||
"other": "其他"
|
||||
},
|
||||
"Searching...": "檢索中……",
|
||||
"searchError": "付款失敗,請重試。",
|
||||
"tryDifferentKeywords": "嘗試不同的關鍵字或刪除搜尋過濾器",
|
||||
"settingsWindowOpacity": "視窗不透明度",
|
||||
"messageContent": "訊息內容",
|
||||
"updateAvailable": "更新可用",
|
||||
"noChangelogProvided": "無更新紀錄。",
|
||||
"useSecondarySourceForDownload": "使用次要來源下載",
|
||||
"installUpdate": "安装更新",
|
||||
"openReleasePage": "開啟發行頁面",
|
||||
"postCompose": "撰寫帖子",
|
||||
"postPublish": "發佈帖子"
|
||||
}
|
||||
"postPublish": "發佈帖子",
|
||||
"restoreDraftTitle": "還原草稿",
|
||||
"restoreDraftMessage": "發現了一個草稿。你想要恢復它嗎?",
|
||||
"draft": "草稿",
|
||||
"purchaseGift": "充值有禮",
|
||||
"selectRecipient": "選擇收件者",
|
||||
"changeRecipient": "修改款件人",
|
||||
"addMessage": "添加消息",
|
||||
"skipRecipient": "跳過款件人",
|
||||
"giftSubscriptions": "贈送訂閱",
|
||||
"purchaseAGift": "充值有禮",
|
||||
"redeemAGift": "兌換禮物",
|
||||
"giftHistory": "禮物記錄",
|
||||
"sentGifts": "發送禮物",
|
||||
"receivedGifts": "接收禮物",
|
||||
"noSentGifts": "沒有送過禮物",
|
||||
"noReceivedGifts": "没有收到过礼物",
|
||||
"stellarGift": "恆星禮物",
|
||||
"novaGift": "新星禮物",
|
||||
"supernovaGift": "超新星訂閱",
|
||||
"sameAsMembership": "於成員相同",
|
||||
"enterGiftCodeToRedeem": "輸入禮物程式碼以兌換",
|
||||
"enterGiftCode": "輸入禮物程式碼",
|
||||
"giftPurchased": "已購買禮物!",
|
||||
"shareCodeWithRecipient": "與收件人分享此程式碼來兌換禮物。",
|
||||
"openGiftAnyoneCanRedeem": "這是一份任何人都可以兌換的公開禮物。",
|
||||
"ok": "好的",
|
||||
"selectedRecipient": "選擇接收者",
|
||||
"noRecipientSelected": "沒有選中的接受者",
|
||||
"thisWillBeAnOpenGift": "這將是一份公開的禮物",
|
||||
"personalMessage": "個人信息",
|
||||
"addPersonalMessageForRecipient": "為收件人添加個人訊息",
|
||||
"giftStatusCreated": "已創建",
|
||||
"giftStatusSent": "發送",
|
||||
"giftStatusRedeemed": "已兌換",
|
||||
"giftStatusCancelled": "已取消",
|
||||
"giftStatusExpired": "已過期",
|
||||
"giftStatusUnknown": "未知",
|
||||
"giftCodeCopiedToClipboard": "禮物程式碼已經複製到剪貼簿",
|
||||
"codeLabel": "程式碼:",
|
||||
"subscriptionLabel": "訂閱:",
|
||||
"toLabel": "至:",
|
||||
"fromLabel": "從:",
|
||||
"messageLabel": "消息:",
|
||||
"giftRedeemed": "禮物已兌換!",
|
||||
"giftRedeemedSuccessfully": "您已成功兌換了禮物。您的新訂閱現在已經生效。",
|
||||
"cancelGift": "取消禮物",
|
||||
"cancelGiftConfirm": "您確定要取消此禮物?此操作無法撤銷。",
|
||||
"giftCancelledSuccessfully": "禮物成功取消",
|
||||
"createFund": "創建支票",
|
||||
"fundAmount": "支票金額",
|
||||
"enterAmount": "輸入金額",
|
||||
"selectCurrency": "選擇貨幣",
|
||||
"splitType": "拆分類型",
|
||||
"evenSplit": "平均拆分",
|
||||
"equalAmountEach": "每個收款人的金額相同",
|
||||
"randomSplit": "隨機拆分",
|
||||
"randomAmountEach": "每個收款人的金額隨機",
|
||||
"recipientCount": "收款人總計",
|
||||
"numberOfRecipients": "收款人數量",
|
||||
"addPersonalMessageForRecipients": "為收款人添加個人信息",
|
||||
"invalidAmount": "無效的金額",
|
||||
"invalidRecipientCount": "收款人數量無效",
|
||||
"fundOverview": "支票概覽",
|
||||
"totalFundsSent": "共發送支票",
|
||||
"totalFundsReceived": "共領取支票",
|
||||
"transactions": "交易",
|
||||
"myFunds": "我的支票",
|
||||
"availableFunds": "可用支票",
|
||||
"fundStatusCreated": "已創建",
|
||||
"fundStatusPartial": "部分領取",
|
||||
"fundStatusCompleted": "已領完",
|
||||
"fundStatusExpired": "已過期",
|
||||
"fundStatusUnknown": "未知",
|
||||
"recipients": "收款人",
|
||||
"fundClaimedSuccessfully": "支票成功領取!",
|
||||
"claim": "領取",
|
||||
"noFundsCreated": "還沒有創建的支票",
|
||||
"createYourFirstFund": "創建您的第一個支票以開始",
|
||||
"noAvailableFunds": "暫無可用支票",
|
||||
"fundsWillAppearHere": "您可以領取的支票將出現在這裡",
|
||||
"fundCreatedSuccessfully": "支票成功創建!",
|
||||
"selectRecipients": "選擇收款人",
|
||||
"noRecipientsSelected": "沒有選擇收款人",
|
||||
"selectRecipientsToSendFund": "選擇收款人將支票發送到",
|
||||
"addRecipient": "添加收款人",
|
||||
"addMoreRecipients": "添加更多收款人",
|
||||
"transactionDetails": "交易詳情",
|
||||
"remarks": "備註",
|
||||
"payer": "付款方",
|
||||
"payee": "交易方",
|
||||
"transactionType": "交易類型",
|
||||
"transfer": "轉帳",
|
||||
"payment": "支付",
|
||||
"systemWallet": "系統錢包",
|
||||
"date": "日期",
|
||||
"createTransfer": "創建交易",
|
||||
"transferAmount": "交易金額",
|
||||
"selectPayee": "請選擇收款人",
|
||||
"selectedPayee": "選定的收款人",
|
||||
"noPayeeSelected": "沒有選擇收款人",
|
||||
"selectPayeeToTransfer": "選擇要轉帳的收款人",
|
||||
"addRemark": "添加備註",
|
||||
"transferRemark": "交易備註",
|
||||
"addRemarkForTransfer": "為轉帳添加備註",
|
||||
"enterPinToConfirmTransfer": "輸入您的 6 位PIN碼以確認轉帳",
|
||||
"transferCreatedSuccessfully": "轉帳成功創建",
|
||||
"postUpdate": "更新",
|
||||
"fileMetadata": "檔案資訊",
|
||||
"resend": "重新發送",
|
||||
"fileInfoTitle": "檔案信息",
|
||||
"download": "下載",
|
||||
"info": "信息",
|
||||
"noStickers": "沒有貼圖",
|
||||
"noStickersInPack": "這個包不包含貼圖",
|
||||
"noStickerPacks": "沒有貼圖包",
|
||||
"refresh": "刷新",
|
||||
"spoiler": "已隱藏",
|
||||
"activityHeatmap": "活动热力图",
|
||||
"custom": "自定義",
|
||||
"usernameColor": "用戶名顏色",
|
||||
"colorType": "顏色類型",
|
||||
"plain": "純色",
|
||||
"gradient": "漸變",
|
||||
"colorValue": "色值",
|
||||
"gradientDirection": "漸變方向",
|
||||
"gradientDirectionToRight": "向右",
|
||||
"gradientDirectionToLeft": "向左",
|
||||
"gradientDirectionToBottom": "向底部",
|
||||
"gradientDirectionToTop": "向上",
|
||||
"gradientDirectionToBottomRight": "向右下角",
|
||||
"gradientDirectionToBottomLeft": "向左下角",
|
||||
"gradientDirectionToTopRight": "向右上角",
|
||||
"gradientDirectionToTopLeft": "向左下角",
|
||||
"gradientColors": "漸變顏色",
|
||||
"color": "顏色",
|
||||
"addColor": "添加顏色",
|
||||
"availableWithYourPlan": "隨您的方案提供",
|
||||
"upgradeRequired": "需要升級",
|
||||
"settingsDisableAnimation": "停用動畫",
|
||||
"addTag": "添加標籤",
|
||||
"accountConnectionProviderSpotify": "Spotify",
|
||||
"accountConnectionProviderSteam": "Steam",
|
||||
"timezoneNotFound": "找不到時區",
|
||||
"awardPoints": "獎賞 {} 點",
|
||||
"postFeaturedOn": "帖文在 {} 被精選",
|
||||
"messageSentAt": "發送在 {}",
|
||||
"myTickets": "我的彩票",
|
||||
"drawHistory": "開獎歷史",
|
||||
"lottery": "彩票",
|
||||
"noLotteryTickets": "還沒有彩票",
|
||||
"buyYourFirstTicket": "購買您的第一張彩票以開始!",
|
||||
"buyTicket": "買彩票",
|
||||
"ticketNumbers": "數字:{},特殊數字:{}",
|
||||
"cost": "花費",
|
||||
"multiplier": "倍率",
|
||||
"prizeWon": "獲勝者",
|
||||
"pending": "待開獎",
|
||||
"drawn": "已開獎",
|
||||
"won": "獲勝",
|
||||
"lost": "失敗",
|
||||
"noDrawHistory": "還沒有開獎曆史",
|
||||
"buyLotteryTicket": "購買彩票",
|
||||
"selectNumbers": "選擇數字",
|
||||
"select5UniqueNumbers": "選擇 5 個不同的數字",
|
||||
"selectSpecialNumber": "選擇特殊數字",
|
||||
"selectMultiplier": "選擇倍率",
|
||||
"baseCost": "基礎花費",
|
||||
"totalCost": "總費用",
|
||||
"prizeStructure": "獎金分級",
|
||||
"enterPinToConfirmPurchase": "輸入您的 PIN 碼以確認購買",
|
||||
"ticketPurchasedSuccessfully": "彩票購買成功!",
|
||||
"winningNumbers": "獲勝數字",
|
||||
"specialNumber": "特殊數字",
|
||||
"totalTickets": "總售出票數",
|
||||
"totalWinners": "總中獎者",
|
||||
"prizePool": "獎池",
|
||||
"enterPinToConfirmPayment": "輸入您的 PIN 碼以確認交易",
|
||||
"purchase": "購買",
|
||||
"multiplierLabel": "倍率",
|
||||
"specialOnly": "僅特殊數字",
|
||||
"matches": "場次",
|
||||
"thoughtDefaultTopic": "尋思",
|
||||
"thoughtAiName": "SN醬",
|
||||
"thoughtUserName": "你",
|
||||
"thoughtStreamingHint": "SN醬正在思考……",
|
||||
"thoughtInputHint": "問SN醬一些東西……",
|
||||
"thoughtNewConversation": "開始新對話",
|
||||
"thoughtParseError": "解析 AI 響應失敗",
|
||||
"thoughtFunctionCall": "使用 {}",
|
||||
"aiThought": "尋思",
|
||||
"aiThoughtTitle": "讓SN醬思考",
|
||||
"postReferenceUnavailable": "應用的帖子不可用",
|
||||
"fabLocation": "底部菜單按鈕位置",
|
||||
"activities": "活動",
|
||||
"presenceTypeGaming": "正在玩",
|
||||
"presenceTypeMusic": "正在聽音樂",
|
||||
"presenceTypeWorkout": "鍛煉中",
|
||||
"articleCompose": "撰寫文章",
|
||||
"backToHub": "返回至主頁",
|
||||
"advancedFilters": "高級篩選",
|
||||
"searchPosts": "搜索帖子",
|
||||
"sortBy": "排序方式",
|
||||
"fromDate": "起始日期",
|
||||
"toDate": "截止日期",
|
||||
"popularity": "按熱度",
|
||||
"descendingOrder": "降序排序",
|
||||
"selectDate": "選擇日期",
|
||||
"pinnedPosts": "已置頂的帖子",
|
||||
"customReactionHint": "自訂反應允許你使用用戶上傳貼紙作為帖子反應的符號,需要恆星計劃訂閱。",
|
||||
"publicationSites": "發佈者網站",
|
||||
"uploadTasks": "上傳任務",
|
||||
"thoughtFunctionCallBegin": "調用工具 {}",
|
||||
"thoughtFunctionCallFinish": "工具 {}",
|
||||
"thoughtUnpaidHint": "尋思因為有未支付的訂單而被禁用",
|
||||
"more": "更多",
|
||||
"collapse": "折疊",
|
||||
"pollConfirmDiscard": "您確定要離開嗎?您編輯的所有資料都不會被保存。",
|
||||
"discard": "Discard",
|
||||
"fund": "支票",
|
||||
"fundsRecent": "最近的支票",
|
||||
"fundCreateNew": "創建新的",
|
||||
"fundCreateNewHint": "為您的消息創建一個新的紅包。選擇接收者和金額。",
|
||||
"amountOfSplits": "份數",
|
||||
"enterNumberOfSplits": "單份金額",
|
||||
"orCreateWith": "或\n使用第三方賬戶登錄",
|
||||
"unindexedFiles": "未索引的檔案",
|
||||
"folder": "文件夾",
|
||||
"clearCompleted": "清除已經完成的",
|
||||
"uploadSuccess": "上傳成功!",
|
||||
"wouldYouLikeToViewFile": "您想查看檔案嗎?",
|
||||
"contentCantEmpty": "內容不能為空",
|
||||
"features": "功能",
|
||||
"unnamed": "未命名",
|
||||
"fundEnvelopeLoadFailed": "載入支票信封失敗",
|
||||
"fundEnvelope": "支票信封",
|
||||
"fundEnvelopeRemaining": "剩餘:{} {}",
|
||||
"fundEnvelopeSplit": "拆分:{}",
|
||||
"fundEnvelopeSplitEvenly": "均分",
|
||||
"fundEnvelopeSplitRandomly": "隨機",
|
||||
"fundEnvelopeClaimSuccess": "支票領取成功!",
|
||||
"fundEnvelopeStatusCreated": "已創建",
|
||||
"fundEnvelopeStatusPartial": "已領取部分",
|
||||
"fundEnvelopeStatusCompleted": "已全部領取",
|
||||
"fundEnvelopeStatusExpired": "已過期",
|
||||
"fundEnvelopeStatusUnknown": "未知",
|
||||
"fundEnvelopeRecipients": "收款人 ({}/{}已領取)",
|
||||
"fundEnvelopeExpiredDaysAgo": {
|
||||
"one": "{}天前過期",
|
||||
"other": "{}天前過期"
|
||||
},
|
||||
"fundEnvelopeExpiresSoon": "即將過期",
|
||||
"fundEnvelopeExpiresInHours": {
|
||||
"one": "{}小時後過期",
|
||||
"other": "{}小時後過期"
|
||||
},
|
||||
"fundEnvelopeExpiresInDays": {
|
||||
"one": "{}天後過期",
|
||||
"other": "{}天後過期"
|
||||
},
|
||||
"fundEnvelopeRemainingWithSplits": "{} {} / {} 份",
|
||||
"fundEnvelopeUnknownUser": "未知用戶",
|
||||
"deleteSite": "刪除網站",
|
||||
"deleteSiteConfirm": "您確定要刪除此網站嗎?",
|
||||
"siteDeletedSuccess": "網站成功刪除",
|
||||
"siteSlug": "標識符",
|
||||
"siteSlugHint": "我的站點",
|
||||
"siteSlugRequired": "請輸入一個標識符",
|
||||
"siteSlugInvalid": "標識符只能包含小寫字母、數字和連字符",
|
||||
"siteName": "網站名稱",
|
||||
"siteNameHint": "我的發佈者網站",
|
||||
"siteNameRequired": "請輸入一個站點名稱",
|
||||
"siteMode": "模式",
|
||||
"siteModeFullyManaged": "全託管",
|
||||
"siteModeSelfManaged": "自託管",
|
||||
"editPublicationSite": "編輯發佈者網站",
|
||||
"deletePublicationSite": "刪除發佈者網站",
|
||||
"publicationSiteSavedSuccess": "發佈者網站保存成功",
|
||||
"publicationSiteDeleteConfirm": "您確定要刪除此發佈者網站嗎?此操作不能撤銷。",
|
||||
"publicationSiteDeletedSuccess": "發佈者網站成功刪除",
|
||||
"newPublicationSite": "新建發佈者網站",
|
||||
"siteDetails": "網站描述",
|
||||
"siteInformation": "網站信息",
|
||||
"siteDomain": "域名",
|
||||
"siteCreated": "創建于",
|
||||
"siteUpdated": "更新于",
|
||||
"failedToLoadSite": "加載網站失敗",
|
||||
"sitePages": "頁面",
|
||||
"noPagesYet": "還沒有頁面",
|
||||
"createFirstPage": "創建您的第一個頁面以開始",
|
||||
"failedToLoadPages": "加載頁面失敗",
|
||||
"fileManagement": "檔案管理器",
|
||||
"siteFiles": "檔案",
|
||||
"siteFolder": "資料夾",
|
||||
"siteRoot": "根",
|
||||
"noFilesUploadedYet": "尚未上傳任何檔案",
|
||||
"uploadFirstFile": "上傳您的第一個檔案以開始",
|
||||
"failedToLoadFiles": "加載檔案失敗",
|
||||
"noFilesFoundInFolder": "在選擇的資料夾中沒有檔案",
|
||||
"fileActions": "檔案選項",
|
||||
"purgeFiles": "清除檔案",
|
||||
"purgeFilesDescription": "從這個網站刪除全部文件",
|
||||
"deploySite": "部署網站",
|
||||
"deploySiteDescription": "從ZIP存檔上傳和部署新版本",
|
||||
"confirmPurge": "確認清空",
|
||||
"purgeFilesConfirm": "這將永久刪除上傳到本網站的所有檔案。此操作無法復原。您確定要繼續嗎?",
|
||||
"purgeAllFiles": "清除所有文檔案",
|
||||
"allFilesPurgedSuccess": "全部檔案成功清空",
|
||||
"failedToPurgeFiles": "清除檔案失敗:{}",
|
||||
"siteDeployedSuccess": "網站成功部署",
|
||||
"failedToDeploySite": "部署網站失敗:{}",
|
||||
"createPage": "創建頁面",
|
||||
"editPage": "編輯頁面",
|
||||
"pageType": "頁面類型",
|
||||
"htmlPage": "HTML 頁面",
|
||||
"redirectPage": "重定向頁面",
|
||||
"pageTypeRequired": "請選擇一個頁面類型",
|
||||
"pagePath": "頁面路徑",
|
||||
"pagePathHint": "例如/about,/contact等",
|
||||
"pagePathRequired": "請輸入一個頁面路徑",
|
||||
"pagePathInvalid": "頁面路徑只能包含字母、數字、連字符、底線和斜線",
|
||||
"pagePathMustStartWithSlash": "頁面路徑以/開始",
|
||||
"pagePathNoConsecutiveSlashes": "頁面路徑不能有連續的斜線",
|
||||
"pageTitle": "頁面標題",
|
||||
"pageTitleHint": "例如About Us,Contact等",
|
||||
"pageTitleRequired": "請輸入一個頁面標題",
|
||||
"pageContentHtml": "頁面內容(HTML)",
|
||||
"pageContentHint": "<h1> Hello World</h1><p>這是我的頁面內容…</p>",
|
||||
"pageContentRequired": "請為頁面輸入HTML內容",
|
||||
"redirectTarget": "重定向目標",
|
||||
"redirectTargetHint": "例如/new-page,https://example.com等",
|
||||
"redirectTargetRequired": "請輸入一個重定向目標",
|
||||
"redirectTargetInvalid": "目標必須是相對路徑(/)或絕對 URL(http/https)",
|
||||
"deletePage": "刪除頁面",
|
||||
"deletePageConfirm": "您確定要刪除此頁面嗎?",
|
||||
"savePage": "保存頁面",
|
||||
"pageCreatedSuccess": "頁面創建成功",
|
||||
"pageUpdatedSuccess": "頁面更新成功",
|
||||
"pageDeletedSuccess": "頁面刪除成功",
|
||||
"uploadFiles": "上傳檔案",
|
||||
"uploadPath": "上傳路徑",
|
||||
"uploadPathHint": "/ (根目錄) 或 /assets/images/",
|
||||
"uploadPathRequired": "請輸入一個上傳路徑",
|
||||
"uploadPathMustStartWithSlash": "路徑以/開始",
|
||||
"uploadPathNoSpaces": "路徑不能包含空格",
|
||||
"uploadPathNoConsecutiveSlashes": "路徑不能包含連續的斜槓",
|
||||
"percentCompleted": "{}%已完成",
|
||||
"filesToUpload": "{} 個檔案要上傳",
|
||||
"fileSizeKb": "大小:{} KB",
|
||||
"uploadingEllipsis": "上傳中……",
|
||||
"uploadFilesCount": {
|
||||
"one": "上傳 {} 個檔案",
|
||||
"other": "上傳 {} 個檔案"
|
||||
},
|
||||
"allUploadsCompleted": "上傳全部完成",
|
||||
"someUploadsFailed": "部分上傳失敗",
|
||||
"uploadingInProgress": "正在上傳",
|
||||
"readyToUpload": "準備好上傳",
|
||||
"allFilesUploadedSuccess": "全部檔案完成上傳",
|
||||
"lotteryLastNumberSpecial": "最後一個選擇的數字將是您的特殊數字。",
|
||||
"lotteryMultiplierRequired": "請輸入一個倍率",
|
||||
"lotteryMultiplierRange": "倍率需要在1到10之間",
|
||||
"dropToShare": "拖拽以分享",
|
||||
"affiliationSpell": "Affiliation Spell",
|
||||
"affiliationSpellHint": "If you have an affiliation spell, enter it here.",
|
||||
"friendsOnline": "Friends Online",
|
||||
"createAccountAlmostThere": "Almost There",
|
||||
"createAccountAlmostThereHint": "You're one step away from joining the Solar Network! Please solve the captcha puzzle shows next.",
|
||||
"createAccountNotice": "Things you need to know before you create an account:",
|
||||
"createAccountConfirmEmail": "After your account being created, you need go to your email inbox to active your account to get permission to use all features.",
|
||||
"createAccountNoAltAccounts": "Multiple or alternative accounts are banned from the Solar Network, that will violates our terms of services.",
|
||||
"createAccountAgreeTerms": "I've read these terms and agree to the terms of service.",
|
||||
"createAccountProfile": "Create your profile",
|
||||
"createAccountToS": "Review Terms & Conditions",
|
||||
"updateYourProfileDescription": "Adjust how you looks on the Solar Network.",
|
||||
"realmsDescription": "Manage realms you've joined.",
|
||||
"exploreDescription": "Explore contents on the Solar Network.",
|
||||
"accountDescription": "Information about your account.",
|
||||
"chatDescription": "Group Chats and Direct Messages",
|
||||
"connectionServerDown": "Unable to Connect",
|
||||
"appSettingsDescription": "Customize your app.",
|
||||
"accountSettingsDescription": "Manage your preferences on the Solar Network.",
|
||||
"walletDescription": "Your source point wallet.",
|
||||
"relationshipsDescription": "Friends and connections.",
|
||||
"notificationsDescription": "See what's happended related to you recently.",
|
||||
"settingsFestivalFeatures": "Festival Limited Features",
|
||||
"categoriesAndTags": "Categories & Tags",
|
||||
"webArticlesStandDescription": "Explore external sites articles.",
|
||||
"aboutDescription": "Learn more about the Solar Network.",
|
||||
"abuseReportsDescription": "View and manage abuse reports.",
|
||||
"stickerMarketplaceDescription": "Browse and add sticker packs from the Solar Network marketplace.",
|
||||
"webFeedsDescription": "Browse and subscribe to web feeds from the Solar Network.",
|
||||
"discoverRealmsDescription": "Discover new realms and join them.",
|
||||
"postShuffleDescription": "Shuffle posts to see the posts randomly.",
|
||||
"levelingDescription": "See your leveling progress and history.",
|
||||
"notableDayToday": "{} is today!",
|
||||
"authSessionLogout": "Logout Session",
|
||||
"authSessionLogoutHint": "Are you sure you want to logout this session? This will terminate this specific login session.",
|
||||
"filesDescription": "Manage your files on the Solar Network Drive.",
|
||||
"postComposeDescription": "Compose a new post",
|
||||
"searchPostsDescription": "Search posts by title, content, or else.",
|
||||
"accountActivationAlert": "Activate your account",
|
||||
"accountActivationAlertHint": "Unactivated account may leads to various of permission issues, activate your account by clicking the link we sent to your email inbox.",
|
||||
"accountActivationResendHint": "Didn't see it? Try click the button below to resend one. If you need to update your email while your account was unactivated, feel free to contact our customer service.",
|
||||
"accountActivationResend": "Resend",
|
||||
"ipAddress": "IP Address",
|
||||
"noFurtherData": "No further data",
|
||||
"searchAnything": "Search Anything...",
|
||||
"tapToViewAllNotifications": "Tap to view all notifications",
|
||||
"mostRecent": "Most Recent",
|
||||
"noNotificationsYet": "No notifications yet",
|
||||
"recentChats": "Recent Chats",
|
||||
"noFeaturedPostsAvailable": "No featured posts available",
|
||||
"searchChatsAndPages": "Search chats and pages...",
|
||||
"dashboard": "Dashboard",
|
||||
"dashboardDescription": "All your data in one place.",
|
||||
"postTagsCategories": "Post Tags and Categories",
|
||||
"postTagsCategoriesDescription": "Browse posts by category and tags.",
|
||||
"debugLogs": "Debug Logs",
|
||||
"debugLogsDescription": "View debug logs for troubleshooting.",
|
||||
"pinChatRoom": "Pin Chat Room",
|
||||
"pinChatRoomDescription": "Pin this chat room to the top.",
|
||||
"chatRoomPinned": "Chat room pinned successfully.",
|
||||
"chatRoomUnpinned": "Chat room unpinned successfully.",
|
||||
"pinnedChatRoom": "Pinned Rooms",
|
||||
"settingsGroupedChatList": "Grouped Chat List",
|
||||
"settingsNotifyWithHaptic": "Notification with Haptic Feedback",
|
||||
"settingsDashSearchEngine": "Search Engine for web",
|
||||
"settingsDashSearchEngineHelper": "Use %s as the placeholder for the query.",
|
||||
"settingsDefaultScreen": "Default Screen",
|
||||
"notableDayChristmas": "Christmas",
|
||||
"notableDayNewYear": "New Year"
|
||||
}
|
||||
BIN
assets/icons/icon-tray.png
Normal file
BIN
assets/icons/icon-tray.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 63 KiB |
1
assets/images/oidc/steam.svg
Normal file
1
assets/images/oidc/steam.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg width="2471" height="2500" viewBox="0 0 256 259" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid"><path d="M127.779 0C60.42 0 5.24 52.412 0 119.014l68.724 28.674a35.812 35.812 0 0 1 20.426-6.366c.682 0 1.356.019 2.02.056l30.566-44.71v-.626c0-26.903 21.69-48.796 48.353-48.796 26.662 0 48.352 21.893 48.352 48.796 0 26.902-21.69 48.804-48.352 48.804-.37 0-.73-.009-1.098-.018l-43.593 31.377c.028.582.046 1.163.046 1.735 0 20.204-16.283 36.636-36.294 36.636-17.566 0-32.263-12.658-35.584-29.412L4.41 164.654c15.223 54.313 64.673 94.132 123.369 94.132 70.818 0 128.221-57.938 128.221-129.393C256 57.93 198.597 0 127.779 0zM80.352 196.332l-15.749-6.568c2.787 5.867 7.621 10.775 14.033 13.47 13.857 5.83 29.836-.803 35.612-14.799a27.555 27.555 0 0 0 .046-21.035c-2.768-6.79-7.999-12.086-14.706-14.909-6.67-2.795-13.811-2.694-20.085-.304l16.275 6.79c10.222 4.3 15.056 16.145 10.794 26.46-4.253 10.314-15.998 15.195-26.22 10.895zm121.957-100.29c0-17.925-14.457-32.52-32.217-32.52-17.769 0-32.226 14.595-32.226 32.52 0 17.926 14.457 32.512 32.226 32.512 17.76 0 32.217-14.586 32.217-32.512zm-56.37-.055c0-13.488 10.84-24.42 24.2-24.42 13.368 0 24.208 10.932 24.208 24.42 0 13.488-10.84 24.421-24.209 24.421-13.359 0-24.2-10.933-24.2-24.42z" fill="#1A1918"/></svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -1,3 +1,6 @@
|
||||
description: This file stores settings for Dart & Flutter DevTools.
|
||||
documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states
|
||||
extensions:
|
||||
- drift: true
|
||||
- provider: true
|
||||
- shared_preferences: true
|
||||
287
docs/activitypub/ACTIVITYPUB_IMPLEMENTATION.md
Normal file
287
docs/activitypub/ACTIVITYPUB_IMPLEMENTATION.md
Normal file
@@ -0,0 +1,287 @@
|
||||
# ActivityPub Implementation for Solar Network
|
||||
|
||||
## Overview
|
||||
|
||||
This document outlines the initial implementation of ActivityPub federation for the Solar Network (DysonNetwork), following the plan outlined in `ACTIVITYPUB_PLAN.md`.
|
||||
|
||||
## What Has Been Created
|
||||
|
||||
### 1. Database Models (DysonNetwork.Shared/Models)
|
||||
|
||||
All ActivityPub-related models are shared across projects and located in `DysonNetwork.Shared/Models/`:
|
||||
|
||||
#### FediverseInstance.cs
|
||||
- Tracks ActivityPub instances (servers) in the fediverse
|
||||
- Stores instance metadata, blocking status, and activity tracking
|
||||
- Links to actors and content from that instance
|
||||
|
||||
#### FediverseActor.cs
|
||||
- Represents remote actors (users/accounts) from other instances
|
||||
- Stores actor information including keys, inbox/outbox URLs
|
||||
- Links to instance and manages relationships
|
||||
- Tracks whether the actor is a bot, locked, or discoverable
|
||||
|
||||
#### FediverseContent.cs
|
||||
- Stores content (posts, notes, etc.) received from the fediverse
|
||||
- Supports multiple content types (Note, Article, Image, Video, etc.)
|
||||
- Includes attachments, mentions, tags, and emojis
|
||||
- Links to local posts for unified display
|
||||
|
||||
#### FediverseActivity.cs
|
||||
- Tracks ActivityPub activities (Create, Follow, Like, Announce, etc.)
|
||||
- Stores raw activity data and processing status
|
||||
- Links to actors, content, and local entities
|
||||
- Supports both incoming and outgoing activities
|
||||
|
||||
#### FediverseRelationship.cs
|
||||
- Manages follow relationships between local and remote actors
|
||||
- Tracks relationship state (Pending, Accepted, Rejected)
|
||||
- Supports muting and blocking
|
||||
- Links to local accounts/publishers
|
||||
|
||||
#### FediverseReaction.cs
|
||||
- Stores reactions (likes, emoji) from both local and remote actors
|
||||
- Links to content and actor
|
||||
- Supports federation of reactions
|
||||
|
||||
### 2. Database Migration
|
||||
|
||||
**File**: `DysonNetwork.Sphere/Migrations/20251228120000_AddActivityPubModels.cs`
|
||||
|
||||
This migration creates the following tables:
|
||||
- `fediverse_instances` - Instance tracking
|
||||
- `fediverse_actors` - Remote actor profiles
|
||||
- `fediverse_contents` - Federated content storage
|
||||
- `fediverse_activities` - Activity tracking and processing
|
||||
- `fediverse_relationships` - Follow relationships
|
||||
- `fediverse_reactions` - Reactions from fediverse
|
||||
|
||||
### 3. API Controllers (DysonNetwork.Sphere/ActivityPub)
|
||||
|
||||
#### WebFingerController.cs
|
||||
- **Endpoint**: `GET /.well-known/webfinger?resource=acct:<username>@<domain>`
|
||||
- **Purpose**: Allows other instances to discover actors via WebFinger protocol
|
||||
- **Response**: Returns actor's inbox/outbox URLs and profile page links
|
||||
- Maps local Publishers to ActivityPub actors
|
||||
|
||||
#### ActivityPubController.cs
|
||||
Provides three main endpoints:
|
||||
|
||||
1. **GET /activitypub/actors/{username}**
|
||||
- Returns ActivityPub actor profile in JSON-LD format
|
||||
- Includes actor's keys, inbox, outbox, followers, and following URLs
|
||||
- Maps SnPublisher to ActivityPub Person type
|
||||
|
||||
2. **GET /activitypub/actors/{username}/outbox**
|
||||
- Returns actor's outbox collection
|
||||
- Lists public posts as ActivityPub activities
|
||||
- Supports pagination
|
||||
|
||||
3. **POST /activitypub/actors/{username}/inbox**
|
||||
- Receives incoming ActivityPub activities
|
||||
- Supports Create, Follow, Like, Announce activities
|
||||
- Placeholder for activity processing logic
|
||||
|
||||
## Architecture
|
||||
|
||||
### Data Flow
|
||||
|
||||
```
|
||||
Remote Instance Solar Network (Sphere)
|
||||
│ │
|
||||
│ ───WebFinger─────> │
|
||||
│ │
|
||||
│ <───Actor JSON──── │
|
||||
│ │
|
||||
│ ───Activity─────> │ → Inbox Processing
|
||||
│ │
|
||||
│ <───Activity────── │ ← Outbox Distribution
|
||||
```
|
||||
|
||||
### Model Relationships
|
||||
|
||||
- `SnFediverseInstance` has many `SnFediverseActor`
|
||||
- `SnFediverseInstance` has many `SnFediverseContent`
|
||||
- `SnFediverseActor` has many `SnFediverseContent`
|
||||
- `SnFediverseActor` has many `SnFediverseActivity`
|
||||
- `SnFediverseActor` has many `SnFediverseRelationship` (as follower and following)
|
||||
- `SnFediverseContent` has many `SnFediverseActivity`
|
||||
- `SnFediverseContent` has many `SnFediverseReaction`
|
||||
- `SnFediverseContent` optionally links to `SnPost` (local copy)
|
||||
|
||||
### Local to Fediverse Mapping
|
||||
|
||||
| Solar Network Model | ActivityPub Type |
|
||||
|-------------------|-----------------|
|
||||
| SnPublisher | Person (Actor) |
|
||||
| SnPost | Note / Article |
|
||||
| SnPostReaction | Like / EmojiReact |
|
||||
| Follow | Follow Activity |
|
||||
| SnPublisherSubscription | Follow Relationship |
|
||||
|
||||
## Next Steps
|
||||
|
||||
### Stage 1: Core Infrastructure ✅ (COMPLETED)
|
||||
- ✅ Create database models for ActivityPub entities
|
||||
- ✅ Create database migration
|
||||
- ✅ Implement basic WebFinger endpoint
|
||||
- ✅ Implement basic Actor endpoint
|
||||
- ✅ Implement Inbox/Outbox endpoints
|
||||
|
||||
### Stage 2: Activity Processing ✅ (COMPLETED)
|
||||
- ✅ Implement HTTP Signature verification (ActivityPubSignatureService)
|
||||
- ✅ Process incoming activities:
|
||||
- Follow/Accept/Reject
|
||||
- Create (incoming posts)
|
||||
- Like/Announce
|
||||
- Delete/Update
|
||||
- Undo
|
||||
- ✅ Generate outgoing activities (ActivityPubDeliveryService)
|
||||
- ✅ Queue and retry failed deliveries (basic implementation)
|
||||
|
||||
### Stage 3: Key Management ✅ (COMPLETED)
|
||||
- ✅ Generate RSA key pairs for each Publisher (ActivityPubKeyService)
|
||||
- ✅ Store public/private keys in Publisher.Meta
|
||||
- ✅ Sign outgoing HTTP requests
|
||||
- ✅ Verify incoming HTTP signatures
|
||||
|
||||
### Stage 4: Content Federation (IN PROGRESS)
|
||||
- ✅ Convert between SnPost and ActivityPub Note/Article (basic mapping)
|
||||
- ✅ Handle content attachments and media
|
||||
- ✅ Support content warnings and sensitive content
|
||||
- ✅ Handle replies, boosts, and mentions
|
||||
- ⏳ Add local post reference for federated content
|
||||
- ⏳ Handle media attachments in federated content
|
||||
|
||||
### Stage 5: Relationship Management ✅ (COMPLETED)
|
||||
- ✅ Handle follow/unfollow logic
|
||||
- ✅ Update followers/following collections
|
||||
- ✅ Block/mute functionality (data model ready)
|
||||
- ✅ Relationship state machine (Pending, Accepted, Rejected)
|
||||
|
||||
### Stage 6: Testing & Interop (NEXT)
|
||||
- ⏳ Test with Mastodon instances
|
||||
- ⏳ Test with Pleroma/Akkoma instances
|
||||
- ⏳ Test with Lemmy instances
|
||||
- ⏳ Verify WebFinger and actor discovery
|
||||
- ⏳ Test activity delivery and processing
|
||||
|
||||
## Implementation Details
|
||||
|
||||
### Core Services
|
||||
|
||||
#### 1. ActivityPubKeyService
|
||||
- Generates RSA 2048-bit key pairs for ActivityPub
|
||||
- Signs data with private key
|
||||
- Verifies signatures with public key
|
||||
- Key stored in `SnPublisher.Meta["private_key"]` and `["public_key"]`
|
||||
|
||||
#### 2. ActivityPubSignatureService
|
||||
- Verifies incoming HTTP Signature headers
|
||||
- Signs outgoing HTTP requests
|
||||
- Manages key retrieval and storage
|
||||
- Builds signing strings according to ActivityPub spec
|
||||
|
||||
#### 3. ActivityPubActivityProcessor
|
||||
- Processes all incoming activity types
|
||||
- Follow: Creates relationship, sends Accept
|
||||
- Accept: Updates relationship to accepted state
|
||||
- Reject: Updates relationship to rejected state
|
||||
- Create: Stores federated content
|
||||
- Like: Records like reaction
|
||||
- Announce: Increments boost count
|
||||
- Undo: Reverts previous actions
|
||||
- Delete: Soft-deletes federated content
|
||||
- Update: Marks content as edited
|
||||
|
||||
#### 4. ActivityPubDeliveryService
|
||||
- Sends Follow activities to remote instances
|
||||
- Sends Accept activities in response to follows
|
||||
- Sends Create activities (posts) to followers
|
||||
- Sends Like activities to remote instances
|
||||
- Sends Undo activities
|
||||
- Fetches remote actor profiles on-demand
|
||||
|
||||
### Data Flow
|
||||
|
||||
#### Incoming Activity Flow
|
||||
```
|
||||
Remote Server → HTTP Signature Verification → Activity Type → Specific Handler
|
||||
↓
|
||||
Database Update & Response
|
||||
```
|
||||
|
||||
#### Outgoing Activity Flow
|
||||
```
|
||||
Local Action → Create Activity → Sign with Key → Send to Followers' Inboxes
|
||||
↓
|
||||
Track Status & Retry
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
Add to `appsettings.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"ActivityPub": {
|
||||
"Domain": "your-domain.com",
|
||||
"EnableFederation": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Database Migration
|
||||
|
||||
To apply the migration:
|
||||
|
||||
```bash
|
||||
cd DysonNetwork.Sphere
|
||||
dotnet ef database update
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
||||
### WebFinger
|
||||
```bash
|
||||
curl "https://your-domain.com/.well-known/webfinger?resource=acct:username@your-domain.com"
|
||||
```
|
||||
|
||||
### Actor Profile
|
||||
```bash
|
||||
curl -H "Accept: application/activity+json" https://your-domain.com/activitypub/actors/username
|
||||
```
|
||||
|
||||
### Outbox
|
||||
```bash
|
||||
curl -H "Accept: application/activity+json" https://your-domain.com/activitypub/actors/username/outbox
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
- All models follow the existing Solar Network patterns (ModelBase, NodaTime, JSON columns)
|
||||
- Controllers use standard ASP.NET Core patterns with dependency injection
|
||||
- Database uses PostgreSQL with JSONB for flexible metadata storage
|
||||
- Migration follows existing naming conventions
|
||||
- Soft delete is enabled on all models
|
||||
|
||||
## References
|
||||
|
||||
- [ActivityPub W3C Recommendation](https://www.w3.org/TR/activitypub/)
|
||||
- [ActivityStreams 2.0](https://www.w3.org/TR/activitystreams-core/)
|
||||
- [WebFinger RFC 7033](https://tools.ietf.org/html/rfc7033)
|
||||
- [Mastodon Federation Documentation](https://docs.joinmastodon.org/spec/activitypub/)
|
||||
|
||||
## TODOs
|
||||
|
||||
- [ ] Implement HTTP Signature verification middleware
|
||||
- [ ] Create activity processor service
|
||||
- [ ] Implement activity queue and retry logic
|
||||
- [ ] Add key generation for Publishers
|
||||
- [ ] Implement content conversion between formats
|
||||
- [ ] Add inbox background worker
|
||||
- [ ] Add outbox delivery worker
|
||||
- [ ] Implement relationship management logic
|
||||
- [ ] Add moderation tools for federated content
|
||||
- [ ] Add federation metrics and monitoring
|
||||
- [ ] Write comprehensive tests
|
||||
197
docs/activitypub/ACTIVITYPUB_PLAN.md
Normal file
197
docs/activitypub/ACTIVITYPUB_PLAN.md
Normal file
@@ -0,0 +1,197 @@
|
||||
🛠️ ActivityPub 接入 Solar Network 的分步清单
|
||||
|
||||
⸻
|
||||
|
||||
🧱 1. 准备 & 设计阶段
|
||||
|
||||
1.1 理解 ActivityPub 的核心概念
|
||||
• Actor / Object / Activity / Collection
|
||||
• Outbox / Inbox / Followers 列表
|
||||
ActivityPub 是使用 JSON-LD + ActivityStreams 2.0 来描述社交行为的规范。 
|
||||
|
||||
1.2 映射你现有的 Solar Domain 结构
|
||||
|
||||
把你现在 Solar Network 的用户、帖子、关注、点赞等:
|
||||
• 映射为 ActivityPub 的 Actor / Note / Follow / Like 等
|
||||
• 明确本地模型与 ActivityStreams 对应关系
|
||||
|
||||
比如:
|
||||
• Solar User → ActivityPub Actor
|
||||
• Post → ActivityPub Note/Object
|
||||
• Like → ActivityPub Like Activity
|
||||
这一步是关键的领域建模设计。
|
||||
|
||||
⸻
|
||||
|
||||
🚪 2. Actor 发现与必要入口
|
||||
|
||||
2.1 实现 WebFinger
|
||||
|
||||
为每个用户提供 WebFinger endpoint:
|
||||
|
||||
GET /.well-known/webfinger?resource=acct:<username>@<domain>
|
||||
|
||||
用来让远端服务器查出 actor 细节(包括 inbox/outbox URL)。
|
||||
|
||||
2.2 Actor 资源 URL
|
||||
|
||||
确保每个用户有一个全局可访问的 URL,例如:
|
||||
|
||||
https://solar.io/users/alice
|
||||
|
||||
并在其 JSON-LD 中包含:
|
||||
• inbox
|
||||
• outbox
|
||||
• followers
|
||||
• following
|
||||
这些是 ActivityPub 基础通信的入口。 
|
||||
|
||||
⸻
|
||||
|
||||
📮 3. 核心协议实现
|
||||
|
||||
3.1 Inbox / Outbox 接口
|
||||
|
||||
Inbox(接收来自其他实例的 Activity)
|
||||
Outbox(本地用户发布 Activity 的出口)
|
||||
|
||||
Outbox 需要:
|
||||
• 生成 activity JSON(Create、Follow、Like 等)
|
||||
• 存储至本地数据库
|
||||
• 推送到各 follower 的 Inbox
|
||||
|
||||
Inbox 需要:
|
||||
• 接收并 parse Activity
|
||||
• 验证签名
|
||||
• 处理活动(如接受 Follow,记录远程 Post 等)
|
||||
|
||||
注意:
|
||||
• 请求需要验证 HTTP Signatures(远端服务器签名)。 
|
||||
• 必须满足 ActivityPub 规范对字段的要求。
|
||||
|
||||
⸻
|
||||
|
||||
🔐 4. 安全与签名
|
||||
|
||||
4.1 Actor Keys
|
||||
|
||||
每个 Actor 对应一对 RSA / Ed25519 密钥:
|
||||
• 私钥用于签名发送到其它服务器的请求
|
||||
• 公钥发布在 Actor JSON 中供对方验证
|
||||
|
||||
远端服务器发送到你的 Inbox 时,需要:
|
||||
• 使用对方的公钥验证签名
|
||||
|
||||
HTTP Signatures 是服务器间通信安全的一部分,防止伪造请求。 
|
||||
|
||||
⸻
|
||||
|
||||
🌐 5. 实现联邦逻辑
|
||||
|
||||
5.1 关注逻辑
|
||||
|
||||
处理:
|
||||
• Follow Activity
|
||||
• Accept / Reject Activity
|
||||
• 更新本地 followers / following 数据
|
||||
|
||||
实现流程参考:1. 本地用户发起 Follow 2. 推送 Follow 到远端 Inbox 3. 等待远端发送 Accept 或 Reject
|
||||
|
||||
5.2 推送 content(联邦同步)
|
||||
|
||||
当本地用户发布内容时:
|
||||
• 从 Outbox 取出 Create Activity
|
||||
• 发送到所有远端 followers 的 Inbox
|
||||
注意:你可以缓存远端 followers 数据表来减少重复请求。
|
||||
|
||||
⸻
|
||||
|
||||
📡 6. 消息处理与存储
|
||||
|
||||
6.1 本地对象缓存
|
||||
|
||||
对于接收到的远端内容(Post / Note / Like 等):
|
||||
• 需要保存到 Solar 的数据库
|
||||
• 供 UI / API 生成用户时间线
|
||||
这使得 Solar 能把远端联邦内容与本地内容统一展示。
|
||||
|
||||
6.2 处理 Collections
|
||||
|
||||
ActivityPub 定义了 Collection 类型用于:
|
||||
• followers 列表
|
||||
• liked 列表
|
||||
• outbox、inbox
|
||||
|
||||
你需要实现这些集合的获取与分页逻辑。
|
||||
|
||||
⸻
|
||||
|
||||
🔁 7. 与现有 Solar Network API 协调
|
||||
|
||||
你可能已经有本地的帖子、用户 API。那么:
|
||||
• 把这套 API 与 ActivityPub 同步层绑定
|
||||
• 决定哪些内容对外发布
|
||||
• 决定哪些 Activity 类型需要响应
|
||||
|
||||
比如:
|
||||
|
||||
Solar Post Create -> 生成 ActivityPub Create Note -> 发往联邦
|
||||
|
||||
⸻
|
||||
|
||||
📦 8. 测试与兼容性
|
||||
|
||||
8.1 与现存联邦测试
|
||||
|
||||
用已存在的 ActivityPub 实例测试兼容性:
|
||||
• Mastodon
|
||||
• Pleroma
|
||||
• Lemmy 等
|
||||
|
||||
检查:
|
||||
• 对方是否能关注 Solar 用户
|
||||
• Solar 是否能接收远端内容
|
||||
|
||||
ActivityPub 规范(W3C Recommendation)有详细规范流包括:
|
||||
• Server to Server API
|
||||
你最重要的目标是与现存实例互操作。 
|
||||
|
||||
⸻
|
||||
|
||||
🧪 9. UX & 监控支持
|
||||
|
||||
9.1 用户显示远端内容
|
||||
|
||||
从 Inbox 收到内容后:
|
||||
• 如何展示在 Solar UI
|
||||
• 链接远端用户的展示名 / 头像
|
||||
|
||||
9.2 监控 & 审计
|
||||
• 失败的推送
|
||||
• 无法验证签名的请求
|
||||
• 阻止 spam / 恶意 Activity
|
||||
|
||||
⸻
|
||||
|
||||
🏁 10. 逐步推进
|
||||
|
||||
建议按阶段 rollout:
|
||||
|
||||
阶段 目标
|
||||
Stage 1 实现 Actor / WebFinger / Outbox / Inbox 基本框架
|
||||
Stage 2 支持 Follow / Accept / Reject Activity
|
||||
Stage 3 支持 Create / Like / Announce
|
||||
Stage 4 与远端实例互联测试
|
||||
Stage 5 UI & Feed 统一显示本地 + 联邦内容
|
||||
|
||||
⸻
|
||||
|
||||
📌 小结
|
||||
|
||||
核心步骤总结:1. 映射 Solar Network 数据模型到 ActivityPub 2. 实现 WebFinger + Actor JSON-LD 3. 实现 Inbox 和 Outbox endpoints 4. 管理 Actor Keys 与 HTTP Signatures 5. 处理关注/发帖/点赞等 Activity 6. 推送到远端 / 接收远端同步 7. 将远端内容存入 Solar 并展示 8. 测试与现有 Fediverse 实例互通
|
||||
|
||||
这套步骤覆盖了 ActivityPub 协议必须实现的点和实际联邦要处理的逻辑。 
|
||||
|
||||
⸻
|
||||
|
||||
如果你想,我可以进一步展开 Solar Network 对应的具体 API 设计模板(包括 Inbox / Outbox 的 REST 定义与 JSON 输出示例),甚至帮你写 可运行的 Go / .NET 样例代码。你希望从哪一部分开始深入?
|
||||
273
docs/activitypub/ACTIVITYPUB_SUMMARY.md
Normal file
273
docs/activitypub/ACTIVITYPUB_SUMMARY.md
Normal file
@@ -0,0 +1,273 @@
|
||||
# ActivityPub Implementation Summary
|
||||
|
||||
## What Has Been Implemented
|
||||
|
||||
### 1. Database Models ✅
|
||||
All models located in `DysonNetwork.Shared/Models/`:
|
||||
|
||||
| Model | Purpose | Key Features |
|
||||
|--------|---------|--------------|
|
||||
| `SnFediverseInstance` | Track fediverse servers | Domain blocking, metadata, activity tracking |
|
||||
| `SnFediverseActor` | Remote user profiles | Keys, inbox/outbox URLs, relationships |
|
||||
| `SnFediverseContent` | Federated posts/notes | Multiple content types, attachments, mentions, tags |
|
||||
| `SnFediverseActivity` | Activity tracking | All activity types, processing status, raw data |
|
||||
| `SnFediverseRelationship` | Follow relationships | State machine, muting/blocking |
|
||||
| `SnFediverseReaction` | Federated reactions | Likes, emoji reactions |
|
||||
|
||||
### 2. Database Migrations ✅
|
||||
- `20251228120000_AddActivityPubModels.cs` - Core ActivityPub tables
|
||||
- `20251228130000_AddPublisherMetaForActivityPubKeys.cs` - Publisher metadata for keys
|
||||
|
||||
### 3. Core Services ✅
|
||||
|
||||
#### ActivityPubKeyService
|
||||
- **Location**: `DysonNetwork.Sphere/ActivityPub/ActivityPubKeyService.cs`
|
||||
- **Responsibilities**:
|
||||
- Generate RSA 2048-bit key pairs
|
||||
- Sign data with private key
|
||||
- Verify signatures with public key
|
||||
- **Key Storage**: Keys stored in `SnPublisher.Meta`
|
||||
|
||||
#### ActivityPubSignatureService
|
||||
- **Location**: `DysonNetwork.Sphere/ActivityPub/ActivityPubSignatureService.cs`
|
||||
- **Responsibilities**:
|
||||
- Verify incoming HTTP Signature headers
|
||||
- Sign outgoing HTTP requests
|
||||
- Build signing strings per ActivityPub spec
|
||||
- Manage key retrieval for actors
|
||||
- **Signature Algorithm**: RSA-SHA256
|
||||
|
||||
#### ActivityPubActivityProcessor
|
||||
- **Location**: `DysonNetwork.Sphere/ActivityPub/ActivityPubActivityProcessor.cs`
|
||||
- **Supported Activities**:
|
||||
- ✅ Follow - Creates relationship, sends Accept
|
||||
- ✅ Accept - Updates relationship to accepted
|
||||
- ✅ Reject - Updates relationship to rejected
|
||||
- ✅ Create - Stores federated content
|
||||
- ✅ Like - Records like reaction
|
||||
- ✅ Announce - Increments boost count
|
||||
- ✅ Undo - Reverts previous actions
|
||||
- ✅ Delete - Soft-deletes federated content
|
||||
- ✅ Update - Marks content as edited
|
||||
|
||||
#### ActivityPubDeliveryService
|
||||
- **Location**: `DysonNetwork.Sphere/ActivityPub/ActivityPubDeliveryService.cs`
|
||||
- **Outgoing Activities**:
|
||||
- ✅ Follow - Send to remote actors
|
||||
- ✅ Accept - Respond to follow requests
|
||||
- ✅ Create - Send new posts to followers
|
||||
- ✅ Like - Send to remote instances
|
||||
- ✅ Undo - Undo previous actions
|
||||
- **Features**:
|
||||
- HTTP signature signing
|
||||
- Remote actor fetching
|
||||
- Follower discovery
|
||||
|
||||
### 4. API Controllers ✅
|
||||
|
||||
#### WebFingerController
|
||||
- **Location**: `DysonNetwork.Sphere/ActivityPub/WebFingerController.cs`
|
||||
- **Endpoints**:
|
||||
- `GET /.well-known/webfinger?resource=acct:<username>@<domain>`
|
||||
- **Purpose**: Allow remote instances to discover local actors
|
||||
|
||||
#### ActivityPubController
|
||||
- **Location**: `DysonNetwork.Sphere/ActivityPub/ActivityPubController.cs`
|
||||
- **Endpoints**:
|
||||
- `GET /activitypub/actors/{username}` - Actor profile in JSON-LD
|
||||
- `GET /activitypub/actors/{username}/outbox` - Public posts
|
||||
- `POST /activitypub/actors/{username}/inbox` - Receive activities
|
||||
- **Features**:
|
||||
- Public key in actor profile
|
||||
- ActivityPub JSON-LD responses
|
||||
- HTTP signature verification on inbox
|
||||
- Activity processing pipeline
|
||||
|
||||
### 5. Model Updates ✅
|
||||
- Added `Meta` field to `SnPublisher` for storing ActivityPub keys
|
||||
- All models follow existing Solar Network patterns
|
||||
|
||||
## How It Works
|
||||
|
||||
### Incoming Activity Flow
|
||||
```
|
||||
1. Remote server sends POST to /inbox
|
||||
2. HTTP Signature is verified
|
||||
3. Activity type is identified
|
||||
4. Specific handler processes activity:
|
||||
- Follow: Create relationship, send Accept
|
||||
- Create: Store content
|
||||
- Like: Record reaction
|
||||
- etc.
|
||||
5. Database is updated
|
||||
6. Response sent
|
||||
```
|
||||
|
||||
### Outgoing Activity Flow
|
||||
```
|
||||
1. Local action occurs (post, like, follow)
|
||||
2. Activity is created in ActivityPub format
|
||||
3. Remote followers are discovered
|
||||
4. HTTP request is signed with publisher's private key
|
||||
5. Activity sent to each follower's inbox
|
||||
6. Status logged
|
||||
```
|
||||
|
||||
### Key Management
|
||||
```
|
||||
1. Publisher creates post/follows
|
||||
2. Check if keys exist in Publisher.Meta
|
||||
3. If not, generate RSA 2048-bit key pair
|
||||
4. Store keys in Publisher.Meta
|
||||
5. Use keys for signing
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
Add to `appsettings.json`:
|
||||
```json
|
||||
{
|
||||
"ActivityPub": {
|
||||
"Domain": "your-domain.com",
|
||||
"EnableFederation": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## API Endpoints
|
||||
|
||||
### WebFinger
|
||||
```bash
|
||||
GET /.well-known/webfinger?resource=acct:username@domain.com
|
||||
Accept: application/jrd+json
|
||||
```
|
||||
|
||||
### Actor Profile
|
||||
```bash
|
||||
GET /activitypub/actors/username
|
||||
Accept: application/activity+json
|
||||
```
|
||||
|
||||
### Outbox
|
||||
```bash
|
||||
GET /activitypub/actors/username/outbox
|
||||
Accept: application/activity+json
|
||||
```
|
||||
|
||||
### Inbox
|
||||
```bash
|
||||
POST /activitypub/actors/username/inbox
|
||||
Content-Type: application/activity+json
|
||||
Signature: keyId="...",algorithm="...",headers="...",signature="..."
|
||||
```
|
||||
|
||||
## Database Schema
|
||||
|
||||
### Fediverse Tables
|
||||
- `fediverse_instances` - Server metadata and blocking
|
||||
- `fediverse_actors` - Remote actor profiles
|
||||
- `fediverse_contents` - Federated posts/notes
|
||||
- `fediverse_activities` - Activity tracking
|
||||
- `fediverse_relationships` - Follow relationships
|
||||
- `fediverse_reactions` - Federated reactions
|
||||
|
||||
### Publisher Enhancement
|
||||
- Added `publishers.meta` JSONB column for key storage
|
||||
|
||||
## Next Steps
|
||||
|
||||
### Immediate (Ready for Testing)
|
||||
- Apply database migrations
|
||||
- Test WebFinger with a Mastodon instance
|
||||
- Test follow/unfollow with another instance
|
||||
- Test receiving posts from federated timeline
|
||||
|
||||
### Short Term
|
||||
- Add HTTP Signature verification middleware
|
||||
- Implement activity queue with retry logic
|
||||
- Add background worker for processing queued activities
|
||||
- Add metrics and monitoring
|
||||
- Implement local content display in timelines
|
||||
|
||||
### Long Term
|
||||
- Add Media support for federated content
|
||||
- Implement content filtering
|
||||
- Add moderation tools for federated content
|
||||
- Support more activity types
|
||||
- Implement instance block list management
|
||||
|
||||
## Compatibility
|
||||
|
||||
The implementation follows:
|
||||
- ✅ [ActivityPub W3C Recommendation](https://www.w3.org/TR/activitypub/)
|
||||
- ✅ [ActivityStreams 2.0](https://www.w3.org/TR/activitystreams-core/)
|
||||
- ✅ [WebFinger RFC 7033](https://tools.ietf.org/html/rfc7033)
|
||||
- ✅ [HTTP Signatures](https://datatracker.ietf.org/doc/html/draft-cavage-http-signatures)
|
||||
|
||||
## Testing
|
||||
|
||||
### Local Testing
|
||||
```bash
|
||||
# 1. Apply migrations
|
||||
cd DysonNetwork.Sphere
|
||||
dotnet ef database update
|
||||
|
||||
# 2. Test WebFinger
|
||||
curl "http://localhost:5000/.well-known/webfinger?resource=acct:username@localhost"
|
||||
|
||||
# 3. Test Actor
|
||||
curl -H "Accept: application/activity+json" http://localhost:5000/activitypub/actors/username
|
||||
```
|
||||
|
||||
### Federation Testing
|
||||
1. Set up a Mastodon instance (or use a public one)
|
||||
2. Follow a Mastodon user from Solar Network
|
||||
3. Create a post on Solar Network
|
||||
4. Verify it appears on Mastodon timeline
|
||||
|
||||
## Architecture Decisions
|
||||
|
||||
1. **Key Storage**: Using `SnPublisher.Meta` JSONB field for flexibility
|
||||
2. **Content Storage**: Federated content stored separately from local posts
|
||||
3. **Relationship State**: Implemented with explicit states (Pending, Accepted, Rejected)
|
||||
4. **Signature Algorithm**: RSA-SHA256 for compatibility
|
||||
5. **Activity Processing**: Synchronous for now, can be made async with queue
|
||||
6. **Content Types**: Support for Note, Article initially (can expand)
|
||||
|
||||
## Notes
|
||||
|
||||
- All ActivityPub communication uses HTTP Signatures
|
||||
- Private keys never leave the server
|
||||
- Public keys are published in actor profiles
|
||||
- Soft delete is enabled on all federated models
|
||||
- Failed activity deliveries are logged but not retried (future enhancement)
|
||||
- Content is federated only when visibility is Public
|
||||
|
||||
## Files Created/Modified
|
||||
|
||||
### New Files
|
||||
- `DysonNetwork.Shared/Models/FediverseInstance.cs`
|
||||
- `DysonNetwork.Shared/Models/FediverseActor.cs`
|
||||
- `DysonNetwork.Shared/Models/FediverseContent.cs`
|
||||
- `DysonNetwork.Shared/Models/FediverseActivity.cs`
|
||||
- `DysonNetwork.Shared/Models/FediverseRelationship.cs`
|
||||
- `DysonNetwork.Shared/Models/FediverseReaction.cs`
|
||||
- `DysonNetwork.Sphere/ActivityPub/WebFingerController.cs`
|
||||
- `DysonNetwork.Sphere/ActivityPub/ActivityPubController.cs`
|
||||
- `DysonNetwork.Sphere/ActivityPub/ActivityPubKeyService.cs`
|
||||
- `DysonNetwork.Sphere/ActivityPub/ActivityPubSignatureService.cs`
|
||||
- `DysonNetwork.Sphere/ActivityPub/ActivityPubActivityProcessor.cs`
|
||||
- `DysonNetwork.Sphere/ActivityPub/ActivityPubDeliveryService.cs`
|
||||
- `DysonNetwork.Sphere/Migrations/20251228120000_AddActivityPubModels.cs`
|
||||
- `DysonNetwork.Sphere/Migrations/20251228130000_AddPublisherMetaForActivityPubKeys.cs`
|
||||
|
||||
### Modified Files
|
||||
- `DysonNetwork.Shared/Models/Publisher.cs` - Added Meta field
|
||||
- `DysonNetwork.Sphere/AppDatabase.cs` - Added DbSets for ActivityPub
|
||||
- `DysonNetwork.Sphere/Startup/ServiceCollectionExtensions.cs` - Registered ActivityPub services
|
||||
|
||||
## References
|
||||
|
||||
- [ActivityPub Implementation Guide](./ACTIVITYPUB_IMPLEMENTATION.md)
|
||||
- [ActivityPub Plan](./ACTIVITYPUB_PLAN.md)
|
||||
- [Solar Network Architecture](./README.md)
|
||||
820
docs/activitypub/ACTIVITYPUB_TESTING_GUIDE.md
Normal file
820
docs/activitypub/ACTIVITYPUB_TESTING_GUIDE.md
Normal file
@@ -0,0 +1,820 @@
|
||||
# ActivityPub Testing Guide for Solar Network
|
||||
|
||||
This guide will help you test the ActivityPub implementation in Solar Network, starting with a self-hosted instance and then moving to a real instance.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- ✅ Solar Network codebase with ActivityPub implementation
|
||||
- ✅ Docker installed (for running Mastodon/Fediverse instances)
|
||||
- ✅ PostgreSQL database running
|
||||
- ✅ `.NET 10` SDK
|
||||
|
||||
## Part 1: Set Up a Self-Hosted Test Instance
|
||||
|
||||
### Option A: Using Mastodon (Recommended for Compatibility)
|
||||
|
||||
#### 1. Create a Docker Compose File
|
||||
|
||||
Create `docker-compose.mastodon-test.yml`:
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
db:
|
||||
restart: always
|
||||
image: postgres:14-alpine
|
||||
environment:
|
||||
POSTGRES_USER: mastodon
|
||||
POSTGRES_PASSWORD: mastodon_password
|
||||
POSTGRES_DB: mastodon
|
||||
networks:
|
||||
- mastodon_network
|
||||
healthcheck:
|
||||
test: ["CMD", "pg_isready", "-U", "mastodon"]
|
||||
interval: 5s
|
||||
retries: 5
|
||||
|
||||
redis:
|
||||
restart: always
|
||||
image: redis:7-alpine
|
||||
networks:
|
||||
- mastodon_network
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 5s
|
||||
retries: 5
|
||||
|
||||
es:
|
||||
restart: always
|
||||
image: docker.elastic.co/elasticsearch:8.10.2
|
||||
environment:
|
||||
- "discovery.type=single-node"
|
||||
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
|
||||
- "xpack.security.enabled=false"
|
||||
networks:
|
||||
- mastodon_network
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -silent http://localhost:9200/_cluster/health || exit 1"]
|
||||
interval: 10s
|
||||
retries: 10
|
||||
|
||||
web:
|
||||
restart: always
|
||||
image: tootsuite/mastodon:latest
|
||||
env_file: .env.mastodon
|
||||
command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000"
|
||||
ports:
|
||||
- "3001:3000"
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
- es
|
||||
networks:
|
||||
- mastodon_network
|
||||
volumes:
|
||||
- ./mastodon-data/public:/mastodon/public/system
|
||||
|
||||
streaming:
|
||||
restart: always
|
||||
image: tootsuite/mastodon:latest
|
||||
env_file: .env.mastodon
|
||||
command: node ./streaming
|
||||
ports:
|
||||
- "4000:4000"
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
networks:
|
||||
- mastodon_network
|
||||
|
||||
sidekiq:
|
||||
restart: always
|
||||
image: tootsuite/mastodon:latest
|
||||
env_file: .env.mastodon
|
||||
command: bundle exec sidekiq
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
networks:
|
||||
- mastodon_network
|
||||
|
||||
networks:
|
||||
mastodon_network:
|
||||
driver: bridge
|
||||
```
|
||||
|
||||
#### 2. Create Environment File
|
||||
|
||||
Create `.env.mastodon`:
|
||||
|
||||
```bash
|
||||
# Federation
|
||||
LOCAL_DOMAIN=mastodon.local
|
||||
LOCAL_HTTPS=false
|
||||
|
||||
# Database
|
||||
DB_HOST=db
|
||||
DB_PORT=5432
|
||||
DB_USER=mastodon
|
||||
DB_NAME=mastodon
|
||||
DB_PASS=mastodon_password
|
||||
|
||||
# Redis
|
||||
REDIS_HOST=redis
|
||||
REDIS_PORT=6379
|
||||
|
||||
# Elasticsearch
|
||||
ES_ENABLED=true
|
||||
ES_HOST=es
|
||||
ES_PORT=9200
|
||||
|
||||
# Secrets (generate these!)
|
||||
SECRET_KEY_BASE=change_me_to_a_random_string_at_least_32_chars
|
||||
OTP_SECRET=change_me_to_another_random_string
|
||||
|
||||
# Defaults
|
||||
SINGLE_USER_MODE=false
|
||||
DEFAULT_LOCALE=en
|
||||
```
|
||||
|
||||
**Generate secrets:**
|
||||
```bash
|
||||
# Run these to generate random secrets
|
||||
openssl rand -base64 32
|
||||
```
|
||||
|
||||
#### 3. Start Mastodon
|
||||
|
||||
```bash
|
||||
docker-compose -f docker-compose.mastodon-test.yml up -d
|
||||
|
||||
# Check logs
|
||||
docker-compose -f docker-compose.mastodon-test.yml logs -f web
|
||||
```
|
||||
|
||||
Wait for the web service to be healthy (may take 2-5 minutes).
|
||||
|
||||
#### 4. Create a Mastodon Account
|
||||
|
||||
```bash
|
||||
# Run this command to create an admin account
|
||||
docker-compose -f docker-compose.mastodon-test.yml exec web \
|
||||
bin/tootctl accounts create \
|
||||
testuser \
|
||||
testuser@mastodon.local \
|
||||
--email=test@example.com \
|
||||
--confirmed \
|
||||
--role=admin \
|
||||
--approve
|
||||
```
|
||||
|
||||
Set password: `TestPassword123!`
|
||||
|
||||
#### 5. Update Your /etc/hosts
|
||||
|
||||
```bash
|
||||
sudo nano /etc/hosts
|
||||
```
|
||||
|
||||
Add:
|
||||
```
|
||||
127.0.0.1 mastodon.local
|
||||
127.0.0.1 solar.local
|
||||
```
|
||||
|
||||
### Option B: Using GoToSocial (Lightweight Alternative)
|
||||
|
||||
Create `docker-compose.gotosocial.yml`:
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
gotosocial:
|
||||
image: superseriousbusiness/gotosocial:latest
|
||||
environment:
|
||||
- GTS_HOST=gotosocial.local
|
||||
- GTS_ACCOUNT_DOMAIN=gotosocial.local
|
||||
- GTS_PROTOCOL=http
|
||||
- GTS_DB_TYPE=sqlite
|
||||
- GTS_DB_ADDRESS=/gotosocial/data/sqlite.db
|
||||
- GTS_STORAGE_LOCAL_BASE_PATH=/gotosocial/data/storage
|
||||
ports:
|
||||
- "3002:8080"
|
||||
volumes:
|
||||
- ./gotosocial-data:/gotosocial/data
|
||||
|
||||
networks:
|
||||
default:
|
||||
```
|
||||
|
||||
Start it:
|
||||
```bash
|
||||
docker-compose -f docker-compose.gotosocial.yml up -d
|
||||
```
|
||||
|
||||
Create account:
|
||||
```bash
|
||||
docker-compose -f docker-compose.gotosocial.yml exec gotosocial \
|
||||
/gotosocial/gotosocial admin account create \
|
||||
--username testuser \
|
||||
--email test@example.com \
|
||||
--password TestPassword123!
|
||||
```
|
||||
|
||||
## Part 2: Configure Solar Network for Federation
|
||||
|
||||
### 1. Update appsettings.json
|
||||
|
||||
Edit `DysonNetwork.Sphere/appsettings.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"ActivityPub": {
|
||||
"Domain": "solar.local",
|
||||
"EnableFederation": true
|
||||
},
|
||||
"Kestrel": {
|
||||
"Endpoints": {
|
||||
"Http": {
|
||||
"Url": "http://solar.local:5000"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 2. Update /etc/hosts
|
||||
|
||||
Add both instances:
|
||||
```
|
||||
127.0.0.1 mastodon.local
|
||||
127.0.0.1 solar.local
|
||||
127.0.0.1 gotosocial.local
|
||||
```
|
||||
|
||||
### 3. Apply Database Migrations
|
||||
|
||||
```bash
|
||||
cd DysonNetwork.Sphere
|
||||
dotnet ef database update
|
||||
```
|
||||
|
||||
### 4. Start Solar Network
|
||||
|
||||
```bash
|
||||
dotnet run --project DysonNetwork.Sphere
|
||||
```
|
||||
|
||||
Solar Network should now be running on `http://solar.local:5000`
|
||||
|
||||
## Part 3: Create Test Users
|
||||
|
||||
### In Solar Network
|
||||
|
||||
1. Open http://solar.local:5000 (or your web interface)
|
||||
2. Create a new account/publisher named `solaruser`
|
||||
3. Note down the publisher ID for later
|
||||
|
||||
**Or via API** (if you have an existing account):
|
||||
|
||||
```bash
|
||||
# First, create a publisher in Solar Network
|
||||
curl -X POST http://solar.local:5000/api/publishers \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: Bearer YOUR_TOKEN" \
|
||||
-d '{
|
||||
"name": "solaruser",
|
||||
"nick": "Solar User",
|
||||
"bio": "Testing ActivityPub federation!",
|
||||
"type": 0
|
||||
}'
|
||||
```
|
||||
|
||||
### In Mastodon
|
||||
|
||||
Open http://mastodon.local:3001 and log in with:
|
||||
- Username: `testuser`
|
||||
- Password: `TestPassword123!`
|
||||
|
||||
## Part 4: Test Federation Scenarios
|
||||
|
||||
### Test 1: WebFinger Discovery
|
||||
|
||||
**Goal**: Verify Solar Network is discoverable
|
||||
|
||||
```bash
|
||||
# Query Solar Network's WebFinger endpoint
|
||||
curl -v "http://solar.local:5000/.well-known/webfinger?resource=acct:solaruser@solar.local"
|
||||
|
||||
# Expected response (200 OK):
|
||||
{
|
||||
"subject": "acct:solaruser@solar.local",
|
||||
"links": [
|
||||
{
|
||||
"rel": "self",
|
||||
"type": "application/activity+json",
|
||||
"href": "https://solar.local:5000/activitypub/actors/solaruser"
|
||||
},
|
||||
{
|
||||
"rel": "http://webfinger.net/rel/profile-page",
|
||||
"type": "text/html",
|
||||
"href": "https://solar.local:5000/users/solaruser"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### Test 2: Fetch Actor Profile
|
||||
|
||||
**Goal**: Get ActivityPub actor JSON
|
||||
|
||||
```bash
|
||||
# Fetch Solar Network actor from Mastodon
|
||||
curl -H "Accept: application/activity+json" \
|
||||
http://solar.local:5000/activitypub/actors/solaruser
|
||||
|
||||
# Expected response includes:
|
||||
{
|
||||
"@context": ["https://www.w3.org/ns/activitystreams"],
|
||||
"id": "https://solar.local:5000/activitypub/actors/solaruser",
|
||||
"type": "Person",
|
||||
"preferredUsername": "solaruser",
|
||||
"inbox": "https://solar.local:5000/activitypub/actors/solaruser/inbox",
|
||||
"outbox": "https://solar.local:5000/activitypub/actors/solaruser/outbox",
|
||||
"followers": "https://solar.local:5000/activitypub/actors/solaruser/followers",
|
||||
"publicKey": {
|
||||
"id": "https://solar.local:5000/activitypub/actors/solaruser#main-key",
|
||||
"owner": "https://solar.local:5000/activitypub/actors/solaruser",
|
||||
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\n..."
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Test 3: Follow from Mastodon to Solar Network
|
||||
|
||||
**Goal**: Mastodon user follows Solar Network user
|
||||
|
||||
1. **In Mastodon**:
|
||||
- Go to http://mastodon.local:3001
|
||||
- In search bar, type: `@solaruser@solar.local`
|
||||
- Click the follow button
|
||||
|
||||
2. **Verify in Solar Network**:
|
||||
```bash
|
||||
# Check database for relationship
|
||||
psql -d dyson_network -c \
|
||||
"SELECT * FROM fediverse_relationships WHERE is_local_actor = true;"
|
||||
```
|
||||
|
||||
3. **Check Solar Network logs**:
|
||||
Should see:
|
||||
```
|
||||
Processing activity type: Follow from actor: ...
|
||||
Processed follow from ... to ...
|
||||
```
|
||||
|
||||
4. **Verify Mastodon receives Accept**:
|
||||
- Check Mastodon logs for Accept activity
|
||||
- Verify follow appears as accepted in Mastodon
|
||||
|
||||
### Test 4: Follow from Solar Network to Mastodon
|
||||
|
||||
**Goal**: Solar Network user follows Mastodon user
|
||||
|
||||
You'll need to call the ActivityPub delivery service:
|
||||
|
||||
```bash
|
||||
# Via API (you'll need to implement this endpoint):
|
||||
curl -X POST http://solar.local:5000/api/activitypub/follow \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: Bearer YOUR_TOKEN" \
|
||||
-d '{
|
||||
"targetActorUri": "http://mastodon.local:3001/users/testuser"
|
||||
}'
|
||||
```
|
||||
|
||||
**Or test directly with curl** (simulating a Follow activity):
|
||||
|
||||
```bash
|
||||
# Create a Follow activity
|
||||
curl -X POST http://solar.local:5000/activitypub/actors/solaruser/inbox \
|
||||
-H "Content-Type: application/activity+json" \
|
||||
-d '{
|
||||
"@context": "https://www.w3.org/ns/activitystreams",
|
||||
"id": "http://mastodon.local:3001/test-follow-activity",
|
||||
"type": "Follow",
|
||||
"actor": "http://mastodon.local:3001/users/testuser",
|
||||
"object": "https://solar.local:5000/activitypub/actors/solaruser"
|
||||
}'
|
||||
```
|
||||
|
||||
### Test 5: Create a Post in Solar Network
|
||||
|
||||
**Goal**: Post federates to Mastodon
|
||||
|
||||
1. **Create a post via Solar Network API**:
|
||||
```bash
|
||||
curl -X POST http://solar.local:5000/api/posts \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: Bearer YOUR_TOKEN" \
|
||||
-d '{
|
||||
"content": "Hello fediverse! Testing ActivityPub from Solar Network! 🚀",
|
||||
"visibility": 0,
|
||||
"publisherId": "PUBLISHER_ID"
|
||||
}'
|
||||
```
|
||||
|
||||
2. **Wait a few seconds**
|
||||
|
||||
3. **Check in Mastodon**:
|
||||
- Go to http://mastodon.local:3001
|
||||
- The post should appear in the federated timeline
|
||||
- It should show `@solaruser@solar.local` as the author
|
||||
|
||||
4. **Verify Solar Network logs**:
|
||||
```
|
||||
Successfully sent activity to http://mastodon.local:3001/inbox
|
||||
```
|
||||
|
||||
### Test 6: Like from Mastodon
|
||||
|
||||
**Goal**: Mastodon user likes a Solar Network post
|
||||
|
||||
1. **In Mastodon**:
|
||||
- Find the Solar Network post
|
||||
- Click the favorite/like button
|
||||
|
||||
2. **Verify in Solar Network**:
|
||||
```bash
|
||||
psql -d dyson_network -c \
|
||||
"SELECT * FROM fediverse_reactions;"
|
||||
```
|
||||
|
||||
3. **Check Solar Network logs**:
|
||||
```
|
||||
Processing activity type: Like from actor: ...
|
||||
Processed like from ...
|
||||
```
|
||||
|
||||
### Test 7: Reply from Mastodon
|
||||
|
||||
**Goal**: Reply federates to Solar Network
|
||||
|
||||
1. **In Mastodon**:
|
||||
- Reply to the Solar Network post
|
||||
- Write: "@solaruser Nice to meet you!"
|
||||
|
||||
2. **Verify in Solar Network**:
|
||||
```bash
|
||||
psql -d dyson_network -c \
|
||||
"SELECT * FROM fediverse_contents WHERE in_reply_to IS NOT NULL;"
|
||||
```
|
||||
|
||||
## Part 5: Debugging and Troubleshooting
|
||||
|
||||
### Enable Detailed Logging
|
||||
|
||||
Edit `appsettings.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Debug",
|
||||
"DysonNetwork.Sphere.ActivityPub": "Trace"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Check Database State
|
||||
|
||||
```bash
|
||||
# Check actors
|
||||
psql -d dyson_network -c \
|
||||
"SELECT uri, username, display_name FROM fediverse_actors;"
|
||||
|
||||
# Check contents
|
||||
psql -d dyson_network -c \
|
||||
"SELECT uri, type, content FROM fediverse_contents;"
|
||||
|
||||
# Check relationships
|
||||
psql -d dyson_network -c \
|
||||
"SELECT * FROM fediverse_relationships;"
|
||||
|
||||
# Check activities
|
||||
psql -d dyson_network -c \
|
||||
"SELECT type, status, error_message FROM fediverse_activities;"
|
||||
|
||||
# Check failed activities
|
||||
psql -d dyson_network -c \
|
||||
"SELECT * FROM fediverse_activities WHERE status = 3;" # 3 = Failed
|
||||
```
|
||||
|
||||
### Common Issues
|
||||
|
||||
#### Issue: "Failed to verify signature"
|
||||
|
||||
**Cause**: HTTP Signature verification failed
|
||||
|
||||
**Solutions**:
|
||||
1. Check the signature header format
|
||||
2. Verify public key matches actor's keyId
|
||||
3. Ensure Date header is within 5 minutes
|
||||
4. Check host header matches request URL
|
||||
|
||||
#### Issue: "Target actor or inbox not found"
|
||||
|
||||
**Cause**: Remote actor not fetched yet
|
||||
|
||||
**Solutions**:
|
||||
1. Manually fetch the actor first
|
||||
2. Check actor URL is correct
|
||||
3. Verify remote instance is accessible
|
||||
|
||||
#### Issue: "Content already exists"
|
||||
|
||||
**Cause**: Duplicate activity received
|
||||
|
||||
**Solutions**:
|
||||
1. This is normal - deduplication is working
|
||||
2. Check if content appears correctly
|
||||
|
||||
#### Issue: CORS errors when testing from browser
|
||||
|
||||
**Cause**: Browser blocking cross-origin requests
|
||||
|
||||
**Solutions**:
|
||||
1. Use curl for API testing
|
||||
2. Or disable CORS in development
|
||||
3. Test directly from Mastodon interface
|
||||
|
||||
### View HTTP Signatures
|
||||
|
||||
For debugging, you can inspect the signature:
|
||||
|
||||
```bash
|
||||
# From Mastodon to Solar Network
|
||||
curl -v -X POST http://solar.local:5000/activitypub/actors/solaruser/inbox \
|
||||
-H "Content-Type: application/activity+json" \
|
||||
-d '{"type":"Follow",...}'
|
||||
```
|
||||
|
||||
Look for the `Signature` header in the output.
|
||||
|
||||
### Test HTTP Signature Verification Manually
|
||||
|
||||
Create a test script `test-signature.js`:
|
||||
|
||||
```javascript
|
||||
const crypto = require('crypto');
|
||||
|
||||
// Test signature verification
|
||||
const publicKey = `-----BEGIN PUBLIC KEY-----
|
||||
...
|
||||
-----END PUBLIC KEY-----`;
|
||||
|
||||
const signingString = `(request-target): post /activitypub/actors/solaruser/inbox
|
||||
host: solar.local:5000
|
||||
date: ${new Date().toUTCString()}
|
||||
content-length: ...`;
|
||||
|
||||
const signature = '...';
|
||||
|
||||
const verify = crypto.createVerify('SHA256');
|
||||
verify.update(signingString);
|
||||
const isValid = verify.verify(publicKey, signature, 'base64');
|
||||
|
||||
console.log('Signature valid:', isValid);
|
||||
```
|
||||
|
||||
## Part 6: Test with a Real Instance
|
||||
|
||||
### Preparing for Public Federation
|
||||
|
||||
1. **Get a real domain** (e.g., via ngrok or a VPS)
|
||||
|
||||
```bash
|
||||
# Using ngrok for testing
|
||||
ngrok http 5000
|
||||
|
||||
# This gives you: https://random-id.ngrok-free.app
|
||||
```
|
||||
|
||||
2. **Update Solar Network config**:
|
||||
|
||||
```json
|
||||
{
|
||||
"ActivityPub": {
|
||||
"Domain": "your-domain.com",
|
||||
"EnableFederation": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
3. **Update DNS** (if using real domain):
|
||||
- Add A record pointing to your server
|
||||
- Configure HTTPS (required for production federation)
|
||||
|
||||
4. **Test WebFinger with your domain**:
|
||||
|
||||
```bash
|
||||
curl "https://your-domain.com/.well-known/webfinger?resource=acct:username@your-domain.com"
|
||||
```
|
||||
|
||||
### Test with Mastodon.social
|
||||
|
||||
1. **Create a Mastodon.social account**
|
||||
- Go to https://mastodon.social
|
||||
- Sign up for a test account
|
||||
|
||||
2. **Search for your Solar Network user**:
|
||||
- In Mastodon.social search: `@username@your-domain.com`
|
||||
- Click follow
|
||||
|
||||
3. **Create a post in Solar Network**
|
||||
- Should appear in Mastodon.social
|
||||
|
||||
4. **Reply from Mastodon.social**
|
||||
- Should appear in Solar Network
|
||||
|
||||
### Test with Other Instances
|
||||
|
||||
- **Pleroma**: Similar to Mastodon, good for testing
|
||||
- **Lemmy**: For testing community features (later)
|
||||
- **Pixelfed**: For testing media posts
|
||||
- **PeerTube**: For testing video content (later)
|
||||
|
||||
## Part 7: Verification Checklist
|
||||
|
||||
### Self-Hosted Instance Tests
|
||||
|
||||
- [ ] WebFinger returns correct actor links
|
||||
- [ ] Actor profile has all required fields
|
||||
- [ ] Follow from Mastodon to Solar Network works
|
||||
- [ ] Follow from Solar Network to Mastodon works
|
||||
- [ ] Accept activity sent back to Mastodon
|
||||
- [ ] Posts from Solar Network appear in Mastodon timeline
|
||||
- [ ] Posts from Mastodon appear in Solar Network database
|
||||
- [ ] Likes from Mastodon appear in Solar Network
|
||||
- [ ] Replies from Mastodon appear in Solar Network
|
||||
- [ ] Keys are properly generated and stored
|
||||
- [ ] HTTP signatures are correctly verified
|
||||
- [ ] Outbox returns public posts
|
||||
|
||||
### Real Instance Tests
|
||||
|
||||
- [ ] Domain is publicly accessible
|
||||
- [ ] HTTPS is working (or HTTP for local testing)
|
||||
- [ ] WebFinger works with your domain
|
||||
- [ ] Actor is discoverable from other instances
|
||||
- [ ] Posts federate to public instances
|
||||
- [ ] Users can follow across instances
|
||||
- [ ] Timelines show federated content
|
||||
|
||||
## Part 8: Monitoring During Tests
|
||||
|
||||
### Check Solar Network Logs
|
||||
|
||||
```bash
|
||||
# Follow logs in real-time
|
||||
dotnet run --project DysonNetwork.Sphere | grep -i activitypub
|
||||
```
|
||||
|
||||
### Check Mastodon Logs
|
||||
|
||||
```bash
|
||||
docker-compose -f docker-compose.mastodon-test.yml logs -f web | grep -i federation
|
||||
```
|
||||
|
||||
### Monitor Database Activity
|
||||
|
||||
```bash
|
||||
# Watch activity table
|
||||
watch -n 2 'psql -d dyson_network -c "SELECT type, status, created_at FROM fediverse_activities ORDER BY created_at DESC LIMIT 10;"'
|
||||
```
|
||||
|
||||
### Check Network Traffic
|
||||
|
||||
```bash
|
||||
# Monitor HTTP requests
|
||||
tcpdump -i lo port 5000 or port 3001 -A
|
||||
```
|
||||
|
||||
## Part 9: Advanced Testing
|
||||
|
||||
### Test HTTP Signature Fallbacks
|
||||
|
||||
Test with various signature headers:
|
||||
|
||||
```bash
|
||||
# With Date header
|
||||
curl -H "Date: $(date -u +%a,\ %d\ %b\ %Y\ %T\ GMT)" ...
|
||||
|
||||
# With Digest header
|
||||
curl -H "Digest: SHA-256=$(echo -n '{}' | openssl dgst -sha256 -binary | base64)" ...
|
||||
|
||||
# Multiple signed headers
|
||||
curl -H "Signature: keyId=\"...\",algorithm=\"rsa-sha256\",headers=\"(request-target) host date digest\",signature=\"...\"" ...
|
||||
```
|
||||
|
||||
### Test Rate Limiting
|
||||
|
||||
Send multiple requests quickly:
|
||||
|
||||
```bash
|
||||
for i in {1..10}; do
|
||||
curl -X POST http://solar.local:5000/activitypub/actors/solaruser/inbox \
|
||||
-H "Content-Type: application/activity+json" \
|
||||
-d '{"type":"Create",...}'
|
||||
done
|
||||
```
|
||||
|
||||
### Test Large Posts
|
||||
|
||||
Send post with attachments:
|
||||
|
||||
```bash
|
||||
curl -X POST http://solar.local:5000/api/posts \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"content": "A post with an image",
|
||||
"attachments": [{"id": "file-id"}],
|
||||
"visibility": 0
|
||||
}'
|
||||
```
|
||||
|
||||
## Part 10: Cleanup
|
||||
|
||||
### Stop Test Instances
|
||||
|
||||
```bash
|
||||
# Stop Mastodon
|
||||
docker-compose -f docker-compose.mastodon-test.yml down
|
||||
|
||||
# Stop GoToSocial
|
||||
docker-compose -f docker-compose.gotosocial.yml down
|
||||
|
||||
# Remove data volumes
|
||||
docker-compose -f docker-compose.mastodon-test.yml down -v
|
||||
```
|
||||
|
||||
### Reset Solar Network Database
|
||||
|
||||
```bash
|
||||
# Warning: This deletes all data!
|
||||
cd DysonNetwork.Sphere
|
||||
dotnet ef database drop
|
||||
dotnet ef database update
|
||||
```
|
||||
|
||||
### Remove /etc/hosts Entries
|
||||
|
||||
```bash
|
||||
sudo nano /etc/hosts
|
||||
|
||||
# Remove these lines:
|
||||
# 127.0.0.1 mastodon.local
|
||||
# 127.0.0.1 solar.local
|
||||
# 127.0.0.1 gotosocial.local
|
||||
```
|
||||
|
||||
## Next Steps After Testing
|
||||
|
||||
1. **Fix any issues found during testing**
|
||||
2. **Add retry logic for failed deliveries**
|
||||
3. **Implement activity queue for async processing**
|
||||
4. **Add monitoring and metrics**
|
||||
5. **Test with more instances (Pleroma, Pixelfed, etc.)**
|
||||
6. **Add support for more activity types**
|
||||
7. **Improve error handling and logging**
|
||||
8. **Add admin interface for managing federation**
|
||||
|
||||
## Useful Tools
|
||||
|
||||
### ActivityPub Testing Tools
|
||||
- [ActivityPub Playground](https://swicth.github.io/activity-pub-playground/)
|
||||
- [FediTest](https://feditest.com/)
|
||||
- [FediVerse.net](https://fedi.net/)
|
||||
|
||||
### HTTP Testing
|
||||
- [curl](https://curl.se/)
|
||||
- [httpie](https://httpie.io/)
|
||||
- [Postman](https://www.postman.com/)
|
||||
|
||||
### JSON Inspection
|
||||
- [jq](https://stedolan.github.io/jq/)
|
||||
- [jsonpath.com](https://jsonpath.com/)
|
||||
|
||||
### Network Debugging
|
||||
- [Wireshark](https://www.wireshark.org/)
|
||||
- [tcpdump](https://www.tcpdump.org/)
|
||||
|
||||
## References
|
||||
|
||||
- [ActivityPub W3C Spec](https://www.w3.org/TR/activitypub/)
|
||||
- [HTTP Signatures Draft](https://datatracker.ietf.org/doc/html/draft-cavage-http-signatures)
|
||||
- [WebFinger RFC 7033](https://tools.ietf.org/html/rfc7033)
|
||||
- [Mastodon Federation Documentation](https://docs.joinmastodon.org/admin/federation/)
|
||||
506
docs/activitypub/ACTIVITYPUB_TESTING_HELPER_API.md
Normal file
506
docs/activitypub/ACTIVITYPUB_TESTING_HELPER_API.md
Normal file
@@ -0,0 +1,506 @@
|
||||
# ActivityPub Testing Helper API
|
||||
|
||||
This document describes helper endpoints for testing ActivityPub federation.
|
||||
|
||||
## Purpose
|
||||
|
||||
These endpoints allow you to manually trigger ActivityPub activities for testing purposes without implementing the full UI federation integration yet.
|
||||
|
||||
## Helper Endpoints
|
||||
|
||||
### 1. Send Follow Activity
|
||||
|
||||
**Endpoint**: `POST /api/activitypub/test/follow`
|
||||
|
||||
**Description**: Sends a Follow activity to a remote actor
|
||||
|
||||
**Request Body**:
|
||||
```json
|
||||
{
|
||||
"targetActorUri": "http://mastodon.local:3001/users/testuser"
|
||||
}
|
||||
```
|
||||
|
||||
**Response**:
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"activityId": "http://solar.local:5000/activitypub/activities/...",
|
||||
"targetActor": "http://mastodon.local:3001/users/testuser"
|
||||
}
|
||||
```
|
||||
|
||||
### 2. Send Like Activity
|
||||
|
||||
**Endpoint**: `POST /api/activitypub/test/like`
|
||||
|
||||
**Description**: Sends a Like activity for a post (can be local or remote)
|
||||
|
||||
**Request Body**:
|
||||
```json
|
||||
{
|
||||
"postId": "POST_ID",
|
||||
"targetActorUri": "http://mastodon.local:3001/users/testuser"
|
||||
}
|
||||
```
|
||||
|
||||
**Response**:
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"activityId": "http://solar.local:5000/activitypub/activities/..."
|
||||
}
|
||||
```
|
||||
|
||||
### 3. Send Announce (Boost) Activity
|
||||
|
||||
**Endpoint**: `POST /api/activitypub/test/announce`
|
||||
|
||||
**Description**: Boosts a post to followers
|
||||
|
||||
**Request Body**:
|
||||
```json
|
||||
{
|
||||
"postId": "POST_ID"
|
||||
}
|
||||
```
|
||||
|
||||
### 4. Send Undo Activity
|
||||
|
||||
**Endpoint**: `POST /api/activitypub/test/undo`
|
||||
|
||||
**Description**: Undoes a previous activity
|
||||
|
||||
**Request Body**:
|
||||
```json
|
||||
{
|
||||
"activityType": "Like", // or "Follow", "Announce"
|
||||
"objectUri": "http://solar.local:5000/activitypub/objects/POST_ID"
|
||||
}
|
||||
```
|
||||
|
||||
### 5. Get Federation Status
|
||||
|
||||
**Endpoint**: `GET /api/activitypub/test/status`
|
||||
|
||||
**Description**: Returns current federation statistics
|
||||
|
||||
**Response**:
|
||||
```json
|
||||
{
|
||||
"actors": {
|
||||
"total": 5,
|
||||
"local": 1,
|
||||
"remote": 4
|
||||
},
|
||||
"contents": {
|
||||
"total": 25,
|
||||
"byType": {
|
||||
"Note": 20,
|
||||
"Article": 5
|
||||
}
|
||||
},
|
||||
"relationships": {
|
||||
"total": 8,
|
||||
"accepted": 6,
|
||||
"pending": 1,
|
||||
"rejected": 1
|
||||
},
|
||||
"activities": {
|
||||
"total": 45,
|
||||
"byStatus": {
|
||||
"Completed": 40,
|
||||
"Pending": 3,
|
||||
"Failed": 2
|
||||
},
|
||||
"byType": {
|
||||
"Create": 20,
|
||||
"Follow": 8,
|
||||
"Accept": 6,
|
||||
"Like": 5,
|
||||
"Announce": 3,
|
||||
"Undo": 2,
|
||||
"Delete": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 6. Get Recent Activities
|
||||
|
||||
**Endpoint**: `GET /api/activitypub/test/activities`
|
||||
|
||||
**Query Parameters**:
|
||||
- `limit`: Number of activities to return (default: 20)
|
||||
- `type`: Filter by activity type (optional)
|
||||
|
||||
**Response**:
|
||||
```json
|
||||
{
|
||||
"activities": [
|
||||
{
|
||||
"id": "ACTIVITY_ID",
|
||||
"type": "Follow",
|
||||
"status": "Completed",
|
||||
"actorUri": "http://mastodon.local:3001/users/testuser",
|
||||
"objectUri": "http://solar.local:5000/activitypub/actors/solaruser",
|
||||
"createdAt": "2024-01-15T10:30:00Z",
|
||||
"errorMessage": null
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### 7. Get Actor Keys
|
||||
|
||||
**Endpoint**: `GET /api/activitypub/test/actors/{username}/keys`
|
||||
|
||||
**Description**: Returns the public/private key pair for a publisher
|
||||
|
||||
**Response**:
|
||||
```json
|
||||
{
|
||||
"username": "solaruser",
|
||||
"hasKeys": true,
|
||||
"actorUri": "http://solar.local:5000/activitypub/actors/solaruser",
|
||||
"publicKeyId": "http://solar.local:5000/activitypub/actors/solaruser#main-key",
|
||||
"publicKey": "-----BEGIN PUBLIC KEY-----\n...",
|
||||
"privateKeyStored": true
|
||||
}
|
||||
```
|
||||
|
||||
### 8. Test HTTP Signature
|
||||
|
||||
**Endpoint**: `POST /api/activitypub/test/sign`
|
||||
|
||||
**Description**: Test if a signature string is valid for a given public key
|
||||
|
||||
**Request Body**:
|
||||
```json
|
||||
{
|
||||
"publicKey": "-----BEGIN PUBLIC KEY-----\n...",
|
||||
"signingString": "(request-target): post /inbox\nhost: example.com\ndate: ...",
|
||||
"signature": "..."
|
||||
}
|
||||
```
|
||||
|
||||
**Response**:
|
||||
```json
|
||||
{
|
||||
"valid": true,
|
||||
"message": "Signature is valid"
|
||||
}
|
||||
```
|
||||
|
||||
## Controller Implementation
|
||||
|
||||
Create `DysonNetwork.Sphere/ActivityPub/ActivityPubTestController.cs`:
|
||||
|
||||
```csharp
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace DysonNetwork.Sphere.ActivityPub;
|
||||
|
||||
[ApiController]
|
||||
[Route("api/activitypub/test")]
|
||||
[Authorize] // Require auth for testing
|
||||
public class ActivityPubTestController(
|
||||
AppDatabase db,
|
||||
ActivityPubDeliveryService deliveryService,
|
||||
ActivityPubKeyService keyService,
|
||||
ActivityPubSignatureService signatureService,
|
||||
IConfiguration configuration,
|
||||
ILogger<ActivityPubTestController> logger
|
||||
) : ControllerBase
|
||||
{
|
||||
[HttpPost("follow")]
|
||||
public async Task<ActionResult> TestFollow([FromBody] TestFollowRequest request)
|
||||
{
|
||||
var currentUser = GetCurrentUser();
|
||||
var publisher = await GetPublisherForUser(currentUser.Id);
|
||||
|
||||
if (publisher == null)
|
||||
return BadRequest("Publisher not found");
|
||||
|
||||
var success = await deliveryService.SendFollowActivityAsync(
|
||||
publisher.Id,
|
||||
request.TargetActorUri
|
||||
);
|
||||
|
||||
return Ok(new
|
||||
{
|
||||
success,
|
||||
targetActorUri = request.TargetActorUri,
|
||||
publisherId = publisher.Id
|
||||
});
|
||||
}
|
||||
|
||||
[HttpPost("like")]
|
||||
public async Task<ActionResult> TestLike([FromBody] TestLikeRequest request)
|
||||
{
|
||||
var currentUser = GetCurrentUser();
|
||||
var publisher = await GetPublisherForUser(currentUser.Id);
|
||||
|
||||
var success = await deliveryService.SendLikeActivityAsync(
|
||||
request.PostId,
|
||||
currentUser.Id,
|
||||
request.TargetActorUri
|
||||
);
|
||||
|
||||
return Ok(new { success, postId = request.PostId });
|
||||
}
|
||||
|
||||
[HttpPost("announce")]
|
||||
public async Task<ActionResult> TestAnnounce([FromBody] TestAnnounceRequest request)
|
||||
{
|
||||
var post = await db.Posts.FindAsync(request.PostId);
|
||||
if (post == null)
|
||||
return NotFound();
|
||||
|
||||
var success = await deliveryService.SendCreateActivityAsync(post);
|
||||
|
||||
return Ok(new { success, postId = request.PostId });
|
||||
}
|
||||
|
||||
[HttpPost("undo")]
|
||||
public async Task<ActionResult> TestUndo([FromBody] TestUndoRequest request)
|
||||
{
|
||||
var currentUser = GetCurrentUser();
|
||||
var publisher = await GetPublisherForUser(currentUser.Id);
|
||||
|
||||
if (publisher == null)
|
||||
return BadRequest("Publisher not found");
|
||||
|
||||
var success = await deliveryService.SendUndoActivityAsync(
|
||||
request.ActivityType,
|
||||
request.ObjectUri,
|
||||
publisher.Id
|
||||
);
|
||||
|
||||
return Ok(new { success, activityType = request.ActivityType });
|
||||
}
|
||||
|
||||
[HttpGet("status")]
|
||||
public async Task<ActionResult> GetStatus()
|
||||
{
|
||||
var totalActors = await db.FediverseActors.CountAsync();
|
||||
var localActors = await db.FediverseActors
|
||||
.CountAsync(a => a.Uri.Contains("solar.local"));
|
||||
|
||||
var totalContents = await db.FediverseContents.CountAsync();
|
||||
|
||||
var relationships = await db.FediverseRelationships
|
||||
.GroupBy(r => r.State)
|
||||
.Select(g => new { State = g.Key, Count = g.Count() })
|
||||
.ToListAsync();
|
||||
|
||||
var activitiesByStatus = await db.FediverseActivities
|
||||
.GroupBy(a => a.Status)
|
||||
.Select(g => new { Status = g.Key, Count = g.Count() })
|
||||
.ToListAsync();
|
||||
|
||||
var activitiesByType = await db.FediverseActivities
|
||||
.GroupBy(a => a.Type)
|
||||
.Select(g => new { Type = g.Key, Count = g.Count() })
|
||||
.ToListAsync();
|
||||
|
||||
return Ok(new
|
||||
{
|
||||
actors = new
|
||||
{
|
||||
total = totalActors,
|
||||
local = localActors,
|
||||
remote = totalActors - localActors
|
||||
},
|
||||
contents = new
|
||||
{
|
||||
total = totalContents
|
||||
},
|
||||
relationships = relationships.ToDictionary(r => r.State.ToString(), r => r.Count),
|
||||
activities = new
|
||||
{
|
||||
byStatus = activitiesByStatus.ToDictionary(a => a.Status.ToString(), a => a.Count),
|
||||
byType = activitiesByType.ToDictionary(a => a.Type.ToString(), a => a.Count)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
[HttpGet("activities")]
|
||||
public async Task<ActionResult> GetActivities([FromQuery] int limit = 20, [FromQuery] string? type = null)
|
||||
{
|
||||
var query = db.FediverseActivities
|
||||
.OrderByDescending(a => a.CreatedAt);
|
||||
|
||||
if (!string.IsNullOrEmpty(type))
|
||||
{
|
||||
query = query.Where(a => a.Type.ToString() == type);
|
||||
}
|
||||
|
||||
var activities = await query
|
||||
.Take(limit)
|
||||
.Select(a => new
|
||||
{
|
||||
a.Id,
|
||||
a.Type,
|
||||
a.Status,
|
||||
ActorUri = a.Actor.Uri,
|
||||
ObjectUri = a.ObjectUri,
|
||||
a.CreatedAt,
|
||||
a.ErrorMessage
|
||||
})
|
||||
.ToListAsync();
|
||||
|
||||
return Ok(new { activities });
|
||||
}
|
||||
|
||||
[HttpGet("actors/{username}/keys")]
|
||||
public async Task<ActionResult> GetActorKeys(string username)
|
||||
{
|
||||
var publisher = await db.Publishers
|
||||
.FirstOrDefaultAsync(p => p.Name == username);
|
||||
|
||||
if (publisher == null)
|
||||
return NotFound();
|
||||
|
||||
var actorUrl = $"http://solar.local:5000/activitypub/actors/{username}";
|
||||
|
||||
var (privateKey, publicKey) = keyService.GenerateKeyPair();
|
||||
|
||||
return Ok(new
|
||||
{
|
||||
username,
|
||||
hasKeys = publisher.Meta != null,
|
||||
actorUri,
|
||||
publicKeyId = $"{actorUrl}#main-key",
|
||||
publicKey = publicKey,
|
||||
privateKeyStored = publisher.Meta != null
|
||||
});
|
||||
}
|
||||
|
||||
[HttpPost("sign")]
|
||||
public ActionResult TestSignature([FromBody] TestSignatureRequest request)
|
||||
{
|
||||
var isValid = keyService.Verify(
|
||||
request.PublicKey,
|
||||
request.SigningString,
|
||||
request.Signature
|
||||
);
|
||||
|
||||
return Ok(new
|
||||
{
|
||||
valid = isValid,
|
||||
message = isValid ? "Signature is valid" : "Signature is invalid"
|
||||
});
|
||||
}
|
||||
|
||||
private async Task<SnPublisher?> GetPublisherForUser(Guid accountId)
|
||||
{
|
||||
return await db.Publishers
|
||||
.Include(p => p.Members)
|
||||
.Where(p => p.Members.Any(m => m.AccountId == accountId))
|
||||
.FirstOrDefaultAsync();
|
||||
}
|
||||
|
||||
private Guid GetCurrentUser()
|
||||
{
|
||||
// Implement based on your auth system
|
||||
return Guid.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
public class TestFollowRequest
|
||||
{
|
||||
public string TargetActorUri { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class TestLikeRequest
|
||||
{
|
||||
public Guid PostId { get; set; }
|
||||
public string TargetActorUri { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class TestAnnounceRequest
|
||||
{
|
||||
public Guid PostId { get; set; }
|
||||
}
|
||||
|
||||
public class TestUndoRequest
|
||||
{
|
||||
public string ActivityType { get; set; } = string.Empty;
|
||||
public string ObjectUri { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class TestSignatureRequest
|
||||
{
|
||||
public string PublicKey { get; set; } = string.Empty;
|
||||
public string SigningString { get; set; } = string.Empty;
|
||||
public string Signature { get; set; } = string.Empty;
|
||||
}
|
||||
```
|
||||
|
||||
## Testing with Helper Endpoints
|
||||
|
||||
### 1. Test Follow
|
||||
```bash
|
||||
curl -X POST http://solar.local:5000/api/activitypub/test/follow \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: Bearer YOUR_TOKEN" \
|
||||
-d '{
|
||||
"targetActorUri": "http://mastodon.local:3001/users/testuser"
|
||||
}'
|
||||
```
|
||||
|
||||
### 2. Test Like
|
||||
```bash
|
||||
curl -X POST http://solar.local:5000/api/activitypub/test/like \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: Bearer YOUR_TOKEN" \
|
||||
-d '{
|
||||
"postId": "YOUR_POST_ID",
|
||||
"targetActorUri": "http://mastodon.local:5000/activitypub/actors/mastodonuser"
|
||||
}'
|
||||
```
|
||||
|
||||
### 3. Check Status
|
||||
```bash
|
||||
curl http://solar.local:5000/api/activitypub/test/status \
|
||||
-H "Authorization: Bearer YOUR_TOKEN"
|
||||
```
|
||||
|
||||
### 4. Get Recent Activities
|
||||
```bash
|
||||
curl "http://solar.local:5000/api/activitypub/test/activities?limit=10" \
|
||||
-H "Authorization: Bearer YOUR_TOKEN"
|
||||
```
|
||||
|
||||
## Integration with Main Flow
|
||||
|
||||
These helper endpoints can be used to:
|
||||
|
||||
1. **Quickly test federation** without full UI integration
|
||||
2. **Debug specific activity types** in isolation
|
||||
3. **Verify HTTP signatures** are correct
|
||||
4. **Test error handling** for various scenarios
|
||||
5. **Monitor federation status** during development
|
||||
|
||||
## Security Notes
|
||||
|
||||
- All test endpoints require authentication
|
||||
- Use only in development/staging environments
|
||||
- Remove or disable in production
|
||||
- Rate limiting recommended if exposing to public
|
||||
|
||||
## Cleanup
|
||||
|
||||
After testing, you can:
|
||||
|
||||
1. Remove the test controller (optional)
|
||||
2. Disable test endpoints
|
||||
3. Clear test activities from database
|
||||
4. Reset test relationships
|
||||
|
||||
```sql
|
||||
-- Clear test data
|
||||
DELETE FROM fediverse_activities WHERE created_at < NOW() - INTERVAL '1 day';
|
||||
```
|
||||
448
docs/activitypub/ACTIVITYPUB_TESTING_INDEX.md
Normal file
448
docs/activitypub/ACTIVITYPUB_TESTING_INDEX.md
Normal file
@@ -0,0 +1,448 @@
|
||||
# ActivityPub Testing - Complete Guide
|
||||
|
||||
This is the complete guide for testing ActivityPub federation in Solar Network.
|
||||
|
||||
## 📁 File Overview
|
||||
|
||||
| File | Purpose | When to Use |
|
||||
|------|---------|--------------|
|
||||
| `setup-activitypub-test.sh` | One-command setup of test environment | First time setup |
|
||||
| `test-activitypub.sh` | Quick validation of basic functionality | After setup, before detailed tests |
|
||||
| `ACTIVITYPUB_TESTING_QUICKSTART.md` | Quick start reference | Getting started quickly |
|
||||
| `ACTIVITYPUB_TESTING_GUIDE.md` | Comprehensive testing scenarios | Full testing workflow |
|
||||
| `ACTIVITYPUB_TESTING_QUICKREF.md` | Command and query reference | Daily testing |
|
||||
| `ACTIVITYPUB_TESTING_HELPER_API.md` | Helper API for testing | Programmatic testing |
|
||||
| `ACTIVITYPUB_TEST_RESULTS_TEMPLATE.md` | Track test results | During testing |
|
||||
| `ACTIVITYPUB_IMPLEMENTATION.md` | Implementation details | Understanding the code |
|
||||
| `ACTIVITYPUB_SUMMARY.md` | Feature summary | Reviewing what's implemented |
|
||||
|
||||
## 🚀 Quick Start (5 Minutes)
|
||||
|
||||
### 1. Setup Test Environment
|
||||
|
||||
```bash
|
||||
./setup-activitypub-test.sh
|
||||
```
|
||||
|
||||
This will:
|
||||
- ✅ Configure `/etc/hosts`
|
||||
- ✅ Start Mastodon via Docker
|
||||
- ✅ Create test Mastodon account
|
||||
- ✅ Apply database migrations
|
||||
|
||||
### 2. Validate Setup
|
||||
|
||||
```bash
|
||||
./test-activitypub.sh
|
||||
```
|
||||
|
||||
This checks:
|
||||
- ✅ WebFinger endpoint
|
||||
- ✅ Actor profile
|
||||
- ✅ Public keys
|
||||
- ✅ Database tables
|
||||
|
||||
### 3. Start Solar Network
|
||||
|
||||
```bash
|
||||
cd DysonNetwork.Sphere
|
||||
dotnet run
|
||||
```
|
||||
|
||||
### 4. Test Federation
|
||||
|
||||
1. Open http://mastodon.local:3001
|
||||
2. Search for `@solaruser@solar.local`
|
||||
3. Click Follow
|
||||
4. Create a post in Solar Network
|
||||
5. Verify it appears in Mastodon
|
||||
|
||||
## 📖 Recommended Reading Order
|
||||
|
||||
### For First-Time Testing
|
||||
|
||||
1. **Start Here**: `ACTIVITYPUB_TESTING_QUICKSTART.md`
|
||||
- Overview of the setup
|
||||
- Quick command reference
|
||||
- Common commands
|
||||
|
||||
2. **Then**: `ACTIVITYPUB_TESTING_GUIDE.md`
|
||||
- Detailed test scenarios
|
||||
- Step-by-step instructions
|
||||
- Troubleshooting
|
||||
|
||||
3. **Reference**: `ACTIVITYPUB_TESTING_QUICKREF.md`
|
||||
- Command snippets
|
||||
- Database queries
|
||||
- Response codes
|
||||
|
||||
### During Testing
|
||||
|
||||
1. **Track Progress**: `ACTIVITYPUB_TEST_RESULTS_TEMPLATE.md`
|
||||
- Checklists for each test
|
||||
- Results tracking
|
||||
- Issue logging
|
||||
|
||||
2. **Helper API**: `ACTIVITYPUB_TESTING_HELPER_API.md`
|
||||
- Manual testing endpoints
|
||||
- Debugging tools
|
||||
- Status monitoring
|
||||
|
||||
### For Understanding
|
||||
|
||||
1. **Implementation**: `ACTIVITYPUB_IMPLEMENTATION.md`
|
||||
- Architecture details
|
||||
- Service descriptions
|
||||
- Data flow diagrams
|
||||
|
||||
2. **Features**: `ACTIVITYPUB_SUMMARY.md`
|
||||
- What's implemented
|
||||
- Model relationships
|
||||
- API endpoints
|
||||
|
||||
## 🔍 Test Scenarios Summary
|
||||
|
||||
### Basic Functionality (All instances must pass)
|
||||
|
||||
- [ ] WebFinger discovery works
|
||||
- [ ] Actor profile is valid JSON-LD
|
||||
- [ ] Public key is present
|
||||
- [ ] Outbox returns public posts
|
||||
- [ ] Inbox accepts activities
|
||||
|
||||
### Federation - Follow
|
||||
|
||||
- [ ] Remote user can follow local user
|
||||
- [ ] Local user can follow remote user
|
||||
- [ ] Accept activity is sent/received
|
||||
- [ ] Relationship state is correct
|
||||
- [ ] Unfollow works correctly
|
||||
|
||||
### Federation - Content
|
||||
|
||||
- [ ] Local posts federate to remote instances
|
||||
- [ ] Remote posts appear in local database
|
||||
- [ ] Post content is preserved
|
||||
- [ ] Timestamps are correct
|
||||
- [ ] Attachments are handled
|
||||
- [ ] Content warnings are respected
|
||||
|
||||
### Federation - Interactions
|
||||
|
||||
- [ ] Likes federate correctly
|
||||
- [ ] Likes appear in both instances
|
||||
- [ ] Replies federate correctly
|
||||
- [ ] Reply threading works
|
||||
- [ ] Boosts/Announces work
|
||||
- [ ] Undo activities work
|
||||
|
||||
### Security
|
||||
|
||||
- [ ] HTTP signatures are verified
|
||||
- [ ] Invalid signatures are rejected
|
||||
- [ ] Keys are properly stored
|
||||
- [ ] Private keys never exposed
|
||||
|
||||
## 🐛 Common Issues & Solutions
|
||||
|
||||
### Issue: "Failed to verify signature"
|
||||
|
||||
**Causes**:
|
||||
1. Signature header format is wrong
|
||||
2. Public key doesn't match keyId
|
||||
3. Date header is too old (>5 minutes)
|
||||
4. Request body doesn't match digest
|
||||
|
||||
**Solutions**:
|
||||
1. Check signature format: `keyId="...",algorithm="...",headers="...",signature="..."`
|
||||
2. Verify keyId in actor profile
|
||||
3. Ensure Date header is recent
|
||||
4. Check body is exactly what was signed
|
||||
|
||||
### Issue: "Target actor or inbox not found"
|
||||
|
||||
**Causes**:
|
||||
1. Actor hasn't been fetched yet
|
||||
2. Actor URL is incorrect
|
||||
3. Remote instance is inaccessible
|
||||
|
||||
**Solutions**:
|
||||
1. Manually fetch actor first
|
||||
2. Verify actor URL is correct
|
||||
3. Test accessibility with curl
|
||||
|
||||
### Issue: Activities not arriving
|
||||
|
||||
**Causes**:
|
||||
1. Network connectivity issue
|
||||
2. Remote instance is down
|
||||
3. Activity wasn't queued properly
|
||||
|
||||
**Solutions**:
|
||||
1. Check network connectivity
|
||||
2. Verify remote instance is running
|
||||
3. Check fediverse_activities table for status
|
||||
|
||||
## 📊 Monitoring During Tests
|
||||
|
||||
### Check Logs
|
||||
|
||||
```bash
|
||||
# Solar Network ActivityPub logs
|
||||
dotnet run --project DysonNetwork.Sphere 2>&1 | grep -i activitypub
|
||||
|
||||
# Mastodon federation logs
|
||||
docker compose -f docker-compose.mastodon-test.yml logs -f web | grep -i federation
|
||||
```
|
||||
|
||||
### Monitor Database
|
||||
|
||||
```bash
|
||||
# Watch activity table
|
||||
watch -n 2 'psql -d dyson_network -c \
|
||||
"SELECT type, status, created_at FROM fediverse_activities ORDER BY created_at DESC LIMIT 5;"'
|
||||
```
|
||||
|
||||
### Test Network
|
||||
|
||||
```bash
|
||||
# Test connectivity between instances
|
||||
curl -v http://mastodon.local:3001
|
||||
curl -v http://solar.local:5000
|
||||
|
||||
# Test with traceroute (if available)
|
||||
traceroute mastodon.local
|
||||
traceroute solar.local
|
||||
```
|
||||
|
||||
## 🎯 Success Criteria
|
||||
|
||||
### Minimal Viable Federation
|
||||
|
||||
To consider ActivityPub implementation "working", all of these must pass:
|
||||
|
||||
- ✅ WebFinger returns actor links
|
||||
- ✅ Actor profile has all required fields
|
||||
- ✅ Follow relationships work bidirectionally
|
||||
- ✅ Public posts federate to followers
|
||||
- ✅ Incoming posts are stored correctly
|
||||
- ✅ HTTP signatures are verified
|
||||
- ✅ Basic interaction types work (Like, Reply)
|
||||
|
||||
### Full Production Ready
|
||||
|
||||
For production, also need:
|
||||
|
||||
- ✅ Activity queue with retry logic
|
||||
- ✅ Rate limiting on outgoing deliveries
|
||||
- ✅ Monitoring and alerting
|
||||
- ✅ Admin interface for federation management
|
||||
- ✅ Content filtering and moderation
|
||||
- ✅ Instance blocking capabilities
|
||||
- ✅ Performance optimization for high volume
|
||||
|
||||
## 🔐 Security Checklist
|
||||
|
||||
During testing, verify:
|
||||
|
||||
- [ ] Private keys are never logged
|
||||
- [ ] Private keys are never returned in API responses
|
||||
- [ ] Only public keys are in actor profiles
|
||||
- [ ] All incoming activities are signature-verified
|
||||
- [ ] Invalid signatures are rejected with 401
|
||||
- [ ] TLS is used in production
|
||||
- [ ] Host header is verified against request URL
|
||||
|
||||
## 📈 Performance Metrics
|
||||
|
||||
Track these during testing:
|
||||
|
||||
| Metric | Target | Actual |
|
||||
|--------|--------|--------|
|
||||
| WebFinger response time | <500ms | ___ ms |
|
||||
| Actor fetch time | <1s | ___ ms |
|
||||
| Signature verification time | <100ms | ___ ms |
|
||||
| Activity processing time | <500ms | ___ ms |
|
||||
| Outgoing delivery success rate | >95% | ___% |
|
||||
| Outgoing delivery time | <5s | ___ ms |
|
||||
|
||||
## 🧪 Testing Checklist
|
||||
|
||||
### Self-Hosted Instance Tests
|
||||
|
||||
**Setup**:
|
||||
- [ ] Setup script completed
|
||||
- [ ] Mast containers running
|
||||
- [ ] Solar Network running
|
||||
- [ ] /etc/hosts configured
|
||||
- [ ] Database migrations applied
|
||||
|
||||
**Basic Federation**:
|
||||
- [ ] WebFinger works
|
||||
- [ ] Actor profile valid
|
||||
- [ ] Public key present
|
||||
- [ ] Outbox accessible
|
||||
|
||||
**Follow Flow**:
|
||||
- [ ] Mastodon → Solar follow works
|
||||
- [ ] Solar → Mastodon follow works
|
||||
- [ ] Accept activity sent
|
||||
- [ ] Relationship state correct
|
||||
|
||||
**Content Flow**:
|
||||
- [ ] Solar posts appear in Mastodon
|
||||
- [ ] Mastodon posts appear in Solar
|
||||
- [ ] Content preserved correctly
|
||||
- [ ] Timestamps correct
|
||||
|
||||
**Interactions**:
|
||||
- [ ] Likes work both ways
|
||||
- [ ] Replies work both ways
|
||||
- [ ] Boosts work both ways
|
||||
- [ ] Undo works
|
||||
|
||||
**Security**:
|
||||
- [ ] HTTP signatures verified
|
||||
- [ ] Invalid signatures rejected
|
||||
- [ ] Keys properly managed
|
||||
|
||||
### Real Instance Tests
|
||||
|
||||
**Discovery**:
|
||||
- [ ] Domain publicly accessible
|
||||
- [ ] WebFinger works from public internet
|
||||
- [ ] Actor discoverable from public instances
|
||||
|
||||
**Federation**:
|
||||
- [ ] Posts federate to public instances
|
||||
- [ ] Follows work with public instances
|
||||
- [ ] Interactions work with public instances
|
||||
|
||||
## 📝 Testing Notes
|
||||
|
||||
### What Worked Well
|
||||
1. _____________________
|
||||
2. _____________________
|
||||
3. _____________________
|
||||
|
||||
### What Needs Improvement
|
||||
1. _____________________
|
||||
2. _____________________
|
||||
3. _____________________
|
||||
|
||||
### Bugs Found
|
||||
| # | Description | Severity | Status |
|
||||
|---|-------------|----------|--------|
|
||||
| 1 | _____________________ | Low/Medium/High | ☐ Open/☐ Fixed |
|
||||
| 2 | _____________________ | Low/Medium/High | ☐ Open/☐ Fixed |
|
||||
| 3 | _____________________ | Low/Medium/High | ☐ Open/☐ Fixed |
|
||||
|
||||
## 🎓 Learning Resources
|
||||
|
||||
### ActivityPub Specification
|
||||
- [W3C ActivityPub Recommendation](https://www.w3.org/TR/activitypub/)
|
||||
- [ActivityStreams 2.0](https://www.w3.org/TR/activitystreams-core/)
|
||||
- [HTTP Signatures Draft](https://datatracker.ietf.org/doc/html/draft-cavage-http-signatures)
|
||||
|
||||
### Implementation Guides
|
||||
- [Mastodon Federation Guide](https://docs.joinmastodon.org/admin/federation/)
|
||||
- [ActivityPub Testing Best Practices](https://blog.joinmastodon.org/2018/06/27/how-to-implement-a-basic-activitypub-server/)
|
||||
- [Federation Testing Checklist](https://docs.joinmastodon.org/spec/activitypub/)
|
||||
|
||||
### Tools
|
||||
- [ActivityPub Playground](https://swicth.github.io/activity-pub-playground/)
|
||||
- [FediTest](https://feditest.com/)
|
||||
- [JSONPath Online Evaluator](https://jsonpath.com/)
|
||||
|
||||
## 🔄 Next Steps After Testing
|
||||
|
||||
### Phase 1: Fix Issues
|
||||
- Address all bugs found during testing
|
||||
- Improve error messages
|
||||
- Add better logging
|
||||
|
||||
### Phase 2: Enhance Features
|
||||
- Implement activity queue
|
||||
- Add retry logic
|
||||
- Add rate limiting
|
||||
- Implement instance blocking
|
||||
|
||||
### Phase 3: Production Readiness
|
||||
- Add monitoring and metrics
|
||||
- Add admin interface
|
||||
- Add content filtering
|
||||
- Implement moderation tools
|
||||
|
||||
### Phase 4: Additional Features
|
||||
- Support more activity types
|
||||
- Support media attachments
|
||||
- Support polls
|
||||
- Support custom emojis
|
||||
|
||||
## 📞 Getting Help
|
||||
|
||||
If you encounter issues:
|
||||
|
||||
1. **Check logs**: See the logs section above
|
||||
2. **Review troubleshooting**: See `ACTIVITYPUB_TESTING_GUIDE.md` Part 5
|
||||
3. **Check database queries**: Use queries from `ACTIVITYPUB_TESTING_QUICKREF.md`
|
||||
4. **Validate signatures**: Use helper API in `ACTIVITYPUB_TESTING_HELPER_API.md`
|
||||
|
||||
## ✨ Quick Test Commands
|
||||
|
||||
### All-in-One Test Sequence
|
||||
|
||||
```bash
|
||||
# 1. Setup
|
||||
./setup-activitypub-test.sh
|
||||
|
||||
# 2. Validate
|
||||
./test-activitypub.sh
|
||||
|
||||
# 3. Test WebFinger
|
||||
curl "http://solar.local:5000/.well-known/webfinger?resource=acct:solaruser@solar.local"
|
||||
|
||||
# 4. Test Actor
|
||||
curl -H "Accept: application/activity+json" \
|
||||
http://solar.local:5000/activitypub/actors/solaruser
|
||||
|
||||
# 5. Test Follow (from Mastodon UI)
|
||||
# Open http://mastodon.local:3001 and follow @solaruser@solar.local
|
||||
|
||||
# 6. Check database
|
||||
psql -d dyson_network -c "SELECT * FROM fediverse_relationships;"
|
||||
|
||||
# 7. Test Post (create in Solar Network UI)
|
||||
# Should appear in http://mastodon.local:3001
|
||||
|
||||
# 8. Verify content
|
||||
psql -d dyson_network -c "SELECT * FROM fediverse_contents;"
|
||||
|
||||
# 9. Test Like (like from Mastodon UI)
|
||||
# Should appear in fediverse_reactions table
|
||||
|
||||
# 10. Check activities
|
||||
psql -d dyson_network -c "SELECT type, status FROM fediverse_activities;"
|
||||
```
|
||||
|
||||
## 🎉 Conclusion
|
||||
|
||||
You now have everything needed to test ActivityPub federation for Solar Network:
|
||||
|
||||
- ✅ Self-hosted test environment (Mastodon)
|
||||
- ✅ Setup automation (setup script)
|
||||
- ✅ Quick validation (test script)
|
||||
- ✅ Comprehensive testing guide
|
||||
- ✅ Helper API for programmatic testing
|
||||
- ✅ Quick reference for daily use
|
||||
- ✅ Results template for tracking progress
|
||||
|
||||
**Recommended workflow**:
|
||||
1. Run `setup-activitypub-test.sh`
|
||||
2. Run `test-activitypub.sh` for validation
|
||||
3. Follow scenarios in `ACTIVITYPUB_TESTING_GUIDE.md`
|
||||
4. Use `ACTIVITYPUB_TESTING_HELPER_API.md` for specific tests
|
||||
5. Track results in `ACTIVITYPUB_TEST_RESULTS_TEMPLATE.md`
|
||||
6. Reference `ACTIVITYPUB_TESTING_QUICKREF.md` for commands
|
||||
|
||||
Good luck with your federation testing! 🚀
|
||||
356
docs/activitypub/ACTIVITYPUB_TESTING_QUICKREF.md
Normal file
356
docs/activitypub/ACTIVITYPUB_TESTING_QUICKREF.md
Normal file
@@ -0,0 +1,356 @@
|
||||
# ActivityPub Testing Quick Reference
|
||||
|
||||
## Quick Test Commands
|
||||
|
||||
### 1. Test WebFinger
|
||||
```bash
|
||||
curl "http://solar.local:5000/.well-known/webfinger?resource=acct:username@solar.local"
|
||||
```
|
||||
|
||||
### 2. Fetch Actor Profile
|
||||
```bash
|
||||
curl -H "Accept: application/activity+json" \
|
||||
http://solar.local:5000/activitypub/actors/username
|
||||
```
|
||||
|
||||
### 3. Get Outbox
|
||||
```bash
|
||||
curl -H "Accept: application/activity+json" \
|
||||
http://solar.local:5000/activitypub/actors/username/outbox
|
||||
```
|
||||
|
||||
### 4. Send Test Follow (from remote)
|
||||
```bash
|
||||
curl -X POST http://solar.local:5000/activitypub/actors/username/inbox \
|
||||
-H "Content-Type: application/activity+json" \
|
||||
-d '{
|
||||
"@context": "https://www.w3.org/ns/activitystreams",
|
||||
"id": "https://mastodon.local:3001/follow-123",
|
||||
"type": "Follow",
|
||||
"actor": "https://mastodon.local:3001/users/remoteuser",
|
||||
"object": "https://solar.local:5000/activitypub/actors/username"
|
||||
}'
|
||||
```
|
||||
|
||||
### 5. Send Test Create (post)
|
||||
```bash
|
||||
curl -X POST http://solar.local:5000/activitypub/actors/username/inbox \
|
||||
-H "Content-Type: application/activity+json" \
|
||||
-d '{
|
||||
"@context": "https://www.w3.org/ns/activitystreams",
|
||||
"id": "https://mastodon.local:3001/post-123",
|
||||
"type": "Create",
|
||||
"actor": "https://mastodon.local:3001/users/remoteuser",
|
||||
"object": {
|
||||
"id": "https://mastodon.local:3001/objects/post-123",
|
||||
"type": "Note",
|
||||
"content": "Hello from Mastodon! @username@solar.local",
|
||||
"attributedTo": "https://mastodon.local:3001/users/remoteuser",
|
||||
"to": ["https://www.w3.org/ns/activitystreams#Public"]
|
||||
}
|
||||
}'
|
||||
```
|
||||
|
||||
### 6. Send Test Like
|
||||
```bash
|
||||
curl -X POST http://solar.local:5000/activitypub/actors/username/inbox \
|
||||
-H "Content-Type: application/activity+json" \
|
||||
-d '{
|
||||
"@context": "https://www.w3.org/ns/activitystreams",
|
||||
"id": "https://mastodon.local:3001/like-123",
|
||||
"type": "Like",
|
||||
"actor": "https://mastodon.local:3001/users/remoteuser",
|
||||
"object": "https://solar.local:5000/activitypub/objects/post-id"
|
||||
}'
|
||||
```
|
||||
|
||||
## Database Queries
|
||||
|
||||
### Check Actors
|
||||
```sql
|
||||
SELECT id, uri, username, display_name, instance_id
|
||||
FROM fediverse_actors;
|
||||
```
|
||||
|
||||
### Check Contents
|
||||
```sql
|
||||
SELECT id, uri, type, content, actor_id, created_at
|
||||
FROM fediverse_contents
|
||||
ORDER BY created_at DESC
|
||||
LIMIT 20;
|
||||
```
|
||||
|
||||
### Check Relationships
|
||||
```sql
|
||||
SELECT r.id, a1.uri as actor, a2.uri as target, r.state, r.is_following
|
||||
FROM fediverse_relationships r
|
||||
JOIN fediverse_actors a1 ON r.actor_id = a1.id
|
||||
JOIN fediverse_actors a2 ON r.target_actor_id = a2.id;
|
||||
```
|
||||
|
||||
### Check Activities
|
||||
```sql
|
||||
SELECT type, status, error_message, created_at
|
||||
FROM fediverse_activities
|
||||
ORDER BY created_at DESC
|
||||
LIMIT 20;
|
||||
```
|
||||
|
||||
### Check Reactions
|
||||
```sql
|
||||
SELECT r.type, c.uri as content_uri, a.uri as actor_uri
|
||||
FROM fediverse_reactions r
|
||||
JOIN fediverse_contents c ON r.content_id = c.id
|
||||
JOIN fediverse_actors a ON r.actor_id = a.id;
|
||||
```
|
||||
|
||||
## Check Keys in Publisher
|
||||
```sql
|
||||
SELECT id, name, meta
|
||||
FROM publishers
|
||||
WHERE meta IS NOT NULL;
|
||||
```
|
||||
|
||||
## Docker Commands
|
||||
|
||||
### Start Mastodon
|
||||
```bash
|
||||
docker-compose -f docker-compose.mastodon-test.yml up -d
|
||||
```
|
||||
|
||||
### View Mastodon Logs
|
||||
```bash
|
||||
docker-compose -f docker-compose.mastodon-test.yml logs -f web
|
||||
```
|
||||
|
||||
### Stop Mastodon
|
||||
```bash
|
||||
docker-compose -f docker-compose.mastodon-test.yml down
|
||||
```
|
||||
|
||||
### Start GoToSocial
|
||||
```bash
|
||||
docker-compose -f docker-compose.gotosocial.yml up -d
|
||||
```
|
||||
|
||||
## Solar Network Commands
|
||||
|
||||
### Run Migrations
|
||||
```bash
|
||||
cd DysonNetwork.Sphere
|
||||
dotnet ef database update
|
||||
```
|
||||
|
||||
### Run with Debug Logging
|
||||
```bash
|
||||
dotnet run --project DysonNetwork.Sphere -- --logging:LogLevel:DysonNetwork.Sphere.ActivityPub=Trace
|
||||
```
|
||||
|
||||
## Common Response Codes
|
||||
|
||||
| Code | Meaning |
|
||||
|------|---------|
|
||||
| 200 | Success |
|
||||
| 202 | Accepted (activity queued) |
|
||||
| 401 | Unauthorized (invalid signature) |
|
||||
| 404 | Not found (user/post doesn't exist) |
|
||||
| 400 | Bad request (invalid activity) |
|
||||
|
||||
## Activity Status Codes
|
||||
|
||||
| Status | Code | Meaning |
|
||||
|--------|------|---------|
|
||||
| Pending | 0 | Activity waiting to be processed |
|
||||
| Processing | 1 | Activity being processed |
|
||||
| Completed | 2 | Activity successfully processed |
|
||||
| Failed | 3 | Activity processing failed |
|
||||
|
||||
## Relationship States
|
||||
|
||||
| State | Code | Meaning |
|
||||
|--------|------|---------|
|
||||
| Pending | 0 | Follow request sent, waiting for Accept |
|
||||
| Accepted | 1 | Follow accepted, relationship active |
|
||||
| Rejected | 2 | Follow rejected |
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### "Failed to verify signature"
|
||||
|
||||
**Check**: Signature header format
|
||||
```bash
|
||||
# Should be:
|
||||
Signature: keyId="...",algorithm="rsa-sha256",headers="...",signature="..."
|
||||
```
|
||||
|
||||
**Check**: Public key in actor profile
|
||||
```bash
|
||||
curl -H "Accept: application/activity+json" \
|
||||
http://solar.local:5000/activitypub/actors/username | jq '.publicKey'
|
||||
```
|
||||
|
||||
### "Actor not found"
|
||||
|
||||
**Check**: Actor exists in database
|
||||
```bash
|
||||
psql -d dyson_network -c \
|
||||
"SELECT * FROM fediverse_actors WHERE uri = '...';"
|
||||
```
|
||||
|
||||
**Check**: Actor URL is accessible
|
||||
```bash
|
||||
curl -v http://remote-instance.com/users/username
|
||||
```
|
||||
|
||||
### "Content already exists"
|
||||
|
||||
This is normal behavior - the system is deduplicating.
|
||||
|
||||
### "Target publisher not found"
|
||||
|
||||
**Check**: Publisher exists
|
||||
```bash
|
||||
psql -d dyson_network -c \
|
||||
"SELECT * FROM publishers WHERE name = '...';"
|
||||
```
|
||||
|
||||
## Quick Test Sequence
|
||||
|
||||
### Full Federation Test
|
||||
|
||||
```bash
|
||||
# 1. Start both instances
|
||||
docker-compose -f docker-compose.mastodon-test.yml up -d
|
||||
dotnet run --project DysonNetwork.Sphere
|
||||
|
||||
# 2. Test WebFinger
|
||||
curl "http://solar.local:5000/.well-known/webfinger?resource=acct:solaruser@solar.local"
|
||||
|
||||
# 3. Get Actor
|
||||
curl -H "Accept: application/activity+json" \
|
||||
http://solar.local:5000/activitypub/actors/solaruser
|
||||
|
||||
# 4. Send Follow from Mastodon
|
||||
# (Do this in Mastodon UI or use curl above)
|
||||
|
||||
# 5. Check database
|
||||
psql -d dyson_network -c "SELECT * FROM fediverse_relationships;"
|
||||
|
||||
# 6. Send Create (post) from Mastodon
|
||||
# (Use curl command above)
|
||||
|
||||
# 7. Check content
|
||||
psql -d dyson_network -c "SELECT * FROM fediverse_contents;"
|
||||
|
||||
# 8. Send Like from Mastodon
|
||||
# (Use curl command above)
|
||||
|
||||
# 9. Check reactions
|
||||
psql -d dyson_network -c "SELECT * FROM fediverse_reactions;"
|
||||
|
||||
# 10. Check activities
|
||||
psql -d dyson_network -c "SELECT type, status FROM fediverse_activities;"
|
||||
```
|
||||
|
||||
## Test URLs
|
||||
|
||||
| Instance | Web | API | ActivityPub |
|
||||
|----------|-----|-----|-----------|
|
||||
| Solar Network | http://solar.local:5000 | http://solar.local:5000/api | http://solar.local:5000/activitypub |
|
||||
| Mastodon | http://mastodon.local:3001 | http://mastodon.local:3001/api/v1 | http://mastodon.local:3001/inbox |
|
||||
|
||||
## Environment Variables
|
||||
|
||||
### Solar Network
|
||||
```bash
|
||||
export SOLAR_DOMAIN="solar.local"
|
||||
export SOLAR_URL="http://solar.local:5000"
|
||||
```
|
||||
|
||||
### Mastodon
|
||||
```bash
|
||||
export MASTODON_DOMAIN="mastodon.local"
|
||||
export MASTODON_URL="http://mastodon.local:3001"
|
||||
```
|
||||
|
||||
## Useful jq Commands
|
||||
|
||||
### Extract Actor ID
|
||||
```bash
|
||||
curl ... | jq '.id'
|
||||
```
|
||||
|
||||
### Extract Inbox URL
|
||||
```bash
|
||||
curl ... | jq '.inbox'
|
||||
```
|
||||
|
||||
### Extract Public Key
|
||||
```bash
|
||||
curl ... | jq '.publicKey.publicKeyPem'
|
||||
```
|
||||
|
||||
### Pretty Print Activity
|
||||
```bash
|
||||
curl ... | jq '.'
|
||||
```
|
||||
|
||||
### Extract Activity Type
|
||||
```bash
|
||||
curl ... | jq '.type'
|
||||
```
|
||||
|
||||
## Network Setup
|
||||
|
||||
### /etc/hosts
|
||||
```
|
||||
127.0.0.1 solar.local
|
||||
127.0.0.1 mastodon.local
|
||||
127.0.0.1 gotosocial.local
|
||||
```
|
||||
|
||||
### Ports Used
|
||||
- Solar Network: 5000
|
||||
- Mastodon: 3001 (web), 4000 (streaming)
|
||||
- GoToSocial: 3002
|
||||
- PostgreSQL: 5432
|
||||
- Redis: 6379
|
||||
- Elasticsearch: 9200
|
||||
|
||||
## File Locations
|
||||
|
||||
### Docker Compose Files
|
||||
- `docker-compose.mastodon-test.yml`
|
||||
- `docker-compose.gotosocial.yml`
|
||||
|
||||
### Environment Files
|
||||
- `.env.mastodon`
|
||||
|
||||
### Data Volumes
|
||||
- `./mastodon-data/`
|
||||
- `./gotosocial-data/`
|
||||
|
||||
## Clean Up Commands
|
||||
|
||||
```bash
|
||||
# Reset database
|
||||
psql -d dyson_network <<EOF
|
||||
TRUNCATE fediverse_activities CASCADE;
|
||||
TRUNCATE fediverse_relationships CASCADE;
|
||||
TRUNCATE fediverse_reactions CASCADE;
|
||||
TRUNCATE fediverse_contents CASCADE;
|
||||
TRUNCATE fediverse_actors CASCADE;
|
||||
TRUNCATE fediverse_instances CASCADE;
|
||||
UPDATE publishers SET meta = NULL WHERE meta IS NOT NULL;
|
||||
EOF
|
||||
|
||||
# Reset everything
|
||||
docker-compose -f docker-compose.mastodon-test.yml down -v
|
||||
docker-compose -f docker-compose.gotosocial.yml down -v
|
||||
psql -d dyson_network <<EOF
|
||||
DROP SCHEMA public CASCADE;
|
||||
CREATE SCHEMA public;
|
||||
EOF
|
||||
dotnet ef database drop
|
||||
dotnet ef database update
|
||||
```
|
||||
289
docs/activitypub/ACTIVITYPUB_TESTING_QUICKSTART.md
Normal file
289
docs/activitypub/ACTIVITYPUB_TESTING_QUICKSTART.md
Normal file
@@ -0,0 +1,289 @@
|
||||
# ActivityPub Testing - Quick Start
|
||||
|
||||
This directory contains everything you need to test ActivityPub federation for Solar Network.
|
||||
|
||||
## Quick Start
|
||||
|
||||
### 1. Run the Setup Script
|
||||
|
||||
```bash
|
||||
./setup-activitypub-test.sh
|
||||
```
|
||||
|
||||
This will:
|
||||
- ✅ Check prerequisites (Docker, PostgreSQL)
|
||||
- ✅ Update `/etc/hosts` with test domains
|
||||
- ✅ Generate Mastodon environment file
|
||||
- ✅ Create Docker Compose file
|
||||
- ✅ Start Mastodon containers
|
||||
- ✅ Create test Mastodon account
|
||||
- ✅ Apply Solar Network migrations
|
||||
|
||||
### 2. Start Solar Network
|
||||
|
||||
```bash
|
||||
cd DysonNetwork.Sphere
|
||||
dotnet run
|
||||
```
|
||||
|
||||
### 3. Test Federation
|
||||
|
||||
Follow the scenarios in [ACTIVITYPUB_TESTING_GUIDE.md](ACTIVITYPUB_TESTING_GUIDE.md)
|
||||
|
||||
## Test Instances
|
||||
|
||||
| Service | URL | Notes |
|
||||
|---------|-----|-------|
|
||||
| Solar Network | http://solar.local:5000 | Your implementation |
|
||||
| Mastodon | http://mastodon.local:3001 | Test instance |
|
||||
| Mastodon Streaming | http://mastodon.local:4000 | WebSocket |
|
||||
|
||||
## Test Accounts
|
||||
|
||||
### Solar Network
|
||||
- Create via UI or API
|
||||
- Username: `solaruser` (or your choice)
|
||||
|
||||
### Mastodon
|
||||
- Username: `testuser@mastodon.local`
|
||||
- Password: `TestPassword123!`
|
||||
- Role: Admin
|
||||
|
||||
## Quick Test Commands
|
||||
|
||||
### Test WebFinger
|
||||
```bash
|
||||
curl "http://solar.local:5000/.well-known/webfinger?resource=acct:solaruser@solar.local"
|
||||
```
|
||||
|
||||
### Test Actor
|
||||
```bash
|
||||
curl -H "Accept: application/activity+json" \
|
||||
http://solar.local:5000/activitypub/actors/solaruser
|
||||
```
|
||||
|
||||
### Test Outbox
|
||||
```bash
|
||||
curl -H "Accept: application/activity+json" \
|
||||
http://solar.local:5000/activitypub/actors/solaruser/outbox
|
||||
```
|
||||
|
||||
### Test Follow (from Mastodon)
|
||||
1. Open http://mastodon.local:3001
|
||||
2. Log in as `testuser@mastodon.local`
|
||||
3. Search for `@solaruser@solar.local`
|
||||
4. Click Follow
|
||||
|
||||
### Test Follow (from Solar Network to Mastodon)
|
||||
```bash
|
||||
# Send Follow activity to Solar Network
|
||||
curl -X POST http://solar.local:5000/activitypub/actors/solaruser/inbox \
|
||||
-H "Content-Type: application/activity+json" \
|
||||
-d '{
|
||||
"@context": "https://www.w3.org/ns/activitystreams",
|
||||
"id": "http://solar.local:5000/follow-1",
|
||||
"type": "Follow",
|
||||
"actor": "https://solar.local:5000/activitypub/actors/solaruser",
|
||||
"object": "http://mastodon.local:3001/users/testuser"
|
||||
}'
|
||||
```
|
||||
|
||||
## Documentation Files
|
||||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `ACTIVITYPUB_TESTING_GUIDE.md` | Comprehensive testing guide |
|
||||
| `ACTIVITYPUB_TESTING_QUICKREF.md` | Quick command reference |
|
||||
| `ACTIVITYPUB_IMPLEMENTATION.md` | Implementation details |
|
||||
| `ACTIVITYPUB_SUMMARY.md` | Feature summary |
|
||||
| `ACTIVITYPUB_PLAN.md` | Original implementation plan |
|
||||
|
||||
## Database Checks
|
||||
|
||||
### Connect to Database
|
||||
```bash
|
||||
psql -d dyson_network
|
||||
```
|
||||
|
||||
### View Actors
|
||||
```sql
|
||||
SELECT uri, username, display_name, created_at
|
||||
FROM fediverse_actors;
|
||||
```
|
||||
|
||||
### View Contents
|
||||
```sql
|
||||
SELECT uri, type, content, actor_id, created_at
|
||||
FROM fediverse_contents
|
||||
ORDER BY created_at DESC
|
||||
LIMIT 10;
|
||||
```
|
||||
|
||||
### View Relationships
|
||||
```sql
|
||||
SELECT state, is_following, is_followed_by, created_at
|
||||
FROM fediverse_relationships;
|
||||
```
|
||||
|
||||
### View Activities
|
||||
```sql
|
||||
SELECT type, status, error_message, created_at
|
||||
FROM fediverse_activities
|
||||
ORDER BY created_at DESC
|
||||
LIMIT 10;
|
||||
```
|
||||
|
||||
## Logs
|
||||
|
||||
### Solar Network Logs
|
||||
```bash
|
||||
# Live logs
|
||||
dotnet run --project DysonNetwork.Sphere
|
||||
|
||||
# Follow ActivityPub activity
|
||||
dotnet run --project DysonNetwork.Sphere 2>&1 | grep -i activitypub
|
||||
|
||||
# Debug logging
|
||||
dotnet run --project DysonNetwork.Sphere --logging:LogLevel:DysonNetwork.Sphere.ActivityPub=Trace
|
||||
```
|
||||
|
||||
### Mastodon Logs
|
||||
```bash
|
||||
# All services
|
||||
docker compose -f docker-compose.mastodon-test.yml logs -f
|
||||
|
||||
# Web service only
|
||||
docker compose -f docker-compose.mastodon-test.yml logs -f web
|
||||
|
||||
# Filter for federation
|
||||
docker compose -f docker-compose.mastodon-test.yml logs -f web | grep -i federation
|
||||
```
|
||||
|
||||
## Stopping Everything
|
||||
|
||||
```bash
|
||||
# Stop Mastodon
|
||||
docker compose -f docker-compose.mastodon-test.yml down
|
||||
|
||||
# Stop with volume cleanup
|
||||
docker compose -f docker-compose.mastodon-test.yml down -v
|
||||
|
||||
# Restore /etc/hosts
|
||||
sudo mv /etc/hosts.backup /etc/hosts
|
||||
|
||||
# Remove test databases (optional)
|
||||
psql -d dyson_network <<EOF
|
||||
TRUNCATE fediverse_activities CASCADE;
|
||||
TRUNCATE fediverse_relationships CASCADE;
|
||||
TRUNCATE fediverse_reactions CASCADE;
|
||||
TRUNCATE fediverse_contents CASCADE;
|
||||
TRUNCATE fediverse_actors CASCADE;
|
||||
TRUNCATE fediverse_instances CASCADE;
|
||||
UPDATE publishers SET meta = NULL WHERE meta IS NOT NULL;
|
||||
EOF
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Mastodon won't start
|
||||
|
||||
```bash
|
||||
# Check logs
|
||||
docker compose -f docker-compose.mastodon-test.yml logs -f web
|
||||
|
||||
# Restart
|
||||
docker compose -f docker-compose.mastodon-test.yml restart
|
||||
|
||||
# Recreate
|
||||
docker compose -f docker-compose.mastodon-test.yml down
|
||||
docker compose -f docker-compose.mastodon-test.yml up -d
|
||||
```
|
||||
|
||||
### Can't connect to Solar Network
|
||||
|
||||
```bash
|
||||
# Check if running
|
||||
curl http://solar.local:5000
|
||||
|
||||
# Check logs
|
||||
dotnet run --project DysonNetwork.Sphere 2>&1 | grep -i error
|
||||
|
||||
# Restart
|
||||
# Ctrl+C in terminal and run again
|
||||
```
|
||||
|
||||
### Activities not arriving
|
||||
|
||||
```bash
|
||||
# Check database
|
||||
psql -d dyson_network -c "SELECT * FROM fediverse_activities WHERE status = 3;"
|
||||
|
||||
# Check signature verification logs
|
||||
dotnet run --project DysonNetwork.Sphere 2>&1 | grep -i "signature"
|
||||
|
||||
# Verify actor keys
|
||||
curl -H "Accept: application/activity+json" \
|
||||
http://solar.local:5000/activitypub/actors/solaruser | jq '.publicKey'
|
||||
```
|
||||
|
||||
## Testing Checklist
|
||||
|
||||
- [ ] Setup script completed successfully
|
||||
- [ ] Mastodon is running and accessible
|
||||
- [ ] Solar Network is running and accessible
|
||||
- [ ] WebFinger returns correct data
|
||||
- [ ] Actor profile includes public key
|
||||
- [ ] Follow from Mastodon to Solar Network works
|
||||
- [ ] Follow from Solar Network to Mastodon works
|
||||
- [ ] Posts from Solar Network appear in Mastodon
|
||||
- [ ] Posts from Mastodon appear in Solar Network database
|
||||
- [ ] Likes federate correctly
|
||||
- [ ] Replies federate correctly
|
||||
- [ ] HTTP signatures are verified
|
||||
- [ ] No errors in logs
|
||||
- [ ] Database contains expected data
|
||||
|
||||
## Next Steps
|
||||
|
||||
1. **Test with a real instance**:
|
||||
- Get a public domain or use ngrok
|
||||
- Update `ActivityPub:Domain` in appsettings.json
|
||||
- Test with mastodon.social or other public instances
|
||||
|
||||
2. **Add more features**:
|
||||
- Activity queue for async processing
|
||||
- Retry logic for failed deliveries
|
||||
- Metrics and monitoring
|
||||
- Admin interface for federation management
|
||||
|
||||
3. **Test with more instances**:
|
||||
- Pleroma
|
||||
- Pixelfed
|
||||
- Lemmy
|
||||
- PeerTube
|
||||
|
||||
## Getting Help
|
||||
|
||||
If something doesn't work:
|
||||
|
||||
1. Check the logs (see Logs section above)
|
||||
2. Review the troubleshooting section in [ACTIVITYPUB_TESTING_GUIDE.md](ACTIVITYPUB_TESTING_GUIDE.md)
|
||||
3. Verify all prerequisites are installed
|
||||
4. Check network connectivity between instances
|
||||
5. Review the [ACTIVITYPUB_IMPLEMENTATION.md](ACTIVITYPUB_IMPLEMENTATION.md) for architecture details
|
||||
|
||||
## Useful URLs
|
||||
|
||||
### Test Instances
|
||||
- Mastodon: http://mastodon.local:3001
|
||||
- Solar Network: http://solar.local:5000
|
||||
|
||||
### Documentation
|
||||
- ActivityPub W3C Spec: https://www.w3.org/TR/activitypub/
|
||||
- Mastodon Federation Docs: https://docs.joinmastodon.org/admin/federation/
|
||||
- ActivityPub Playground: https://swicth.github.io/activity-pub-playground/
|
||||
|
||||
### Tools
|
||||
- jq: JSON processor (https://stedolan.github.io/jq/)
|
||||
- httpie: HTTP client (https://httpie.io/)
|
||||
- Docker Compose: (https://docs.docker.com/compose/)
|
||||
275
docs/activitypub/ACTIVITYPUB_TESTING_README.md
Normal file
275
docs/activitypub/ACTIVITYPUB_TESTING_README.md
Normal file
@@ -0,0 +1,275 @@
|
||||
# ActivityPub Testing Guide
|
||||
|
||||
Complete guide for testing ActivityPub federation in Solar Network.
|
||||
|
||||
## 📚 Documentation Files
|
||||
|
||||
| File | Description | Size |
|
||||
|------|-------------|-------|
|
||||
| `ACTIVITYPUB_TESTING_INDEX.md` | **START HERE** - Master guide with overview | 12K |
|
||||
| `ACTIVITYPUB_TESTING_QUICKSTART.md` | Quick reference for common tasks | 7K |
|
||||
| `ACTIVITYPUB_TESTING_GUIDE.md` | Comprehensive testing scenarios (10 parts) | 19K |
|
||||
| `ACTIVITYPUB_TESTING_QUICKREF.md` | Command and query reference | 8K |
|
||||
| `ACTIVITYPUB_TESTING_HELPER_API.md` | Helper API for programmatic testing | 12K |
|
||||
| `ACTIVITYPUB_TESTING_RESULTS_TEMPLATE.md` | Template to track test results | 10K |
|
||||
|
||||
## 🚀 Quick Start
|
||||
|
||||
### Option A: One-Command Setup (Recommended)
|
||||
|
||||
```bash
|
||||
# 1. Run setup script
|
||||
./setup-activitypub-test.sh
|
||||
|
||||
# 2. Run validation
|
||||
./test-activitypub.sh
|
||||
|
||||
# 3. Start Solar Network
|
||||
cd DysonNetwork.Sphere
|
||||
dotnet run
|
||||
```
|
||||
|
||||
### Option B: Manual Setup
|
||||
|
||||
1. **Read**: `ACTIVITYPUB_TESTING_QUICKSTART.md`
|
||||
2. **Configure**: Copy `.env.testing.example` to `.env` and adjust
|
||||
3. **Follow**: Step-by-step in `ACTIVITYPUB_TESTING_GUIDE.md`
|
||||
|
||||
## 🎯 What You Can Test
|
||||
|
||||
### With Self-Hosted Instance
|
||||
- ✅ WebFinger discovery
|
||||
- ✅ Actor profile retrieval
|
||||
- ✅ Follow relationships (bidirectional)
|
||||
- ✅ Post federation (Solar → Mastodon)
|
||||
- ✅ Content reception (Mastodon → Solar)
|
||||
- ✅ Like interactions
|
||||
- ✅ Reply threading
|
||||
- ✅ HTTP signature verification
|
||||
- ✅ Content deletion
|
||||
|
||||
### With Real Instance
|
||||
- ✅ Public domain setup (via ngrok or VPS)
|
||||
- ✅ Federation with public instances (mastodon.social, etc.)
|
||||
- ✅ Real-world compatibility testing
|
||||
- ✅ Performance under real load
|
||||
|
||||
## 📋 Testing Workflow
|
||||
|
||||
### Day 1: Basic Functionality
|
||||
- Setup test environment
|
||||
- Test WebFinger and Actor endpoints
|
||||
- Verify HTTP signatures
|
||||
- Test basic follow/unfollow
|
||||
|
||||
### Day 2: Content Federation
|
||||
- Test post creation and delivery
|
||||
- Test content reception
|
||||
- Test media attachments
|
||||
- Test content warnings
|
||||
|
||||
### Day 3: Interactions
|
||||
- Test likes (both directions)
|
||||
- Test replies and threading
|
||||
- Test boosts/announces
|
||||
- Test undo activities
|
||||
|
||||
### Day 4: Real Instance
|
||||
- Set up public domain
|
||||
- Test with mastodon.social
|
||||
- Test with other instances
|
||||
- Verify cross-instance compatibility
|
||||
|
||||
### Day 5: Edge Cases
|
||||
- Test error handling
|
||||
- Test failed deliveries
|
||||
- Test invalid signatures
|
||||
- Test malformed activities
|
||||
|
||||
## 🛠️ Setup Scripts
|
||||
|
||||
| Script | Purpose |
|
||||
|--------|---------|
|
||||
| `setup-activitypub-test.sh` | One-command setup of Mastodon + Solar Network |
|
||||
| `test-activitypub.sh` | Quick validation of core functionality |
|
||||
|
||||
Both scripts are executable (`chmod +x`).
|
||||
|
||||
## 🔧 Configuration
|
||||
|
||||
### Required Tools
|
||||
- ✅ Docker (for Mastodon)
|
||||
- ✅ .NET 10 SDK (for Solar Network)
|
||||
- ✅ PostgreSQL client (psql)
|
||||
- ✅ curl (for API testing)
|
||||
|
||||
### Quick Setup
|
||||
```bash
|
||||
# 1. Install dependencies (Ubuntu/Debian)
|
||||
sudo apt-get install docker.io docker-compose postgresql-client curl jq
|
||||
|
||||
# 2. Run setup
|
||||
./setup-activitypub-test.sh
|
||||
|
||||
# 3. Validate
|
||||
./test-activitypub.sh
|
||||
```
|
||||
|
||||
## 📊 Progress Tracking
|
||||
|
||||
Use the template to track your testing progress:
|
||||
|
||||
```bash
|
||||
# Copy the template
|
||||
cp ACTIVITYPUB_TESTING_RESULTS_TEMPLATE.md my-test-results.md
|
||||
|
||||
# Edit as you test
|
||||
nano my-test-results.md
|
||||
```
|
||||
|
||||
## 🐛 Troubleshooting
|
||||
|
||||
### Quick Fixes
|
||||
|
||||
**Mastodon won't start**:
|
||||
```bash
|
||||
# Check logs
|
||||
docker compose -f docker-compose.mastodon-test.yml logs -f
|
||||
|
||||
# Restart containers
|
||||
docker compose -f docker-compose.mastodon-test.yml restart
|
||||
```
|
||||
|
||||
**Can't reach Solar Network**:
|
||||
```bash
|
||||
# Check if running
|
||||
curl http://solar.local:5000
|
||||
|
||||
# Check /etc/hosts
|
||||
cat /etc/hosts | grep solar.local
|
||||
```
|
||||
|
||||
**Activities not arriving**:
|
||||
```bash
|
||||
# Check database
|
||||
psql -d dyson_network -c "SELECT * FROM fediverse_activities;"
|
||||
|
||||
# Check logs
|
||||
dotnet run --project DysonNetwork.Sphere | grep -i activitypub
|
||||
```
|
||||
|
||||
For detailed troubleshooting, see `ACTIVITYPUB_TESTING_GUIDE.md` Part 5.
|
||||
|
||||
## 📖 Learning Path
|
||||
|
||||
### For Developers
|
||||
1. Read `ACTIVITYPUB_IMPLEMENTATION.md` to understand the architecture
|
||||
2. Read `ACTIVITYPUB_SUMMARY.md` to see what's implemented
|
||||
3. Follow test scenarios in `ACTIVITYPUB_TESTING_GUIDE.md`
|
||||
4. Use helper API in `ACTIVITYPUB_TESTING_HELPER_API.md` for testing
|
||||
|
||||
### For Testers
|
||||
1. Start with `ACTIVITYPUB_TESTING_QUICKSTART.md`
|
||||
2. Use command reference in `ACTIVITYPUB_TESTING_QUICKREF.md`
|
||||
3. Track results with `ACTIVITYPUB_TESTING_RESULTS_TEMPLATE.md`
|
||||
4. Report issues with details from logs
|
||||
|
||||
## 🎓 Success Criteria
|
||||
|
||||
### Minimum Viable
|
||||
- WebFinger works
|
||||
- Actor profile valid
|
||||
- Follow relationships work
|
||||
- Posts federate correctly
|
||||
- HTTP signatures verified
|
||||
|
||||
### Production Ready
|
||||
- Activity queue with retry
|
||||
- Rate limiting
|
||||
- Monitoring/alerting
|
||||
- Admin interface
|
||||
- Instance blocking
|
||||
- Content moderation
|
||||
|
||||
## 🚨 Common Pitfalls
|
||||
|
||||
### Don't Forget
|
||||
- ✅ Update `/etc/hosts` with both instances
|
||||
- ✅ Run migrations before testing
|
||||
- ✅ Check both instances are accessible
|
||||
- ✅ Verify PostgreSQL is running
|
||||
- ✅ Check logs when something fails
|
||||
|
||||
### Watch Out For
|
||||
- ❌ Using `localhost` instead of `solar.local`
|
||||
- ❌ Forgetting to restart after config changes
|
||||
- ❌ Not waiting for Mastodon to start (2-5 minutes)
|
||||
- ❌ Ignoring CORS errors in browser testing
|
||||
- ❌ Testing with deleted/invisible posts
|
||||
|
||||
## 📚 Additional Resources
|
||||
|
||||
### Official Specs
|
||||
- [ActivityPub W3C](https://www.w3.org/TR/activitypub/)
|
||||
- [ActivityStreams](https://www.w3.org/TR/activitystreams-core/)
|
||||
- [HTTP Signatures](https://datatracker.ietf.org/doc/html/draft-cavage-http-signatures)
|
||||
|
||||
### Community Guides
|
||||
- [Mastodon Federation](https://docs.joinmastodon.org/admin/federation/)
|
||||
- [Federation Testing](https://docs.joinmastodon.org/spec/activitypub/)
|
||||
|
||||
### Tools
|
||||
- [ActivityPub Playground](https://swicth.github.io/activity-pub-playground/)
|
||||
- [FediTest](https://feditest.com/)
|
||||
|
||||
## 🆘 Support
|
||||
|
||||
If you encounter issues:
|
||||
|
||||
1. Check logs (both Solar Network and Mastodon)
|
||||
2. Review troubleshooting section in the guide
|
||||
3. Validate against success criteria
|
||||
4. Check database state with queries
|
||||
5. Review implementation docs
|
||||
|
||||
## ✨ Next Steps
|
||||
|
||||
After testing with self-hosted instance:
|
||||
|
||||
1. Get a public domain or use ngrok
|
||||
2. Update `ActivityPub:Domain` in appsettings.json
|
||||
3. Test with public Mastodon instances
|
||||
4. Add more ActivityPub features (queue, retry, etc.)
|
||||
5. Implement admin interface
|
||||
6. Add monitoring and metrics
|
||||
|
||||
## 📞 File Reference
|
||||
|
||||
All files are in the root of the DysonNetwork project:
|
||||
|
||||
```
|
||||
DysonNetwork/
|
||||
├── ACTIVITYPUB_TESTING_INDEX.md # Start here!
|
||||
├── ACTIVITYPUB_TESTING_QUICKSTART.md # Quick reference
|
||||
├── ACTIVITYPUB_TESTING_GUIDE.md # Full guide
|
||||
├── ACTIVITYPUB_TESTING_QUICKREF.md # Commands
|
||||
├── ACTIVITYPUB_TESTING_HELPER_API.md # Test API
|
||||
├── ACTIVITYPUB_TESTING_RESULTS_TEMPLATE.md
|
||||
├── setup-activitypub-test.sh # Setup script
|
||||
├── test-activitypub.sh # Test script
|
||||
└── .env.testing.example # Config template
|
||||
```
|
||||
|
||||
**Documentation files** (for reference):
|
||||
```
|
||||
DysonNetwork/
|
||||
├── ACTIVITYPUB_IMPLEMENTATION.md # How it's implemented
|
||||
├── ACTIVITYPUB_SUMMARY.md # Feature summary
|
||||
└── ACTIVITYPUB_PLAN.md # Original plan
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
**Start here**: `ACTIVITYPUB_TESTING_INDEX.md`
|
||||
|
||||
**Good luck with your testing!** 🚀
|
||||
282
docs/activitypub/ACTIVITYPUB_TEST_RESULTS_TEMPLATE.md
Normal file
282
docs/activitypub/ACTIVITYPUB_TEST_RESULTS_TEMPLATE.md
Normal file
@@ -0,0 +1,282 @@
|
||||
# ActivityPub Testing Results Template
|
||||
|
||||
Use this template to track your testing progress.
|
||||
|
||||
## Test Environment
|
||||
|
||||
**Date**: ________________
|
||||
|
||||
**Test Configuration**:
|
||||
- Solar Network URL: `http://solar.local:5000`
|
||||
- Mastodon URL: `http://mastodon.local:3001`
|
||||
- Database: `dyson_network`
|
||||
|
||||
**Solar Network User**:
|
||||
- Username: `_______________`
|
||||
- Publisher ID: `_______________`
|
||||
|
||||
**Mastodon User**:
|
||||
- Username: `testuser@mastodon.local`
|
||||
- Password: `TestPassword123!`
|
||||
|
||||
---
|
||||
|
||||
## Test Results
|
||||
|
||||
### ✅ Part 1: Infrastructure Setup
|
||||
|
||||
| Test | Status | Notes |
|
||||
|------|--------|-------|
|
||||
| Setup script ran successfully | ☐ ☑ | |
|
||||
| /etc/hosts updated | ☐ ☑ | |
|
||||
| Docker containers started | ☐ ☑ | |
|
||||
| Mastodon web accessible | ☐ ☑ | |
|
||||
| Mastodon admin account created | ☐ ☑ | |
|
||||
| Database migrations applied | ☐ ☑ | |
|
||||
| Solar Network started | ☐ ☑ | |
|
||||
|
||||
### ✅ Part 2: WebFinger & Actor Discovery
|
||||
|
||||
| Test | Status | Expected | Actual |
|
||||
|------|--------|---------|--------|
|
||||
| WebFinger for Solar Network user | ☐ ☑ | Returns subject + links | _______________ |
|
||||
| Actor profile JSON is valid | ☐ ☑ | Has id, type, inbox, outbox | _______________ |
|
||||
| Public key present in actor | ☐ ☑ | publicKey.publicKeyPem exists | _______________ |
|
||||
| Outbox returns public posts | ☐ ☑ | OrderedCollection with items | _______________ |
|
||||
| Outbox totalItems count | ☐ ☑ | Matches public posts | _______________ |
|
||||
|
||||
### ✅ Part 3: Follow Relationships
|
||||
|
||||
| Test | Status | Expected Result | Actual Result |
|
||||
|------|--------|----------------|---------------|
|
||||
| Mastodon follows Solar Network user | ☐ ☑ | Relationship created in DB | _______________ |
|
||||
| Accept sent to Mastodon | ☐ ☑ | Mastodon receives Accept | _______________ |
|
||||
| Solar Network follows Mastodon user | ☐ ☑ | Relationship created | _______________ |
|
||||
| Follow appears in Mastodon UI | ☐ ☑ | Mastodon shows "Following" | _______________ |
|
||||
| Follow appears in Solar Network DB | ☐ ☑ | is_following = true | _______________ |
|
||||
| Follow state is Accepted | ☐ ☑ | state = 1 (Accepted) | _______________ |
|
||||
| Unfollow works correctly | ☐ ☑ | Relationship deleted/updated | _______________ |
|
||||
|
||||
### ✅ Part 4: Content Federation (Create)
|
||||
|
||||
| Test | Status | Expected Result | Actual Result |
|
||||
|------|--------|----------------|---------------|
|
||||
| Post created in Solar Network | ☐ ☑ | Post in sn_posts table | _______________ |
|
||||
| Activity sent to Mastodon | ☐ ☑ | Logged as successful | _______________ |
|
||||
| Post appears in Mastodon timeline | ☐ ☑ | Visible in federated timeline | _______________ |
|
||||
| Post content matches | ☐ ☑ | Same text/HTML | _______________ |
|
||||
| Post author is correct | ☐ ☑ | Shows Solar Network user | _______________ |
|
||||
| Post timestamp is correct | ☐ ☑ | Same published time | _______________ |
|
||||
| Multiple posts federate | ☐ ☑ | All posts appear | _______________ |
|
||||
|
||||
### ✅ Part 5: Content Reception (Incoming Create)
|
||||
|
||||
| Test | Status | Expected Result | Actual Result |
|
||||
|------|--------|----------------|---------------|
|
||||
| Create activity received | ☐ ☑ | Activity logged in DB | _______________ |
|
||||
| Content stored in fediverse_contents | ☐ ☑ | Record with correct type | _______________ |
|
||||
| Content not duplicated | ☐ ☑ | Only one entry per URI | _______________ |
|
||||
| Actor created/retrieved | ☐ ☑ | Actor in fediverse_actors | _______________ |
|
||||
| Instance created/retrieved | ☐ ☑ | Instance in fediverse_instances | _______________ |
|
||||
| Content HTML preserved | ☐ ☑ | contentHtml field populated | _______________ |
|
||||
|
||||
### ✅ Part 6: Reaction Federation (Like)
|
||||
|
||||
| Test | Status | Expected Result | Actual Result |
|
||||
|------|--------|----------------|---------------|
|
||||
| Like from Mastodon to Solar post | ☐ ☑ | Like activity received | _______________ |
|
||||
| Reaction stored in fediverse_reactions | ☐ ☑ | Record with type = 0 (Like) | _______________ |
|
||||
| Like count incremented | ☐ ☑ | like_count increased | _______________ |
|
||||
| Like appears in UI | ☐ ☑ | Visible on Solar Network | _______________ |
|
||||
| Like appears in Mastodon | ☐ ☑ | Visible on Mastodon | _______________ |
|
||||
| Unlike works correctly | ☐ ☑ | Like removed | _______________ |
|
||||
|
||||
### ✅ Part 7: Reply Federation
|
||||
|
||||
| Test | Status | Expected Result | Actual Result |
|
||||
|------|--------|----------------|---------------|
|
||||
| Reply from Mastodon to Solar post | ☐ ☑ | Create activity with inReplyTo | _______________ |
|
||||
| Reply stored with parent reference | ☐ ☑ | in_reply_to field set | _______________ |
|
||||
| Reply appears in Solar Network | ☐ ☑ | Visible as comment | _______________ |
|
||||
| Reply shows parent context | ☐ ☑ | Links to original post | _______________ |
|
||||
|
||||
### ✅ Part 8: Content Deletion
|
||||
|
||||
| Test | Status | Expected Result | Actual Result |
|
||||
|------|--------|----------------|---------------|
|
||||
| Delete from Mastodon | ☐ ☑ | Delete activity received | _______________ |
|
||||
| Content soft-deleted | ☐ ☑ | deleted_at timestamp set | _______________ |
|
||||
| Content no longer visible | ☐ ☑ | Hidden from timelines | _______________ |
|
||||
|
||||
### ✅ Part 9: HTTP Signature Verification
|
||||
|
||||
| Test | Status | Expected Result | Actual Result |
|
||||
|------|--------|----------------|---------------|
|
||||
| Valid signature accepted | ☐ ☑ | Activity processed | _______________ |
|
||||
| Invalid signature rejected | ☐ ☑ | 401 Unauthorized | _______________ |
|
||||
| Missing signature rejected | ☐ ☑ | 401 Unauthorized | _______________ |
|
||||
| Signature format correct | ☐ ☑ | keyId, algorithm, headers, signature | _______________ |
|
||||
| Signing string correct | ☐ ☑ | Matches HTTP-Signatures draft | _______________ |
|
||||
|
||||
### ✅ Part 10: Error Handling
|
||||
|
||||
| Test | Status | Expected Result | Actual Result |
|
||||
|------|--------|----------------|---------------|
|
||||
| Invalid activity type rejected | ☐ ☑ | 400 Bad Request | _______________ |
|
||||
| Malformed JSON rejected | ☐ ☑ | 400 Bad Request | _______________ |
|
||||
| Non-existent actor rejected | ☐ ☑ | 404 Not Found | _______________ |
|
||||
| Errors logged correctly | ☐ ☑ | error_message populated | _______________ |
|
||||
| Activity status = Failed | ☐ ☑ | status = 3 | _______________ |
|
||||
|
||||
---
|
||||
|
||||
## Database State After Tests
|
||||
|
||||
### Actors Table
|
||||
```sql
|
||||
SELECT COUNT(*) as total_actors,
|
||||
SUM(CASE WHEN is_local_actor THEN 1 ELSE 0 END) as local,
|
||||
SUM(CASE WHEN NOT is_local_actor THEN 1 ELSE 0 END) as remote
|
||||
FROM fediverse_relationships;
|
||||
```
|
||||
- Total Actors: _______________
|
||||
- Local Actors: _______________
|
||||
- Remote Actors: _______________
|
||||
|
||||
### Contents Table
|
||||
```sql
|
||||
SELECT COUNT(*) as total_contents,
|
||||
AVG(LENGTH(content)) as avg_content_length
|
||||
FROM fediverse_contents WHERE deleted_at IS NULL;
|
||||
```
|
||||
- Total Contents: _______________
|
||||
- Avg Content Length: _______________
|
||||
|
||||
### Activities Table
|
||||
```sql
|
||||
SELECT type, status, COUNT(*)
|
||||
FROM fediverse_activities
|
||||
GROUP BY type, status
|
||||
ORDER BY type, status;
|
||||
```
|
||||
- Activities by Type/Status:
|
||||
- Create: Pending ___, Completed ____, Failed ___
|
||||
- Follow: Pending ___, Completed ____, Failed ___
|
||||
- Like: Pending ___, Completed ____, Failed ___
|
||||
- Accept: Pending ___, Completed ____, Failed ___
|
||||
|
||||
### Relationships Table
|
||||
```sql
|
||||
SELECT state, COUNT(*) as count
|
||||
FROM fediverse_relationships
|
||||
GROUP BY state;
|
||||
```
|
||||
- Pending: _______________
|
||||
- Accepted: _______________
|
||||
- Rejected: _______________
|
||||
|
||||
---
|
||||
|
||||
## Logs Analysis
|
||||
|
||||
### Solar Network Errors Found:
|
||||
1. _______________
|
||||
2. _______________
|
||||
3. _______________
|
||||
|
||||
### Mastodon Errors Found:
|
||||
1. _______________
|
||||
2. _______________
|
||||
3. _______________
|
||||
|
||||
### Warnings Found:
|
||||
1. _______________
|
||||
2. _______________
|
||||
3. _______________
|
||||
|
||||
---
|
||||
|
||||
## Issues & Bugs Found
|
||||
|
||||
| # | Severity | Description | Status |
|
||||
|---|----------|-------------|--------|
|
||||
| 1 | ☐ Low/Medium/High/Critical | _____________________ | ☐ Open/☐ Fixed |
|
||||
| 2 | ☐ Low/Medium/High/Critical | _____________________ | ☐ Open/☐ Fixed |
|
||||
| 3 | ☐ Low/Medium/High/Critical | _____________________ | ☐ Open/☐ Fixed |
|
||||
| 4 | ☐ Low/Medium/High/Critical | _____________________ | ☐ Open/☐ Fixed |
|
||||
|
||||
---
|
||||
|
||||
## Performance Notes
|
||||
|
||||
| Metric | Value | Notes |
|
||||
|--------|-------|-------|
|
||||
| Average activity processing time | __________ ms | |
|
||||
| Average HTTP signature verification time | __________ ms | |
|
||||
| Outgoing delivery success rate | __________% | |
|
||||
| Average WebFinger response time | __________ ms | |
|
||||
| Database query performance | __________ | |
|
||||
|
||||
---
|
||||
|
||||
## Compatibility Notes
|
||||
|
||||
| Instance | Version | Works | Notes |
|
||||
|----------|---------|--------|-------|
|
||||
| Mastodon (self-hosted) | latest | ☐ ☑ | |
|
||||
| Mastodon.social | ~4.0 | ☐ ☑ | |
|
||||
| Pleroma | ~2.5 | ☐ ☑ | |
|
||||
| GoToSocial | ~0.15 | ☐ ☑ | |
|
||||
|
||||
---
|
||||
|
||||
## Recommendations
|
||||
|
||||
### What Worked Well:
|
||||
1. _____________________
|
||||
2. _____________________
|
||||
3. _____________________
|
||||
|
||||
### What Needs Improvement:
|
||||
1. _____________________
|
||||
2. _____________________
|
||||
3. _____________________
|
||||
|
||||
### Features to Add:
|
||||
1. _____________________
|
||||
2. _____________________
|
||||
3. _____________________
|
||||
|
||||
---
|
||||
|
||||
## Next Testing Phase
|
||||
|
||||
- [ ] Test with public Mastodon instance
|
||||
- [ ] Test with Pleroma instance
|
||||
- [ ] Test media attachment federation
|
||||
- [ ] Test with high-volume posts
|
||||
- [ ] Test concurrent activity processing
|
||||
- [ ] Test with different visibility levels
|
||||
- [ ] Test with long posts (>500 chars)
|
||||
- [ ] Test with special characters/emojis
|
||||
|
||||
---
|
||||
|
||||
## Sign-off
|
||||
|
||||
**Tested By**: _____________________
|
||||
|
||||
**Test Date**: _____________________
|
||||
|
||||
**Overall Result**: ☐ Pass / ☐ Fail
|
||||
|
||||
**Ready for Production**: ☐ Yes / ☐ No
|
||||
|
||||
**Notes**: ___________________________________________________________________________
|
||||
|
||||
__________________________________________________________________________
|
||||
|
||||
__________________________________________________________________________
|
||||
|
||||
__________________________________________________________________________
|
||||
|
||||
425
docs/activitypub/FOLLOWING_USERS_GUIDE.md
Normal file
425
docs/activitypub/FOLLOWING_USERS_GUIDE.md
Normal file
@@ -0,0 +1,425 @@
|
||||
# Follow Feature - User Guide
|
||||
|
||||
## Quick Start: How to Follow Fediverse Users
|
||||
|
||||
### Method 1: Via Search (Recommended)
|
||||
|
||||
1. Go to the search bar in Solar Network
|
||||
2. Type the user's full address: `@username@domain.com`
|
||||
- Example: `@alice@mastodon.social`
|
||||
- Example: `@bob@pleroma.site`
|
||||
3. Click on their profile in search results
|
||||
4. Click the "Follow" button
|
||||
5. Wait for acceptance (usually immediate)
|
||||
6. ✅ Done! Their posts will now appear in your timeline
|
||||
|
||||
### Method 2: Via Profile URL
|
||||
|
||||
1. If you know their profile URL, visit it directly:
|
||||
- Example: `https://mastodon.social/@alice`
|
||||
2. Look for the "Follow" button on their profile
|
||||
3. Click it to follow
|
||||
4. ✅ You're now following them!
|
||||
|
||||
## What Happens When You Follow Someone
|
||||
|
||||
### The Technical Flow
|
||||
```
|
||||
You click "Follow"
|
||||
↓
|
||||
Solar Network creates Follow Activity
|
||||
↓
|
||||
Follow Activity is signed with your private key
|
||||
↓
|
||||
Solar Network sends Follow to their instance's inbox
|
||||
↓
|
||||
Their instance verifies your signature
|
||||
↓
|
||||
Their instance processes the Follow
|
||||
↓
|
||||
Their instance sends Accept Activity back
|
||||
↓
|
||||
Solar Network receives and processes Accept
|
||||
↓
|
||||
Relationship is stored in database
|
||||
↓
|
||||
Their public posts federate to Solar Network
|
||||
```
|
||||
|
||||
### What You'll See
|
||||
|
||||
- ✅ **"Following..."** (while waiting for acceptance)
|
||||
- ✅ **"Following" ✓** (when accepted)
|
||||
- ✅ **Their posts** in your home timeline
|
||||
- ✅ **Their likes, replies, boosts** on your posts
|
||||
|
||||
## Different Types of Accounts
|
||||
|
||||
### Regular Users
|
||||
- Full ActivityPub support
|
||||
- Follows work both ways
|
||||
- Content federates normally
|
||||
- Example: `@alice@mastodon.social`
|
||||
|
||||
### Locked Accounts
|
||||
- User must manually approve followers
|
||||
- You'll see "Pending" after clicking follow
|
||||
- User receives notification to approve/deny
|
||||
- Example: `@private@pleroma.site`
|
||||
|
||||
### Bot/Service Accounts
|
||||
- Automated content accounts
|
||||
- Often auto-accept follows
|
||||
- Example: `@newsbot@botsin.space`
|
||||
|
||||
### Organizational Accounts
|
||||
- Group or team accounts
|
||||
- Example: `@team@company.social`
|
||||
|
||||
## Managing Your Follows
|
||||
|
||||
### View Who You're Following
|
||||
|
||||
**Go to**: Following page or `GET /api/activitypub/following`
|
||||
|
||||
You'll see:
|
||||
- Username
|
||||
- Display name
|
||||
- Profile picture
|
||||
- When you followed them
|
||||
- Their instance (e.g., "Mastodon")
|
||||
|
||||
### Unfollowing Someone
|
||||
|
||||
**Method 1: Via UI**
|
||||
1. Go to their profile
|
||||
2. Click "Following" button (shows as active)
|
||||
3. Click to unfollow
|
||||
|
||||
**Method 2: Via API**
|
||||
```bash
|
||||
curl -X POST http://solar.local:5000/api/activitypub/unfollow \
|
||||
-H "Authorization: Bearer YOUR_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"targetActorUri": "https://mastodon.social/users/alice"
|
||||
}'
|
||||
```
|
||||
|
||||
**Response**:
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"message": "Unfollowed successfully"
|
||||
}
|
||||
```
|
||||
|
||||
### View Your Followers
|
||||
|
||||
**Go to**: Followers page or `GET /api/activitypub/followers`
|
||||
|
||||
You'll see:
|
||||
- Users following you
|
||||
- Their instance
|
||||
- When they started following
|
||||
- Whether they're local or from another instance
|
||||
|
||||
## Searching Fediverse Users
|
||||
|
||||
### How Search Works
|
||||
|
||||
1. **Type in search bar**: `@username@domain.com`
|
||||
2. **Solar Network queries their instance**:
|
||||
- Fetches their actor profile
|
||||
- Checks if they're discoverable
|
||||
3. **Shows results**:
|
||||
- Profile picture
|
||||
- Display name
|
||||
- Bio
|
||||
- Instance name
|
||||
|
||||
### Supported Search Formats
|
||||
|
||||
| Format | Example | Works? |
|
||||
|--------|---------|--------|
|
||||
| Full handle | `@alice@mastodon.social` | ✅ Yes |
|
||||
| Username only | `alice` | ⚠️ May search local users first |
|
||||
| Full URL | `https://mastodon.social/@alice` | ✅ Yes |
|
||||
|
||||
## Privacy Considerations
|
||||
|
||||
### Public Posts
|
||||
- **What**: Posts visible to everyone
|
||||
- **Federation**: ✅ Federates to all followers
|
||||
- **Timeline**: Visible in public federated timelines
|
||||
- **Example**: General updates, thoughts, content you want to share
|
||||
|
||||
### Private Posts
|
||||
- **What**: Posts only visible to followers
|
||||
- **Federation**: ✅ Federates to followers (including remote)
|
||||
- **Timeline**: Only visible to your followers
|
||||
- **Example**: Personal updates, questions
|
||||
|
||||
### Unlisted Posts
|
||||
- **What**: Posts not in public timelines
|
||||
- **Federation**: ✅ Federates but marked unlisted
|
||||
- **Timeline**: Only followers see it
|
||||
- **Example**: Limited audience content
|
||||
|
||||
### Followers-Only Posts
|
||||
- **What**: Posts only to followers, no federated boost
|
||||
- **Federation**: ⚠️ May not federate fully
|
||||
- **Timeline**: Only your followers
|
||||
- **Example**: Very sensitive content
|
||||
|
||||
## Following Etiquette
|
||||
|
||||
### Best Practices
|
||||
|
||||
1. **Check before following**:
|
||||
- Read their bio and recent posts
|
||||
- Make sure they're who you think they are
|
||||
- Check if their content aligns with your interests
|
||||
|
||||
2. **Start with interactions**:
|
||||
- Like a few posts first
|
||||
- Reply thoughtfully
|
||||
- Share interesting content
|
||||
- Then follow if you want to see more
|
||||
|
||||
3. **Respect instance culture**:
|
||||
- Each instance has its own norms
|
||||
- Read their community guidelines
|
||||
- Be mindful of local rules
|
||||
|
||||
4. **Don't spam**:
|
||||
- Don't mass-follow users
|
||||
- Don't send unwanted DMs
|
||||
- Don't repeatedly like old posts
|
||||
|
||||
5. **Use appropriate post visibility**:
|
||||
- Public for general content
|
||||
- Unlisted for updates to followers
|
||||
- Private for sensitive topics
|
||||
|
||||
### Red Flags to Watch
|
||||
|
||||
1. **Suspicious accounts**:
|
||||
- Newly created with generic content
|
||||
- Only posting promotional links
|
||||
- Unusual following patterns
|
||||
|
||||
2. **Instances with poor moderation**:
|
||||
- Lots of spam in public timelines
|
||||
- Harassment goes unaddressed
|
||||
- You may want to block the instance
|
||||
|
||||
3. **Content warnings not respected**:
|
||||
- Users posting unmarked sensitive content
|
||||
- You can report/block these users
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### "Follow button doesn't work"
|
||||
|
||||
**Possible causes**:
|
||||
1. User doesn't exist
|
||||
2. Instance is down
|
||||
3. Network connectivity issue
|
||||
|
||||
**What to do**:
|
||||
1. Verify the username/domain is correct
|
||||
2. Try searching for them again
|
||||
3. Check your internet connection
|
||||
4. Try again in a few minutes
|
||||
|
||||
### "User doesn't appear in Following list"
|
||||
|
||||
**Possible causes**:
|
||||
1. Follow was rejected (locked account)
|
||||
2. Follow is still pending
|
||||
3. Error in federation
|
||||
|
||||
**What to do**:
|
||||
1. Check if their account is locked
|
||||
2. Wait a few minutes for acceptance
|
||||
3. Check your ActivityPub logs
|
||||
4. Try following again
|
||||
|
||||
### "Can't find a user via search"
|
||||
|
||||
**Possible causes**:
|
||||
1. Username/domain is wrong
|
||||
2. User's instance is blocking your instance
|
||||
3. User's profile is not discoverable
|
||||
|
||||
**What to do**:
|
||||
1. Double-check the spelling
|
||||
2. Try their full URL: `https://instance.com/@username`
|
||||
3. Check if they're from a blocked instance
|
||||
4. Contact them directly for their handle
|
||||
|
||||
## API Reference
|
||||
|
||||
### Follow a Remote User
|
||||
|
||||
**Endpoint**: `POST /api/activitypub/follow`
|
||||
|
||||
**Request**:
|
||||
```json
|
||||
{
|
||||
"targetActorUri": "https://mastodon.social/users/alice"
|
||||
}
|
||||
```
|
||||
|
||||
**Success Response**:
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"message": "Follow request sent. Waiting for acceptance.",
|
||||
"targetActorUri": "https://mastodon.social/users/alice"
|
||||
}
|
||||
```
|
||||
|
||||
### Get Your Following
|
||||
|
||||
**Endpoint**: `GET /api/activitypub/following?limit=50`
|
||||
|
||||
**Response**:
|
||||
```json
|
||||
{
|
||||
"users": [
|
||||
{
|
||||
"actorUri": "https://mastodon.social/users/alice",
|
||||
"username": "alice",
|
||||
"displayName": "Alice Smith",
|
||||
"bio": "I love tech!",
|
||||
"avatarUrl": "https://...",
|
||||
"followedAt": "2024-01-15T10:30:00Z",
|
||||
"isLocal": false,
|
||||
"instanceDomain": "mastodon.social"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### Get Your Followers
|
||||
|
||||
**Endpoint**: `GET /api/activitypub/followers?limit=50`
|
||||
|
||||
**Response**:
|
||||
```json
|
||||
{
|
||||
"users": [
|
||||
{
|
||||
"actorUri": "https://pleroma.site/users/bob",
|
||||
"username": "bob",
|
||||
"displayName": "Bob Jones",
|
||||
"bio": "Federated user following me",
|
||||
"avatarUrl": "https://...",
|
||||
"followedAt": "2024-01-10T14:20:00Z",
|
||||
"isLocal": false,
|
||||
"instanceDomain": "pleroma.site"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### Search Users
|
||||
|
||||
**Endpoint**: `GET /api/activitypub/search?query=@alice@domain.com&limit=20`
|
||||
|
||||
**Response**:
|
||||
```json
|
||||
{
|
||||
"users": [
|
||||
{
|
||||
"actorUri": "https://mastodon.social/users/alice",
|
||||
"username": "alice",
|
||||
"displayName": "Alice Smith",
|
||||
"bio": "Tech enthusiast",
|
||||
"avatarUrl": "https://...",
|
||||
"isLocal": false,
|
||||
"instanceDomain": "mastodon.social"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Real Examples
|
||||
|
||||
### Example 1: Following a Mastodon User
|
||||
|
||||
**What you do**:
|
||||
1. Search for `@alice@mastodon.social`
|
||||
2. Click on Alice's profile
|
||||
3. Click "Follow" button
|
||||
4. Wait 1-2 seconds
|
||||
5. ✅ Alice appears in your "Following" list
|
||||
6. ✅ Alice's public posts appear in your timeline
|
||||
|
||||
**What happens technically**:
|
||||
- Solar Network sends Follow to Alice's Mastodon instance
|
||||
- Alice's Mastodon auto-accepts (unless locked)
|
||||
- Mastodon sends Accept back to Solar Network
|
||||
- Relationship stored in both databases
|
||||
- Alice's future posts federate to Solar Network
|
||||
|
||||
### Example 2: Following a Locked Account
|
||||
|
||||
**What you do**:
|
||||
1. Search for `@private@pleroma.site`
|
||||
2. Click "Follow" button
|
||||
3. ✅ See "Following..." (pending)
|
||||
4. Wait for user to approve
|
||||
|
||||
**What happens technically**:
|
||||
- Solar Network sends Follow to private@pleroma.site
|
||||
- Private user receives notification
|
||||
- Private user manually approves the request
|
||||
- Private user's instance sends Accept
|
||||
- ✅ Now following!
|
||||
|
||||
### Example 3: Following a Bot Account
|
||||
|
||||
**What you do**:
|
||||
1. Search for `@news@botsin.space`
|
||||
2. Click "Follow" button
|
||||
3. ✅ Immediately following (bots auto-accept)
|
||||
|
||||
**What happens technically**:
|
||||
- Follow is auto-accepted
|
||||
- News posts appear in your timeline
|
||||
- Regular updates from the bot
|
||||
|
||||
## Key Differences from Traditional Social Media
|
||||
|
||||
| Aspect | Traditional Social | ActivityPub |
|
||||
|---------|------------------|-------------|
|
||||
| Central server | ❌ No | ✅ Yes (per instance) |
|
||||
| Multiple platforms | ❌ No | ✅ Yes (Mastodon, Pleroma, etc.) |
|
||||
| Data ownership | ❌ On their servers | ✅ On your server |
|
||||
| Blocking | ❌ One platform | ✅ Per instance |
|
||||
| Migration | ❌ Difficult | ✅ Use your own domain |
|
||||
| Federation | ❌ No | ✅ Built-in |
|
||||
|
||||
## Getting Help
|
||||
|
||||
If you have issues following users:
|
||||
|
||||
1. **Check the main guide**: See `HOW_TO_FOLLOW_FEDIVERSE_USERS.md`
|
||||
2. **Check your logs**: Look for ActivityPub errors
|
||||
3. **Test the API**: Use curl to test follow endpoints directly
|
||||
4. **Verify the user**: Make sure the user exists on their instance
|
||||
|
||||
## Summary
|
||||
|
||||
Following fediverse users in Solar Network:
|
||||
|
||||
1. **Simple**: Just search and click "Follow"
|
||||
2. **Works both ways**: You can follow them, they can follow you
|
||||
3. **Works across instances**: Mastodon, Pleroma, Lemmy, etc.
|
||||
4. **Federated content**: Their posts appear in your timeline
|
||||
5. **Full interactions**: Like, reply, boost their posts
|
||||
|
||||
It works just like following on any other social platform, but with the added benefit of being able to follow users on completely different services! 🌍
|
||||
406
docs/activitypub/FOLLOW_FEDIVERSE_USER.md
Normal file
406
docs/activitypub/FOLLOW_FEDIVERSE_USER.md
Normal file
@@ -0,0 +1,406 @@
|
||||
# How to Follow (Subscribe to) Fediverse Users in Solar Network
|
||||
|
||||
## Overview
|
||||
|
||||
In ActivityPub terminology, "subscribing" to a user is called **"following"**. This guide explains how users in Solar Network can follow users from other federated services (Mastodon, Pleroma, etc.).
|
||||
|
||||
## User Guide: How to Follow Fediverse Users
|
||||
|
||||
### Method 1: Via Search (Recommended)
|
||||
|
||||
1. **Search for the user**:
|
||||
- Type their full address in the search bar: `@username@domain.com`
|
||||
- Example: `@alice@mastodon.social`
|
||||
- Example: `@bob@pleroma.site`
|
||||
|
||||
2. **View their profile**:
|
||||
- Click on the search result
|
||||
- You'll see their profile, bio, and recent posts
|
||||
|
||||
3. **Click "Follow" button**:
|
||||
- Solar Network sends a Follow activity to their instance
|
||||
- The remote instance will send back an Accept
|
||||
- The user now appears in your "Following" list
|
||||
|
||||
### Method 2: Via Profile URL
|
||||
|
||||
1. **Visit their profile directly**:
|
||||
- If you know their profile URL, visit it directly
|
||||
- Example: `https://mastodon.social/@alice`
|
||||
|
||||
2. **Look for "Follow" button**:
|
||||
- Click it to follow
|
||||
|
||||
3. **Confirm the follow**:
|
||||
- Solar Network will send the follow request
|
||||
- Wait for acceptance (usually immediate)
|
||||
|
||||
## What Happens Behind the Scenes
|
||||
|
||||
### The Follow Flow
|
||||
|
||||
```
|
||||
User clicks "Follow"
|
||||
↓
|
||||
Solar Network creates Follow Activity
|
||||
↓
|
||||
Solar Network signs with publisher's private key
|
||||
↓
|
||||
Solar Network sends to remote user's inbox
|
||||
↓
|
||||
Remote instance verifies signature
|
||||
↓
|
||||
Remote instance processes the Follow
|
||||
↓
|
||||
Remote instance sends Accept Activity back
|
||||
↓
|
||||
Solar Network receives and processes Accept
|
||||
↓
|
||||
Relationship is established!
|
||||
```
|
||||
|
||||
### Timeline Integration
|
||||
|
||||
Once you're following a user:
|
||||
- ✅ Their public posts appear in your "Home" timeline
|
||||
- ✅ Their posts are federated to your followers
|
||||
- ✅ Their likes, replies, and boosts are visible
|
||||
- ✅ You can interact with their content
|
||||
|
||||
## Following Different Types of Accounts
|
||||
|
||||
### Individual Users
|
||||
- **What**: Regular users like you
|
||||
- **Example**: `@alice@mastodon.social`
|
||||
- **Works**: ✅ Full support
|
||||
|
||||
### Organizational/Bot Accounts
|
||||
- **What**: Groups, bots, or organizations
|
||||
- **Example**: `@official@newsbot.site`
|
||||
- **Works**: ✅ Full support
|
||||
|
||||
### Locked Accounts
|
||||
- **What**: Users who manually approve followers
|
||||
- **Example**: `@private@pleroma.site`
|
||||
- **Works**: ✅ Follow request sent, waits for approval
|
||||
|
||||
## Managing Your Follows
|
||||
|
||||
### View Who You're Following
|
||||
|
||||
**API Endpoint**: `GET /api/activitypub/following`
|
||||
|
||||
**Response Example**:
|
||||
```json
|
||||
{
|
||||
"users": [
|
||||
{
|
||||
"actorUri": "https://mastodon.social/users/alice",
|
||||
"username": "alice",
|
||||
"displayName": "Alice Smith",
|
||||
"bio": "I love tech and coffee! ☕",
|
||||
"avatarUrl": "https://cdn.mastodon.social/avatars/...",
|
||||
"followedAt": "2024-01-15T10:30:00Z",
|
||||
"isLocal": false,
|
||||
"instanceDomain": "mastodon.social"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### Unfollowing Someone
|
||||
|
||||
**API Endpoint**: `POST /api/activitypub/unfollow`
|
||||
|
||||
**Request Body**:
|
||||
```json
|
||||
{
|
||||
"targetActorUri": "https://mastodon.social/users/alice"
|
||||
}
|
||||
```
|
||||
|
||||
**Response**:
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"message": "Unfollowed successfully"
|
||||
}
|
||||
```
|
||||
|
||||
## Searching Fediverse Users
|
||||
|
||||
**API Endpoint**: `GET /api/activitypub/search?query=@username@domain.com`
|
||||
|
||||
**Response Example**:
|
||||
```json
|
||||
{
|
||||
"users": [
|
||||
{
|
||||
"actorUri": "https://mastodon.social/users/alice",
|
||||
"username": "alice",
|
||||
"displayName": "Alice Smith",
|
||||
"bio": "Software developer | Mastodon user",
|
||||
"avatarUrl": "https://cdn.mastodon.social/avatars/...",
|
||||
"isLocal": false,
|
||||
"instanceDomain": "mastodon.social"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Follow States
|
||||
|
||||
| State | Meaning | What User Sees |
|
||||
|--------|---------|----------------|
|
||||
| Pending | Follow request sent, waiting for response | "Following..." (loading) |
|
||||
| Accepted | Remote user accepted | "Following" ✓ |
|
||||
| Rejected | Remote user declined | "Follow" button available again |
|
||||
| Failed | Error occurred | "Error following" message |
|
||||
|
||||
## Privacy & Visibility
|
||||
|
||||
### Public Posts
|
||||
- ✅ Federate to your followers automatically
|
||||
- ✅ Appear in remote instances' timelines
|
||||
- ✅ Can be boosted/liked by remote users
|
||||
|
||||
### Private Posts
|
||||
- ❌ Do not federate
|
||||
- ❌ Only visible to your local followers
|
||||
- ❌ Not sent to remote instances
|
||||
|
||||
### Unlisted Posts
|
||||
- ⚠️ Federate but not in public timelines
|
||||
- ⚠️ Only visible to followers
|
||||
|
||||
## Best Practices for Users
|
||||
|
||||
### When Following Someone
|
||||
|
||||
1. **Check their profile first**:
|
||||
- Make sure they're who you think they are
|
||||
- Read their bio to understand their content
|
||||
|
||||
2. **Start with a few interactions**:
|
||||
- Like a few posts
|
||||
- Reply to something interesting
|
||||
- Don't overwhelm their timeline
|
||||
|
||||
3. **Respect their instance's rules**:
|
||||
- Each instance has its own guidelines
|
||||
- Read community rules before interacting
|
||||
|
||||
4. **Report spam/harassment**:
|
||||
- Use instance blocking features
|
||||
- Report to instance admins
|
||||
|
||||
### Following Across Instances
|
||||
|
||||
1. **Use their full address**:
|
||||
- `@username@instance.com`
|
||||
- This helps identify which instance they're on
|
||||
|
||||
2. **Be aware of instance culture**:
|
||||
- Each instance has its own norms
|
||||
- Some are more technical, others more casual
|
||||
|
||||
3. **Check if they're from your instance**:
|
||||
- Local users show `isLocal: true`
|
||||
- Usually faster interaction
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### "Follow button doesn't work"
|
||||
|
||||
**Possible Causes**:
|
||||
1. User doesn't exist
|
||||
2. Instance is down
|
||||
3. Network issue
|
||||
|
||||
**Solutions**:
|
||||
1. Verify the user's address is correct
|
||||
2. Check if the instance is accessible
|
||||
3. Check your internet connection
|
||||
4. Try again in a few minutes
|
||||
|
||||
### "User doesn't appear in Following list"
|
||||
|
||||
**Possible Causes**:
|
||||
1. Follow was rejected
|
||||
2. Still waiting for acceptance (locked accounts)
|
||||
3. Error in federation
|
||||
|
||||
**Solutions**:
|
||||
1. Check the follow status via API
|
||||
2. Try following again
|
||||
3. Check if their account is locked
|
||||
4. Contact support if issue persists
|
||||
|
||||
### "Can't find a user"
|
||||
|
||||
**Possible Causes**:
|
||||
1. Wrong username or domain
|
||||
2. User doesn't exist
|
||||
3. Instance blocking your instance
|
||||
|
||||
**Solutions**:
|
||||
1. Double-check the address
|
||||
2. Try searching from a different instance
|
||||
3. Contact the user directly for their handle
|
||||
|
||||
## API Reference
|
||||
|
||||
### Follow a Remote User
|
||||
|
||||
**Endpoint**: `POST /api/activitypub/follow`
|
||||
|
||||
**Request**:
|
||||
```json
|
||||
{
|
||||
"targetActorUri": "https://mastodon.social/users/alice"
|
||||
}
|
||||
```
|
||||
|
||||
**Response**: `200 OK`
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"message": "Follow request sent. Waiting for acceptance.",
|
||||
"targetActorUri": "https://mastodon.social/users/alice"
|
||||
}
|
||||
```
|
||||
|
||||
### Get Following List
|
||||
|
||||
**Endpoint**: `GET /api/activitypub/following?limit=50`
|
||||
|
||||
**Response**: `200 OK`
|
||||
```json
|
||||
{
|
||||
"users": [
|
||||
{
|
||||
"actorUri": "https://mastodon.social/users/alice",
|
||||
"username": "alice",
|
||||
"displayName": "Alice Smith",
|
||||
"bio": "...",
|
||||
"avatarUrl": "...",
|
||||
"followedAt": "2024-01-15T10:30:00Z",
|
||||
"isLocal": false,
|
||||
"instanceDomain": "mastodon.social"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### Get Followers List
|
||||
|
||||
**Endpoint**: `GET /api/activitypub/followers?limit=50`
|
||||
|
||||
**Response**: `200 OK`
|
||||
```json
|
||||
{
|
||||
"users": [
|
||||
{
|
||||
"actorUri": "https://mastodon.social/users/alice",
|
||||
"username": "alice",
|
||||
"displayName": "Alice Smith",
|
||||
"bio": "...",
|
||||
"avatarUrl": "...",
|
||||
"isLocal": false,
|
||||
"instanceDomain": "mastodon.social"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### Search Users
|
||||
|
||||
**Endpoint**: `GET /api/activitypub/search?query=alice&limit=20`
|
||||
|
||||
**Response**: `200 OK`
|
||||
```json
|
||||
{
|
||||
"users": [
|
||||
{
|
||||
"actorUri": "https://mastodon.social/users/alice",
|
||||
"username": "alice",
|
||||
"displayName": "Alice Smith",
|
||||
"bio": "...",
|
||||
"avatarUrl": "...",
|
||||
"isLocal": false,
|
||||
"instanceDomain": "mastodon.social"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## What's Different About ActivityPub Following?
|
||||
|
||||
Unlike traditional social media:
|
||||
|
||||
| Feature | Traditional Social | ActivityPub |
|
||||
|---------|------------------|-------------|
|
||||
| Central server | ✅ Yes | ❌ No - federated |
|
||||
| All users on same platform | ✅ Yes | ❌ No - multiple platforms |
|
||||
| Blocked instances | ❌ No | ✅ Yes - instance blocking |
|
||||
| Following across platforms | ❌ No | ✅ Yes - works with Mastodon, Pleroma, etc. |
|
||||
| Your data stays on your server | ❌ Maybe | ✅ Yes - you control your data |
|
||||
|
||||
## User Experience Considerations
|
||||
|
||||
### Making It Easy
|
||||
|
||||
1. **Auto-discovery**:
|
||||
- When users search for `@username`, suggest `@username@domain.com`
|
||||
- Offer to search the fediverse
|
||||
|
||||
2. **Clear UI feedback**:
|
||||
- Show "Follow request sent..."
|
||||
- Show "They accepted!" notification
|
||||
- Show "Follow request rejected" message
|
||||
|
||||
3. **Helpful tooltips**:
|
||||
- Explain what ActivityPub is
|
||||
- Show which instance a user is from
|
||||
- Explain locked accounts
|
||||
|
||||
4. **Profile badges**:
|
||||
- Show instance icon/logo
|
||||
- Show if user is from same instance
|
||||
- Show if user is verified
|
||||
|
||||
## Examples
|
||||
|
||||
### Following a Mastodon User
|
||||
|
||||
**User searches**: `@alice@mastodon.social`
|
||||
|
||||
**What happens**:
|
||||
1. Solar Network fetches Alice's actor profile
|
||||
2. Solar Network stores Alice in `fediverse_actors`
|
||||
3. Solar Network sends Follow to Alice's inbox
|
||||
4. Alice's instance accepts
|
||||
5. Solar Network stores relationship in `fediverse_relationships`
|
||||
6. Alice's posts now appear in user's timeline
|
||||
|
||||
### Following a Local User
|
||||
|
||||
**User searches**: `@bob`
|
||||
|
||||
**What happens**:
|
||||
1. Solar Network finds Bob's publisher
|
||||
2. Relationship created locally (no federation needed)
|
||||
3. Bob's posts appear in user's timeline immediately
|
||||
4. Same as traditional social media following
|
||||
|
||||
## Summary
|
||||
|
||||
Following fediverse users in Solar Network:
|
||||
|
||||
1. **Search by `@username@domain.com`** - Works for any ActivityPub instance
|
||||
2. **Click "Follow"** - Sends federated follow request
|
||||
3. **Wait for acceptance** - Remote user can approve or auto-accept
|
||||
4. **See their posts in your timeline** - Content federates to you
|
||||
5. **Interact normally** - Like, reply, boost, etc.
|
||||
|
||||
All of this is handled automatically by the ActivityPub implementation!
|
||||
298
docs/activitypub/UI_IMPLEMENTATION.md
Normal file
298
docs/activitypub/UI_IMPLEMENTATION.md
Normal file
@@ -0,0 +1,298 @@
|
||||
# ActivityPub UI Implementation
|
||||
|
||||
## Overview
|
||||
|
||||
Complete UI implementation for ActivityPub features in Solian client, including search, following, and followers screens.
|
||||
|
||||
## Created Files
|
||||
|
||||
### 1. Widgets (`lib/widgets/activitypub/`)
|
||||
|
||||
#### `activitypub.dart`
|
||||
- **Purpose**: Export file for ActivityPub widgets
|
||||
- **Exports**: `ActivityPubUserListItem`
|
||||
|
||||
#### `user_list_item.dart`
|
||||
- **Purpose**: Reusable list item widget for displaying ActivityPub users
|
||||
- **Features**:
|
||||
- Avatar with remote instance indicator (public icon)
|
||||
- Display name with instance badge (e.g., "mastodon.social")
|
||||
- Bio with truncation (max 2 lines)
|
||||
- Followed at timestamp (relative time)
|
||||
- Follow/Unfollow buttons with loading states
|
||||
- Tap callback for navigation to profile
|
||||
|
||||
### 2. Screens (`lib/screens/activitypub/`)
|
||||
|
||||
#### `activitypub.dart`
|
||||
- **Purpose**: Export file for ActivityPub screens
|
||||
- **Exports**: `ActivityPubSearchScreen`, `ActivityPubListScreen`
|
||||
|
||||
#### `search.dart`
|
||||
- **Purpose**: Search and follow ActivityPub users from other instances
|
||||
- **Features**:
|
||||
- Search bar with 500ms debounce
|
||||
- Real-time search results
|
||||
- Instant follow/unfollow actions
|
||||
- Local tracking of followed users
|
||||
- Empty states for no search and no results
|
||||
- Refresh support via pull-to-refresh
|
||||
- User feedback via snack bars
|
||||
- **User Flow**:
|
||||
1. User enters search query (e.g., `@alice@mastodon.social`)
|
||||
2. Results appear after debounce
|
||||
3. User taps "Follow" → Follow request sent
|
||||
4. Success message shown
|
||||
5. Button updates to "Unfollow"
|
||||
|
||||
#### `list.dart`
|
||||
- **Purpose**: Display following/followers lists
|
||||
- **Features**:
|
||||
- Reusable for both Following and Followers
|
||||
- Local state management
|
||||
- Per-user loading states during actions
|
||||
- Empty states with helpful hints
|
||||
- Refresh support
|
||||
- Auto-update lists when actions occur
|
||||
- **Types**:
|
||||
- `ActivityPubListType.following`: Shows users you follow
|
||||
- `ActivityPubListType.followers`: Shows users who follow you
|
||||
- **User Flow**:
|
||||
1. User opens Following/Followers screen
|
||||
2. List loads from API
|
||||
3. User can unfollow (Following tab) or follow (Followers tab)
|
||||
4. List updates automatically
|
||||
5. Success/error messages shown
|
||||
|
||||
## Design Patterns
|
||||
|
||||
### Follows Project Conventions
|
||||
|
||||
1. **Material 3 Design**: All widgets use Material 3 components
|
||||
2. **Styled Widget Package**: Used for `.padding()`, `.textColor()`, etc.
|
||||
3. **Riverpod State Management**: Hooks for local state, providers for global state
|
||||
4. **Error Handling**: `showErrorAlert()` from `alert.dart` for user feedback
|
||||
5. **Success Feedback**: `showSnackBar()` for quick notifications
|
||||
6. **Localization**: All strings use `.tr()` with placeholder args
|
||||
|
||||
### Color Scheme & Theming
|
||||
|
||||
- **Remote Badge**: Uses `Theme.colorScheme.primary` for indicator
|
||||
- **Instance Tag**: Uses `Theme.colorScheme.secondaryContainer`
|
||||
- **Text Colors**: Adaptive based on theme (dark/light)
|
||||
- **States**: Loading indicators with standard `CircularProgressIndicator`
|
||||
|
||||
### Spacing & Layout
|
||||
|
||||
- **List Item Padding**: `EdgeInsets.only(left: 16, right: 12)`
|
||||
- **Avatar Size**: 24px radius (48px diameter)
|
||||
- **Badge Size**: Small (10px font) with 6px horizontal padding
|
||||
- **Button Size**: Minimum 88px width, 36px height
|
||||
|
||||
## Translations Added
|
||||
|
||||
### New Keys in `assets/i18n/en-US.json`
|
||||
|
||||
```json
|
||||
{
|
||||
"searchFediverse": "Search Fediverse",
|
||||
"searchFediverseHint": "Search by address, e.g. {}",
|
||||
"searchFediverseEmpty": "Search for users on other ActivityPub instances",
|
||||
"searchFediverseNoResults": "No users found for this search",
|
||||
"following": "Following",
|
||||
"followers": "Followers",
|
||||
"follow": "Follow",
|
||||
"unfollow": "Unfollow",
|
||||
"followedUser": "Followed @{}",
|
||||
"unfollowedUser": "Unfollowed @{}",
|
||||
"followingEmpty": "You're not following anyone yet",
|
||||
"followersEmpty": "No followers yet",
|
||||
"followingEmptyHint": "Start by searching for users or explore other instances"
|
||||
}
|
||||
```
|
||||
|
||||
## Usage Examples
|
||||
|
||||
### Using Search Screen
|
||||
|
||||
```dart
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:island/screens/activitypub/activitypub.dart';
|
||||
|
||||
// In navigation or route
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => const ActivityPubSearchScreen(),
|
||||
),
|
||||
);
|
||||
|
||||
// Or using go_router
|
||||
context.push('/activitypub/search');
|
||||
```
|
||||
|
||||
### Using List Screen
|
||||
|
||||
```dart
|
||||
// Following
|
||||
ActivityPubListScreen(
|
||||
type: ActivityPubListType.following,
|
||||
);
|
||||
|
||||
// Followers
|
||||
ActivityPubListScreen(
|
||||
type: ActivityPubListType.followers,
|
||||
);
|
||||
```
|
||||
|
||||
### Using User List Item Widget
|
||||
|
||||
```dart
|
||||
ActivityPubUserListItem(
|
||||
user: user,
|
||||
isFollowing: isFollowing,
|
||||
isLoading: isLoading,
|
||||
onFollow: () => handleFollow(user),
|
||||
onUnfollow: () => handleUnfollow(user),
|
||||
onTap: () => navigateToProfile(user),
|
||||
);
|
||||
```
|
||||
|
||||
## Integration Points
|
||||
|
||||
### Navigation Integration
|
||||
|
||||
To add ActivityPub screens to navigation:
|
||||
|
||||
1. **Option A**: Add to existing tab/navigation structure
|
||||
2. **Option B**: Add as standalone routes in `go_router`
|
||||
3. **Option C**: Add to profile menu overflow menu
|
||||
|
||||
### Service Integration
|
||||
|
||||
All screens use `activityPubServiceProvider`:
|
||||
|
||||
```dart
|
||||
import 'package:island/services/activitypub_service.dart';
|
||||
|
||||
final service = ref.read(activityPubServiceProvider);
|
||||
```
|
||||
|
||||
### Error Handling
|
||||
|
||||
All errors are caught and displayed using:
|
||||
|
||||
```dart
|
||||
try {
|
||||
// API call
|
||||
} catch (err) {
|
||||
showErrorAlert(err);
|
||||
}
|
||||
```
|
||||
|
||||
## Testing Checklist
|
||||
|
||||
- [ ] Search for existing Mastodon user
|
||||
- [ ] Search for Pleroma user
|
||||
- [ ] Follow a user
|
||||
- [ ] Unfollow a user
|
||||
- [ ] View following list
|
||||
- [ ] View followers list
|
||||
- [ ] Test empty states
|
||||
- [ ] Test loading states
|
||||
- [ ] Test error handling
|
||||
- [ ] Test dark mode
|
||||
- [ ] Test RTL languages (if supported)
|
||||
|
||||
## Technical Details
|
||||
|
||||
### Dependencies
|
||||
|
||||
**Already in project**:
|
||||
- ✅ `cached_network_image` - For avatar images
|
||||
- ✅ `easy_localization` - For translations
|
||||
- ✅ `hooks_riverpod` - For state management
|
||||
- ✅ `flutter_hooks` - For hooks (useState, useEffect, etc.)
|
||||
- ✅ `material_symbols_icons` - For icons
|
||||
- ✅ `relative_time` - For timestamp formatting
|
||||
- ✅ `island/services/activitypub_service.dart` - API service (created earlier)
|
||||
- ✅ `island/widgets/alert.dart` - Error/success dialogs
|
||||
- ✅ `island/models/activitypub.dart` - Data models (created earlier)
|
||||
|
||||
### Performance Considerations
|
||||
|
||||
1. **Debounced Search**: 500ms delay prevents excessive API calls
|
||||
2. **Local State Tracking**: `followingUris` Set prevents duplicate API calls
|
||||
3. **Conditional Rebuilds**: Widget only rebuilds when necessary
|
||||
4. **Image Caching**: Uses `CachedNetworkImageProvider` for avatars
|
||||
|
||||
### Accessibility
|
||||
|
||||
1. **Semantic Labels**: All ListTile widgets have proper content
|
||||
2. **Touch Targets**: Minimum 44px touch targets for buttons
|
||||
3. **Color Contrast**: Follows Material 3 color guidelines
|
||||
4. **Loading Indicators**: Visual feedback during async operations
|
||||
|
||||
## Future Enhancements
|
||||
|
||||
### Potential Additions
|
||||
|
||||
1. **Profile Integration**: Show ActivityPub profile details
|
||||
2. **Post Timeline**: Show federated posts from followed users
|
||||
3. **Instance Blocking**: Block entire ActivityPub instances
|
||||
4. **Advanced Search**: Filter by instance, user type, etc.
|
||||
5. **Batch Actions**: Follow/unfollow multiple users at once
|
||||
6. **Suggested Users**: Show recommended users to follow
|
||||
7. **Recent Activity**: Show recent interactions
|
||||
8. **Notifications**: Follow/unfollow notifications
|
||||
|
||||
### Localization
|
||||
|
||||
Need to add same keys to other language files:
|
||||
- `es-ES.json`
|
||||
- `ja-JP.json`
|
||||
- `ko-KR.json`
|
||||
- etc.
|
||||
|
||||
## Browser Testing
|
||||
|
||||
Test with real ActivityPub instances:
|
||||
- mastodon.social
|
||||
- pixelfed.social
|
||||
- lemmy.world
|
||||
- pleroma.site
|
||||
- fosstodon.org
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Common Issues
|
||||
|
||||
1. **Search returns no results**
|
||||
- Check if user exists on remote instance
|
||||
- Verify instance is accessible
|
||||
- Try full URL instead of handle
|
||||
|
||||
2. **Follow button not working**
|
||||
- Check if user is already following
|
||||
- Verify server is online
|
||||
- Check API logs
|
||||
|
||||
3. **Avatar not loading**
|
||||
- Check remote avatar URL
|
||||
- Verify network connection
|
||||
- Check image cache
|
||||
|
||||
## Summary
|
||||
|
||||
✅ **Fully functional ActivityPub UI** with:
|
||||
- Search screen for discovering fediverse users
|
||||
- Following/Followers list screens
|
||||
- Reusable user list item component
|
||||
- Proper error handling and user feedback
|
||||
- Material 3 design
|
||||
- Responsive layout
|
||||
- Local state management
|
||||
- Debounced search
|
||||
- Empty states and loading indicators
|
||||
|
||||
**Ready for integration into main app navigation!** 🎉
|
||||
1
drift_schemas/app_database/drift_schema_v7.json
Normal file
1
drift_schemas/app_database/drift_schema_v7.json
Normal file
File diff suppressed because one or more lines are too long
239
ios/Podfile.lock
239
ios/Podfile.lock
@@ -1,7 +1,5 @@
|
||||
PODS:
|
||||
- Alamofire (5.10.2)
|
||||
- app_links (6.4.1):
|
||||
- Flutter
|
||||
- Alamofire (5.11.0)
|
||||
- connectivity_plus (0.0.1):
|
||||
- Flutter
|
||||
- croppy (0.0.1):
|
||||
@@ -44,83 +42,83 @@ PODS:
|
||||
- Flutter
|
||||
- file_saver (0.0.1):
|
||||
- Flutter
|
||||
- Firebase/CoreOnly (12.4.0):
|
||||
- FirebaseCore (~> 12.4.0)
|
||||
- Firebase/Crashlytics (12.4.0):
|
||||
- Firebase/CoreOnly (12.6.0):
|
||||
- FirebaseCore (~> 12.6.0)
|
||||
- Firebase/Crashlytics (12.6.0):
|
||||
- Firebase/CoreOnly
|
||||
- FirebaseCrashlytics (~> 12.4.0)
|
||||
- Firebase/Messaging (12.4.0):
|
||||
- FirebaseCrashlytics (~> 12.6.0)
|
||||
- Firebase/Messaging (12.6.0):
|
||||
- Firebase/CoreOnly
|
||||
- FirebaseMessaging (~> 12.4.0)
|
||||
- firebase_analytics (12.0.3):
|
||||
- FirebaseMessaging (~> 12.6.0)
|
||||
- firebase_analytics (12.1.0):
|
||||
- firebase_core
|
||||
- FirebaseAnalytics (= 12.4.0)
|
||||
- FirebaseAnalytics (= 12.6.0)
|
||||
- Flutter
|
||||
- firebase_core (4.2.0):
|
||||
- Firebase/CoreOnly (= 12.4.0)
|
||||
- firebase_core (4.3.0):
|
||||
- Firebase/CoreOnly (= 12.6.0)
|
||||
- Flutter
|
||||
- firebase_crashlytics (5.0.3):
|
||||
- Firebase/Crashlytics (= 12.4.0)
|
||||
- firebase_crashlytics (5.0.6):
|
||||
- Firebase/Crashlytics (= 12.6.0)
|
||||
- firebase_core
|
||||
- Flutter
|
||||
- firebase_messaging (16.0.3):
|
||||
- Firebase/Messaging (= 12.4.0)
|
||||
- firebase_messaging (16.1.0):
|
||||
- Firebase/Messaging (= 12.6.0)
|
||||
- firebase_core
|
||||
- Flutter
|
||||
- FirebaseAnalytics (12.4.0):
|
||||
- FirebaseAnalytics/Default (= 12.4.0)
|
||||
- FirebaseCore (~> 12.4.0)
|
||||
- FirebaseInstallations (~> 12.4.0)
|
||||
- FirebaseAnalytics (12.6.0):
|
||||
- FirebaseAnalytics/Default (= 12.6.0)
|
||||
- FirebaseCore (~> 12.6.0)
|
||||
- FirebaseInstallations (~> 12.6.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.4.0):
|
||||
- FirebaseCore (~> 12.4.0)
|
||||
- FirebaseInstallations (~> 12.4.0)
|
||||
- GoogleAppMeasurement/Default (= 12.4.0)
|
||||
- FirebaseAnalytics/Default (12.6.0):
|
||||
- FirebaseCore (~> 12.6.0)
|
||||
- FirebaseInstallations (~> 12.6.0)
|
||||
- GoogleAppMeasurement/Default (= 12.6.0)
|
||||
- GoogleUtilities/AppDelegateSwizzler (~> 8.1)
|
||||
- GoogleUtilities/MethodSwizzler (~> 8.1)
|
||||
- GoogleUtilities/Network (~> 8.1)
|
||||
- "GoogleUtilities/NSData+zlib (~> 8.1)"
|
||||
- nanopb (~> 3.30910.0)
|
||||
- FirebaseCore (12.4.0):
|
||||
- FirebaseCoreInternal (~> 12.4.0)
|
||||
- FirebaseCore (12.6.0):
|
||||
- FirebaseCoreInternal (~> 12.6.0)
|
||||
- GoogleUtilities/Environment (~> 8.1)
|
||||
- GoogleUtilities/Logger (~> 8.1)
|
||||
- FirebaseCoreExtension (12.4.0):
|
||||
- FirebaseCore (~> 12.4.0)
|
||||
- FirebaseCoreInternal (12.4.0):
|
||||
- FirebaseCoreExtension (12.6.0):
|
||||
- FirebaseCore (~> 12.6.0)
|
||||
- FirebaseCoreInternal (12.6.0):
|
||||
- "GoogleUtilities/NSData+zlib (~> 8.1)"
|
||||
- FirebaseCrashlytics (12.4.0):
|
||||
- FirebaseCore (~> 12.4.0)
|
||||
- FirebaseInstallations (~> 12.4.0)
|
||||
- FirebaseRemoteConfigInterop (~> 12.4.0)
|
||||
- FirebaseSessions (~> 12.4.0)
|
||||
- FirebaseCrashlytics (12.6.0):
|
||||
- FirebaseCore (~> 12.6.0)
|
||||
- FirebaseInstallations (~> 12.6.0)
|
||||
- FirebaseRemoteConfigInterop (~> 12.6.0)
|
||||
- FirebaseSessions (~> 12.6.0)
|
||||
- GoogleDataTransport (~> 10.1)
|
||||
- GoogleUtilities/Environment (~> 8.1)
|
||||
- nanopb (~> 3.30910.0)
|
||||
- PromisesObjC (~> 2.4)
|
||||
- FirebaseInstallations (12.4.0):
|
||||
- FirebaseCore (~> 12.4.0)
|
||||
- FirebaseInstallations (12.6.0):
|
||||
- FirebaseCore (~> 12.6.0)
|
||||
- GoogleUtilities/Environment (~> 8.1)
|
||||
- GoogleUtilities/UserDefaults (~> 8.1)
|
||||
- PromisesObjC (~> 2.4)
|
||||
- FirebaseMessaging (12.4.0):
|
||||
- FirebaseCore (~> 12.4.0)
|
||||
- FirebaseInstallations (~> 12.4.0)
|
||||
- FirebaseMessaging (12.6.0):
|
||||
- FirebaseCore (~> 12.6.0)
|
||||
- FirebaseInstallations (~> 12.6.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.4.0)
|
||||
- FirebaseSessions (12.4.0):
|
||||
- FirebaseCore (~> 12.4.0)
|
||||
- FirebaseCoreExtension (~> 12.4.0)
|
||||
- FirebaseInstallations (~> 12.4.0)
|
||||
- FirebaseRemoteConfigInterop (12.6.0)
|
||||
- FirebaseSessions (12.6.0):
|
||||
- FirebaseCore (~> 12.6.0)
|
||||
- FirebaseCoreExtension (~> 12.6.0)
|
||||
- FirebaseInstallations (~> 12.6.0)
|
||||
- GoogleDataTransport (~> 10.1)
|
||||
- GoogleUtilities/Environment (~> 8.1)
|
||||
- GoogleUtilities/UserDefaults (~> 8.1)
|
||||
@@ -142,43 +140,42 @@ PODS:
|
||||
- Flutter
|
||||
- flutter_native_splash (2.4.3):
|
||||
- Flutter
|
||||
- flutter_platform_alert (0.0.1):
|
||||
- Flutter
|
||||
- flutter_secure_storage (6.0.0):
|
||||
- flutter_secure_storage_darwin (10.0.0):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- flutter_timezone (0.0.1):
|
||||
- Flutter
|
||||
- flutter_udid (0.0.1):
|
||||
- Flutter
|
||||
- SAMKeychain
|
||||
- KeychainAccess
|
||||
- flutter_webrtc (1.2.0):
|
||||
- Flutter
|
||||
- WebRTC-SDK (= 137.7151.04)
|
||||
- gal (1.0.0):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- GoogleAdsOnDeviceConversion (3.1.0):
|
||||
- GoogleAdsOnDeviceConversion (3.2.0):
|
||||
- GoogleUtilities/Environment (~> 8.1)
|
||||
- GoogleUtilities/Logger (~> 8.1)
|
||||
- GoogleUtilities/Network (~> 8.1)
|
||||
- nanopb (~> 3.30910.0)
|
||||
- GoogleAppMeasurement/Core (12.4.0):
|
||||
- GoogleAppMeasurement/Core (12.6.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.4.0):
|
||||
- GoogleAdsOnDeviceConversion (~> 3.1.0)
|
||||
- GoogleAppMeasurement/Core (= 12.4.0)
|
||||
- GoogleAppMeasurement/IdentitySupport (= 12.4.0)
|
||||
- GoogleAppMeasurement/Default (12.6.0):
|
||||
- GoogleAdsOnDeviceConversion (~> 3.2.0)
|
||||
- GoogleAppMeasurement/Core (= 12.6.0)
|
||||
- GoogleAppMeasurement/IdentitySupport (= 12.6.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.4.0):
|
||||
- GoogleAppMeasurement/Core (= 12.4.0)
|
||||
- GoogleAppMeasurement/IdentitySupport (12.6.0):
|
||||
- GoogleAppMeasurement/Core (= 12.6.0)
|
||||
- GoogleUtilities/AppDelegateSwizzler (~> 8.1)
|
||||
- GoogleUtilities/MethodSwizzler (~> 8.1)
|
||||
- GoogleUtilities/Network (~> 8.1)
|
||||
@@ -216,9 +213,12 @@ PODS:
|
||||
- GoogleUtilities/Privacy
|
||||
- image_picker_ios (0.0.1):
|
||||
- Flutter
|
||||
- in_app_review (2.0.0):
|
||||
- Flutter
|
||||
- irondash_engine_context (0.0.1):
|
||||
- Flutter
|
||||
- Kingfisher (8.6.1)
|
||||
- KeychainAccess (4.2.2)
|
||||
- Kingfisher (8.6.2)
|
||||
- KingfisherWebP (1.7.2):
|
||||
- Kingfisher (~> 8.0)
|
||||
- libwebp (>= 1.1.0)
|
||||
@@ -234,7 +234,7 @@ PODS:
|
||||
- libwebp/sharpyuv (1.5.0)
|
||||
- libwebp/webp (1.5.0):
|
||||
- libwebp/sharpyuv
|
||||
- livekit_client (2.5.3):
|
||||
- livekit_client (2.5.4):
|
||||
- Flutter
|
||||
- flutter_webrtc
|
||||
- WebRTC-SDK (= 137.7151.04)
|
||||
@@ -260,19 +260,24 @@ PODS:
|
||||
- path_provider_foundation (0.0.1):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- permission_handler_apple (9.3.0):
|
||||
- Flutter
|
||||
- pointer_interceptor_ios (0.0.1):
|
||||
- Flutter
|
||||
- PromisesObjC (2.4.0)
|
||||
- PromisesSwift (2.4.0):
|
||||
- PromisesObjC (= 2.4.0)
|
||||
- protocol_handler_ios (0.0.1):
|
||||
- Flutter
|
||||
- receive_sharing_intent (1.8.1):
|
||||
- Flutter
|
||||
- record_ios (1.1.0):
|
||||
- Flutter
|
||||
- SAMKeychain (1.5.3)
|
||||
- SDWebImage (5.21.3):
|
||||
- SDWebImage/Core (= 5.21.3)
|
||||
- SDWebImage/Core (5.21.3)
|
||||
- SDWebImage (5.21.5):
|
||||
- SDWebImage/Core (= 5.21.5)
|
||||
- SDWebImage/Core (5.21.5)
|
||||
- sensors_plus (0.0.1):
|
||||
- Flutter
|
||||
- share_plus (0.0.1):
|
||||
- Flutter
|
||||
- shared_preferences_foundation (0.0.1):
|
||||
@@ -283,25 +288,25 @@ PODS:
|
||||
- sqflite_darwin (0.0.4):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- sqlite3 (3.50.4):
|
||||
- sqlite3/common (= 3.50.4)
|
||||
- sqlite3/common (3.50.4)
|
||||
- sqlite3/dbstatvtab (3.50.4):
|
||||
- sqlite3 (3.51.1):
|
||||
- sqlite3/common (= 3.51.1)
|
||||
- sqlite3/common (3.51.1)
|
||||
- sqlite3/dbstatvtab (3.51.1):
|
||||
- sqlite3/common
|
||||
- sqlite3/fts5 (3.50.4):
|
||||
- sqlite3/fts5 (3.51.1):
|
||||
- sqlite3/common
|
||||
- sqlite3/math (3.50.4):
|
||||
- sqlite3/math (3.51.1):
|
||||
- sqlite3/common
|
||||
- sqlite3/perf-threadsafe (3.50.4):
|
||||
- sqlite3/perf-threadsafe (3.51.1):
|
||||
- sqlite3/common
|
||||
- sqlite3/rtree (3.50.4):
|
||||
- sqlite3/rtree (3.51.1):
|
||||
- sqlite3/common
|
||||
- sqlite3/session (3.50.4):
|
||||
- sqlite3/session (3.51.1):
|
||||
- sqlite3/common
|
||||
- sqlite3_flutter_libs (0.0.1):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- sqlite3 (~> 3.50.4)
|
||||
- sqlite3 (~> 3.51.1)
|
||||
- sqlite3/dbstatvtab
|
||||
- sqlite3/fts5
|
||||
- sqlite3/math
|
||||
@@ -315,15 +320,12 @@ PODS:
|
||||
- Flutter
|
||||
- url_launcher_ios (0.0.1):
|
||||
- Flutter
|
||||
- volume_controller (0.0.1):
|
||||
- Flutter
|
||||
- wakelock_plus (0.0.1):
|
||||
- Flutter
|
||||
- WebRTC-SDK (137.7151.04)
|
||||
|
||||
DEPENDENCIES:
|
||||
- Alamofire
|
||||
- app_links (from `.symlinks/plugins/app_links/ios`)
|
||||
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
|
||||
- croppy (from `.symlinks/plugins/croppy/ios`)
|
||||
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
|
||||
@@ -339,13 +341,13 @@ DEPENDENCIES:
|
||||
- flutter_keyboard_visibility (from `.symlinks/plugins/flutter_keyboard_visibility/ios`)
|
||||
- flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`)
|
||||
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
|
||||
- flutter_platform_alert (from `.symlinks/plugins/flutter_platform_alert/ios`)
|
||||
- flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`)
|
||||
- flutter_secure_storage_darwin (from `.symlinks/plugins/flutter_secure_storage_darwin/darwin`)
|
||||
- flutter_timezone (from `.symlinks/plugins/flutter_timezone/ios`)
|
||||
- flutter_udid (from `.symlinks/plugins/flutter_udid/ios`)
|
||||
- flutter_webrtc (from `.symlinks/plugins/flutter_webrtc/ios`)
|
||||
- gal (from `.symlinks/plugins/gal/darwin`)
|
||||
- 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`)
|
||||
- Kingfisher (~> 8.0)
|
||||
- KingfisherWebP
|
||||
@@ -357,9 +359,12 @@ DEPENDENCIES:
|
||||
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
|
||||
- pasteboard (from `.symlinks/plugins/pasteboard/ios`)
|
||||
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
|
||||
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
|
||||
- pointer_interceptor_ios (from `.symlinks/plugins/pointer_interceptor_ios/ios`)
|
||||
- protocol_handler_ios (from `.symlinks/plugins/protocol_handler_ios/ios`)
|
||||
- receive_sharing_intent (from `.symlinks/plugins/receive_sharing_intent/ios`)
|
||||
- record_ios (from `.symlinks/plugins/record_ios/ios`)
|
||||
- sensors_plus (from `.symlinks/plugins/sensors_plus/ios`)
|
||||
- share_plus (from `.symlinks/plugins/share_plus/ios`)
|
||||
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
|
||||
- sign_in_with_apple (from `.symlinks/plugins/sign_in_with_apple/ios`)
|
||||
@@ -368,7 +373,6 @@ DEPENDENCIES:
|
||||
- super_native_extensions (from `.symlinks/plugins/super_native_extensions/ios`)
|
||||
- syncfusion_flutter_pdfviewer (from `.symlinks/plugins/syncfusion_flutter_pdfviewer/ios`)
|
||||
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
|
||||
- volume_controller (from `.symlinks/plugins/volume_controller/ios`)
|
||||
- wakelock_plus (from `.symlinks/plugins/wakelock_plus/ios`)
|
||||
|
||||
SPEC REPOS:
|
||||
@@ -390,6 +394,7 @@ SPEC REPOS:
|
||||
- GoogleAppMeasurement
|
||||
- GoogleDataTransport
|
||||
- GoogleUtilities
|
||||
- KeychainAccess
|
||||
- Kingfisher
|
||||
- KingfisherWebP
|
||||
- libwebp
|
||||
@@ -397,15 +402,12 @@ SPEC REPOS:
|
||||
- OrderedSet
|
||||
- PromisesObjC
|
||||
- PromisesSwift
|
||||
- SAMKeychain
|
||||
- SDWebImage
|
||||
- sqlite3
|
||||
- SwiftyGif
|
||||
- WebRTC-SDK
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
app_links:
|
||||
:path: ".symlinks/plugins/app_links/ios"
|
||||
connectivity_plus:
|
||||
:path: ".symlinks/plugins/connectivity_plus/ios"
|
||||
croppy:
|
||||
@@ -436,10 +438,8 @@ EXTERNAL SOURCES:
|
||||
:path: ".symlinks/plugins/flutter_local_notifications/ios"
|
||||
flutter_native_splash:
|
||||
:path: ".symlinks/plugins/flutter_native_splash/ios"
|
||||
flutter_platform_alert:
|
||||
:path: ".symlinks/plugins/flutter_platform_alert/ios"
|
||||
flutter_secure_storage:
|
||||
:path: ".symlinks/plugins/flutter_secure_storage/ios"
|
||||
flutter_secure_storage_darwin:
|
||||
:path: ".symlinks/plugins/flutter_secure_storage_darwin/darwin"
|
||||
flutter_timezone:
|
||||
:path: ".symlinks/plugins/flutter_timezone/ios"
|
||||
flutter_udid:
|
||||
@@ -450,6 +450,8 @@ EXTERNAL SOURCES:
|
||||
:path: ".symlinks/plugins/gal/darwin"
|
||||
image_picker_ios:
|
||||
:path: ".symlinks/plugins/image_picker_ios/ios"
|
||||
in_app_review:
|
||||
:path: ".symlinks/plugins/in_app_review/ios"
|
||||
irondash_engine_context:
|
||||
:path: ".symlinks/plugins/irondash_engine_context/ios"
|
||||
livekit_client:
|
||||
@@ -468,12 +470,18 @@ EXTERNAL SOURCES:
|
||||
:path: ".symlinks/plugins/pasteboard/ios"
|
||||
path_provider_foundation:
|
||||
:path: ".symlinks/plugins/path_provider_foundation/darwin"
|
||||
permission_handler_apple:
|
||||
:path: ".symlinks/plugins/permission_handler_apple/ios"
|
||||
pointer_interceptor_ios:
|
||||
:path: ".symlinks/plugins/pointer_interceptor_ios/ios"
|
||||
protocol_handler_ios:
|
||||
:path: ".symlinks/plugins/protocol_handler_ios/ios"
|
||||
receive_sharing_intent:
|
||||
:path: ".symlinks/plugins/receive_sharing_intent/ios"
|
||||
record_ios:
|
||||
:path: ".symlinks/plugins/record_ios/ios"
|
||||
sensors_plus:
|
||||
:path: ".symlinks/plugins/sensors_plus/ios"
|
||||
share_plus:
|
||||
:path: ".symlinks/plugins/share_plus/ios"
|
||||
shared_preferences_foundation:
|
||||
@@ -490,14 +498,11 @@ EXTERNAL SOURCES:
|
||||
:path: ".symlinks/plugins/syncfusion_flutter_pdfviewer/ios"
|
||||
url_launcher_ios:
|
||||
:path: ".symlinks/plugins/url_launcher_ios/ios"
|
||||
volume_controller:
|
||||
:path: ".symlinks/plugins/volume_controller/ios"
|
||||
wakelock_plus:
|
||||
:path: ".symlinks/plugins/wakelock_plus/ios"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
Alamofire: 7193b3b92c74a07f85569e1a6c4f4237291e7496
|
||||
app_links: 3dbc685f76b1693c66a6d9dd1e9ab6f73d97dc0a
|
||||
Alamofire: bd5e7b23a1a750975288482c1831d71e74415f86
|
||||
connectivity_plus: cb623214f4e1f6ef8fe7403d580fdad517d2f7dd
|
||||
croppy: 979e8ddc254f4642bffe7d52dc7193354b27ba30
|
||||
device_info_plus: 21fcca2080fbcd348be798aa36c3e5ed849eefbe
|
||||
@@ -505,42 +510,43 @@ SPEC CHECKSUMS:
|
||||
DKPhotoGallery: b3834fecb755ee09a593d7c9e389d8b5d6deed60
|
||||
file_picker: a0560bc09d61de87f12d246fc47d2119e6ef37be
|
||||
file_saver: 6cdbcddd690cb02b0c1a0c225b37cd805c2bf8b6
|
||||
Firebase: f07b15ae5a6ec0f93713e30b923d9970d144af3e
|
||||
firebase_analytics: 1d024068b1d4707d5ba7a42a12976ddf3316d835
|
||||
firebase_core: 744984dbbed8b3036abf34f0b98d80f130a7e464
|
||||
firebase_crashlytics: f3a9a4338ab99b67042f64e9e22e1bf349cb44ed
|
||||
firebase_messaging: 82c70650c426a0a14873e1acdb9ec2b443c4e8b4
|
||||
FirebaseAnalytics: 0fc2b20091f0ddd21bf73397cf8f0eb5346dc24f
|
||||
FirebaseCore: bb595f3114953664e3c1dc032f008a244147cfd3
|
||||
FirebaseCoreExtension: 7e1f7118ee970e001a8013719fb90950ee5e0018
|
||||
FirebaseCoreInternal: d7f5a043c2cd01a08103ab586587c1468047bca6
|
||||
FirebaseCrashlytics: a6ece278a837c7e88de2d9b5da0a3542f2342395
|
||||
FirebaseInstallations: ae9f4902cb5bf1d0c5eaa31ec1f4e5495a0714e2
|
||||
FirebaseMessaging: d33971b7bb252745ea6cd31ab190d1a1df4b8ed5
|
||||
FirebaseRemoteConfigInterop: 1e31ec72b89c9924367c59bfb5ec9ab60d1d6766
|
||||
FirebaseSessions: ba7c7a7ca8696a8d540eb3fe3800fbe98c79786d
|
||||
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
|
||||
Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467
|
||||
flutter_app_update: 816fdb2e30e4832a7c45e3f108d391c42ef040a9
|
||||
flutter_inappwebview_ios: b89ba3482b96fb25e00c967aae065701b66e9b99
|
||||
flutter_keyboard_visibility: 4625131e43015dbbe759d9b20daaf77e0e3f6619
|
||||
flutter_local_notifications: a5a732f069baa862e728d839dd2ebb904737effb
|
||||
flutter_native_splash: c32d145d68aeda5502d5f543ee38c192065986cf
|
||||
flutter_platform_alert: bf3b5fcd4ac14bd637e20527e9c471633071afd3
|
||||
flutter_secure_storage: 1ed9476fba7e7a782b22888f956cce43e2c62f13
|
||||
flutter_secure_storage_darwin: acdb3f316ed05a3e68f856e0353b133eec373a23
|
||||
flutter_timezone: 7c838e17ffd4645d261e87037e5bebf6d38fe544
|
||||
flutter_udid: f7c3884e6ec2951efe4f9de082257fc77c4d15e9
|
||||
flutter_udid: 92a5d31fe0526b7b6002a2318df702e12e7eb300
|
||||
flutter_webrtc: c3e21fc0dcd9d8eb246ae4d5256fcbeb2f5ecd22
|
||||
gal: baecd024ebfd13c441269ca7404792a7152fde89
|
||||
GoogleAdsOnDeviceConversion: e03a386840803ea7eef3fd22a061930142c039c1
|
||||
GoogleAppMeasurement: 1e718274b7e015cefd846ac1fcf7820c70dc017d
|
||||
GoogleAdsOnDeviceConversion: d68c69dd9581a0f5da02617b6f377e5be483970f
|
||||
GoogleAppMeasurement: 3bf40aff49a601af5da1c3345702fcb4991d35ee
|
||||
GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7
|
||||
GoogleUtilities: 00c88b9a86066ef77f0da2fab05f65d7768ed8e1
|
||||
image_picker_ios: e0ece4aa2a75771a7de3fa735d26d90817041326
|
||||
in_app_review: 7dd1ea365263f834b8464673f9df72c80c17c937
|
||||
irondash_engine_context: 8e58ca8e0212ee9d1c7dc6a42121849986c88486
|
||||
Kingfisher: 7ac7a7288653787a54206b11a3c74f49ab650f1f
|
||||
KeychainAccess: c0c4f7f38f6fc7bbe58f5702e25f7bd2f65abf51
|
||||
Kingfisher: 23d18f54677d973b713e54ce6a8f5eef6e7056ba
|
||||
KingfisherWebP: 38b9721821947f547afb78f933f75f4f9e0ae402
|
||||
libwebp: 02b23773aedb6ff1fd38cec7a77b81414c6842a8
|
||||
livekit_client: 86c8af579274e4b7a215185a8080db2d4e176f40
|
||||
livekit_client: 53ca658779b78710fb458cccee28b53a13356c15
|
||||
local_auth_darwin: c3ee6cce0a8d56be34c8ccb66ba31f7f180aaebb
|
||||
media_kit_libs_ios_video: 5a18affdb97d1f5d466dc79988b13eff6c5e2854
|
||||
media_kit_video: 1746e198cb697d1ffb734b1d05ec429d1fcd1474
|
||||
@@ -550,24 +556,25 @@ SPEC CHECKSUMS:
|
||||
package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499
|
||||
pasteboard: 49088aeb6119d51f976a421db60d8e1ab079b63c
|
||||
path_provider_foundation: bb55f6dbba17d0dccd6737fe6f7f34fbd0376880
|
||||
permission_handler_apple: 4ed2196e43d0651e8ff7ca3483a069d469701f2d
|
||||
pointer_interceptor_ios: da06a662d5bfd329602b45b2ab41bc0fb5fdb0f0
|
||||
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
|
||||
PromisesSwift: 9d77319bbe72ebf6d872900551f7eeba9bce2851
|
||||
protocol_handler_ios: 59f23ee71f3ec602d67902ca7f669a80957888d5
|
||||
receive_sharing_intent: 222384f00ffe7e952bbfabaa9e3967cb87e5fe00
|
||||
record_ios: f75fa1d57f840012775c0e93a38a7f3ceea1a374
|
||||
SAMKeychain: 483e1c9f32984d50ca961e26818a534283b4cd5c
|
||||
SDWebImage: 16309af6d214ba3f77a7c6f6fdda888cb313a50a
|
||||
SDWebImage: e9c98383c7572d713c1a0d7dd2783b10599b9838
|
||||
sensors_plus: 6a11ed0c2e1d0bd0b20b4029d3bad27d96e0c65b
|
||||
share_plus: 50da8cb520a8f0f65671c6c6a99b3617ed10a58a
|
||||
shared_preferences_foundation: 7036424c3d8ec98dfe75ff1667cb0cd531ec82bb
|
||||
sign_in_with_apple: c5dcc141574c8c54d5ac99dd2163c0c72ad22418
|
||||
sqflite_darwin: 20b2a3a3b70e43edae938624ce550a3cbf66a3d0
|
||||
sqlite3: 73513155ec6979715d3904ef53a8d68892d4032b
|
||||
sqlite3_flutter_libs: 83f8e9f5b6554077f1d93119fe20ebaa5f3a9ef1
|
||||
sqlite3: 8d708bc63e9f4ce48f0ad9d6269e478c5ced1d9b
|
||||
sqlite3_flutter_libs: d13b8b3003f18f596e542bcb9482d105577eff41
|
||||
super_native_extensions: b763c02dc3a8fd078389f410bf15149179020cb4
|
||||
SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4
|
||||
syncfusion_flutter_pdfviewer: 90dc48305d2e33d4aa20681d1e98ddeda891bc14
|
||||
url_launcher_ios: 7a95fa5b60cc718a708b8f2966718e93db0cef1b
|
||||
volume_controller: 3657a1f65bedb98fa41ff7dc5793537919f31b12
|
||||
wakelock_plus: e29112ab3ef0b318e58cfa5c32326458be66b556
|
||||
WebRTC-SDK: 40d4f5ba05cadff14e4db5614aec402a633f007e
|
||||
|
||||
|
||||
@@ -1085,8 +1085,8 @@
|
||||
baseConfigurationReference = 31EA49B10397BD4145AD765E /* Pods-Solian Watch App.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AppIcon;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
@@ -1136,8 +1136,8 @@
|
||||
baseConfigurationReference = 2440CEDEAAD6D51FDA95FA62 /* Pods-Solian Watch App.release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AppIcon;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
@@ -1185,8 +1185,8 @@
|
||||
baseConfigurationReference = 0ECC3D56D018DD87FC342699 /* Pods-Solian Watch App.profile.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AppIcon;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
@@ -1232,7 +1232,7 @@
|
||||
73ACDFC42E3D0E6100B63535 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
@@ -1274,7 +1274,7 @@
|
||||
73ACDFC52E3D0E6100B63535 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
@@ -1313,7 +1313,7 @@
|
||||
73ACDFC62E3D0E6100B63535 /* Profile */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
@@ -1353,7 +1353,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 17FAB080A9C53193ABD9C15B /* Pods-SolianShareExtension.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
@@ -1398,7 +1398,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 27C66EFB5A705F1A822C3EB0 /* Pods-SolianShareExtension.release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
@@ -1440,7 +1440,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = A85FF612AE7623A9934E57CE /* Pods-SolianShareExtension.profile.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
@@ -1482,7 +1482,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = F830F535CB92E3F2E1653A11 /* Pods-SolianNotificationService.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
@@ -1524,7 +1524,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = B93771F2A63E4148DC6142F7 /* Pods-SolianNotificationService.release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
@@ -1563,7 +1563,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 8B40620B1EEBB09456406A3C /* Pods-SolianNotificationService.profile.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
|
||||
@@ -1,334 +1 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "2x",
|
||||
"size" : "20x20"
|
||||
},
|
||||
{
|
||||
"filename" : "Icon-App-20x20@3x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "3x",
|
||||
"size" : "20x20"
|
||||
},
|
||||
{
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "2x",
|
||||
"size" : "29x29"
|
||||
},
|
||||
{
|
||||
"filename" : "Icon-App-29x29@3x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "3x",
|
||||
"size" : "29x29"
|
||||
},
|
||||
{
|
||||
"filename" : "Icon-App-38x38@2x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "2x",
|
||||
"size" : "38x38"
|
||||
},
|
||||
{
|
||||
"filename" : "Icon-App-38x38@3x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "3x",
|
||||
"size" : "38x38"
|
||||
},
|
||||
{
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "2x",
|
||||
"size" : "40x40"
|
||||
},
|
||||
{
|
||||
"filename" : "Icon-App-40x40@3x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "3x",
|
||||
"size" : "40x40"
|
||||
},
|
||||
{
|
||||
"filename" : "Icon-App-60x60@2x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "2x",
|
||||
"size" : "60x60"
|
||||
},
|
||||
{
|
||||
"filename" : "Icon-App-60x60@3x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "3x",
|
||||
"size" : "60x60"
|
||||
},
|
||||
{
|
||||
"filename" : "Icon-App-64x64@2x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "2x",
|
||||
"size" : "64x64"
|
||||
},
|
||||
{
|
||||
"filename" : "Icon-App-64x64@3x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "3x",
|
||||
"size" : "64x64"
|
||||
},
|
||||
{
|
||||
"filename" : "Icon-App-68x68@2x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "2x",
|
||||
"size" : "68x68"
|
||||
},
|
||||
{
|
||||
"filename" : "Icon-App-76x76@2x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "2x",
|
||||
"size" : "76x76"
|
||||
},
|
||||
{
|
||||
"filename" : "Icon-App-83.5x83.5@2x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "2x",
|
||||
"size" : "83.5x83.5"
|
||||
},
|
||||
{
|
||||
"filename" : "Icon-App-1024x1024@1x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "1x",
|
||||
"size" : "1024x1024"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"filename" : "Icon-App-Dark-20x20@2x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "2x",
|
||||
"size" : "20x20"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"filename" : "Icon-App-Dark-20x20@3x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "3x",
|
||||
"size" : "20x20"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"filename" : "Icon-App-Dark-29x29@2x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "2x",
|
||||
"size" : "29x29"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"filename" : "Icon-App-Dark-29x29@3x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "3x",
|
||||
"size" : "29x29"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"filename" : "Icon-App-Dark-38x38@2x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "2x",
|
||||
"size" : "38x38"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"filename" : "Icon-App-Dark-38x38@3x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "3x",
|
||||
"size" : "38x38"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"filename" : "Icon-App-Dark-40x40@2x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "2x",
|
||||
"size" : "40x40"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"filename" : "Icon-App-Dark-40x40@3x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "3x",
|
||||
"size" : "40x40"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"filename" : "Icon-App-Dark-60x60@2x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "2x",
|
||||
"size" : "60x60"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"filename" : "Icon-App-Dark-60x60@3x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "3x",
|
||||
"size" : "60x60"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"filename" : "Icon-App-Dark-64x64@2x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "2x",
|
||||
"size" : "64x64"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"filename" : "Icon-App-Dark-64x64@3x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "3x",
|
||||
"size" : "64x64"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"filename" : "Icon-App-Dark-68x68@2x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "2x",
|
||||
"size" : "68x68"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"filename" : "Icon-App-Dark-76x76@2x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "2x",
|
||||
"size" : "76x76"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"filename" : "Icon-App-Dark-83.5x83.5@2x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "2x",
|
||||
"size" : "83.5x83.5"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"filename" : "Icon-App-Dark-1024x1024@1x.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "1x",
|
||||
"size" : "1024x1024"
|
||||
},
|
||||
{
|
||||
"filename" : "Icon-App-1024x1024@1x.png",
|
||||
"idiom" : "ios-marketing",
|
||||
"scale" : "1x",
|
||||
"size" : "1024x1024"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
{"images":[{"size":"20x20","idiom":"universal","filename":"Icon-App-20x20@2x.png","scale":"2x","platform":"ios"},{"size":"20x20","idiom":"universal","filename":"Icon-App-20x20@3x.png","scale":"3x","platform":"ios"},{"size":"29x29","idiom":"universal","filename":"Icon-App-29x29@2x.png","scale":"2x","platform":"ios"},{"size":"29x29","idiom":"universal","filename":"Icon-App-29x29@3x.png","scale":"3x","platform":"ios"},{"size":"38x38","idiom":"universal","filename":"Icon-App-38x38@2x.png","scale":"2x","platform":"ios"},{"size":"38x38","idiom":"universal","filename":"Icon-App-38x38@3x.png","scale":"3x","platform":"ios"},{"size":"40x40","idiom":"universal","filename":"Icon-App-40x40@2x.png","scale":"2x","platform":"ios"},{"size":"40x40","idiom":"universal","filename":"Icon-App-40x40@3x.png","scale":"3x","platform":"ios"},{"size":"60x60","idiom":"universal","filename":"Icon-App-60x60@2x.png","scale":"2x","platform":"ios"},{"size":"60x60","idiom":"universal","filename":"Icon-App-60x60@3x.png","scale":"3x","platform":"ios"},{"size":"64x64","idiom":"universal","filename":"Icon-App-64x64@2x.png","scale":"2x","platform":"ios"},{"size":"64x64","idiom":"universal","filename":"Icon-App-64x64@3x.png","scale":"3x","platform":"ios"},{"size":"68x68","idiom":"universal","filename":"Icon-App-68x68@2x.png","scale":"2x","platform":"ios"},{"size":"76x76","idiom":"universal","filename":"Icon-App-76x76@2x.png","scale":"2x","platform":"ios"},{"size":"83.5x83.5","idiom":"universal","filename":"Icon-App-83.5x83.5@2x.png","scale":"2x","platform":"ios"},{"size":"1024x1024","idiom":"universal","filename":"Icon-App-1024x1024@1x.png","scale":"1x","platform":"ios"},{"size":"1024x1024","idiom":"ios-marketing","filename":"Icon-App-1024x1024@1x.png","scale":"1x"},{"size":"20x20","idiom":"universal","filename":"Icon-App-Dark-20x20@2x.png","scale":"2x","platform":"ios","appearances":[{"appearance":"luminosity","value":"dark"}]},{"size":"20x20","idiom":"universal","filename":"Icon-App-Dark-20x20@3x.png","scale":"3x","platform":"ios","appearances":[{"appearance":"luminosity","value":"dark"}]},{"size":"29x29","idiom":"universal","filename":"Icon-App-Dark-29x29@2x.png","scale":"2x","platform":"ios","appearances":[{"appearance":"luminosity","value":"dark"}]},{"size":"29x29","idiom":"universal","filename":"Icon-App-Dark-29x29@3x.png","scale":"3x","platform":"ios","appearances":[{"appearance":"luminosity","value":"dark"}]},{"size":"38x38","idiom":"universal","filename":"Icon-App-Dark-38x38@2x.png","scale":"2x","platform":"ios","appearances":[{"appearance":"luminosity","value":"dark"}]},{"size":"38x38","idiom":"universal","filename":"Icon-App-Dark-38x38@3x.png","scale":"3x","platform":"ios","appearances":[{"appearance":"luminosity","value":"dark"}]},{"size":"40x40","idiom":"universal","filename":"Icon-App-Dark-40x40@2x.png","scale":"2x","platform":"ios","appearances":[{"appearance":"luminosity","value":"dark"}]},{"size":"40x40","idiom":"universal","filename":"Icon-App-Dark-40x40@3x.png","scale":"3x","platform":"ios","appearances":[{"appearance":"luminosity","value":"dark"}]},{"size":"60x60","idiom":"universal","filename":"Icon-App-Dark-60x60@2x.png","scale":"2x","platform":"ios","appearances":[{"appearance":"luminosity","value":"dark"}]},{"size":"60x60","idiom":"universal","filename":"Icon-App-Dark-60x60@3x.png","scale":"3x","platform":"ios","appearances":[{"appearance":"luminosity","value":"dark"}]},{"size":"64x64","idiom":"universal","filename":"Icon-App-Dark-64x64@2x.png","scale":"2x","platform":"ios","appearances":[{"appearance":"luminosity","value":"dark"}]},{"size":"64x64","idiom":"universal","filename":"Icon-App-Dark-64x64@3x.png","scale":"3x","platform":"ios","appearances":[{"appearance":"luminosity","value":"dark"}]},{"size":"68x68","idiom":"universal","filename":"Icon-App-Dark-68x68@2x.png","scale":"2x","platform":"ios","appearances":[{"appearance":"luminosity","value":"dark"}]},{"size":"76x76","idiom":"universal","filename":"Icon-App-Dark-76x76@2x.png","scale":"2x","platform":"ios","appearances":[{"appearance":"luminosity","value":"dark"}]},{"size":"83.5x83.5","idiom":"universal","filename":"Icon-App-Dark-83.5x83.5@2x.png","scale":"2x","platform":"ios","appearances":[{"appearance":"luminosity","value":"dark"}]},{"size":"1024x1024","idiom":"universal","filename":"Icon-App-Dark-1024x1024@1x.png","scale":"1x","platform":"ios","appearances":[{"appearance":"luminosity","value":"dark"}]}],"info":{"version":1,"author":"xcode"}}
|
||||
@@ -1,108 +1,110 @@
|
||||
<?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>
|
||||
<key>AppGroupId</key>
|
||||
<string>$(CUSTOM_GROUP_ID)</string>
|
||||
<key>BUNDLE_ID</key>
|
||||
<string>dev.solsynth.solian</string>
|
||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||
<true/>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Solian</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>solian</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>$(FLUTTER_BUILD_NAME)</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleURLTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>ShareMedia-$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>solian</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
||||
<key>CLIENT_ID</key>
|
||||
<string>961776991058-stt7et4qvn3cpscl4r61gl1hnlatqkig.apps.googleusercontent.com</string>
|
||||
<key>ITSAppUsesNonExemptEncryption</key>
|
||||
<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>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>NSUserActivityTypes</key>
|
||||
<array>
|
||||
<string>INStartCallIntent</string>
|
||||
<string>INSendMessageIntent</string>
|
||||
</array>
|
||||
<key>PLIST_VERSION</key>
|
||||
<string>1</string>
|
||||
<key>REVERSED_CLIENT_ID</key>
|
||||
<string>com.googleusercontent.apps.961776991058-stt7et4qvn3cpscl4r61gl1hnlatqkig</string>
|
||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||
<true/>
|
||||
<key>UIBackgroundModes</key>
|
||||
<array>
|
||||
<string>fetch</string>
|
||||
<string>audio</string>
|
||||
<string>remote-notification</string>
|
||||
<string>voip</string>
|
||||
</array>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UIStatusBarHidden</key>
|
||||
<false/>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
</array>
|
||||
<key>WKCompanionAppBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>AppGroupId</key>
|
||||
<string>$(CUSTOM_GROUP_ID)</string>
|
||||
<key>BUNDLE_ID</key>
|
||||
<string>dev.solsynth.solian</string>
|
||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||
<true/>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Solian</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>solian</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>$(FLUTTER_BUILD_NAME)</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleURLTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>ShareMedia-$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
<key>CFBundleURLName</key>
|
||||
<string></string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>solian</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
||||
<key>CLIENT_ID</key>
|
||||
<string>961776991058-stt7et4qvn3cpscl4r61gl1hnlatqkig.apps.googleusercontent.com</string>
|
||||
<key>ITSAppUsesNonExemptEncryption</key>
|
||||
<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>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>NSUserActivityTypes</key>
|
||||
<array>
|
||||
<string>INStartCallIntent</string>
|
||||
<string>INSendMessageIntent</string>
|
||||
</array>
|
||||
<key>PLIST_VERSION</key>
|
||||
<string>1</string>
|
||||
<key>REVERSED_CLIENT_ID</key>
|
||||
<string>com.googleusercontent.apps.961776991058-stt7et4qvn3cpscl4r61gl1hnlatqkig</string>
|
||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||
<true/>
|
||||
<key>UIBackgroundModes</key>
|
||||
<array>
|
||||
<string>fetch</string>
|
||||
<string>audio</string>
|
||||
<string>remote-notification</string>
|
||||
<string>voip</string>
|
||||
</array>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UIStatusBarHidden</key>
|
||||
<false/>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
</array>
|
||||
<key>WKCompanionAppBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -48,3 +48,11 @@ struct ContentView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// --- Placeholder Implementations for Preview ---
|
||||
|
||||
struct ContentView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
ContentView()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,21 +140,29 @@ class NotificationService: UNNotificationServiceExtension {
|
||||
|
||||
guard !attachmentUrls.isEmpty else {
|
||||
print("Invalid URLs for attachments: \(attachmentUrls)")
|
||||
self.contentHandler?(content)
|
||||
return
|
||||
}
|
||||
|
||||
let targetSize = 512
|
||||
let scaleProcessor = ResizingImageProcessor(referenceSize: CGSize(width: targetSize, height: targetSize), mode: .aspectFit)
|
||||
|
||||
let dispatchGroup = DispatchGroup()
|
||||
var attachments: [UNNotificationAttachment] = []
|
||||
let lock = NSLock() // To synchronize access to the attachments array
|
||||
|
||||
for attachmentUrl in attachmentUrls {
|
||||
guard let remoteUrl = URL(string: attachmentUrl) else {
|
||||
print("Invalid URL for attachment: \(attachmentUrl)")
|
||||
continue // Skip this URL and move to the next one
|
||||
continue
|
||||
}
|
||||
|
||||
dispatchGroup.enter()
|
||||
|
||||
KingfisherManager.shared.retrieveImage(with: remoteUrl, options: scaleDown ? [
|
||||
.processor(scaleProcessor)
|
||||
] : nil) { [weak self] result in
|
||||
defer { dispatchGroup.leave() }
|
||||
guard let self = self else { return }
|
||||
|
||||
switch result {
|
||||
@@ -166,49 +174,34 @@ class NotificationService: UNNotificationServiceExtension {
|
||||
do {
|
||||
// Write the image data to a temporary file for UNNotificationAttachment
|
||||
try retrievalResult.image.pngData()?.write(to: cachedFileUrl)
|
||||
self.attachLocalMedia(to: content, fileType: type?.identifier, from: cachedFileUrl, withIdentifier: attachmentUrl)
|
||||
|
||||
if let attachment = try? UNNotificationAttachment(identifier: attachmentUrl, url: cachedFileUrl, options: [
|
||||
UNNotificationAttachmentOptionsTypeHintKey: type?.identifier as Any,
|
||||
UNNotificationAttachmentOptionsThumbnailHiddenKey: 0,
|
||||
]) {
|
||||
lock.lock()
|
||||
attachments.append(attachment)
|
||||
lock.unlock()
|
||||
}
|
||||
} catch {
|
||||
print("Failed to write media to temporary file: \(error.localizedDescription)")
|
||||
self.contentHandler?(content)
|
||||
}
|
||||
|
||||
case .failure(let error):
|
||||
print("Failed to retrieve image: \(error.localizedDescription)")
|
||||
self.contentHandler?(content)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private func attachLocalMedia(to content: UNMutableNotificationContent, fileType type: String?, from localUrl: URL, withIdentifier identifier: String) {
|
||||
do {
|
||||
let attachment = try UNNotificationAttachment(identifier: identifier, url: localUrl, options: [
|
||||
UNNotificationAttachmentOptionsTypeHintKey: type as Any,
|
||||
UNNotificationAttachmentOptionsThumbnailHiddenKey: 0,
|
||||
])
|
||||
content.attachments = [attachment]
|
||||
} catch let error as NSError {
|
||||
// Log detailed error information
|
||||
print("Failed to create attachment from file at \(localUrl.path)")
|
||||
print("Error: \(error.localizedDescription)")
|
||||
|
||||
// Check specific error codes if needed
|
||||
if error.domain == NSCocoaErrorDomain {
|
||||
switch error.code {
|
||||
case NSFileReadNoSuchFileError:
|
||||
print("File does not exist at \(localUrl.path)")
|
||||
case NSFileReadNoPermissionError:
|
||||
print("No permission to read file at \(localUrl.path)")
|
||||
default:
|
||||
print("Unhandled file error: \(error.code)")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Call content handler regardless of success or failure
|
||||
self.contentHandler?(content)
|
||||
dispatchGroup.notify(queue: .main) { [weak self] in
|
||||
guard let self = self else { return }
|
||||
content.attachments = attachments
|
||||
self.contentHandler?(content)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private func createMessageIntent(with sender: INPerson, meta: [AnyHashable: Any], body: String) -> INSendMessageIntent {
|
||||
INSendMessageIntent(
|
||||
recipients: nil,
|
||||
|
||||
@@ -2,17 +2,22 @@ import 'dart:convert';
|
||||
import 'package:drift/drift.dart';
|
||||
import 'package:island/database/message.dart';
|
||||
import 'package:island/database/draft.dart';
|
||||
import 'package:island/models/account.dart';
|
||||
import 'package:island/models/chat.dart';
|
||||
import 'package:island/models/post.dart';
|
||||
import 'package:island/models/realm.dart';
|
||||
|
||||
part 'drift_db.g.dart';
|
||||
|
||||
// Define the database
|
||||
@DriftDatabase(tables: [ChatMessages, PostDrafts])
|
||||
@DriftDatabase(
|
||||
tables: [Realms, ChatRooms, ChatMembers, ChatMessages, PostDrafts],
|
||||
)
|
||||
class AppDatabase extends _$AppDatabase {
|
||||
AppDatabase(super.e);
|
||||
|
||||
@override
|
||||
int get schemaVersion => 7;
|
||||
int get schemaVersion => 12;
|
||||
|
||||
@override
|
||||
MigrationStrategy get migration => MigrationStrategy(
|
||||
@@ -55,6 +60,49 @@ class AppDatabase extends _$AppDatabase {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (from < 8) {
|
||||
// Add new tables for separate sender and room data
|
||||
await m.createTable(chatRooms);
|
||||
await m.createTable(chatMembers);
|
||||
}
|
||||
if (from < 9) {
|
||||
// Remove unused columns from chat_members
|
||||
await customStatement('ALTER TABLE chat_members DROP COLUMN role');
|
||||
await customStatement('ALTER TABLE chat_members DROP COLUMN is_bot');
|
||||
await customStatement('ALTER TABLE chat_members DROP COLUMN status');
|
||||
await customStatement(
|
||||
'ALTER TABLE chat_members DROP COLUMN last_typed',
|
||||
);
|
||||
}
|
||||
if (from < 10) {
|
||||
// Add realms table and update chat_rooms foreign key
|
||||
await m.createTable(realms);
|
||||
// The realmId column in chat_rooms already exists, just need to ensure the foreign key constraint
|
||||
}
|
||||
if (from < 11) {
|
||||
// Add isPinned column to chat_rooms table
|
||||
await customStatement(
|
||||
'ALTER TABLE chat_rooms ADD COLUMN is_pinned INTEGER DEFAULT 0',
|
||||
);
|
||||
}
|
||||
if (from < 12) {
|
||||
// Add new columns to realms table
|
||||
await customStatement(
|
||||
'ALTER TABLE realms ADD COLUMN slug TEXT NOT NULL DEFAULT \'\'',
|
||||
);
|
||||
await customStatement(
|
||||
'ALTER TABLE realms ADD COLUMN verified_as TEXT NULL',
|
||||
);
|
||||
await customStatement(
|
||||
'ALTER TABLE realms ADD COLUMN verified_at DATETIME NULL',
|
||||
);
|
||||
await customStatement(
|
||||
'ALTER TABLE realms ADD COLUMN is_community INTEGER NOT NULL DEFAULT 0',
|
||||
);
|
||||
await customStatement(
|
||||
'ALTER TABLE realms ADD COLUMN is_public INTEGER NOT NULL DEFAULT 0',
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
@@ -76,11 +124,10 @@ class AppDatabase extends _$AppDatabase {
|
||||
|
||||
// Migrate existing data if any
|
||||
try {
|
||||
final oldDrafts =
|
||||
await customSelect(
|
||||
'SELECT id, post, lastModified FROM post_drafts_old',
|
||||
readsFrom: {postDrafts},
|
||||
).get();
|
||||
final oldDrafts = await customSelect(
|
||||
'SELECT id, post, lastModified FROM post_drafts_old',
|
||||
readsFrom: {postDrafts},
|
||||
).get();
|
||||
|
||||
for (final row in oldDrafts) {
|
||||
final postJson = row.read<String>('post');
|
||||
@@ -134,9 +181,9 @@ class AppDatabase extends _$AppDatabase {
|
||||
}
|
||||
|
||||
Future<int> updateMessageStatus(String id, MessageStatus status) {
|
||||
return (update(chatMessages)..where(
|
||||
(m) => m.id.equals(id),
|
||||
)).write(ChatMessagesCompanion(status: Value(status)));
|
||||
return (update(chatMessages)..where((m) => m.id.equals(id))).write(
|
||||
ChatMessagesCompanion(status: Value(status)),
|
||||
);
|
||||
}
|
||||
|
||||
Future<int> deleteMessage(String id) {
|
||||
@@ -153,32 +200,36 @@ class AppDatabase extends _$AppDatabase {
|
||||
String roomId,
|
||||
String query, {
|
||||
bool? withAttachments,
|
||||
Future<SnAccount?> Function(String accountId)? fetchAccount,
|
||||
}) async {
|
||||
var selectStatement = select(chatMessages)
|
||||
..where((m) => m.roomId.equals(roomId));
|
||||
|
||||
if (query.isNotEmpty) {
|
||||
final searchTerm = '%$query%';
|
||||
selectStatement =
|
||||
selectStatement..where(
|
||||
(m) =>
|
||||
m.content.like(searchTerm) |
|
||||
m.meta.like(searchTerm) |
|
||||
m.attachments.like(searchTerm) |
|
||||
m.type.like(searchTerm),
|
||||
);
|
||||
selectStatement = selectStatement
|
||||
..where(
|
||||
(m) =>
|
||||
m.content.like(searchTerm) |
|
||||
m.meta.like(searchTerm) |
|
||||
m.attachments.like(searchTerm) |
|
||||
m.type.like(searchTerm),
|
||||
);
|
||||
}
|
||||
|
||||
if (withAttachments == true) {
|
||||
selectStatement =
|
||||
selectStatement..where((m) => m.attachments.equals('[]').not());
|
||||
selectStatement = selectStatement
|
||||
..where((m) => m.attachments.equals('[]').not());
|
||||
}
|
||||
|
||||
final messages =
|
||||
await (selectStatement
|
||||
..orderBy([(m) => OrderingTerm.desc(m.createdAt)]))
|
||||
.get();
|
||||
return messages.map((msg) => companionToMessage(msg)).toList();
|
||||
final messageFutures = messages
|
||||
.map((msg) => companionToMessage(msg, fetchAccount: fetchAccount))
|
||||
.toList();
|
||||
return await Future.wait(messageFutures);
|
||||
}
|
||||
|
||||
// Convert between Drift and model objects
|
||||
@@ -206,12 +257,84 @@ class AppDatabase extends _$AppDatabase {
|
||||
);
|
||||
}
|
||||
|
||||
LocalChatMessage companionToMessage(ChatMessage dbMessage) {
|
||||
Future<LocalChatMessage> companionToMessage(
|
||||
ChatMessage dbMessage, {
|
||||
Future<SnAccount?> Function(String accountId)? fetchAccount,
|
||||
}) async {
|
||||
final data = jsonDecode(dbMessage.data);
|
||||
SnChatMember? sender;
|
||||
try {
|
||||
final senderRow = await (select(
|
||||
chatMembers,
|
||||
)..where((m) => m.id.equals(dbMessage.senderId))).getSingle();
|
||||
SnAccount senderAccount;
|
||||
senderAccount = SnAccount.fromJson(senderRow.account);
|
||||
|
||||
sender = SnChatMember(
|
||||
id: senderRow.id,
|
||||
chatRoomId: senderRow.chatRoomId,
|
||||
accountId: senderRow.accountId,
|
||||
account: senderAccount,
|
||||
nick: senderRow.nick,
|
||||
notify: senderRow.notify,
|
||||
joinedAt: senderRow.joinedAt,
|
||||
breakUntil: senderRow.breakUntil,
|
||||
timeoutUntil: senderRow.timeoutUntil,
|
||||
status: null,
|
||||
createdAt: senderRow.createdAt,
|
||||
updatedAt: senderRow.updatedAt,
|
||||
deletedAt: senderRow.deletedAt,
|
||||
chatRoom: null,
|
||||
);
|
||||
} catch (err) {
|
||||
// Fallback to dummy sender with senderId as display name
|
||||
sender = SnChatMember(
|
||||
id: 'unknown',
|
||||
chatRoomId: dbMessage.roomId,
|
||||
accountId: dbMessage.senderId,
|
||||
account: SnAccount(
|
||||
id: 'unknown',
|
||||
name: 'unknown',
|
||||
nick: dbMessage.senderId, // Show the ID instead of Unknown
|
||||
activatedAt: null,
|
||||
profile: SnAccountProfile(
|
||||
picture: null,
|
||||
id: 'unknown',
|
||||
experience: 0,
|
||||
level: 1,
|
||||
levelingProgress: 0.0,
|
||||
background: null,
|
||||
verification: null,
|
||||
createdAt: DateTime.now(),
|
||||
updatedAt: DateTime.now(),
|
||||
deletedAt: null,
|
||||
),
|
||||
language: '',
|
||||
isSuperuser: false,
|
||||
automatedId: null,
|
||||
perkSubscription: null,
|
||||
deletedAt: null,
|
||||
createdAt: DateTime.now(),
|
||||
updatedAt: DateTime.now(),
|
||||
),
|
||||
nick: dbMessage.senderId, // Show the senderId as fallback
|
||||
notify: 0,
|
||||
joinedAt: null,
|
||||
breakUntil: null,
|
||||
timeoutUntil: null,
|
||||
status: null,
|
||||
lastTyped: null,
|
||||
createdAt: DateTime.now(),
|
||||
updatedAt: DateTime.now(),
|
||||
deletedAt: null,
|
||||
chatRoom: null,
|
||||
);
|
||||
}
|
||||
return LocalChatMessage(
|
||||
id: dbMessage.id,
|
||||
roomId: dbMessage.roomId,
|
||||
senderId: dbMessage.senderId,
|
||||
sender: sender,
|
||||
data: data,
|
||||
createdAt: dbMessage.createdAt,
|
||||
status: dbMessage.status,
|
||||
@@ -231,6 +354,129 @@ class AppDatabase extends _$AppDatabase {
|
||||
);
|
||||
}
|
||||
|
||||
ChatRoomsCompanion companionFromRoom(SnChatRoom room) {
|
||||
return ChatRoomsCompanion(
|
||||
id: Value(room.id),
|
||||
name: Value(room.name),
|
||||
description: Value(room.description),
|
||||
type: Value(room.type),
|
||||
isPublic: Value(room.isPublic),
|
||||
isCommunity: Value(room.isCommunity),
|
||||
picture: Value(room.picture?.toJson()),
|
||||
background: Value(room.background?.toJson()),
|
||||
realmId: Value(room.realmId),
|
||||
accountId: Value(room.accountId),
|
||||
createdAt: Value(room.createdAt),
|
||||
updatedAt: Value(room.updatedAt),
|
||||
deletedAt: Value(room.deletedAt),
|
||||
);
|
||||
}
|
||||
|
||||
ChatMembersCompanion companionFromMember(SnChatMember member) {
|
||||
return ChatMembersCompanion(
|
||||
id: Value(member.id),
|
||||
chatRoomId: Value(member.chatRoomId),
|
||||
accountId: Value(member.accountId),
|
||||
account: Value(member.account.toJson()),
|
||||
nick: Value(member.nick),
|
||||
notify: Value(member.notify),
|
||||
joinedAt: Value(member.joinedAt),
|
||||
breakUntil: Value(member.breakUntil),
|
||||
timeoutUntil: Value(member.timeoutUntil),
|
||||
createdAt: Value(member.createdAt),
|
||||
updatedAt: Value(member.updatedAt),
|
||||
deletedAt: Value(member.deletedAt),
|
||||
);
|
||||
}
|
||||
|
||||
RealmsCompanion companionFromRealm(SnRealm realm) {
|
||||
return RealmsCompanion(
|
||||
id: Value(realm.id),
|
||||
slug: Value(realm.slug),
|
||||
name: Value(realm.name),
|
||||
description: Value(realm.description),
|
||||
verifiedAs: Value(realm.verifiedAs),
|
||||
verifiedAt: Value(realm.verifiedAt),
|
||||
isCommunity: Value(realm.isCommunity),
|
||||
isPublic: Value(realm.isPublic),
|
||||
picture: Value(realm.picture?.toJson()),
|
||||
background: Value(realm.background?.toJson()),
|
||||
accountId: Value(realm.accountId),
|
||||
createdAt: Value(realm.createdAt),
|
||||
updatedAt: Value(realm.updatedAt),
|
||||
deletedAt: Value(realm.deletedAt),
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> saveChatRooms(
|
||||
List<SnChatRoom> rooms, {
|
||||
bool override = false,
|
||||
}) async {
|
||||
await transaction(() async {
|
||||
if (override) {
|
||||
// 1. Identify rooms to remove
|
||||
final remoteRoomIds = rooms.map((r) => r.id).toSet();
|
||||
final currentRooms = await select(chatRooms).get();
|
||||
final currentRoomIds = currentRooms.map((r) => r.id).toSet();
|
||||
final idsToRemove = currentRoomIds.difference(remoteRoomIds);
|
||||
|
||||
if (idsToRemove.isNotEmpty) {
|
||||
final idsList = idsToRemove.toList();
|
||||
// Remove messages
|
||||
await (delete(
|
||||
chatMessages,
|
||||
)..where((t) => t.roomId.isIn(idsList))).go();
|
||||
// Remove members
|
||||
await (delete(
|
||||
chatMembers,
|
||||
)..where((t) => t.chatRoomId.isIn(idsList))).go();
|
||||
// Remove rooms
|
||||
await (delete(chatRooms)..where((t) => t.id.isIn(idsList))).go();
|
||||
}
|
||||
}
|
||||
|
||||
// 2. Upsert realms first
|
||||
final realmsToSave = rooms
|
||||
.where((room) => room.realm != null)
|
||||
.map((room) => room.realm!)
|
||||
.toSet()
|
||||
.toList();
|
||||
await batch((batch) {
|
||||
for (final realm in realmsToSave) {
|
||||
batch.insert(
|
||||
realms,
|
||||
companionFromRealm(realm),
|
||||
mode: InsertMode.insertOrReplace,
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
// 3. Upsert remote rooms
|
||||
await batch((batch) async {
|
||||
for (final room in rooms) {
|
||||
// Preserve local isPinned status
|
||||
final currentRoom = await (select(
|
||||
chatRooms,
|
||||
)..where((r) => r.id.equals(room.id))).getSingleOrNull();
|
||||
final isPinned = currentRoom?.isPinned ?? false;
|
||||
|
||||
batch.insert(
|
||||
chatRooms,
|
||||
companionFromRoom(room).copyWith(isPinned: Value(isPinned)),
|
||||
mode: InsertMode.insertOrReplace,
|
||||
);
|
||||
for (final member in room.members ?? []) {
|
||||
batch.insert(
|
||||
chatMembers,
|
||||
companionFromMember(member),
|
||||
mode: InsertMode.insertOrReplace,
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// Methods for post drafts
|
||||
Future<List<SnPost>> getAllPostDrafts() async {
|
||||
final drafts = await select(postDrafts).get();
|
||||
@@ -273,7 +519,35 @@ class AppDatabase extends _$AppDatabase {
|
||||
}
|
||||
|
||||
Future<PostDraft?> getPostDraftById(String id) async {
|
||||
return await (select(postDrafts)
|
||||
..where((tbl) => tbl.id.equals(id))).getSingleOrNull();
|
||||
return await (select(
|
||||
postDrafts,
|
||||
)..where((tbl) => tbl.id.equals(id))).getSingleOrNull();
|
||||
}
|
||||
|
||||
Future<void> saveMember(SnChatMember member) async {
|
||||
await into(
|
||||
chatMembers,
|
||||
).insert(companionFromMember(member), mode: InsertMode.insertOrReplace);
|
||||
}
|
||||
|
||||
Future<int> saveMessageWithSender(LocalChatMessage message) async {
|
||||
// First save the sender if it exists
|
||||
if (message.sender != null) {
|
||||
await saveMember(message.sender!);
|
||||
}
|
||||
// Then save the message
|
||||
return await saveMessage(messageToCompanion(message));
|
||||
}
|
||||
|
||||
Future<void> toggleChatRoomPinned(String roomId) async {
|
||||
final room = await (select(
|
||||
chatRooms,
|
||||
)..where((r) => r.id.equals(roomId))).getSingleOrNull();
|
||||
if (room != null) {
|
||||
final newPinnedStatus = !(room.isPinned ?? false);
|
||||
await (update(chatRooms)..where((r) => r.id.equals(roomId))).write(
|
||||
ChatRoomsCompanion(isPinned: Value(newPinnedStatus)),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
616
lib/database/drift_db.steps.dart
Normal file
616
lib/database/drift_db.steps.dart
Normal file
@@ -0,0 +1,616 @@
|
||||
// dart format width=80
|
||||
import 'package:drift/internal/versioned_schema.dart' as i0;
|
||||
import 'package:drift/drift.dart' as i1;
|
||||
import 'package:drift/drift.dart'; // ignore_for_file: type=lint,unused_import
|
||||
|
||||
// GENERATED BY drift_dev, DO NOT MODIFY.
|
||||
final class Schema7 extends i0.VersionedSchema {
|
||||
Schema7({required super.database}) : super(version: 7);
|
||||
@override
|
||||
late final List<i1.DatabaseSchemaEntity> entities = [
|
||||
chatRooms,
|
||||
chatMembers,
|
||||
chatMessages,
|
||||
postDrafts,
|
||||
];
|
||||
late final Shape0 chatRooms = Shape0(
|
||||
source: i0.VersionedTable(
|
||||
entityName: 'chat_rooms',
|
||||
withoutRowId: false,
|
||||
isStrict: false,
|
||||
tableConstraints: ['PRIMARY KEY(id)'],
|
||||
columns: [
|
||||
_column_0,
|
||||
_column_1,
|
||||
_column_2,
|
||||
_column_3,
|
||||
_column_4,
|
||||
_column_5,
|
||||
_column_6,
|
||||
_column_7,
|
||||
_column_8,
|
||||
_column_9,
|
||||
_column_10,
|
||||
_column_11,
|
||||
],
|
||||
attachedDatabase: database,
|
||||
),
|
||||
alias: null,
|
||||
);
|
||||
late final Shape1 chatMembers = Shape1(
|
||||
source: i0.VersionedTable(
|
||||
entityName: 'chat_members',
|
||||
withoutRowId: false,
|
||||
isStrict: false,
|
||||
tableConstraints: ['PRIMARY KEY(id)'],
|
||||
columns: [
|
||||
_column_0,
|
||||
_column_12,
|
||||
_column_13,
|
||||
_column_14,
|
||||
_column_15,
|
||||
_column_16,
|
||||
_column_17,
|
||||
_column_18,
|
||||
_column_19,
|
||||
_column_20,
|
||||
_column_21,
|
||||
_column_22,
|
||||
_column_23,
|
||||
_column_9,
|
||||
_column_10,
|
||||
_column_11,
|
||||
],
|
||||
attachedDatabase: database,
|
||||
),
|
||||
alias: null,
|
||||
);
|
||||
late final Shape2 chatMessages = Shape2(
|
||||
source: i0.VersionedTable(
|
||||
entityName: 'chat_messages',
|
||||
withoutRowId: false,
|
||||
isStrict: false,
|
||||
tableConstraints: ['PRIMARY KEY(id)'],
|
||||
columns: [
|
||||
_column_0,
|
||||
_column_24,
|
||||
_column_25,
|
||||
_column_26,
|
||||
_column_27,
|
||||
_column_28,
|
||||
_column_9,
|
||||
_column_29,
|
||||
_column_30,
|
||||
_column_31,
|
||||
_column_11,
|
||||
_column_32,
|
||||
_column_33,
|
||||
_column_34,
|
||||
_column_35,
|
||||
_column_36,
|
||||
_column_37,
|
||||
_column_38,
|
||||
_column_39,
|
||||
],
|
||||
attachedDatabase: database,
|
||||
),
|
||||
alias: null,
|
||||
);
|
||||
late final Shape3 postDrafts = Shape3(
|
||||
source: i0.VersionedTable(
|
||||
entityName: 'post_drafts',
|
||||
withoutRowId: false,
|
||||
isStrict: false,
|
||||
tableConstraints: ['PRIMARY KEY(id)'],
|
||||
columns: [
|
||||
_column_0,
|
||||
_column_40,
|
||||
_column_2,
|
||||
_column_26,
|
||||
_column_41,
|
||||
_column_42,
|
||||
_column_43,
|
||||
_column_44,
|
||||
],
|
||||
attachedDatabase: database,
|
||||
),
|
||||
alias: null,
|
||||
);
|
||||
}
|
||||
|
||||
class Shape0 extends i0.VersionedTable {
|
||||
Shape0({required super.source, required super.alias}) : super.aliased();
|
||||
i1.GeneratedColumn<String> get id =>
|
||||
columnsByName['id']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<String> get name =>
|
||||
columnsByName['name']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<String> get description =>
|
||||
columnsByName['description']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<int> get type =>
|
||||
columnsByName['type']! as i1.GeneratedColumn<int>;
|
||||
i1.GeneratedColumn<bool> get isPublic =>
|
||||
columnsByName['is_public']! as i1.GeneratedColumn<bool>;
|
||||
i1.GeneratedColumn<bool> get isCommunity =>
|
||||
columnsByName['is_community']! as i1.GeneratedColumn<bool>;
|
||||
i1.GeneratedColumn<String> get picture =>
|
||||
columnsByName['picture']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<String> get background =>
|
||||
columnsByName['background']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<String> get realmId =>
|
||||
columnsByName['realm_id']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<DateTime> get createdAt =>
|
||||
columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
|
||||
i1.GeneratedColumn<DateTime> get updatedAt =>
|
||||
columnsByName['updated_at']! as i1.GeneratedColumn<DateTime>;
|
||||
i1.GeneratedColumn<DateTime> get deletedAt =>
|
||||
columnsByName['deleted_at']! as i1.GeneratedColumn<DateTime>;
|
||||
}
|
||||
|
||||
i1.GeneratedColumn<String> _column_0(String aliasedName) =>
|
||||
i1.GeneratedColumn<String>(
|
||||
'id',
|
||||
aliasedName,
|
||||
false,
|
||||
type: i1.DriftSqlType.string,
|
||||
);
|
||||
i1.GeneratedColumn<String> _column_1(String aliasedName) =>
|
||||
i1.GeneratedColumn<String>(
|
||||
'name',
|
||||
aliasedName,
|
||||
true,
|
||||
type: i1.DriftSqlType.string,
|
||||
);
|
||||
i1.GeneratedColumn<String> _column_2(String aliasedName) =>
|
||||
i1.GeneratedColumn<String>(
|
||||
'description',
|
||||
aliasedName,
|
||||
true,
|
||||
type: i1.DriftSqlType.string,
|
||||
);
|
||||
i1.GeneratedColumn<int> _column_3(String aliasedName) =>
|
||||
i1.GeneratedColumn<int>(
|
||||
'type',
|
||||
aliasedName,
|
||||
false,
|
||||
type: i1.DriftSqlType.int,
|
||||
);
|
||||
i1.GeneratedColumn<bool> _column_4(String aliasedName) =>
|
||||
i1.GeneratedColumn<bool>(
|
||||
'is_public',
|
||||
aliasedName,
|
||||
true,
|
||||
type: i1.DriftSqlType.bool,
|
||||
defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
|
||||
'CHECK ("is_public" IN (0, 1))',
|
||||
),
|
||||
defaultValue: const CustomExpression('0'),
|
||||
);
|
||||
i1.GeneratedColumn<bool> _column_5(String aliasedName) =>
|
||||
i1.GeneratedColumn<bool>(
|
||||
'is_community',
|
||||
aliasedName,
|
||||
true,
|
||||
type: i1.DriftSqlType.bool,
|
||||
defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
|
||||
'CHECK ("is_community" IN (0, 1))',
|
||||
),
|
||||
defaultValue: const CustomExpression('0'),
|
||||
);
|
||||
i1.GeneratedColumn<String> _column_6(String aliasedName) =>
|
||||
i1.GeneratedColumn<String>(
|
||||
'picture',
|
||||
aliasedName,
|
||||
true,
|
||||
type: i1.DriftSqlType.string,
|
||||
);
|
||||
i1.GeneratedColumn<String> _column_7(String aliasedName) =>
|
||||
i1.GeneratedColumn<String>(
|
||||
'background',
|
||||
aliasedName,
|
||||
true,
|
||||
type: i1.DriftSqlType.string,
|
||||
);
|
||||
i1.GeneratedColumn<String> _column_8(String aliasedName) =>
|
||||
i1.GeneratedColumn<String>(
|
||||
'realm_id',
|
||||
aliasedName,
|
||||
true,
|
||||
type: i1.DriftSqlType.string,
|
||||
);
|
||||
i1.GeneratedColumn<DateTime> _column_9(String aliasedName) =>
|
||||
i1.GeneratedColumn<DateTime>(
|
||||
'created_at',
|
||||
aliasedName,
|
||||
false,
|
||||
type: i1.DriftSqlType.dateTime,
|
||||
);
|
||||
i1.GeneratedColumn<DateTime> _column_10(String aliasedName) =>
|
||||
i1.GeneratedColumn<DateTime>(
|
||||
'updated_at',
|
||||
aliasedName,
|
||||
false,
|
||||
type: i1.DriftSqlType.dateTime,
|
||||
);
|
||||
i1.GeneratedColumn<DateTime> _column_11(String aliasedName) =>
|
||||
i1.GeneratedColumn<DateTime>(
|
||||
'deleted_at',
|
||||
aliasedName,
|
||||
true,
|
||||
type: i1.DriftSqlType.dateTime,
|
||||
);
|
||||
|
||||
class Shape1 extends i0.VersionedTable {
|
||||
Shape1({required super.source, required super.alias}) : super.aliased();
|
||||
i1.GeneratedColumn<String> get id =>
|
||||
columnsByName['id']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<String> get chatRoomId =>
|
||||
columnsByName['chat_room_id']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<String> get accountId =>
|
||||
columnsByName['account_id']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<String> get account =>
|
||||
columnsByName['account']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<String> get nick =>
|
||||
columnsByName['nick']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<int> get role =>
|
||||
columnsByName['role']! as i1.GeneratedColumn<int>;
|
||||
i1.GeneratedColumn<int> get notify =>
|
||||
columnsByName['notify']! as i1.GeneratedColumn<int>;
|
||||
i1.GeneratedColumn<DateTime> get joinedAt =>
|
||||
columnsByName['joined_at']! as i1.GeneratedColumn<DateTime>;
|
||||
i1.GeneratedColumn<DateTime> get breakUntil =>
|
||||
columnsByName['break_until']! as i1.GeneratedColumn<DateTime>;
|
||||
i1.GeneratedColumn<DateTime> get timeoutUntil =>
|
||||
columnsByName['timeout_until']! as i1.GeneratedColumn<DateTime>;
|
||||
i1.GeneratedColumn<bool> get isBot =>
|
||||
columnsByName['is_bot']! as i1.GeneratedColumn<bool>;
|
||||
i1.GeneratedColumn<String> get status =>
|
||||
columnsByName['status']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<DateTime> get lastTyped =>
|
||||
columnsByName['last_typed']! as i1.GeneratedColumn<DateTime>;
|
||||
i1.GeneratedColumn<DateTime> get createdAt =>
|
||||
columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
|
||||
i1.GeneratedColumn<DateTime> get updatedAt =>
|
||||
columnsByName['updated_at']! as i1.GeneratedColumn<DateTime>;
|
||||
i1.GeneratedColumn<DateTime> get deletedAt =>
|
||||
columnsByName['deleted_at']! as i1.GeneratedColumn<DateTime>;
|
||||
}
|
||||
|
||||
i1.GeneratedColumn<String> _column_12(String aliasedName) =>
|
||||
i1.GeneratedColumn<String>(
|
||||
'chat_room_id',
|
||||
aliasedName,
|
||||
false,
|
||||
type: i1.DriftSqlType.string,
|
||||
defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
|
||||
'REFERENCES chat_rooms (id)',
|
||||
),
|
||||
);
|
||||
i1.GeneratedColumn<String> _column_13(String aliasedName) =>
|
||||
i1.GeneratedColumn<String>(
|
||||
'account_id',
|
||||
aliasedName,
|
||||
false,
|
||||
type: i1.DriftSqlType.string,
|
||||
);
|
||||
i1.GeneratedColumn<String> _column_14(String aliasedName) =>
|
||||
i1.GeneratedColumn<String>(
|
||||
'account',
|
||||
aliasedName,
|
||||
false,
|
||||
type: i1.DriftSqlType.string,
|
||||
);
|
||||
i1.GeneratedColumn<String> _column_15(String aliasedName) =>
|
||||
i1.GeneratedColumn<String>(
|
||||
'nick',
|
||||
aliasedName,
|
||||
true,
|
||||
type: i1.DriftSqlType.string,
|
||||
);
|
||||
i1.GeneratedColumn<int> _column_16(String aliasedName) =>
|
||||
i1.GeneratedColumn<int>(
|
||||
'role',
|
||||
aliasedName,
|
||||
false,
|
||||
type: i1.DriftSqlType.int,
|
||||
);
|
||||
i1.GeneratedColumn<int> _column_17(String aliasedName) =>
|
||||
i1.GeneratedColumn<int>(
|
||||
'notify',
|
||||
aliasedName,
|
||||
false,
|
||||
type: i1.DriftSqlType.int,
|
||||
);
|
||||
i1.GeneratedColumn<DateTime> _column_18(String aliasedName) =>
|
||||
i1.GeneratedColumn<DateTime>(
|
||||
'joined_at',
|
||||
aliasedName,
|
||||
true,
|
||||
type: i1.DriftSqlType.dateTime,
|
||||
);
|
||||
i1.GeneratedColumn<DateTime> _column_19(String aliasedName) =>
|
||||
i1.GeneratedColumn<DateTime>(
|
||||
'break_until',
|
||||
aliasedName,
|
||||
true,
|
||||
type: i1.DriftSqlType.dateTime,
|
||||
);
|
||||
i1.GeneratedColumn<DateTime> _column_20(String aliasedName) =>
|
||||
i1.GeneratedColumn<DateTime>(
|
||||
'timeout_until',
|
||||
aliasedName,
|
||||
true,
|
||||
type: i1.DriftSqlType.dateTime,
|
||||
);
|
||||
i1.GeneratedColumn<bool> _column_21(String aliasedName) =>
|
||||
i1.GeneratedColumn<bool>(
|
||||
'is_bot',
|
||||
aliasedName,
|
||||
false,
|
||||
type: i1.DriftSqlType.bool,
|
||||
defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
|
||||
'CHECK ("is_bot" IN (0, 1))',
|
||||
),
|
||||
);
|
||||
i1.GeneratedColumn<String> _column_22(String aliasedName) =>
|
||||
i1.GeneratedColumn<String>(
|
||||
'status',
|
||||
aliasedName,
|
||||
true,
|
||||
type: i1.DriftSqlType.string,
|
||||
);
|
||||
i1.GeneratedColumn<DateTime> _column_23(String aliasedName) =>
|
||||
i1.GeneratedColumn<DateTime>(
|
||||
'last_typed',
|
||||
aliasedName,
|
||||
true,
|
||||
type: i1.DriftSqlType.dateTime,
|
||||
);
|
||||
|
||||
class Shape2 extends i0.VersionedTable {
|
||||
Shape2({required super.source, required super.alias}) : super.aliased();
|
||||
i1.GeneratedColumn<String> get id =>
|
||||
columnsByName['id']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<String> get roomId =>
|
||||
columnsByName['room_id']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<String> get senderId =>
|
||||
columnsByName['sender_id']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<String> get content =>
|
||||
columnsByName['content']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<String> get nonce =>
|
||||
columnsByName['nonce']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<String> get data =>
|
||||
columnsByName['data']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<DateTime> get createdAt =>
|
||||
columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
|
||||
i1.GeneratedColumn<int> get status =>
|
||||
columnsByName['status']! as i1.GeneratedColumn<int>;
|
||||
i1.GeneratedColumn<bool> get isDeleted =>
|
||||
columnsByName['is_deleted']! as i1.GeneratedColumn<bool>;
|
||||
i1.GeneratedColumn<DateTime> get updatedAt =>
|
||||
columnsByName['updated_at']! as i1.GeneratedColumn<DateTime>;
|
||||
i1.GeneratedColumn<DateTime> get deletedAt =>
|
||||
columnsByName['deleted_at']! as i1.GeneratedColumn<DateTime>;
|
||||
i1.GeneratedColumn<String> get type =>
|
||||
columnsByName['type']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<String> get meta =>
|
||||
columnsByName['meta']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<String> get membersMentioned =>
|
||||
columnsByName['members_mentioned']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<DateTime> get editedAt =>
|
||||
columnsByName['edited_at']! as i1.GeneratedColumn<DateTime>;
|
||||
i1.GeneratedColumn<String> get attachments =>
|
||||
columnsByName['attachments']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<String> get reactions =>
|
||||
columnsByName['reactions']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<String> get repliedMessageId =>
|
||||
columnsByName['replied_message_id']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<String> get forwardedMessageId =>
|
||||
columnsByName['forwarded_message_id']! as i1.GeneratedColumn<String>;
|
||||
}
|
||||
|
||||
i1.GeneratedColumn<String> _column_24(String aliasedName) =>
|
||||
i1.GeneratedColumn<String>(
|
||||
'room_id',
|
||||
aliasedName,
|
||||
false,
|
||||
type: i1.DriftSqlType.string,
|
||||
defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
|
||||
'REFERENCES chat_rooms (id)',
|
||||
),
|
||||
);
|
||||
i1.GeneratedColumn<String> _column_25(String aliasedName) =>
|
||||
i1.GeneratedColumn<String>(
|
||||
'sender_id',
|
||||
aliasedName,
|
||||
false,
|
||||
type: i1.DriftSqlType.string,
|
||||
defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
|
||||
'REFERENCES chat_members (id)',
|
||||
),
|
||||
);
|
||||
i1.GeneratedColumn<String> _column_26(String aliasedName) =>
|
||||
i1.GeneratedColumn<String>(
|
||||
'content',
|
||||
aliasedName,
|
||||
true,
|
||||
type: i1.DriftSqlType.string,
|
||||
);
|
||||
i1.GeneratedColumn<String> _column_27(String aliasedName) =>
|
||||
i1.GeneratedColumn<String>(
|
||||
'nonce',
|
||||
aliasedName,
|
||||
true,
|
||||
type: i1.DriftSqlType.string,
|
||||
);
|
||||
i1.GeneratedColumn<String> _column_28(String aliasedName) =>
|
||||
i1.GeneratedColumn<String>(
|
||||
'data',
|
||||
aliasedName,
|
||||
false,
|
||||
type: i1.DriftSqlType.string,
|
||||
);
|
||||
i1.GeneratedColumn<int> _column_29(String aliasedName) =>
|
||||
i1.GeneratedColumn<int>(
|
||||
'status',
|
||||
aliasedName,
|
||||
false,
|
||||
type: i1.DriftSqlType.int,
|
||||
);
|
||||
i1.GeneratedColumn<bool> _column_30(String aliasedName) =>
|
||||
i1.GeneratedColumn<bool>(
|
||||
'is_deleted',
|
||||
aliasedName,
|
||||
true,
|
||||
type: i1.DriftSqlType.bool,
|
||||
defaultConstraints: i1.GeneratedColumn.constraintIsAlways(
|
||||
'CHECK ("is_deleted" IN (0, 1))',
|
||||
),
|
||||
defaultValue: const CustomExpression('0'),
|
||||
);
|
||||
i1.GeneratedColumn<DateTime> _column_31(String aliasedName) =>
|
||||
i1.GeneratedColumn<DateTime>(
|
||||
'updated_at',
|
||||
aliasedName,
|
||||
true,
|
||||
type: i1.DriftSqlType.dateTime,
|
||||
);
|
||||
i1.GeneratedColumn<String> _column_32(String aliasedName) =>
|
||||
i1.GeneratedColumn<String>(
|
||||
'type',
|
||||
aliasedName,
|
||||
false,
|
||||
type: i1.DriftSqlType.string,
|
||||
defaultValue: const CustomExpression('\'text\''),
|
||||
);
|
||||
i1.GeneratedColumn<String> _column_33(String aliasedName) =>
|
||||
i1.GeneratedColumn<String>(
|
||||
'meta',
|
||||
aliasedName,
|
||||
false,
|
||||
type: i1.DriftSqlType.string,
|
||||
defaultValue: const CustomExpression('\'{}\''),
|
||||
);
|
||||
i1.GeneratedColumn<String> _column_34(String aliasedName) =>
|
||||
i1.GeneratedColumn<String>(
|
||||
'members_mentioned',
|
||||
aliasedName,
|
||||
false,
|
||||
type: i1.DriftSqlType.string,
|
||||
defaultValue: const CustomExpression('\'[]\''),
|
||||
);
|
||||
i1.GeneratedColumn<DateTime> _column_35(String aliasedName) =>
|
||||
i1.GeneratedColumn<DateTime>(
|
||||
'edited_at',
|
||||
aliasedName,
|
||||
true,
|
||||
type: i1.DriftSqlType.dateTime,
|
||||
);
|
||||
i1.GeneratedColumn<String> _column_36(String aliasedName) =>
|
||||
i1.GeneratedColumn<String>(
|
||||
'attachments',
|
||||
aliasedName,
|
||||
false,
|
||||
type: i1.DriftSqlType.string,
|
||||
defaultValue: const CustomExpression('\'[]\''),
|
||||
);
|
||||
i1.GeneratedColumn<String> _column_37(String aliasedName) =>
|
||||
i1.GeneratedColumn<String>(
|
||||
'reactions',
|
||||
aliasedName,
|
||||
false,
|
||||
type: i1.DriftSqlType.string,
|
||||
defaultValue: const CustomExpression('\'[]\''),
|
||||
);
|
||||
i1.GeneratedColumn<String> _column_38(String aliasedName) =>
|
||||
i1.GeneratedColumn<String>(
|
||||
'replied_message_id',
|
||||
aliasedName,
|
||||
true,
|
||||
type: i1.DriftSqlType.string,
|
||||
);
|
||||
i1.GeneratedColumn<String> _column_39(String aliasedName) =>
|
||||
i1.GeneratedColumn<String>(
|
||||
'forwarded_message_id',
|
||||
aliasedName,
|
||||
true,
|
||||
type: i1.DriftSqlType.string,
|
||||
);
|
||||
|
||||
class Shape3 extends i0.VersionedTable {
|
||||
Shape3({required super.source, required super.alias}) : super.aliased();
|
||||
i1.GeneratedColumn<String> get id =>
|
||||
columnsByName['id']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<String> get title =>
|
||||
columnsByName['title']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<String> get description =>
|
||||
columnsByName['description']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<String> get content =>
|
||||
columnsByName['content']! as i1.GeneratedColumn<String>;
|
||||
i1.GeneratedColumn<int> get visibility =>
|
||||
columnsByName['visibility']! as i1.GeneratedColumn<int>;
|
||||
i1.GeneratedColumn<int> get type =>
|
||||
columnsByName['type']! as i1.GeneratedColumn<int>;
|
||||
i1.GeneratedColumn<DateTime> get lastModified =>
|
||||
columnsByName['last_modified']! as i1.GeneratedColumn<DateTime>;
|
||||
i1.GeneratedColumn<String> get postData =>
|
||||
columnsByName['post_data']! as i1.GeneratedColumn<String>;
|
||||
}
|
||||
|
||||
i1.GeneratedColumn<String> _column_40(String aliasedName) =>
|
||||
i1.GeneratedColumn<String>(
|
||||
'title',
|
||||
aliasedName,
|
||||
true,
|
||||
type: i1.DriftSqlType.string,
|
||||
);
|
||||
i1.GeneratedColumn<int> _column_41(String aliasedName) =>
|
||||
i1.GeneratedColumn<int>(
|
||||
'visibility',
|
||||
aliasedName,
|
||||
false,
|
||||
type: i1.DriftSqlType.int,
|
||||
defaultValue: const CustomExpression('0'),
|
||||
);
|
||||
i1.GeneratedColumn<int> _column_42(String aliasedName) =>
|
||||
i1.GeneratedColumn<int>(
|
||||
'type',
|
||||
aliasedName,
|
||||
false,
|
||||
type: i1.DriftSqlType.int,
|
||||
defaultValue: const CustomExpression('0'),
|
||||
);
|
||||
i1.GeneratedColumn<DateTime> _column_43(String aliasedName) =>
|
||||
i1.GeneratedColumn<DateTime>(
|
||||
'last_modified',
|
||||
aliasedName,
|
||||
false,
|
||||
type: i1.DriftSqlType.dateTime,
|
||||
);
|
||||
i1.GeneratedColumn<String> _column_44(String aliasedName) =>
|
||||
i1.GeneratedColumn<String>(
|
||||
'post_data',
|
||||
aliasedName,
|
||||
false,
|
||||
type: i1.DriftSqlType.string,
|
||||
);
|
||||
i0.MigrationStepWithVersion migrationSteps({
|
||||
required Future<void> Function(i1.Migrator m, Schema7 schema) from6To7,
|
||||
}) {
|
||||
return (currentVersion, database) async {
|
||||
switch (currentVersion) {
|
||||
case 6:
|
||||
final schema = Schema7(database: database);
|
||||
final migrator = i1.Migrator(database, schema);
|
||||
await from6To7(migrator, schema);
|
||||
return 7;
|
||||
default:
|
||||
throw ArgumentError.value('Unknown migration from $currentVersion');
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
i1.OnUpgrade stepByStep({
|
||||
required Future<void> Function(i1.Migrator m, Schema7 schema) from6To7,
|
||||
}) => i0.VersionedSchema.stepByStepHelper(
|
||||
step: migrationSteps(from6To7: from6To7),
|
||||
);
|
||||
@@ -36,10 +36,71 @@ class ListMapConverter
|
||||
String toSql(List<Map<String, dynamic>> value) => json.encode(value);
|
||||
}
|
||||
|
||||
class Realms extends Table {
|
||||
TextColumn get id => text()();
|
||||
TextColumn get slug => text()();
|
||||
TextColumn get name => text().nullable()();
|
||||
TextColumn get description => text().nullable()();
|
||||
TextColumn get verifiedAs => text().nullable()();
|
||||
DateTimeColumn get verifiedAt => dateTime().nullable()();
|
||||
BoolColumn get isCommunity => boolean()();
|
||||
BoolColumn get isPublic => boolean()();
|
||||
TextColumn get picture => text().map(const MapConverter()).nullable()();
|
||||
TextColumn get background => text().map(const MapConverter()).nullable()();
|
||||
TextColumn get accountId => text().nullable()();
|
||||
DateTimeColumn get createdAt => dateTime()();
|
||||
DateTimeColumn get updatedAt => dateTime()();
|
||||
DateTimeColumn get deletedAt => dateTime().nullable()();
|
||||
|
||||
@override
|
||||
Set<Column> get primaryKey => {id};
|
||||
}
|
||||
|
||||
class ChatRooms extends Table {
|
||||
TextColumn get id => text()();
|
||||
TextColumn get name => text().nullable()();
|
||||
TextColumn get description => text().nullable()();
|
||||
IntColumn get type => integer()();
|
||||
BoolColumn get isPublic =>
|
||||
boolean().nullable().withDefault(const Constant(false))();
|
||||
BoolColumn get isCommunity =>
|
||||
boolean().nullable().withDefault(const Constant(false))();
|
||||
TextColumn get picture => text().map(const MapConverter()).nullable()();
|
||||
TextColumn get background => text().map(const MapConverter()).nullable()();
|
||||
TextColumn get realmId => text().references(Realms, #id).nullable()();
|
||||
TextColumn get accountId => text().nullable()();
|
||||
BoolColumn get isPinned =>
|
||||
boolean().nullable().withDefault(const Constant(false))();
|
||||
DateTimeColumn get createdAt => dateTime()();
|
||||
DateTimeColumn get updatedAt => dateTime()();
|
||||
DateTimeColumn get deletedAt => dateTime().nullable()();
|
||||
|
||||
@override
|
||||
Set<Column> get primaryKey => {id};
|
||||
}
|
||||
|
||||
class ChatMembers extends Table {
|
||||
TextColumn get id => text()();
|
||||
TextColumn get chatRoomId => text().references(ChatRooms, #id)();
|
||||
TextColumn get accountId => text()();
|
||||
TextColumn get account => text().map(const MapConverter())();
|
||||
TextColumn get nick => text().nullable()();
|
||||
IntColumn get notify => integer()();
|
||||
DateTimeColumn get joinedAt => dateTime().nullable()();
|
||||
DateTimeColumn get breakUntil => dateTime().nullable()();
|
||||
DateTimeColumn get timeoutUntil => dateTime().nullable()();
|
||||
DateTimeColumn get createdAt => dateTime()();
|
||||
DateTimeColumn get updatedAt => dateTime()();
|
||||
DateTimeColumn get deletedAt => dateTime().nullable()();
|
||||
|
||||
@override
|
||||
Set<Column> get primaryKey => {id};
|
||||
}
|
||||
|
||||
class ChatMessages extends Table {
|
||||
TextColumn get id => text()();
|
||||
TextColumn get roomId => text()();
|
||||
TextColumn get senderId => text()();
|
||||
TextColumn get roomId => text().references(ChatRooms, #id)();
|
||||
TextColumn get senderId => text().references(ChatMembers, #id)();
|
||||
TextColumn get content => text().nullable()();
|
||||
TextColumn get nonce => text().nullable()();
|
||||
TextColumn get data => text()();
|
||||
@@ -52,10 +113,9 @@ class ChatMessages extends Table {
|
||||
TextColumn get type => text().withDefault(const Constant('text'))();
|
||||
TextColumn get meta =>
|
||||
text().map(const MapConverter()).withDefault(const Constant('{}'))();
|
||||
TextColumn get membersMentioned =>
|
||||
text()
|
||||
.map(const ListStringConverter())
|
||||
.withDefault(const Constant('[]'))();
|
||||
TextColumn get membersMentioned => text()
|
||||
.map(const ListStringConverter())
|
||||
.withDefault(const Constant('[]'))();
|
||||
DateTimeColumn get editedAt => dateTime().nullable()();
|
||||
TextColumn get attachments =>
|
||||
text().map(const ListMapConverter()).withDefault(const Constant('[]'))();
|
||||
@@ -72,6 +132,7 @@ class LocalChatMessage {
|
||||
final String id;
|
||||
final String roomId;
|
||||
final String senderId;
|
||||
final SnChatMember? sender;
|
||||
final Map<String, dynamic> data;
|
||||
final DateTime createdAt;
|
||||
MessageStatus status;
|
||||
@@ -94,6 +155,7 @@ class LocalChatMessage {
|
||||
required this.id,
|
||||
required this.roomId,
|
||||
required this.senderId,
|
||||
required this.sender,
|
||||
required this.data,
|
||||
required this.createdAt,
|
||||
required this.nonce,
|
||||
@@ -114,7 +176,12 @@ class LocalChatMessage {
|
||||
});
|
||||
|
||||
SnChatMessage toRemoteMessage() {
|
||||
return SnChatMessage.fromJson(data);
|
||||
if (sender == null) {
|
||||
throw Exception('Cannot create remote message without sender');
|
||||
}
|
||||
final msgData = Map<String, dynamic>.from(data);
|
||||
msgData['sender'] = sender!.toJson();
|
||||
return SnChatMessage.fromJson(msgData);
|
||||
}
|
||||
|
||||
static LocalChatMessage fromRemoteMessage(
|
||||
@@ -122,11 +189,26 @@ class LocalChatMessage {
|
||||
MessageStatus status, {
|
||||
String? nonce,
|
||||
}) {
|
||||
final jsonData = message.toJson();
|
||||
jsonData.remove('sender');
|
||||
// Ensure proper defaults for collections to prevent type cast errors
|
||||
if (jsonData['meta'] == null) jsonData['meta'] = <String, dynamic>{};
|
||||
if (jsonData['members_mentioned'] == null) {
|
||||
jsonData['members_mentioned'] = <String>[];
|
||||
}
|
||||
if (jsonData['attachments'] == null) {
|
||||
jsonData['attachments'] = <Map<String, dynamic>>[];
|
||||
}
|
||||
if (jsonData['reactions'] == null) {
|
||||
jsonData['reactions'] = <Map<String, dynamic>>[];
|
||||
}
|
||||
final msgData = Map<String, dynamic>.from(jsonData);
|
||||
return LocalChatMessage(
|
||||
id: message.id,
|
||||
roomId: message.chatRoomId,
|
||||
senderId: message.senderId,
|
||||
data: message.toJson(),
|
||||
sender: message.sender,
|
||||
data: msgData,
|
||||
createdAt: message.createdAt,
|
||||
status: status,
|
||||
nonce: nonce ?? message.nonce,
|
||||
|
||||
@@ -9,6 +9,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:hotkey_manager/hotkey_manager.dart';
|
||||
import 'package:image_picker_android/image_picker_android.dart';
|
||||
import 'package:island/talker.dart';
|
||||
import 'package:island/firebase_options.dart';
|
||||
@@ -30,6 +31,7 @@ import 'package:talker_flutter/talker_flutter.dart';
|
||||
import 'package:talker_riverpod_logger/talker_riverpod_logger.dart';
|
||||
import 'package:url_launcher/url_launcher_string.dart';
|
||||
import 'package:window_manager/window_manager.dart';
|
||||
import 'package:protocol_handler/protocol_handler.dart';
|
||||
|
||||
@pragma('vm:entry-point')
|
||||
Future<void> _firebaseMessagingBackgroundHandler(RemoteMessage message) async {
|
||||
@@ -50,8 +52,17 @@ void main() async {
|
||||
GoRouter.optionURLReflectsImperativeAPIs = true;
|
||||
}
|
||||
|
||||
if (!kIsWeb && (Platform.isLinux || Platform.isMacOS || Platform.isWindows)) {
|
||||
talker.info("[SplashScreen] Initializing desktop window manager...");
|
||||
await protocolHandler.register('solian');
|
||||
await hotKeyManager.unregisterAll();
|
||||
talker.info("[SplashScreen] Desktop window manager is ready!");
|
||||
}
|
||||
|
||||
try {
|
||||
await EasyLocalization.ensureInitialized();
|
||||
// Disable logs
|
||||
EasyLocalization.logger.enableBuildModes = [];
|
||||
|
||||
if (kIsWeb || !Platform.isLinux) {
|
||||
await Firebase.initializeApp(
|
||||
@@ -202,7 +213,7 @@ class IslandApp extends HookConsumerWidget {
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final theme = ref.watch(themeProvider);
|
||||
final settings = ref.watch(appSettingsNotifierProvider);
|
||||
final settings = ref.watch(appSettingsProvider);
|
||||
|
||||
// Convert string theme mode to ThemeMode enum
|
||||
ThemeMode getThemeMode() {
|
||||
|
||||
@@ -12,18 +12,16 @@ _SnAbuseReport _$SnAbuseReportFromJson(Map<String, dynamic> json) =>
|
||||
resourceIdentifier: json['resource_identifier'] as String,
|
||||
type: (json['type'] as num).toInt(),
|
||||
reason: json['reason'] as String,
|
||||
resolvedAt:
|
||||
json['resolved_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['resolved_at'] as String),
|
||||
resolvedAt: json['resolved_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['resolved_at'] as String),
|
||||
resolution: json['resolution'] as String?,
|
||||
accountId: json['account_id'] as String,
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt:
|
||||
json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnAbuseReportToJson(_SnAbuseReport instance) =>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
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';
|
||||
@@ -20,6 +21,7 @@ sealed class SnAccount with _$SnAccount {
|
||||
required SnWalletSubscriptionRef? perkSubscription,
|
||||
@Default([]) List<SnAccountBadge> badges,
|
||||
@Default([]) List<SnContactMethod> contacts,
|
||||
required DateTime? activatedAt,
|
||||
required DateTime createdAt,
|
||||
required DateTime updatedAt,
|
||||
required DateTime? deletedAt,
|
||||
@@ -214,20 +216,20 @@ sealed class SnAuthDevice with _$SnAuthDevice {
|
||||
}
|
||||
|
||||
@freezed
|
||||
sealed class SnAuthDeviceWithChallenge with _$SnAuthDeviceWithChallenge {
|
||||
const factory SnAuthDeviceWithChallenge({
|
||||
sealed class SnAuthDeviceWithSession with _$SnAuthDeviceWithSession {
|
||||
const factory SnAuthDeviceWithSession({
|
||||
required String id,
|
||||
required String deviceId,
|
||||
required String deviceName,
|
||||
required String? deviceLabel,
|
||||
required String accountId,
|
||||
required int platform,
|
||||
required List<SnAuthChallenge> challenges,
|
||||
required List<SnAuthSession> sessions,
|
||||
@Default(false) bool isCurrent,
|
||||
}) = _SnAuthDeviceWithChallengee;
|
||||
}) = _SnAuthDeviceWithSessione;
|
||||
|
||||
factory SnAuthDeviceWithChallenge.fromJson(Map<String, dynamic> json) =>
|
||||
_$SnAuthDeviceWithChallengeFromJson(json);
|
||||
factory SnAuthDeviceWithSession.fromJson(Map<String, dynamic> json) =>
|
||||
_$SnAuthDeviceWithSessionFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
@@ -263,3 +265,15 @@ sealed class SnSocialCreditRecord with _$SnSocialCreditRecord {
|
||||
factory SnSocialCreditRecord.fromJson(Map<String, dynamic> json) =>
|
||||
_$SnSocialCreditRecordFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
sealed class SnFriendOverviewItem with _$SnFriendOverviewItem {
|
||||
const factory SnFriendOverviewItem({
|
||||
required SnAccount account,
|
||||
required SnAccountStatus status,
|
||||
required List<SnPresenceActivity> activities,
|
||||
}) = _SnFriendOverviewItem;
|
||||
|
||||
factory SnFriendOverviewItem.fromJson(Map<String, dynamic> json) =>
|
||||
_$SnFriendOverviewItemFromJson(json);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
|
||||
/// @nodoc
|
||||
mixin _$SnAccount {
|
||||
|
||||
String get id; String get name; String get nick; String get language; String get region; bool get isSuperuser; String? get automatedId; SnAccountProfile get profile; SnWalletSubscriptionRef? get perkSubscription; List<SnAccountBadge> get badges; List<SnContactMethod> get contacts; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt;
|
||||
String get id; String get name; String get nick; String get language; String get region; bool get isSuperuser; String? get automatedId; SnAccountProfile get profile; SnWalletSubscriptionRef? get perkSubscription; List<SnAccountBadge> get badges; List<SnContactMethod> get contacts; DateTime? get activatedAt; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt;
|
||||
/// Create a copy of SnAccount
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -28,16 +28,16 @@ $SnAccountCopyWith<SnAccount> get copyWith => _$SnAccountCopyWithImpl<SnAccount>
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnAccount&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.nick, nick) || other.nick == nick)&&(identical(other.language, language) || other.language == language)&&(identical(other.region, region) || other.region == region)&&(identical(other.isSuperuser, isSuperuser) || other.isSuperuser == isSuperuser)&&(identical(other.automatedId, automatedId) || other.automatedId == automatedId)&&(identical(other.profile, profile) || other.profile == profile)&&(identical(other.perkSubscription, perkSubscription) || other.perkSubscription == perkSubscription)&&const DeepCollectionEquality().equals(other.badges, badges)&&const DeepCollectionEquality().equals(other.contacts, contacts)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnAccount&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.nick, nick) || other.nick == nick)&&(identical(other.language, language) || other.language == language)&&(identical(other.region, region) || other.region == region)&&(identical(other.isSuperuser, isSuperuser) || other.isSuperuser == isSuperuser)&&(identical(other.automatedId, automatedId) || other.automatedId == automatedId)&&(identical(other.profile, profile) || other.profile == profile)&&(identical(other.perkSubscription, perkSubscription) || other.perkSubscription == perkSubscription)&&const DeepCollectionEquality().equals(other.badges, badges)&&const DeepCollectionEquality().equals(other.contacts, contacts)&&(identical(other.activatedAt, activatedAt) || other.activatedAt == activatedAt)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,name,nick,language,region,isSuperuser,automatedId,profile,perkSubscription,const DeepCollectionEquality().hash(badges),const DeepCollectionEquality().hash(contacts),createdAt,updatedAt,deletedAt);
|
||||
int get hashCode => Object.hash(runtimeType,id,name,nick,language,region,isSuperuser,automatedId,profile,perkSubscription,const DeepCollectionEquality().hash(badges),const DeepCollectionEquality().hash(contacts),activatedAt,createdAt,updatedAt,deletedAt);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnAccount(id: $id, name: $name, nick: $nick, language: $language, region: $region, isSuperuser: $isSuperuser, automatedId: $automatedId, profile: $profile, perkSubscription: $perkSubscription, badges: $badges, contacts: $contacts, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
||||
return 'SnAccount(id: $id, name: $name, nick: $nick, language: $language, region: $region, isSuperuser: $isSuperuser, automatedId: $automatedId, profile: $profile, perkSubscription: $perkSubscription, badges: $badges, contacts: $contacts, activatedAt: $activatedAt, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ abstract mixin class $SnAccountCopyWith<$Res> {
|
||||
factory $SnAccountCopyWith(SnAccount value, $Res Function(SnAccount) _then) = _$SnAccountCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String id, String name, String nick, String language, String region, bool isSuperuser, String? automatedId, SnAccountProfile profile, SnWalletSubscriptionRef? perkSubscription, List<SnAccountBadge> badges, List<SnContactMethod> contacts, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
||||
String id, String name, String nick, String language, String region, bool isSuperuser, String? automatedId, SnAccountProfile profile, SnWalletSubscriptionRef? perkSubscription, List<SnAccountBadge> badges, List<SnContactMethod> contacts, DateTime? activatedAt, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
||||
});
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ class _$SnAccountCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of SnAccount
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? name = null,Object? nick = null,Object? language = null,Object? region = null,Object? isSuperuser = null,Object? automatedId = freezed,Object? profile = null,Object? perkSubscription = freezed,Object? badges = null,Object? contacts = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? name = null,Object? nick = null,Object? language = null,Object? region = null,Object? isSuperuser = null,Object? automatedId = freezed,Object? profile = null,Object? perkSubscription = freezed,Object? badges = null,Object? contacts = null,Object? activatedAt = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||
@@ -78,7 +78,8 @@ as String?,profile: null == profile ? _self.profile : profile // ignore: cast_nu
|
||||
as SnAccountProfile,perkSubscription: freezed == perkSubscription ? _self.perkSubscription : perkSubscription // ignore: cast_nullable_to_non_nullable
|
||||
as SnWalletSubscriptionRef?,badges: null == badges ? _self.badges : badges // ignore: cast_nullable_to_non_nullable
|
||||
as List<SnAccountBadge>,contacts: null == contacts ? _self.contacts : contacts // ignore: cast_nullable_to_non_nullable
|
||||
as List<SnContactMethod>,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as List<SnContactMethod>,activatedAt: freezed == activatedAt ? _self.activatedAt : activatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
@@ -184,10 +185,10 @@ return $default(_that);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String name, String nick, String language, String region, bool isSuperuser, String? automatedId, SnAccountProfile profile, SnWalletSubscriptionRef? perkSubscription, List<SnAccountBadge> badges, List<SnContactMethod> contacts, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String name, String nick, String language, String region, bool isSuperuser, String? automatedId, SnAccountProfile profile, SnWalletSubscriptionRef? perkSubscription, List<SnAccountBadge> badges, List<SnContactMethod> contacts, DateTime? activatedAt, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnAccount() when $default != null:
|
||||
return $default(_that.id,_that.name,_that.nick,_that.language,_that.region,_that.isSuperuser,_that.automatedId,_that.profile,_that.perkSubscription,_that.badges,_that.contacts,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
|
||||
return $default(_that.id,_that.name,_that.nick,_that.language,_that.region,_that.isSuperuser,_that.automatedId,_that.profile,_that.perkSubscription,_that.badges,_that.contacts,_that.activatedAt,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
@@ -205,10 +206,10 @@ return $default(_that.id,_that.name,_that.nick,_that.language,_that.region,_that
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String name, String nick, String language, String region, bool isSuperuser, String? automatedId, SnAccountProfile profile, SnWalletSubscriptionRef? perkSubscription, List<SnAccountBadge> badges, List<SnContactMethod> contacts, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt) $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String name, String nick, String language, String region, bool isSuperuser, String? automatedId, SnAccountProfile profile, SnWalletSubscriptionRef? perkSubscription, List<SnAccountBadge> badges, List<SnContactMethod> contacts, DateTime? activatedAt, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnAccount():
|
||||
return $default(_that.id,_that.name,_that.nick,_that.language,_that.region,_that.isSuperuser,_that.automatedId,_that.profile,_that.perkSubscription,_that.badges,_that.contacts,_that.createdAt,_that.updatedAt,_that.deletedAt);}
|
||||
return $default(_that.id,_that.name,_that.nick,_that.language,_that.region,_that.isSuperuser,_that.automatedId,_that.profile,_that.perkSubscription,_that.badges,_that.contacts,_that.activatedAt,_that.createdAt,_that.updatedAt,_that.deletedAt);}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
@@ -222,10 +223,10 @@ return $default(_that.id,_that.name,_that.nick,_that.language,_that.region,_that
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String name, String nick, String language, String region, bool isSuperuser, String? automatedId, SnAccountProfile profile, SnWalletSubscriptionRef? perkSubscription, List<SnAccountBadge> badges, List<SnContactMethod> contacts, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String name, String nick, String language, String region, bool isSuperuser, String? automatedId, SnAccountProfile profile, SnWalletSubscriptionRef? perkSubscription, List<SnAccountBadge> badges, List<SnContactMethod> contacts, DateTime? activatedAt, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnAccount() when $default != null:
|
||||
return $default(_that.id,_that.name,_that.nick,_that.language,_that.region,_that.isSuperuser,_that.automatedId,_that.profile,_that.perkSubscription,_that.badges,_that.contacts,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
|
||||
return $default(_that.id,_that.name,_that.nick,_that.language,_that.region,_that.isSuperuser,_that.automatedId,_that.profile,_that.perkSubscription,_that.badges,_that.contacts,_that.activatedAt,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
@@ -237,7 +238,7 @@ return $default(_that.id,_that.name,_that.nick,_that.language,_that.region,_that
|
||||
@JsonSerializable()
|
||||
|
||||
class _SnAccount implements SnAccount {
|
||||
const _SnAccount({required this.id, required this.name, required this.nick, required this.language, this.region = "", required this.isSuperuser, required this.automatedId, required this.profile, required this.perkSubscription, final List<SnAccountBadge> badges = const [], final List<SnContactMethod> contacts = const [], required this.createdAt, required this.updatedAt, required this.deletedAt}): _badges = badges,_contacts = contacts;
|
||||
const _SnAccount({required this.id, required this.name, required this.nick, required this.language, this.region = "", required this.isSuperuser, required this.automatedId, required this.profile, required this.perkSubscription, final List<SnAccountBadge> badges = const [], final List<SnContactMethod> contacts = const [], required this.activatedAt, required this.createdAt, required this.updatedAt, required this.deletedAt}): _badges = badges,_contacts = contacts;
|
||||
factory _SnAccount.fromJson(Map<String, dynamic> json) => _$SnAccountFromJson(json);
|
||||
|
||||
@override final String id;
|
||||
@@ -263,6 +264,7 @@ class _SnAccount implements SnAccount {
|
||||
return EqualUnmodifiableListView(_contacts);
|
||||
}
|
||||
|
||||
@override final DateTime? activatedAt;
|
||||
@override final DateTime createdAt;
|
||||
@override final DateTime updatedAt;
|
||||
@override final DateTime? deletedAt;
|
||||
@@ -280,16 +282,16 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnAccount&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.nick, nick) || other.nick == nick)&&(identical(other.language, language) || other.language == language)&&(identical(other.region, region) || other.region == region)&&(identical(other.isSuperuser, isSuperuser) || other.isSuperuser == isSuperuser)&&(identical(other.automatedId, automatedId) || other.automatedId == automatedId)&&(identical(other.profile, profile) || other.profile == profile)&&(identical(other.perkSubscription, perkSubscription) || other.perkSubscription == perkSubscription)&&const DeepCollectionEquality().equals(other._badges, _badges)&&const DeepCollectionEquality().equals(other._contacts, _contacts)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnAccount&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.nick, nick) || other.nick == nick)&&(identical(other.language, language) || other.language == language)&&(identical(other.region, region) || other.region == region)&&(identical(other.isSuperuser, isSuperuser) || other.isSuperuser == isSuperuser)&&(identical(other.automatedId, automatedId) || other.automatedId == automatedId)&&(identical(other.profile, profile) || other.profile == profile)&&(identical(other.perkSubscription, perkSubscription) || other.perkSubscription == perkSubscription)&&const DeepCollectionEquality().equals(other._badges, _badges)&&const DeepCollectionEquality().equals(other._contacts, _contacts)&&(identical(other.activatedAt, activatedAt) || other.activatedAt == activatedAt)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,name,nick,language,region,isSuperuser,automatedId,profile,perkSubscription,const DeepCollectionEquality().hash(_badges),const DeepCollectionEquality().hash(_contacts),createdAt,updatedAt,deletedAt);
|
||||
int get hashCode => Object.hash(runtimeType,id,name,nick,language,region,isSuperuser,automatedId,profile,perkSubscription,const DeepCollectionEquality().hash(_badges),const DeepCollectionEquality().hash(_contacts),activatedAt,createdAt,updatedAt,deletedAt);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnAccount(id: $id, name: $name, nick: $nick, language: $language, region: $region, isSuperuser: $isSuperuser, automatedId: $automatedId, profile: $profile, perkSubscription: $perkSubscription, badges: $badges, contacts: $contacts, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
||||
return 'SnAccount(id: $id, name: $name, nick: $nick, language: $language, region: $region, isSuperuser: $isSuperuser, automatedId: $automatedId, profile: $profile, perkSubscription: $perkSubscription, badges: $badges, contacts: $contacts, activatedAt: $activatedAt, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
||||
}
|
||||
|
||||
|
||||
@@ -300,7 +302,7 @@ abstract mixin class _$SnAccountCopyWith<$Res> implements $SnAccountCopyWith<$Re
|
||||
factory _$SnAccountCopyWith(_SnAccount value, $Res Function(_SnAccount) _then) = __$SnAccountCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String id, String name, String nick, String language, String region, bool isSuperuser, String? automatedId, SnAccountProfile profile, SnWalletSubscriptionRef? perkSubscription, List<SnAccountBadge> badges, List<SnContactMethod> contacts, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
||||
String id, String name, String nick, String language, String region, bool isSuperuser, String? automatedId, SnAccountProfile profile, SnWalletSubscriptionRef? perkSubscription, List<SnAccountBadge> badges, List<SnContactMethod> contacts, DateTime? activatedAt, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
||||
});
|
||||
|
||||
|
||||
@@ -317,7 +319,7 @@ class __$SnAccountCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of SnAccount
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = null,Object? nick = null,Object? language = null,Object? region = null,Object? isSuperuser = null,Object? automatedId = freezed,Object? profile = null,Object? perkSubscription = freezed,Object? badges = null,Object? contacts = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = null,Object? nick = null,Object? language = null,Object? region = null,Object? isSuperuser = null,Object? automatedId = freezed,Object? profile = null,Object? perkSubscription = freezed,Object? badges = null,Object? contacts = null,Object? activatedAt = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
||||
return _then(_SnAccount(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||
@@ -330,7 +332,8 @@ as String?,profile: null == profile ? _self.profile : profile // ignore: cast_nu
|
||||
as SnAccountProfile,perkSubscription: freezed == perkSubscription ? _self.perkSubscription : perkSubscription // ignore: cast_nullable_to_non_nullable
|
||||
as SnWalletSubscriptionRef?,badges: null == badges ? _self._badges : badges // ignore: cast_nullable_to_non_nullable
|
||||
as List<SnAccountBadge>,contacts: null == contacts ? _self._contacts : contacts // ignore: cast_nullable_to_non_nullable
|
||||
as List<SnContactMethod>,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as List<SnContactMethod>,activatedAt: freezed == activatedAt ? _self.activatedAt : activatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
@@ -3065,51 +3068,51 @@ as bool,
|
||||
|
||||
}
|
||||
|
||||
SnAuthDeviceWithChallenge _$SnAuthDeviceWithChallengeFromJson(
|
||||
SnAuthDeviceWithSession _$SnAuthDeviceWithSessionFromJson(
|
||||
Map<String, dynamic> json
|
||||
) {
|
||||
return _SnAuthDeviceWithChallengee.fromJson(
|
||||
return _SnAuthDeviceWithSessione.fromJson(
|
||||
json
|
||||
);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$SnAuthDeviceWithChallenge {
|
||||
mixin _$SnAuthDeviceWithSession {
|
||||
|
||||
String get id; String get deviceId; String get deviceName; String? get deviceLabel; String get accountId; int get platform; List<SnAuthChallenge> get challenges; bool get isCurrent;
|
||||
/// Create a copy of SnAuthDeviceWithChallenge
|
||||
String get id; String get deviceId; String get deviceName; String? get deviceLabel; String get accountId; int get platform; List<SnAuthSession> get sessions; bool get isCurrent;
|
||||
/// Create a copy of SnAuthDeviceWithSession
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnAuthDeviceWithChallengeCopyWith<SnAuthDeviceWithChallenge> get copyWith => _$SnAuthDeviceWithChallengeCopyWithImpl<SnAuthDeviceWithChallenge>(this as SnAuthDeviceWithChallenge, _$identity);
|
||||
$SnAuthDeviceWithSessionCopyWith<SnAuthDeviceWithSession> get copyWith => _$SnAuthDeviceWithSessionCopyWithImpl<SnAuthDeviceWithSession>(this as SnAuthDeviceWithSession, _$identity);
|
||||
|
||||
/// Serializes this SnAuthDeviceWithChallenge to a JSON map.
|
||||
/// Serializes this SnAuthDeviceWithSession to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnAuthDeviceWithChallenge&&(identical(other.id, id) || other.id == id)&&(identical(other.deviceId, deviceId) || other.deviceId == deviceId)&&(identical(other.deviceName, deviceName) || other.deviceName == deviceName)&&(identical(other.deviceLabel, deviceLabel) || other.deviceLabel == deviceLabel)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.platform, platform) || other.platform == platform)&&const DeepCollectionEquality().equals(other.challenges, challenges)&&(identical(other.isCurrent, isCurrent) || other.isCurrent == isCurrent));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnAuthDeviceWithSession&&(identical(other.id, id) || other.id == id)&&(identical(other.deviceId, deviceId) || other.deviceId == deviceId)&&(identical(other.deviceName, deviceName) || other.deviceName == deviceName)&&(identical(other.deviceLabel, deviceLabel) || other.deviceLabel == deviceLabel)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.platform, platform) || other.platform == platform)&&const DeepCollectionEquality().equals(other.sessions, sessions)&&(identical(other.isCurrent, isCurrent) || other.isCurrent == isCurrent));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,deviceId,deviceName,deviceLabel,accountId,platform,const DeepCollectionEquality().hash(challenges),isCurrent);
|
||||
int get hashCode => Object.hash(runtimeType,id,deviceId,deviceName,deviceLabel,accountId,platform,const DeepCollectionEquality().hash(sessions),isCurrent);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnAuthDeviceWithChallenge(id: $id, deviceId: $deviceId, deviceName: $deviceName, deviceLabel: $deviceLabel, accountId: $accountId, platform: $platform, challenges: $challenges, isCurrent: $isCurrent)';
|
||||
return 'SnAuthDeviceWithSession(id: $id, deviceId: $deviceId, deviceName: $deviceName, deviceLabel: $deviceLabel, accountId: $accountId, platform: $platform, sessions: $sessions, isCurrent: $isCurrent)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $SnAuthDeviceWithChallengeCopyWith<$Res> {
|
||||
factory $SnAuthDeviceWithChallengeCopyWith(SnAuthDeviceWithChallenge value, $Res Function(SnAuthDeviceWithChallenge) _then) = _$SnAuthDeviceWithChallengeCopyWithImpl;
|
||||
abstract mixin class $SnAuthDeviceWithSessionCopyWith<$Res> {
|
||||
factory $SnAuthDeviceWithSessionCopyWith(SnAuthDeviceWithSession value, $Res Function(SnAuthDeviceWithSession) _then) = _$SnAuthDeviceWithSessionCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String id, String deviceId, String deviceName, String? deviceLabel, String accountId, int platform, List<SnAuthChallenge> challenges, bool isCurrent
|
||||
String id, String deviceId, String deviceName, String? deviceLabel, String accountId, int platform, List<SnAuthSession> sessions, bool isCurrent
|
||||
});
|
||||
|
||||
|
||||
@@ -3117,16 +3120,16 @@ $Res call({
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$SnAuthDeviceWithChallengeCopyWithImpl<$Res>
|
||||
implements $SnAuthDeviceWithChallengeCopyWith<$Res> {
|
||||
_$SnAuthDeviceWithChallengeCopyWithImpl(this._self, this._then);
|
||||
class _$SnAuthDeviceWithSessionCopyWithImpl<$Res>
|
||||
implements $SnAuthDeviceWithSessionCopyWith<$Res> {
|
||||
_$SnAuthDeviceWithSessionCopyWithImpl(this._self, this._then);
|
||||
|
||||
final SnAuthDeviceWithChallenge _self;
|
||||
final $Res Function(SnAuthDeviceWithChallenge) _then;
|
||||
final SnAuthDeviceWithSession _self;
|
||||
final $Res Function(SnAuthDeviceWithSession) _then;
|
||||
|
||||
/// Create a copy of SnAuthDeviceWithChallenge
|
||||
/// Create a copy of SnAuthDeviceWithSession
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? deviceId = null,Object? deviceName = null,Object? deviceLabel = freezed,Object? accountId = null,Object? platform = null,Object? challenges = null,Object? isCurrent = null,}) {
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? deviceId = null,Object? deviceName = null,Object? deviceLabel = freezed,Object? accountId = null,Object? platform = null,Object? sessions = null,Object? isCurrent = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,deviceId: null == deviceId ? _self.deviceId : deviceId // ignore: cast_nullable_to_non_nullable
|
||||
@@ -3134,8 +3137,8 @@ as String,deviceName: null == deviceName ? _self.deviceName : deviceName // igno
|
||||
as String,deviceLabel: freezed == deviceLabel ? _self.deviceLabel : deviceLabel // ignore: cast_nullable_to_non_nullable
|
||||
as String?,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
|
||||
as String,platform: null == platform ? _self.platform : platform // ignore: cast_nullable_to_non_nullable
|
||||
as int,challenges: null == challenges ? _self.challenges : challenges // ignore: cast_nullable_to_non_nullable
|
||||
as List<SnAuthChallenge>,isCurrent: null == isCurrent ? _self.isCurrent : isCurrent // ignore: cast_nullable_to_non_nullable
|
||||
as int,sessions: null == sessions ? _self.sessions : sessions // ignore: cast_nullable_to_non_nullable
|
||||
as List<SnAuthSession>,isCurrent: null == isCurrent ? _self.isCurrent : isCurrent // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
));
|
||||
}
|
||||
@@ -3143,8 +3146,8 @@ as bool,
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [SnAuthDeviceWithChallenge].
|
||||
extension SnAuthDeviceWithChallengePatterns on SnAuthDeviceWithChallenge {
|
||||
/// Adds pattern-matching-related methods to [SnAuthDeviceWithSession].
|
||||
extension SnAuthDeviceWithSessionPatterns on SnAuthDeviceWithSession {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
@@ -3157,10 +3160,10 @@ extension SnAuthDeviceWithChallengePatterns on SnAuthDeviceWithChallenge {
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _SnAuthDeviceWithChallengee value)? $default,{required TResult orElse(),}){
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _SnAuthDeviceWithSessione value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _SnAuthDeviceWithChallengee() when $default != null:
|
||||
case _SnAuthDeviceWithSessione() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
@@ -3179,10 +3182,10 @@ return $default(_that);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _SnAuthDeviceWithChallengee value) $default,){
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _SnAuthDeviceWithSessione value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _SnAuthDeviceWithChallengee():
|
||||
case _SnAuthDeviceWithSessione():
|
||||
return $default(_that);}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
@@ -3197,10 +3200,10 @@ return $default(_that);}
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _SnAuthDeviceWithChallengee value)? $default,){
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _SnAuthDeviceWithSessione value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _SnAuthDeviceWithChallengee() when $default != null:
|
||||
case _SnAuthDeviceWithSessione() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
@@ -3218,10 +3221,10 @@ return $default(_that);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String deviceId, String deviceName, String? deviceLabel, String accountId, int platform, List<SnAuthChallenge> challenges, bool isCurrent)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String deviceId, String deviceName, String? deviceLabel, String accountId, int platform, List<SnAuthSession> sessions, bool isCurrent)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnAuthDeviceWithChallengee() when $default != null:
|
||||
return $default(_that.id,_that.deviceId,_that.deviceName,_that.deviceLabel,_that.accountId,_that.platform,_that.challenges,_that.isCurrent);case _:
|
||||
case _SnAuthDeviceWithSessione() when $default != null:
|
||||
return $default(_that.id,_that.deviceId,_that.deviceName,_that.deviceLabel,_that.accountId,_that.platform,_that.sessions,_that.isCurrent);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
@@ -3239,10 +3242,10 @@ return $default(_that.id,_that.deviceId,_that.deviceName,_that.deviceLabel,_that
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String deviceId, String deviceName, String? deviceLabel, String accountId, int platform, List<SnAuthChallenge> challenges, bool isCurrent) $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String deviceId, String deviceName, String? deviceLabel, String accountId, int platform, List<SnAuthSession> sessions, bool isCurrent) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnAuthDeviceWithChallengee():
|
||||
return $default(_that.id,_that.deviceId,_that.deviceName,_that.deviceLabel,_that.accountId,_that.platform,_that.challenges,_that.isCurrent);}
|
||||
case _SnAuthDeviceWithSessione():
|
||||
return $default(_that.id,_that.deviceId,_that.deviceName,_that.deviceLabel,_that.accountId,_that.platform,_that.sessions,_that.isCurrent);}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
@@ -3256,10 +3259,10 @@ return $default(_that.id,_that.deviceId,_that.deviceName,_that.deviceLabel,_that
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String deviceId, String deviceName, String? deviceLabel, String accountId, int platform, List<SnAuthChallenge> challenges, bool isCurrent)? $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String deviceId, String deviceName, String? deviceLabel, String accountId, int platform, List<SnAuthSession> sessions, bool isCurrent)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnAuthDeviceWithChallengee() when $default != null:
|
||||
return $default(_that.id,_that.deviceId,_that.deviceName,_that.deviceLabel,_that.accountId,_that.platform,_that.challenges,_that.isCurrent);case _:
|
||||
case _SnAuthDeviceWithSessione() when $default != null:
|
||||
return $default(_that.id,_that.deviceId,_that.deviceName,_that.deviceLabel,_that.accountId,_that.platform,_that.sessions,_that.isCurrent);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
@@ -3270,9 +3273,9 @@ return $default(_that.id,_that.deviceId,_that.deviceName,_that.deviceLabel,_that
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _SnAuthDeviceWithChallengee implements SnAuthDeviceWithChallenge {
|
||||
const _SnAuthDeviceWithChallengee({required this.id, required this.deviceId, required this.deviceName, required this.deviceLabel, required this.accountId, required this.platform, required final List<SnAuthChallenge> challenges, this.isCurrent = false}): _challenges = challenges;
|
||||
factory _SnAuthDeviceWithChallengee.fromJson(Map<String, dynamic> json) => _$SnAuthDeviceWithChallengeeFromJson(json);
|
||||
class _SnAuthDeviceWithSessione implements SnAuthDeviceWithSession {
|
||||
const _SnAuthDeviceWithSessione({required this.id, required this.deviceId, required this.deviceName, required this.deviceLabel, required this.accountId, required this.platform, required final List<SnAuthSession> sessions, this.isCurrent = false}): _sessions = sessions;
|
||||
factory _SnAuthDeviceWithSessione.fromJson(Map<String, dynamic> json) => _$SnAuthDeviceWithSessioneFromJson(json);
|
||||
|
||||
@override final String id;
|
||||
@override final String deviceId;
|
||||
@@ -3280,49 +3283,49 @@ class _SnAuthDeviceWithChallengee implements SnAuthDeviceWithChallenge {
|
||||
@override final String? deviceLabel;
|
||||
@override final String accountId;
|
||||
@override final int platform;
|
||||
final List<SnAuthChallenge> _challenges;
|
||||
@override List<SnAuthChallenge> get challenges {
|
||||
if (_challenges is EqualUnmodifiableListView) return _challenges;
|
||||
final List<SnAuthSession> _sessions;
|
||||
@override List<SnAuthSession> get sessions {
|
||||
if (_sessions is EqualUnmodifiableListView) return _sessions;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_challenges);
|
||||
return EqualUnmodifiableListView(_sessions);
|
||||
}
|
||||
|
||||
@override@JsonKey() final bool isCurrent;
|
||||
|
||||
/// Create a copy of SnAuthDeviceWithChallenge
|
||||
/// Create a copy of SnAuthDeviceWithSession
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$SnAuthDeviceWithChallengeeCopyWith<_SnAuthDeviceWithChallengee> get copyWith => __$SnAuthDeviceWithChallengeeCopyWithImpl<_SnAuthDeviceWithChallengee>(this, _$identity);
|
||||
_$SnAuthDeviceWithSessioneCopyWith<_SnAuthDeviceWithSessione> get copyWith => __$SnAuthDeviceWithSessioneCopyWithImpl<_SnAuthDeviceWithSessione>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$SnAuthDeviceWithChallengeeToJson(this, );
|
||||
return _$SnAuthDeviceWithSessioneToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnAuthDeviceWithChallengee&&(identical(other.id, id) || other.id == id)&&(identical(other.deviceId, deviceId) || other.deviceId == deviceId)&&(identical(other.deviceName, deviceName) || other.deviceName == deviceName)&&(identical(other.deviceLabel, deviceLabel) || other.deviceLabel == deviceLabel)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.platform, platform) || other.platform == platform)&&const DeepCollectionEquality().equals(other._challenges, _challenges)&&(identical(other.isCurrent, isCurrent) || other.isCurrent == isCurrent));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnAuthDeviceWithSessione&&(identical(other.id, id) || other.id == id)&&(identical(other.deviceId, deviceId) || other.deviceId == deviceId)&&(identical(other.deviceName, deviceName) || other.deviceName == deviceName)&&(identical(other.deviceLabel, deviceLabel) || other.deviceLabel == deviceLabel)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.platform, platform) || other.platform == platform)&&const DeepCollectionEquality().equals(other._sessions, _sessions)&&(identical(other.isCurrent, isCurrent) || other.isCurrent == isCurrent));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,deviceId,deviceName,deviceLabel,accountId,platform,const DeepCollectionEquality().hash(_challenges),isCurrent);
|
||||
int get hashCode => Object.hash(runtimeType,id,deviceId,deviceName,deviceLabel,accountId,platform,const DeepCollectionEquality().hash(_sessions),isCurrent);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnAuthDeviceWithChallenge(id: $id, deviceId: $deviceId, deviceName: $deviceName, deviceLabel: $deviceLabel, accountId: $accountId, platform: $platform, challenges: $challenges, isCurrent: $isCurrent)';
|
||||
return 'SnAuthDeviceWithSession(id: $id, deviceId: $deviceId, deviceName: $deviceName, deviceLabel: $deviceLabel, accountId: $accountId, platform: $platform, sessions: $sessions, isCurrent: $isCurrent)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$SnAuthDeviceWithChallengeeCopyWith<$Res> implements $SnAuthDeviceWithChallengeCopyWith<$Res> {
|
||||
factory _$SnAuthDeviceWithChallengeeCopyWith(_SnAuthDeviceWithChallengee value, $Res Function(_SnAuthDeviceWithChallengee) _then) = __$SnAuthDeviceWithChallengeeCopyWithImpl;
|
||||
abstract mixin class _$SnAuthDeviceWithSessioneCopyWith<$Res> implements $SnAuthDeviceWithSessionCopyWith<$Res> {
|
||||
factory _$SnAuthDeviceWithSessioneCopyWith(_SnAuthDeviceWithSessione value, $Res Function(_SnAuthDeviceWithSessione) _then) = __$SnAuthDeviceWithSessioneCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String id, String deviceId, String deviceName, String? deviceLabel, String accountId, int platform, List<SnAuthChallenge> challenges, bool isCurrent
|
||||
String id, String deviceId, String deviceName, String? deviceLabel, String accountId, int platform, List<SnAuthSession> sessions, bool isCurrent
|
||||
});
|
||||
|
||||
|
||||
@@ -3330,25 +3333,25 @@ $Res call({
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$SnAuthDeviceWithChallengeeCopyWithImpl<$Res>
|
||||
implements _$SnAuthDeviceWithChallengeeCopyWith<$Res> {
|
||||
__$SnAuthDeviceWithChallengeeCopyWithImpl(this._self, this._then);
|
||||
class __$SnAuthDeviceWithSessioneCopyWithImpl<$Res>
|
||||
implements _$SnAuthDeviceWithSessioneCopyWith<$Res> {
|
||||
__$SnAuthDeviceWithSessioneCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _SnAuthDeviceWithChallengee _self;
|
||||
final $Res Function(_SnAuthDeviceWithChallengee) _then;
|
||||
final _SnAuthDeviceWithSessione _self;
|
||||
final $Res Function(_SnAuthDeviceWithSessione) _then;
|
||||
|
||||
/// Create a copy of SnAuthDeviceWithChallenge
|
||||
/// Create a copy of SnAuthDeviceWithSession
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? deviceId = null,Object? deviceName = null,Object? deviceLabel = freezed,Object? accountId = null,Object? platform = null,Object? challenges = null,Object? isCurrent = null,}) {
|
||||
return _then(_SnAuthDeviceWithChallengee(
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? deviceId = null,Object? deviceName = null,Object? deviceLabel = freezed,Object? accountId = null,Object? platform = null,Object? sessions = null,Object? isCurrent = null,}) {
|
||||
return _then(_SnAuthDeviceWithSessione(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,deviceId: null == deviceId ? _self.deviceId : deviceId // ignore: cast_nullable_to_non_nullable
|
||||
as String,deviceName: null == deviceName ? _self.deviceName : deviceName // ignore: cast_nullable_to_non_nullable
|
||||
as String,deviceLabel: freezed == deviceLabel ? _self.deviceLabel : deviceLabel // ignore: cast_nullable_to_non_nullable
|
||||
as String?,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
|
||||
as String,platform: null == platform ? _self.platform : platform // ignore: cast_nullable_to_non_nullable
|
||||
as int,challenges: null == challenges ? _self._challenges : challenges // ignore: cast_nullable_to_non_nullable
|
||||
as List<SnAuthChallenge>,isCurrent: null == isCurrent ? _self.isCurrent : isCurrent // ignore: cast_nullable_to_non_nullable
|
||||
as int,sessions: null == sessions ? _self._sessions : sessions // ignore: cast_nullable_to_non_nullable
|
||||
as List<SnAuthSession>,isCurrent: null == isCurrent ? _self.isCurrent : isCurrent // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
));
|
||||
}
|
||||
@@ -3912,4 +3915,309 @@ as DateTime?,
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// @nodoc
|
||||
mixin _$SnFriendOverviewItem {
|
||||
|
||||
SnAccount get account; SnAccountStatus get status; List<SnPresenceActivity> get activities;
|
||||
/// Create a copy of SnFriendOverviewItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnFriendOverviewItemCopyWith<SnFriendOverviewItem> get copyWith => _$SnFriendOverviewItemCopyWithImpl<SnFriendOverviewItem>(this as SnFriendOverviewItem, _$identity);
|
||||
|
||||
/// Serializes this SnFriendOverviewItem to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnFriendOverviewItem&&(identical(other.account, account) || other.account == account)&&(identical(other.status, status) || other.status == status)&&const DeepCollectionEquality().equals(other.activities, activities));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,account,status,const DeepCollectionEquality().hash(activities));
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnFriendOverviewItem(account: $account, status: $status, activities: $activities)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $SnFriendOverviewItemCopyWith<$Res> {
|
||||
factory $SnFriendOverviewItemCopyWith(SnFriendOverviewItem value, $Res Function(SnFriendOverviewItem) _then) = _$SnFriendOverviewItemCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
SnAccount account, SnAccountStatus status, List<SnPresenceActivity> activities
|
||||
});
|
||||
|
||||
|
||||
$SnAccountCopyWith<$Res> get account;$SnAccountStatusCopyWith<$Res> get status;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$SnFriendOverviewItemCopyWithImpl<$Res>
|
||||
implements $SnFriendOverviewItemCopyWith<$Res> {
|
||||
_$SnFriendOverviewItemCopyWithImpl(this._self, this._then);
|
||||
|
||||
final SnFriendOverviewItem _self;
|
||||
final $Res Function(SnFriendOverviewItem) _then;
|
||||
|
||||
/// Create a copy of SnFriendOverviewItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? account = null,Object? status = null,Object? activities = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
account: null == account ? _self.account : account // ignore: cast_nullable_to_non_nullable
|
||||
as SnAccount,status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
|
||||
as SnAccountStatus,activities: null == activities ? _self.activities : activities // ignore: cast_nullable_to_non_nullable
|
||||
as List<SnPresenceActivity>,
|
||||
));
|
||||
}
|
||||
/// Create a copy of SnFriendOverviewItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnAccountCopyWith<$Res> get account {
|
||||
|
||||
return $SnAccountCopyWith<$Res>(_self.account, (value) {
|
||||
return _then(_self.copyWith(account: value));
|
||||
});
|
||||
}/// Create a copy of SnFriendOverviewItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnAccountStatusCopyWith<$Res> get status {
|
||||
|
||||
return $SnAccountStatusCopyWith<$Res>(_self.status, (value) {
|
||||
return _then(_self.copyWith(status: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [SnFriendOverviewItem].
|
||||
extension SnFriendOverviewItemPatterns on SnFriendOverviewItem {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _SnFriendOverviewItem value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _SnFriendOverviewItem() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _SnFriendOverviewItem value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _SnFriendOverviewItem():
|
||||
return $default(_that);}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _SnFriendOverviewItem value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _SnFriendOverviewItem() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( SnAccount account, SnAccountStatus status, List<SnPresenceActivity> activities)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnFriendOverviewItem() when $default != null:
|
||||
return $default(_that.account,_that.status,_that.activities);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( SnAccount account, SnAccountStatus status, List<SnPresenceActivity> activities) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnFriendOverviewItem():
|
||||
return $default(_that.account,_that.status,_that.activities);}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( SnAccount account, SnAccountStatus status, List<SnPresenceActivity> activities)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnFriendOverviewItem() when $default != null:
|
||||
return $default(_that.account,_that.status,_that.activities);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _SnFriendOverviewItem implements SnFriendOverviewItem {
|
||||
const _SnFriendOverviewItem({required this.account, required this.status, required final List<SnPresenceActivity> activities}): _activities = activities;
|
||||
factory _SnFriendOverviewItem.fromJson(Map<String, dynamic> json) => _$SnFriendOverviewItemFromJson(json);
|
||||
|
||||
@override final SnAccount account;
|
||||
@override final SnAccountStatus status;
|
||||
final List<SnPresenceActivity> _activities;
|
||||
@override List<SnPresenceActivity> get activities {
|
||||
if (_activities is EqualUnmodifiableListView) return _activities;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_activities);
|
||||
}
|
||||
|
||||
|
||||
/// Create a copy of SnFriendOverviewItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$SnFriendOverviewItemCopyWith<_SnFriendOverviewItem> get copyWith => __$SnFriendOverviewItemCopyWithImpl<_SnFriendOverviewItem>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$SnFriendOverviewItemToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnFriendOverviewItem&&(identical(other.account, account) || other.account == account)&&(identical(other.status, status) || other.status == status)&&const DeepCollectionEquality().equals(other._activities, _activities));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,account,status,const DeepCollectionEquality().hash(_activities));
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnFriendOverviewItem(account: $account, status: $status, activities: $activities)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$SnFriendOverviewItemCopyWith<$Res> implements $SnFriendOverviewItemCopyWith<$Res> {
|
||||
factory _$SnFriendOverviewItemCopyWith(_SnFriendOverviewItem value, $Res Function(_SnFriendOverviewItem) _then) = __$SnFriendOverviewItemCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
SnAccount account, SnAccountStatus status, List<SnPresenceActivity> activities
|
||||
});
|
||||
|
||||
|
||||
@override $SnAccountCopyWith<$Res> get account;@override $SnAccountStatusCopyWith<$Res> get status;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$SnFriendOverviewItemCopyWithImpl<$Res>
|
||||
implements _$SnFriendOverviewItemCopyWith<$Res> {
|
||||
__$SnFriendOverviewItemCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _SnFriendOverviewItem _self;
|
||||
final $Res Function(_SnFriendOverviewItem) _then;
|
||||
|
||||
/// Create a copy of SnFriendOverviewItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? account = null,Object? status = null,Object? activities = null,}) {
|
||||
return _then(_SnFriendOverviewItem(
|
||||
account: null == account ? _self.account : account // ignore: cast_nullable_to_non_nullable
|
||||
as SnAccount,status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
|
||||
as SnAccountStatus,activities: null == activities ? _self._activities : activities // ignore: cast_nullable_to_non_nullable
|
||||
as List<SnPresenceActivity>,
|
||||
));
|
||||
}
|
||||
|
||||
/// Create a copy of SnFriendOverviewItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnAccountCopyWith<$Res> get account {
|
||||
|
||||
return $SnAccountCopyWith<$Res>(_self.account, (value) {
|
||||
return _then(_self.copyWith(account: value));
|
||||
});
|
||||
}/// Create a copy of SnFriendOverviewItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnAccountStatusCopyWith<$Res> get status {
|
||||
|
||||
return $SnAccountStatusCopyWith<$Res>(_self.status, (value) {
|
||||
return _then(_self.copyWith(status: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// dart format on
|
||||
|
||||
@@ -15,12 +15,11 @@ _SnAccount _$SnAccountFromJson(Map<String, dynamic> json) => _SnAccount(
|
||||
isSuperuser: json['is_superuser'] as bool,
|
||||
automatedId: json['automated_id'] as String?,
|
||||
profile: SnAccountProfile.fromJson(json['profile'] as Map<String, dynamic>),
|
||||
perkSubscription:
|
||||
json['perk_subscription'] == null
|
||||
? null
|
||||
: SnWalletSubscriptionRef.fromJson(
|
||||
json['perk_subscription'] as Map<String, dynamic>,
|
||||
),
|
||||
perkSubscription: json['perk_subscription'] == null
|
||||
? null
|
||||
: SnWalletSubscriptionRef.fromJson(
|
||||
json['perk_subscription'] as Map<String, dynamic>,
|
||||
),
|
||||
badges:
|
||||
(json['badges'] as List<dynamic>?)
|
||||
?.map((e) => SnAccountBadge.fromJson(e as Map<String, dynamic>))
|
||||
@@ -31,12 +30,14 @@ _SnAccount _$SnAccountFromJson(Map<String, dynamic> json) => _SnAccount(
|
||||
?.map((e) => SnContactMethod.fromJson(e as Map<String, dynamic>))
|
||||
.toList() ??
|
||||
const [],
|
||||
activatedAt: json['activated_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['activated_at'] as String),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt:
|
||||
json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnAccountToJson(_SnAccount instance) =>
|
||||
@@ -52,6 +53,7 @@ Map<String, dynamic> _$SnAccountToJson(_SnAccount instance) =>
|
||||
'perk_subscription': instance.perkSubscription?.toJson(),
|
||||
'badges': instance.badges.map((e) => e.toJson()).toList(),
|
||||
'contacts': instance.contacts.map((e) => e.toJson()).toList(),
|
||||
'activated_at': instance.activatedAt?.toIso8601String(),
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
'deleted_at': instance.deletedAt?.toIso8601String(),
|
||||
@@ -68,8 +70,9 @@ _UsernameColor _$UsernameColorFromJson(Map<String, dynamic> json) =>
|
||||
type: json['type'] as String? ?? 'plain',
|
||||
value: json['value'] as String?,
|
||||
direction: json['direction'] as String?,
|
||||
colors:
|
||||
(json['colors'] as List<dynamic>?)?.map((e) => e as String).toList(),
|
||||
colors: (json['colors'] as List<dynamic>?)
|
||||
?.map((e) => e as String)
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$UsernameColorToJson(_UsernameColor instance) =>
|
||||
@@ -80,69 +83,55 @@ Map<String, dynamic> _$UsernameColorToJson(_UsernameColor instance) =>
|
||||
'colors': instance.colors,
|
||||
};
|
||||
|
||||
_SnAccountProfile _$SnAccountProfileFromJson(Map<String, dynamic> json) =>
|
||||
_SnAccountProfile(
|
||||
id: json['id'] as String,
|
||||
firstName: json['first_name'] as String? ?? '',
|
||||
middleName: json['middle_name'] as String? ?? '',
|
||||
lastName: json['last_name'] as String? ?? '',
|
||||
bio: json['bio'] as String? ?? '',
|
||||
gender: json['gender'] as String? ?? '',
|
||||
pronouns: json['pronouns'] as String? ?? '',
|
||||
location: json['location'] as String? ?? '',
|
||||
timeZone: json['time_zone'] as String? ?? '',
|
||||
birthday:
|
||||
json['birthday'] == null
|
||||
? null
|
||||
: DateTime.parse(json['birthday'] as String),
|
||||
links:
|
||||
json['links'] == null
|
||||
? const []
|
||||
: const ProfileLinkConverter().fromJson(json['links']),
|
||||
lastSeenAt:
|
||||
json['last_seen_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['last_seen_at'] as String),
|
||||
activeBadge:
|
||||
json['active_badge'] == null
|
||||
? null
|
||||
: SnAccountBadge.fromJson(
|
||||
json['active_badge'] as Map<String, dynamic>,
|
||||
),
|
||||
experience: (json['experience'] as num).toInt(),
|
||||
level: (json['level'] as num).toInt(),
|
||||
socialCredits: (json['social_credits'] as num?)?.toDouble() ?? 100,
|
||||
socialCreditsLevel: (json['social_credits_level'] as num?)?.toInt() ?? 0,
|
||||
levelingProgress: (json['leveling_progress'] as num).toDouble(),
|
||||
picture:
|
||||
json['picture'] == null
|
||||
? null
|
||||
: SnCloudFile.fromJson(json['picture'] as Map<String, dynamic>),
|
||||
background:
|
||||
json['background'] == null
|
||||
? null
|
||||
: SnCloudFile.fromJson(
|
||||
json['background'] as Map<String, dynamic>,
|
||||
),
|
||||
verification:
|
||||
json['verification'] == null
|
||||
? null
|
||||
: SnVerificationMark.fromJson(
|
||||
json['verification'] as Map<String, dynamic>,
|
||||
),
|
||||
usernameColor:
|
||||
json['username_color'] == null
|
||||
? null
|
||||
: UsernameColor.fromJson(
|
||||
json['username_color'] as Map<String, dynamic>,
|
||||
),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt:
|
||||
json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
);
|
||||
_SnAccountProfile _$SnAccountProfileFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _SnAccountProfile(
|
||||
id: json['id'] as String,
|
||||
firstName: json['first_name'] as String? ?? '',
|
||||
middleName: json['middle_name'] as String? ?? '',
|
||||
lastName: json['last_name'] as String? ?? '',
|
||||
bio: json['bio'] as String? ?? '',
|
||||
gender: json['gender'] as String? ?? '',
|
||||
pronouns: json['pronouns'] as String? ?? '',
|
||||
location: json['location'] as String? ?? '',
|
||||
timeZone: json['time_zone'] as String? ?? '',
|
||||
birthday: json['birthday'] == null
|
||||
? null
|
||||
: DateTime.parse(json['birthday'] as String),
|
||||
links: json['links'] == null
|
||||
? const []
|
||||
: const ProfileLinkConverter().fromJson(json['links']),
|
||||
lastSeenAt: json['last_seen_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['last_seen_at'] as String),
|
||||
activeBadge: json['active_badge'] == null
|
||||
? null
|
||||
: SnAccountBadge.fromJson(json['active_badge'] as Map<String, dynamic>),
|
||||
experience: (json['experience'] as num).toInt(),
|
||||
level: (json['level'] as num).toInt(),
|
||||
socialCredits: (json['social_credits'] as num?)?.toDouble() ?? 100,
|
||||
socialCreditsLevel: (json['social_credits_level'] as num?)?.toInt() ?? 0,
|
||||
levelingProgress: (json['leveling_progress'] as num).toDouble(),
|
||||
picture: json['picture'] == null
|
||||
? null
|
||||
: SnCloudFile.fromJson(json['picture'] as Map<String, dynamic>),
|
||||
background: json['background'] == null
|
||||
? null
|
||||
: SnCloudFile.fromJson(json['background'] as Map<String, dynamic>),
|
||||
verification: json['verification'] == null
|
||||
? null
|
||||
: SnVerificationMark.fromJson(
|
||||
json['verification'] as Map<String, dynamic>,
|
||||
),
|
||||
usernameColor: json['username_color'] == null
|
||||
? null
|
||||
: UsernameColor.fromJson(json['username_color'] as Map<String, dynamic>),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnAccountProfileToJson(_SnAccountProfile instance) =>
|
||||
<String, dynamic>{
|
||||
@@ -183,17 +172,15 @@ _SnAccountStatus _$SnAccountStatusFromJson(Map<String, dynamic> json) =>
|
||||
isCustomized: json['is_customized'] as bool,
|
||||
label: json['label'] as String? ?? "",
|
||||
meta: json['meta'] as Map<String, dynamic>?,
|
||||
clearedAt:
|
||||
json['cleared_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['cleared_at'] as String),
|
||||
clearedAt: json['cleared_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['cleared_at'] as String),
|
||||
accountId: json['account_id'] as String,
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt:
|
||||
json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnAccountStatusToJson(_SnAccountStatus instance) =>
|
||||
@@ -220,21 +207,18 @@ _SnAccountBadge _$SnAccountBadgeFromJson(Map<String, dynamic> json) =>
|
||||
label: json['label'] as String?,
|
||||
caption: json['caption'] as String?,
|
||||
meta: json['meta'] as Map<String, dynamic>,
|
||||
expiredAt:
|
||||
json['expired_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['expired_at'] as String),
|
||||
expiredAt: json['expired_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['expired_at'] as String),
|
||||
accountId: json['account_id'] as String,
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
activatedAt:
|
||||
json['activated_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['activated_at'] as String),
|
||||
deletedAt:
|
||||
json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
activatedAt: json['activated_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['activated_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnAccountBadgeToJson(_SnAccountBadge instance) =>
|
||||
@@ -256,20 +240,18 @@ _SnContactMethod _$SnContactMethodFromJson(Map<String, dynamic> json) =>
|
||||
_SnContactMethod(
|
||||
id: json['id'] as String,
|
||||
type: (json['type'] as num).toInt(),
|
||||
verifiedAt:
|
||||
json['verified_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['verified_at'] as String),
|
||||
verifiedAt: json['verified_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['verified_at'] as String),
|
||||
isPrimary: json['is_primary'] as bool,
|
||||
isPublic: json['is_public'] as bool,
|
||||
content: json['content'] as String,
|
||||
accountId: json['account_id'] as String,
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt:
|
||||
json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnContactMethodToJson(_SnContactMethod instance) =>
|
||||
@@ -290,10 +272,9 @@ _SnNotification _$SnNotificationFromJson(Map<String, dynamic> json) =>
|
||||
_SnNotification(
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt:
|
||||
json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
id: json['id'] as String,
|
||||
topic: json['topic'] as String,
|
||||
title: json['title'] as String,
|
||||
@@ -301,10 +282,9 @@ _SnNotification _$SnNotificationFromJson(Map<String, dynamic> json) =>
|
||||
content: json['content'] as String,
|
||||
meta: json['meta'] as Map<String, dynamic>? ?? const {},
|
||||
priority: (json['priority'] as num).toInt(),
|
||||
viewedAt:
|
||||
json['viewed_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['viewed_at'] as String),
|
||||
viewedAt: json['viewed_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['viewed_at'] as String),
|
||||
accountId: json['account_id'] as String,
|
||||
);
|
||||
|
||||
@@ -362,24 +342,23 @@ Map<String, dynamic> _$SnAuthDeviceToJson(_SnAuthDevice instance) =>
|
||||
'is_current': instance.isCurrent,
|
||||
};
|
||||
|
||||
_SnAuthDeviceWithChallengee _$SnAuthDeviceWithChallengeeFromJson(
|
||||
_SnAuthDeviceWithSessione _$SnAuthDeviceWithSessioneFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _SnAuthDeviceWithChallengee(
|
||||
) => _SnAuthDeviceWithSessione(
|
||||
id: json['id'] as String,
|
||||
deviceId: json['device_id'] as String,
|
||||
deviceName: json['device_name'] as String,
|
||||
deviceLabel: json['device_label'] as String?,
|
||||
accountId: json['account_id'] as String,
|
||||
platform: (json['platform'] as num).toInt(),
|
||||
challenges:
|
||||
(json['challenges'] as List<dynamic>)
|
||||
.map((e) => SnAuthChallenge.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
sessions: (json['sessions'] as List<dynamic>)
|
||||
.map((e) => SnAuthSession.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
isCurrent: json['is_current'] as bool? ?? false,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnAuthDeviceWithChallengeeToJson(
|
||||
_SnAuthDeviceWithChallengee instance,
|
||||
Map<String, dynamic> _$SnAuthDeviceWithSessioneToJson(
|
||||
_SnAuthDeviceWithSessione instance,
|
||||
) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'device_id': instance.deviceId,
|
||||
@@ -387,7 +366,7 @@ Map<String, dynamic> _$SnAuthDeviceWithChallengeeToJson(
|
||||
'device_label': instance.deviceLabel,
|
||||
'account_id': instance.accountId,
|
||||
'platform': instance.platform,
|
||||
'challenges': instance.challenges.map((e) => e.toJson()).toList(),
|
||||
'sessions': instance.sessions.map((e) => e.toJson()).toList(),
|
||||
'is_current': instance.isCurrent,
|
||||
};
|
||||
|
||||
@@ -400,10 +379,9 @@ _SnExperienceRecord _$SnExperienceRecordFromJson(Map<String, dynamic> json) =>
|
||||
bonusMultiplier: (json['bonus_multiplier'] as num?)?.toDouble() ?? 1.0,
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt:
|
||||
json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnExperienceRecordToJson(_SnExperienceRecord instance) =>
|
||||
@@ -425,16 +403,14 @@ _SnSocialCreditRecord _$SnSocialCreditRecordFromJson(
|
||||
delta: (json['delta'] as num).toDouble(),
|
||||
reasonType: json['reason_type'] as String,
|
||||
reason: json['reason'] as String,
|
||||
expiredAt:
|
||||
json['expired_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['expired_at'] as String),
|
||||
expiredAt: json['expired_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['expired_at'] as String),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt:
|
||||
json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnSocialCreditRecordToJson(
|
||||
@@ -449,3 +425,21 @@ Map<String, dynamic> _$SnSocialCreditRecordToJson(
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
'deleted_at': instance.deletedAt?.toIso8601String(),
|
||||
};
|
||||
|
||||
_SnFriendOverviewItem _$SnFriendOverviewItemFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _SnFriendOverviewItem(
|
||||
account: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
||||
status: SnAccountStatus.fromJson(json['status'] as Map<String, dynamic>),
|
||||
activities: (json['activities'] as List<dynamic>)
|
||||
.map((e) => SnPresenceActivity.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnFriendOverviewItemToJson(
|
||||
_SnFriendOverviewItem instance,
|
||||
) => <String, dynamic>{
|
||||
'account': instance.account.toJson(),
|
||||
'status': instance.status.toJson(),
|
||||
'activities': instance.activities.map((e) => e.toJson()).toList(),
|
||||
};
|
||||
|
||||
@@ -10,7 +10,8 @@ sealed class SnNotableDay with _$SnNotableDay {
|
||||
required DateTime date,
|
||||
required String localName,
|
||||
required String globalName,
|
||||
required String countryCode,
|
||||
required String? countryCode,
|
||||
required String? localizableKey,
|
||||
required List<int> holidays,
|
||||
}) = _SnNotableDay;
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
|
||||
/// @nodoc
|
||||
mixin _$SnNotableDay {
|
||||
|
||||
DateTime get date; String get localName; String get globalName; String get countryCode; List<int> get holidays;
|
||||
DateTime get date; String get localName; String get globalName; String? get countryCode; String? get localizableKey; List<int> get holidays;
|
||||
/// Create a copy of SnNotableDay
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -28,16 +28,16 @@ $SnNotableDayCopyWith<SnNotableDay> get copyWith => _$SnNotableDayCopyWithImpl<S
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnNotableDay&&(identical(other.date, date) || other.date == date)&&(identical(other.localName, localName) || other.localName == localName)&&(identical(other.globalName, globalName) || other.globalName == globalName)&&(identical(other.countryCode, countryCode) || other.countryCode == countryCode)&&const DeepCollectionEquality().equals(other.holidays, holidays));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnNotableDay&&(identical(other.date, date) || other.date == date)&&(identical(other.localName, localName) || other.localName == localName)&&(identical(other.globalName, globalName) || other.globalName == globalName)&&(identical(other.countryCode, countryCode) || other.countryCode == countryCode)&&(identical(other.localizableKey, localizableKey) || other.localizableKey == localizableKey)&&const DeepCollectionEquality().equals(other.holidays, holidays));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,date,localName,globalName,countryCode,const DeepCollectionEquality().hash(holidays));
|
||||
int get hashCode => Object.hash(runtimeType,date,localName,globalName,countryCode,localizableKey,const DeepCollectionEquality().hash(holidays));
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnNotableDay(date: $date, localName: $localName, globalName: $globalName, countryCode: $countryCode, holidays: $holidays)';
|
||||
return 'SnNotableDay(date: $date, localName: $localName, globalName: $globalName, countryCode: $countryCode, localizableKey: $localizableKey, holidays: $holidays)';
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ abstract mixin class $SnNotableDayCopyWith<$Res> {
|
||||
factory $SnNotableDayCopyWith(SnNotableDay value, $Res Function(SnNotableDay) _then) = _$SnNotableDayCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
DateTime date, String localName, String globalName, String countryCode, List<int> holidays
|
||||
DateTime date, String localName, String globalName, String? countryCode, String? localizableKey, List<int> holidays
|
||||
});
|
||||
|
||||
|
||||
@@ -65,13 +65,14 @@ class _$SnNotableDayCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of SnNotableDay
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? date = null,Object? localName = null,Object? globalName = null,Object? countryCode = null,Object? holidays = null,}) {
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? date = null,Object? localName = null,Object? globalName = null,Object? countryCode = freezed,Object? localizableKey = freezed,Object? holidays = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
date: null == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,localName: null == localName ? _self.localName : localName // ignore: cast_nullable_to_non_nullable
|
||||
as String,globalName: null == globalName ? _self.globalName : globalName // ignore: cast_nullable_to_non_nullable
|
||||
as String,countryCode: null == countryCode ? _self.countryCode : countryCode // ignore: cast_nullable_to_non_nullable
|
||||
as String,holidays: null == holidays ? _self.holidays : holidays // ignore: cast_nullable_to_non_nullable
|
||||
as String,countryCode: freezed == countryCode ? _self.countryCode : countryCode // ignore: cast_nullable_to_non_nullable
|
||||
as String?,localizableKey: freezed == localizableKey ? _self.localizableKey : localizableKey // ignore: cast_nullable_to_non_nullable
|
||||
as String?,holidays: null == holidays ? _self.holidays : holidays // ignore: cast_nullable_to_non_nullable
|
||||
as List<int>,
|
||||
));
|
||||
}
|
||||
@@ -154,10 +155,10 @@ return $default(_that);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( DateTime date, String localName, String globalName, String countryCode, List<int> holidays)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( DateTime date, String localName, String globalName, String? countryCode, String? localizableKey, List<int> holidays)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnNotableDay() when $default != null:
|
||||
return $default(_that.date,_that.localName,_that.globalName,_that.countryCode,_that.holidays);case _:
|
||||
return $default(_that.date,_that.localName,_that.globalName,_that.countryCode,_that.localizableKey,_that.holidays);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
@@ -175,10 +176,10 @@ return $default(_that.date,_that.localName,_that.globalName,_that.countryCode,_t
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( DateTime date, String localName, String globalName, String countryCode, List<int> holidays) $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( DateTime date, String localName, String globalName, String? countryCode, String? localizableKey, List<int> holidays) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnNotableDay():
|
||||
return $default(_that.date,_that.localName,_that.globalName,_that.countryCode,_that.holidays);}
|
||||
return $default(_that.date,_that.localName,_that.globalName,_that.countryCode,_that.localizableKey,_that.holidays);}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
@@ -192,10 +193,10 @@ return $default(_that.date,_that.localName,_that.globalName,_that.countryCode,_t
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( DateTime date, String localName, String globalName, String countryCode, List<int> holidays)? $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( DateTime date, String localName, String globalName, String? countryCode, String? localizableKey, List<int> holidays)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnNotableDay() when $default != null:
|
||||
return $default(_that.date,_that.localName,_that.globalName,_that.countryCode,_that.holidays);case _:
|
||||
return $default(_that.date,_that.localName,_that.globalName,_that.countryCode,_that.localizableKey,_that.holidays);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
@@ -207,13 +208,14 @@ return $default(_that.date,_that.localName,_that.globalName,_that.countryCode,_t
|
||||
@JsonSerializable()
|
||||
|
||||
class _SnNotableDay implements SnNotableDay {
|
||||
const _SnNotableDay({required this.date, required this.localName, required this.globalName, required this.countryCode, required final List<int> holidays}): _holidays = holidays;
|
||||
const _SnNotableDay({required this.date, required this.localName, required this.globalName, required this.countryCode, required this.localizableKey, required final List<int> holidays}): _holidays = holidays;
|
||||
factory _SnNotableDay.fromJson(Map<String, dynamic> json) => _$SnNotableDayFromJson(json);
|
||||
|
||||
@override final DateTime date;
|
||||
@override final String localName;
|
||||
@override final String globalName;
|
||||
@override final String countryCode;
|
||||
@override final String? countryCode;
|
||||
@override final String? localizableKey;
|
||||
final List<int> _holidays;
|
||||
@override List<int> get holidays {
|
||||
if (_holidays is EqualUnmodifiableListView) return _holidays;
|
||||
@@ -235,16 +237,16 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnNotableDay&&(identical(other.date, date) || other.date == date)&&(identical(other.localName, localName) || other.localName == localName)&&(identical(other.globalName, globalName) || other.globalName == globalName)&&(identical(other.countryCode, countryCode) || other.countryCode == countryCode)&&const DeepCollectionEquality().equals(other._holidays, _holidays));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnNotableDay&&(identical(other.date, date) || other.date == date)&&(identical(other.localName, localName) || other.localName == localName)&&(identical(other.globalName, globalName) || other.globalName == globalName)&&(identical(other.countryCode, countryCode) || other.countryCode == countryCode)&&(identical(other.localizableKey, localizableKey) || other.localizableKey == localizableKey)&&const DeepCollectionEquality().equals(other._holidays, _holidays));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,date,localName,globalName,countryCode,const DeepCollectionEquality().hash(_holidays));
|
||||
int get hashCode => Object.hash(runtimeType,date,localName,globalName,countryCode,localizableKey,const DeepCollectionEquality().hash(_holidays));
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnNotableDay(date: $date, localName: $localName, globalName: $globalName, countryCode: $countryCode, holidays: $holidays)';
|
||||
return 'SnNotableDay(date: $date, localName: $localName, globalName: $globalName, countryCode: $countryCode, localizableKey: $localizableKey, holidays: $holidays)';
|
||||
}
|
||||
|
||||
|
||||
@@ -255,7 +257,7 @@ abstract mixin class _$SnNotableDayCopyWith<$Res> implements $SnNotableDayCopyWi
|
||||
factory _$SnNotableDayCopyWith(_SnNotableDay value, $Res Function(_SnNotableDay) _then) = __$SnNotableDayCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
DateTime date, String localName, String globalName, String countryCode, List<int> holidays
|
||||
DateTime date, String localName, String globalName, String? countryCode, String? localizableKey, List<int> holidays
|
||||
});
|
||||
|
||||
|
||||
@@ -272,13 +274,14 @@ class __$SnNotableDayCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of SnNotableDay
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? date = null,Object? localName = null,Object? globalName = null,Object? countryCode = null,Object? holidays = null,}) {
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? date = null,Object? localName = null,Object? globalName = null,Object? countryCode = freezed,Object? localizableKey = freezed,Object? holidays = null,}) {
|
||||
return _then(_SnNotableDay(
|
||||
date: null == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,localName: null == localName ? _self.localName : localName // ignore: cast_nullable_to_non_nullable
|
||||
as String,globalName: null == globalName ? _self.globalName : globalName // ignore: cast_nullable_to_non_nullable
|
||||
as String,countryCode: null == countryCode ? _self.countryCode : countryCode // ignore: cast_nullable_to_non_nullable
|
||||
as String,holidays: null == holidays ? _self._holidays : holidays // ignore: cast_nullable_to_non_nullable
|
||||
as String,countryCode: freezed == countryCode ? _self.countryCode : countryCode // ignore: cast_nullable_to_non_nullable
|
||||
as String?,localizableKey: freezed == localizableKey ? _self.localizableKey : localizableKey // ignore: cast_nullable_to_non_nullable
|
||||
as String?,holidays: null == holidays ? _self._holidays : holidays // ignore: cast_nullable_to_non_nullable
|
||||
as List<int>,
|
||||
));
|
||||
}
|
||||
|
||||
@@ -11,11 +11,11 @@ _SnNotableDay _$SnNotableDayFromJson(Map<String, dynamic> json) =>
|
||||
date: DateTime.parse(json['date'] as String),
|
||||
localName: json['local_name'] as String,
|
||||
globalName: json['global_name'] as String,
|
||||
countryCode: json['country_code'] as String,
|
||||
holidays:
|
||||
(json['holidays'] as List<dynamic>)
|
||||
.map((e) => (e as num).toInt())
|
||||
.toList(),
|
||||
countryCode: json['country_code'] as String?,
|
||||
localizableKey: json['localizable_key'] as String?,
|
||||
holidays: (json['holidays'] as List<dynamic>)
|
||||
.map((e) => (e as num).toInt())
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnNotableDayToJson(_SnNotableDay instance) =>
|
||||
@@ -24,6 +24,7 @@ Map<String, dynamic> _$SnNotableDayToJson(_SnNotableDay instance) =>
|
||||
'local_name': instance.localName,
|
||||
'global_name': instance.globalName,
|
||||
'country_code': instance.countryCode,
|
||||
'localizable_key': instance.localizableKey,
|
||||
'holidays': instance.holidays,
|
||||
};
|
||||
|
||||
@@ -35,10 +36,9 @@ _SnTimelineEvent _$SnTimelineEventFromJson(Map<String, dynamic> json) =>
|
||||
data: json['data'],
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt:
|
||||
json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnTimelineEventToJson(_SnTimelineEvent instance) =>
|
||||
@@ -56,21 +56,18 @@ _SnCheckInResult _$SnCheckInResultFromJson(Map<String, dynamic> json) =>
|
||||
_SnCheckInResult(
|
||||
id: json['id'] as String,
|
||||
level: (json['level'] as num).toInt(),
|
||||
tips:
|
||||
(json['tips'] as List<dynamic>)
|
||||
.map((e) => SnFortuneTip.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
tips: (json['tips'] as List<dynamic>)
|
||||
.map((e) => SnFortuneTip.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
accountId: json['account_id'] as String,
|
||||
account:
|
||||
json['account'] == null
|
||||
? null
|
||||
: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
||||
account: json['account'] == null
|
||||
? null
|
||||
: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt:
|
||||
json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnCheckInResultToJson(_SnCheckInResult instance) =>
|
||||
@@ -103,16 +100,14 @@ _SnEventCalendarEntry _$SnEventCalendarEntryFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _SnEventCalendarEntry(
|
||||
date: DateTime.parse(json['date'] as String),
|
||||
checkInResult:
|
||||
json['check_in_result'] == null
|
||||
? null
|
||||
: SnCheckInResult.fromJson(
|
||||
json['check_in_result'] as Map<String, dynamic>,
|
||||
),
|
||||
statuses:
|
||||
(json['statuses'] as List<dynamic>)
|
||||
.map((e) => SnAccountStatus.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
checkInResult: json['check_in_result'] == null
|
||||
? null
|
||||
: SnCheckInResult.fromJson(
|
||||
json['check_in_result'] as Map<String, dynamic>,
|
||||
),
|
||||
statuses: (json['statuses'] as List<dynamic>)
|
||||
.map((e) => SnAccountStatus.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnEventCalendarEntryToJson(
|
||||
@@ -141,10 +136,9 @@ _SnPresenceActivity _$SnPresenceActivityFromJson(Map<String, dynamic> json) =>
|
||||
accountId: json['account_id'] as String,
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt:
|
||||
json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnPresenceActivityToJson(_SnPresenceActivity instance) =>
|
||||
|
||||
95
lib/models/activitypub.dart
Normal file
95
lib/models/activitypub.dart
Normal file
@@ -0,0 +1,95 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'activitypub.freezed.dart';
|
||||
part 'activitypub.g.dart';
|
||||
|
||||
@freezed
|
||||
sealed class SnActivityPubInstance with _$SnActivityPubInstance {
|
||||
const factory SnActivityPubInstance({
|
||||
required String id,
|
||||
required String domain,
|
||||
String? name,
|
||||
String? description,
|
||||
String? software,
|
||||
String? version,
|
||||
String? iconUrl,
|
||||
String? thumbnailUrl,
|
||||
String? contactEmail,
|
||||
String? contactAccountUsername,
|
||||
int? activeUsers,
|
||||
@Default(false) bool isBlocked,
|
||||
@Default(false) bool isSilenced,
|
||||
String? blockReason,
|
||||
Map<String, dynamic>? metadata,
|
||||
DateTime? lastFetchedAt,
|
||||
DateTime? lastActivityAt,
|
||||
DateTime? metadataFetchedAt,
|
||||
}) = _SnActivityPubInstance;
|
||||
|
||||
factory SnActivityPubInstance.fromJson(Map<String, dynamic> json) =>
|
||||
_$SnActivityPubInstanceFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
sealed class SnActivityPubUser with _$SnActivityPubUser {
|
||||
const factory SnActivityPubUser({
|
||||
required String actorUri,
|
||||
required String username,
|
||||
required String displayName,
|
||||
required String bio,
|
||||
required String avatarUrl,
|
||||
required DateTime followedAt,
|
||||
required bool isLocal,
|
||||
required String instanceDomain,
|
||||
}) = _SnActivityPubUser;
|
||||
|
||||
factory SnActivityPubUser.fromJson(Map<String, dynamic> json) =>
|
||||
_$SnActivityPubUserFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
sealed class SnActivityPubActor with _$SnActivityPubActor {
|
||||
const factory SnActivityPubActor({
|
||||
required String id,
|
||||
required String uri,
|
||||
@Default('') String type,
|
||||
String? displayName,
|
||||
String? username,
|
||||
String? summary,
|
||||
String? inboxUri,
|
||||
String? outboxUri,
|
||||
String? followersUri,
|
||||
String? followingUri,
|
||||
String? featuredUri,
|
||||
String? avatarUrl,
|
||||
String? headerUrl,
|
||||
String? publicKeyId,
|
||||
String? publicKey,
|
||||
@Default(false) bool isBot,
|
||||
@Default(false) bool isLocked,
|
||||
@Default(true) bool discoverable,
|
||||
@Default(false) bool manuallyApprovesFollowers,
|
||||
Map<String, dynamic>? endpoints,
|
||||
Map<String, dynamic>? publicKeyData,
|
||||
Map<String, dynamic>? metadata,
|
||||
DateTime? lastFetchedAt,
|
||||
DateTime? lastActivityAt,
|
||||
required SnActivityPubInstance instance,
|
||||
required String instanceId,
|
||||
}) = _SnActivityPubActor;
|
||||
|
||||
factory SnActivityPubActor.fromJson(Map<String, dynamic> json) =>
|
||||
_$SnActivityPubActorFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
sealed class SnActivityPubFollowResponse with _$SnActivityPubFollowResponse {
|
||||
const factory SnActivityPubFollowResponse({
|
||||
required bool success,
|
||||
required String message,
|
||||
required String targetActorUri,
|
||||
}) = _SnActivityPubFollowResponse;
|
||||
|
||||
factory SnActivityPubFollowResponse.fromJson(Map<String, dynamic> json) =>
|
||||
_$SnActivityPubFollowResponseFromJson(json);
|
||||
}
|
||||
1245
lib/models/activitypub.freezed.dart
Normal file
1245
lib/models/activitypub.freezed.dart
Normal file
File diff suppressed because it is too large
Load Diff
166
lib/models/activitypub.g.dart
Normal file
166
lib/models/activitypub.g.dart
Normal file
@@ -0,0 +1,166 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'activitypub.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_SnActivityPubInstance _$SnActivityPubInstanceFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _SnActivityPubInstance(
|
||||
id: json['id'] as String,
|
||||
domain: json['domain'] as String,
|
||||
name: json['name'] as String?,
|
||||
description: json['description'] as String?,
|
||||
software: json['software'] as String?,
|
||||
version: json['version'] as String?,
|
||||
iconUrl: json['icon_url'] as String?,
|
||||
thumbnailUrl: json['thumbnail_url'] as String?,
|
||||
contactEmail: json['contact_email'] as String?,
|
||||
contactAccountUsername: json['contact_account_username'] as String?,
|
||||
activeUsers: (json['active_users'] as num?)?.toInt(),
|
||||
isBlocked: json['is_blocked'] as bool? ?? false,
|
||||
isSilenced: json['is_silenced'] as bool? ?? false,
|
||||
blockReason: json['block_reason'] as String?,
|
||||
metadata: json['metadata'] as Map<String, dynamic>?,
|
||||
lastFetchedAt: json['last_fetched_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['last_fetched_at'] as String),
|
||||
lastActivityAt: json['last_activity_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['last_activity_at'] as String),
|
||||
metadataFetchedAt: json['metadata_fetched_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['metadata_fetched_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnActivityPubInstanceToJson(
|
||||
_SnActivityPubInstance instance,
|
||||
) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'domain': instance.domain,
|
||||
'name': instance.name,
|
||||
'description': instance.description,
|
||||
'software': instance.software,
|
||||
'version': instance.version,
|
||||
'icon_url': instance.iconUrl,
|
||||
'thumbnail_url': instance.thumbnailUrl,
|
||||
'contact_email': instance.contactEmail,
|
||||
'contact_account_username': instance.contactAccountUsername,
|
||||
'active_users': instance.activeUsers,
|
||||
'is_blocked': instance.isBlocked,
|
||||
'is_silenced': instance.isSilenced,
|
||||
'block_reason': instance.blockReason,
|
||||
'metadata': instance.metadata,
|
||||
'last_fetched_at': instance.lastFetchedAt?.toIso8601String(),
|
||||
'last_activity_at': instance.lastActivityAt?.toIso8601String(),
|
||||
'metadata_fetched_at': instance.metadataFetchedAt?.toIso8601String(),
|
||||
};
|
||||
|
||||
_SnActivityPubUser _$SnActivityPubUserFromJson(Map<String, dynamic> json) =>
|
||||
_SnActivityPubUser(
|
||||
actorUri: json['actor_uri'] as String,
|
||||
username: json['username'] as String,
|
||||
displayName: json['display_name'] as String,
|
||||
bio: json['bio'] as String,
|
||||
avatarUrl: json['avatar_url'] as String,
|
||||
followedAt: DateTime.parse(json['followed_at'] as String),
|
||||
isLocal: json['is_local'] as bool,
|
||||
instanceDomain: json['instance_domain'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnActivityPubUserToJson(_SnActivityPubUser instance) =>
|
||||
<String, dynamic>{
|
||||
'actor_uri': instance.actorUri,
|
||||
'username': instance.username,
|
||||
'display_name': instance.displayName,
|
||||
'bio': instance.bio,
|
||||
'avatar_url': instance.avatarUrl,
|
||||
'followed_at': instance.followedAt.toIso8601String(),
|
||||
'is_local': instance.isLocal,
|
||||
'instance_domain': instance.instanceDomain,
|
||||
};
|
||||
|
||||
_SnActivityPubActor _$SnActivityPubActorFromJson(Map<String, dynamic> json) =>
|
||||
_SnActivityPubActor(
|
||||
id: json['id'] as String,
|
||||
uri: json['uri'] as String,
|
||||
type: json['type'] as String? ?? '',
|
||||
displayName: json['display_name'] as String?,
|
||||
username: json['username'] as String?,
|
||||
summary: json['summary'] as String?,
|
||||
inboxUri: json['inbox_uri'] as String?,
|
||||
outboxUri: json['outbox_uri'] as String?,
|
||||
followersUri: json['followers_uri'] as String?,
|
||||
followingUri: json['following_uri'] as String?,
|
||||
featuredUri: json['featured_uri'] as String?,
|
||||
avatarUrl: json['avatar_url'] as String?,
|
||||
headerUrl: json['header_url'] as String?,
|
||||
publicKeyId: json['public_key_id'] as String?,
|
||||
publicKey: json['public_key'] as String?,
|
||||
isBot: json['is_bot'] as bool? ?? false,
|
||||
isLocked: json['is_locked'] as bool? ?? false,
|
||||
discoverable: json['discoverable'] as bool? ?? true,
|
||||
manuallyApprovesFollowers:
|
||||
json['manually_approves_followers'] as bool? ?? false,
|
||||
endpoints: json['endpoints'] as Map<String, dynamic>?,
|
||||
publicKeyData: json['public_key_data'] as Map<String, dynamic>?,
|
||||
metadata: json['metadata'] as Map<String, dynamic>?,
|
||||
lastFetchedAt: json['last_fetched_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['last_fetched_at'] as String),
|
||||
lastActivityAt: json['last_activity_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['last_activity_at'] as String),
|
||||
instance: SnActivityPubInstance.fromJson(
|
||||
json['instance'] as Map<String, dynamic>,
|
||||
),
|
||||
instanceId: json['instance_id'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnActivityPubActorToJson(_SnActivityPubActor instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'uri': instance.uri,
|
||||
'type': instance.type,
|
||||
'display_name': instance.displayName,
|
||||
'username': instance.username,
|
||||
'summary': instance.summary,
|
||||
'inbox_uri': instance.inboxUri,
|
||||
'outbox_uri': instance.outboxUri,
|
||||
'followers_uri': instance.followersUri,
|
||||
'following_uri': instance.followingUri,
|
||||
'featured_uri': instance.featuredUri,
|
||||
'avatar_url': instance.avatarUrl,
|
||||
'header_url': instance.headerUrl,
|
||||
'public_key_id': instance.publicKeyId,
|
||||
'public_key': instance.publicKey,
|
||||
'is_bot': instance.isBot,
|
||||
'is_locked': instance.isLocked,
|
||||
'discoverable': instance.discoverable,
|
||||
'manually_approves_followers': instance.manuallyApprovesFollowers,
|
||||
'endpoints': instance.endpoints,
|
||||
'public_key_data': instance.publicKeyData,
|
||||
'metadata': instance.metadata,
|
||||
'last_fetched_at': instance.lastFetchedAt?.toIso8601String(),
|
||||
'last_activity_at': instance.lastActivityAt?.toIso8601String(),
|
||||
'instance': instance.instance.toJson(),
|
||||
'instance_id': instance.instanceId,
|
||||
};
|
||||
|
||||
_SnActivityPubFollowResponse _$SnActivityPubFollowResponseFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _SnActivityPubFollowResponse(
|
||||
success: json['success'] as bool,
|
||||
message: json['message'] as String,
|
||||
targetActorUri: json['target_actor_uri'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnActivityPubFollowResponseToJson(
|
||||
_SnActivityPubFollowResponse instance,
|
||||
) => <String, dynamic>{
|
||||
'success': instance.success,
|
||||
'message': instance.message,
|
||||
'target_actor_uri': instance.targetActorUri,
|
||||
};
|
||||
@@ -33,7 +33,6 @@ sealed class SnAuthChallenge with _$SnAuthChallenge {
|
||||
required int stepRemain,
|
||||
required int stepTotal,
|
||||
required int failedAttempts,
|
||||
required int type,
|
||||
required List<String> blacklistFactors,
|
||||
required List<dynamic> audiences,
|
||||
required List<dynamic> scopes,
|
||||
@@ -58,9 +57,13 @@ sealed class SnAuthSession with _$SnAuthSession {
|
||||
required String? label,
|
||||
required DateTime lastGrantedAt,
|
||||
required DateTime? expiredAt,
|
||||
required List<dynamic> audiences,
|
||||
required List<dynamic> scopes,
|
||||
required String? ipAddress,
|
||||
required String? userAgent,
|
||||
required GeoIpLocation? location,
|
||||
required int type,
|
||||
required String accountId,
|
||||
required String challengeId,
|
||||
required SnAuthChallenge challenge,
|
||||
required DateTime createdAt,
|
||||
required DateTime updatedAt,
|
||||
required DateTime? deletedAt,
|
||||
|
||||
@@ -541,7 +541,7 @@ as String?,
|
||||
/// @nodoc
|
||||
mixin _$SnAuthChallenge {
|
||||
|
||||
String get id; DateTime? get expiredAt; int get stepRemain; int get stepTotal; int get failedAttempts; int get type; List<String> get blacklistFactors; List<dynamic> get audiences; List<dynamic> get scopes; String get ipAddress; String get userAgent; String? get nonce; GeoIpLocation? get location; String get accountId; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt;
|
||||
String get id; DateTime? get expiredAt; int get stepRemain; int get stepTotal; int get failedAttempts; List<String> get blacklistFactors; List<dynamic> get audiences; List<dynamic> get scopes; String get ipAddress; String get userAgent; String? get nonce; GeoIpLocation? get location; String get accountId; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt;
|
||||
/// Create a copy of SnAuthChallenge
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -554,16 +554,16 @@ $SnAuthChallengeCopyWith<SnAuthChallenge> get copyWith => _$SnAuthChallengeCopyW
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnAuthChallenge&&(identical(other.id, id) || other.id == id)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&(identical(other.stepRemain, stepRemain) || other.stepRemain == stepRemain)&&(identical(other.stepTotal, stepTotal) || other.stepTotal == stepTotal)&&(identical(other.failedAttempts, failedAttempts) || other.failedAttempts == failedAttempts)&&(identical(other.type, type) || other.type == type)&&const DeepCollectionEquality().equals(other.blacklistFactors, blacklistFactors)&&const DeepCollectionEquality().equals(other.audiences, audiences)&&const DeepCollectionEquality().equals(other.scopes, scopes)&&(identical(other.ipAddress, ipAddress) || other.ipAddress == ipAddress)&&(identical(other.userAgent, userAgent) || other.userAgent == userAgent)&&(identical(other.nonce, nonce) || other.nonce == nonce)&&(identical(other.location, location) || other.location == location)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnAuthChallenge&&(identical(other.id, id) || other.id == id)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&(identical(other.stepRemain, stepRemain) || other.stepRemain == stepRemain)&&(identical(other.stepTotal, stepTotal) || other.stepTotal == stepTotal)&&(identical(other.failedAttempts, failedAttempts) || other.failedAttempts == failedAttempts)&&const DeepCollectionEquality().equals(other.blacklistFactors, blacklistFactors)&&const DeepCollectionEquality().equals(other.audiences, audiences)&&const DeepCollectionEquality().equals(other.scopes, scopes)&&(identical(other.ipAddress, ipAddress) || other.ipAddress == ipAddress)&&(identical(other.userAgent, userAgent) || other.userAgent == userAgent)&&(identical(other.nonce, nonce) || other.nonce == nonce)&&(identical(other.location, location) || other.location == location)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,expiredAt,stepRemain,stepTotal,failedAttempts,type,const DeepCollectionEquality().hash(blacklistFactors),const DeepCollectionEquality().hash(audiences),const DeepCollectionEquality().hash(scopes),ipAddress,userAgent,nonce,location,accountId,createdAt,updatedAt,deletedAt);
|
||||
int get hashCode => Object.hash(runtimeType,id,expiredAt,stepRemain,stepTotal,failedAttempts,const DeepCollectionEquality().hash(blacklistFactors),const DeepCollectionEquality().hash(audiences),const DeepCollectionEquality().hash(scopes),ipAddress,userAgent,nonce,location,accountId,createdAt,updatedAt,deletedAt);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnAuthChallenge(id: $id, expiredAt: $expiredAt, stepRemain: $stepRemain, stepTotal: $stepTotal, failedAttempts: $failedAttempts, type: $type, blacklistFactors: $blacklistFactors, audiences: $audiences, scopes: $scopes, ipAddress: $ipAddress, userAgent: $userAgent, nonce: $nonce, location: $location, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
||||
return 'SnAuthChallenge(id: $id, expiredAt: $expiredAt, stepRemain: $stepRemain, stepTotal: $stepTotal, failedAttempts: $failedAttempts, blacklistFactors: $blacklistFactors, audiences: $audiences, scopes: $scopes, ipAddress: $ipAddress, userAgent: $userAgent, nonce: $nonce, location: $location, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
||||
}
|
||||
|
||||
|
||||
@@ -574,7 +574,7 @@ abstract mixin class $SnAuthChallengeCopyWith<$Res> {
|
||||
factory $SnAuthChallengeCopyWith(SnAuthChallenge value, $Res Function(SnAuthChallenge) _then) = _$SnAuthChallengeCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String id, DateTime? expiredAt, int stepRemain, int stepTotal, int failedAttempts, int type, List<String> blacklistFactors, List<dynamic> audiences, List<dynamic> scopes, String ipAddress, String userAgent, String? nonce, GeoIpLocation? location, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
||||
String id, DateTime? expiredAt, int stepRemain, int stepTotal, int failedAttempts, List<String> blacklistFactors, List<dynamic> audiences, List<dynamic> scopes, String ipAddress, String userAgent, String? nonce, GeoIpLocation? location, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
||||
});
|
||||
|
||||
|
||||
@@ -591,14 +591,13 @@ class _$SnAuthChallengeCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of SnAuthChallenge
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? expiredAt = freezed,Object? stepRemain = null,Object? stepTotal = null,Object? failedAttempts = null,Object? type = null,Object? blacklistFactors = null,Object? audiences = null,Object? scopes = null,Object? ipAddress = null,Object? userAgent = null,Object? nonce = freezed,Object? location = freezed,Object? accountId = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? expiredAt = freezed,Object? stepRemain = null,Object? stepTotal = null,Object? failedAttempts = null,Object? blacklistFactors = null,Object? audiences = null,Object? scopes = null,Object? ipAddress = null,Object? userAgent = null,Object? nonce = freezed,Object? location = freezed,Object? accountId = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,expiredAt: freezed == expiredAt ? _self.expiredAt : expiredAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,stepRemain: null == stepRemain ? _self.stepRemain : stepRemain // ignore: cast_nullable_to_non_nullable
|
||||
as int,stepTotal: null == stepTotal ? _self.stepTotal : stepTotal // ignore: cast_nullable_to_non_nullable
|
||||
as int,failedAttempts: null == failedAttempts ? _self.failedAttempts : failedAttempts // ignore: cast_nullable_to_non_nullable
|
||||
as int,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
|
||||
as int,blacklistFactors: null == blacklistFactors ? _self.blacklistFactors : blacklistFactors // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,audiences: null == audiences ? _self.audiences : audiences // ignore: cast_nullable_to_non_nullable
|
||||
as List<dynamic>,scopes: null == scopes ? _self.scopes : scopes // ignore: cast_nullable_to_non_nullable
|
||||
@@ -704,10 +703,10 @@ return $default(_that);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, DateTime? expiredAt, int stepRemain, int stepTotal, int failedAttempts, int type, List<String> blacklistFactors, List<dynamic> audiences, List<dynamic> scopes, String ipAddress, String userAgent, String? nonce, GeoIpLocation? location, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, DateTime? expiredAt, int stepRemain, int stepTotal, int failedAttempts, List<String> blacklistFactors, List<dynamic> audiences, List<dynamic> scopes, String ipAddress, String userAgent, String? nonce, GeoIpLocation? location, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnAuthChallenge() when $default != null:
|
||||
return $default(_that.id,_that.expiredAt,_that.stepRemain,_that.stepTotal,_that.failedAttempts,_that.type,_that.blacklistFactors,_that.audiences,_that.scopes,_that.ipAddress,_that.userAgent,_that.nonce,_that.location,_that.accountId,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
|
||||
return $default(_that.id,_that.expiredAt,_that.stepRemain,_that.stepTotal,_that.failedAttempts,_that.blacklistFactors,_that.audiences,_that.scopes,_that.ipAddress,_that.userAgent,_that.nonce,_that.location,_that.accountId,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
@@ -725,10 +724,10 @@ return $default(_that.id,_that.expiredAt,_that.stepRemain,_that.stepTotal,_that.
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, DateTime? expiredAt, int stepRemain, int stepTotal, int failedAttempts, int type, List<String> blacklistFactors, List<dynamic> audiences, List<dynamic> scopes, String ipAddress, String userAgent, String? nonce, GeoIpLocation? location, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt) $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, DateTime? expiredAt, int stepRemain, int stepTotal, int failedAttempts, List<String> blacklistFactors, List<dynamic> audiences, List<dynamic> scopes, String ipAddress, String userAgent, String? nonce, GeoIpLocation? location, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnAuthChallenge():
|
||||
return $default(_that.id,_that.expiredAt,_that.stepRemain,_that.stepTotal,_that.failedAttempts,_that.type,_that.blacklistFactors,_that.audiences,_that.scopes,_that.ipAddress,_that.userAgent,_that.nonce,_that.location,_that.accountId,_that.createdAt,_that.updatedAt,_that.deletedAt);}
|
||||
return $default(_that.id,_that.expiredAt,_that.stepRemain,_that.stepTotal,_that.failedAttempts,_that.blacklistFactors,_that.audiences,_that.scopes,_that.ipAddress,_that.userAgent,_that.nonce,_that.location,_that.accountId,_that.createdAt,_that.updatedAt,_that.deletedAt);}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
@@ -742,10 +741,10 @@ return $default(_that.id,_that.expiredAt,_that.stepRemain,_that.stepTotal,_that.
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, DateTime? expiredAt, int stepRemain, int stepTotal, int failedAttempts, int type, List<String> blacklistFactors, List<dynamic> audiences, List<dynamic> scopes, String ipAddress, String userAgent, String? nonce, GeoIpLocation? location, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, DateTime? expiredAt, int stepRemain, int stepTotal, int failedAttempts, List<String> blacklistFactors, List<dynamic> audiences, List<dynamic> scopes, String ipAddress, String userAgent, String? nonce, GeoIpLocation? location, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnAuthChallenge() when $default != null:
|
||||
return $default(_that.id,_that.expiredAt,_that.stepRemain,_that.stepTotal,_that.failedAttempts,_that.type,_that.blacklistFactors,_that.audiences,_that.scopes,_that.ipAddress,_that.userAgent,_that.nonce,_that.location,_that.accountId,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
|
||||
return $default(_that.id,_that.expiredAt,_that.stepRemain,_that.stepTotal,_that.failedAttempts,_that.blacklistFactors,_that.audiences,_that.scopes,_that.ipAddress,_that.userAgent,_that.nonce,_that.location,_that.accountId,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
@@ -757,7 +756,7 @@ return $default(_that.id,_that.expiredAt,_that.stepRemain,_that.stepTotal,_that.
|
||||
@JsonSerializable()
|
||||
|
||||
class _SnAuthChallenge implements SnAuthChallenge {
|
||||
const _SnAuthChallenge({required this.id, required this.expiredAt, required this.stepRemain, required this.stepTotal, required this.failedAttempts, required this.type, required final List<String> blacklistFactors, required final List<dynamic> audiences, required final List<dynamic> scopes, required this.ipAddress, required this.userAgent, required this.nonce, required this.location, required this.accountId, required this.createdAt, required this.updatedAt, required this.deletedAt}): _blacklistFactors = blacklistFactors,_audiences = audiences,_scopes = scopes;
|
||||
const _SnAuthChallenge({required this.id, required this.expiredAt, required this.stepRemain, required this.stepTotal, required this.failedAttempts, required final List<String> blacklistFactors, required final List<dynamic> audiences, required final List<dynamic> scopes, required this.ipAddress, required this.userAgent, required this.nonce, required this.location, required this.accountId, required this.createdAt, required this.updatedAt, required this.deletedAt}): _blacklistFactors = blacklistFactors,_audiences = audiences,_scopes = scopes;
|
||||
factory _SnAuthChallenge.fromJson(Map<String, dynamic> json) => _$SnAuthChallengeFromJson(json);
|
||||
|
||||
@override final String id;
|
||||
@@ -765,7 +764,6 @@ class _SnAuthChallenge implements SnAuthChallenge {
|
||||
@override final int stepRemain;
|
||||
@override final int stepTotal;
|
||||
@override final int failedAttempts;
|
||||
@override final int type;
|
||||
final List<String> _blacklistFactors;
|
||||
@override List<String> get blacklistFactors {
|
||||
if (_blacklistFactors is EqualUnmodifiableListView) return _blacklistFactors;
|
||||
@@ -809,16 +807,16 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnAuthChallenge&&(identical(other.id, id) || other.id == id)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&(identical(other.stepRemain, stepRemain) || other.stepRemain == stepRemain)&&(identical(other.stepTotal, stepTotal) || other.stepTotal == stepTotal)&&(identical(other.failedAttempts, failedAttempts) || other.failedAttempts == failedAttempts)&&(identical(other.type, type) || other.type == type)&&const DeepCollectionEquality().equals(other._blacklistFactors, _blacklistFactors)&&const DeepCollectionEquality().equals(other._audiences, _audiences)&&const DeepCollectionEquality().equals(other._scopes, _scopes)&&(identical(other.ipAddress, ipAddress) || other.ipAddress == ipAddress)&&(identical(other.userAgent, userAgent) || other.userAgent == userAgent)&&(identical(other.nonce, nonce) || other.nonce == nonce)&&(identical(other.location, location) || other.location == location)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnAuthChallenge&&(identical(other.id, id) || other.id == id)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&(identical(other.stepRemain, stepRemain) || other.stepRemain == stepRemain)&&(identical(other.stepTotal, stepTotal) || other.stepTotal == stepTotal)&&(identical(other.failedAttempts, failedAttempts) || other.failedAttempts == failedAttempts)&&const DeepCollectionEquality().equals(other._blacklistFactors, _blacklistFactors)&&const DeepCollectionEquality().equals(other._audiences, _audiences)&&const DeepCollectionEquality().equals(other._scopes, _scopes)&&(identical(other.ipAddress, ipAddress) || other.ipAddress == ipAddress)&&(identical(other.userAgent, userAgent) || other.userAgent == userAgent)&&(identical(other.nonce, nonce) || other.nonce == nonce)&&(identical(other.location, location) || other.location == location)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,expiredAt,stepRemain,stepTotal,failedAttempts,type,const DeepCollectionEquality().hash(_blacklistFactors),const DeepCollectionEquality().hash(_audiences),const DeepCollectionEquality().hash(_scopes),ipAddress,userAgent,nonce,location,accountId,createdAt,updatedAt,deletedAt);
|
||||
int get hashCode => Object.hash(runtimeType,id,expiredAt,stepRemain,stepTotal,failedAttempts,const DeepCollectionEquality().hash(_blacklistFactors),const DeepCollectionEquality().hash(_audiences),const DeepCollectionEquality().hash(_scopes),ipAddress,userAgent,nonce,location,accountId,createdAt,updatedAt,deletedAt);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnAuthChallenge(id: $id, expiredAt: $expiredAt, stepRemain: $stepRemain, stepTotal: $stepTotal, failedAttempts: $failedAttempts, type: $type, blacklistFactors: $blacklistFactors, audiences: $audiences, scopes: $scopes, ipAddress: $ipAddress, userAgent: $userAgent, nonce: $nonce, location: $location, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
||||
return 'SnAuthChallenge(id: $id, expiredAt: $expiredAt, stepRemain: $stepRemain, stepTotal: $stepTotal, failedAttempts: $failedAttempts, blacklistFactors: $blacklistFactors, audiences: $audiences, scopes: $scopes, ipAddress: $ipAddress, userAgent: $userAgent, nonce: $nonce, location: $location, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
||||
}
|
||||
|
||||
|
||||
@@ -829,7 +827,7 @@ abstract mixin class _$SnAuthChallengeCopyWith<$Res> implements $SnAuthChallenge
|
||||
factory _$SnAuthChallengeCopyWith(_SnAuthChallenge value, $Res Function(_SnAuthChallenge) _then) = __$SnAuthChallengeCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String id, DateTime? expiredAt, int stepRemain, int stepTotal, int failedAttempts, int type, List<String> blacklistFactors, List<dynamic> audiences, List<dynamic> scopes, String ipAddress, String userAgent, String? nonce, GeoIpLocation? location, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
||||
String id, DateTime? expiredAt, int stepRemain, int stepTotal, int failedAttempts, List<String> blacklistFactors, List<dynamic> audiences, List<dynamic> scopes, String ipAddress, String userAgent, String? nonce, GeoIpLocation? location, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
||||
});
|
||||
|
||||
|
||||
@@ -846,14 +844,13 @@ class __$SnAuthChallengeCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of SnAuthChallenge
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? expiredAt = freezed,Object? stepRemain = null,Object? stepTotal = null,Object? failedAttempts = null,Object? type = null,Object? blacklistFactors = null,Object? audiences = null,Object? scopes = null,Object? ipAddress = null,Object? userAgent = null,Object? nonce = freezed,Object? location = freezed,Object? accountId = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? expiredAt = freezed,Object? stepRemain = null,Object? stepTotal = null,Object? failedAttempts = null,Object? blacklistFactors = null,Object? audiences = null,Object? scopes = null,Object? ipAddress = null,Object? userAgent = null,Object? nonce = freezed,Object? location = freezed,Object? accountId = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
||||
return _then(_SnAuthChallenge(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,expiredAt: freezed == expiredAt ? _self.expiredAt : expiredAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,stepRemain: null == stepRemain ? _self.stepRemain : stepRemain // ignore: cast_nullable_to_non_nullable
|
||||
as int,stepTotal: null == stepTotal ? _self.stepTotal : stepTotal // ignore: cast_nullable_to_non_nullable
|
||||
as int,failedAttempts: null == failedAttempts ? _self.failedAttempts : failedAttempts // ignore: cast_nullable_to_non_nullable
|
||||
as int,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
|
||||
as int,blacklistFactors: null == blacklistFactors ? _self._blacklistFactors : blacklistFactors // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,audiences: null == audiences ? _self._audiences : audiences // ignore: cast_nullable_to_non_nullable
|
||||
as List<dynamic>,scopes: null == scopes ? _self._scopes : scopes // ignore: cast_nullable_to_non_nullable
|
||||
@@ -888,7 +885,7 @@ $GeoIpLocationCopyWith<$Res>? get location {
|
||||
/// @nodoc
|
||||
mixin _$SnAuthSession {
|
||||
|
||||
String get id; String? get label; DateTime get lastGrantedAt; DateTime? get expiredAt; String get accountId; String get challengeId; SnAuthChallenge get challenge; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt;
|
||||
String get id; String? get label; DateTime get lastGrantedAt; DateTime? get expiredAt; List<dynamic> get audiences; List<dynamic> get scopes; String? get ipAddress; String? get userAgent; GeoIpLocation? get location; int get type; String get accountId; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt;
|
||||
/// Create a copy of SnAuthSession
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -901,16 +898,16 @@ $SnAuthSessionCopyWith<SnAuthSession> get copyWith => _$SnAuthSessionCopyWithImp
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnAuthSession&&(identical(other.id, id) || other.id == id)&&(identical(other.label, label) || other.label == label)&&(identical(other.lastGrantedAt, lastGrantedAt) || other.lastGrantedAt == lastGrantedAt)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.challengeId, challengeId) || other.challengeId == challengeId)&&(identical(other.challenge, challenge) || other.challenge == challenge)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnAuthSession&&(identical(other.id, id) || other.id == id)&&(identical(other.label, label) || other.label == label)&&(identical(other.lastGrantedAt, lastGrantedAt) || other.lastGrantedAt == lastGrantedAt)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&const DeepCollectionEquality().equals(other.audiences, audiences)&&const DeepCollectionEquality().equals(other.scopes, scopes)&&(identical(other.ipAddress, ipAddress) || other.ipAddress == ipAddress)&&(identical(other.userAgent, userAgent) || other.userAgent == userAgent)&&(identical(other.location, location) || other.location == location)&&(identical(other.type, type) || other.type == type)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,label,lastGrantedAt,expiredAt,accountId,challengeId,challenge,createdAt,updatedAt,deletedAt);
|
||||
int get hashCode => Object.hash(runtimeType,id,label,lastGrantedAt,expiredAt,const DeepCollectionEquality().hash(audiences),const DeepCollectionEquality().hash(scopes),ipAddress,userAgent,location,type,accountId,createdAt,updatedAt,deletedAt);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnAuthSession(id: $id, label: $label, lastGrantedAt: $lastGrantedAt, expiredAt: $expiredAt, accountId: $accountId, challengeId: $challengeId, challenge: $challenge, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
||||
return 'SnAuthSession(id: $id, label: $label, lastGrantedAt: $lastGrantedAt, expiredAt: $expiredAt, audiences: $audiences, scopes: $scopes, ipAddress: $ipAddress, userAgent: $userAgent, location: $location, type: $type, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
||||
}
|
||||
|
||||
|
||||
@@ -921,11 +918,11 @@ abstract mixin class $SnAuthSessionCopyWith<$Res> {
|
||||
factory $SnAuthSessionCopyWith(SnAuthSession value, $Res Function(SnAuthSession) _then) = _$SnAuthSessionCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String id, String? label, DateTime lastGrantedAt, DateTime? expiredAt, String accountId, String challengeId, SnAuthChallenge challenge, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
||||
String id, String? label, DateTime lastGrantedAt, DateTime? expiredAt, List<dynamic> audiences, List<dynamic> scopes, String? ipAddress, String? userAgent, GeoIpLocation? location, int type, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
||||
});
|
||||
|
||||
|
||||
$SnAuthChallengeCopyWith<$Res> get challenge;
|
||||
$GeoIpLocationCopyWith<$Res>? get location;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
@@ -938,16 +935,20 @@ class _$SnAuthSessionCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of SnAuthSession
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? label = freezed,Object? lastGrantedAt = null,Object? expiredAt = freezed,Object? accountId = null,Object? challengeId = null,Object? challenge = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? label = freezed,Object? lastGrantedAt = null,Object? expiredAt = freezed,Object? audiences = null,Object? scopes = null,Object? ipAddress = freezed,Object? userAgent = freezed,Object? location = freezed,Object? type = null,Object? accountId = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,label: freezed == label ? _self.label : label // ignore: cast_nullable_to_non_nullable
|
||||
as String?,lastGrantedAt: null == lastGrantedAt ? _self.lastGrantedAt : lastGrantedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,expiredAt: freezed == expiredAt ? _self.expiredAt : expiredAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
|
||||
as String,challengeId: null == challengeId ? _self.challengeId : challengeId // ignore: cast_nullable_to_non_nullable
|
||||
as String,challenge: null == challenge ? _self.challenge : challenge // ignore: cast_nullable_to_non_nullable
|
||||
as SnAuthChallenge,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,audiences: null == audiences ? _self.audiences : audiences // ignore: cast_nullable_to_non_nullable
|
||||
as List<dynamic>,scopes: null == scopes ? _self.scopes : scopes // ignore: cast_nullable_to_non_nullable
|
||||
as List<dynamic>,ipAddress: freezed == ipAddress ? _self.ipAddress : ipAddress // ignore: cast_nullable_to_non_nullable
|
||||
as String?,userAgent: freezed == userAgent ? _self.userAgent : userAgent // ignore: cast_nullable_to_non_nullable
|
||||
as String?,location: freezed == location ? _self.location : location // ignore: cast_nullable_to_non_nullable
|
||||
as GeoIpLocation?,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
|
||||
as int,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
|
||||
as String,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
@@ -957,10 +958,13 @@ as DateTime?,
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnAuthChallengeCopyWith<$Res> get challenge {
|
||||
|
||||
return $SnAuthChallengeCopyWith<$Res>(_self.challenge, (value) {
|
||||
return _then(_self.copyWith(challenge: value));
|
||||
$GeoIpLocationCopyWith<$Res>? get location {
|
||||
if (_self.location == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $GeoIpLocationCopyWith<$Res>(_self.location!, (value) {
|
||||
return _then(_self.copyWith(location: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1041,10 +1045,10 @@ return $default(_that);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String? label, DateTime lastGrantedAt, DateTime? expiredAt, String accountId, String challengeId, SnAuthChallenge challenge, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String? label, DateTime lastGrantedAt, DateTime? expiredAt, List<dynamic> audiences, List<dynamic> scopes, String? ipAddress, String? userAgent, GeoIpLocation? location, int type, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnAuthSession() when $default != null:
|
||||
return $default(_that.id,_that.label,_that.lastGrantedAt,_that.expiredAt,_that.accountId,_that.challengeId,_that.challenge,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
|
||||
return $default(_that.id,_that.label,_that.lastGrantedAt,_that.expiredAt,_that.audiences,_that.scopes,_that.ipAddress,_that.userAgent,_that.location,_that.type,_that.accountId,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
@@ -1062,10 +1066,10 @@ return $default(_that.id,_that.label,_that.lastGrantedAt,_that.expiredAt,_that.a
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String? label, DateTime lastGrantedAt, DateTime? expiredAt, String accountId, String challengeId, SnAuthChallenge challenge, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt) $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String? label, DateTime lastGrantedAt, DateTime? expiredAt, List<dynamic> audiences, List<dynamic> scopes, String? ipAddress, String? userAgent, GeoIpLocation? location, int type, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnAuthSession():
|
||||
return $default(_that.id,_that.label,_that.lastGrantedAt,_that.expiredAt,_that.accountId,_that.challengeId,_that.challenge,_that.createdAt,_that.updatedAt,_that.deletedAt);}
|
||||
return $default(_that.id,_that.label,_that.lastGrantedAt,_that.expiredAt,_that.audiences,_that.scopes,_that.ipAddress,_that.userAgent,_that.location,_that.type,_that.accountId,_that.createdAt,_that.updatedAt,_that.deletedAt);}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
@@ -1079,10 +1083,10 @@ return $default(_that.id,_that.label,_that.lastGrantedAt,_that.expiredAt,_that.a
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String? label, DateTime lastGrantedAt, DateTime? expiredAt, String accountId, String challengeId, SnAuthChallenge challenge, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String? label, DateTime lastGrantedAt, DateTime? expiredAt, List<dynamic> audiences, List<dynamic> scopes, String? ipAddress, String? userAgent, GeoIpLocation? location, int type, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnAuthSession() when $default != null:
|
||||
return $default(_that.id,_that.label,_that.lastGrantedAt,_that.expiredAt,_that.accountId,_that.challengeId,_that.challenge,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
|
||||
return $default(_that.id,_that.label,_that.lastGrantedAt,_that.expiredAt,_that.audiences,_that.scopes,_that.ipAddress,_that.userAgent,_that.location,_that.type,_that.accountId,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
@@ -1094,16 +1098,32 @@ return $default(_that.id,_that.label,_that.lastGrantedAt,_that.expiredAt,_that.a
|
||||
@JsonSerializable()
|
||||
|
||||
class _SnAuthSession implements SnAuthSession {
|
||||
const _SnAuthSession({required this.id, required this.label, required this.lastGrantedAt, required this.expiredAt, required this.accountId, required this.challengeId, required this.challenge, required this.createdAt, required this.updatedAt, required this.deletedAt});
|
||||
const _SnAuthSession({required this.id, required this.label, required this.lastGrantedAt, required this.expiredAt, required final List<dynamic> audiences, required final List<dynamic> scopes, required this.ipAddress, required this.userAgent, required this.location, required this.type, required this.accountId, required this.createdAt, required this.updatedAt, required this.deletedAt}): _audiences = audiences,_scopes = scopes;
|
||||
factory _SnAuthSession.fromJson(Map<String, dynamic> json) => _$SnAuthSessionFromJson(json);
|
||||
|
||||
@override final String id;
|
||||
@override final String? label;
|
||||
@override final DateTime lastGrantedAt;
|
||||
@override final DateTime? expiredAt;
|
||||
final List<dynamic> _audiences;
|
||||
@override List<dynamic> get audiences {
|
||||
if (_audiences is EqualUnmodifiableListView) return _audiences;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_audiences);
|
||||
}
|
||||
|
||||
final List<dynamic> _scopes;
|
||||
@override List<dynamic> get scopes {
|
||||
if (_scopes is EqualUnmodifiableListView) return _scopes;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_scopes);
|
||||
}
|
||||
|
||||
@override final String? ipAddress;
|
||||
@override final String? userAgent;
|
||||
@override final GeoIpLocation? location;
|
||||
@override final int type;
|
||||
@override final String accountId;
|
||||
@override final String challengeId;
|
||||
@override final SnAuthChallenge challenge;
|
||||
@override final DateTime createdAt;
|
||||
@override final DateTime updatedAt;
|
||||
@override final DateTime? deletedAt;
|
||||
@@ -1121,16 +1141,16 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnAuthSession&&(identical(other.id, id) || other.id == id)&&(identical(other.label, label) || other.label == label)&&(identical(other.lastGrantedAt, lastGrantedAt) || other.lastGrantedAt == lastGrantedAt)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.challengeId, challengeId) || other.challengeId == challengeId)&&(identical(other.challenge, challenge) || other.challenge == challenge)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnAuthSession&&(identical(other.id, id) || other.id == id)&&(identical(other.label, label) || other.label == label)&&(identical(other.lastGrantedAt, lastGrantedAt) || other.lastGrantedAt == lastGrantedAt)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&const DeepCollectionEquality().equals(other._audiences, _audiences)&&const DeepCollectionEquality().equals(other._scopes, _scopes)&&(identical(other.ipAddress, ipAddress) || other.ipAddress == ipAddress)&&(identical(other.userAgent, userAgent) || other.userAgent == userAgent)&&(identical(other.location, location) || other.location == location)&&(identical(other.type, type) || other.type == type)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,label,lastGrantedAt,expiredAt,accountId,challengeId,challenge,createdAt,updatedAt,deletedAt);
|
||||
int get hashCode => Object.hash(runtimeType,id,label,lastGrantedAt,expiredAt,const DeepCollectionEquality().hash(_audiences),const DeepCollectionEquality().hash(_scopes),ipAddress,userAgent,location,type,accountId,createdAt,updatedAt,deletedAt);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnAuthSession(id: $id, label: $label, lastGrantedAt: $lastGrantedAt, expiredAt: $expiredAt, accountId: $accountId, challengeId: $challengeId, challenge: $challenge, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
||||
return 'SnAuthSession(id: $id, label: $label, lastGrantedAt: $lastGrantedAt, expiredAt: $expiredAt, audiences: $audiences, scopes: $scopes, ipAddress: $ipAddress, userAgent: $userAgent, location: $location, type: $type, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
||||
}
|
||||
|
||||
|
||||
@@ -1141,11 +1161,11 @@ abstract mixin class _$SnAuthSessionCopyWith<$Res> implements $SnAuthSessionCopy
|
||||
factory _$SnAuthSessionCopyWith(_SnAuthSession value, $Res Function(_SnAuthSession) _then) = __$SnAuthSessionCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String id, String? label, DateTime lastGrantedAt, DateTime? expiredAt, String accountId, String challengeId, SnAuthChallenge challenge, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
||||
String id, String? label, DateTime lastGrantedAt, DateTime? expiredAt, List<dynamic> audiences, List<dynamic> scopes, String? ipAddress, String? userAgent, GeoIpLocation? location, int type, String accountId, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
||||
});
|
||||
|
||||
|
||||
@override $SnAuthChallengeCopyWith<$Res> get challenge;
|
||||
@override $GeoIpLocationCopyWith<$Res>? get location;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
@@ -1158,16 +1178,20 @@ class __$SnAuthSessionCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of SnAuthSession
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? label = freezed,Object? lastGrantedAt = null,Object? expiredAt = freezed,Object? accountId = null,Object? challengeId = null,Object? challenge = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? label = freezed,Object? lastGrantedAt = null,Object? expiredAt = freezed,Object? audiences = null,Object? scopes = null,Object? ipAddress = freezed,Object? userAgent = freezed,Object? location = freezed,Object? type = null,Object? accountId = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
||||
return _then(_SnAuthSession(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,label: freezed == label ? _self.label : label // ignore: cast_nullable_to_non_nullable
|
||||
as String?,lastGrantedAt: null == lastGrantedAt ? _self.lastGrantedAt : lastGrantedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,expiredAt: freezed == expiredAt ? _self.expiredAt : expiredAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
|
||||
as String,challengeId: null == challengeId ? _self.challengeId : challengeId // ignore: cast_nullable_to_non_nullable
|
||||
as String,challenge: null == challenge ? _self.challenge : challenge // ignore: cast_nullable_to_non_nullable
|
||||
as SnAuthChallenge,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,audiences: null == audiences ? _self._audiences : audiences // ignore: cast_nullable_to_non_nullable
|
||||
as List<dynamic>,scopes: null == scopes ? _self._scopes : scopes // ignore: cast_nullable_to_non_nullable
|
||||
as List<dynamic>,ipAddress: freezed == ipAddress ? _self.ipAddress : ipAddress // ignore: cast_nullable_to_non_nullable
|
||||
as String?,userAgent: freezed == userAgent ? _self.userAgent : userAgent // ignore: cast_nullable_to_non_nullable
|
||||
as String?,location: freezed == location ? _self.location : location // ignore: cast_nullable_to_non_nullable
|
||||
as GeoIpLocation?,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
|
||||
as int,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
|
||||
as String,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
@@ -1178,10 +1202,13 @@ as DateTime?,
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnAuthChallengeCopyWith<$Res> get challenge {
|
||||
|
||||
return $SnAuthChallengeCopyWith<$Res>(_self.challenge, (value) {
|
||||
return _then(_self.copyWith(challenge: value));
|
||||
$GeoIpLocationCopyWith<$Res>? get location {
|
||||
if (_self.location == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $GeoIpLocationCopyWith<$Res>(_self.location!, (value) {
|
||||
return _then(_self.copyWith(location: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,36 +34,29 @@ Map<String, dynamic> _$GeoIpLocationToJson(_GeoIpLocation instance) =>
|
||||
_SnAuthChallenge _$SnAuthChallengeFromJson(Map<String, dynamic> json) =>
|
||||
_SnAuthChallenge(
|
||||
id: json['id'] as String,
|
||||
expiredAt:
|
||||
json['expired_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['expired_at'] as String),
|
||||
expiredAt: json['expired_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['expired_at'] as String),
|
||||
stepRemain: (json['step_remain'] as num).toInt(),
|
||||
stepTotal: (json['step_total'] as num).toInt(),
|
||||
failedAttempts: (json['failed_attempts'] as num).toInt(),
|
||||
type: (json['type'] as num).toInt(),
|
||||
blacklistFactors:
|
||||
(json['blacklist_factors'] as List<dynamic>)
|
||||
.map((e) => e as String)
|
||||
.toList(),
|
||||
blacklistFactors: (json['blacklist_factors'] as List<dynamic>)
|
||||
.map((e) => e as String)
|
||||
.toList(),
|
||||
audiences: json['audiences'] as List<dynamic>,
|
||||
scopes: json['scopes'] as List<dynamic>,
|
||||
ipAddress: json['ip_address'] as String,
|
||||
userAgent: json['user_agent'] as String,
|
||||
nonce: json['nonce'] as String?,
|
||||
location:
|
||||
json['location'] == null
|
||||
? null
|
||||
: GeoIpLocation.fromJson(
|
||||
json['location'] as Map<String, dynamic>,
|
||||
),
|
||||
location: json['location'] == null
|
||||
? null
|
||||
: GeoIpLocation.fromJson(json['location'] as Map<String, dynamic>),
|
||||
accountId: json['account_id'] as String,
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt:
|
||||
json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnAuthChallengeToJson(_SnAuthChallenge instance) =>
|
||||
@@ -73,7 +66,6 @@ Map<String, dynamic> _$SnAuthChallengeToJson(_SnAuthChallenge instance) =>
|
||||
'step_remain': instance.stepRemain,
|
||||
'step_total': instance.stepTotal,
|
||||
'failed_attempts': instance.failedAttempts,
|
||||
'type': instance.type,
|
||||
'blacklist_factors': instance.blacklistFactors,
|
||||
'audiences': instance.audiences,
|
||||
'scopes': instance.scopes,
|
||||
@@ -92,21 +84,23 @@ _SnAuthSession _$SnAuthSessionFromJson(Map<String, dynamic> json) =>
|
||||
id: json['id'] as String,
|
||||
label: json['label'] as String?,
|
||||
lastGrantedAt: DateTime.parse(json['last_granted_at'] as String),
|
||||
expiredAt:
|
||||
json['expired_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['expired_at'] as String),
|
||||
expiredAt: json['expired_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['expired_at'] as String),
|
||||
audiences: json['audiences'] as List<dynamic>,
|
||||
scopes: json['scopes'] as List<dynamic>,
|
||||
ipAddress: json['ip_address'] as String?,
|
||||
userAgent: json['user_agent'] as String?,
|
||||
location: json['location'] == null
|
||||
? null
|
||||
: GeoIpLocation.fromJson(json['location'] as Map<String, dynamic>),
|
||||
type: (json['type'] as num).toInt(),
|
||||
accountId: json['account_id'] as String,
|
||||
challengeId: json['challenge_id'] as String,
|
||||
challenge: SnAuthChallenge.fromJson(
|
||||
json['challenge'] as Map<String, dynamic>,
|
||||
),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt:
|
||||
json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnAuthSessionToJson(_SnAuthSession instance) =>
|
||||
@@ -115,9 +109,13 @@ Map<String, dynamic> _$SnAuthSessionToJson(_SnAuthSession instance) =>
|
||||
'label': instance.label,
|
||||
'last_granted_at': instance.lastGrantedAt.toIso8601String(),
|
||||
'expired_at': instance.expiredAt?.toIso8601String(),
|
||||
'audiences': instance.audiences,
|
||||
'scopes': instance.scopes,
|
||||
'ip_address': instance.ipAddress,
|
||||
'user_agent': instance.userAgent,
|
||||
'location': instance.location?.toJson(),
|
||||
'type': instance.type,
|
||||
'account_id': instance.accountId,
|
||||
'challenge_id': instance.challengeId,
|
||||
'challenge': instance.challenge.toJson(),
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
'deleted_at': instance.deletedAt?.toIso8601String(),
|
||||
@@ -129,18 +127,15 @@ _SnAuthFactor _$SnAuthFactorFromJson(Map<String, dynamic> json) =>
|
||||
type: (json['type'] as num).toInt(),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt:
|
||||
json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
expiredAt:
|
||||
json['expired_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['expired_at'] as String),
|
||||
enabledAt:
|
||||
json['enabled_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['enabled_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
expiredAt: json['expired_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['expired_at'] as String),
|
||||
enabledAt: json['enabled_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['enabled_at'] as String),
|
||||
trustworthy: (json['trustworthy'] as num).toInt(),
|
||||
createdResponse: json['created_response'] as Map<String, dynamic>?,
|
||||
);
|
||||
@@ -168,10 +163,9 @@ _SnAccountConnection _$SnAccountConnectionFromJson(Map<String, dynamic> json) =>
|
||||
lastUsedAt: DateTime.parse(json['last_used_at'] as String),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt:
|
||||
json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnAccountConnectionToJson(
|
||||
|
||||
@@ -10,10 +10,9 @@ AutoCompletionAccountResponse _$AutoCompletionAccountResponseFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => AutoCompletionAccountResponse(
|
||||
type: json['type'] as String,
|
||||
items:
|
||||
(json['items'] as List<dynamic>)
|
||||
.map((e) => AutoCompletionItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
items: (json['items'] as List<dynamic>)
|
||||
.map((e) => AutoCompletionItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
$type: json['runtimeType'] as String?,
|
||||
);
|
||||
|
||||
@@ -29,10 +28,9 @@ AutoCompletionStickerResponse _$AutoCompletionStickerResponseFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => AutoCompletionStickerResponse(
|
||||
type: json['type'] as String,
|
||||
items:
|
||||
(json['items'] as List<dynamic>)
|
||||
.map((e) => AutoCompletionItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
items: (json['items'] as List<dynamic>)
|
||||
.map((e) => AutoCompletionItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
$type: json['runtimeType'] as String?,
|
||||
);
|
||||
|
||||
|
||||
@@ -14,10 +14,9 @@ _Bot _$BotFromJson(Map<String, dynamic> json) => _Bot(
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
account: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
||||
developer:
|
||||
json['developer'] == null
|
||||
? null
|
||||
: SnDeveloper.fromJson(json['developer'] as Map<String, dynamic>),
|
||||
developer: json['developer'] == null
|
||||
? null
|
||||
: SnDeveloper.fromJson(json['developer'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$BotToJson(_Bot instance) => <String, dynamic>{
|
||||
@@ -74,10 +73,9 @@ _BotSecret _$BotSecretFromJson(Map<String, dynamic> json) => _BotSecret(
|
||||
id: json['id'] as String? ?? '',
|
||||
secret: json['secret'] as String? ?? '',
|
||||
description: json['description'] as String?,
|
||||
expiredAt:
|
||||
json['expired_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['expired_at'] as String),
|
||||
expiredAt: json['expired_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['expired_at'] as String),
|
||||
botId: json['bot_id'] as String? ?? '',
|
||||
);
|
||||
|
||||
|
||||
@@ -18,11 +18,14 @@ sealed class SnChatRoom with _$SnChatRoom {
|
||||
required SnCloudFile? picture,
|
||||
required SnCloudFile? background,
|
||||
required String? realmId,
|
||||
required String? accountId,
|
||||
required SnRealm? realm,
|
||||
required DateTime createdAt,
|
||||
required DateTime updatedAt,
|
||||
required DateTime? deletedAt,
|
||||
required List<SnChatMember>? members,
|
||||
// Frontend data
|
||||
@Default(false) bool isPinned,
|
||||
}) = _SnChatRoom;
|
||||
|
||||
factory SnChatRoom.fromJson(Map<String, dynamic> json) =>
|
||||
@@ -85,12 +88,10 @@ sealed class SnChatMember with _$SnChatMember {
|
||||
required String accountId,
|
||||
required SnAccount account,
|
||||
required String? nick,
|
||||
required int role,
|
||||
required int notify,
|
||||
required DateTime? joinedAt,
|
||||
required DateTime? breakUntil,
|
||||
required DateTime? timeoutUntil,
|
||||
required bool isBot,
|
||||
required SnAccountStatus? status,
|
||||
// Frontend data
|
||||
DateTime? lastTyped,
|
||||
|
||||
@@ -15,7 +15,8 @@ T _$identity<T>(T value) => value;
|
||||
/// @nodoc
|
||||
mixin _$SnChatRoom {
|
||||
|
||||
String get id; String? get name; String? get description; int get type; bool get isPublic; bool get isCommunity; SnCloudFile? get picture; SnCloudFile? get background; String? get realmId; SnRealm? get realm; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt; List<SnChatMember>? get members;
|
||||
String get id; String? get name; String? get description; int get type; bool get isPublic; bool get isCommunity; SnCloudFile? get picture; SnCloudFile? get background; String? get realmId; String? get accountId; SnRealm? get realm; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt; List<SnChatMember>? get members;// Frontend data
|
||||
bool get isPinned;
|
||||
/// Create a copy of SnChatRoom
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -28,16 +29,16 @@ $SnChatRoomCopyWith<SnChatRoom> get copyWith => _$SnChatRoomCopyWithImpl<SnChatR
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnChatRoom&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.type, type) || other.type == type)&&(identical(other.isPublic, isPublic) || other.isPublic == isPublic)&&(identical(other.isCommunity, isCommunity) || other.isCommunity == isCommunity)&&(identical(other.picture, picture) || other.picture == picture)&&(identical(other.background, background) || other.background == background)&&(identical(other.realmId, realmId) || other.realmId == realmId)&&(identical(other.realm, realm) || other.realm == realm)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&const DeepCollectionEquality().equals(other.members, members));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnChatRoom&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.type, type) || other.type == type)&&(identical(other.isPublic, isPublic) || other.isPublic == isPublic)&&(identical(other.isCommunity, isCommunity) || other.isCommunity == isCommunity)&&(identical(other.picture, picture) || other.picture == picture)&&(identical(other.background, background) || other.background == background)&&(identical(other.realmId, realmId) || other.realmId == realmId)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.realm, realm) || other.realm == realm)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&const DeepCollectionEquality().equals(other.members, members)&&(identical(other.isPinned, isPinned) || other.isPinned == isPinned));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,name,description,type,isPublic,isCommunity,picture,background,realmId,realm,createdAt,updatedAt,deletedAt,const DeepCollectionEquality().hash(members));
|
||||
int get hashCode => Object.hash(runtimeType,id,name,description,type,isPublic,isCommunity,picture,background,realmId,accountId,realm,createdAt,updatedAt,deletedAt,const DeepCollectionEquality().hash(members),isPinned);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnChatRoom(id: $id, name: $name, description: $description, type: $type, isPublic: $isPublic, isCommunity: $isCommunity, picture: $picture, background: $background, realmId: $realmId, realm: $realm, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, members: $members)';
|
||||
return 'SnChatRoom(id: $id, name: $name, description: $description, type: $type, isPublic: $isPublic, isCommunity: $isCommunity, picture: $picture, background: $background, realmId: $realmId, accountId: $accountId, realm: $realm, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, members: $members, isPinned: $isPinned)';
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +49,7 @@ abstract mixin class $SnChatRoomCopyWith<$Res> {
|
||||
factory $SnChatRoomCopyWith(SnChatRoom value, $Res Function(SnChatRoom) _then) = _$SnChatRoomCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String id, String? name, String? description, int type, bool isPublic, bool isCommunity, SnCloudFile? picture, SnCloudFile? background, String? realmId, SnRealm? realm, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnChatMember>? members
|
||||
String id, String? name, String? description, int type, bool isPublic, bool isCommunity, SnCloudFile? picture, SnCloudFile? background, String? realmId, String? accountId, SnRealm? realm, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnChatMember>? members, bool isPinned
|
||||
});
|
||||
|
||||
|
||||
@@ -65,7 +66,7 @@ class _$SnChatRoomCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of SnChatRoom
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? name = freezed,Object? description = freezed,Object? type = null,Object? isPublic = null,Object? isCommunity = null,Object? picture = freezed,Object? background = freezed,Object? realmId = freezed,Object? realm = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,Object? members = freezed,}) {
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? name = freezed,Object? description = freezed,Object? type = null,Object? isPublic = null,Object? isCommunity = null,Object? picture = freezed,Object? background = freezed,Object? realmId = freezed,Object? accountId = freezed,Object? realm = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,Object? members = freezed,Object? isPinned = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||
@@ -76,12 +77,14 @@ as bool,isCommunity: null == isCommunity ? _self.isCommunity : isCommunity // ig
|
||||
as bool,picture: freezed == picture ? _self.picture : picture // ignore: cast_nullable_to_non_nullable
|
||||
as SnCloudFile?,background: freezed == background ? _self.background : background // ignore: cast_nullable_to_non_nullable
|
||||
as SnCloudFile?,realmId: freezed == realmId ? _self.realmId : realmId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,accountId: freezed == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,realm: freezed == realm ? _self.realm : realm // ignore: cast_nullable_to_non_nullable
|
||||
as SnRealm?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,members: freezed == members ? _self.members : members // ignore: cast_nullable_to_non_nullable
|
||||
as List<SnChatMember>?,
|
||||
as List<SnChatMember>?,isPinned: null == isPinned ? _self.isPinned : isPinned // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
));
|
||||
}
|
||||
/// Create a copy of SnChatRoom
|
||||
@@ -199,10 +202,10 @@ return $default(_that);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String? name, String? description, int type, bool isPublic, bool isCommunity, SnCloudFile? picture, SnCloudFile? background, String? realmId, SnRealm? realm, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnChatMember>? members)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String? name, String? description, int type, bool isPublic, bool isCommunity, SnCloudFile? picture, SnCloudFile? background, String? realmId, String? accountId, SnRealm? realm, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnChatMember>? members, bool isPinned)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnChatRoom() when $default != null:
|
||||
return $default(_that.id,_that.name,_that.description,_that.type,_that.isPublic,_that.isCommunity,_that.picture,_that.background,_that.realmId,_that.realm,_that.createdAt,_that.updatedAt,_that.deletedAt,_that.members);case _:
|
||||
return $default(_that.id,_that.name,_that.description,_that.type,_that.isPublic,_that.isCommunity,_that.picture,_that.background,_that.realmId,_that.accountId,_that.realm,_that.createdAt,_that.updatedAt,_that.deletedAt,_that.members,_that.isPinned);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
@@ -220,10 +223,10 @@ return $default(_that.id,_that.name,_that.description,_that.type,_that.isPublic,
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String? name, String? description, int type, bool isPublic, bool isCommunity, SnCloudFile? picture, SnCloudFile? background, String? realmId, SnRealm? realm, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnChatMember>? members) $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String? name, String? description, int type, bool isPublic, bool isCommunity, SnCloudFile? picture, SnCloudFile? background, String? realmId, String? accountId, SnRealm? realm, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnChatMember>? members, bool isPinned) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnChatRoom():
|
||||
return $default(_that.id,_that.name,_that.description,_that.type,_that.isPublic,_that.isCommunity,_that.picture,_that.background,_that.realmId,_that.realm,_that.createdAt,_that.updatedAt,_that.deletedAt,_that.members);}
|
||||
return $default(_that.id,_that.name,_that.description,_that.type,_that.isPublic,_that.isCommunity,_that.picture,_that.background,_that.realmId,_that.accountId,_that.realm,_that.createdAt,_that.updatedAt,_that.deletedAt,_that.members,_that.isPinned);}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
@@ -237,10 +240,10 @@ return $default(_that.id,_that.name,_that.description,_that.type,_that.isPublic,
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String? name, String? description, int type, bool isPublic, bool isCommunity, SnCloudFile? picture, SnCloudFile? background, String? realmId, SnRealm? realm, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnChatMember>? members)? $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String? name, String? description, int type, bool isPublic, bool isCommunity, SnCloudFile? picture, SnCloudFile? background, String? realmId, String? accountId, SnRealm? realm, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnChatMember>? members, bool isPinned)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnChatRoom() when $default != null:
|
||||
return $default(_that.id,_that.name,_that.description,_that.type,_that.isPublic,_that.isCommunity,_that.picture,_that.background,_that.realmId,_that.realm,_that.createdAt,_that.updatedAt,_that.deletedAt,_that.members);case _:
|
||||
return $default(_that.id,_that.name,_that.description,_that.type,_that.isPublic,_that.isCommunity,_that.picture,_that.background,_that.realmId,_that.accountId,_that.realm,_that.createdAt,_that.updatedAt,_that.deletedAt,_that.members,_that.isPinned);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
@@ -252,7 +255,7 @@ return $default(_that.id,_that.name,_that.description,_that.type,_that.isPublic,
|
||||
@JsonSerializable()
|
||||
|
||||
class _SnChatRoom implements SnChatRoom {
|
||||
const _SnChatRoom({required this.id, required this.name, required this.description, required this.type, this.isPublic = false, this.isCommunity = false, required this.picture, required this.background, required this.realmId, required this.realm, required this.createdAt, required this.updatedAt, required this.deletedAt, required final List<SnChatMember>? members}): _members = members;
|
||||
const _SnChatRoom({required this.id, required this.name, required this.description, required this.type, this.isPublic = false, this.isCommunity = false, required this.picture, required this.background, required this.realmId, required this.accountId, required this.realm, required this.createdAt, required this.updatedAt, required this.deletedAt, required final List<SnChatMember>? members, this.isPinned = false}): _members = members;
|
||||
factory _SnChatRoom.fromJson(Map<String, dynamic> json) => _$SnChatRoomFromJson(json);
|
||||
|
||||
@override final String id;
|
||||
@@ -264,6 +267,7 @@ class _SnChatRoom implements SnChatRoom {
|
||||
@override final SnCloudFile? picture;
|
||||
@override final SnCloudFile? background;
|
||||
@override final String? realmId;
|
||||
@override final String? accountId;
|
||||
@override final SnRealm? realm;
|
||||
@override final DateTime createdAt;
|
||||
@override final DateTime updatedAt;
|
||||
@@ -277,6 +281,8 @@ class _SnChatRoom implements SnChatRoom {
|
||||
return EqualUnmodifiableListView(value);
|
||||
}
|
||||
|
||||
// Frontend data
|
||||
@override@JsonKey() final bool isPinned;
|
||||
|
||||
/// Create a copy of SnChatRoom
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -291,16 +297,16 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnChatRoom&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.type, type) || other.type == type)&&(identical(other.isPublic, isPublic) || other.isPublic == isPublic)&&(identical(other.isCommunity, isCommunity) || other.isCommunity == isCommunity)&&(identical(other.picture, picture) || other.picture == picture)&&(identical(other.background, background) || other.background == background)&&(identical(other.realmId, realmId) || other.realmId == realmId)&&(identical(other.realm, realm) || other.realm == realm)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&const DeepCollectionEquality().equals(other._members, _members));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnChatRoom&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.type, type) || other.type == type)&&(identical(other.isPublic, isPublic) || other.isPublic == isPublic)&&(identical(other.isCommunity, isCommunity) || other.isCommunity == isCommunity)&&(identical(other.picture, picture) || other.picture == picture)&&(identical(other.background, background) || other.background == background)&&(identical(other.realmId, realmId) || other.realmId == realmId)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.realm, realm) || other.realm == realm)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&const DeepCollectionEquality().equals(other._members, _members)&&(identical(other.isPinned, isPinned) || other.isPinned == isPinned));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,name,description,type,isPublic,isCommunity,picture,background,realmId,realm,createdAt,updatedAt,deletedAt,const DeepCollectionEquality().hash(_members));
|
||||
int get hashCode => Object.hash(runtimeType,id,name,description,type,isPublic,isCommunity,picture,background,realmId,accountId,realm,createdAt,updatedAt,deletedAt,const DeepCollectionEquality().hash(_members),isPinned);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnChatRoom(id: $id, name: $name, description: $description, type: $type, isPublic: $isPublic, isCommunity: $isCommunity, picture: $picture, background: $background, realmId: $realmId, realm: $realm, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, members: $members)';
|
||||
return 'SnChatRoom(id: $id, name: $name, description: $description, type: $type, isPublic: $isPublic, isCommunity: $isCommunity, picture: $picture, background: $background, realmId: $realmId, accountId: $accountId, realm: $realm, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, members: $members, isPinned: $isPinned)';
|
||||
}
|
||||
|
||||
|
||||
@@ -311,7 +317,7 @@ abstract mixin class _$SnChatRoomCopyWith<$Res> implements $SnChatRoomCopyWith<$
|
||||
factory _$SnChatRoomCopyWith(_SnChatRoom value, $Res Function(_SnChatRoom) _then) = __$SnChatRoomCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String id, String? name, String? description, int type, bool isPublic, bool isCommunity, SnCloudFile? picture, SnCloudFile? background, String? realmId, SnRealm? realm, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnChatMember>? members
|
||||
String id, String? name, String? description, int type, bool isPublic, bool isCommunity, SnCloudFile? picture, SnCloudFile? background, String? realmId, String? accountId, SnRealm? realm, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnChatMember>? members, bool isPinned
|
||||
});
|
||||
|
||||
|
||||
@@ -328,7 +334,7 @@ class __$SnChatRoomCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of SnChatRoom
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = freezed,Object? description = freezed,Object? type = null,Object? isPublic = null,Object? isCommunity = null,Object? picture = freezed,Object? background = freezed,Object? realmId = freezed,Object? realm = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,Object? members = freezed,}) {
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = freezed,Object? description = freezed,Object? type = null,Object? isPublic = null,Object? isCommunity = null,Object? picture = freezed,Object? background = freezed,Object? realmId = freezed,Object? accountId = freezed,Object? realm = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,Object? members = freezed,Object? isPinned = null,}) {
|
||||
return _then(_SnChatRoom(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||
@@ -339,12 +345,14 @@ as bool,isCommunity: null == isCommunity ? _self.isCommunity : isCommunity // ig
|
||||
as bool,picture: freezed == picture ? _self.picture : picture // ignore: cast_nullable_to_non_nullable
|
||||
as SnCloudFile?,background: freezed == background ? _self.background : background // ignore: cast_nullable_to_non_nullable
|
||||
as SnCloudFile?,realmId: freezed == realmId ? _self.realmId : realmId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,accountId: freezed == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,realm: freezed == realm ? _self.realm : realm // ignore: cast_nullable_to_non_nullable
|
||||
as SnRealm?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,members: freezed == members ? _self._members : members // ignore: cast_nullable_to_non_nullable
|
||||
as List<SnChatMember>?,
|
||||
as List<SnChatMember>?,isPinned: null == isPinned ? _self.isPinned : isPinned // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
));
|
||||
}
|
||||
|
||||
@@ -1037,7 +1045,7 @@ $SnChatMemberCopyWith<$Res> get sender {
|
||||
/// @nodoc
|
||||
mixin _$SnChatMember {
|
||||
|
||||
DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt; String get id; String get chatRoomId; SnChatRoom? get chatRoom; String get accountId; SnAccount get account; String? get nick; int get role; int get notify; DateTime? get joinedAt; DateTime? get breakUntil; DateTime? get timeoutUntil; bool get isBot; SnAccountStatus? get status;// Frontend data
|
||||
DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt; String get id; String get chatRoomId; SnChatRoom? get chatRoom; String get accountId; SnAccount get account; String? get nick; int get notify; DateTime? get joinedAt; DateTime? get breakUntil; DateTime? get timeoutUntil; SnAccountStatus? get status;// Frontend data
|
||||
DateTime? get lastTyped;
|
||||
/// Create a copy of SnChatMember
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -1051,16 +1059,16 @@ $SnChatMemberCopyWith<SnChatMember> get copyWith => _$SnChatMemberCopyWithImpl<S
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnChatMember&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&(identical(other.id, id) || other.id == id)&&(identical(other.chatRoomId, chatRoomId) || other.chatRoomId == chatRoomId)&&(identical(other.chatRoom, chatRoom) || other.chatRoom == chatRoom)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.account, account) || other.account == account)&&(identical(other.nick, nick) || other.nick == nick)&&(identical(other.role, role) || other.role == role)&&(identical(other.notify, notify) || other.notify == notify)&&(identical(other.joinedAt, joinedAt) || other.joinedAt == joinedAt)&&(identical(other.breakUntil, breakUntil) || other.breakUntil == breakUntil)&&(identical(other.timeoutUntil, timeoutUntil) || other.timeoutUntil == timeoutUntil)&&(identical(other.isBot, isBot) || other.isBot == isBot)&&(identical(other.status, status) || other.status == status)&&(identical(other.lastTyped, lastTyped) || other.lastTyped == lastTyped));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnChatMember&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&(identical(other.id, id) || other.id == id)&&(identical(other.chatRoomId, chatRoomId) || other.chatRoomId == chatRoomId)&&(identical(other.chatRoom, chatRoom) || other.chatRoom == chatRoom)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.account, account) || other.account == account)&&(identical(other.nick, nick) || other.nick == nick)&&(identical(other.notify, notify) || other.notify == notify)&&(identical(other.joinedAt, joinedAt) || other.joinedAt == joinedAt)&&(identical(other.breakUntil, breakUntil) || other.breakUntil == breakUntil)&&(identical(other.timeoutUntil, timeoutUntil) || other.timeoutUntil == timeoutUntil)&&(identical(other.status, status) || other.status == status)&&(identical(other.lastTyped, lastTyped) || other.lastTyped == lastTyped));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,createdAt,updatedAt,deletedAt,id,chatRoomId,chatRoom,accountId,account,nick,role,notify,joinedAt,breakUntil,timeoutUntil,isBot,status,lastTyped);
|
||||
int get hashCode => Object.hash(runtimeType,createdAt,updatedAt,deletedAt,id,chatRoomId,chatRoom,accountId,account,nick,notify,joinedAt,breakUntil,timeoutUntil,status,lastTyped);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnChatMember(createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, id: $id, chatRoomId: $chatRoomId, chatRoom: $chatRoom, accountId: $accountId, account: $account, nick: $nick, role: $role, notify: $notify, joinedAt: $joinedAt, breakUntil: $breakUntil, timeoutUntil: $timeoutUntil, isBot: $isBot, status: $status, lastTyped: $lastTyped)';
|
||||
return 'SnChatMember(createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, id: $id, chatRoomId: $chatRoomId, chatRoom: $chatRoom, accountId: $accountId, account: $account, nick: $nick, notify: $notify, joinedAt: $joinedAt, breakUntil: $breakUntil, timeoutUntil: $timeoutUntil, status: $status, lastTyped: $lastTyped)';
|
||||
}
|
||||
|
||||
|
||||
@@ -1071,7 +1079,7 @@ abstract mixin class $SnChatMemberCopyWith<$Res> {
|
||||
factory $SnChatMemberCopyWith(SnChatMember value, $Res Function(SnChatMember) _then) = _$SnChatMemberCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String id, String chatRoomId, SnChatRoom? chatRoom, String accountId, SnAccount account, String? nick, int role, int notify, DateTime? joinedAt, DateTime? breakUntil, DateTime? timeoutUntil, bool isBot, SnAccountStatus? status, DateTime? lastTyped
|
||||
DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String id, String chatRoomId, SnChatRoom? chatRoom, String accountId, SnAccount account, String? nick, int notify, DateTime? joinedAt, DateTime? breakUntil, DateTime? timeoutUntil, SnAccountStatus? status, DateTime? lastTyped
|
||||
});
|
||||
|
||||
|
||||
@@ -1088,7 +1096,7 @@ class _$SnChatMemberCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of SnChatMember
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,Object? id = null,Object? chatRoomId = null,Object? chatRoom = freezed,Object? accountId = null,Object? account = null,Object? nick = freezed,Object? role = null,Object? notify = null,Object? joinedAt = freezed,Object? breakUntil = freezed,Object? timeoutUntil = freezed,Object? isBot = null,Object? status = freezed,Object? lastTyped = freezed,}) {
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,Object? id = null,Object? chatRoomId = null,Object? chatRoom = freezed,Object? accountId = null,Object? account = null,Object? nick = freezed,Object? notify = null,Object? joinedAt = freezed,Object? breakUntil = freezed,Object? timeoutUntil = freezed,Object? status = freezed,Object? lastTyped = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
@@ -1099,13 +1107,11 @@ as String,chatRoom: freezed == chatRoom ? _self.chatRoom : chatRoom // ignore: c
|
||||
as SnChatRoom?,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
|
||||
as String,account: null == account ? _self.account : account // ignore: cast_nullable_to_non_nullable
|
||||
as SnAccount,nick: freezed == nick ? _self.nick : nick // ignore: cast_nullable_to_non_nullable
|
||||
as String?,role: null == role ? _self.role : role // ignore: cast_nullable_to_non_nullable
|
||||
as int,notify: null == notify ? _self.notify : notify // ignore: cast_nullable_to_non_nullable
|
||||
as String?,notify: null == notify ? _self.notify : notify // ignore: cast_nullable_to_non_nullable
|
||||
as int,joinedAt: freezed == joinedAt ? _self.joinedAt : joinedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,breakUntil: freezed == breakUntil ? _self.breakUntil : breakUntil // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,timeoutUntil: freezed == timeoutUntil ? _self.timeoutUntil : timeoutUntil // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,isBot: null == isBot ? _self.isBot : isBot // ignore: cast_nullable_to_non_nullable
|
||||
as bool,status: freezed == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,status: freezed == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
|
||||
as SnAccountStatus?,lastTyped: freezed == lastTyped ? _self.lastTyped : lastTyped // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
));
|
||||
@@ -1222,10 +1228,10 @@ return $default(_that);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String id, String chatRoomId, SnChatRoom? chatRoom, String accountId, SnAccount account, String? nick, int role, int notify, DateTime? joinedAt, DateTime? breakUntil, DateTime? timeoutUntil, bool isBot, SnAccountStatus? status, DateTime? lastTyped)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String id, String chatRoomId, SnChatRoom? chatRoom, String accountId, SnAccount account, String? nick, int notify, DateTime? joinedAt, DateTime? breakUntil, DateTime? timeoutUntil, SnAccountStatus? status, DateTime? lastTyped)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnChatMember() when $default != null:
|
||||
return $default(_that.createdAt,_that.updatedAt,_that.deletedAt,_that.id,_that.chatRoomId,_that.chatRoom,_that.accountId,_that.account,_that.nick,_that.role,_that.notify,_that.joinedAt,_that.breakUntil,_that.timeoutUntil,_that.isBot,_that.status,_that.lastTyped);case _:
|
||||
return $default(_that.createdAt,_that.updatedAt,_that.deletedAt,_that.id,_that.chatRoomId,_that.chatRoom,_that.accountId,_that.account,_that.nick,_that.notify,_that.joinedAt,_that.breakUntil,_that.timeoutUntil,_that.status,_that.lastTyped);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
@@ -1243,10 +1249,10 @@ return $default(_that.createdAt,_that.updatedAt,_that.deletedAt,_that.id,_that.c
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String id, String chatRoomId, SnChatRoom? chatRoom, String accountId, SnAccount account, String? nick, int role, int notify, DateTime? joinedAt, DateTime? breakUntil, DateTime? timeoutUntil, bool isBot, SnAccountStatus? status, DateTime? lastTyped) $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String id, String chatRoomId, SnChatRoom? chatRoom, String accountId, SnAccount account, String? nick, int notify, DateTime? joinedAt, DateTime? breakUntil, DateTime? timeoutUntil, SnAccountStatus? status, DateTime? lastTyped) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnChatMember():
|
||||
return $default(_that.createdAt,_that.updatedAt,_that.deletedAt,_that.id,_that.chatRoomId,_that.chatRoom,_that.accountId,_that.account,_that.nick,_that.role,_that.notify,_that.joinedAt,_that.breakUntil,_that.timeoutUntil,_that.isBot,_that.status,_that.lastTyped);}
|
||||
return $default(_that.createdAt,_that.updatedAt,_that.deletedAt,_that.id,_that.chatRoomId,_that.chatRoom,_that.accountId,_that.account,_that.nick,_that.notify,_that.joinedAt,_that.breakUntil,_that.timeoutUntil,_that.status,_that.lastTyped);}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
@@ -1260,10 +1266,10 @@ return $default(_that.createdAt,_that.updatedAt,_that.deletedAt,_that.id,_that.c
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String id, String chatRoomId, SnChatRoom? chatRoom, String accountId, SnAccount account, String? nick, int role, int notify, DateTime? joinedAt, DateTime? breakUntil, DateTime? timeoutUntil, bool isBot, SnAccountStatus? status, DateTime? lastTyped)? $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String id, String chatRoomId, SnChatRoom? chatRoom, String accountId, SnAccount account, String? nick, int notify, DateTime? joinedAt, DateTime? breakUntil, DateTime? timeoutUntil, SnAccountStatus? status, DateTime? lastTyped)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnChatMember() when $default != null:
|
||||
return $default(_that.createdAt,_that.updatedAt,_that.deletedAt,_that.id,_that.chatRoomId,_that.chatRoom,_that.accountId,_that.account,_that.nick,_that.role,_that.notify,_that.joinedAt,_that.breakUntil,_that.timeoutUntil,_that.isBot,_that.status,_that.lastTyped);case _:
|
||||
return $default(_that.createdAt,_that.updatedAt,_that.deletedAt,_that.id,_that.chatRoomId,_that.chatRoom,_that.accountId,_that.account,_that.nick,_that.notify,_that.joinedAt,_that.breakUntil,_that.timeoutUntil,_that.status,_that.lastTyped);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
@@ -1275,7 +1281,7 @@ return $default(_that.createdAt,_that.updatedAt,_that.deletedAt,_that.id,_that.c
|
||||
@JsonSerializable()
|
||||
|
||||
class _SnChatMember implements SnChatMember {
|
||||
const _SnChatMember({required this.createdAt, required this.updatedAt, required this.deletedAt, required this.id, required this.chatRoomId, required this.chatRoom, required this.accountId, required this.account, required this.nick, required this.role, required this.notify, required this.joinedAt, required this.breakUntil, required this.timeoutUntil, required this.isBot, required this.status, this.lastTyped});
|
||||
const _SnChatMember({required this.createdAt, required this.updatedAt, required this.deletedAt, required this.id, required this.chatRoomId, required this.chatRoom, required this.accountId, required this.account, required this.nick, required this.notify, required this.joinedAt, required this.breakUntil, required this.timeoutUntil, required this.status, this.lastTyped});
|
||||
factory _SnChatMember.fromJson(Map<String, dynamic> json) => _$SnChatMemberFromJson(json);
|
||||
|
||||
@override final DateTime createdAt;
|
||||
@@ -1287,12 +1293,10 @@ class _SnChatMember implements SnChatMember {
|
||||
@override final String accountId;
|
||||
@override final SnAccount account;
|
||||
@override final String? nick;
|
||||
@override final int role;
|
||||
@override final int notify;
|
||||
@override final DateTime? joinedAt;
|
||||
@override final DateTime? breakUntil;
|
||||
@override final DateTime? timeoutUntil;
|
||||
@override final bool isBot;
|
||||
@override final SnAccountStatus? status;
|
||||
// Frontend data
|
||||
@override final DateTime? lastTyped;
|
||||
@@ -1310,16 +1314,16 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnChatMember&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&(identical(other.id, id) || other.id == id)&&(identical(other.chatRoomId, chatRoomId) || other.chatRoomId == chatRoomId)&&(identical(other.chatRoom, chatRoom) || other.chatRoom == chatRoom)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.account, account) || other.account == account)&&(identical(other.nick, nick) || other.nick == nick)&&(identical(other.role, role) || other.role == role)&&(identical(other.notify, notify) || other.notify == notify)&&(identical(other.joinedAt, joinedAt) || other.joinedAt == joinedAt)&&(identical(other.breakUntil, breakUntil) || other.breakUntil == breakUntil)&&(identical(other.timeoutUntil, timeoutUntil) || other.timeoutUntil == timeoutUntil)&&(identical(other.isBot, isBot) || other.isBot == isBot)&&(identical(other.status, status) || other.status == status)&&(identical(other.lastTyped, lastTyped) || other.lastTyped == lastTyped));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnChatMember&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&(identical(other.id, id) || other.id == id)&&(identical(other.chatRoomId, chatRoomId) || other.chatRoomId == chatRoomId)&&(identical(other.chatRoom, chatRoom) || other.chatRoom == chatRoom)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.account, account) || other.account == account)&&(identical(other.nick, nick) || other.nick == nick)&&(identical(other.notify, notify) || other.notify == notify)&&(identical(other.joinedAt, joinedAt) || other.joinedAt == joinedAt)&&(identical(other.breakUntil, breakUntil) || other.breakUntil == breakUntil)&&(identical(other.timeoutUntil, timeoutUntil) || other.timeoutUntil == timeoutUntil)&&(identical(other.status, status) || other.status == status)&&(identical(other.lastTyped, lastTyped) || other.lastTyped == lastTyped));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,createdAt,updatedAt,deletedAt,id,chatRoomId,chatRoom,accountId,account,nick,role,notify,joinedAt,breakUntil,timeoutUntil,isBot,status,lastTyped);
|
||||
int get hashCode => Object.hash(runtimeType,createdAt,updatedAt,deletedAt,id,chatRoomId,chatRoom,accountId,account,nick,notify,joinedAt,breakUntil,timeoutUntil,status,lastTyped);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnChatMember(createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, id: $id, chatRoomId: $chatRoomId, chatRoom: $chatRoom, accountId: $accountId, account: $account, nick: $nick, role: $role, notify: $notify, joinedAt: $joinedAt, breakUntil: $breakUntil, timeoutUntil: $timeoutUntil, isBot: $isBot, status: $status, lastTyped: $lastTyped)';
|
||||
return 'SnChatMember(createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, id: $id, chatRoomId: $chatRoomId, chatRoom: $chatRoom, accountId: $accountId, account: $account, nick: $nick, notify: $notify, joinedAt: $joinedAt, breakUntil: $breakUntil, timeoutUntil: $timeoutUntil, status: $status, lastTyped: $lastTyped)';
|
||||
}
|
||||
|
||||
|
||||
@@ -1330,7 +1334,7 @@ abstract mixin class _$SnChatMemberCopyWith<$Res> implements $SnChatMemberCopyWi
|
||||
factory _$SnChatMemberCopyWith(_SnChatMember value, $Res Function(_SnChatMember) _then) = __$SnChatMemberCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String id, String chatRoomId, SnChatRoom? chatRoom, String accountId, SnAccount account, String? nick, int role, int notify, DateTime? joinedAt, DateTime? breakUntil, DateTime? timeoutUntil, bool isBot, SnAccountStatus? status, DateTime? lastTyped
|
||||
DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, String id, String chatRoomId, SnChatRoom? chatRoom, String accountId, SnAccount account, String? nick, int notify, DateTime? joinedAt, DateTime? breakUntil, DateTime? timeoutUntil, SnAccountStatus? status, DateTime? lastTyped
|
||||
});
|
||||
|
||||
|
||||
@@ -1347,7 +1351,7 @@ class __$SnChatMemberCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of SnChatMember
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,Object? id = null,Object? chatRoomId = null,Object? chatRoom = freezed,Object? accountId = null,Object? account = null,Object? nick = freezed,Object? role = null,Object? notify = null,Object? joinedAt = freezed,Object? breakUntil = freezed,Object? timeoutUntil = freezed,Object? isBot = null,Object? status = freezed,Object? lastTyped = freezed,}) {
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,Object? id = null,Object? chatRoomId = null,Object? chatRoom = freezed,Object? accountId = null,Object? account = null,Object? nick = freezed,Object? notify = null,Object? joinedAt = freezed,Object? breakUntil = freezed,Object? timeoutUntil = freezed,Object? status = freezed,Object? lastTyped = freezed,}) {
|
||||
return _then(_SnChatMember(
|
||||
createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
@@ -1358,13 +1362,11 @@ as String,chatRoom: freezed == chatRoom ? _self.chatRoom : chatRoom // ignore: c
|
||||
as SnChatRoom?,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
|
||||
as String,account: null == account ? _self.account : account // ignore: cast_nullable_to_non_nullable
|
||||
as SnAccount,nick: freezed == nick ? _self.nick : nick // ignore: cast_nullable_to_non_nullable
|
||||
as String?,role: null == role ? _self.role : role // ignore: cast_nullable_to_non_nullable
|
||||
as int,notify: null == notify ? _self.notify : notify // ignore: cast_nullable_to_non_nullable
|
||||
as String?,notify: null == notify ? _self.notify : notify // ignore: cast_nullable_to_non_nullable
|
||||
as int,joinedAt: freezed == joinedAt ? _self.joinedAt : joinedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,breakUntil: freezed == breakUntil ? _self.breakUntil : breakUntil // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,timeoutUntil: freezed == timeoutUntil ? _self.timeoutUntil : timeoutUntil // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,isBot: null == isBot ? _self.isBot : isBot // ignore: cast_nullable_to_non_nullable
|
||||
as bool,status: freezed == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,status: freezed == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
|
||||
as SnAccountStatus?,lastTyped: freezed == lastTyped ? _self.lastTyped : lastTyped // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
));
|
||||
|
||||
@@ -13,29 +13,26 @@ _SnChatRoom _$SnChatRoomFromJson(Map<String, dynamic> json) => _SnChatRoom(
|
||||
type: (json['type'] as num).toInt(),
|
||||
isPublic: json['is_public'] as bool? ?? false,
|
||||
isCommunity: json['is_community'] as bool? ?? false,
|
||||
picture:
|
||||
json['picture'] == null
|
||||
? null
|
||||
: SnCloudFile.fromJson(json['picture'] as Map<String, dynamic>),
|
||||
background:
|
||||
json['background'] == null
|
||||
? null
|
||||
: SnCloudFile.fromJson(json['background'] as Map<String, dynamic>),
|
||||
picture: json['picture'] == null
|
||||
? null
|
||||
: SnCloudFile.fromJson(json['picture'] as Map<String, dynamic>),
|
||||
background: json['background'] == null
|
||||
? null
|
||||
: SnCloudFile.fromJson(json['background'] as Map<String, dynamic>),
|
||||
realmId: json['realm_id'] as String?,
|
||||
realm:
|
||||
json['realm'] == null
|
||||
? null
|
||||
: SnRealm.fromJson(json['realm'] as Map<String, dynamic>),
|
||||
accountId: json['account_id'] as String?,
|
||||
realm: json['realm'] == null
|
||||
? null
|
||||
: SnRealm.fromJson(json['realm'] as Map<String, dynamic>),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt:
|
||||
json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
members:
|
||||
(json['members'] as List<dynamic>?)
|
||||
?.map((e) => SnChatMember.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
members: (json['members'] as List<dynamic>?)
|
||||
?.map((e) => SnChatMember.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
isPinned: json['is_pinned'] as bool? ?? false,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnChatRoomToJson(_SnChatRoom instance) =>
|
||||
@@ -49,21 +46,22 @@ Map<String, dynamic> _$SnChatRoomToJson(_SnChatRoom instance) =>
|
||||
'picture': instance.picture?.toJson(),
|
||||
'background': instance.background?.toJson(),
|
||||
'realm_id': instance.realmId,
|
||||
'account_id': instance.accountId,
|
||||
'realm': instance.realm?.toJson(),
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
'deleted_at': instance.deletedAt?.toIso8601String(),
|
||||
'members': instance.members?.map((e) => e.toJson()).toList(),
|
||||
'is_pinned': instance.isPinned,
|
||||
};
|
||||
|
||||
_SnChatMessage _$SnChatMessageFromJson(Map<String, dynamic> json) =>
|
||||
_SnChatMessage(
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt:
|
||||
json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
id: json['id'] as String,
|
||||
type: json['type'] as String? ?? 'text',
|
||||
content: json['content'] as String?,
|
||||
@@ -74,10 +72,9 @@ _SnChatMessage _$SnChatMessageFromJson(Map<String, dynamic> json) =>
|
||||
?.map((e) => e as String)
|
||||
.toList() ??
|
||||
const [],
|
||||
editedAt:
|
||||
json['edited_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['edited_at'] as String),
|
||||
editedAt: json['edited_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['edited_at'] as String),
|
||||
attachments:
|
||||
(json['attachments'] as List<dynamic>?)
|
||||
?.map((e) => SnCloudFile.fromJson(e as Map<String, dynamic>))
|
||||
@@ -120,10 +117,9 @@ _SnChatReaction _$SnChatReactionFromJson(Map<String, dynamic> json) =>
|
||||
_SnChatReaction(
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt:
|
||||
json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
id: json['id'] as String,
|
||||
messageId: json['message_id'] as String,
|
||||
senderId: json['sender_id'] as String,
|
||||
@@ -149,44 +145,33 @@ _SnChatMember _$SnChatMemberFromJson(Map<String, dynamic> json) =>
|
||||
_SnChatMember(
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt:
|
||||
json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
id: json['id'] as String,
|
||||
chatRoomId: json['chat_room_id'] as String,
|
||||
chatRoom:
|
||||
json['chat_room'] == null
|
||||
? null
|
||||
: SnChatRoom.fromJson(json['chat_room'] as Map<String, dynamic>),
|
||||
chatRoom: json['chat_room'] == null
|
||||
? null
|
||||
: SnChatRoom.fromJson(json['chat_room'] as Map<String, dynamic>),
|
||||
accountId: json['account_id'] as String,
|
||||
account: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
||||
nick: json['nick'] as String?,
|
||||
role: (json['role'] as num).toInt(),
|
||||
notify: (json['notify'] as num).toInt(),
|
||||
joinedAt:
|
||||
json['joined_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['joined_at'] as String),
|
||||
breakUntil:
|
||||
json['break_until'] == null
|
||||
? null
|
||||
: DateTime.parse(json['break_until'] as String),
|
||||
timeoutUntil:
|
||||
json['timeout_until'] == null
|
||||
? null
|
||||
: DateTime.parse(json['timeout_until'] as String),
|
||||
isBot: json['is_bot'] as bool,
|
||||
status:
|
||||
json['status'] == null
|
||||
? null
|
||||
: SnAccountStatus.fromJson(
|
||||
json['status'] as Map<String, dynamic>,
|
||||
),
|
||||
lastTyped:
|
||||
json['last_typed'] == null
|
||||
? null
|
||||
: DateTime.parse(json['last_typed'] as String),
|
||||
joinedAt: json['joined_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['joined_at'] as String),
|
||||
breakUntil: json['break_until'] == null
|
||||
? null
|
||||
: DateTime.parse(json['break_until'] as String),
|
||||
timeoutUntil: json['timeout_until'] == null
|
||||
? null
|
||||
: DateTime.parse(json['timeout_until'] as String),
|
||||
status: json['status'] == null
|
||||
? null
|
||||
: SnAccountStatus.fromJson(json['status'] as Map<String, dynamic>),
|
||||
lastTyped: json['last_typed'] == null
|
||||
? null
|
||||
: DateTime.parse(json['last_typed'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnChatMemberToJson(_SnChatMember instance) =>
|
||||
@@ -200,12 +185,10 @@ Map<String, dynamic> _$SnChatMemberToJson(_SnChatMember instance) =>
|
||||
'account_id': instance.accountId,
|
||||
'account': instance.account.toJson(),
|
||||
'nick': instance.nick,
|
||||
'role': instance.role,
|
||||
'notify': instance.notify,
|
||||
'joined_at': instance.joinedAt?.toIso8601String(),
|
||||
'break_until': instance.breakUntil?.toIso8601String(),
|
||||
'timeout_until': instance.timeoutUntil?.toIso8601String(),
|
||||
'is_bot': instance.isBot,
|
||||
'status': instance.status?.toJson(),
|
||||
'last_typed': instance.lastTyped?.toIso8601String(),
|
||||
};
|
||||
@@ -213,12 +196,11 @@ Map<String, dynamic> _$SnChatMemberToJson(_SnChatMember instance) =>
|
||||
_SnChatSummary _$SnChatSummaryFromJson(Map<String, dynamic> json) =>
|
||||
_SnChatSummary(
|
||||
unreadCount: (json['unread_count'] as num).toInt(),
|
||||
lastMessage:
|
||||
json['last_message'] == null
|
||||
? null
|
||||
: SnChatMessage.fromJson(
|
||||
json['last_message'] as Map<String, dynamic>,
|
||||
),
|
||||
lastMessage: json['last_message'] == null
|
||||
? null
|
||||
: SnChatMessage.fromJson(
|
||||
json['last_message'] as Map<String, dynamic>,
|
||||
),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnChatSummaryToJson(_SnChatSummary instance) =>
|
||||
@@ -253,10 +235,9 @@ _ChatRealtimeJoinResponse _$ChatRealtimeJoinResponseFromJson(
|
||||
callId: json['call_id'] as String,
|
||||
roomName: json['room_name'] as String,
|
||||
isAdmin: json['is_admin'] as bool,
|
||||
participants:
|
||||
(json['participants'] as List<dynamic>)
|
||||
.map((e) => CallParticipant.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
participants: (json['participants'] as List<dynamic>)
|
||||
.map((e) => CallParticipant.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ChatRealtimeJoinResponseToJson(
|
||||
@@ -290,14 +271,12 @@ _SnRealtimeCall _$SnRealtimeCallFromJson(Map<String, dynamic> json) =>
|
||||
id: json['id'] as String,
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt:
|
||||
json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
endedAt:
|
||||
json['ended_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['ended_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
endedAt: json['ended_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['ended_at'] as String),
|
||||
senderId: json['sender_id'] as String,
|
||||
sender: SnChatMember.fromJson(json['sender'] as Map<String, dynamic>),
|
||||
roomId: json['room_id'] as String,
|
||||
|
||||
@@ -12,30 +12,25 @@ _CustomApp _$CustomAppFromJson(Map<String, dynamic> json) => _CustomApp(
|
||||
name: json['name'] as String? ?? '',
|
||||
description: json['description'] as String?,
|
||||
status: (json['status'] as num?)?.toInt() ?? 0,
|
||||
picture:
|
||||
json['picture'] == null
|
||||
? null
|
||||
: SnCloudFile.fromJson(json['picture'] as Map<String, dynamic>),
|
||||
background:
|
||||
json['background'] == null
|
||||
? null
|
||||
: SnCloudFile.fromJson(json['background'] as Map<String, dynamic>),
|
||||
verification:
|
||||
json['verification'] == null
|
||||
? null
|
||||
: SnVerificationMark.fromJson(
|
||||
json['verification'] as Map<String, dynamic>,
|
||||
),
|
||||
oauthConfig:
|
||||
json['oauth_config'] == null
|
||||
? null
|
||||
: CustomAppOauthConfig.fromJson(
|
||||
json['oauth_config'] as Map<String, dynamic>,
|
||||
),
|
||||
links:
|
||||
json['links'] == null
|
||||
? null
|
||||
: CustomAppLinks.fromJson(json['links'] as Map<String, dynamic>),
|
||||
picture: json['picture'] == null
|
||||
? null
|
||||
: SnCloudFile.fromJson(json['picture'] as Map<String, dynamic>),
|
||||
background: json['background'] == null
|
||||
? null
|
||||
: SnCloudFile.fromJson(json['background'] as Map<String, dynamic>),
|
||||
verification: json['verification'] == null
|
||||
? null
|
||||
: SnVerificationMark.fromJson(
|
||||
json['verification'] as Map<String, dynamic>,
|
||||
),
|
||||
oauthConfig: json['oauth_config'] == null
|
||||
? null
|
||||
: CustomAppOauthConfig.fromJson(
|
||||
json['oauth_config'] as Map<String, dynamic>,
|
||||
),
|
||||
links: json['links'] == null
|
||||
? null
|
||||
: CustomAppLinks.fromJson(json['links'] as Map<String, dynamic>),
|
||||
secrets:
|
||||
(json['secrets'] as List<dynamic>?)
|
||||
?.map((e) => CustomAppSecret.fromJson(e as Map<String, dynamic>))
|
||||
@@ -83,10 +78,9 @@ _CustomAppOauthConfig _$CustomAppOauthConfigFromJson(
|
||||
?.map((e) => e as String)
|
||||
.toList() ??
|
||||
const [],
|
||||
postLogoutRedirectUris:
|
||||
(json['post_logout_redirect_uris'] as List<dynamic>?)
|
||||
?.map((e) => e as String)
|
||||
.toList(),
|
||||
postLogoutRedirectUris: (json['post_logout_redirect_uris'] as List<dynamic>?)
|
||||
?.map((e) => e as String)
|
||||
.toList(),
|
||||
allowedScopes:
|
||||
(json['allowed_scopes'] as List<dynamic>?)
|
||||
?.map((e) => e as String)
|
||||
@@ -118,10 +112,9 @@ _CustomAppSecret _$CustomAppSecretFromJson(Map<String, dynamic> json) =>
|
||||
id: json['id'] as String? ?? '',
|
||||
secret: json['secret'] as String? ?? '',
|
||||
description: json['description'] as String?,
|
||||
expiredAt:
|
||||
json['expired_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['expired_at'] as String),
|
||||
expiredAt: json['expired_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['expired_at'] as String),
|
||||
isOidc: json['is_oidc'] as bool? ?? false,
|
||||
appId: json['app_id'] as String? ?? '',
|
||||
);
|
||||
|
||||
@@ -9,10 +9,9 @@ part of 'developer.dart';
|
||||
_SnDeveloper _$SnDeveloperFromJson(Map<String, dynamic> json) => _SnDeveloper(
|
||||
id: json['id'] as String,
|
||||
publisherId: json['publisher_id'] as String,
|
||||
publisher:
|
||||
json['publisher'] == null
|
||||
? null
|
||||
: SnPublisher.fromJson(json['publisher'] as Map<String, dynamic>),
|
||||
publisher: json['publisher'] == null
|
||||
? null
|
||||
: SnPublisher.fromJson(json['publisher'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnDeveloperToJson(_SnDeveloper instance) =>
|
||||
|
||||
57
lib/models/drive_task.dart
Normal file
57
lib/models/drive_task.dart
Normal file
@@ -0,0 +1,57 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
import 'package:island/models/file.dart';
|
||||
|
||||
part 'drive_task.freezed.dart';
|
||||
part 'drive_task.g.dart';
|
||||
|
||||
enum DriveTaskStatus {
|
||||
pending,
|
||||
inProgress,
|
||||
paused,
|
||||
completed,
|
||||
failed,
|
||||
expired,
|
||||
cancelled,
|
||||
}
|
||||
|
||||
@freezed
|
||||
sealed class DriveTask with _$DriveTask {
|
||||
const DriveTask._();
|
||||
|
||||
const factory DriveTask({
|
||||
required String id,
|
||||
required String taskId,
|
||||
required String fileName,
|
||||
required String contentType,
|
||||
required int fileSize,
|
||||
required int uploadedBytes,
|
||||
required int totalChunks,
|
||||
required int uploadedChunks,
|
||||
required DriveTaskStatus status,
|
||||
required DateTime createdAt,
|
||||
required DateTime updatedAt,
|
||||
required String type, // Task type (e.g., 'FileUpload')
|
||||
double? transmissionProgress, // Local file upload progress (0.0-1.0)
|
||||
String? errorMessage,
|
||||
String? statusMessage,
|
||||
SnCloudFile? result,
|
||||
String? poolId,
|
||||
String? bundleId,
|
||||
String? encryptPassword,
|
||||
String? expiredAt,
|
||||
}) = _DriveTask;
|
||||
|
||||
factory DriveTask.fromJson(Map<String, dynamic> json) =>
|
||||
_$DriveTaskFromJson(json);
|
||||
|
||||
double get progress => totalChunks > 0 ? uploadedChunks / totalChunks : 0.0;
|
||||
|
||||
Duration get estimatedTimeRemaining {
|
||||
if (uploadedBytes == 0 || fileSize == 0) return Duration.zero;
|
||||
final remainingBytes = fileSize - uploadedBytes;
|
||||
final uploadRate =
|
||||
uploadedBytes / createdAt.difference(DateTime.now()).inSeconds.abs();
|
||||
if (uploadRate == 0) return Duration.zero;
|
||||
return Duration(seconds: (remainingBytes / uploadRate).round());
|
||||
}
|
||||
}
|
||||
356
lib/models/drive_task.freezed.dart
Normal file
356
lib/models/drive_task.freezed.dart
Normal file
@@ -0,0 +1,356 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'drive_task.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$DriveTask {
|
||||
|
||||
String get id; String get taskId; String get fileName; String get contentType; int get fileSize; int get uploadedBytes; int get totalChunks; int get uploadedChunks; DriveTaskStatus get status; DateTime get createdAt; DateTime get updatedAt; String get type;// Task type (e.g., 'FileUpload')
|
||||
double? get transmissionProgress;// Local file upload progress (0.0-1.0)
|
||||
String? get errorMessage; String? get statusMessage; SnCloudFile? get result; String? get poolId; String? get bundleId; String? get encryptPassword; String? get expiredAt;
|
||||
/// Create a copy of DriveTask
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$DriveTaskCopyWith<DriveTask> get copyWith => _$DriveTaskCopyWithImpl<DriveTask>(this as DriveTask, _$identity);
|
||||
|
||||
/// Serializes this DriveTask to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is DriveTask&&(identical(other.id, id) || other.id == id)&&(identical(other.taskId, taskId) || other.taskId == taskId)&&(identical(other.fileName, fileName) || other.fileName == fileName)&&(identical(other.contentType, contentType) || other.contentType == contentType)&&(identical(other.fileSize, fileSize) || other.fileSize == fileSize)&&(identical(other.uploadedBytes, uploadedBytes) || other.uploadedBytes == uploadedBytes)&&(identical(other.totalChunks, totalChunks) || other.totalChunks == totalChunks)&&(identical(other.uploadedChunks, uploadedChunks) || other.uploadedChunks == uploadedChunks)&&(identical(other.status, status) || other.status == status)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.type, type) || other.type == type)&&(identical(other.transmissionProgress, transmissionProgress) || other.transmissionProgress == transmissionProgress)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage)&&(identical(other.statusMessage, statusMessage) || other.statusMessage == statusMessage)&&(identical(other.result, result) || other.result == result)&&(identical(other.poolId, poolId) || other.poolId == poolId)&&(identical(other.bundleId, bundleId) || other.bundleId == bundleId)&&(identical(other.encryptPassword, encryptPassword) || other.encryptPassword == encryptPassword)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hashAll([runtimeType,id,taskId,fileName,contentType,fileSize,uploadedBytes,totalChunks,uploadedChunks,status,createdAt,updatedAt,type,transmissionProgress,errorMessage,statusMessage,result,poolId,bundleId,encryptPassword,expiredAt]);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'DriveTask(id: $id, taskId: $taskId, fileName: $fileName, contentType: $contentType, fileSize: $fileSize, uploadedBytes: $uploadedBytes, totalChunks: $totalChunks, uploadedChunks: $uploadedChunks, status: $status, createdAt: $createdAt, updatedAt: $updatedAt, type: $type, transmissionProgress: $transmissionProgress, errorMessage: $errorMessage, statusMessage: $statusMessage, result: $result, poolId: $poolId, bundleId: $bundleId, encryptPassword: $encryptPassword, expiredAt: $expiredAt)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $DriveTaskCopyWith<$Res> {
|
||||
factory $DriveTaskCopyWith(DriveTask value, $Res Function(DriveTask) _then) = _$DriveTaskCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String id, String taskId, String fileName, String contentType, int fileSize, int uploadedBytes, int totalChunks, int uploadedChunks, DriveTaskStatus status, DateTime createdAt, DateTime updatedAt, String type, double? transmissionProgress, String? errorMessage, String? statusMessage, SnCloudFile? result, String? poolId, String? bundleId, String? encryptPassword, String? expiredAt
|
||||
});
|
||||
|
||||
|
||||
$SnCloudFileCopyWith<$Res>? get result;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$DriveTaskCopyWithImpl<$Res>
|
||||
implements $DriveTaskCopyWith<$Res> {
|
||||
_$DriveTaskCopyWithImpl(this._self, this._then);
|
||||
|
||||
final DriveTask _self;
|
||||
final $Res Function(DriveTask) _then;
|
||||
|
||||
/// Create a copy of DriveTask
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? taskId = null,Object? fileName = null,Object? contentType = null,Object? fileSize = null,Object? uploadedBytes = null,Object? totalChunks = null,Object? uploadedChunks = null,Object? status = null,Object? createdAt = null,Object? updatedAt = null,Object? type = null,Object? transmissionProgress = freezed,Object? errorMessage = freezed,Object? statusMessage = freezed,Object? result = freezed,Object? poolId = freezed,Object? bundleId = freezed,Object? encryptPassword = freezed,Object? expiredAt = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,taskId: null == taskId ? _self.taskId : taskId // ignore: cast_nullable_to_non_nullable
|
||||
as String,fileName: null == fileName ? _self.fileName : fileName // ignore: cast_nullable_to_non_nullable
|
||||
as String,contentType: null == contentType ? _self.contentType : contentType // ignore: cast_nullable_to_non_nullable
|
||||
as String,fileSize: null == fileSize ? _self.fileSize : fileSize // ignore: cast_nullable_to_non_nullable
|
||||
as int,uploadedBytes: null == uploadedBytes ? _self.uploadedBytes : uploadedBytes // ignore: cast_nullable_to_non_nullable
|
||||
as int,totalChunks: null == totalChunks ? _self.totalChunks : totalChunks // ignore: cast_nullable_to_non_nullable
|
||||
as int,uploadedChunks: null == uploadedChunks ? _self.uploadedChunks : uploadedChunks // ignore: cast_nullable_to_non_nullable
|
||||
as int,status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
|
||||
as DriveTaskStatus,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
|
||||
as String,transmissionProgress: freezed == transmissionProgress ? _self.transmissionProgress : transmissionProgress // ignore: cast_nullable_to_non_nullable
|
||||
as double?,errorMessage: freezed == errorMessage ? _self.errorMessage : errorMessage // ignore: cast_nullable_to_non_nullable
|
||||
as String?,statusMessage: freezed == statusMessage ? _self.statusMessage : statusMessage // ignore: cast_nullable_to_non_nullable
|
||||
as String?,result: freezed == result ? _self.result : result // ignore: cast_nullable_to_non_nullable
|
||||
as SnCloudFile?,poolId: freezed == poolId ? _self.poolId : poolId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,bundleId: freezed == bundleId ? _self.bundleId : bundleId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,encryptPassword: freezed == encryptPassword ? _self.encryptPassword : encryptPassword // ignore: cast_nullable_to_non_nullable
|
||||
as String?,expiredAt: freezed == expiredAt ? _self.expiredAt : expiredAt // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
/// Create a copy of DriveTask
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnCloudFileCopyWith<$Res>? get result {
|
||||
if (_self.result == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $SnCloudFileCopyWith<$Res>(_self.result!, (value) {
|
||||
return _then(_self.copyWith(result: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [DriveTask].
|
||||
extension DriveTaskPatterns on DriveTask {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _DriveTask value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _DriveTask() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _DriveTask value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _DriveTask():
|
||||
return $default(_that);}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _DriveTask value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _DriveTask() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String taskId, String fileName, String contentType, int fileSize, int uploadedBytes, int totalChunks, int uploadedChunks, DriveTaskStatus status, DateTime createdAt, DateTime updatedAt, String type, double? transmissionProgress, String? errorMessage, String? statusMessage, SnCloudFile? result, String? poolId, String? bundleId, String? encryptPassword, String? expiredAt)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _DriveTask() when $default != null:
|
||||
return $default(_that.id,_that.taskId,_that.fileName,_that.contentType,_that.fileSize,_that.uploadedBytes,_that.totalChunks,_that.uploadedChunks,_that.status,_that.createdAt,_that.updatedAt,_that.type,_that.transmissionProgress,_that.errorMessage,_that.statusMessage,_that.result,_that.poolId,_that.bundleId,_that.encryptPassword,_that.expiredAt);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String taskId, String fileName, String contentType, int fileSize, int uploadedBytes, int totalChunks, int uploadedChunks, DriveTaskStatus status, DateTime createdAt, DateTime updatedAt, String type, double? transmissionProgress, String? errorMessage, String? statusMessage, SnCloudFile? result, String? poolId, String? bundleId, String? encryptPassword, String? expiredAt) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _DriveTask():
|
||||
return $default(_that.id,_that.taskId,_that.fileName,_that.contentType,_that.fileSize,_that.uploadedBytes,_that.totalChunks,_that.uploadedChunks,_that.status,_that.createdAt,_that.updatedAt,_that.type,_that.transmissionProgress,_that.errorMessage,_that.statusMessage,_that.result,_that.poolId,_that.bundleId,_that.encryptPassword,_that.expiredAt);}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String taskId, String fileName, String contentType, int fileSize, int uploadedBytes, int totalChunks, int uploadedChunks, DriveTaskStatus status, DateTime createdAt, DateTime updatedAt, String type, double? transmissionProgress, String? errorMessage, String? statusMessage, SnCloudFile? result, String? poolId, String? bundleId, String? encryptPassword, String? expiredAt)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _DriveTask() when $default != null:
|
||||
return $default(_that.id,_that.taskId,_that.fileName,_that.contentType,_that.fileSize,_that.uploadedBytes,_that.totalChunks,_that.uploadedChunks,_that.status,_that.createdAt,_that.updatedAt,_that.type,_that.transmissionProgress,_that.errorMessage,_that.statusMessage,_that.result,_that.poolId,_that.bundleId,_that.encryptPassword,_that.expiredAt);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _DriveTask extends DriveTask {
|
||||
const _DriveTask({required this.id, required this.taskId, required this.fileName, required this.contentType, required this.fileSize, required this.uploadedBytes, required this.totalChunks, required this.uploadedChunks, required this.status, required this.createdAt, required this.updatedAt, required this.type, this.transmissionProgress, this.errorMessage, this.statusMessage, this.result, this.poolId, this.bundleId, this.encryptPassword, this.expiredAt}): super._();
|
||||
factory _DriveTask.fromJson(Map<String, dynamic> json) => _$DriveTaskFromJson(json);
|
||||
|
||||
@override final String id;
|
||||
@override final String taskId;
|
||||
@override final String fileName;
|
||||
@override final String contentType;
|
||||
@override final int fileSize;
|
||||
@override final int uploadedBytes;
|
||||
@override final int totalChunks;
|
||||
@override final int uploadedChunks;
|
||||
@override final DriveTaskStatus status;
|
||||
@override final DateTime createdAt;
|
||||
@override final DateTime updatedAt;
|
||||
@override final String type;
|
||||
// Task type (e.g., 'FileUpload')
|
||||
@override final double? transmissionProgress;
|
||||
// Local file upload progress (0.0-1.0)
|
||||
@override final String? errorMessage;
|
||||
@override final String? statusMessage;
|
||||
@override final SnCloudFile? result;
|
||||
@override final String? poolId;
|
||||
@override final String? bundleId;
|
||||
@override final String? encryptPassword;
|
||||
@override final String? expiredAt;
|
||||
|
||||
/// Create a copy of DriveTask
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$DriveTaskCopyWith<_DriveTask> get copyWith => __$DriveTaskCopyWithImpl<_DriveTask>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$DriveTaskToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _DriveTask&&(identical(other.id, id) || other.id == id)&&(identical(other.taskId, taskId) || other.taskId == taskId)&&(identical(other.fileName, fileName) || other.fileName == fileName)&&(identical(other.contentType, contentType) || other.contentType == contentType)&&(identical(other.fileSize, fileSize) || other.fileSize == fileSize)&&(identical(other.uploadedBytes, uploadedBytes) || other.uploadedBytes == uploadedBytes)&&(identical(other.totalChunks, totalChunks) || other.totalChunks == totalChunks)&&(identical(other.uploadedChunks, uploadedChunks) || other.uploadedChunks == uploadedChunks)&&(identical(other.status, status) || other.status == status)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.type, type) || other.type == type)&&(identical(other.transmissionProgress, transmissionProgress) || other.transmissionProgress == transmissionProgress)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage)&&(identical(other.statusMessage, statusMessage) || other.statusMessage == statusMessage)&&(identical(other.result, result) || other.result == result)&&(identical(other.poolId, poolId) || other.poolId == poolId)&&(identical(other.bundleId, bundleId) || other.bundleId == bundleId)&&(identical(other.encryptPassword, encryptPassword) || other.encryptPassword == encryptPassword)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hashAll([runtimeType,id,taskId,fileName,contentType,fileSize,uploadedBytes,totalChunks,uploadedChunks,status,createdAt,updatedAt,type,transmissionProgress,errorMessage,statusMessage,result,poolId,bundleId,encryptPassword,expiredAt]);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'DriveTask(id: $id, taskId: $taskId, fileName: $fileName, contentType: $contentType, fileSize: $fileSize, uploadedBytes: $uploadedBytes, totalChunks: $totalChunks, uploadedChunks: $uploadedChunks, status: $status, createdAt: $createdAt, updatedAt: $updatedAt, type: $type, transmissionProgress: $transmissionProgress, errorMessage: $errorMessage, statusMessage: $statusMessage, result: $result, poolId: $poolId, bundleId: $bundleId, encryptPassword: $encryptPassword, expiredAt: $expiredAt)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$DriveTaskCopyWith<$Res> implements $DriveTaskCopyWith<$Res> {
|
||||
factory _$DriveTaskCopyWith(_DriveTask value, $Res Function(_DriveTask) _then) = __$DriveTaskCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String id, String taskId, String fileName, String contentType, int fileSize, int uploadedBytes, int totalChunks, int uploadedChunks, DriveTaskStatus status, DateTime createdAt, DateTime updatedAt, String type, double? transmissionProgress, String? errorMessage, String? statusMessage, SnCloudFile? result, String? poolId, String? bundleId, String? encryptPassword, String? expiredAt
|
||||
});
|
||||
|
||||
|
||||
@override $SnCloudFileCopyWith<$Res>? get result;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$DriveTaskCopyWithImpl<$Res>
|
||||
implements _$DriveTaskCopyWith<$Res> {
|
||||
__$DriveTaskCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _DriveTask _self;
|
||||
final $Res Function(_DriveTask) _then;
|
||||
|
||||
/// Create a copy of DriveTask
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? taskId = null,Object? fileName = null,Object? contentType = null,Object? fileSize = null,Object? uploadedBytes = null,Object? totalChunks = null,Object? uploadedChunks = null,Object? status = null,Object? createdAt = null,Object? updatedAt = null,Object? type = null,Object? transmissionProgress = freezed,Object? errorMessage = freezed,Object? statusMessage = freezed,Object? result = freezed,Object? poolId = freezed,Object? bundleId = freezed,Object? encryptPassword = freezed,Object? expiredAt = freezed,}) {
|
||||
return _then(_DriveTask(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,taskId: null == taskId ? _self.taskId : taskId // ignore: cast_nullable_to_non_nullable
|
||||
as String,fileName: null == fileName ? _self.fileName : fileName // ignore: cast_nullable_to_non_nullable
|
||||
as String,contentType: null == contentType ? _self.contentType : contentType // ignore: cast_nullable_to_non_nullable
|
||||
as String,fileSize: null == fileSize ? _self.fileSize : fileSize // ignore: cast_nullable_to_non_nullable
|
||||
as int,uploadedBytes: null == uploadedBytes ? _self.uploadedBytes : uploadedBytes // ignore: cast_nullable_to_non_nullable
|
||||
as int,totalChunks: null == totalChunks ? _self.totalChunks : totalChunks // ignore: cast_nullable_to_non_nullable
|
||||
as int,uploadedChunks: null == uploadedChunks ? _self.uploadedChunks : uploadedChunks // ignore: cast_nullable_to_non_nullable
|
||||
as int,status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
|
||||
as DriveTaskStatus,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
|
||||
as String,transmissionProgress: freezed == transmissionProgress ? _self.transmissionProgress : transmissionProgress // ignore: cast_nullable_to_non_nullable
|
||||
as double?,errorMessage: freezed == errorMessage ? _self.errorMessage : errorMessage // ignore: cast_nullable_to_non_nullable
|
||||
as String?,statusMessage: freezed == statusMessage ? _self.statusMessage : statusMessage // ignore: cast_nullable_to_non_nullable
|
||||
as String?,result: freezed == result ? _self.result : result // ignore: cast_nullable_to_non_nullable
|
||||
as SnCloudFile?,poolId: freezed == poolId ? _self.poolId : poolId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,bundleId: freezed == bundleId ? _self.bundleId : bundleId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,encryptPassword: freezed == encryptPassword ? _self.encryptPassword : encryptPassword // ignore: cast_nullable_to_non_nullable
|
||||
as String?,expiredAt: freezed == expiredAt ? _self.expiredAt : expiredAt // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
/// Create a copy of DriveTask
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnCloudFileCopyWith<$Res>? get result {
|
||||
if (_self.result == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $SnCloudFileCopyWith<$Res>(_self.result!, (value) {
|
||||
return _then(_self.copyWith(result: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// dart format on
|
||||
66
lib/models/drive_task.g.dart
Normal file
66
lib/models/drive_task.g.dart
Normal file
@@ -0,0 +1,66 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'drive_task.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_DriveTask _$DriveTaskFromJson(Map<String, dynamic> json) => _DriveTask(
|
||||
id: json['id'] as String,
|
||||
taskId: json['task_id'] as String,
|
||||
fileName: json['file_name'] as String,
|
||||
contentType: json['content_type'] as String,
|
||||
fileSize: (json['file_size'] as num).toInt(),
|
||||
uploadedBytes: (json['uploaded_bytes'] as num).toInt(),
|
||||
totalChunks: (json['total_chunks'] as num).toInt(),
|
||||
uploadedChunks: (json['uploaded_chunks'] as num).toInt(),
|
||||
status: $enumDecode(_$DriveTaskStatusEnumMap, json['status']),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
type: json['type'] as String,
|
||||
transmissionProgress: (json['transmission_progress'] as num?)?.toDouble(),
|
||||
errorMessage: json['error_message'] as String?,
|
||||
statusMessage: json['status_message'] as String?,
|
||||
result: json['result'] == null
|
||||
? null
|
||||
: SnCloudFile.fromJson(json['result'] as Map<String, dynamic>),
|
||||
poolId: json['pool_id'] as String?,
|
||||
bundleId: json['bundle_id'] as String?,
|
||||
encryptPassword: json['encrypt_password'] as String?,
|
||||
expiredAt: json['expired_at'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$DriveTaskToJson(_DriveTask instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'task_id': instance.taskId,
|
||||
'file_name': instance.fileName,
|
||||
'content_type': instance.contentType,
|
||||
'file_size': instance.fileSize,
|
||||
'uploaded_bytes': instance.uploadedBytes,
|
||||
'total_chunks': instance.totalChunks,
|
||||
'uploaded_chunks': instance.uploadedChunks,
|
||||
'status': _$DriveTaskStatusEnumMap[instance.status]!,
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
'type': instance.type,
|
||||
'transmission_progress': instance.transmissionProgress,
|
||||
'error_message': instance.errorMessage,
|
||||
'status_message': instance.statusMessage,
|
||||
'result': instance.result?.toJson(),
|
||||
'pool_id': instance.poolId,
|
||||
'bundle_id': instance.bundleId,
|
||||
'encrypt_password': instance.encryptPassword,
|
||||
'expired_at': instance.expiredAt,
|
||||
};
|
||||
|
||||
const _$DriveTaskStatusEnumMap = {
|
||||
DriveTaskStatus.pending: 'pending',
|
||||
DriveTaskStatus.inProgress: 'inProgress',
|
||||
DriveTaskStatus.paused: 'paused',
|
||||
DriveTaskStatus.completed: 'completed',
|
||||
DriveTaskStatus.failed: 'failed',
|
||||
DriveTaskStatus.expired: 'expired',
|
||||
DriveTaskStatus.cancelled: 'cancelled',
|
||||
};
|
||||
@@ -17,10 +17,9 @@ _SnScrappedLink _$SnScrappedLinkFromJson(Map<String, dynamic> json) =>
|
||||
siteName: json['site_name'] as String?,
|
||||
contentType: json['content_type'] as String?,
|
||||
author: json['author'] as String?,
|
||||
publishedDate:
|
||||
json['published_date'] == null
|
||||
? null
|
||||
: DateTime.parse(json['published_date'] as String),
|
||||
publishedDate: json['published_date'] == null
|
||||
? null
|
||||
: DateTime.parse(json['published_date'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnScrappedLinkToJson(_SnScrappedLink instance) =>
|
||||
|
||||
@@ -60,3 +60,19 @@ sealed class SnCloudFile with _$SnCloudFile {
|
||||
factory SnCloudFile.fromJson(Map<String, dynamic> json) =>
|
||||
_$SnCloudFileFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
sealed class SnCloudFileIndex with _$SnCloudFileIndex {
|
||||
const factory SnCloudFileIndex({
|
||||
required String id,
|
||||
required String path,
|
||||
required String fileId,
|
||||
required SnCloudFile file,
|
||||
required DateTime createdAt,
|
||||
required DateTime updatedAt,
|
||||
required DateTime? deletedAt,
|
||||
}) = _SnCloudFileIndex;
|
||||
|
||||
factory SnCloudFileIndex.fromJson(Map<String, dynamic> json) =>
|
||||
_$SnCloudFileIndexFromJson(json);
|
||||
}
|
||||
|
||||
@@ -622,4 +622,297 @@ $SnFilePoolCopyWith<$Res>? get pool {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// @nodoc
|
||||
mixin _$SnCloudFileIndex {
|
||||
|
||||
String get id; String get path; String get fileId; SnCloudFile get file; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt;
|
||||
/// Create a copy of SnCloudFileIndex
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnCloudFileIndexCopyWith<SnCloudFileIndex> get copyWith => _$SnCloudFileIndexCopyWithImpl<SnCloudFileIndex>(this as SnCloudFileIndex, _$identity);
|
||||
|
||||
/// Serializes this SnCloudFileIndex to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnCloudFileIndex&&(identical(other.id, id) || other.id == id)&&(identical(other.path, path) || other.path == path)&&(identical(other.fileId, fileId) || other.fileId == fileId)&&(identical(other.file, file) || other.file == file)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,path,fileId,file,createdAt,updatedAt,deletedAt);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnCloudFileIndex(id: $id, path: $path, fileId: $fileId, file: $file, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $SnCloudFileIndexCopyWith<$Res> {
|
||||
factory $SnCloudFileIndexCopyWith(SnCloudFileIndex value, $Res Function(SnCloudFileIndex) _then) = _$SnCloudFileIndexCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String id, String path, String fileId, SnCloudFile file, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
||||
});
|
||||
|
||||
|
||||
$SnCloudFileCopyWith<$Res> get file;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$SnCloudFileIndexCopyWithImpl<$Res>
|
||||
implements $SnCloudFileIndexCopyWith<$Res> {
|
||||
_$SnCloudFileIndexCopyWithImpl(this._self, this._then);
|
||||
|
||||
final SnCloudFileIndex _self;
|
||||
final $Res Function(SnCloudFileIndex) _then;
|
||||
|
||||
/// Create a copy of SnCloudFileIndex
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? path = null,Object? fileId = null,Object? file = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,path: null == path ? _self.path : path // ignore: cast_nullable_to_non_nullable
|
||||
as String,fileId: null == fileId ? _self.fileId : fileId // ignore: cast_nullable_to_non_nullable
|
||||
as String,file: null == file ? _self.file : file // ignore: cast_nullable_to_non_nullable
|
||||
as SnCloudFile,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
));
|
||||
}
|
||||
/// Create a copy of SnCloudFileIndex
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnCloudFileCopyWith<$Res> get file {
|
||||
|
||||
return $SnCloudFileCopyWith<$Res>(_self.file, (value) {
|
||||
return _then(_self.copyWith(file: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [SnCloudFileIndex].
|
||||
extension SnCloudFileIndexPatterns on SnCloudFileIndex {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _SnCloudFileIndex value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _SnCloudFileIndex() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _SnCloudFileIndex value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _SnCloudFileIndex():
|
||||
return $default(_that);}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _SnCloudFileIndex value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _SnCloudFileIndex() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String path, String fileId, SnCloudFile file, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnCloudFileIndex() when $default != null:
|
||||
return $default(_that.id,_that.path,_that.fileId,_that.file,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String path, String fileId, SnCloudFile file, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnCloudFileIndex():
|
||||
return $default(_that.id,_that.path,_that.fileId,_that.file,_that.createdAt,_that.updatedAt,_that.deletedAt);}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String path, String fileId, SnCloudFile file, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnCloudFileIndex() when $default != null:
|
||||
return $default(_that.id,_that.path,_that.fileId,_that.file,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _SnCloudFileIndex implements SnCloudFileIndex {
|
||||
const _SnCloudFileIndex({required this.id, required this.path, required this.fileId, required this.file, required this.createdAt, required this.updatedAt, required this.deletedAt});
|
||||
factory _SnCloudFileIndex.fromJson(Map<String, dynamic> json) => _$SnCloudFileIndexFromJson(json);
|
||||
|
||||
@override final String id;
|
||||
@override final String path;
|
||||
@override final String fileId;
|
||||
@override final SnCloudFile file;
|
||||
@override final DateTime createdAt;
|
||||
@override final DateTime updatedAt;
|
||||
@override final DateTime? deletedAt;
|
||||
|
||||
/// Create a copy of SnCloudFileIndex
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$SnCloudFileIndexCopyWith<_SnCloudFileIndex> get copyWith => __$SnCloudFileIndexCopyWithImpl<_SnCloudFileIndex>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$SnCloudFileIndexToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnCloudFileIndex&&(identical(other.id, id) || other.id == id)&&(identical(other.path, path) || other.path == path)&&(identical(other.fileId, fileId) || other.fileId == fileId)&&(identical(other.file, file) || other.file == file)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,path,fileId,file,createdAt,updatedAt,deletedAt);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnCloudFileIndex(id: $id, path: $path, fileId: $fileId, file: $file, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$SnCloudFileIndexCopyWith<$Res> implements $SnCloudFileIndexCopyWith<$Res> {
|
||||
factory _$SnCloudFileIndexCopyWith(_SnCloudFileIndex value, $Res Function(_SnCloudFileIndex) _then) = __$SnCloudFileIndexCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String id, String path, String fileId, SnCloudFile file, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
||||
});
|
||||
|
||||
|
||||
@override $SnCloudFileCopyWith<$Res> get file;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$SnCloudFileIndexCopyWithImpl<$Res>
|
||||
implements _$SnCloudFileIndexCopyWith<$Res> {
|
||||
__$SnCloudFileIndexCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _SnCloudFileIndex _self;
|
||||
final $Res Function(_SnCloudFileIndex) _then;
|
||||
|
||||
/// Create a copy of SnCloudFileIndex
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? path = null,Object? fileId = null,Object? file = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
||||
return _then(_SnCloudFileIndex(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,path: null == path ? _self.path : path // ignore: cast_nullable_to_non_nullable
|
||||
as String,fileId: null == fileId ? _self.fileId : fileId // ignore: cast_nullable_to_non_nullable
|
||||
as String,file: null == file ? _self.file : file // ignore: cast_nullable_to_non_nullable
|
||||
as SnCloudFile,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
));
|
||||
}
|
||||
|
||||
/// Create a copy of SnCloudFileIndex
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnCloudFileCopyWith<$Res> get file {
|
||||
|
||||
return $SnCloudFileCopyWith<$Res>(_self.file, (value) {
|
||||
return _then(_self.copyWith(file: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// dart format on
|
||||
|
||||
@@ -35,10 +35,9 @@ _SnCloudFile _$SnCloudFileFromJson(Map<String, dynamic> json) => _SnCloudFile(
|
||||
description: json['description'] as String?,
|
||||
fileMeta: json['file_meta'] as Map<String, dynamic>?,
|
||||
userMeta: json['user_meta'] as Map<String, dynamic>?,
|
||||
pool:
|
||||
json['pool'] == null
|
||||
? null
|
||||
: SnFilePool.fromJson(json['pool'] as Map<String, dynamic>),
|
||||
pool: json['pool'] == null
|
||||
? null
|
||||
: SnFilePool.fromJson(json['pool'] as Map<String, dynamic>),
|
||||
sensitiveMarks:
|
||||
(json['sensitive_marks'] as List<dynamic>?)
|
||||
?.map((e) => (e as num).toInt())
|
||||
@@ -47,17 +46,15 @@ _SnCloudFile _$SnCloudFileFromJson(Map<String, dynamic> json) => _SnCloudFile(
|
||||
mimeType: json['mime_type'] as String?,
|
||||
hash: json['hash'] as String?,
|
||||
size: (json['size'] as num).toInt(),
|
||||
uploadedAt:
|
||||
json['uploaded_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['uploaded_at'] as String),
|
||||
uploadedAt: json['uploaded_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['uploaded_at'] as String),
|
||||
uploadedTo: json['uploaded_to'] as String?,
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt:
|
||||
json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnCloudFileToJson(_SnCloudFile instance) =>
|
||||
@@ -78,3 +75,27 @@ Map<String, dynamic> _$SnCloudFileToJson(_SnCloudFile instance) =>
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
'deleted_at': instance.deletedAt?.toIso8601String(),
|
||||
};
|
||||
|
||||
_SnCloudFileIndex _$SnCloudFileIndexFromJson(Map<String, dynamic> json) =>
|
||||
_SnCloudFileIndex(
|
||||
id: json['id'] as String,
|
||||
path: json['path'] as String,
|
||||
fileId: json['file_id'] as String,
|
||||
file: SnCloudFile.fromJson(json['file'] as Map<String, dynamic>),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnCloudFileIndexToJson(_SnCloudFileIndex instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'path': instance.path,
|
||||
'file_id': instance.fileId,
|
||||
'file': instance.file.toJson(),
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
'deleted_at': instance.deletedAt?.toIso8601String(),
|
||||
};
|
||||
|
||||
12
lib/models/file_list_item.dart
Normal file
12
lib/models/file_list_item.dart
Normal file
@@ -0,0 +1,12 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
import 'package:island/models/file.dart';
|
||||
|
||||
part 'file_list_item.freezed.dart';
|
||||
|
||||
@freezed
|
||||
sealed class FileListItem with _$FileListItem {
|
||||
const factory FileListItem.file(SnCloudFileIndex fileIndex) = FileItem;
|
||||
const factory FileListItem.folder(String folderName) = FolderItem;
|
||||
const factory FileListItem.unindexedFile(SnCloudFile file) =
|
||||
UnindexedFileItem;
|
||||
}
|
||||
396
lib/models/file_list_item.freezed.dart
Normal file
396
lib/models/file_list_item.freezed.dart
Normal file
@@ -0,0 +1,396 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'file_list_item.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
/// @nodoc
|
||||
mixin _$FileListItem {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is FileListItem);
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => runtimeType.hashCode;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'FileListItem()';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class $FileListItemCopyWith<$Res> {
|
||||
$FileListItemCopyWith(FileListItem _, $Res Function(FileListItem) __);
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [FileListItem].
|
||||
extension FileListItemPatterns on FileListItem {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>({TResult Function( FileItem value)? file,TResult Function( FolderItem value)? folder,TResult Function( UnindexedFileItem value)? unindexedFile,required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case FileItem() when file != null:
|
||||
return file(_that);case FolderItem() when folder != null:
|
||||
return folder(_that);case UnindexedFileItem() when unindexedFile != null:
|
||||
return unindexedFile(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>({required TResult Function( FileItem value) file,required TResult Function( FolderItem value) folder,required TResult Function( UnindexedFileItem value) unindexedFile,}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case FileItem():
|
||||
return file(_that);case FolderItem():
|
||||
return folder(_that);case UnindexedFileItem():
|
||||
return unindexedFile(_that);}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>({TResult? Function( FileItem value)? file,TResult? Function( FolderItem value)? folder,TResult? Function( UnindexedFileItem value)? unindexedFile,}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case FileItem() when file != null:
|
||||
return file(_that);case FolderItem() when folder != null:
|
||||
return folder(_that);case UnindexedFileItem() when unindexedFile != null:
|
||||
return unindexedFile(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>({TResult Function( SnCloudFileIndex fileIndex)? file,TResult Function( String folderName)? folder,TResult Function( SnCloudFile file)? unindexedFile,required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case FileItem() when file != null:
|
||||
return file(_that.fileIndex);case FolderItem() when folder != null:
|
||||
return folder(_that.folderName);case UnindexedFileItem() when unindexedFile != null:
|
||||
return unindexedFile(_that.file);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>({required TResult Function( SnCloudFileIndex fileIndex) file,required TResult Function( String folderName) folder,required TResult Function( SnCloudFile file) unindexedFile,}) {final _that = this;
|
||||
switch (_that) {
|
||||
case FileItem():
|
||||
return file(_that.fileIndex);case FolderItem():
|
||||
return folder(_that.folderName);case UnindexedFileItem():
|
||||
return unindexedFile(_that.file);}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>({TResult? Function( SnCloudFileIndex fileIndex)? file,TResult? Function( String folderName)? folder,TResult? Function( SnCloudFile file)? unindexedFile,}) {final _that = this;
|
||||
switch (_that) {
|
||||
case FileItem() when file != null:
|
||||
return file(_that.fileIndex);case FolderItem() when folder != null:
|
||||
return folder(_that.folderName);case UnindexedFileItem() when unindexedFile != null:
|
||||
return unindexedFile(_that.file);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
|
||||
class FileItem implements FileListItem {
|
||||
const FileItem(this.fileIndex);
|
||||
|
||||
|
||||
final SnCloudFileIndex fileIndex;
|
||||
|
||||
/// Create a copy of FileListItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$FileItemCopyWith<FileItem> get copyWith => _$FileItemCopyWithImpl<FileItem>(this, _$identity);
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is FileItem&&(identical(other.fileIndex, fileIndex) || other.fileIndex == fileIndex));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,fileIndex);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'FileListItem.file(fileIndex: $fileIndex)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $FileItemCopyWith<$Res> implements $FileListItemCopyWith<$Res> {
|
||||
factory $FileItemCopyWith(FileItem value, $Res Function(FileItem) _then) = _$FileItemCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
SnCloudFileIndex fileIndex
|
||||
});
|
||||
|
||||
|
||||
$SnCloudFileIndexCopyWith<$Res> get fileIndex;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$FileItemCopyWithImpl<$Res>
|
||||
implements $FileItemCopyWith<$Res> {
|
||||
_$FileItemCopyWithImpl(this._self, this._then);
|
||||
|
||||
final FileItem _self;
|
||||
final $Res Function(FileItem) _then;
|
||||
|
||||
/// Create a copy of FileListItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') $Res call({Object? fileIndex = null,}) {
|
||||
return _then(FileItem(
|
||||
null == fileIndex ? _self.fileIndex : fileIndex // ignore: cast_nullable_to_non_nullable
|
||||
as SnCloudFileIndex,
|
||||
));
|
||||
}
|
||||
|
||||
/// Create a copy of FileListItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnCloudFileIndexCopyWith<$Res> get fileIndex {
|
||||
|
||||
return $SnCloudFileIndexCopyWith<$Res>(_self.fileIndex, (value) {
|
||||
return _then(_self.copyWith(fileIndex: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
|
||||
class FolderItem implements FileListItem {
|
||||
const FolderItem(this.folderName);
|
||||
|
||||
|
||||
final String folderName;
|
||||
|
||||
/// Create a copy of FileListItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$FolderItemCopyWith<FolderItem> get copyWith => _$FolderItemCopyWithImpl<FolderItem>(this, _$identity);
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is FolderItem&&(identical(other.folderName, folderName) || other.folderName == folderName));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,folderName);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'FileListItem.folder(folderName: $folderName)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $FolderItemCopyWith<$Res> implements $FileListItemCopyWith<$Res> {
|
||||
factory $FolderItemCopyWith(FolderItem value, $Res Function(FolderItem) _then) = _$FolderItemCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String folderName
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$FolderItemCopyWithImpl<$Res>
|
||||
implements $FolderItemCopyWith<$Res> {
|
||||
_$FolderItemCopyWithImpl(this._self, this._then);
|
||||
|
||||
final FolderItem _self;
|
||||
final $Res Function(FolderItem) _then;
|
||||
|
||||
/// Create a copy of FileListItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') $Res call({Object? folderName = null,}) {
|
||||
return _then(FolderItem(
|
||||
null == folderName ? _self.folderName : folderName // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
|
||||
class UnindexedFileItem implements FileListItem {
|
||||
const UnindexedFileItem(this.file);
|
||||
|
||||
|
||||
final SnCloudFile file;
|
||||
|
||||
/// Create a copy of FileListItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$UnindexedFileItemCopyWith<UnindexedFileItem> get copyWith => _$UnindexedFileItemCopyWithImpl<UnindexedFileItem>(this, _$identity);
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is UnindexedFileItem&&(identical(other.file, file) || other.file == file));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,file);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'FileListItem.unindexedFile(file: $file)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $UnindexedFileItemCopyWith<$Res> implements $FileListItemCopyWith<$Res> {
|
||||
factory $UnindexedFileItemCopyWith(UnindexedFileItem value, $Res Function(UnindexedFileItem) _then) = _$UnindexedFileItemCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
SnCloudFile file
|
||||
});
|
||||
|
||||
|
||||
$SnCloudFileCopyWith<$Res> get file;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$UnindexedFileItemCopyWithImpl<$Res>
|
||||
implements $UnindexedFileItemCopyWith<$Res> {
|
||||
_$UnindexedFileItemCopyWithImpl(this._self, this._then);
|
||||
|
||||
final UnindexedFileItem _self;
|
||||
final $Res Function(UnindexedFileItem) _then;
|
||||
|
||||
/// Create a copy of FileListItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') $Res call({Object? file = null,}) {
|
||||
return _then(UnindexedFileItem(
|
||||
null == file ? _self.file : file // ignore: cast_nullable_to_non_nullable
|
||||
as SnCloudFile,
|
||||
));
|
||||
}
|
||||
|
||||
/// Create a copy of FileListItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnCloudFileCopyWith<$Res> get file {
|
||||
|
||||
return $SnCloudFileCopyWith<$Res>(_self.file, (value) {
|
||||
return _then(_self.copyWith(file: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// dart format on
|
||||
@@ -16,18 +16,15 @@ _SnFilePool _$SnFilePoolFromJson(Map<String, dynamic> json) => _SnFilePool(
|
||||
isHidden: json['is_hidden'] as bool?,
|
||||
accountId: json['account_id'] as String?,
|
||||
resourceIdentifier: json['resource_identifier'] as String?,
|
||||
createdAt:
|
||||
json['created_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt:
|
||||
json['updated_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt:
|
||||
json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
createdAt: json['created_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: json['updated_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnFilePoolToJson(_SnFilePool instance) =>
|
||||
|
||||
19
lib/models/folder.dart
Normal file
19
lib/models/folder.dart
Normal file
@@ -0,0 +1,19 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'folder.freezed.dart';
|
||||
part 'folder.g.dart';
|
||||
|
||||
@freezed
|
||||
sealed class SnCloudFolder with _$SnCloudFolder {
|
||||
const factory SnCloudFolder({
|
||||
required String id,
|
||||
required String name,
|
||||
required String? parentFolderId,
|
||||
required String accountId,
|
||||
required DateTime createdAt,
|
||||
required DateTime updatedAt,
|
||||
}) = _SnCloudFolder;
|
||||
|
||||
factory SnCloudFolder.fromJson(Map<String, dynamic> json) =>
|
||||
_$SnCloudFolderFromJson(json);
|
||||
}
|
||||
286
lib/models/folder.freezed.dart
Normal file
286
lib/models/folder.freezed.dart
Normal file
@@ -0,0 +1,286 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'folder.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$SnCloudFolder {
|
||||
|
||||
String get id; String get name; String? get parentFolderId; String get accountId; DateTime get createdAt; DateTime get updatedAt;
|
||||
/// Create a copy of SnCloudFolder
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnCloudFolderCopyWith<SnCloudFolder> get copyWith => _$SnCloudFolderCopyWithImpl<SnCloudFolder>(this as SnCloudFolder, _$identity);
|
||||
|
||||
/// Serializes this SnCloudFolder to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnCloudFolder&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.parentFolderId, parentFolderId) || other.parentFolderId == parentFolderId)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,name,parentFolderId,accountId,createdAt,updatedAt);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnCloudFolder(id: $id, name: $name, parentFolderId: $parentFolderId, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $SnCloudFolderCopyWith<$Res> {
|
||||
factory $SnCloudFolderCopyWith(SnCloudFolder value, $Res Function(SnCloudFolder) _then) = _$SnCloudFolderCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String id, String name, String? parentFolderId, String accountId, DateTime createdAt, DateTime updatedAt
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$SnCloudFolderCopyWithImpl<$Res>
|
||||
implements $SnCloudFolderCopyWith<$Res> {
|
||||
_$SnCloudFolderCopyWithImpl(this._self, this._then);
|
||||
|
||||
final SnCloudFolder _self;
|
||||
final $Res Function(SnCloudFolder) _then;
|
||||
|
||||
/// Create a copy of SnCloudFolder
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? name = null,Object? parentFolderId = freezed,Object? accountId = null,Object? createdAt = null,Object? updatedAt = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||
as String,parentFolderId: freezed == parentFolderId ? _self.parentFolderId : parentFolderId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
|
||||
as String,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [SnCloudFolder].
|
||||
extension SnCloudFolderPatterns on SnCloudFolder {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _SnCloudFolder value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _SnCloudFolder() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _SnCloudFolder value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _SnCloudFolder():
|
||||
return $default(_that);}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _SnCloudFolder value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _SnCloudFolder() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String name, String? parentFolderId, String accountId, DateTime createdAt, DateTime updatedAt)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnCloudFolder() when $default != null:
|
||||
return $default(_that.id,_that.name,_that.parentFolderId,_that.accountId,_that.createdAt,_that.updatedAt);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String name, String? parentFolderId, String accountId, DateTime createdAt, DateTime updatedAt) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnCloudFolder():
|
||||
return $default(_that.id,_that.name,_that.parentFolderId,_that.accountId,_that.createdAt,_that.updatedAt);}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String name, String? parentFolderId, String accountId, DateTime createdAt, DateTime updatedAt)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnCloudFolder() when $default != null:
|
||||
return $default(_that.id,_that.name,_that.parentFolderId,_that.accountId,_that.createdAt,_that.updatedAt);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _SnCloudFolder implements SnCloudFolder {
|
||||
const _SnCloudFolder({required this.id, required this.name, required this.parentFolderId, required this.accountId, required this.createdAt, required this.updatedAt});
|
||||
factory _SnCloudFolder.fromJson(Map<String, dynamic> json) => _$SnCloudFolderFromJson(json);
|
||||
|
||||
@override final String id;
|
||||
@override final String name;
|
||||
@override final String? parentFolderId;
|
||||
@override final String accountId;
|
||||
@override final DateTime createdAt;
|
||||
@override final DateTime updatedAt;
|
||||
|
||||
/// Create a copy of SnCloudFolder
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$SnCloudFolderCopyWith<_SnCloudFolder> get copyWith => __$SnCloudFolderCopyWithImpl<_SnCloudFolder>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$SnCloudFolderToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnCloudFolder&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.parentFolderId, parentFolderId) || other.parentFolderId == parentFolderId)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,name,parentFolderId,accountId,createdAt,updatedAt);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnCloudFolder(id: $id, name: $name, parentFolderId: $parentFolderId, accountId: $accountId, createdAt: $createdAt, updatedAt: $updatedAt)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$SnCloudFolderCopyWith<$Res> implements $SnCloudFolderCopyWith<$Res> {
|
||||
factory _$SnCloudFolderCopyWith(_SnCloudFolder value, $Res Function(_SnCloudFolder) _then) = __$SnCloudFolderCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String id, String name, String? parentFolderId, String accountId, DateTime createdAt, DateTime updatedAt
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$SnCloudFolderCopyWithImpl<$Res>
|
||||
implements _$SnCloudFolderCopyWith<$Res> {
|
||||
__$SnCloudFolderCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _SnCloudFolder _self;
|
||||
final $Res Function(_SnCloudFolder) _then;
|
||||
|
||||
/// Create a copy of SnCloudFolder
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = null,Object? parentFolderId = freezed,Object? accountId = null,Object? createdAt = null,Object? updatedAt = null,}) {
|
||||
return _then(_SnCloudFolder(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||
as String,parentFolderId: freezed == parentFolderId ? _self.parentFolderId : parentFolderId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
|
||||
as String,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
27
lib/models/folder.g.dart
Normal file
27
lib/models/folder.g.dart
Normal file
@@ -0,0 +1,27 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'folder.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_SnCloudFolder _$SnCloudFolderFromJson(Map<String, dynamic> json) =>
|
||||
_SnCloudFolder(
|
||||
id: json['id'] as String,
|
||||
name: json['name'] as String,
|
||||
parentFolderId: json['parent_folder_id'] as String?,
|
||||
accountId: json['account_id'] as String,
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnCloudFolderToJson(_SnCloudFolder instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
'parent_folder_id': instance.parentFolderId,
|
||||
'account_id': instance.accountId,
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
};
|
||||
16
lib/models/fortune.dart
Normal file
16
lib/models/fortune.dart
Normal file
@@ -0,0 +1,16 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'fortune.g.dart';
|
||||
part 'fortune.freezed.dart';
|
||||
|
||||
@freezed
|
||||
sealed class SnFortuneSaying with _$SnFortuneSaying {
|
||||
const factory SnFortuneSaying({
|
||||
required String content,
|
||||
required String source,
|
||||
required String language,
|
||||
}) = _SnFortuneSaying;
|
||||
|
||||
factory SnFortuneSaying.fromJson(Map<String, dynamic> json) =>
|
||||
_$SnFortuneSayingFromJson(json);
|
||||
}
|
||||
277
lib/models/fortune.freezed.dart
Normal file
277
lib/models/fortune.freezed.dart
Normal file
@@ -0,0 +1,277 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'fortune.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$SnFortuneSaying {
|
||||
|
||||
String get content; String get source; String get language;
|
||||
/// Create a copy of SnFortuneSaying
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnFortuneSayingCopyWith<SnFortuneSaying> get copyWith => _$SnFortuneSayingCopyWithImpl<SnFortuneSaying>(this as SnFortuneSaying, _$identity);
|
||||
|
||||
/// Serializes this SnFortuneSaying to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnFortuneSaying&&(identical(other.content, content) || other.content == content)&&(identical(other.source, source) || other.source == source)&&(identical(other.language, language) || other.language == language));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,content,source,language);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnFortuneSaying(content: $content, source: $source, language: $language)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $SnFortuneSayingCopyWith<$Res> {
|
||||
factory $SnFortuneSayingCopyWith(SnFortuneSaying value, $Res Function(SnFortuneSaying) _then) = _$SnFortuneSayingCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String content, String source, String language
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$SnFortuneSayingCopyWithImpl<$Res>
|
||||
implements $SnFortuneSayingCopyWith<$Res> {
|
||||
_$SnFortuneSayingCopyWithImpl(this._self, this._then);
|
||||
|
||||
final SnFortuneSaying _self;
|
||||
final $Res Function(SnFortuneSaying) _then;
|
||||
|
||||
/// Create a copy of SnFortuneSaying
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? content = null,Object? source = null,Object? language = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
content: null == content ? _self.content : content // ignore: cast_nullable_to_non_nullable
|
||||
as String,source: null == source ? _self.source : source // ignore: cast_nullable_to_non_nullable
|
||||
as String,language: null == language ? _self.language : language // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [SnFortuneSaying].
|
||||
extension SnFortuneSayingPatterns on SnFortuneSaying {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _SnFortuneSaying value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _SnFortuneSaying() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _SnFortuneSaying value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _SnFortuneSaying():
|
||||
return $default(_that);}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _SnFortuneSaying value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _SnFortuneSaying() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String content, String source, String language)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnFortuneSaying() when $default != null:
|
||||
return $default(_that.content,_that.source,_that.language);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String content, String source, String language) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnFortuneSaying():
|
||||
return $default(_that.content,_that.source,_that.language);}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String content, String source, String language)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnFortuneSaying() when $default != null:
|
||||
return $default(_that.content,_that.source,_that.language);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _SnFortuneSaying implements SnFortuneSaying {
|
||||
const _SnFortuneSaying({required this.content, required this.source, required this.language});
|
||||
factory _SnFortuneSaying.fromJson(Map<String, dynamic> json) => _$SnFortuneSayingFromJson(json);
|
||||
|
||||
@override final String content;
|
||||
@override final String source;
|
||||
@override final String language;
|
||||
|
||||
/// Create a copy of SnFortuneSaying
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$SnFortuneSayingCopyWith<_SnFortuneSaying> get copyWith => __$SnFortuneSayingCopyWithImpl<_SnFortuneSaying>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$SnFortuneSayingToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnFortuneSaying&&(identical(other.content, content) || other.content == content)&&(identical(other.source, source) || other.source == source)&&(identical(other.language, language) || other.language == language));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,content,source,language);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnFortuneSaying(content: $content, source: $source, language: $language)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$SnFortuneSayingCopyWith<$Res> implements $SnFortuneSayingCopyWith<$Res> {
|
||||
factory _$SnFortuneSayingCopyWith(_SnFortuneSaying value, $Res Function(_SnFortuneSaying) _then) = __$SnFortuneSayingCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String content, String source, String language
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$SnFortuneSayingCopyWithImpl<$Res>
|
||||
implements _$SnFortuneSayingCopyWith<$Res> {
|
||||
__$SnFortuneSayingCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _SnFortuneSaying _self;
|
||||
final $Res Function(_SnFortuneSaying) _then;
|
||||
|
||||
/// Create a copy of SnFortuneSaying
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? content = null,Object? source = null,Object? language = null,}) {
|
||||
return _then(_SnFortuneSaying(
|
||||
content: null == content ? _self.content : content // ignore: cast_nullable_to_non_nullable
|
||||
as String,source: null == source ? _self.source : source // ignore: cast_nullable_to_non_nullable
|
||||
as String,language: null == language ? _self.language : language // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
21
lib/models/fortune.g.dart
Normal file
21
lib/models/fortune.g.dart
Normal file
@@ -0,0 +1,21 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'fortune.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_SnFortuneSaying _$SnFortuneSayingFromJson(Map<String, dynamic> json) =>
|
||||
_SnFortuneSaying(
|
||||
content: json['content'] as String,
|
||||
source: json['source'] as String,
|
||||
language: json['language'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnFortuneSayingToJson(_SnFortuneSaying instance) =>
|
||||
<String, dynamic>{
|
||||
'content': instance.content,
|
||||
'source': instance.source,
|
||||
'language': instance.language,
|
||||
};
|
||||
@@ -10,10 +10,9 @@ _SnHeatmap _$SnHeatmapFromJson(Map<String, dynamic> json) => _SnHeatmap(
|
||||
unit: json['unit'] as String,
|
||||
periodStart: DateTime.parse(json['period_start'] as String),
|
||||
periodEnd: DateTime.parse(json['period_end'] as String),
|
||||
items:
|
||||
(json['items'] as List<dynamic>)
|
||||
.map((e) => SnHeatmapItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
items: (json['items'] as List<dynamic>)
|
||||
.map((e) => SnHeatmapItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnHeatmapToJson(_SnHeatmap instance) =>
|
||||
|
||||
@@ -46,6 +46,18 @@ sealed class SnPoll with _$SnPoll {
|
||||
}) = _SnPoll;
|
||||
|
||||
factory SnPoll.fromJson(Map<String, dynamic> json) => _$SnPollFromJson(json);
|
||||
|
||||
factory SnPoll.fromPollWithStats(SnPollWithStats pollWithStats) => SnPoll(
|
||||
id: pollWithStats.id,
|
||||
questions: pollWithStats.questions,
|
||||
title: pollWithStats.title,
|
||||
description: pollWithStats.description,
|
||||
endedAt: pollWithStats.endedAt,
|
||||
publisherId: pollWithStats.publisherId,
|
||||
createdAt: pollWithStats.createdAt,
|
||||
updatedAt: pollWithStats.updatedAt,
|
||||
deletedAt: pollWithStats.deletedAt,
|
||||
);
|
||||
}
|
||||
|
||||
@freezed
|
||||
|
||||
@@ -8,31 +8,25 @@ part of 'poll.dart';
|
||||
|
||||
_SnPollWithStats _$SnPollWithStatsFromJson(Map<String, dynamic> json) =>
|
||||
_SnPollWithStats(
|
||||
userAnswer:
|
||||
json['user_answer'] == null
|
||||
? null
|
||||
: SnPollAnswer.fromJson(
|
||||
json['user_answer'] as Map<String, dynamic>,
|
||||
),
|
||||
userAnswer: json['user_answer'] == null
|
||||
? null
|
||||
: SnPollAnswer.fromJson(json['user_answer'] as Map<String, dynamic>),
|
||||
stats: json['stats'] as Map<String, dynamic>? ?? const {},
|
||||
id: json['id'] as String,
|
||||
questions:
|
||||
(json['questions'] as List<dynamic>)
|
||||
.map((e) => SnPollQuestion.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
questions: (json['questions'] as List<dynamic>)
|
||||
.map((e) => SnPollQuestion.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
title: json['title'] as String?,
|
||||
description: json['description'] as String?,
|
||||
endedAt:
|
||||
json['ended_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['ended_at'] as String),
|
||||
endedAt: json['ended_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['ended_at'] as String),
|
||||
publisherId: json['publisher_id'] as String,
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt:
|
||||
json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnPollWithStatsToJson(_SnPollWithStats instance) =>
|
||||
@@ -52,27 +46,23 @@ Map<String, dynamic> _$SnPollWithStatsToJson(_SnPollWithStats instance) =>
|
||||
|
||||
_SnPoll _$SnPollFromJson(Map<String, dynamic> json) => _SnPoll(
|
||||
id: json['id'] as String,
|
||||
questions:
|
||||
(json['questions'] as List<dynamic>)
|
||||
.map((e) => SnPollQuestion.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
questions: (json['questions'] as List<dynamic>)
|
||||
.map((e) => SnPollQuestion.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
title: json['title'] as String?,
|
||||
description: json['description'] as String?,
|
||||
endedAt:
|
||||
json['ended_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['ended_at'] as String),
|
||||
endedAt: json['ended_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['ended_at'] as String),
|
||||
publisherId: json['publisher_id'] as String,
|
||||
publisher:
|
||||
json['publisher'] == null
|
||||
? null
|
||||
: SnPublisher.fromJson(json['publisher'] as Map<String, dynamic>),
|
||||
publisher: json['publisher'] == null
|
||||
? null
|
||||
: SnPublisher.fromJson(json['publisher'] as Map<String, dynamic>),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt:
|
||||
json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnPollToJson(_SnPoll instance) => <String, dynamic>{
|
||||
@@ -92,10 +82,9 @@ _SnPollQuestion _$SnPollQuestionFromJson(Map<String, dynamic> json) =>
|
||||
_SnPollQuestion(
|
||||
id: json['id'] as String,
|
||||
type: $enumDecode(_$SnPollQuestionTypeEnumMap, json['type']),
|
||||
options:
|
||||
(json['options'] as List<dynamic>?)
|
||||
?.map((e) => SnPollOption.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
options: (json['options'] as List<dynamic>?)
|
||||
?.map((e) => SnPollOption.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
title: json['title'] as String,
|
||||
description: json['description'] as String?,
|
||||
order: (json['order'] as num).toInt(),
|
||||
@@ -145,14 +134,12 @@ _SnPollAnswer _$SnPollAnswerFromJson(Map<String, dynamic> json) =>
|
||||
pollId: json['poll_id'] as String,
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt:
|
||||
json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
account:
|
||||
json['account'] == null
|
||||
? null
|
||||
: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
account: json['account'] == null
|
||||
? null
|
||||
: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnPollAnswerToJson(_SnPollAnswer instance) =>
|
||||
|
||||
@@ -74,15 +74,15 @@ sealed class SnPublisherStats with _$SnPublisherStats {
|
||||
}
|
||||
|
||||
@freezed
|
||||
sealed class SnSubscriptionStatus with _$SnSubscriptionStatus {
|
||||
const factory SnSubscriptionStatus({
|
||||
required bool isSubscribed,
|
||||
sealed class SnPublisherSubscription with _$SnPublisherSubscription {
|
||||
const factory SnPublisherSubscription({
|
||||
required String accountId,
|
||||
required String publisherId,
|
||||
required String publisherName,
|
||||
}) = _SnSubscriptionStatus;
|
||||
required SnPublisher publisher,
|
||||
}) = _SnPublisherSubscription;
|
||||
|
||||
factory SnSubscriptionStatus.fromJson(Map<String, dynamic> json) =>
|
||||
_$SnSubscriptionStatusFromJson(json);
|
||||
factory SnPublisherSubscription.fromJson(Map<String, dynamic> json) =>
|
||||
_$SnPublisherSubscriptionFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
@@ -92,8 +92,9 @@ sealed class ReactInfo with _$ReactInfo {
|
||||
|
||||
static String getTranslationKey(String templateKey) {
|
||||
final parts = templateKey.split('_');
|
||||
final camelCase =
|
||||
parts.map((p) => p[0].toUpperCase() + p.substring(1)).join();
|
||||
final camelCase = parts
|
||||
.map((p) => p[0].toUpperCase() + p.substring(1))
|
||||
.join();
|
||||
return 'reaction$camelCase';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -856,72 +856,81 @@ as int,
|
||||
|
||||
|
||||
/// @nodoc
|
||||
mixin _$SnSubscriptionStatus {
|
||||
mixin _$SnPublisherSubscription {
|
||||
|
||||
bool get isSubscribed; String get publisherId; String get publisherName;
|
||||
/// Create a copy of SnSubscriptionStatus
|
||||
String get accountId; String get publisherId; SnPublisher get publisher;
|
||||
/// Create a copy of SnPublisherSubscription
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnSubscriptionStatusCopyWith<SnSubscriptionStatus> get copyWith => _$SnSubscriptionStatusCopyWithImpl<SnSubscriptionStatus>(this as SnSubscriptionStatus, _$identity);
|
||||
$SnPublisherSubscriptionCopyWith<SnPublisherSubscription> get copyWith => _$SnPublisherSubscriptionCopyWithImpl<SnPublisherSubscription>(this as SnPublisherSubscription, _$identity);
|
||||
|
||||
/// Serializes this SnSubscriptionStatus to a JSON map.
|
||||
/// Serializes this SnPublisherSubscription to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnSubscriptionStatus&&(identical(other.isSubscribed, isSubscribed) || other.isSubscribed == isSubscribed)&&(identical(other.publisherId, publisherId) || other.publisherId == publisherId)&&(identical(other.publisherName, publisherName) || other.publisherName == publisherName));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnPublisherSubscription&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.publisherId, publisherId) || other.publisherId == publisherId)&&(identical(other.publisher, publisher) || other.publisher == publisher));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,isSubscribed,publisherId,publisherName);
|
||||
int get hashCode => Object.hash(runtimeType,accountId,publisherId,publisher);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnSubscriptionStatus(isSubscribed: $isSubscribed, publisherId: $publisherId, publisherName: $publisherName)';
|
||||
return 'SnPublisherSubscription(accountId: $accountId, publisherId: $publisherId, publisher: $publisher)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $SnSubscriptionStatusCopyWith<$Res> {
|
||||
factory $SnSubscriptionStatusCopyWith(SnSubscriptionStatus value, $Res Function(SnSubscriptionStatus) _then) = _$SnSubscriptionStatusCopyWithImpl;
|
||||
abstract mixin class $SnPublisherSubscriptionCopyWith<$Res> {
|
||||
factory $SnPublisherSubscriptionCopyWith(SnPublisherSubscription value, $Res Function(SnPublisherSubscription) _then) = _$SnPublisherSubscriptionCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
bool isSubscribed, String publisherId, String publisherName
|
||||
String accountId, String publisherId, SnPublisher publisher
|
||||
});
|
||||
|
||||
|
||||
|
||||
$SnPublisherCopyWith<$Res> get publisher;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$SnSubscriptionStatusCopyWithImpl<$Res>
|
||||
implements $SnSubscriptionStatusCopyWith<$Res> {
|
||||
_$SnSubscriptionStatusCopyWithImpl(this._self, this._then);
|
||||
class _$SnPublisherSubscriptionCopyWithImpl<$Res>
|
||||
implements $SnPublisherSubscriptionCopyWith<$Res> {
|
||||
_$SnPublisherSubscriptionCopyWithImpl(this._self, this._then);
|
||||
|
||||
final SnSubscriptionStatus _self;
|
||||
final $Res Function(SnSubscriptionStatus) _then;
|
||||
final SnPublisherSubscription _self;
|
||||
final $Res Function(SnPublisherSubscription) _then;
|
||||
|
||||
/// Create a copy of SnSubscriptionStatus
|
||||
/// Create a copy of SnPublisherSubscription
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? isSubscribed = null,Object? publisherId = null,Object? publisherName = null,}) {
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? accountId = null,Object? publisherId = null,Object? publisher = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
isSubscribed: null == isSubscribed ? _self.isSubscribed : isSubscribed // ignore: cast_nullable_to_non_nullable
|
||||
as bool,publisherId: null == publisherId ? _self.publisherId : publisherId // ignore: cast_nullable_to_non_nullable
|
||||
as String,publisherName: null == publisherName ? _self.publisherName : publisherName // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
|
||||
as String,publisherId: null == publisherId ? _self.publisherId : publisherId // ignore: cast_nullable_to_non_nullable
|
||||
as String,publisher: null == publisher ? _self.publisher : publisher // ignore: cast_nullable_to_non_nullable
|
||||
as SnPublisher,
|
||||
));
|
||||
}
|
||||
|
||||
/// Create a copy of SnPublisherSubscription
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnPublisherCopyWith<$Res> get publisher {
|
||||
|
||||
return $SnPublisherCopyWith<$Res>(_self.publisher, (value) {
|
||||
return _then(_self.copyWith(publisher: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [SnSubscriptionStatus].
|
||||
extension SnSubscriptionStatusPatterns on SnSubscriptionStatus {
|
||||
/// Adds pattern-matching-related methods to [SnPublisherSubscription].
|
||||
extension SnPublisherSubscriptionPatterns on SnPublisherSubscription {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
@@ -934,10 +943,10 @@ extension SnSubscriptionStatusPatterns on SnSubscriptionStatus {
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _SnSubscriptionStatus value)? $default,{required TResult orElse(),}){
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _SnPublisherSubscription value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _SnSubscriptionStatus() when $default != null:
|
||||
case _SnPublisherSubscription() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
@@ -956,10 +965,10 @@ return $default(_that);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _SnSubscriptionStatus value) $default,){
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _SnPublisherSubscription value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _SnSubscriptionStatus():
|
||||
case _SnPublisherSubscription():
|
||||
return $default(_that);}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
@@ -974,10 +983,10 @@ return $default(_that);}
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _SnSubscriptionStatus value)? $default,){
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _SnPublisherSubscription value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _SnSubscriptionStatus() when $default != null:
|
||||
case _SnPublisherSubscription() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
@@ -995,10 +1004,10 @@ return $default(_that);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool isSubscribed, String publisherId, String publisherName)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String accountId, String publisherId, SnPublisher publisher)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnSubscriptionStatus() when $default != null:
|
||||
return $default(_that.isSubscribed,_that.publisherId,_that.publisherName);case _:
|
||||
case _SnPublisherSubscription() when $default != null:
|
||||
return $default(_that.accountId,_that.publisherId,_that.publisher);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
@@ -1016,10 +1025,10 @@ return $default(_that.isSubscribed,_that.publisherId,_that.publisherName);case _
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool isSubscribed, String publisherId, String publisherName) $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String accountId, String publisherId, SnPublisher publisher) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnSubscriptionStatus():
|
||||
return $default(_that.isSubscribed,_that.publisherId,_that.publisherName);}
|
||||
case _SnPublisherSubscription():
|
||||
return $default(_that.accountId,_that.publisherId,_that.publisher);}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
@@ -1033,10 +1042,10 @@ return $default(_that.isSubscribed,_that.publisherId,_that.publisherName);}
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool isSubscribed, String publisherId, String publisherName)? $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String accountId, String publisherId, SnPublisher publisher)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnSubscriptionStatus() when $default != null:
|
||||
return $default(_that.isSubscribed,_that.publisherId,_that.publisherName);case _:
|
||||
case _SnPublisherSubscription() when $default != null:
|
||||
return $default(_that.accountId,_that.publisherId,_that.publisher);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
@@ -1047,74 +1056,83 @@ return $default(_that.isSubscribed,_that.publisherId,_that.publisherName);case _
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _SnSubscriptionStatus implements SnSubscriptionStatus {
|
||||
const _SnSubscriptionStatus({required this.isSubscribed, required this.publisherId, required this.publisherName});
|
||||
factory _SnSubscriptionStatus.fromJson(Map<String, dynamic> json) => _$SnSubscriptionStatusFromJson(json);
|
||||
class _SnPublisherSubscription implements SnPublisherSubscription {
|
||||
const _SnPublisherSubscription({required this.accountId, required this.publisherId, required this.publisher});
|
||||
factory _SnPublisherSubscription.fromJson(Map<String, dynamic> json) => _$SnPublisherSubscriptionFromJson(json);
|
||||
|
||||
@override final bool isSubscribed;
|
||||
@override final String accountId;
|
||||
@override final String publisherId;
|
||||
@override final String publisherName;
|
||||
@override final SnPublisher publisher;
|
||||
|
||||
/// Create a copy of SnSubscriptionStatus
|
||||
/// Create a copy of SnPublisherSubscription
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$SnSubscriptionStatusCopyWith<_SnSubscriptionStatus> get copyWith => __$SnSubscriptionStatusCopyWithImpl<_SnSubscriptionStatus>(this, _$identity);
|
||||
_$SnPublisherSubscriptionCopyWith<_SnPublisherSubscription> get copyWith => __$SnPublisherSubscriptionCopyWithImpl<_SnPublisherSubscription>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$SnSubscriptionStatusToJson(this, );
|
||||
return _$SnPublisherSubscriptionToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnSubscriptionStatus&&(identical(other.isSubscribed, isSubscribed) || other.isSubscribed == isSubscribed)&&(identical(other.publisherId, publisherId) || other.publisherId == publisherId)&&(identical(other.publisherName, publisherName) || other.publisherName == publisherName));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnPublisherSubscription&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.publisherId, publisherId) || other.publisherId == publisherId)&&(identical(other.publisher, publisher) || other.publisher == publisher));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,isSubscribed,publisherId,publisherName);
|
||||
int get hashCode => Object.hash(runtimeType,accountId,publisherId,publisher);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnSubscriptionStatus(isSubscribed: $isSubscribed, publisherId: $publisherId, publisherName: $publisherName)';
|
||||
return 'SnPublisherSubscription(accountId: $accountId, publisherId: $publisherId, publisher: $publisher)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$SnSubscriptionStatusCopyWith<$Res> implements $SnSubscriptionStatusCopyWith<$Res> {
|
||||
factory _$SnSubscriptionStatusCopyWith(_SnSubscriptionStatus value, $Res Function(_SnSubscriptionStatus) _then) = __$SnSubscriptionStatusCopyWithImpl;
|
||||
abstract mixin class _$SnPublisherSubscriptionCopyWith<$Res> implements $SnPublisherSubscriptionCopyWith<$Res> {
|
||||
factory _$SnPublisherSubscriptionCopyWith(_SnPublisherSubscription value, $Res Function(_SnPublisherSubscription) _then) = __$SnPublisherSubscriptionCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
bool isSubscribed, String publisherId, String publisherName
|
||||
String accountId, String publisherId, SnPublisher publisher
|
||||
});
|
||||
|
||||
|
||||
|
||||
@override $SnPublisherCopyWith<$Res> get publisher;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$SnSubscriptionStatusCopyWithImpl<$Res>
|
||||
implements _$SnSubscriptionStatusCopyWith<$Res> {
|
||||
__$SnSubscriptionStatusCopyWithImpl(this._self, this._then);
|
||||
class __$SnPublisherSubscriptionCopyWithImpl<$Res>
|
||||
implements _$SnPublisherSubscriptionCopyWith<$Res> {
|
||||
__$SnPublisherSubscriptionCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _SnSubscriptionStatus _self;
|
||||
final $Res Function(_SnSubscriptionStatus) _then;
|
||||
final _SnPublisherSubscription _self;
|
||||
final $Res Function(_SnPublisherSubscription) _then;
|
||||
|
||||
/// Create a copy of SnSubscriptionStatus
|
||||
/// Create a copy of SnPublisherSubscription
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? isSubscribed = null,Object? publisherId = null,Object? publisherName = null,}) {
|
||||
return _then(_SnSubscriptionStatus(
|
||||
isSubscribed: null == isSubscribed ? _self.isSubscribed : isSubscribed // ignore: cast_nullable_to_non_nullable
|
||||
as bool,publisherId: null == publisherId ? _self.publisherId : publisherId // ignore: cast_nullable_to_non_nullable
|
||||
as String,publisherName: null == publisherName ? _self.publisherName : publisherName // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? accountId = null,Object? publisherId = null,Object? publisher = null,}) {
|
||||
return _then(_SnPublisherSubscription(
|
||||
accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
|
||||
as String,publisherId: null == publisherId ? _self.publisherId : publisherId // ignore: cast_nullable_to_non_nullable
|
||||
as String,publisher: null == publisher ? _self.publisher : publisher // ignore: cast_nullable_to_non_nullable
|
||||
as SnPublisher,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
/// Create a copy of SnPublisherSubscription
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnPublisherCopyWith<$Res> get publisher {
|
||||
|
||||
return $SnPublisherCopyWith<$Res>(_self.publisher, (value) {
|
||||
return _then(_self.copyWith(publisher: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
@@ -11,25 +11,20 @@ _SnPost _$SnPostFromJson(Map<String, dynamic> json) => _SnPost(
|
||||
title: json['title'] as String?,
|
||||
description: json['description'] as String?,
|
||||
language: json['language'] as String?,
|
||||
editedAt:
|
||||
json['edited_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['edited_at'] as String),
|
||||
publishedAt:
|
||||
json['published_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['published_at'] as String),
|
||||
editedAt: json['edited_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['edited_at'] as String),
|
||||
publishedAt: json['published_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['published_at'] as String),
|
||||
visibility: (json['visibility'] as num?)?.toInt() ?? 0,
|
||||
content: json['content'] as String?,
|
||||
slug: json['slug'] as String?,
|
||||
type: (json['type'] as num?)?.toInt() ?? 0,
|
||||
meta: json['meta'] as Map<String, dynamic>?,
|
||||
embedView:
|
||||
json['embed_view'] == null
|
||||
? null
|
||||
: SnPostEmbedView.fromJson(
|
||||
json['embed_view'] as Map<String, dynamic>,
|
||||
),
|
||||
embedView: json['embed_view'] == null
|
||||
? null
|
||||
: SnPostEmbedView.fromJson(json['embed_view'] as Map<String, dynamic>),
|
||||
viewsUnique: (json['views_unique'] as num?)?.toInt() ?? 0,
|
||||
viewsTotal: (json['views_total'] as num?)?.toInt() ?? 0,
|
||||
upvotes: (json['upvotes'] as num?)?.toInt() ?? 0,
|
||||
@@ -38,25 +33,21 @@ _SnPost _$SnPostFromJson(Map<String, dynamic> json) => _SnPost(
|
||||
awardedScore: (json['awarded_score'] as num?)?.toInt() ?? 0,
|
||||
pinMode: (json['pin_mode'] as num?)?.toInt(),
|
||||
threadedPostId: json['threaded_post_id'] as String?,
|
||||
threadedPost:
|
||||
json['threaded_post'] == null
|
||||
? null
|
||||
: SnPost.fromJson(json['threaded_post'] as Map<String, dynamic>),
|
||||
threadedPost: json['threaded_post'] == null
|
||||
? null
|
||||
: SnPost.fromJson(json['threaded_post'] as Map<String, dynamic>),
|
||||
repliedPostId: json['replied_post_id'] as String?,
|
||||
repliedPost:
|
||||
json['replied_post'] == null
|
||||
? null
|
||||
: SnPost.fromJson(json['replied_post'] as Map<String, dynamic>),
|
||||
repliedPost: json['replied_post'] == null
|
||||
? null
|
||||
: SnPost.fromJson(json['replied_post'] as Map<String, dynamic>),
|
||||
forwardedPostId: json['forwarded_post_id'] as String?,
|
||||
forwardedPost:
|
||||
json['forwarded_post'] == null
|
||||
? null
|
||||
: SnPost.fromJson(json['forwarded_post'] as Map<String, dynamic>),
|
||||
forwardedPost: json['forwarded_post'] == null
|
||||
? null
|
||||
: SnPost.fromJson(json['forwarded_post'] as Map<String, dynamic>),
|
||||
realmId: json['realm_id'] as String?,
|
||||
realm:
|
||||
json['realm'] == null
|
||||
? null
|
||||
: SnRealm.fromJson(json['realm'] as Map<String, dynamic>),
|
||||
realm: json['realm'] == null
|
||||
? null
|
||||
: SnRealm.fromJson(json['realm'] as Map<String, dynamic>),
|
||||
attachments:
|
||||
(json['attachments'] as List<dynamic>?)
|
||||
?.map((e) => SnCloudFile.fromJson(e as Map<String, dynamic>))
|
||||
@@ -90,18 +81,15 @@ _SnPost _$SnPostFromJson(Map<String, dynamic> json) => _SnPost(
|
||||
?.map((e) => SnPostFeaturedRecord.fromJson(e as Map<String, dynamic>))
|
||||
.toList() ??
|
||||
const [],
|
||||
createdAt:
|
||||
json['created_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt:
|
||||
json['updated_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt:
|
||||
json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
createdAt: json['created_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: json['updated_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
repliedGone: json['replied_gone'] as bool? ?? false,
|
||||
forwardedGone: json['forwarded_gone'] as bool? ?? false,
|
||||
isTruncated: json['is_truncated'] as bool? ?? false,
|
||||
@@ -170,20 +158,20 @@ Map<String, dynamic> _$SnPublisherStatsToJson(_SnPublisherStats instance) =>
|
||||
'downvote_received': instance.downvoteReceived,
|
||||
};
|
||||
|
||||
_SnSubscriptionStatus _$SnSubscriptionStatusFromJson(
|
||||
_SnPublisherSubscription _$SnPublisherSubscriptionFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _SnSubscriptionStatus(
|
||||
isSubscribed: json['is_subscribed'] as bool,
|
||||
) => _SnPublisherSubscription(
|
||||
accountId: json['account_id'] as String,
|
||||
publisherId: json['publisher_id'] as String,
|
||||
publisherName: json['publisher_name'] as String,
|
||||
publisher: SnPublisher.fromJson(json['publisher'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnSubscriptionStatusToJson(
|
||||
_SnSubscriptionStatus instance,
|
||||
Map<String, dynamic> _$SnPublisherSubscriptionToJson(
|
||||
_SnPublisherSubscription instance,
|
||||
) => <String, dynamic>{
|
||||
'is_subscribed': instance.isSubscribed,
|
||||
'account_id': instance.accountId,
|
||||
'publisher_id': instance.publisherId,
|
||||
'publisher_name': instance.publisherName,
|
||||
'publisher': instance.publisher.toJson(),
|
||||
};
|
||||
|
||||
_SnPostEmbedView _$SnPostEmbedViewFromJson(Map<String, dynamic> json) =>
|
||||
@@ -214,18 +202,15 @@ _SnPostAward _$SnPostAwardFromJson(Map<String, dynamic> json) => _SnPostAward(
|
||||
message: json['message'] as String?,
|
||||
postId: json['post_id'] as String,
|
||||
accountId: json['account_id'] as String,
|
||||
createdAt:
|
||||
json['created_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt:
|
||||
json['updated_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt:
|
||||
json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
createdAt: json['created_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: json['updated_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnPostAwardToJson(_SnPostAward instance) =>
|
||||
@@ -250,14 +235,12 @@ _SnPostReaction _$SnPostReactionFromJson(Map<String, dynamic> json) =>
|
||||
accountId: json['account_id'] as String,
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
account:
|
||||
json['account'] == null
|
||||
? null
|
||||
: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
||||
deletedAt:
|
||||
json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
account: json['account'] == null
|
||||
? null
|
||||
: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnPostReactionToJson(_SnPostReaction instance) =>
|
||||
@@ -278,17 +261,15 @@ _SnPostFeaturedRecord _$SnPostFeaturedRecordFromJson(
|
||||
) => _SnPostFeaturedRecord(
|
||||
id: json['id'] as String,
|
||||
postId: json['post_id'] as String,
|
||||
featuredAt:
|
||||
json['featured_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['featured_at'] as String),
|
||||
featuredAt: json['featured_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['featured_at'] as String),
|
||||
socialCredits: (json['social_credits'] as num).toInt(),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt:
|
||||
json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnPostFeaturedRecordToJson(
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
import 'package:island/models/post.dart';
|
||||
import 'package:island/models/post_tag.dart';
|
||||
import 'package:island/utils/text.dart';
|
||||
|
||||
part 'post_category.freezed.dart';
|
||||
@@ -29,3 +30,21 @@ sealed class SnPostCategory with _$SnPostCategory {
|
||||
return name ?? slug;
|
||||
}
|
||||
}
|
||||
|
||||
@freezed
|
||||
sealed class SnCategorySubscription with _$SnCategorySubscription {
|
||||
const factory SnCategorySubscription({
|
||||
required String id,
|
||||
required String accountId,
|
||||
required String? categoryId,
|
||||
required SnPostCategory? category,
|
||||
required String? tagId,
|
||||
required SnPostTag? tag,
|
||||
required DateTime createdAt,
|
||||
required DateTime updatedAt,
|
||||
required DateTime? deletedAt,
|
||||
}) = _SnCategorySubscription;
|
||||
|
||||
factory SnCategorySubscription.fromJson(Map<String, dynamic> json) =>
|
||||
_$SnCategorySubscriptionFromJson(json);
|
||||
}
|
||||
|
||||
@@ -286,4 +286,333 @@ as int,
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// @nodoc
|
||||
mixin _$SnCategorySubscription {
|
||||
|
||||
String get id; String get accountId; String? get categoryId; SnPostCategory? get category; String? get tagId; SnPostTag? get tag; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt;
|
||||
/// Create a copy of SnCategorySubscription
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnCategorySubscriptionCopyWith<SnCategorySubscription> get copyWith => _$SnCategorySubscriptionCopyWithImpl<SnCategorySubscription>(this as SnCategorySubscription, _$identity);
|
||||
|
||||
/// Serializes this SnCategorySubscription to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnCategorySubscription&&(identical(other.id, id) || other.id == id)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.categoryId, categoryId) || other.categoryId == categoryId)&&(identical(other.category, category) || other.category == category)&&(identical(other.tagId, tagId) || other.tagId == tagId)&&(identical(other.tag, tag) || other.tag == tag)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,accountId,categoryId,category,tagId,tag,createdAt,updatedAt,deletedAt);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnCategorySubscription(id: $id, accountId: $accountId, categoryId: $categoryId, category: $category, tagId: $tagId, tag: $tag, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $SnCategorySubscriptionCopyWith<$Res> {
|
||||
factory $SnCategorySubscriptionCopyWith(SnCategorySubscription value, $Res Function(SnCategorySubscription) _then) = _$SnCategorySubscriptionCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String id, String accountId, String? categoryId, SnPostCategory? category, String? tagId, SnPostTag? tag, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
||||
});
|
||||
|
||||
|
||||
$SnPostCategoryCopyWith<$Res>? get category;$SnPostTagCopyWith<$Res>? get tag;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$SnCategorySubscriptionCopyWithImpl<$Res>
|
||||
implements $SnCategorySubscriptionCopyWith<$Res> {
|
||||
_$SnCategorySubscriptionCopyWithImpl(this._self, this._then);
|
||||
|
||||
final SnCategorySubscription _self;
|
||||
final $Res Function(SnCategorySubscription) _then;
|
||||
|
||||
/// Create a copy of SnCategorySubscription
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? accountId = null,Object? categoryId = freezed,Object? category = freezed,Object? tagId = freezed,Object? tag = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
|
||||
as String,categoryId: freezed == categoryId ? _self.categoryId : categoryId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,category: freezed == category ? _self.category : category // ignore: cast_nullable_to_non_nullable
|
||||
as SnPostCategory?,tagId: freezed == tagId ? _self.tagId : tagId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,tag: freezed == tag ? _self.tag : tag // ignore: cast_nullable_to_non_nullable
|
||||
as SnPostTag?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
));
|
||||
}
|
||||
/// Create a copy of SnCategorySubscription
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnPostCategoryCopyWith<$Res>? get category {
|
||||
if (_self.category == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $SnPostCategoryCopyWith<$Res>(_self.category!, (value) {
|
||||
return _then(_self.copyWith(category: value));
|
||||
});
|
||||
}/// Create a copy of SnCategorySubscription
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnPostTagCopyWith<$Res>? get tag {
|
||||
if (_self.tag == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $SnPostTagCopyWith<$Res>(_self.tag!, (value) {
|
||||
return _then(_self.copyWith(tag: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [SnCategorySubscription].
|
||||
extension SnCategorySubscriptionPatterns on SnCategorySubscription {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _SnCategorySubscription value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _SnCategorySubscription() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _SnCategorySubscription value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _SnCategorySubscription():
|
||||
return $default(_that);}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _SnCategorySubscription value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _SnCategorySubscription() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String accountId, String? categoryId, SnPostCategory? category, String? tagId, SnPostTag? tag, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnCategorySubscription() when $default != null:
|
||||
return $default(_that.id,_that.accountId,_that.categoryId,_that.category,_that.tagId,_that.tag,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String accountId, String? categoryId, SnPostCategory? category, String? tagId, SnPostTag? tag, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnCategorySubscription():
|
||||
return $default(_that.id,_that.accountId,_that.categoryId,_that.category,_that.tagId,_that.tag,_that.createdAt,_that.updatedAt,_that.deletedAt);}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String accountId, String? categoryId, SnPostCategory? category, String? tagId, SnPostTag? tag, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnCategorySubscription() when $default != null:
|
||||
return $default(_that.id,_that.accountId,_that.categoryId,_that.category,_that.tagId,_that.tag,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _SnCategorySubscription implements SnCategorySubscription {
|
||||
const _SnCategorySubscription({required this.id, required this.accountId, required this.categoryId, required this.category, required this.tagId, required this.tag, required this.createdAt, required this.updatedAt, required this.deletedAt});
|
||||
factory _SnCategorySubscription.fromJson(Map<String, dynamic> json) => _$SnCategorySubscriptionFromJson(json);
|
||||
|
||||
@override final String id;
|
||||
@override final String accountId;
|
||||
@override final String? categoryId;
|
||||
@override final SnPostCategory? category;
|
||||
@override final String? tagId;
|
||||
@override final SnPostTag? tag;
|
||||
@override final DateTime createdAt;
|
||||
@override final DateTime updatedAt;
|
||||
@override final DateTime? deletedAt;
|
||||
|
||||
/// Create a copy of SnCategorySubscription
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$SnCategorySubscriptionCopyWith<_SnCategorySubscription> get copyWith => __$SnCategorySubscriptionCopyWithImpl<_SnCategorySubscription>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$SnCategorySubscriptionToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnCategorySubscription&&(identical(other.id, id) || other.id == id)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.categoryId, categoryId) || other.categoryId == categoryId)&&(identical(other.category, category) || other.category == category)&&(identical(other.tagId, tagId) || other.tagId == tagId)&&(identical(other.tag, tag) || other.tag == tag)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,accountId,categoryId,category,tagId,tag,createdAt,updatedAt,deletedAt);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnCategorySubscription(id: $id, accountId: $accountId, categoryId: $categoryId, category: $category, tagId: $tagId, tag: $tag, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$SnCategorySubscriptionCopyWith<$Res> implements $SnCategorySubscriptionCopyWith<$Res> {
|
||||
factory _$SnCategorySubscriptionCopyWith(_SnCategorySubscription value, $Res Function(_SnCategorySubscription) _then) = __$SnCategorySubscriptionCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String id, String accountId, String? categoryId, SnPostCategory? category, String? tagId, SnPostTag? tag, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
||||
});
|
||||
|
||||
|
||||
@override $SnPostCategoryCopyWith<$Res>? get category;@override $SnPostTagCopyWith<$Res>? get tag;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$SnCategorySubscriptionCopyWithImpl<$Res>
|
||||
implements _$SnCategorySubscriptionCopyWith<$Res> {
|
||||
__$SnCategorySubscriptionCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _SnCategorySubscription _self;
|
||||
final $Res Function(_SnCategorySubscription) _then;
|
||||
|
||||
/// Create a copy of SnCategorySubscription
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? accountId = null,Object? categoryId = freezed,Object? category = freezed,Object? tagId = freezed,Object? tag = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
||||
return _then(_SnCategorySubscription(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
|
||||
as String,categoryId: freezed == categoryId ? _self.categoryId : categoryId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,category: freezed == category ? _self.category : category // ignore: cast_nullable_to_non_nullable
|
||||
as SnPostCategory?,tagId: freezed == tagId ? _self.tagId : tagId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,tag: freezed == tag ? _self.tag : tag // ignore: cast_nullable_to_non_nullable
|
||||
as SnPostTag?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
));
|
||||
}
|
||||
|
||||
/// Create a copy of SnCategorySubscription
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnPostCategoryCopyWith<$Res>? get category {
|
||||
if (_self.category == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $SnPostCategoryCopyWith<$Res>(_self.category!, (value) {
|
||||
return _then(_self.copyWith(category: value));
|
||||
});
|
||||
}/// Create a copy of SnCategorySubscription
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnPostTagCopyWith<$Res>? get tag {
|
||||
if (_self.tag == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $SnPostTagCopyWith<$Res>(_self.tag!, (value) {
|
||||
return _then(_self.copyWith(tag: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// dart format on
|
||||
|
||||
@@ -27,3 +27,37 @@ Map<String, dynamic> _$SnPostCategoryToJson(_SnPostCategory instance) =>
|
||||
'posts': instance.posts.map((e) => e.toJson()).toList(),
|
||||
'usage': instance.usage,
|
||||
};
|
||||
|
||||
_SnCategorySubscription _$SnCategorySubscriptionFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _SnCategorySubscription(
|
||||
id: json['id'] as String,
|
||||
accountId: json['account_id'] as String,
|
||||
categoryId: json['category_id'] as String?,
|
||||
category: json['category'] == null
|
||||
? null
|
||||
: SnPostCategory.fromJson(json['category'] as Map<String, dynamic>),
|
||||
tagId: json['tag_id'] as String?,
|
||||
tag: json['tag'] == null
|
||||
? null
|
||||
: SnPostTag.fromJson(json['tag'] as Map<String, dynamic>),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnCategorySubscriptionToJson(
|
||||
_SnCategorySubscription instance,
|
||||
) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'account_id': instance.accountId,
|
||||
'category_id': instance.categoryId,
|
||||
'category': instance.category?.toJson(),
|
||||
'tag_id': instance.tagId,
|
||||
'tag': instance.tag?.toJson(),
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
'deleted_at': instance.deletedAt?.toIso8601String(),
|
||||
};
|
||||
|
||||
64
lib/models/publication_site.dart
Normal file
64
lib/models/publication_site.dart
Normal file
@@ -0,0 +1,64 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'publication_site.freezed.dart';
|
||||
part 'publication_site.g.dart';
|
||||
|
||||
@freezed
|
||||
sealed class SnPublicationSiteNavItems with _$SnPublicationSiteNavItems {
|
||||
const factory SnPublicationSiteNavItems({
|
||||
required String label,
|
||||
required String href,
|
||||
}) = _SnPublicationSiteNavItems;
|
||||
|
||||
factory SnPublicationSiteNavItems.fromJson(Map<String, dynamic> json) =>
|
||||
_$SnPublicationSiteNavItemsFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
sealed class SnPublicationSiteConfig with _$SnPublicationSiteConfig {
|
||||
const factory SnPublicationSiteConfig({
|
||||
String? styleOverride,
|
||||
List<SnPublicationSiteNavItems>? navItems,
|
||||
}) = _SnPublicationSiteConfig;
|
||||
|
||||
factory SnPublicationSiteConfig.fromJson(Map<String, dynamic> json) =>
|
||||
_$SnPublicationSiteConfigFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
sealed class SnPublicationSite with _$SnPublicationSite {
|
||||
const factory SnPublicationSite({
|
||||
required String id,
|
||||
required String slug,
|
||||
required String name,
|
||||
String? description,
|
||||
int? mode,
|
||||
required String publisherId,
|
||||
required String accountId,
|
||||
required DateTime createdAt,
|
||||
required DateTime updatedAt,
|
||||
required List<SnPublicationPage> pages,
|
||||
required SnPublicationSiteConfig config,
|
||||
}) = _SnPublicationSite;
|
||||
|
||||
factory SnPublicationSite.fromJson(Map<String, dynamic> json) =>
|
||||
_$SnPublicationSiteFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
sealed class SnPublicationPage with _$SnPublicationPage {
|
||||
const factory SnPublicationPage({
|
||||
required String id,
|
||||
String? preset,
|
||||
String? path,
|
||||
Map<String, dynamic>? config,
|
||||
required String siteId,
|
||||
required DateTime createdAt,
|
||||
required DateTime updatedAt,
|
||||
}) = _SnPublicationPage;
|
||||
|
||||
factory SnPublicationPage.fromJson(Map<String, dynamic> json) =>
|
||||
_$SnPublicationPageFromJson(json);
|
||||
}
|
||||
|
||||
enum PublicationPagePreset { landing, profile, posts, custom }
|
||||
1136
lib/models/publication_site.freezed.dart
Normal file
1136
lib/models/publication_site.freezed.dart
Normal file
File diff suppressed because it is too large
Load Diff
92
lib/models/publication_site.g.dart
Normal file
92
lib/models/publication_site.g.dart
Normal file
@@ -0,0 +1,92 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'publication_site.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_SnPublicationSiteNavItems _$SnPublicationSiteNavItemsFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _SnPublicationSiteNavItems(
|
||||
label: json['label'] as String,
|
||||
href: json['href'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnPublicationSiteNavItemsToJson(
|
||||
_SnPublicationSiteNavItems instance,
|
||||
) => <String, dynamic>{'label': instance.label, 'href': instance.href};
|
||||
|
||||
_SnPublicationSiteConfig _$SnPublicationSiteConfigFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _SnPublicationSiteConfig(
|
||||
styleOverride: json['style_override'] as String?,
|
||||
navItems: (json['nav_items'] as List<dynamic>?)
|
||||
?.map(
|
||||
(e) => SnPublicationSiteNavItems.fromJson(e as Map<String, dynamic>),
|
||||
)
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnPublicationSiteConfigToJson(
|
||||
_SnPublicationSiteConfig instance,
|
||||
) => <String, dynamic>{
|
||||
'style_override': instance.styleOverride,
|
||||
'nav_items': instance.navItems?.map((e) => e.toJson()).toList(),
|
||||
};
|
||||
|
||||
_SnPublicationSite _$SnPublicationSiteFromJson(Map<String, dynamic> json) =>
|
||||
_SnPublicationSite(
|
||||
id: json['id'] as String,
|
||||
slug: json['slug'] as String,
|
||||
name: json['name'] as String,
|
||||
description: json['description'] as String?,
|
||||
mode: (json['mode'] as num?)?.toInt(),
|
||||
publisherId: json['publisher_id'] as String,
|
||||
accountId: json['account_id'] as String,
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
pages: (json['pages'] as List<dynamic>)
|
||||
.map((e) => SnPublicationPage.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
config: SnPublicationSiteConfig.fromJson(
|
||||
json['config'] as Map<String, dynamic>,
|
||||
),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnPublicationSiteToJson(_SnPublicationSite instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'slug': instance.slug,
|
||||
'name': instance.name,
|
||||
'description': instance.description,
|
||||
'mode': instance.mode,
|
||||
'publisher_id': instance.publisherId,
|
||||
'account_id': instance.accountId,
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
'pages': instance.pages.map((e) => e.toJson()).toList(),
|
||||
'config': instance.config.toJson(),
|
||||
};
|
||||
|
||||
_SnPublicationPage _$SnPublicationPageFromJson(Map<String, dynamic> json) =>
|
||||
_SnPublicationPage(
|
||||
id: json['id'] as String,
|
||||
preset: json['preset'] as String?,
|
||||
path: json['path'] as String?,
|
||||
config: json['config'] as Map<String, dynamic>?,
|
||||
siteId: json['site_id'] as String,
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnPublicationPageToJson(_SnPublicationPage instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'preset': instance.preset,
|
||||
'path': instance.path,
|
||||
'config': instance.config,
|
||||
'site_id': instance.siteId,
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
};
|
||||
@@ -12,38 +12,31 @@ _SnPublisher _$SnPublisherFromJson(Map<String, dynamic> json) => _SnPublisher(
|
||||
name: json['name'] as String? ?? '',
|
||||
nick: json['nick'] as String? ?? '',
|
||||
bio: json['bio'] as String? ?? '',
|
||||
picture:
|
||||
json['picture'] == null
|
||||
? null
|
||||
: SnCloudFile.fromJson(json['picture'] as Map<String, dynamic>),
|
||||
background:
|
||||
json['background'] == null
|
||||
? null
|
||||
: SnCloudFile.fromJson(json['background'] as Map<String, dynamic>),
|
||||
account:
|
||||
json['account'] == null
|
||||
? null
|
||||
: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
||||
picture: json['picture'] == null
|
||||
? null
|
||||
: SnCloudFile.fromJson(json['picture'] as Map<String, dynamic>),
|
||||
background: json['background'] == null
|
||||
? null
|
||||
: SnCloudFile.fromJson(json['background'] as Map<String, dynamic>),
|
||||
account: json['account'] == null
|
||||
? null
|
||||
: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
||||
accountId: json['account_id'] as String?,
|
||||
createdAt:
|
||||
json['created_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt:
|
||||
json['updated_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt:
|
||||
json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
createdAt: json['created_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: json['updated_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
realmId: json['realm_id'] as String?,
|
||||
verification:
|
||||
json['verification'] == null
|
||||
? null
|
||||
: SnVerificationMark.fromJson(
|
||||
json['verification'] as Map<String, dynamic>,
|
||||
),
|
||||
verification: json['verification'] == null
|
||||
? null
|
||||
: SnVerificationMark.fromJson(
|
||||
json['verification'] as Map<String, dynamic>,
|
||||
),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnPublisherToJson(_SnPublisher instance) =>
|
||||
@@ -67,26 +60,22 @@ Map<String, dynamic> _$SnPublisherToJson(_SnPublisher instance) =>
|
||||
_SnPublisherMember _$SnPublisherMemberFromJson(Map<String, dynamic> json) =>
|
||||
_SnPublisherMember(
|
||||
publisherId: json['publisher_id'] as String,
|
||||
publisher:
|
||||
json['publisher'] == null
|
||||
? null
|
||||
: SnPublisher.fromJson(json['publisher'] as Map<String, dynamic>),
|
||||
publisher: json['publisher'] == null
|
||||
? null
|
||||
: SnPublisher.fromJson(json['publisher'] as Map<String, dynamic>),
|
||||
accountId: json['account_id'] as String,
|
||||
account:
|
||||
json['account'] == null
|
||||
? null
|
||||
: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
||||
account: json['account'] == null
|
||||
? null
|
||||
: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
||||
role: (json['role'] as num).toInt(),
|
||||
joinedAt:
|
||||
json['joined_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['joined_at'] as String),
|
||||
joinedAt: json['joined_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['joined_at'] as String),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt:
|
||||
json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnPublisherMemberToJson(_SnPublisherMember instance) =>
|
||||
|
||||
@@ -12,27 +12,23 @@ _SnRealm _$SnRealmFromJson(Map<String, dynamic> json) => _SnRealm(
|
||||
name: json['name'] as String? ?? '',
|
||||
description: json['description'] as String? ?? '',
|
||||
verifiedAs: json['verified_as'] as String?,
|
||||
verifiedAt:
|
||||
json['verified_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['verified_at'] as String),
|
||||
verifiedAt: json['verified_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['verified_at'] as String),
|
||||
isCommunity: json['is_community'] as bool,
|
||||
isPublic: json['is_public'] as bool,
|
||||
picture:
|
||||
json['picture'] == null
|
||||
? null
|
||||
: SnCloudFile.fromJson(json['picture'] as Map<String, dynamic>),
|
||||
background:
|
||||
json['background'] == null
|
||||
? null
|
||||
: SnCloudFile.fromJson(json['background'] as Map<String, dynamic>),
|
||||
picture: json['picture'] == null
|
||||
? null
|
||||
: SnCloudFile.fromJson(json['picture'] as Map<String, dynamic>),
|
||||
background: json['background'] == null
|
||||
? null
|
||||
: SnCloudFile.fromJson(json['background'] as Map<String, dynamic>),
|
||||
accountId: json['account_id'] as String,
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt:
|
||||
json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnRealmToJson(_SnRealm instance) => <String, dynamic>{
|
||||
@@ -55,32 +51,25 @@ Map<String, dynamic> _$SnRealmToJson(_SnRealm instance) => <String, dynamic>{
|
||||
_SnRealmMember _$SnRealmMemberFromJson(Map<String, dynamic> json) =>
|
||||
_SnRealmMember(
|
||||
realmId: json['realm_id'] as String,
|
||||
realm:
|
||||
json['realm'] == null
|
||||
? null
|
||||
: SnRealm.fromJson(json['realm'] as Map<String, dynamic>),
|
||||
realm: json['realm'] == null
|
||||
? null
|
||||
: SnRealm.fromJson(json['realm'] as Map<String, dynamic>),
|
||||
accountId: json['account_id'] as String,
|
||||
account:
|
||||
json['account'] == null
|
||||
? null
|
||||
: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
||||
account: json['account'] == null
|
||||
? null
|
||||
: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
||||
role: (json['role'] as num).toInt(),
|
||||
joinedAt:
|
||||
json['joined_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['joined_at'] as String),
|
||||
joinedAt: json['joined_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['joined_at'] as String),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt:
|
||||
json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
status:
|
||||
json['status'] == null
|
||||
? null
|
||||
: SnAccountStatus.fromJson(
|
||||
json['status'] as Map<String, dynamic>,
|
||||
),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
status: json['status'] == null
|
||||
? null
|
||||
: SnAccountStatus.fromJson(json['status'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnRealmMemberToJson(_SnRealmMember instance) =>
|
||||
|
||||
23
lib/models/reference.dart
Normal file
23
lib/models/reference.dart
Normal file
@@ -0,0 +1,23 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
import 'package:island/models/file.dart';
|
||||
|
||||
part 'reference.freezed.dart';
|
||||
part 'reference.g.dart';
|
||||
|
||||
@freezed
|
||||
sealed class Reference with _$Reference {
|
||||
const factory Reference({
|
||||
required String id,
|
||||
@JsonKey(name: 'file_id') required String fileId,
|
||||
SnCloudFile? file,
|
||||
required String usage,
|
||||
@JsonKey(name: 'resource_id') required String resourceId,
|
||||
@JsonKey(name: 'expired_at') DateTime? expiredAt,
|
||||
@JsonKey(name: 'created_at') required DateTime createdAt,
|
||||
@JsonKey(name: 'updated_at') required DateTime updatedAt,
|
||||
@JsonKey(name: 'deleted_at') DateTime? deletedAt,
|
||||
}) = _Reference;
|
||||
|
||||
factory Reference.fromJson(Map<String, dynamic> json) =>
|
||||
_$ReferenceFromJson(json);
|
||||
}
|
||||
319
lib/models/reference.freezed.dart
Normal file
319
lib/models/reference.freezed.dart
Normal file
@@ -0,0 +1,319 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'reference.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$Reference {
|
||||
|
||||
String get id;@JsonKey(name: 'file_id') String get fileId; SnCloudFile? get file; String get usage;@JsonKey(name: 'resource_id') String get resourceId;@JsonKey(name: 'expired_at') DateTime? get expiredAt;@JsonKey(name: 'created_at') DateTime get createdAt;@JsonKey(name: 'updated_at') DateTime get updatedAt;@JsonKey(name: 'deleted_at') DateTime? get deletedAt;
|
||||
/// Create a copy of Reference
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$ReferenceCopyWith<Reference> get copyWith => _$ReferenceCopyWithImpl<Reference>(this as Reference, _$identity);
|
||||
|
||||
/// Serializes this Reference to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is Reference&&(identical(other.id, id) || other.id == id)&&(identical(other.fileId, fileId) || other.fileId == fileId)&&(identical(other.file, file) || other.file == file)&&(identical(other.usage, usage) || other.usage == usage)&&(identical(other.resourceId, resourceId) || other.resourceId == resourceId)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,fileId,file,usage,resourceId,expiredAt,createdAt,updatedAt,deletedAt);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'Reference(id: $id, fileId: $fileId, file: $file, usage: $usage, resourceId: $resourceId, expiredAt: $expiredAt, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $ReferenceCopyWith<$Res> {
|
||||
factory $ReferenceCopyWith(Reference value, $Res Function(Reference) _then) = _$ReferenceCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String id,@JsonKey(name: 'file_id') String fileId, SnCloudFile? file, String usage,@JsonKey(name: 'resource_id') String resourceId,@JsonKey(name: 'expired_at') DateTime? expiredAt,@JsonKey(name: 'created_at') DateTime createdAt,@JsonKey(name: 'updated_at') DateTime updatedAt,@JsonKey(name: 'deleted_at') DateTime? deletedAt
|
||||
});
|
||||
|
||||
|
||||
$SnCloudFileCopyWith<$Res>? get file;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$ReferenceCopyWithImpl<$Res>
|
||||
implements $ReferenceCopyWith<$Res> {
|
||||
_$ReferenceCopyWithImpl(this._self, this._then);
|
||||
|
||||
final Reference _self;
|
||||
final $Res Function(Reference) _then;
|
||||
|
||||
/// Create a copy of Reference
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? fileId = null,Object? file = freezed,Object? usage = null,Object? resourceId = null,Object? expiredAt = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,fileId: null == fileId ? _self.fileId : fileId // ignore: cast_nullable_to_non_nullable
|
||||
as String,file: freezed == file ? _self.file : file // ignore: cast_nullable_to_non_nullable
|
||||
as SnCloudFile?,usage: null == usage ? _self.usage : usage // ignore: cast_nullable_to_non_nullable
|
||||
as String,resourceId: null == resourceId ? _self.resourceId : resourceId // ignore: cast_nullable_to_non_nullable
|
||||
as String,expiredAt: freezed == expiredAt ? _self.expiredAt : expiredAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
));
|
||||
}
|
||||
/// Create a copy of Reference
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnCloudFileCopyWith<$Res>? get file {
|
||||
if (_self.file == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $SnCloudFileCopyWith<$Res>(_self.file!, (value) {
|
||||
return _then(_self.copyWith(file: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [Reference].
|
||||
extension ReferencePatterns on Reference {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _Reference value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _Reference() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _Reference value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _Reference():
|
||||
return $default(_that);}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _Reference value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _Reference() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, @JsonKey(name: 'file_id') String fileId, SnCloudFile? file, String usage, @JsonKey(name: 'resource_id') String resourceId, @JsonKey(name: 'expired_at') DateTime? expiredAt, @JsonKey(name: 'created_at') DateTime createdAt, @JsonKey(name: 'updated_at') DateTime updatedAt, @JsonKey(name: 'deleted_at') DateTime? deletedAt)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _Reference() when $default != null:
|
||||
return $default(_that.id,_that.fileId,_that.file,_that.usage,_that.resourceId,_that.expiredAt,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, @JsonKey(name: 'file_id') String fileId, SnCloudFile? file, String usage, @JsonKey(name: 'resource_id') String resourceId, @JsonKey(name: 'expired_at') DateTime? expiredAt, @JsonKey(name: 'created_at') DateTime createdAt, @JsonKey(name: 'updated_at') DateTime updatedAt, @JsonKey(name: 'deleted_at') DateTime? deletedAt) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _Reference():
|
||||
return $default(_that.id,_that.fileId,_that.file,_that.usage,_that.resourceId,_that.expiredAt,_that.createdAt,_that.updatedAt,_that.deletedAt);}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, @JsonKey(name: 'file_id') String fileId, SnCloudFile? file, String usage, @JsonKey(name: 'resource_id') String resourceId, @JsonKey(name: 'expired_at') DateTime? expiredAt, @JsonKey(name: 'created_at') DateTime createdAt, @JsonKey(name: 'updated_at') DateTime updatedAt, @JsonKey(name: 'deleted_at') DateTime? deletedAt)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _Reference() when $default != null:
|
||||
return $default(_that.id,_that.fileId,_that.file,_that.usage,_that.resourceId,_that.expiredAt,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _Reference implements Reference {
|
||||
const _Reference({required this.id, @JsonKey(name: 'file_id') required this.fileId, this.file, required this.usage, @JsonKey(name: 'resource_id') required this.resourceId, @JsonKey(name: 'expired_at') this.expiredAt, @JsonKey(name: 'created_at') required this.createdAt, @JsonKey(name: 'updated_at') required this.updatedAt, @JsonKey(name: 'deleted_at') this.deletedAt});
|
||||
factory _Reference.fromJson(Map<String, dynamic> json) => _$ReferenceFromJson(json);
|
||||
|
||||
@override final String id;
|
||||
@override@JsonKey(name: 'file_id') final String fileId;
|
||||
@override final SnCloudFile? file;
|
||||
@override final String usage;
|
||||
@override@JsonKey(name: 'resource_id') final String resourceId;
|
||||
@override@JsonKey(name: 'expired_at') final DateTime? expiredAt;
|
||||
@override@JsonKey(name: 'created_at') final DateTime createdAt;
|
||||
@override@JsonKey(name: 'updated_at') final DateTime updatedAt;
|
||||
@override@JsonKey(name: 'deleted_at') final DateTime? deletedAt;
|
||||
|
||||
/// Create a copy of Reference
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$ReferenceCopyWith<_Reference> get copyWith => __$ReferenceCopyWithImpl<_Reference>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$ReferenceToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Reference&&(identical(other.id, id) || other.id == id)&&(identical(other.fileId, fileId) || other.fileId == fileId)&&(identical(other.file, file) || other.file == file)&&(identical(other.usage, usage) || other.usage == usage)&&(identical(other.resourceId, resourceId) || other.resourceId == resourceId)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,fileId,file,usage,resourceId,expiredAt,createdAt,updatedAt,deletedAt);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'Reference(id: $id, fileId: $fileId, file: $file, usage: $usage, resourceId: $resourceId, expiredAt: $expiredAt, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$ReferenceCopyWith<$Res> implements $ReferenceCopyWith<$Res> {
|
||||
factory _$ReferenceCopyWith(_Reference value, $Res Function(_Reference) _then) = __$ReferenceCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String id,@JsonKey(name: 'file_id') String fileId, SnCloudFile? file, String usage,@JsonKey(name: 'resource_id') String resourceId,@JsonKey(name: 'expired_at') DateTime? expiredAt,@JsonKey(name: 'created_at') DateTime createdAt,@JsonKey(name: 'updated_at') DateTime updatedAt,@JsonKey(name: 'deleted_at') DateTime? deletedAt
|
||||
});
|
||||
|
||||
|
||||
@override $SnCloudFileCopyWith<$Res>? get file;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$ReferenceCopyWithImpl<$Res>
|
||||
implements _$ReferenceCopyWith<$Res> {
|
||||
__$ReferenceCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _Reference _self;
|
||||
final $Res Function(_Reference) _then;
|
||||
|
||||
/// Create a copy of Reference
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? fileId = null,Object? file = freezed,Object? usage = null,Object? resourceId = null,Object? expiredAt = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
||||
return _then(_Reference(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,fileId: null == fileId ? _self.fileId : fileId // ignore: cast_nullable_to_non_nullable
|
||||
as String,file: freezed == file ? _self.file : file // ignore: cast_nullable_to_non_nullable
|
||||
as SnCloudFile?,usage: null == usage ? _self.usage : usage // ignore: cast_nullable_to_non_nullable
|
||||
as String,resourceId: null == resourceId ? _self.resourceId : resourceId // ignore: cast_nullable_to_non_nullable
|
||||
as String,expiredAt: freezed == expiredAt ? _self.expiredAt : expiredAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
));
|
||||
}
|
||||
|
||||
/// Create a copy of Reference
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnCloudFileCopyWith<$Res>? get file {
|
||||
if (_self.file == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $SnCloudFileCopyWith<$Res>(_self.file!, (value) {
|
||||
return _then(_self.copyWith(file: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// dart format on
|
||||
38
lib/models/reference.g.dart
Normal file
38
lib/models/reference.g.dart
Normal file
@@ -0,0 +1,38 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'reference.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_Reference _$ReferenceFromJson(Map<String, dynamic> json) => _Reference(
|
||||
id: json['id'] as String,
|
||||
fileId: json['file_id'] as String,
|
||||
file: json['file'] == null
|
||||
? null
|
||||
: SnCloudFile.fromJson(json['file'] as Map<String, dynamic>),
|
||||
usage: json['usage'] as String,
|
||||
resourceId: json['resource_id'] as String,
|
||||
expiredAt: json['expired_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['expired_at'] as String),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ReferenceToJson(_Reference instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'file_id': instance.fileId,
|
||||
'file': instance.file?.toJson(),
|
||||
'usage': instance.usage,
|
||||
'resource_id': instance.resourceId,
|
||||
'expired_at': instance.expiredAt?.toIso8601String(),
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
'deleted_at': instance.deletedAt?.toIso8601String(),
|
||||
};
|
||||
@@ -8,26 +8,22 @@ part of 'relationship.dart';
|
||||
|
||||
_SnRelationship _$SnRelationshipFromJson(Map<String, dynamic> json) =>
|
||||
_SnRelationship(
|
||||
createdAt:
|
||||
json['created_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt:
|
||||
json['updated_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt:
|
||||
json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
createdAt: json['created_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: json['updated_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
accountId: json['account_id'] as String,
|
||||
account: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
||||
relatedId: json['related_id'] as String,
|
||||
related: SnAccount.fromJson(json['related'] as Map<String, dynamic>),
|
||||
expiredAt:
|
||||
json['expired_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['expired_at'] as String),
|
||||
expiredAt: json['expired_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['expired_at'] as String),
|
||||
status: (json['status'] as num).toInt(),
|
||||
);
|
||||
|
||||
|
||||
231
lib/models/route_item.dart
Normal file
231
lib/models/route_item.dart
Normal file
@@ -0,0 +1,231 @@
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
|
||||
part 'route_item.freezed.dart';
|
||||
|
||||
@freezed
|
||||
sealed class RouteItem with _$RouteItem {
|
||||
const factory RouteItem({
|
||||
required String name,
|
||||
required String path,
|
||||
required String description,
|
||||
@Default([]) List<String> searchableAliases,
|
||||
required IconData icon,
|
||||
}) = _RouteItem;
|
||||
}
|
||||
|
||||
final List<RouteItem> kAvailableRoutes = [
|
||||
RouteItem(
|
||||
name: 'dashboard'.tr(),
|
||||
path: '/',
|
||||
description: 'dashboardDescription'.tr(),
|
||||
searchableAliases: ['dashboard', 'home'],
|
||||
icon: Symbols.home,
|
||||
),
|
||||
RouteItem(
|
||||
name: 'explore'.tr(),
|
||||
path: '/explore',
|
||||
description: 'exploreDescription'.tr(),
|
||||
searchableAliases: ['explore', 'discover'],
|
||||
icon: Symbols.explore,
|
||||
),
|
||||
RouteItem(
|
||||
name: 'searchPosts'.tr(),
|
||||
path: '/posts/search',
|
||||
description: 'searchPostsDescription'.tr(),
|
||||
searchableAliases: ['search', 'posts'],
|
||||
icon: Symbols.search,
|
||||
),
|
||||
RouteItem(
|
||||
name: 'postShuffle'.tr(),
|
||||
path: '/posts/shuffle',
|
||||
description: 'postShuffleDescription'.tr(),
|
||||
searchableAliases: ['shuffle', 'random', 'posts'],
|
||||
icon: Symbols.shuffle,
|
||||
),
|
||||
RouteItem(
|
||||
name: 'postTagsCategories'.tr(),
|
||||
path: '/posts/categories',
|
||||
description: 'postTagsCategoriesDescription'.tr(),
|
||||
searchableAliases: ['tags', 'categories', 'posts'],
|
||||
icon: Symbols.category,
|
||||
),
|
||||
RouteItem(
|
||||
name: 'discoverRealms'.tr(),
|
||||
path: '/discovery/realms',
|
||||
description: 'discoverRealmsDescription'.tr(),
|
||||
searchableAliases: ['realms', 'groups', 'communities'],
|
||||
icon: Symbols.public,
|
||||
),
|
||||
RouteItem(
|
||||
name: 'chat'.tr(),
|
||||
path: '/chat',
|
||||
description: 'chatDescription'.tr(),
|
||||
searchableAliases: ['chat', 'messages', 'conversations', 'dm'],
|
||||
icon: Symbols.chat,
|
||||
),
|
||||
RouteItem(
|
||||
name: 'realms'.tr(),
|
||||
path: '/realms',
|
||||
description: 'realmsDescription'.tr(),
|
||||
searchableAliases: ['realms', 'groups', 'communities'],
|
||||
icon: Symbols.group,
|
||||
),
|
||||
RouteItem(
|
||||
name: 'account'.tr(),
|
||||
path: '/account',
|
||||
description: 'accountDescription'.tr(),
|
||||
searchableAliases: ['account', 'me', 'profile', 'user'],
|
||||
icon: Symbols.person,
|
||||
),
|
||||
RouteItem(
|
||||
name: 'stickerMarketplace'.tr(),
|
||||
path: '/stickers',
|
||||
description: 'stickerMarketplaceDescription'.tr(),
|
||||
searchableAliases: ['stickers', 'marketplace', 'emojis', 'emojis'],
|
||||
icon: Symbols.emoji_emotions,
|
||||
),
|
||||
RouteItem(
|
||||
name: 'webFeeds'.tr(),
|
||||
path: '/feeds',
|
||||
description: 'webFeedsDescription'.tr(),
|
||||
searchableAliases: ['feeds', 'web feeds', 'rss', 'news'],
|
||||
icon: Symbols.feed,
|
||||
),
|
||||
RouteItem(
|
||||
name: 'wallet'.tr(),
|
||||
path: '/account/wallet',
|
||||
description: 'walletDescription'.tr(),
|
||||
searchableAliases: [
|
||||
'wallet',
|
||||
'balance',
|
||||
'money',
|
||||
'source points',
|
||||
'gold points',
|
||||
'nsp',
|
||||
'shd',
|
||||
],
|
||||
icon: Symbols.account_balance_wallet,
|
||||
),
|
||||
RouteItem(
|
||||
name: 'relationships'.tr(),
|
||||
path: '/account/relationships',
|
||||
description: 'relationshipsDescription'.tr(),
|
||||
searchableAliases: ['relationships', 'friends', 'block list', 'blocks'],
|
||||
icon: Symbols.people,
|
||||
),
|
||||
RouteItem(
|
||||
name: 'updateYourProfile'.tr(),
|
||||
path: '/account/me/update',
|
||||
description: 'updateYourProfileDescription'.tr(),
|
||||
searchableAliases: ['profile', 'update', 'edit', 'my profile'],
|
||||
icon: Symbols.edit,
|
||||
),
|
||||
RouteItem(
|
||||
name: 'leveling'.tr(),
|
||||
path: '/account/me/leveling',
|
||||
description: 'levelingDescription'.tr(),
|
||||
searchableAliases: [
|
||||
'leveling',
|
||||
'level',
|
||||
'levels',
|
||||
'subscriptions',
|
||||
'social credits',
|
||||
],
|
||||
icon: Symbols.trending_up,
|
||||
),
|
||||
RouteItem(
|
||||
name: 'accountSettings'.tr(),
|
||||
path: '/account/me/settings',
|
||||
description: 'accountSettingsDescription'.tr(),
|
||||
searchableAliases: [
|
||||
'settings',
|
||||
'preferences',
|
||||
'account',
|
||||
'account settings',
|
||||
],
|
||||
icon: Symbols.settings,
|
||||
),
|
||||
RouteItem(
|
||||
name: 'abuseReports'.tr(),
|
||||
path: '/safety/reports/me',
|
||||
description: 'abuseReportsDescription'.tr(),
|
||||
searchableAliases: ['reports', 'abuse', 'safety'],
|
||||
icon: Symbols.report,
|
||||
),
|
||||
RouteItem(
|
||||
name: 'files'.tr(),
|
||||
path: '/files',
|
||||
description: 'filesDescription'.tr(),
|
||||
searchableAliases: ['files', 'folders', 'storage', 'drive', 'cloud'],
|
||||
icon: Symbols.folder,
|
||||
),
|
||||
RouteItem(
|
||||
name: 'aiThought'.tr(),
|
||||
path: '/thought',
|
||||
description: 'aiThoughtTitle'.tr(),
|
||||
searchableAliases: ['thought', 'ai', 'ai thought'],
|
||||
icon: Symbols.psychology,
|
||||
),
|
||||
RouteItem(
|
||||
name: 'creatorHub'.tr(),
|
||||
path: '/creators',
|
||||
description: 'creatorHubDescription'.tr(),
|
||||
searchableAliases: ['creators', 'hub', 'creator hub', 'creators hub'],
|
||||
icon: Symbols.create,
|
||||
),
|
||||
RouteItem(
|
||||
name: 'developerPortal'.tr(),
|
||||
path: '/developers',
|
||||
description: 'developerPortalDescription'.tr(),
|
||||
searchableAliases: [
|
||||
'developers',
|
||||
'dev',
|
||||
'developer',
|
||||
'developer hub',
|
||||
'developers hub',
|
||||
],
|
||||
icon: Symbols.code,
|
||||
),
|
||||
RouteItem(
|
||||
name: 'debugLogs'.tr(),
|
||||
path: '/logs',
|
||||
description: 'debugLogsDescription'.tr(),
|
||||
searchableAliases: ['logs', 'debug', 'debug logs'],
|
||||
icon: Symbols.bug_report,
|
||||
),
|
||||
RouteItem(
|
||||
name: 'webArticlesStand'.tr(),
|
||||
path: '/feeds/articles',
|
||||
description: 'webArticlesStandDescription'.tr(),
|
||||
searchableAliases: ['articles', 'stand', 'feed', 'web feed'],
|
||||
icon: Symbols.article,
|
||||
),
|
||||
RouteItem(
|
||||
name: 'appSettings'.tr(),
|
||||
path: '/settings',
|
||||
description: 'appSettingsDescription'.tr(),
|
||||
searchableAliases: ['settings', 'preferences', 'app', 'app settings'],
|
||||
icon: Symbols.settings,
|
||||
),
|
||||
RouteItem(
|
||||
name: 'about'.tr(),
|
||||
path: '/about',
|
||||
description: 'about'.tr(),
|
||||
searchableAliases: ['about', 'info'],
|
||||
icon: Symbols.info,
|
||||
),
|
||||
];
|
||||
|
||||
@freezed
|
||||
sealed class SpecialAction with _$SpecialAction {
|
||||
const factory SpecialAction({
|
||||
required String name,
|
||||
required String description,
|
||||
required IconData icon,
|
||||
required VoidCallback action,
|
||||
@Default([]) List<String> searchableAliases,
|
||||
}) = _SpecialAction;
|
||||
}
|
||||
552
lib/models/route_item.freezed.dart
Normal file
552
lib/models/route_item.freezed.dart
Normal file
@@ -0,0 +1,552 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'route_item.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
/// @nodoc
|
||||
mixin _$RouteItem {
|
||||
|
||||
String get name; String get path; String get description; List<String> get searchableAliases; IconData get icon;
|
||||
/// Create a copy of RouteItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$RouteItemCopyWith<RouteItem> get copyWith => _$RouteItemCopyWithImpl<RouteItem>(this as RouteItem, _$identity);
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is RouteItem&&(identical(other.name, name) || other.name == name)&&(identical(other.path, path) || other.path == path)&&(identical(other.description, description) || other.description == description)&&const DeepCollectionEquality().equals(other.searchableAliases, searchableAliases)&&(identical(other.icon, icon) || other.icon == icon));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,name,path,description,const DeepCollectionEquality().hash(searchableAliases),icon);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'RouteItem(name: $name, path: $path, description: $description, searchableAliases: $searchableAliases, icon: $icon)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $RouteItemCopyWith<$Res> {
|
||||
factory $RouteItemCopyWith(RouteItem value, $Res Function(RouteItem) _then) = _$RouteItemCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String name, String path, String description, List<String> searchableAliases, IconData icon
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$RouteItemCopyWithImpl<$Res>
|
||||
implements $RouteItemCopyWith<$Res> {
|
||||
_$RouteItemCopyWithImpl(this._self, this._then);
|
||||
|
||||
final RouteItem _self;
|
||||
final $Res Function(RouteItem) _then;
|
||||
|
||||
/// Create a copy of RouteItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? name = null,Object? path = null,Object? description = null,Object? searchableAliases = null,Object? icon = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||
as String,path: null == path ? _self.path : path // ignore: cast_nullable_to_non_nullable
|
||||
as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable
|
||||
as String,searchableAliases: null == searchableAliases ? _self.searchableAliases : searchableAliases // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,icon: null == icon ? _self.icon : icon // ignore: cast_nullable_to_non_nullable
|
||||
as IconData,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [RouteItem].
|
||||
extension RouteItemPatterns on RouteItem {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _RouteItem value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _RouteItem() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _RouteItem value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _RouteItem():
|
||||
return $default(_that);}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _RouteItem value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _RouteItem() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String name, String path, String description, List<String> searchableAliases, IconData icon)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _RouteItem() when $default != null:
|
||||
return $default(_that.name,_that.path,_that.description,_that.searchableAliases,_that.icon);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String name, String path, String description, List<String> searchableAliases, IconData icon) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _RouteItem():
|
||||
return $default(_that.name,_that.path,_that.description,_that.searchableAliases,_that.icon);}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String name, String path, String description, List<String> searchableAliases, IconData icon)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _RouteItem() when $default != null:
|
||||
return $default(_that.name,_that.path,_that.description,_that.searchableAliases,_that.icon);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
|
||||
class _RouteItem implements RouteItem {
|
||||
const _RouteItem({required this.name, required this.path, required this.description, final List<String> searchableAliases = const [], required this.icon}): _searchableAliases = searchableAliases;
|
||||
|
||||
|
||||
@override final String name;
|
||||
@override final String path;
|
||||
@override final String description;
|
||||
final List<String> _searchableAliases;
|
||||
@override@JsonKey() List<String> get searchableAliases {
|
||||
if (_searchableAliases is EqualUnmodifiableListView) return _searchableAliases;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_searchableAliases);
|
||||
}
|
||||
|
||||
@override final IconData icon;
|
||||
|
||||
/// Create a copy of RouteItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$RouteItemCopyWith<_RouteItem> get copyWith => __$RouteItemCopyWithImpl<_RouteItem>(this, _$identity);
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _RouteItem&&(identical(other.name, name) || other.name == name)&&(identical(other.path, path) || other.path == path)&&(identical(other.description, description) || other.description == description)&&const DeepCollectionEquality().equals(other._searchableAliases, _searchableAliases)&&(identical(other.icon, icon) || other.icon == icon));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,name,path,description,const DeepCollectionEquality().hash(_searchableAliases),icon);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'RouteItem(name: $name, path: $path, description: $description, searchableAliases: $searchableAliases, icon: $icon)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$RouteItemCopyWith<$Res> implements $RouteItemCopyWith<$Res> {
|
||||
factory _$RouteItemCopyWith(_RouteItem value, $Res Function(_RouteItem) _then) = __$RouteItemCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String name, String path, String description, List<String> searchableAliases, IconData icon
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$RouteItemCopyWithImpl<$Res>
|
||||
implements _$RouteItemCopyWith<$Res> {
|
||||
__$RouteItemCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _RouteItem _self;
|
||||
final $Res Function(_RouteItem) _then;
|
||||
|
||||
/// Create a copy of RouteItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? name = null,Object? path = null,Object? description = null,Object? searchableAliases = null,Object? icon = null,}) {
|
||||
return _then(_RouteItem(
|
||||
name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||
as String,path: null == path ? _self.path : path // ignore: cast_nullable_to_non_nullable
|
||||
as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable
|
||||
as String,searchableAliases: null == searchableAliases ? _self._searchableAliases : searchableAliases // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,icon: null == icon ? _self.icon : icon // ignore: cast_nullable_to_non_nullable
|
||||
as IconData,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$SpecialAction {
|
||||
|
||||
String get name; String get description; IconData get icon; VoidCallback get action; List<String> get searchableAliases;
|
||||
/// Create a copy of SpecialAction
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$SpecialActionCopyWith<SpecialAction> get copyWith => _$SpecialActionCopyWithImpl<SpecialAction>(this as SpecialAction, _$identity);
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SpecialAction&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.icon, icon) || other.icon == icon)&&(identical(other.action, action) || other.action == action)&&const DeepCollectionEquality().equals(other.searchableAliases, searchableAliases));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,name,description,icon,action,const DeepCollectionEquality().hash(searchableAliases));
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SpecialAction(name: $name, description: $description, icon: $icon, action: $action, searchableAliases: $searchableAliases)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $SpecialActionCopyWith<$Res> {
|
||||
factory $SpecialActionCopyWith(SpecialAction value, $Res Function(SpecialAction) _then) = _$SpecialActionCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String name, String description, IconData icon, VoidCallback action, List<String> searchableAliases
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$SpecialActionCopyWithImpl<$Res>
|
||||
implements $SpecialActionCopyWith<$Res> {
|
||||
_$SpecialActionCopyWithImpl(this._self, this._then);
|
||||
|
||||
final SpecialAction _self;
|
||||
final $Res Function(SpecialAction) _then;
|
||||
|
||||
/// Create a copy of SpecialAction
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? name = null,Object? description = null,Object? icon = null,Object? action = null,Object? searchableAliases = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||
as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable
|
||||
as String,icon: null == icon ? _self.icon : icon // ignore: cast_nullable_to_non_nullable
|
||||
as IconData,action: null == action ? _self.action : action // ignore: cast_nullable_to_non_nullable
|
||||
as VoidCallback,searchableAliases: null == searchableAliases ? _self.searchableAliases : searchableAliases // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [SpecialAction].
|
||||
extension SpecialActionPatterns on SpecialAction {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _SpecialAction value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _SpecialAction() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _SpecialAction value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _SpecialAction():
|
||||
return $default(_that);}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _SpecialAction value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _SpecialAction() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String name, String description, IconData icon, VoidCallback action, List<String> searchableAliases)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SpecialAction() when $default != null:
|
||||
return $default(_that.name,_that.description,_that.icon,_that.action,_that.searchableAliases);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String name, String description, IconData icon, VoidCallback action, List<String> searchableAliases) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SpecialAction():
|
||||
return $default(_that.name,_that.description,_that.icon,_that.action,_that.searchableAliases);}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String name, String description, IconData icon, VoidCallback action, List<String> searchableAliases)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SpecialAction() when $default != null:
|
||||
return $default(_that.name,_that.description,_that.icon,_that.action,_that.searchableAliases);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
|
||||
class _SpecialAction implements SpecialAction {
|
||||
const _SpecialAction({required this.name, required this.description, required this.icon, required this.action, final List<String> searchableAliases = const []}): _searchableAliases = searchableAliases;
|
||||
|
||||
|
||||
@override final String name;
|
||||
@override final String description;
|
||||
@override final IconData icon;
|
||||
@override final VoidCallback action;
|
||||
final List<String> _searchableAliases;
|
||||
@override@JsonKey() List<String> get searchableAliases {
|
||||
if (_searchableAliases is EqualUnmodifiableListView) return _searchableAliases;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_searchableAliases);
|
||||
}
|
||||
|
||||
|
||||
/// Create a copy of SpecialAction
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$SpecialActionCopyWith<_SpecialAction> get copyWith => __$SpecialActionCopyWithImpl<_SpecialAction>(this, _$identity);
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SpecialAction&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.icon, icon) || other.icon == icon)&&(identical(other.action, action) || other.action == action)&&const DeepCollectionEquality().equals(other._searchableAliases, _searchableAliases));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,name,description,icon,action,const DeepCollectionEquality().hash(_searchableAliases));
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SpecialAction(name: $name, description: $description, icon: $icon, action: $action, searchableAliases: $searchableAliases)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$SpecialActionCopyWith<$Res> implements $SpecialActionCopyWith<$Res> {
|
||||
factory _$SpecialActionCopyWith(_SpecialAction value, $Res Function(_SpecialAction) _then) = __$SpecialActionCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String name, String description, IconData icon, VoidCallback action, List<String> searchableAliases
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$SpecialActionCopyWithImpl<$Res>
|
||||
implements _$SpecialActionCopyWith<$Res> {
|
||||
__$SpecialActionCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _SpecialAction _self;
|
||||
final $Res Function(_SpecialAction) _then;
|
||||
|
||||
/// Create a copy of SpecialAction
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? name = null,Object? description = null,Object? icon = null,Object? action = null,Object? searchableAliases = null,}) {
|
||||
return _then(_SpecialAction(
|
||||
name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||
as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable
|
||||
as String,icon: null == icon ? _self.icon : icon // ignore: cast_nullable_to_non_nullable
|
||||
as IconData,action: null == action ? _self.action : action // ignore: cast_nullable_to_non_nullable
|
||||
as VoidCallback,searchableAliases: null == searchableAliases ? _self._searchableAliases : searchableAliases // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
25
lib/models/site_file.dart
Normal file
25
lib/models/site_file.dart
Normal file
@@ -0,0 +1,25 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'site_file.freezed.dart';
|
||||
part 'site_file.g.dart';
|
||||
|
||||
@freezed
|
||||
sealed class SnSiteFileEntry with _$SnSiteFileEntry {
|
||||
const factory SnSiteFileEntry({
|
||||
required bool isDirectory,
|
||||
required String relativePath,
|
||||
required int size, // Size in bytes (0 for directories)
|
||||
required DateTime modified, // ISO 8601 timestamp
|
||||
}) = _SnSiteFileEntry;
|
||||
|
||||
factory SnSiteFileEntry.fromJson(Map<String, dynamic> json) =>
|
||||
_$SnSiteFileEntryFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
sealed class SnFileContent with _$SnFileContent {
|
||||
const factory SnFileContent({required String content}) = _SnFileContent;
|
||||
|
||||
factory SnFileContent.fromJson(Map<String, dynamic> json) =>
|
||||
_$SnFileContentFromJson(json);
|
||||
}
|
||||
539
lib/models/site_file.freezed.dart
Normal file
539
lib/models/site_file.freezed.dart
Normal file
@@ -0,0 +1,539 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'site_file.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$SnSiteFileEntry {
|
||||
|
||||
bool get isDirectory; String get relativePath; int get size;// Size in bytes (0 for directories)
|
||||
DateTime get modified;
|
||||
/// Create a copy of SnSiteFileEntry
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnSiteFileEntryCopyWith<SnSiteFileEntry> get copyWith => _$SnSiteFileEntryCopyWithImpl<SnSiteFileEntry>(this as SnSiteFileEntry, _$identity);
|
||||
|
||||
/// Serializes this SnSiteFileEntry to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnSiteFileEntry&&(identical(other.isDirectory, isDirectory) || other.isDirectory == isDirectory)&&(identical(other.relativePath, relativePath) || other.relativePath == relativePath)&&(identical(other.size, size) || other.size == size)&&(identical(other.modified, modified) || other.modified == modified));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,isDirectory,relativePath,size,modified);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnSiteFileEntry(isDirectory: $isDirectory, relativePath: $relativePath, size: $size, modified: $modified)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $SnSiteFileEntryCopyWith<$Res> {
|
||||
factory $SnSiteFileEntryCopyWith(SnSiteFileEntry value, $Res Function(SnSiteFileEntry) _then) = _$SnSiteFileEntryCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
bool isDirectory, String relativePath, int size, DateTime modified
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$SnSiteFileEntryCopyWithImpl<$Res>
|
||||
implements $SnSiteFileEntryCopyWith<$Res> {
|
||||
_$SnSiteFileEntryCopyWithImpl(this._self, this._then);
|
||||
|
||||
final SnSiteFileEntry _self;
|
||||
final $Res Function(SnSiteFileEntry) _then;
|
||||
|
||||
/// Create a copy of SnSiteFileEntry
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? isDirectory = null,Object? relativePath = null,Object? size = null,Object? modified = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
isDirectory: null == isDirectory ? _self.isDirectory : isDirectory // ignore: cast_nullable_to_non_nullable
|
||||
as bool,relativePath: null == relativePath ? _self.relativePath : relativePath // ignore: cast_nullable_to_non_nullable
|
||||
as String,size: null == size ? _self.size : size // ignore: cast_nullable_to_non_nullable
|
||||
as int,modified: null == modified ? _self.modified : modified // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [SnSiteFileEntry].
|
||||
extension SnSiteFileEntryPatterns on SnSiteFileEntry {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _SnSiteFileEntry value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _SnSiteFileEntry() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _SnSiteFileEntry value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _SnSiteFileEntry():
|
||||
return $default(_that);}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _SnSiteFileEntry value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _SnSiteFileEntry() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool isDirectory, String relativePath, int size, DateTime modified)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnSiteFileEntry() when $default != null:
|
||||
return $default(_that.isDirectory,_that.relativePath,_that.size,_that.modified);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool isDirectory, String relativePath, int size, DateTime modified) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnSiteFileEntry():
|
||||
return $default(_that.isDirectory,_that.relativePath,_that.size,_that.modified);}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool isDirectory, String relativePath, int size, DateTime modified)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnSiteFileEntry() when $default != null:
|
||||
return $default(_that.isDirectory,_that.relativePath,_that.size,_that.modified);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _SnSiteFileEntry implements SnSiteFileEntry {
|
||||
const _SnSiteFileEntry({required this.isDirectory, required this.relativePath, required this.size, required this.modified});
|
||||
factory _SnSiteFileEntry.fromJson(Map<String, dynamic> json) => _$SnSiteFileEntryFromJson(json);
|
||||
|
||||
@override final bool isDirectory;
|
||||
@override final String relativePath;
|
||||
@override final int size;
|
||||
// Size in bytes (0 for directories)
|
||||
@override final DateTime modified;
|
||||
|
||||
/// Create a copy of SnSiteFileEntry
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$SnSiteFileEntryCopyWith<_SnSiteFileEntry> get copyWith => __$SnSiteFileEntryCopyWithImpl<_SnSiteFileEntry>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$SnSiteFileEntryToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnSiteFileEntry&&(identical(other.isDirectory, isDirectory) || other.isDirectory == isDirectory)&&(identical(other.relativePath, relativePath) || other.relativePath == relativePath)&&(identical(other.size, size) || other.size == size)&&(identical(other.modified, modified) || other.modified == modified));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,isDirectory,relativePath,size,modified);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnSiteFileEntry(isDirectory: $isDirectory, relativePath: $relativePath, size: $size, modified: $modified)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$SnSiteFileEntryCopyWith<$Res> implements $SnSiteFileEntryCopyWith<$Res> {
|
||||
factory _$SnSiteFileEntryCopyWith(_SnSiteFileEntry value, $Res Function(_SnSiteFileEntry) _then) = __$SnSiteFileEntryCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
bool isDirectory, String relativePath, int size, DateTime modified
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$SnSiteFileEntryCopyWithImpl<$Res>
|
||||
implements _$SnSiteFileEntryCopyWith<$Res> {
|
||||
__$SnSiteFileEntryCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _SnSiteFileEntry _self;
|
||||
final $Res Function(_SnSiteFileEntry) _then;
|
||||
|
||||
/// Create a copy of SnSiteFileEntry
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? isDirectory = null,Object? relativePath = null,Object? size = null,Object? modified = null,}) {
|
||||
return _then(_SnSiteFileEntry(
|
||||
isDirectory: null == isDirectory ? _self.isDirectory : isDirectory // ignore: cast_nullable_to_non_nullable
|
||||
as bool,relativePath: null == relativePath ? _self.relativePath : relativePath // ignore: cast_nullable_to_non_nullable
|
||||
as String,size: null == size ? _self.size : size // ignore: cast_nullable_to_non_nullable
|
||||
as int,modified: null == modified ? _self.modified : modified // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// @nodoc
|
||||
mixin _$SnFileContent {
|
||||
|
||||
String get content;
|
||||
/// Create a copy of SnFileContent
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnFileContentCopyWith<SnFileContent> get copyWith => _$SnFileContentCopyWithImpl<SnFileContent>(this as SnFileContent, _$identity);
|
||||
|
||||
/// Serializes this SnFileContent to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnFileContent&&(identical(other.content, content) || other.content == content));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,content);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnFileContent(content: $content)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $SnFileContentCopyWith<$Res> {
|
||||
factory $SnFileContentCopyWith(SnFileContent value, $Res Function(SnFileContent) _then) = _$SnFileContentCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String content
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$SnFileContentCopyWithImpl<$Res>
|
||||
implements $SnFileContentCopyWith<$Res> {
|
||||
_$SnFileContentCopyWithImpl(this._self, this._then);
|
||||
|
||||
final SnFileContent _self;
|
||||
final $Res Function(SnFileContent) _then;
|
||||
|
||||
/// Create a copy of SnFileContent
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? content = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
content: null == content ? _self.content : content // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [SnFileContent].
|
||||
extension SnFileContentPatterns on SnFileContent {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _SnFileContent value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _SnFileContent() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _SnFileContent value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _SnFileContent():
|
||||
return $default(_that);}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _SnFileContent value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _SnFileContent() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String content)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnFileContent() when $default != null:
|
||||
return $default(_that.content);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String content) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnFileContent():
|
||||
return $default(_that.content);}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String content)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnFileContent() when $default != null:
|
||||
return $default(_that.content);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _SnFileContent implements SnFileContent {
|
||||
const _SnFileContent({required this.content});
|
||||
factory _SnFileContent.fromJson(Map<String, dynamic> json) => _$SnFileContentFromJson(json);
|
||||
|
||||
@override final String content;
|
||||
|
||||
/// Create a copy of SnFileContent
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$SnFileContentCopyWith<_SnFileContent> get copyWith => __$SnFileContentCopyWithImpl<_SnFileContent>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$SnFileContentToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnFileContent&&(identical(other.content, content) || other.content == content));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,content);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnFileContent(content: $content)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$SnFileContentCopyWith<$Res> implements $SnFileContentCopyWith<$Res> {
|
||||
factory _$SnFileContentCopyWith(_SnFileContent value, $Res Function(_SnFileContent) _then) = __$SnFileContentCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String content
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$SnFileContentCopyWithImpl<$Res>
|
||||
implements _$SnFileContentCopyWith<$Res> {
|
||||
__$SnFileContentCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _SnFileContent _self;
|
||||
final $Res Function(_SnFileContent) _then;
|
||||
|
||||
/// Create a copy of SnFileContent
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? content = null,}) {
|
||||
return _then(_SnFileContent(
|
||||
content: null == content ? _self.content : content // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
29
lib/models/site_file.g.dart
Normal file
29
lib/models/site_file.g.dart
Normal file
@@ -0,0 +1,29 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'site_file.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_SnSiteFileEntry _$SnSiteFileEntryFromJson(Map<String, dynamic> json) =>
|
||||
_SnSiteFileEntry(
|
||||
isDirectory: json['is_directory'] as bool,
|
||||
relativePath: json['relative_path'] as String,
|
||||
size: (json['size'] as num).toInt(),
|
||||
modified: DateTime.parse(json['modified'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnSiteFileEntryToJson(_SnSiteFileEntry instance) =>
|
||||
<String, dynamic>{
|
||||
'is_directory': instance.isDirectory,
|
||||
'relative_path': instance.relativePath,
|
||||
'size': instance.size,
|
||||
'modified': instance.modified.toIso8601String(),
|
||||
};
|
||||
|
||||
_SnFileContent _$SnFileContentFromJson(Map<String, dynamic> json) =>
|
||||
_SnFileContent(content: json['content'] as String);
|
||||
|
||||
Map<String, dynamic> _$SnFileContentToJson(_SnFileContent instance) =>
|
||||
<String, dynamic>{'content': instance.content};
|
||||
@@ -30,6 +30,7 @@ sealed class SnStickerPack with _$SnStickerPack {
|
||||
required String description,
|
||||
required String prefix,
|
||||
required String publisherId,
|
||||
required SnCloudFile? icon,
|
||||
required SnPublisher? publisher,
|
||||
required DateTime createdAt,
|
||||
required DateTime updatedAt,
|
||||
|
||||
@@ -335,7 +335,7 @@ $SnStickerPackCopyWith<$Res>? get pack {
|
||||
/// @nodoc
|
||||
mixin _$SnStickerPack {
|
||||
|
||||
String get id; String get name; String get description; String get prefix; String get publisherId; SnPublisher? get publisher; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt; List<SnSticker> get stickers;
|
||||
String get id; String get name; String get description; String get prefix; String get publisherId; SnCloudFile? get icon; SnPublisher? get publisher; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt; List<SnSticker> get stickers;
|
||||
/// Create a copy of SnStickerPack
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -348,16 +348,16 @@ $SnStickerPackCopyWith<SnStickerPack> get copyWith => _$SnStickerPackCopyWithImp
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnStickerPack&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.prefix, prefix) || other.prefix == prefix)&&(identical(other.publisherId, publisherId) || other.publisherId == publisherId)&&(identical(other.publisher, publisher) || other.publisher == publisher)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&const DeepCollectionEquality().equals(other.stickers, stickers));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnStickerPack&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.prefix, prefix) || other.prefix == prefix)&&(identical(other.publisherId, publisherId) || other.publisherId == publisherId)&&(identical(other.icon, icon) || other.icon == icon)&&(identical(other.publisher, publisher) || other.publisher == publisher)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&const DeepCollectionEquality().equals(other.stickers, stickers));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,name,description,prefix,publisherId,publisher,createdAt,updatedAt,deletedAt,const DeepCollectionEquality().hash(stickers));
|
||||
int get hashCode => Object.hash(runtimeType,id,name,description,prefix,publisherId,icon,publisher,createdAt,updatedAt,deletedAt,const DeepCollectionEquality().hash(stickers));
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnStickerPack(id: $id, name: $name, description: $description, prefix: $prefix, publisherId: $publisherId, publisher: $publisher, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, stickers: $stickers)';
|
||||
return 'SnStickerPack(id: $id, name: $name, description: $description, prefix: $prefix, publisherId: $publisherId, icon: $icon, publisher: $publisher, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, stickers: $stickers)';
|
||||
}
|
||||
|
||||
|
||||
@@ -368,11 +368,11 @@ abstract mixin class $SnStickerPackCopyWith<$Res> {
|
||||
factory $SnStickerPackCopyWith(SnStickerPack value, $Res Function(SnStickerPack) _then) = _$SnStickerPackCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String id, String name, String description, String prefix, String publisherId, SnPublisher? publisher, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnSticker> stickers
|
||||
String id, String name, String description, String prefix, String publisherId, SnCloudFile? icon, SnPublisher? publisher, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnSticker> stickers
|
||||
});
|
||||
|
||||
|
||||
$SnPublisherCopyWith<$Res>? get publisher;
|
||||
$SnCloudFileCopyWith<$Res>? get icon;$SnPublisherCopyWith<$Res>? get publisher;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
@@ -385,14 +385,15 @@ class _$SnStickerPackCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of SnStickerPack
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? name = null,Object? description = null,Object? prefix = null,Object? publisherId = null,Object? publisher = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,Object? stickers = null,}) {
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? name = null,Object? description = null,Object? prefix = null,Object? publisherId = null,Object? icon = freezed,Object? publisher = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,Object? stickers = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||
as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable
|
||||
as String,prefix: null == prefix ? _self.prefix : prefix // ignore: cast_nullable_to_non_nullable
|
||||
as String,publisherId: null == publisherId ? _self.publisherId : publisherId // ignore: cast_nullable_to_non_nullable
|
||||
as String,publisher: freezed == publisher ? _self.publisher : publisher // ignore: cast_nullable_to_non_nullable
|
||||
as String,icon: freezed == icon ? _self.icon : icon // ignore: cast_nullable_to_non_nullable
|
||||
as SnCloudFile?,publisher: freezed == publisher ? _self.publisher : publisher // ignore: cast_nullable_to_non_nullable
|
||||
as SnPublisher?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
|
||||
@@ -404,6 +405,18 @@ as List<SnSticker>,
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnCloudFileCopyWith<$Res>? get icon {
|
||||
if (_self.icon == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $SnCloudFileCopyWith<$Res>(_self.icon!, (value) {
|
||||
return _then(_self.copyWith(icon: value));
|
||||
});
|
||||
}/// Create a copy of SnStickerPack
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnPublisherCopyWith<$Res>? get publisher {
|
||||
if (_self.publisher == null) {
|
||||
return null;
|
||||
@@ -491,10 +504,10 @@ return $default(_that);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String name, String description, String prefix, String publisherId, SnPublisher? publisher, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnSticker> stickers)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String name, String description, String prefix, String publisherId, SnCloudFile? icon, SnPublisher? publisher, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnSticker> stickers)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnStickerPack() when $default != null:
|
||||
return $default(_that.id,_that.name,_that.description,_that.prefix,_that.publisherId,_that.publisher,_that.createdAt,_that.updatedAt,_that.deletedAt,_that.stickers);case _:
|
||||
return $default(_that.id,_that.name,_that.description,_that.prefix,_that.publisherId,_that.icon,_that.publisher,_that.createdAt,_that.updatedAt,_that.deletedAt,_that.stickers);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
@@ -512,10 +525,10 @@ return $default(_that.id,_that.name,_that.description,_that.prefix,_that.publish
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String name, String description, String prefix, String publisherId, SnPublisher? publisher, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnSticker> stickers) $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String name, String description, String prefix, String publisherId, SnCloudFile? icon, SnPublisher? publisher, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnSticker> stickers) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnStickerPack():
|
||||
return $default(_that.id,_that.name,_that.description,_that.prefix,_that.publisherId,_that.publisher,_that.createdAt,_that.updatedAt,_that.deletedAt,_that.stickers);}
|
||||
return $default(_that.id,_that.name,_that.description,_that.prefix,_that.publisherId,_that.icon,_that.publisher,_that.createdAt,_that.updatedAt,_that.deletedAt,_that.stickers);}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
@@ -529,10 +542,10 @@ return $default(_that.id,_that.name,_that.description,_that.prefix,_that.publish
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String name, String description, String prefix, String publisherId, SnPublisher? publisher, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnSticker> stickers)? $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String name, String description, String prefix, String publisherId, SnCloudFile? icon, SnPublisher? publisher, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnSticker> stickers)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SnStickerPack() when $default != null:
|
||||
return $default(_that.id,_that.name,_that.description,_that.prefix,_that.publisherId,_that.publisher,_that.createdAt,_that.updatedAt,_that.deletedAt,_that.stickers);case _:
|
||||
return $default(_that.id,_that.name,_that.description,_that.prefix,_that.publisherId,_that.icon,_that.publisher,_that.createdAt,_that.updatedAt,_that.deletedAt,_that.stickers);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
@@ -544,7 +557,7 @@ return $default(_that.id,_that.name,_that.description,_that.prefix,_that.publish
|
||||
@JsonSerializable()
|
||||
|
||||
class _SnStickerPack implements SnStickerPack {
|
||||
const _SnStickerPack({required this.id, required this.name, required this.description, required this.prefix, required this.publisherId, required this.publisher, required this.createdAt, required this.updatedAt, required this.deletedAt, final List<SnSticker> stickers = const []}): _stickers = stickers;
|
||||
const _SnStickerPack({required this.id, required this.name, required this.description, required this.prefix, required this.publisherId, required this.icon, required this.publisher, required this.createdAt, required this.updatedAt, required this.deletedAt, final List<SnSticker> stickers = const []}): _stickers = stickers;
|
||||
factory _SnStickerPack.fromJson(Map<String, dynamic> json) => _$SnStickerPackFromJson(json);
|
||||
|
||||
@override final String id;
|
||||
@@ -552,6 +565,7 @@ class _SnStickerPack implements SnStickerPack {
|
||||
@override final String description;
|
||||
@override final String prefix;
|
||||
@override final String publisherId;
|
||||
@override final SnCloudFile? icon;
|
||||
@override final SnPublisher? publisher;
|
||||
@override final DateTime createdAt;
|
||||
@override final DateTime updatedAt;
|
||||
@@ -577,16 +591,16 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnStickerPack&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.prefix, prefix) || other.prefix == prefix)&&(identical(other.publisherId, publisherId) || other.publisherId == publisherId)&&(identical(other.publisher, publisher) || other.publisher == publisher)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&const DeepCollectionEquality().equals(other._stickers, _stickers));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnStickerPack&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.prefix, prefix) || other.prefix == prefix)&&(identical(other.publisherId, publisherId) || other.publisherId == publisherId)&&(identical(other.icon, icon) || other.icon == icon)&&(identical(other.publisher, publisher) || other.publisher == publisher)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt)&&const DeepCollectionEquality().equals(other._stickers, _stickers));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,name,description,prefix,publisherId,publisher,createdAt,updatedAt,deletedAt,const DeepCollectionEquality().hash(_stickers));
|
||||
int get hashCode => Object.hash(runtimeType,id,name,description,prefix,publisherId,icon,publisher,createdAt,updatedAt,deletedAt,const DeepCollectionEquality().hash(_stickers));
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SnStickerPack(id: $id, name: $name, description: $description, prefix: $prefix, publisherId: $publisherId, publisher: $publisher, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, stickers: $stickers)';
|
||||
return 'SnStickerPack(id: $id, name: $name, description: $description, prefix: $prefix, publisherId: $publisherId, icon: $icon, publisher: $publisher, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, stickers: $stickers)';
|
||||
}
|
||||
|
||||
|
||||
@@ -597,11 +611,11 @@ abstract mixin class _$SnStickerPackCopyWith<$Res> implements $SnStickerPackCopy
|
||||
factory _$SnStickerPackCopyWith(_SnStickerPack value, $Res Function(_SnStickerPack) _then) = __$SnStickerPackCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String id, String name, String description, String prefix, String publisherId, SnPublisher? publisher, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnSticker> stickers
|
||||
String id, String name, String description, String prefix, String publisherId, SnCloudFile? icon, SnPublisher? publisher, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt, List<SnSticker> stickers
|
||||
});
|
||||
|
||||
|
||||
@override $SnPublisherCopyWith<$Res>? get publisher;
|
||||
@override $SnCloudFileCopyWith<$Res>? get icon;@override $SnPublisherCopyWith<$Res>? get publisher;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
@@ -614,14 +628,15 @@ class __$SnStickerPackCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of SnStickerPack
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = null,Object? description = null,Object? prefix = null,Object? publisherId = null,Object? publisher = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,Object? stickers = null,}) {
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = null,Object? description = null,Object? prefix = null,Object? publisherId = null,Object? icon = freezed,Object? publisher = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,Object? stickers = null,}) {
|
||||
return _then(_SnStickerPack(
|
||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||
as String,description: null == description ? _self.description : description // ignore: cast_nullable_to_non_nullable
|
||||
as String,prefix: null == prefix ? _self.prefix : prefix // ignore: cast_nullable_to_non_nullable
|
||||
as String,publisherId: null == publisherId ? _self.publisherId : publisherId // ignore: cast_nullable_to_non_nullable
|
||||
as String,publisher: freezed == publisher ? _self.publisher : publisher // ignore: cast_nullable_to_non_nullable
|
||||
as String,icon: freezed == icon ? _self.icon : icon // ignore: cast_nullable_to_non_nullable
|
||||
as SnCloudFile?,publisher: freezed == publisher ? _self.publisher : publisher // ignore: cast_nullable_to_non_nullable
|
||||
as SnPublisher?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
|
||||
@@ -634,6 +649,18 @@ as List<SnSticker>,
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnCloudFileCopyWith<$Res>? get icon {
|
||||
if (_self.icon == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $SnCloudFileCopyWith<$Res>(_self.icon!, (value) {
|
||||
return _then(_self.copyWith(icon: value));
|
||||
});
|
||||
}/// Create a copy of SnStickerPack
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SnPublisherCopyWith<$Res>? get publisher {
|
||||
if (_self.publisher == null) {
|
||||
return null;
|
||||
|
||||
@@ -11,16 +11,14 @@ _SnSticker _$SnStickerFromJson(Map<String, dynamic> json) => _SnSticker(
|
||||
slug: json['slug'] as String,
|
||||
image: SnCloudFile.fromJson(json['image'] as Map<String, dynamic>),
|
||||
packId: json['pack_id'] as String,
|
||||
pack:
|
||||
json['pack'] == null
|
||||
? null
|
||||
: SnStickerPack.fromJson(json['pack'] as Map<String, dynamic>),
|
||||
pack: json['pack'] == null
|
||||
? null
|
||||
: SnStickerPack.fromJson(json['pack'] as Map<String, dynamic>),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt:
|
||||
json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SnStickerToJson(_SnSticker instance) =>
|
||||
@@ -42,16 +40,17 @@ _SnStickerPack _$SnStickerPackFromJson(Map<String, dynamic> json) =>
|
||||
description: json['description'] as String,
|
||||
prefix: json['prefix'] as String,
|
||||
publisherId: json['publisher_id'] as String,
|
||||
publisher:
|
||||
json['publisher'] == null
|
||||
? null
|
||||
: SnPublisher.fromJson(json['publisher'] as Map<String, dynamic>),
|
||||
icon: json['icon'] == null
|
||||
? null
|
||||
: SnCloudFile.fromJson(json['icon'] as Map<String, dynamic>),
|
||||
publisher: json['publisher'] == null
|
||||
? null
|
||||
: SnPublisher.fromJson(json['publisher'] as Map<String, dynamic>),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
deletedAt:
|
||||
json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
deletedAt: json['deleted_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['deleted_at'] as String),
|
||||
stickers:
|
||||
(json['stickers'] as List<dynamic>?)
|
||||
?.map((e) => SnSticker.fromJson(e as Map<String, dynamic>))
|
||||
@@ -66,6 +65,7 @@ Map<String, dynamic> _$SnStickerPackToJson(_SnStickerPack instance) =>
|
||||
'description': instance.description,
|
||||
'prefix': instance.prefix,
|
||||
'publisher_id': instance.publisherId,
|
||||
'icon': instance.icon?.toJson(),
|
||||
'publisher': instance.publisher?.toJson(),
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
|
||||
@@ -38,6 +38,31 @@ class ThinkingChunkTypeConverter
|
||||
int toJson(ThinkingChunkType object) => object.value;
|
||||
}
|
||||
|
||||
enum ThinkingMessagePartType {
|
||||
text(0),
|
||||
functionCall(1),
|
||||
functionResult(2);
|
||||
|
||||
const ThinkingMessagePartType(this.value);
|
||||
final int value;
|
||||
|
||||
static ThinkingMessagePartType fromValue(int value) {
|
||||
return values.firstWhere((e) => e.value == value, orElse: () => text);
|
||||
}
|
||||
}
|
||||
|
||||
class ThinkingMessagePartTypeConverter
|
||||
implements JsonConverter<ThinkingMessagePartType, int> {
|
||||
const ThinkingMessagePartTypeConverter();
|
||||
|
||||
@override
|
||||
ThinkingMessagePartType fromJson(int json) =>
|
||||
ThinkingMessagePartType.fromValue(json);
|
||||
|
||||
@override
|
||||
int toJson(ThinkingMessagePartType object) => object.value;
|
||||
}
|
||||
|
||||
@freezed
|
||||
sealed class StreamThinkingRequest with _$StreamThinkingRequest {
|
||||
const factory StreamThinkingRequest({
|
||||
@@ -46,6 +71,7 @@ sealed class StreamThinkingRequest with _$StreamThinkingRequest {
|
||||
@Default([]) List<String> accpetProposals,
|
||||
List<String>? attachedPosts,
|
||||
List<Map<String, dynamic>>? attachedMessages,
|
||||
@JsonKey(name: 'service_id') String? serviceId,
|
||||
}) = _StreamThinkingRequest;
|
||||
|
||||
factory StreamThinkingRequest.fromJson(Map<String, dynamic> json) =>
|
||||
@@ -77,6 +103,43 @@ sealed class SnThinkingChunk with _$SnThinkingChunk {
|
||||
_$SnThinkingChunkFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
sealed class SnFunctionCall with _$SnFunctionCall {
|
||||
const factory SnFunctionCall({
|
||||
required String id,
|
||||
required String name,
|
||||
required String arguments,
|
||||
}) = _SnFunctionCall;
|
||||
|
||||
factory SnFunctionCall.fromJson(Map<String, dynamic> json) =>
|
||||
_$SnFunctionCallFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
sealed class SnFunctionResult with _$SnFunctionResult {
|
||||
const factory SnFunctionResult({
|
||||
required String callId,
|
||||
required dynamic result,
|
||||
required bool isError,
|
||||
}) = _SnFunctionResult;
|
||||
|
||||
factory SnFunctionResult.fromJson(Map<String, dynamic> json) =>
|
||||
_$SnFunctionResultFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
sealed class SnThinkingMessagePart with _$SnThinkingMessagePart {
|
||||
const factory SnThinkingMessagePart({
|
||||
@ThinkingMessagePartTypeConverter() required ThinkingMessagePartType type,
|
||||
String? text,
|
||||
SnFunctionCall? functionCall,
|
||||
SnFunctionResult? functionResult,
|
||||
}) = _SnThinkingMessagePart;
|
||||
|
||||
factory SnThinkingMessagePart.fromJson(Map<String, dynamic> json) =>
|
||||
_$SnThinkingMessagePartFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
sealed class SnThinkingSequence with _$SnThinkingSequence {
|
||||
const factory SnThinkingSequence({
|
||||
@@ -98,9 +161,8 @@ sealed class SnThinkingSequence with _$SnThinkingSequence {
|
||||
sealed class SnThinkingThought with _$SnThinkingThought {
|
||||
const factory SnThinkingThought({
|
||||
required String id,
|
||||
String? content,
|
||||
@Default([]) List<SnThinkingMessagePart> parts,
|
||||
@Default([]) List<SnCloudFile> files,
|
||||
@Default([]) List<SnThinkingChunk> chunks,
|
||||
@ThinkingThoughtRoleConverter() required ThinkingThoughtRole role,
|
||||
int? tokenCount,
|
||||
String? modelName,
|
||||
@@ -114,3 +176,26 @@ sealed class SnThinkingThought with _$SnThinkingThought {
|
||||
factory SnThinkingThought.fromJson(Map<String, dynamic> json) =>
|
||||
_$SnThinkingThoughtFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
sealed class ThoughtService with _$ThoughtService {
|
||||
const factory ThoughtService({
|
||||
@JsonKey(name: 'service_id') required String serviceId,
|
||||
required double billingMultiplier,
|
||||
required int perkLevel,
|
||||
}) = _ThoughtService;
|
||||
|
||||
factory ThoughtService.fromJson(Map<String, dynamic> json) =>
|
||||
_$ThoughtServiceFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
sealed class ThoughtServicesResponse with _$ThoughtServicesResponse {
|
||||
const factory ThoughtServicesResponse({
|
||||
@JsonKey(name: 'default_service') required String defaultService,
|
||||
required List<ThoughtService> services,
|
||||
}) = _ThoughtServicesResponse;
|
||||
|
||||
factory ThoughtServicesResponse.fromJson(Map<String, dynamic> json) =>
|
||||
_$ThoughtServicesResponseFromJson(json);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user