Compare commits
55 Commits
3.3.0+148
...
29574ada88
| Author | SHA1 | Date | |
|---|---|---|---|
|
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
|
@@ -23,6 +23,8 @@
|
|||||||
"next": "Next",
|
"next": "Next",
|
||||||
"createAccount": "Create an Account",
|
"createAccount": "Create an Account",
|
||||||
"createAccountDescription": "New to here? We got you covered!",
|
"createAccountDescription": "New to here? We got you covered!",
|
||||||
|
"affiliationSpell": "Affiliation Spell",
|
||||||
|
"affiliationSpellHint": "If you have an affiliation spell, enter it here.",
|
||||||
"nickname": "Nickname",
|
"nickname": "Nickname",
|
||||||
"email": "Email",
|
"email": "Email",
|
||||||
"bio": "Bio",
|
"bio": "Bio",
|
||||||
@@ -48,8 +50,6 @@
|
|||||||
"deletePublisherHint": "Are you sure to delete this publisher? This will also deleted all the post and collections under this publisher.",
|
"deletePublisherHint": "Are you sure to delete this publisher? This will also deleted all the post and collections under this publisher.",
|
||||||
"deletePost": "Delete Post",
|
"deletePost": "Delete Post",
|
||||||
"deletePostHint": "Are you sure to delete this 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",
|
"copyLink": "Copy Link",
|
||||||
"postCreateAccountTitle": "Thanks for joining!",
|
"postCreateAccountTitle": "Thanks for joining!",
|
||||||
"postCreateAccountNext": "What's next?",
|
"postCreateAccountNext": "What's next?",
|
||||||
@@ -135,12 +135,6 @@
|
|||||||
"reactionPositive": "Postive",
|
"reactionPositive": "Postive",
|
||||||
"reactionNegative": "Negative",
|
"reactionNegative": "Negative",
|
||||||
"reactionNeutral": "Neutral",
|
"reactionNeutral": "Neutral",
|
||||||
"customReaction": "Custom Reaction",
|
|
||||||
"customReactionHint": "Custom Reaction allow you to use user uploaded stickers as the symbol of the reaction for the post. Exclusive for Stellar Program members.",
|
|
||||||
"customReactions": "Custom Reactions",
|
|
||||||
"stickerPlaceholder": "Sticker Placeholder",
|
|
||||||
"reactionAttitude": "Reaction Attitude",
|
|
||||||
"addReaction": "Add Reaction",
|
|
||||||
"connectionConnected": "Connected",
|
"connectionConnected": "Connected",
|
||||||
"connectionDisconnected": "Disconnected",
|
"connectionDisconnected": "Disconnected",
|
||||||
"connectionReconnecting": "Reconnecting",
|
"connectionReconnecting": "Reconnecting",
|
||||||
@@ -163,8 +157,6 @@
|
|||||||
"accountConnectionProviderGithub": "GitHub",
|
"accountConnectionProviderGithub": "GitHub",
|
||||||
"accountConnectionProviderDiscord": "Discord",
|
"accountConnectionProviderDiscord": "Discord",
|
||||||
"accountConnectionProviderAfdian": "Afdian",
|
"accountConnectionProviderAfdian": "Afdian",
|
||||||
"accountConnectionProviderSpotify": "Spotify",
|
|
||||||
"accountConnectionProviderSteam": "Steam",
|
|
||||||
"checkIn": "Check In",
|
"checkIn": "Check In",
|
||||||
"checkInNone": "Not checked-in yet",
|
"checkInNone": "Not checked-in yet",
|
||||||
"checkInNoneHint": "Get your fortune tips and daily rewards by checking in.",
|
"checkInNoneHint": "Get your fortune tips and daily rewards by checking in.",
|
||||||
@@ -174,13 +166,10 @@
|
|||||||
"checkInResultLevel3": "Good Luck",
|
"checkInResultLevel3": "Good Luck",
|
||||||
"checkInResultLevel4": "Best Luck",
|
"checkInResultLevel4": "Best Luck",
|
||||||
"checkInActivityTitle": "{} checked in on {} and got a {}",
|
"checkInActivityTitle": "{} checked in on {} and got a {}",
|
||||||
"eventCalendar": "Event Calendar",
|
|
||||||
"eventCalendarEmpty": "No events on that day.",
|
|
||||||
"fortuneGraph": "Fortune Trend",
|
"fortuneGraph": "Fortune Trend",
|
||||||
"noFortuneData": "No fortune data available for this month.",
|
"noFortuneData": "No fortune data available for this month.",
|
||||||
"creatorHub": "Creator Hub",
|
"creatorHub": "Creator Hub",
|
||||||
"creatorHubDescription": "Manage posts, analytics, and more.",
|
"creatorHubDescription": "Manage posts, analytics, and more.",
|
||||||
"publicationSites": "Publication Sites",
|
|
||||||
"developerPortal": "Developer Portal",
|
"developerPortal": "Developer Portal",
|
||||||
"developerPortalDescription": "Build with Solar Network™.",
|
"developerPortalDescription": "Build with Solar Network™.",
|
||||||
"statusCreateHint": "What's on your mind? Add a status.",
|
"statusCreateHint": "What's on your mind? Add a status.",
|
||||||
@@ -262,16 +251,11 @@
|
|||||||
"translatorBadgeName": "Translator",
|
"translatorBadgeName": "Translator",
|
||||||
"translatorBadgeDescription": "Helping translate Solar Network into different languages",
|
"translatorBadgeDescription": "Helping translate Solar Network into different languages",
|
||||||
"wallet": "Wallet",
|
"wallet": "Wallet",
|
||||||
"walletStats": "Wallet Statistics",
|
|
||||||
"totalTransactions": "Total Transactions",
|
|
||||||
"totalOrders": "Total Orders",
|
|
||||||
"totalIncome": "Total Income",
|
|
||||||
"totalOutgoing": "Total Outgoing",
|
|
||||||
"netBalance": "Net Balance",
|
|
||||||
"walletCurrencyPoints": "New Solar Points",
|
"walletCurrencyPoints": "New Solar Points",
|
||||||
"walletCurrencyShortPoints": "NSP",
|
"walletCurrencyShortPoints": "NSP",
|
||||||
"walletCurrencyGolds": "The Solar Dollars",
|
"walletCurrencyGolds": "The Solar Dollars",
|
||||||
"walletCurrencyShortGolds": "NSD",
|
"walletCurrencyShortGolds": "NSD",
|
||||||
|
"retry": "Retry",
|
||||||
"creatorHubUnselectedHint": "Pick / create a publisher to get started.",
|
"creatorHubUnselectedHint": "Pick / create a publisher to get started.",
|
||||||
"relationships": "Relationships",
|
"relationships": "Relationships",
|
||||||
"addFriend": "Send a Friend Request",
|
"addFriend": "Send a Friend Request",
|
||||||
@@ -322,8 +306,6 @@
|
|||||||
"settingsBackgroundImageClear": "Clear Background Image",
|
"settingsBackgroundImageClear": "Clear Background Image",
|
||||||
"settingsBackgroundGenerateColor": "Generate color scheme from Bacground Image",
|
"settingsBackgroundGenerateColor": "Generate color scheme from Bacground Image",
|
||||||
"messageNone": "No content to display",
|
"messageNone": "No content to display",
|
||||||
"messageUpdateLinks": "Server generated links previews",
|
|
||||||
"messageUpdateEdited": "Edited a message",
|
|
||||||
"unreadMessages": {
|
"unreadMessages": {
|
||||||
"one": "{} unread message",
|
"one": "{} unread message",
|
||||||
"other": "{} unread messages"
|
"other": "{} unread messages"
|
||||||
@@ -337,7 +319,6 @@
|
|||||||
"settingsAprilFoolFeatures": "April Fool Features",
|
"settingsAprilFoolFeatures": "April Fool Features",
|
||||||
"settingsEnterToSend": "Enter to Send",
|
"settingsEnterToSend": "Enter to Send",
|
||||||
"settingsTransparentAppBar": "Transparent App Bar",
|
"settingsTransparentAppBar": "Transparent App Bar",
|
||||||
"settingsCardBackgroundOpacity": "Card Background Opacity",
|
|
||||||
"settingsCustomFonts": "Custom Fonts",
|
"settingsCustomFonts": "Custom Fonts",
|
||||||
"settingsCustomFontsHint": "Custom fonts will be used for all text in the app. Make sure it is installed on your device.",
|
"settingsCustomFontsHint": "Custom fonts will be used for all text in the app. Make sure it is installed on your device.",
|
||||||
"settingsColorScheme": "Color Scheme",
|
"settingsColorScheme": "Color Scheme",
|
||||||
@@ -385,6 +366,7 @@
|
|||||||
"authFactorSecretHint": "Create an secret for this factor.",
|
"authFactorSecretHint": "Create an secret for this factor.",
|
||||||
"authFactorQrCodeScan": "Scan this QR code with your authenticator app to set up TOTP authentication",
|
"authFactorQrCodeScan": "Scan this QR code with your authenticator app to set up TOTP authentication",
|
||||||
"authFactorNoQrCode": "No QR code available for this authentication factor",
|
"authFactorNoQrCode": "No QR code available for this authentication factor",
|
||||||
|
"cancel": "Cancel",
|
||||||
"confirm": "Confirm",
|
"confirm": "Confirm",
|
||||||
"authFactorAdditional": "One more step",
|
"authFactorAdditional": "One more step",
|
||||||
"authFactorHint": "Contact method hint",
|
"authFactorHint": "Contact method hint",
|
||||||
@@ -409,10 +391,6 @@
|
|||||||
"other": "{} are typing..."
|
"other": "{} are typing..."
|
||||||
},
|
},
|
||||||
"settingsAppearance": "Appearance",
|
"settingsAppearance": "Appearance",
|
||||||
"settingsThemeMode": "Theme Mode",
|
|
||||||
"settingsThemeModeSystem": "System",
|
|
||||||
"settingsThemeModeLight": "Light",
|
|
||||||
"settingsThemeModeDark": "Dark",
|
|
||||||
"settingsServer": "Server",
|
"settingsServer": "Server",
|
||||||
"settingsBehavior": "Behavior",
|
"settingsBehavior": "Behavior",
|
||||||
"settingsDesktop": "Desktop",
|
"settingsDesktop": "Desktop",
|
||||||
@@ -473,7 +451,6 @@
|
|||||||
"pronouns": "Pronouns",
|
"pronouns": "Pronouns",
|
||||||
"location": "Location",
|
"location": "Location",
|
||||||
"timeZone": "Time Zone",
|
"timeZone": "Time Zone",
|
||||||
"timezoneNotFound": "Time zone not found",
|
|
||||||
"birthday": "Birthday",
|
"birthday": "Birthday",
|
||||||
"selectADate": "Select a date",
|
"selectADate": "Select a date",
|
||||||
"checkInResultT0": "Worst",
|
"checkInResultT0": "Worst",
|
||||||
@@ -484,6 +461,7 @@
|
|||||||
"accountProfileView": "View Profile",
|
"accountProfileView": "View Profile",
|
||||||
"unspecified": "Unspecified",
|
"unspecified": "Unspecified",
|
||||||
"added": "Added",
|
"added": "Added",
|
||||||
|
"preview": "Preview",
|
||||||
"togglePreview": "Toggle Preview",
|
"togglePreview": "Toggle Preview",
|
||||||
"subscribe": "Subscribe",
|
"subscribe": "Subscribe",
|
||||||
"unsubscribe": "Unsubscribe",
|
"unsubscribe": "Unsubscribe",
|
||||||
@@ -494,7 +472,6 @@
|
|||||||
"pinCode": "PIN Code",
|
"pinCode": "PIN Code",
|
||||||
"biometric": "Biometric",
|
"biometric": "Biometric",
|
||||||
"enterPinToConfirm": "Enter your 6-digit PIN to confirm payment",
|
"enterPinToConfirm": "Enter your 6-digit PIN to confirm payment",
|
||||||
"enterPin": "Enter your PIN code",
|
|
||||||
"clearPin": "Clear PIN",
|
"clearPin": "Clear PIN",
|
||||||
"useBiometricToConfirm": "Use biometric authentication to confirm payment",
|
"useBiometricToConfirm": "Use biometric authentication to confirm payment",
|
||||||
"touchSensorToAuthenticate": "Touch the sensor to authenticate",
|
"touchSensorToAuthenticate": "Touch the sensor to authenticate",
|
||||||
@@ -644,10 +621,6 @@
|
|||||||
"chatNotJoined": "You have not joined this chat yet.",
|
"chatNotJoined": "You have not joined this chat yet.",
|
||||||
"chatUnableJoin": "You can't join this chat due to it's access control settings.",
|
"chatUnableJoin": "You can't join this chat due to it's access control settings.",
|
||||||
"chatJoin": "Join the Chat",
|
"chatJoin": "Join the Chat",
|
||||||
"chatReplyingTo": "Replying to {}",
|
|
||||||
"chatForwarding": "Forwarding message",
|
|
||||||
"chatEditing": "Editing message",
|
|
||||||
"chatNoContent": "No content",
|
|
||||||
"realmJoin": "Join the Realm",
|
"realmJoin": "Join the Realm",
|
||||||
"realmJoinSuccess": "Successfully joined the realm.",
|
"realmJoinSuccess": "Successfully joined the realm.",
|
||||||
"search": "Search",
|
"search": "Search",
|
||||||
@@ -779,21 +752,6 @@
|
|||||||
"rename": "Rename",
|
"rename": "Rename",
|
||||||
"markAsSensitive": "Mark as Sensitive",
|
"markAsSensitive": "Mark as Sensitive",
|
||||||
"fileName": "File name",
|
"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",
|
"poll": "Poll",
|
||||||
"pollsRecent": "Recent Polls",
|
"pollsRecent": "Recent Polls",
|
||||||
"pollCreateNew": "Create New",
|
"pollCreateNew": "Create New",
|
||||||
@@ -876,7 +834,6 @@
|
|||||||
"pollShortTextAnswerPreview": "Short text answer (preview)",
|
"pollShortTextAnswerPreview": "Short text answer (preview)",
|
||||||
"award": "Award",
|
"award": "Award",
|
||||||
"awardPost": "Award Post",
|
"awardPost": "Award Post",
|
||||||
"awardPoints": "Awarded {} points",
|
|
||||||
"awardMessage": "Message",
|
"awardMessage": "Message",
|
||||||
"awardMessageHint": "Enter your award message...",
|
"awardMessageHint": "Enter your award message...",
|
||||||
"awardAttitude": "Attitude",
|
"awardAttitude": "Attitude",
|
||||||
@@ -1033,10 +990,6 @@
|
|||||||
"searchLinks": "Links",
|
"searchLinks": "Links",
|
||||||
"searchAttachments": "Attachments",
|
"searchAttachments": "Attachments",
|
||||||
"noMessagesFound": "No messages found",
|
"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",
|
"openInBrowser": "Open in Browser",
|
||||||
"highlightPost": "Highlight Post",
|
"highlightPost": "Highlight Post",
|
||||||
"filters": "Filters",
|
"filters": "Filters",
|
||||||
@@ -1067,15 +1020,15 @@
|
|||||||
"uploadFile": "Upload File",
|
"uploadFile": "Upload File",
|
||||||
"authDeviceChallenges": "Device Usage",
|
"authDeviceChallenges": "Device Usage",
|
||||||
"authDeviceHint": "Swipe left to edit label, swipe right to logout device.",
|
"authDeviceHint": "Swipe left to edit label, swipe right to logout device.",
|
||||||
|
"authSessionLogout": "Logout Session",
|
||||||
|
"authSessionLogoutHint": "Are you sure you want to logout this session? This will terminate this specific login session.",
|
||||||
"settingsMessageDisplayStyle": "Message Display Style",
|
"settingsMessageDisplayStyle": "Message Display Style",
|
||||||
"settingsWindowOpacity": "Window Opacity",
|
|
||||||
"auto": "Auto",
|
"auto": "Auto",
|
||||||
"manual": "Manual",
|
"manual": "Manual",
|
||||||
"iframeCode": "Iframe Code",
|
"iframeCode": "Iframe Code",
|
||||||
"iframeCodeHint": "<iframe src=\"...\" width=\"...\" height=\"...\">",
|
"iframeCodeHint": "<iframe src=\"...\" width=\"...\" height=\"...\">",
|
||||||
"parseIframe": "Parse Iframe",
|
"parseIframe": "Parse Iframe",
|
||||||
"messageActions": "Message Actions",
|
"messageActions": "Message Actions",
|
||||||
"messageContent": "Message Content",
|
|
||||||
"viewEmbedLoadHint": "Tap to load",
|
"viewEmbedLoadHint": "Tap to load",
|
||||||
"levelingStage1": "Novice",
|
"levelingStage1": "Novice",
|
||||||
"levelingStage2": "Apprentice",
|
"levelingStage2": "Apprentice",
|
||||||
@@ -1089,7 +1042,6 @@
|
|||||||
"levelingStage10": "Immortal",
|
"levelingStage10": "Immortal",
|
||||||
"levelingStage11": "Divine",
|
"levelingStage11": "Divine",
|
||||||
"levelingStage12": "Transcendent",
|
"levelingStage12": "Transcendent",
|
||||||
"uploadTasks": "Upload Tasks",
|
|
||||||
"uploadAttachment": "Upload Attachment",
|
"uploadAttachment": "Upload Attachment",
|
||||||
"attachmentPreview": "Attachment Preview",
|
"attachmentPreview": "Attachment Preview",
|
||||||
"selectPool": "Select Pool",
|
"selectPool": "Select Pool",
|
||||||
@@ -1111,6 +1063,53 @@
|
|||||||
"recycledFilesDeleted": "Recycled files deleted successfully",
|
"recycledFilesDeleted": "Recycled files deleted successfully",
|
||||||
"failedToDeleteRecycledFiles": "Failed to delete recycled files",
|
"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",
|
"updateAvailable": "Update available",
|
||||||
"noChangelogProvided": "No changelog provided.",
|
"noChangelogProvided": "No changelog provided.",
|
||||||
"useSecondarySourceForDownload": "Use secondary source for download",
|
"useSecondarySourceForDownload": "Use secondary source for download",
|
||||||
@@ -1149,7 +1148,6 @@
|
|||||||
"thisWillBeAnOpenGift": "This will be an open gift",
|
"thisWillBeAnOpenGift": "This will be an open gift",
|
||||||
"personalMessage": "Personal Message",
|
"personalMessage": "Personal Message",
|
||||||
"addPersonalMessageForRecipient": "Add a personal message for the recipient",
|
"addPersonalMessageForRecipient": "Add a personal message for the recipient",
|
||||||
"cancel": "Cancel",
|
|
||||||
"giftStatusCreated": "Created",
|
"giftStatusCreated": "Created",
|
||||||
"giftStatusSent": "Sent",
|
"giftStatusSent": "Sent",
|
||||||
"giftStatusRedeemed": "Redeemed",
|
"giftStatusRedeemed": "Redeemed",
|
||||||
@@ -1255,11 +1253,14 @@
|
|||||||
"gradientColors": "Gradient Colors",
|
"gradientColors": "Gradient Colors",
|
||||||
"color": "Color",
|
"color": "Color",
|
||||||
"addColor": "Add Color",
|
"addColor": "Add Color",
|
||||||
"preview": "Preview",
|
|
||||||
"availableWithYourPlan": "Available with your plan",
|
"availableWithYourPlan": "Available with your plan",
|
||||||
"upgradeRequired": "Upgrade required",
|
"upgradeRequired": "Upgrade required",
|
||||||
"settingsDisableAnimation": "Disable Animation",
|
"settingsDisableAnimation": "Disable Animation",
|
||||||
"addTag": "Add Tag",
|
"addTag": "Add Tag",
|
||||||
|
"accountConnectionProviderSpotify": "Spotify",
|
||||||
|
"accountConnectionProviderSteam": "Steam",
|
||||||
|
"timezoneNotFound": "Time zone not found",
|
||||||
|
"awardPoints": "Awarded {} points",
|
||||||
"postFeaturedOn": "Post featured on {}",
|
"postFeaturedOn": "Post featured on {}",
|
||||||
"messageSentAt": "Sent at {}",
|
"messageSentAt": "Sent at {}",
|
||||||
"myTickets": "My Tickets",
|
"myTickets": "My Tickets",
|
||||||
@@ -1305,8 +1306,6 @@
|
|||||||
"thoughtNewConversation": "Start New Conversation",
|
"thoughtNewConversation": "Start New Conversation",
|
||||||
"thoughtParseError": "Failed to parse AI response",
|
"thoughtParseError": "Failed to parse AI response",
|
||||||
"thoughtFunctionCall": "Use {}",
|
"thoughtFunctionCall": "Use {}",
|
||||||
"thoughtFunctionCallBegin": "Calling tool {}",
|
|
||||||
"thoughtFunctionCallFinish": "{} responded",
|
|
||||||
"aiThought": "AI Thought",
|
"aiThought": "AI Thought",
|
||||||
"aiThoughtTitle": "Let sn-chan think",
|
"aiThoughtTitle": "Let sn-chan think",
|
||||||
"postReferenceUnavailable": "Referenced post is unavailable",
|
"postReferenceUnavailable": "Referenced post is unavailable",
|
||||||
@@ -1326,6 +1325,11 @@
|
|||||||
"descendingOrder": "Descending Order",
|
"descendingOrder": "Descending Order",
|
||||||
"selectDate": "Select Date",
|
"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",
|
"thoughtUnpaidHint": "Thinking unavaiable due to unpaid orders",
|
||||||
"more": "More",
|
"more": "More",
|
||||||
"collapse": "Collapse",
|
"collapse": "Collapse",
|
||||||
@@ -1341,6 +1345,8 @@
|
|||||||
"unindexedFiles": "Unindexed files",
|
"unindexedFiles": "Unindexed files",
|
||||||
"folder": "Folder",
|
"folder": "Folder",
|
||||||
"clearCompleted": "Clear Completed",
|
"clearCompleted": "Clear Completed",
|
||||||
|
"uploadSuccess": "Upload successful!",
|
||||||
|
"wouldYouLikeToViewFile": "Would you like to view the file?",
|
||||||
"contentCantEmpty": "Content cannot be empty",
|
"contentCantEmpty": "Content cannot be empty",
|
||||||
"features": "Features",
|
"features": "Features",
|
||||||
"unnamed": "Unnamed",
|
"unnamed": "Unnamed",
|
||||||
@@ -1471,5 +1477,21 @@
|
|||||||
"allFilesUploadedSuccess": "All files uploaded successfully",
|
"allFilesUploadedSuccess": "All files uploaded successfully",
|
||||||
"lotteryLastNumberSpecial": "The last selected number will be your special number.",
|
"lotteryLastNumberSpecial": "The last selected number will be your special number.",
|
||||||
"lotteryMultiplierRequired": "Please enter a multiplier",
|
"lotteryMultiplierRequired": "Please enter a multiplier",
|
||||||
"lotteryMultiplierRange": "Multiplier must be between 1 and 10"
|
"lotteryMultiplierRange": "Multiplier must be between 1 and 10",
|
||||||
|
"dropToShare": "Drop to share",
|
||||||
|
"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",
|
||||||
|
"accountActivationAlert": "Remember to 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"
|
||||||
}
|
}
|
||||||
@@ -164,8 +164,6 @@
|
|||||||
"checkInResultLevel3": "Good Luck",
|
"checkInResultLevel3": "Good Luck",
|
||||||
"checkInResultLevel4": "Best Luck",
|
"checkInResultLevel4": "Best Luck",
|
||||||
"checkInActivityTitle": "{} checked in on {} and got a {}",
|
"checkInActivityTitle": "{} checked in on {} and got a {}",
|
||||||
"eventCalander": "Event Calander",
|
|
||||||
"eventCalanderEmpty": "No events on that day.",
|
|
||||||
"fortuneGraph": "Fortune Trend",
|
"fortuneGraph": "Fortune Trend",
|
||||||
"noFortuneData": "No fortune data available for this month.",
|
"noFortuneData": "No fortune data available for this month.",
|
||||||
"creatorHub": "Creator Hub",
|
"creatorHub": "Creator Hub",
|
||||||
@@ -752,21 +750,6 @@
|
|||||||
"rename": "Rename",
|
"rename": "Rename",
|
||||||
"markAsSensitive": "Mark as Sensitive",
|
"markAsSensitive": "Mark as Sensitive",
|
||||||
"fileName": "File name",
|
"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",
|
"poll": "Poll",
|
||||||
"pollsRecent": "Recent Polls",
|
"pollsRecent": "Recent Polls",
|
||||||
"pollCreateNew": "Create New",
|
"pollCreateNew": "Create New",
|
||||||
@@ -1075,5 +1058,421 @@
|
|||||||
"deleteRecycledFiles": "Delete Recycled Files",
|
"deleteRecycledFiles": "Delete Recycled Files",
|
||||||
"recycledFilesDeleted": "Recycled files deleted successfully",
|
"recycledFilesDeleted": "Recycled files deleted successfully",
|
||||||
"failedToDeleteRecycledFiles": "Failed to delete recycled files",
|
"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"
|
||||||
}
|
}
|
||||||
@@ -164,8 +164,6 @@
|
|||||||
"checkInResultLevel3": "Good Luck",
|
"checkInResultLevel3": "Good Luck",
|
||||||
"checkInResultLevel4": "Best Luck",
|
"checkInResultLevel4": "Best Luck",
|
||||||
"checkInActivityTitle": "{} checked in on {} and got a {}",
|
"checkInActivityTitle": "{} checked in on {} and got a {}",
|
||||||
"eventCalander": "Event Calander",
|
|
||||||
"eventCalanderEmpty": "No events on that day.",
|
|
||||||
"fortuneGraph": "Fortune Trend",
|
"fortuneGraph": "Fortune Trend",
|
||||||
"noFortuneData": "No fortune data available for this month.",
|
"noFortuneData": "No fortune data available for this month.",
|
||||||
"creatorHub": "Creator Hub",
|
"creatorHub": "Creator Hub",
|
||||||
@@ -752,21 +750,6 @@
|
|||||||
"rename": "Rename",
|
"rename": "Rename",
|
||||||
"markAsSensitive": "Mark as Sensitive",
|
"markAsSensitive": "Mark as Sensitive",
|
||||||
"fileName": "File name",
|
"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",
|
"poll": "Poll",
|
||||||
"pollsRecent": "Recent Polls",
|
"pollsRecent": "Recent Polls",
|
||||||
"pollCreateNew": "Create New",
|
"pollCreateNew": "Create New",
|
||||||
@@ -1075,5 +1058,421 @@
|
|||||||
"deleteRecycledFiles": "Delete Recycled Files",
|
"deleteRecycledFiles": "Delete Recycled Files",
|
||||||
"recycledFilesDeleted": "Recycled files deleted successfully",
|
"recycledFilesDeleted": "Recycled files deleted successfully",
|
||||||
"failedToDeleteRecycledFiles": "Failed to delete recycled files",
|
"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"
|
||||||
}
|
}
|
||||||
@@ -164,8 +164,6 @@
|
|||||||
"checkInResultLevel3": "Good Luck",
|
"checkInResultLevel3": "Good Luck",
|
||||||
"checkInResultLevel4": "Best Luck",
|
"checkInResultLevel4": "Best Luck",
|
||||||
"checkInActivityTitle": "{} checked in on {} and got a {}",
|
"checkInActivityTitle": "{} checked in on {} and got a {}",
|
||||||
"eventCalander": "Event Calander",
|
|
||||||
"eventCalanderEmpty": "No events on that day.",
|
|
||||||
"fortuneGraph": "Fortune Trend",
|
"fortuneGraph": "Fortune Trend",
|
||||||
"noFortuneData": "No fortune data available for this month.",
|
"noFortuneData": "No fortune data available for this month.",
|
||||||
"creatorHub": "Creator Hub",
|
"creatorHub": "Creator Hub",
|
||||||
@@ -752,21 +750,6 @@
|
|||||||
"rename": "Rename",
|
"rename": "Rename",
|
||||||
"markAsSensitive": "Mark as Sensitive",
|
"markAsSensitive": "Mark as Sensitive",
|
||||||
"fileName": "File name",
|
"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",
|
"poll": "Poll",
|
||||||
"pollsRecent": "Recent Polls",
|
"pollsRecent": "Recent Polls",
|
||||||
"pollCreateNew": "Create New",
|
"pollCreateNew": "Create New",
|
||||||
@@ -1075,5 +1058,421 @@
|
|||||||
"deleteRecycledFiles": "Delete Recycled Files",
|
"deleteRecycledFiles": "Delete Recycled Files",
|
||||||
"recycledFilesDeleted": "Recycled files deleted successfully",
|
"recycledFilesDeleted": "Recycled files deleted successfully",
|
||||||
"failedToDeleteRecycledFiles": "Failed to delete recycled files",
|
"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"
|
||||||
}
|
}
|
||||||
@@ -164,8 +164,6 @@
|
|||||||
"checkInResultLevel3": "吉",
|
"checkInResultLevel3": "吉",
|
||||||
"checkInResultLevel4": "大吉",
|
"checkInResultLevel4": "大吉",
|
||||||
"checkInActivityTitle": "{} 在 {} 签到并获得了 {}",
|
"checkInActivityTitle": "{} 在 {} 签到并获得了 {}",
|
||||||
"eventCalander": "活动日历",
|
|
||||||
"eventCalanderEmpty": "该日无活动。",
|
|
||||||
"fortuneGraph": "时运趋势",
|
"fortuneGraph": "时运趋势",
|
||||||
"noFortuneData": "本月沒有时运數據。",
|
"noFortuneData": "本月沒有时运數據。",
|
||||||
"creatorHub": "创作者中心",
|
"creatorHub": "创作者中心",
|
||||||
@@ -251,10 +249,10 @@
|
|||||||
"translatorBadgeName": "翻译者",
|
"translatorBadgeName": "翻译者",
|
||||||
"translatorBadgeDescription": "协助将 Solar Network 翻译成不同语言",
|
"translatorBadgeDescription": "协助将 Solar Network 翻译成不同语言",
|
||||||
"wallet": "钱包",
|
"wallet": "钱包",
|
||||||
"walletCurrencyPoints": "源能点",
|
"walletCurrencyPoints": "新太阳点",
|
||||||
"walletCurrencyShortPoints": "NSP",
|
"walletCurrencyShortPoints": "NSP",
|
||||||
"walletCurrencyGolds": "星辰碎片",
|
"walletCurrencyGolds": "太阳币",
|
||||||
"walletCurrencyShortGolds": "SHD",
|
"walletCurrencyShortGolds": "TSD",
|
||||||
"retry": "重试",
|
"retry": "重试",
|
||||||
"creatorHubUnselectedHint": "选择/创建一个发布者以开始使用。",
|
"creatorHubUnselectedHint": "选择/创建一个发布者以开始使用。",
|
||||||
"relationships": "关系",
|
"relationships": "关系",
|
||||||
@@ -752,21 +750,6 @@
|
|||||||
"rename": "重命名",
|
"rename": "重命名",
|
||||||
"markAsSensitive": "标记为敏感",
|
"markAsSensitive": "标记为敏感",
|
||||||
"fileName": "文件名",
|
"fileName": "文件名",
|
||||||
"sensitiveCategories": {
|
|
||||||
"language": "语言",
|
|
||||||
"sexualContent": "色情内容",
|
|
||||||
"violence": "暴力",
|
|
||||||
"profanity": "亵渎",
|
|
||||||
"hateSpeech": "仇恨言论",
|
|
||||||
"racism": "种族主义",
|
|
||||||
"adultContent": "成人内容",
|
|
||||||
"drugAbuse": "药物滥用",
|
|
||||||
"alcoholAbuse": "酗酒",
|
|
||||||
"gambling": "赌博",
|
|
||||||
"selfHarm": "自残",
|
|
||||||
"childAbuse": "虐待儿童",
|
|
||||||
"other": "其他"
|
|
||||||
},
|
|
||||||
"poll": "投票",
|
"poll": "投票",
|
||||||
"pollsRecent": "最近投票",
|
"pollsRecent": "最近投票",
|
||||||
"pollCreateNew": "创建新投票",
|
"pollCreateNew": "创建新投票",
|
||||||
@@ -1076,12 +1059,241 @@
|
|||||||
"recycledFilesDeleted": "被回收文件成功删除",
|
"recycledFilesDeleted": "被回收文件成功删除",
|
||||||
"failedToDeleteRecycledFiles": "删除被回收文件失败",
|
"failedToDeleteRecycledFiles": "删除被回收文件失败",
|
||||||
"upload": "上传",
|
"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": "撰写帖子",
|
"postCompose": "撰写帖子",
|
||||||
"postPublish": "发布帖子",
|
"postPublish": "发布帖子",
|
||||||
"restoreDraftTitle": "恢复草稿",
|
"restoreDraftTitle": "恢复草稿",
|
||||||
"restoreDraftMessage": "发现了一个草稿。你想要恢复它吗?",
|
"restoreDraftMessage": "发现了一个草稿。你想要恢复它吗?",
|
||||||
"draft": "草稿",
|
"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": "寻思",
|
"thoughtDefaultTopic": "寻思",
|
||||||
"thoughtAiName": "SN 酱",
|
"thoughtAiName": "SN 酱",
|
||||||
"thoughtUserName": "您",
|
"thoughtUserName": "您",
|
||||||
@@ -1089,7 +1301,193 @@
|
|||||||
"thoughtInputHint": "问 SN 酱任何问题...",
|
"thoughtInputHint": "问 SN 酱任何问题...",
|
||||||
"thoughtNewConversation": "开始新对话",
|
"thoughtNewConversation": "开始新对话",
|
||||||
"thoughtParseError": "解析 AI 响应失败",
|
"thoughtParseError": "解析 AI 响应失败",
|
||||||
|
"thoughtFunctionCall": "调用 {} 函数",
|
||||||
"aiThought": "寻思",
|
"aiThought": "寻思",
|
||||||
"aiThoughtTitle": "让 SN 酱寻思寻思",
|
"aiThoughtTitle": "让 SN 酱寻思寻思",
|
||||||
"thoughtUnpaidHint": "寻思因为有未支付的订单而被禁用"
|
"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": "查看条款与条件",
|
||||||
|
"accountActivationAlert": "请记住激活您的账户",
|
||||||
|
"accountActivationAlertHint": "未激活的账户可能会导致各种权限问题,请点击我们发送到您邮箱收件箱的链接来激活您的账户。",
|
||||||
|
"accountActivationResendHint": "没收到?请尝试点击下方按钮重新发送。如果您在账户未激活期间需要更新邮箱,请随时联系我们的客服。",
|
||||||
|
"accountActivationResend": "重新发送"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -164,177 +164,175 @@
|
|||||||
"checkInResultLevel3": "吉",
|
"checkInResultLevel3": "吉",
|
||||||
"checkInResultLevel4": "大吉",
|
"checkInResultLevel4": "大吉",
|
||||||
"checkInActivityTitle": "{} 於 {} 簽到,獲 {} 籤",
|
"checkInActivityTitle": "{} 於 {} 簽到,獲 {} 籤",
|
||||||
"eventCalander": "Event Calander",
|
"fortuneGraph": "运程谶",
|
||||||
"eventCalanderEmpty": "No events on that day.",
|
"noFortuneData": "本月气数未显。",
|
||||||
"fortuneGraph": "Fortune Trend",
|
"creatorHub": "著書閣",
|
||||||
"noFortuneData": "No fortune data available for this month.",
|
"creatorHubDescription": "司理帖文、析策諸務。",
|
||||||
"creatorHub": "Creator Hub",
|
"developerPortal": "匠造司",
|
||||||
"creatorHubDescription": "Manage posts, analytics, and more.",
|
"developerPortalDescription": "築基於 Solar Network™。",
|
||||||
"developerPortal": "Developer Portal",
|
"statusCreateHint": "何所思?可添近況。",
|
||||||
"developerPortalDescription": "Build with Solar Network™.",
|
"statusCreate": "增境況",
|
||||||
"statusCreateHint": "What's on your mind? Add a status.",
|
"statusUpdate": "更境況",
|
||||||
"statusCreate": "Add a Status",
|
"statusLabel": "心境",
|
||||||
"statusUpdate": "Update Status",
|
"statusAttitude": "意態",
|
||||||
"statusLabel": "Status",
|
"attitudePositive": "昂揚",
|
||||||
"statusAttitude": "Attitude",
|
"attitudeNeutral": "平瀾",
|
||||||
"attitudePositive": "Positive",
|
"attitudeNegative": "消沉",
|
||||||
"attitudeNeutral": "Neutral",
|
"statusInvisible": "隱跡",
|
||||||
"attitudeNegative": "Negative",
|
"statusInvisibleDescription": "汝之形跡不現於人前。",
|
||||||
"statusInvisible": "Invisible",
|
"statusNotDisturb": "勿擾",
|
||||||
"statusInvisibleDescription": "Your will be showing as offline to others.",
|
"statusNotDisturbDescription": "急報皆止。",
|
||||||
"statusNotDisturb": "Do Not Disturb",
|
"statusClearTime": "滌除於",
|
||||||
"statusNotDisturbDescription": "Push notification will be disabled.",
|
"statusNoAutoClear": "不自滌",
|
||||||
"statusClearTime": "Cleared At",
|
"online": "在朝",
|
||||||
"statusNoAutoClear": "Do not auto clear",
|
"offline": "在野",
|
||||||
"online": "Online",
|
"status": "心境",
|
||||||
"offline": "Offline",
|
"statusActivityTitle": "{} 正於 {} {}",
|
||||||
"status": "Status",
|
"statusActivityEndedTitle": "{} 正於 {} {} 迄於 {}",
|
||||||
"statusActivityTitle": "{} is {} {}",
|
"appSettings": "應用設置",
|
||||||
"statusActivityEndedTitle": "{} is {} {} until {}",
|
"accountSettings": "賬戶設置",
|
||||||
"appSettings": "App Settings",
|
"settings": "設置",
|
||||||
"accountSettings": "Account Settings",
|
"language": "言語",
|
||||||
"settings": "Settings",
|
"accountLanguageHint": "此言語將行於電郵並推送告示。",
|
||||||
"language": "Language",
|
"settingsDisplayLanguage": "顯示言語",
|
||||||
"accountLanguageHint": "This language will be used for email and push notifications.",
|
"languageFollowSystem": "從系統之制",
|
||||||
"settingsDisplayLanguage": "Display Language",
|
"postsCreatedCount": "貼文",
|
||||||
"languageFollowSystem": "Follow System",
|
"stickerPacksCreatedCount": "貼札集",
|
||||||
"postsCreatedCount": "Posts",
|
"stickersCreatedCount": "貼札",
|
||||||
"stickerPacksCreatedCount": "Sticker Packs",
|
"upvoteReceived": "收擢",
|
||||||
"stickersCreatedCount": "Stickers",
|
"downvoteReceived": "收黜",
|
||||||
"upvoteReceived": "Upvotes Recieved",
|
"stickerPacks": "貼札集",
|
||||||
"downvoteReceived": "Downvotes Recieved",
|
"createStickerPack": "始創一貼札集",
|
||||||
"stickerPacks": "Sticker Packs",
|
"editStickerPack": "修訂貼札集",
|
||||||
"createStickerPack": "Create a Sticker Pack",
|
"deleteStickerPack": "革去貼札集",
|
||||||
"editStickerPack": "Edit Sticker Pack",
|
"deleteStickerPackHint": "決革去此貼札譜否?此令無可更赦。",
|
||||||
"deleteStickerPack": "Delete Sticker Pack",
|
"stickerPackPrefix": "首綴",
|
||||||
"deleteStickerPackHint": "Are you sure to delete this sticker pack? This action cannot be undone.",
|
"stickerPackPrefixHint": "此首綴將加於本帙諸貼札縮略名之前。",
|
||||||
"stickerPackPrefix": "Prefix",
|
"stickers": "貼札",
|
||||||
"stickerPackPrefixHint": "The prefix will be added before each stickers' slug in this pack.",
|
"createSticker": "始創一貼札",
|
||||||
"stickers": "Stickers",
|
"editSticker": "修訂貼札",
|
||||||
"createSticker": "Create a Sticker",
|
"deleteSticker": "革去貼札",
|
||||||
"editSticker": "Edit Sticker",
|
"deleteStickerHint": "確欲革去此貼札乎?此勢無可逆轉。",
|
||||||
"deleteSticker": "Delete Sticker",
|
"stickerImage": "圖像",
|
||||||
"deleteStickerHint": "Are you sure to delete this sticker? This action cannot be undone.",
|
"stickerSlug": "籤碼",
|
||||||
"stickerImage": "Image",
|
"stickerSlugHint": "此籤碼將聯題端以構貼札獨契。",
|
||||||
"stickerSlug": "Slug",
|
"dataEmpty": "此間尚虛。",
|
||||||
"stickerSlugHint": "The slug will be combined with the prefix to form the sticker's unique identifier.",
|
"pickFile": "擇一卷宗",
|
||||||
"dataEmpty": "Nothing's here yet.",
|
"uploading": "上呈中",
|
||||||
"pickFile": "Pick a file",
|
"uploadingProgress": "正呈 {} 於 {}",
|
||||||
"uploading": "Uploading",
|
"uploadAll": "全盤呈上",
|
||||||
"uploadingProgress": "Uploading {} of {}",
|
"stickerCopyPlaceholder": "摹寫虛位",
|
||||||
"uploadAll": "Upload All",
|
"realmSelection": "擇一界域",
|
||||||
"stickerCopyPlaceholder": "Copy Placeholder",
|
"individual": "獨詣",
|
||||||
"realmSelection": "Select a Realm",
|
"firstPostBadgeName": "處女作",
|
||||||
"individual": "Individual",
|
"firstPostBadgeDescription": "始發帖於 Solar Network",
|
||||||
"firstPostBadgeName": "First Post",
|
"popularPostBadgeName": "熱帖",
|
||||||
"firstPostBadgeDescription": "Created your first post on Solar Network",
|
"popularPostBadgeDescription": "君作得眾譽",
|
||||||
"popularPostBadgeName": "Popular Post",
|
"viralPostBadgeName": "洛陽紙",
|
||||||
"popularPostBadgeDescription": "Your post received significant engagement from the community",
|
"viralPostBadgeDescription": "君文傳抄殆遍",
|
||||||
"viralPostBadgeName": "Viral Post",
|
"helpfulCommentBadgeName": "裨益論",
|
||||||
"viralPostBadgeDescription": "Your post went viral and reached a wide audience",
|
"helpfulCommentBadgeDescription": "諸君以為斯論足以啟迪來者",
|
||||||
"helpfulCommentBadgeName": "Helpful Comment",
|
"newcomerBadgeName": "新客",
|
||||||
"helpfulCommentBadgeDescription": "Your comment was marked as helpful by others",
|
"newcomerBadgeDescription": "欣迎加入 Solar Network!請開始遊覽結緣",
|
||||||
"newcomerBadgeName": "Newcomer",
|
"contributorBadgeName": "資士",
|
||||||
"newcomerBadgeDescription": "Welcome to Solar Network! Start exploring and connecting",
|
"contributorBadgeDescription": "勤力貢獻於 Solar Network 社群",
|
||||||
"contributorBadgeName": "Contributor",
|
"expertBadgeName": "達人",
|
||||||
"contributorBadgeDescription": "Actively contributing to the Solar Network community",
|
"expertBadgeDescription": "以專精與厚獻見稱於世",
|
||||||
"expertBadgeName": "Expert",
|
"founderBadgeName": "肇基",
|
||||||
"expertBadgeDescription": "Recognized for your expertise and valuable contributions",
|
"founderBadgeDescription": "屬 Solar Network 草創先驅",
|
||||||
"founderBadgeName": "Founder",
|
"betaTesterBadgeName": "預勘師",
|
||||||
"founderBadgeDescription": "One of the earliest members of Solar Network",
|
"betaTesterBadgeDescription": "嘗輔試 Solar Network 於初創之境",
|
||||||
"betaTesterBadgeName": "Beta Tester",
|
"moderatorBadgeName": "持衡官",
|
||||||
"betaTesterBadgeDescription": "Helped test and improve Solar Network during beta",
|
"moderatorBadgeDescription": "協理談筵規矩與秩序",
|
||||||
"moderatorBadgeName": "Moderator",
|
"developerBadgeName": "開物者",
|
||||||
"moderatorBadgeDescription": "Helping maintain and moderate the community",
|
"developerBadgeDescription": "獻力於 Solar Network 之功業",
|
||||||
"developerBadgeName": "Developer",
|
"translatorBadgeName": "譯介士",
|
||||||
"developerBadgeDescription": "Contributing to Solar Network's development",
|
"translatorBadgeDescription": "助譯 Solar Network 為諸邦之言",
|
||||||
"translatorBadgeName": "Translator",
|
"wallet": "荷包",
|
||||||
"translatorBadgeDescription": "Helping translate Solar Network into different languages",
|
"walletCurrencyPoints": "新太陽點",
|
||||||
"wallet": "Wallet",
|
|
||||||
"walletCurrencyPoints": "New Solar Points",
|
|
||||||
"walletCurrencyShortPoints": "NSP",
|
"walletCurrencyShortPoints": "NSP",
|
||||||
"walletCurrencyGolds": "The Solar Dollars",
|
"walletCurrencyGolds": "太陽幣",
|
||||||
"walletCurrencyShortGolds": "NSD",
|
"walletCurrencyShortGolds": "NSD",
|
||||||
"retry": "Retry",
|
"retry": "復行",
|
||||||
"creatorHubUnselectedHint": "Pick / create a publisher to get started.",
|
"creatorHubUnselectedHint": "擇/創發布者以啟程。",
|
||||||
"relationships": "Relationships",
|
"relationships": "交誼錄",
|
||||||
"addFriend": "Send a Friend Request",
|
"addFriend": "送締交書",
|
||||||
"addFriendShort": "Add as Friend",
|
"addFriendShort": "結為知交",
|
||||||
"addFriendHint": "Add a friend to your relationship list.",
|
"addFriendHint": "添友於交誼錄中。",
|
||||||
"pendingRequest": "Pending",
|
"pendingRequest": "待決",
|
||||||
"waitingRequest": "Waiting",
|
"waitingRequest": "候音",
|
||||||
"relationshipStatusFriend": "Friend",
|
"relationshipStatusFriend": "知交",
|
||||||
"relationshipStatusBlocked": "Blocked",
|
"relationshipStatusBlocked": "已阻",
|
||||||
"blockUser": "Block User",
|
"blockUser": "禁此戶",
|
||||||
"unblockUser": "Unblock User",
|
"unblockUser": "解禁",
|
||||||
"friendRequestAccepted": "Accepted friend request from {}",
|
"friendRequestAccepted": "已納 {} 締交書",
|
||||||
"friendRequestDeclined": "Declined friend request from {}",
|
"friendRequestDeclined": "已謝 {} 締交書",
|
||||||
"requestExpiredIn": "Expired in {}",
|
"requestExpiredIn": "效期 {}",
|
||||||
"friendSentRequest": "Sent Friend Requests",
|
"friendSentRequest": "已送締交書",
|
||||||
"friendSentRequestEmpty": "No sent friend requests",
|
"friendSentRequestEmpty": "未送締交書",
|
||||||
"friendSentRequestHint": {
|
"friendSentRequestHint": {
|
||||||
"one": "{} friend request sent",
|
"one": "已送{}締交書",
|
||||||
"other": "{} friend requests sent"
|
"other": "已送{}締交書"
|
||||||
},
|
},
|
||||||
"levelingProgress": "Leveling Progress",
|
"levelingProgress": "修為進境",
|
||||||
"levelingProgressExperience": "{} EXP",
|
"levelingProgressExperience": "{} 修為",
|
||||||
"levelingProgressLevel": "Level {}",
|
"levelingProgressLevel": "第 {} 重",
|
||||||
"fileUploadingProgress": "Uploading file #{}: {}%",
|
"fileUploadingProgress": "傳輸第 {} 宗卷:{}%",
|
||||||
"removeChatMember": "Remove Chat Room Member",
|
"removeChatMember": "逐出談席",
|
||||||
"removeChatMemberHint": "Are you sure to remove this member from the room?",
|
"removeChatMemberHint": "確欲逐此客出談筵乎?",
|
||||||
"removeRealmMember": "Remove Realm Member",
|
"removeRealmMember": "革出界域",
|
||||||
"removeRealmMemberHint": "Are you sure to remove this member from the realm?",
|
"removeRealmMemberHint": "確欲革此員出界域乎?",
|
||||||
"memberRole": "Member Role",
|
"memberRole": "成員權階",
|
||||||
"memberRoleHint": "Greater number has higher permission.",
|
"memberRoleHint": "數高則權重。",
|
||||||
"memberRoleEdit": "Edit role for @{}",
|
"memberRoleEdit": "修訂 @{} 之職",
|
||||||
"openLinkConfirm": "Leaving the Solar Network",
|
"openLinkConfirm": "行將離 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.",
|
"openLinkConfirmDescription": "君將辭 Solar Network 而啟 {} 之徑於瀏覽器,此徑與 Solar Network 無干,當心詐偽之害。",
|
||||||
"brokenLink": "Unable open link {}... It might be broken or missing uri parts...",
|
"brokenLink": "未能開啟 {} 之鏈……或為殘鏈佚址……",
|
||||||
"copyToClipboard": "Copy to clipboard",
|
"copyToClipboard": "抄入剪貼板",
|
||||||
"leaveChatRoom": "Leave Chat Room",
|
"leaveChatRoom": "辭離談席",
|
||||||
"leaveChatRoomHint": "Are you sure to leave this chat room?",
|
"leaveChatRoomHint": "君確要辭此談席否?",
|
||||||
"leaveRealm": "Leave Realm",
|
"leaveRealm": "辭離界域",
|
||||||
"leaveRealmHint": "Are you sure to leave this realm?",
|
"leaveRealmHint": "君確要辭此界域否?",
|
||||||
"walletNotFound": "Wallet not found",
|
"walletNotFound": "未見荷包",
|
||||||
"walletCreateHint": "You don't have a wallet yet. Create one to start using the Solar Network eWallet.",
|
"walletCreateHint": "君尚未備荷包,請創之以啟用 Solar Network 電子荷包。",
|
||||||
"walletCreate": "Create a Wallet",
|
"walletCreate": "始創一荷包",
|
||||||
"settingsServerUrl": "Server URL",
|
"settingsServerUrl": "伺服器網址",
|
||||||
"settingsApplied": "The settings has been applied.",
|
"settingsApplied": "諸設定已施畢。",
|
||||||
"notifications": "Notifications",
|
"notifications": "報聞",
|
||||||
"posts": "Posts",
|
"posts": "貼文",
|
||||||
"settingsBackgroundImage": "Background Image",
|
"settingsBackgroundImage": "底圖",
|
||||||
"settingsBackgroundImageClear": "Clear Background Image",
|
"settingsBackgroundImageClear": "清底圖",
|
||||||
"settingsBackgroundGenerateColor": "Generate color scheme from Bacground Image",
|
"settingsBackgroundGenerateColor": "取背景畫配色",
|
||||||
"messageNone": "No content to display",
|
"messageNone": "無文可示",
|
||||||
"unreadMessages": {
|
"unreadMessages": {
|
||||||
"one": "{} unread message",
|
"one": "{} 條未讀訊",
|
||||||
"other": "{} unread messages"
|
"other": "{} 條未讀訊"
|
||||||
},
|
},
|
||||||
"chatBreakNone": "None",
|
"chatBreakNone": "無",
|
||||||
"settingsRealmCompactView": "Compact Realm View",
|
"settingsRealmCompactView": "緊湊界域視圖",
|
||||||
"settingsMixedFeed": "Mixed Feed",
|
"settingsMixedFeed": "混流饋訊",
|
||||||
"settingsAutoTranslate": "Auto Translate",
|
"settingsAutoTranslate": "自轉譯",
|
||||||
"settingsHideBottomNav": "Hide Bottom Navigation",
|
"settingsHideBottomNav": "隱底航",
|
||||||
"settingsSoundEffects": "Sound Effects",
|
"settingsSoundEffects": "音效",
|
||||||
"settingsAprilFoolFeatures": "April Fool Features",
|
"settingsAprilFoolFeatures": "謔辰妙能",
|
||||||
"settingsEnterToSend": "Enter to Send",
|
"settingsEnterToSend": "叩回車鍵即送",
|
||||||
"settingsTransparentAppBar": "Transparent App Bar",
|
"settingsTransparentAppBar": "透光應用欄",
|
||||||
"settingsCustomFonts": "Custom Fonts",
|
"settingsCustomFonts": "自定字體",
|
||||||
"settingsCustomFontsHint": "Custom fonts will be used for all text in the app. Make sure it is installed on your device.",
|
"settingsCustomFontsHint": "此字體將通施於應用內文,請先確安於裝置。",
|
||||||
"settingsColorScheme": "Color Scheme",
|
"settingsColorScheme": "設置色彩方案",
|
||||||
"postTitle": "Title",
|
"postTitle": "標題",
|
||||||
"postDescription": "Description",
|
"postDescription": "状",
|
||||||
"call": "Call",
|
"call": "传信",
|
||||||
"done": "Done",
|
"done": "已成矣",
|
||||||
"loginResetPasswordSent": "Password reset link sent, please check your email inbox.",
|
"loginResetPasswordSent": "密码重置之链已送至,恳愿于汝之邮址查阅。",
|
||||||
"accountDeletion": "Delete Account",
|
"accountDeletion": "除去此账户",
|
||||||
"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.",
|
"accountDeletionHint": "汝已存心除此账户?如已一意,信将至汝邮址,随信中之言续此行。",
|
||||||
"accountDeletionSent": "Account deletion confirmation email sent, please check your email inbox.",
|
"accountDeletionSent": "除此账户之信已送至,请于汝之邮址查阅。",
|
||||||
"accountSecurityTitle": "Security",
|
"accountSecurityTitle": "Security",
|
||||||
"accountDangerZoneTitle": "Danger Zone",
|
"accountDangerZoneTitle": "Danger Zone",
|
||||||
"accountPassword": "Password",
|
"accountPassword": "密碼",
|
||||||
"accountPasswordDescription": "Change your account password",
|
"accountPasswordDescription": "變更账户密碼",
|
||||||
"accountPasswordChange": "Change Password",
|
"accountPasswordChange": "變更密碼",
|
||||||
"accountPasswordChangeSent": "Password reset link sent, please check your email inbox.",
|
"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.",
|
"accountPasswordChangeDescription": "We will send an email to your primary email address to reset your password.",
|
||||||
"accountAuthFactor": "Auth factors",
|
"accountAuthFactor": "Auth factors",
|
||||||
@@ -346,14 +344,14 @@
|
|||||||
"unauthorizedHint": "You're not signed in or session expired, please sign in again.",
|
"unauthorizedHint": "You're not signed in or session expired, please sign in again.",
|
||||||
"publisherBelongsTo": "Belongs to {}",
|
"publisherBelongsTo": "Belongs to {}",
|
||||||
"postContent": "Content",
|
"postContent": "Content",
|
||||||
"postSettings": "Settings",
|
"postSettings": "設定",
|
||||||
"postPublisherUnselected": "Publisher Unspecified",
|
"postPublisherUnselected": "发信者未定",
|
||||||
"postVisibilityPublic": "Public",
|
"postVisibilityPublic": "众以见",
|
||||||
"postVisibilityFriends": "Friends Only",
|
"postVisibilityFriends": "唯友以见",
|
||||||
"postVisibilityUnlisted": "Unlisted",
|
"postVisibilityUnlisted": "非指之人以见",
|
||||||
"postVisibilityPrivate": "Private",
|
"postVisibilityPrivate": "唯己可见",
|
||||||
"postTruncated": "Content truncated, tap to view full post",
|
"postTruncated": "Content truncated, tap to view full post",
|
||||||
"copyMessage": "Copy Message",
|
"copyMessage": "抄文",
|
||||||
"authFactor": "Authentication Factor",
|
"authFactor": "Authentication Factor",
|
||||||
"authFactorDelete": "Delete the Factor",
|
"authFactorDelete": "Delete the Factor",
|
||||||
"authFactorDeleteHint": "Are you sure you want to delete this authentication factor? This action cannot be undone.",
|
"authFactorDeleteHint": "Are you sure you want to delete this authentication factor? This action cannot be undone.",
|
||||||
@@ -366,8 +364,8 @@
|
|||||||
"authFactorSecretHint": "Create an secret for this factor.",
|
"authFactorSecretHint": "Create an secret for this factor.",
|
||||||
"authFactorQrCodeScan": "Scan this QR code with your authenticator app to set up TOTP authentication",
|
"authFactorQrCodeScan": "Scan this QR code with your authenticator app to set up TOTP authentication",
|
||||||
"authFactorNoQrCode": "No QR code available for this authentication factor",
|
"authFactorNoQrCode": "No QR code available for this authentication factor",
|
||||||
"cancel": "Cancel",
|
"cancel": "止",
|
||||||
"confirm": "Confirm",
|
"confirm": "认",
|
||||||
"authFactorAdditional": "One more step",
|
"authFactorAdditional": "One more step",
|
||||||
"authFactorHint": "Contact method hint",
|
"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",
|
"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 +385,12 @@
|
|||||||
"authDeviceSwipeEditHint": "Swipe left to edit label",
|
"authDeviceSwipeEditHint": "Swipe left to edit label",
|
||||||
"authDeviceSwipeLogoutHint": "Swipe right to logout device",
|
"authDeviceSwipeLogoutHint": "Swipe right to logout device",
|
||||||
"typingHint": {
|
"typingHint": {
|
||||||
"one": "{} is typing...",
|
"one": "{} 正在执笔……",
|
||||||
"other": "{} are typing..."
|
"other": "{} 正在执笔……"
|
||||||
},
|
},
|
||||||
"settingsAppearance": "Appearance",
|
"settingsAppearance": "Appearance",
|
||||||
"settingsServer": "Server",
|
"settingsServer": "伺服器",
|
||||||
"settingsBehavior": "Behavior",
|
"settingsBehavior": "为",
|
||||||
"settingsDesktop": "Desktop",
|
"settingsDesktop": "Desktop",
|
||||||
"settingsKeyboardShortcuts": "Keyboard Shortcuts",
|
"settingsKeyboardShortcuts": "Keyboard Shortcuts",
|
||||||
"settingsEnterToSendDesktopHint": "Press Enter to send messages, use Shift+Enter for new line.",
|
"settingsEnterToSendDesktopHint": "Press Enter to send messages, use Shift+Enter for new line.",
|
||||||
@@ -752,21 +750,6 @@
|
|||||||
"rename": "Rename",
|
"rename": "Rename",
|
||||||
"markAsSensitive": "Mark as Sensitive",
|
"markAsSensitive": "Mark as Sensitive",
|
||||||
"fileName": "File name",
|
"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",
|
"poll": "Poll",
|
||||||
"pollsRecent": "Recent Polls",
|
"pollsRecent": "Recent Polls",
|
||||||
"pollCreateNew": "Create New",
|
"pollCreateNew": "Create New",
|
||||||
@@ -1075,5 +1058,421 @@
|
|||||||
"deleteRecycledFiles": "Delete Recycled Files",
|
"deleteRecycledFiles": "Delete Recycled Files",
|
||||||
"recycledFilesDeleted": "Recycled files deleted successfully",
|
"recycledFilesDeleted": "Recycled files deleted successfully",
|
||||||
"failedToDeleteRecycledFiles": "Failed to delete recycled files",
|
"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"
|
||||||
}
|
}
|
||||||
@@ -164,8 +164,6 @@
|
|||||||
"checkInResultLevel3": "好運",
|
"checkInResultLevel3": "好運",
|
||||||
"checkInResultLevel4": "最佳運氣",
|
"checkInResultLevel4": "最佳運氣",
|
||||||
"checkInActivityTitle": "{} 在 {} 簽到並獲得了 {}",
|
"checkInActivityTitle": "{} 在 {} 簽到並獲得了 {}",
|
||||||
"eventCalander": "活動日曆",
|
|
||||||
"eventCalanderEmpty": "該日無活動。",
|
|
||||||
"fortuneGraph": "時運趨勢",
|
"fortuneGraph": "時運趨勢",
|
||||||
"noFortuneData": "本月沒有時運數據。",
|
"noFortuneData": "本月沒有時運數據。",
|
||||||
"creatorHub": "創作者中心",
|
"creatorHub": "創作者中心",
|
||||||
@@ -752,21 +750,6 @@
|
|||||||
"rename": "重命名",
|
"rename": "重命名",
|
||||||
"markAsSensitive": "標記為敏感",
|
"markAsSensitive": "標記為敏感",
|
||||||
"fileName": "文件名",
|
"fileName": "文件名",
|
||||||
"sensitiveCategories": {
|
|
||||||
"language": "語言",
|
|
||||||
"sexualContent": "色情內容",
|
|
||||||
"violence": "暴力",
|
|
||||||
"profanity": "褻瀆",
|
|
||||||
"hateSpeech": "仇恨言論",
|
|
||||||
"racism": "種族主義",
|
|
||||||
"adultContent": "成人內容",
|
|
||||||
"drugAbuse": "藥物濫用",
|
|
||||||
"alcoholAbuse": "酗酒",
|
|
||||||
"gambling": "賭博",
|
|
||||||
"selfHarm": "自殘",
|
|
||||||
"childAbuse": "虐待兒童",
|
|
||||||
"other": "其他"
|
|
||||||
},
|
|
||||||
"poll": "投票",
|
"poll": "投票",
|
||||||
"pollsRecent": "最近投票",
|
"pollsRecent": "最近投票",
|
||||||
"pollCreateNew": "創建新投票",
|
"pollCreateNew": "創建新投票",
|
||||||
@@ -1076,6 +1059,420 @@
|
|||||||
"recycledFilesDeleted": "已回收檔案刪除成功",
|
"recycledFilesDeleted": "已回收檔案刪除成功",
|
||||||
"failedToDeleteRecycledFiles": "已回收檔案刪除失敗",
|
"failedToDeleteRecycledFiles": "已回收檔案刪除失敗",
|
||||||
"upload": "上傳",
|
"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": "撰寫帖子",
|
"postCompose": "撰寫帖子",
|
||||||
"postPublish": "發佈帖子"
|
"postPublish": "發佈帖子",
|
||||||
|
"restoreDraftTitle": "還原草稿",
|
||||||
|
"restoreDraftMessage": "發現了一個草稿。你想要恢復它嗎?",
|
||||||
|
"draft": "草稿",
|
||||||
|
"purchaseGift": "充值有禮",
|
||||||
|
"selectRecipient": "選擇收件者",
|
||||||
|
"changeRecipient": "修改款件人",
|
||||||
|
"addMessage": "添加消息",
|
||||||
|
"skipRecipient": "跳過款件人",
|
||||||
|
"giftSubscriptions": "贈送訂閱",
|
||||||
|
"purchaseAGift": "充值有禮",
|
||||||
|
"redeemAGift": "兌換禮物",
|
||||||
|
"giftHistory": "禮物記錄",
|
||||||
|
"sentGifts": "發送禮物",
|
||||||
|
"receivedGifts": "接收禮物",
|
||||||
|
"noSentGifts": "沒有送過禮物",
|
||||||
|
"noReceivedGifts": "没有收到过礼物",
|
||||||
|
"stellarGift": "恆星禮物",
|
||||||
|
"novaGift": "新星禮物",
|
||||||
|
"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"
|
||||||
}
|
}
|
||||||
@@ -231,7 +231,7 @@ PODS:
|
|||||||
- libwebp/sharpyuv (1.5.0)
|
- libwebp/sharpyuv (1.5.0)
|
||||||
- libwebp/webp (1.5.0):
|
- libwebp/webp (1.5.0):
|
||||||
- libwebp/sharpyuv
|
- libwebp/sharpyuv
|
||||||
- livekit_client (2.5.3):
|
- livekit_client (2.5.4):
|
||||||
- Flutter
|
- Flutter
|
||||||
- flutter_webrtc
|
- flutter_webrtc
|
||||||
- WebRTC-SDK (= 137.7151.04)
|
- WebRTC-SDK (= 137.7151.04)
|
||||||
@@ -249,13 +249,14 @@ PODS:
|
|||||||
- nanopb/encode (3.30910.0)
|
- nanopb/encode (3.30910.0)
|
||||||
- native_exif (0.0.1):
|
- native_exif (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- objective_c (0.0.1):
|
|
||||||
- Flutter
|
|
||||||
- OrderedSet (6.0.3)
|
- OrderedSet (6.0.3)
|
||||||
- package_info_plus (0.4.5):
|
- package_info_plus (0.4.5):
|
||||||
- Flutter
|
- Flutter
|
||||||
- pasteboard (0.0.1):
|
- pasteboard (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
|
- path_provider_foundation (0.0.1):
|
||||||
|
- Flutter
|
||||||
|
- FlutterMacOS
|
||||||
- pointer_interceptor_ios (0.0.1):
|
- pointer_interceptor_ios (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- PromisesObjC (2.4.0)
|
- PromisesObjC (2.4.0)
|
||||||
@@ -267,9 +268,9 @@ PODS:
|
|||||||
- Flutter
|
- Flutter
|
||||||
- record_ios (1.1.0):
|
- record_ios (1.1.0):
|
||||||
- Flutter
|
- Flutter
|
||||||
- SDWebImage (5.21.3):
|
- SDWebImage (5.21.5):
|
||||||
- SDWebImage/Core (= 5.21.3)
|
- SDWebImage/Core (= 5.21.5)
|
||||||
- SDWebImage/Core (5.21.3)
|
- SDWebImage/Core (5.21.5)
|
||||||
- share_plus (0.0.1):
|
- share_plus (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- shared_preferences_foundation (0.0.1):
|
- shared_preferences_foundation (0.0.1):
|
||||||
@@ -280,25 +281,25 @@ PODS:
|
|||||||
- sqflite_darwin (0.0.4):
|
- sqflite_darwin (0.0.4):
|
||||||
- Flutter
|
- Flutter
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- sqlite3 (3.50.4):
|
- sqlite3 (3.51.1):
|
||||||
- sqlite3/common (= 3.50.4)
|
- sqlite3/common (= 3.51.1)
|
||||||
- sqlite3/common (3.50.4)
|
- sqlite3/common (3.51.1)
|
||||||
- sqlite3/dbstatvtab (3.50.4):
|
- sqlite3/dbstatvtab (3.51.1):
|
||||||
- sqlite3/common
|
- sqlite3/common
|
||||||
- sqlite3/fts5 (3.50.4):
|
- sqlite3/fts5 (3.51.1):
|
||||||
- sqlite3/common
|
- sqlite3/common
|
||||||
- sqlite3/math (3.50.4):
|
- sqlite3/math (3.51.1):
|
||||||
- sqlite3/common
|
- sqlite3/common
|
||||||
- sqlite3/perf-threadsafe (3.50.4):
|
- sqlite3/perf-threadsafe (3.51.1):
|
||||||
- sqlite3/common
|
- sqlite3/common
|
||||||
- sqlite3/rtree (3.50.4):
|
- sqlite3/rtree (3.51.1):
|
||||||
- sqlite3/common
|
- sqlite3/common
|
||||||
- sqlite3/session (3.50.4):
|
- sqlite3/session (3.51.1):
|
||||||
- sqlite3/common
|
- sqlite3/common
|
||||||
- sqlite3_flutter_libs (0.0.1):
|
- sqlite3_flutter_libs (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- sqlite3 (~> 3.50.4)
|
- sqlite3 (~> 3.51.1)
|
||||||
- sqlite3/dbstatvtab
|
- sqlite3/dbstatvtab
|
||||||
- sqlite3/fts5
|
- sqlite3/fts5
|
||||||
- sqlite3/math
|
- sqlite3/math
|
||||||
@@ -347,9 +348,9 @@ DEPENDENCIES:
|
|||||||
- media_kit_libs_ios_video (from `.symlinks/plugins/media_kit_libs_ios_video/ios`)
|
- media_kit_libs_ios_video (from `.symlinks/plugins/media_kit_libs_ios_video/ios`)
|
||||||
- media_kit_video (from `.symlinks/plugins/media_kit_video/ios`)
|
- media_kit_video (from `.symlinks/plugins/media_kit_video/ios`)
|
||||||
- native_exif (from `.symlinks/plugins/native_exif/ios`)
|
- native_exif (from `.symlinks/plugins/native_exif/ios`)
|
||||||
- objective_c (from `.symlinks/plugins/objective_c/ios`)
|
|
||||||
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
|
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
|
||||||
- pasteboard (from `.symlinks/plugins/pasteboard/ios`)
|
- pasteboard (from `.symlinks/plugins/pasteboard/ios`)
|
||||||
|
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
|
||||||
- pointer_interceptor_ios (from `.symlinks/plugins/pointer_interceptor_ios/ios`)
|
- pointer_interceptor_ios (from `.symlinks/plugins/pointer_interceptor_ios/ios`)
|
||||||
- protocol_handler_ios (from `.symlinks/plugins/protocol_handler_ios/ios`)
|
- protocol_handler_ios (from `.symlinks/plugins/protocol_handler_ios/ios`)
|
||||||
- receive_sharing_intent (from `.symlinks/plugins/receive_sharing_intent/ios`)
|
- receive_sharing_intent (from `.symlinks/plugins/receive_sharing_intent/ios`)
|
||||||
@@ -451,12 +452,12 @@ EXTERNAL SOURCES:
|
|||||||
:path: ".symlinks/plugins/media_kit_video/ios"
|
:path: ".symlinks/plugins/media_kit_video/ios"
|
||||||
native_exif:
|
native_exif:
|
||||||
:path: ".symlinks/plugins/native_exif/ios"
|
:path: ".symlinks/plugins/native_exif/ios"
|
||||||
objective_c:
|
|
||||||
:path: ".symlinks/plugins/objective_c/ios"
|
|
||||||
package_info_plus:
|
package_info_plus:
|
||||||
:path: ".symlinks/plugins/package_info_plus/ios"
|
:path: ".symlinks/plugins/package_info_plus/ios"
|
||||||
pasteboard:
|
pasteboard:
|
||||||
:path: ".symlinks/plugins/pasteboard/ios"
|
:path: ".symlinks/plugins/pasteboard/ios"
|
||||||
|
path_provider_foundation:
|
||||||
|
:path: ".symlinks/plugins/path_provider_foundation/darwin"
|
||||||
pointer_interceptor_ios:
|
pointer_interceptor_ios:
|
||||||
:path: ".symlinks/plugins/pointer_interceptor_ios/ios"
|
:path: ".symlinks/plugins/pointer_interceptor_ios/ios"
|
||||||
protocol_handler_ios:
|
protocol_handler_ios:
|
||||||
@@ -528,29 +529,29 @@ SPEC CHECKSUMS:
|
|||||||
Kingfisher: 23d18f54677d973b713e54ce6a8f5eef6e7056ba
|
Kingfisher: 23d18f54677d973b713e54ce6a8f5eef6e7056ba
|
||||||
KingfisherWebP: 38b9721821947f547afb78f933f75f4f9e0ae402
|
KingfisherWebP: 38b9721821947f547afb78f933f75f4f9e0ae402
|
||||||
libwebp: 02b23773aedb6ff1fd38cec7a77b81414c6842a8
|
libwebp: 02b23773aedb6ff1fd38cec7a77b81414c6842a8
|
||||||
livekit_client: 86c8af579274e4b7a215185a8080db2d4e176f40
|
livekit_client: 53ca658779b78710fb458cccee28b53a13356c15
|
||||||
local_auth_darwin: c3ee6cce0a8d56be34c8ccb66ba31f7f180aaebb
|
local_auth_darwin: c3ee6cce0a8d56be34c8ccb66ba31f7f180aaebb
|
||||||
media_kit_libs_ios_video: 5a18affdb97d1f5d466dc79988b13eff6c5e2854
|
media_kit_libs_ios_video: 5a18affdb97d1f5d466dc79988b13eff6c5e2854
|
||||||
media_kit_video: 1746e198cb697d1ffb734b1d05ec429d1fcd1474
|
media_kit_video: 1746e198cb697d1ffb734b1d05ec429d1fcd1474
|
||||||
nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
|
nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
|
||||||
native_exif: 0eb73d3d5b3ca892719228df8d2d1b13d1ae396c
|
native_exif: 0eb73d3d5b3ca892719228df8d2d1b13d1ae396c
|
||||||
objective_c: 89e720c30d716b036faf9c9684022048eee1eee2
|
|
||||||
OrderedSet: e539b66b644ff081c73a262d24ad552a69be3a94
|
OrderedSet: e539b66b644ff081c73a262d24ad552a69be3a94
|
||||||
package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499
|
package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499
|
||||||
pasteboard: 49088aeb6119d51f976a421db60d8e1ab079b63c
|
pasteboard: 49088aeb6119d51f976a421db60d8e1ab079b63c
|
||||||
|
path_provider_foundation: bb55f6dbba17d0dccd6737fe6f7f34fbd0376880
|
||||||
pointer_interceptor_ios: da06a662d5bfd329602b45b2ab41bc0fb5fdb0f0
|
pointer_interceptor_ios: da06a662d5bfd329602b45b2ab41bc0fb5fdb0f0
|
||||||
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
|
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
|
||||||
PromisesSwift: 9d77319bbe72ebf6d872900551f7eeba9bce2851
|
PromisesSwift: 9d77319bbe72ebf6d872900551f7eeba9bce2851
|
||||||
protocol_handler_ios: 59f23ee71f3ec602d67902ca7f669a80957888d5
|
protocol_handler_ios: 59f23ee71f3ec602d67902ca7f669a80957888d5
|
||||||
receive_sharing_intent: 222384f00ffe7e952bbfabaa9e3967cb87e5fe00
|
receive_sharing_intent: 222384f00ffe7e952bbfabaa9e3967cb87e5fe00
|
||||||
record_ios: f75fa1d57f840012775c0e93a38a7f3ceea1a374
|
record_ios: f75fa1d57f840012775c0e93a38a7f3ceea1a374
|
||||||
SDWebImage: 16309af6d214ba3f77a7c6f6fdda888cb313a50a
|
SDWebImage: e9c98383c7572d713c1a0d7dd2783b10599b9838
|
||||||
share_plus: 50da8cb520a8f0f65671c6c6a99b3617ed10a58a
|
share_plus: 50da8cb520a8f0f65671c6c6a99b3617ed10a58a
|
||||||
shared_preferences_foundation: 7036424c3d8ec98dfe75ff1667cb0cd531ec82bb
|
shared_preferences_foundation: 7036424c3d8ec98dfe75ff1667cb0cd531ec82bb
|
||||||
sign_in_with_apple: c5dcc141574c8c54d5ac99dd2163c0c72ad22418
|
sign_in_with_apple: c5dcc141574c8c54d5ac99dd2163c0c72ad22418
|
||||||
sqflite_darwin: 20b2a3a3b70e43edae938624ce550a3cbf66a3d0
|
sqflite_darwin: 20b2a3a3b70e43edae938624ce550a3cbf66a3d0
|
||||||
sqlite3: 73513155ec6979715d3904ef53a8d68892d4032b
|
sqlite3: 8d708bc63e9f4ce48f0ad9d6269e478c5ced1d9b
|
||||||
sqlite3_flutter_libs: 83f8e9f5b6554077f1d93119fe20ebaa5f3a9ef1
|
sqlite3_flutter_libs: d13b8b3003f18f596e542bcb9482d105577eff41
|
||||||
super_native_extensions: b763c02dc3a8fd078389f410bf15149179020cb4
|
super_native_extensions: b763c02dc3a8fd078389f410bf15149179020cb4
|
||||||
SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4
|
SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4
|
||||||
syncfusion_flutter_pdfviewer: 90dc48305d2e33d4aa20681d1e98ddeda891bc14
|
syncfusion_flutter_pdfviewer: 90dc48305d2e33d4aa20681d1e98ddeda891bc14
|
||||||
|
|||||||
@@ -140,21 +140,29 @@ class NotificationService: UNNotificationServiceExtension {
|
|||||||
|
|
||||||
guard !attachmentUrls.isEmpty else {
|
guard !attachmentUrls.isEmpty else {
|
||||||
print("Invalid URLs for attachments: \(attachmentUrls)")
|
print("Invalid URLs for attachments: \(attachmentUrls)")
|
||||||
|
self.contentHandler?(content)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
let targetSize = 512
|
let targetSize = 512
|
||||||
let scaleProcessor = ResizingImageProcessor(referenceSize: CGSize(width: targetSize, height: targetSize), mode: .aspectFit)
|
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 {
|
for attachmentUrl in attachmentUrls {
|
||||||
guard let remoteUrl = URL(string: attachmentUrl) else {
|
guard let remoteUrl = URL(string: attachmentUrl) else {
|
||||||
print("Invalid URL for attachment: \(attachmentUrl)")
|
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 ? [
|
KingfisherManager.shared.retrieveImage(with: remoteUrl, options: scaleDown ? [
|
||||||
.processor(scaleProcessor)
|
.processor(scaleProcessor)
|
||||||
] : nil) { [weak self] result in
|
] : nil) { [weak self] result in
|
||||||
|
defer { dispatchGroup.leave() }
|
||||||
guard let self = self else { return }
|
guard let self = self else { return }
|
||||||
|
|
||||||
switch result {
|
switch result {
|
||||||
@@ -166,48 +174,33 @@ class NotificationService: UNNotificationServiceExtension {
|
|||||||
do {
|
do {
|
||||||
// Write the image data to a temporary file for UNNotificationAttachment
|
// Write the image data to a temporary file for UNNotificationAttachment
|
||||||
try retrievalResult.image.pngData()?.write(to: cachedFileUrl)
|
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 {
|
} catch {
|
||||||
print("Failed to write media to temporary file: \(error.localizedDescription)")
|
print("Failed to write media to temporary file: \(error.localizedDescription)")
|
||||||
self.contentHandler?(content)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case .failure(let error):
|
case .failure(let error):
|
||||||
print("Failed to retrieve image: \(error.localizedDescription)")
|
print("Failed to retrieve image: \(error.localizedDescription)")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dispatchGroup.notify(queue: .main) { [weak self] in
|
||||||
|
guard let self = self else { return }
|
||||||
|
content.attachments = attachments
|
||||||
self.contentHandler?(content)
|
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)
|
|
||||||
}
|
|
||||||
|
|
||||||
private func createMessageIntent(with sender: INPerson, meta: [AnyHashable: Any], body: String) -> INSendMessageIntent {
|
private func createMessageIntent(with sender: INPerson, meta: [AnyHashable: Any], body: String) -> INSendMessageIntent {
|
||||||
INSendMessageIntent(
|
INSendMessageIntent(
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ class AppDatabase extends _$AppDatabase {
|
|||||||
AppDatabase(super.e);
|
AppDatabase(super.e);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get schemaVersion => 8;
|
int get schemaVersion => 9;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
MigrationStrategy get migration => MigrationStrategy(
|
MigrationStrategy get migration => MigrationStrategy(
|
||||||
@@ -62,6 +62,15 @@ class AppDatabase extends _$AppDatabase {
|
|||||||
await m.createTable(chatRooms);
|
await m.createTable(chatRooms);
|
||||||
await m.createTable(chatMembers);
|
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',
|
||||||
|
);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -237,14 +246,11 @@ class AppDatabase extends _$AppDatabase {
|
|||||||
accountId: senderRow.accountId,
|
accountId: senderRow.accountId,
|
||||||
account: senderAccount,
|
account: senderAccount,
|
||||||
nick: senderRow.nick,
|
nick: senderRow.nick,
|
||||||
role: senderRow.role,
|
|
||||||
notify: senderRow.notify,
|
notify: senderRow.notify,
|
||||||
joinedAt: senderRow.joinedAt,
|
joinedAt: senderRow.joinedAt,
|
||||||
breakUntil: senderRow.breakUntil,
|
breakUntil: senderRow.breakUntil,
|
||||||
timeoutUntil: senderRow.timeoutUntil,
|
timeoutUntil: senderRow.timeoutUntil,
|
||||||
isBot: senderRow.isBot,
|
|
||||||
status: null,
|
status: null,
|
||||||
lastTyped: senderRow.lastTyped,
|
|
||||||
createdAt: senderRow.createdAt,
|
createdAt: senderRow.createdAt,
|
||||||
updatedAt: senderRow.updatedAt,
|
updatedAt: senderRow.updatedAt,
|
||||||
deletedAt: senderRow.deletedAt,
|
deletedAt: senderRow.deletedAt,
|
||||||
@@ -260,6 +266,7 @@ class AppDatabase extends _$AppDatabase {
|
|||||||
id: 'unknown',
|
id: 'unknown',
|
||||||
name: 'unknown',
|
name: 'unknown',
|
||||||
nick: dbMessage.senderId, // Show the ID instead of Unknown
|
nick: dbMessage.senderId, // Show the ID instead of Unknown
|
||||||
|
activatedAt: null,
|
||||||
profile: SnAccountProfile(
|
profile: SnAccountProfile(
|
||||||
picture: null,
|
picture: null,
|
||||||
id: 'unknown',
|
id: 'unknown',
|
||||||
@@ -281,12 +288,10 @@ class AppDatabase extends _$AppDatabase {
|
|||||||
updatedAt: DateTime.now(),
|
updatedAt: DateTime.now(),
|
||||||
),
|
),
|
||||||
nick: dbMessage.senderId, // Show the senderId as fallback
|
nick: dbMessage.senderId, // Show the senderId as fallback
|
||||||
role: 0,
|
|
||||||
notify: 0,
|
notify: 0,
|
||||||
joinedAt: null,
|
joinedAt: null,
|
||||||
breakUntil: null,
|
breakUntil: null,
|
||||||
timeoutUntil: null,
|
timeoutUntil: null,
|
||||||
isBot: false,
|
|
||||||
status: null,
|
status: null,
|
||||||
lastTyped: null,
|
lastTyped: null,
|
||||||
createdAt: DateTime.now(),
|
createdAt: DateTime.now(),
|
||||||
@@ -343,24 +348,22 @@ class AppDatabase extends _$AppDatabase {
|
|||||||
accountId: Value(member.accountId),
|
accountId: Value(member.accountId),
|
||||||
account: Value(member.account.toJson()),
|
account: Value(member.account.toJson()),
|
||||||
nick: Value(member.nick),
|
nick: Value(member.nick),
|
||||||
role: Value(member.role),
|
|
||||||
notify: Value(member.notify),
|
notify: Value(member.notify),
|
||||||
joinedAt: Value(member.joinedAt),
|
joinedAt: Value(member.joinedAt),
|
||||||
breakUntil: Value(member.breakUntil),
|
breakUntil: Value(member.breakUntil),
|
||||||
timeoutUntil: Value(member.timeoutUntil),
|
timeoutUntil: Value(member.timeoutUntil),
|
||||||
isBot: Value(member.isBot),
|
|
||||||
status: Value(
|
|
||||||
member.status == null ? null : jsonEncode(member.status!.toJson()),
|
|
||||||
),
|
|
||||||
lastTyped: Value(member.lastTyped),
|
|
||||||
createdAt: Value(member.createdAt),
|
createdAt: Value(member.createdAt),
|
||||||
updatedAt: Value(member.updatedAt),
|
updatedAt: Value(member.updatedAt),
|
||||||
deletedAt: Value(member.deletedAt),
|
deletedAt: Value(member.deletedAt),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> saveChatRooms(List<SnChatRoom> rooms) async {
|
Future<void> saveChatRooms(
|
||||||
|
List<SnChatRoom> rooms, {
|
||||||
|
bool override = false,
|
||||||
|
}) async {
|
||||||
await transaction(() async {
|
await transaction(() async {
|
||||||
|
if (override) {
|
||||||
// 1. Identify rooms to remove
|
// 1. Identify rooms to remove
|
||||||
final remoteRoomIds = rooms.map((r) => r.id).toSet();
|
final remoteRoomIds = rooms.map((r) => r.id).toSet();
|
||||||
final currentRooms = await select(chatRooms).get();
|
final currentRooms = await select(chatRooms).get();
|
||||||
@@ -370,13 +373,15 @@ class AppDatabase extends _$AppDatabase {
|
|||||||
if (idsToRemove.isNotEmpty) {
|
if (idsToRemove.isNotEmpty) {
|
||||||
final idsList = idsToRemove.toList();
|
final idsList = idsToRemove.toList();
|
||||||
// Remove messages
|
// Remove messages
|
||||||
await (delete(chatMessages)..where((t) => t.roomId.isIn(idsList))).go();
|
await (delete(chatMessages)
|
||||||
|
..where((t) => t.roomId.isIn(idsList))).go();
|
||||||
// Remove members
|
// Remove members
|
||||||
await (delete(chatMembers)
|
await (delete(chatMembers)
|
||||||
..where((t) => t.chatRoomId.isIn(idsList))).go();
|
..where((t) => t.chatRoomId.isIn(idsList))).go();
|
||||||
// Remove rooms
|
// Remove rooms
|
||||||
await (delete(chatRooms)..where((t) => t.id.isIn(idsList))).go();
|
await (delete(chatRooms)..where((t) => t.id.isIn(idsList))).go();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 2. Upsert remote rooms
|
// 2. Upsert remote rooms
|
||||||
await batch((batch) {
|
await batch((batch) {
|
||||||
|
|||||||
@@ -106,6 +106,17 @@ class $ChatRoomsTable extends ChatRooms
|
|||||||
type: DriftSqlType.string,
|
type: DriftSqlType.string,
|
||||||
requiredDuringInsert: false,
|
requiredDuringInsert: false,
|
||||||
);
|
);
|
||||||
|
static const VerificationMeta _accountIdMeta = const VerificationMeta(
|
||||||
|
'accountId',
|
||||||
|
);
|
||||||
|
@override
|
||||||
|
late final GeneratedColumn<String> accountId = GeneratedColumn<String>(
|
||||||
|
'account_id',
|
||||||
|
aliasedName,
|
||||||
|
true,
|
||||||
|
type: DriftSqlType.string,
|
||||||
|
requiredDuringInsert: false,
|
||||||
|
);
|
||||||
static const VerificationMeta _createdAtMeta = const VerificationMeta(
|
static const VerificationMeta _createdAtMeta = const VerificationMeta(
|
||||||
'createdAt',
|
'createdAt',
|
||||||
);
|
);
|
||||||
@@ -150,6 +161,7 @@ class $ChatRoomsTable extends ChatRooms
|
|||||||
picture,
|
picture,
|
||||||
background,
|
background,
|
||||||
realmId,
|
realmId,
|
||||||
|
accountId,
|
||||||
createdAt,
|
createdAt,
|
||||||
updatedAt,
|
updatedAt,
|
||||||
deletedAt,
|
deletedAt,
|
||||||
@@ -215,6 +227,12 @@ class $ChatRoomsTable extends ChatRooms
|
|||||||
realmId.isAcceptableOrUnknown(data['realm_id']!, _realmIdMeta),
|
realmId.isAcceptableOrUnknown(data['realm_id']!, _realmIdMeta),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if (data.containsKey('account_id')) {
|
||||||
|
context.handle(
|
||||||
|
_accountIdMeta,
|
||||||
|
accountId.isAcceptableOrUnknown(data['account_id']!, _accountIdMeta),
|
||||||
|
);
|
||||||
|
}
|
||||||
if (data.containsKey('created_at')) {
|
if (data.containsKey('created_at')) {
|
||||||
context.handle(
|
context.handle(
|
||||||
_createdAtMeta,
|
_createdAtMeta,
|
||||||
@@ -288,6 +306,10 @@ class $ChatRoomsTable extends ChatRooms
|
|||||||
DriftSqlType.string,
|
DriftSqlType.string,
|
||||||
data['${effectivePrefix}realm_id'],
|
data['${effectivePrefix}realm_id'],
|
||||||
),
|
),
|
||||||
|
accountId: attachedDatabase.typeMapping.read(
|
||||||
|
DriftSqlType.string,
|
||||||
|
data['${effectivePrefix}account_id'],
|
||||||
|
),
|
||||||
createdAt:
|
createdAt:
|
||||||
attachedDatabase.typeMapping.read(
|
attachedDatabase.typeMapping.read(
|
||||||
DriftSqlType.dateTime,
|
DriftSqlType.dateTime,
|
||||||
@@ -330,6 +352,7 @@ class ChatRoom extends DataClass implements Insertable<ChatRoom> {
|
|||||||
final Map<String, dynamic>? picture;
|
final Map<String, dynamic>? picture;
|
||||||
final Map<String, dynamic>? background;
|
final Map<String, dynamic>? background;
|
||||||
final String? realmId;
|
final String? realmId;
|
||||||
|
final String? accountId;
|
||||||
final DateTime createdAt;
|
final DateTime createdAt;
|
||||||
final DateTime updatedAt;
|
final DateTime updatedAt;
|
||||||
final DateTime? deletedAt;
|
final DateTime? deletedAt;
|
||||||
@@ -343,6 +366,7 @@ class ChatRoom extends DataClass implements Insertable<ChatRoom> {
|
|||||||
this.picture,
|
this.picture,
|
||||||
this.background,
|
this.background,
|
||||||
this.realmId,
|
this.realmId,
|
||||||
|
this.accountId,
|
||||||
required this.createdAt,
|
required this.createdAt,
|
||||||
required this.updatedAt,
|
required this.updatedAt,
|
||||||
this.deletedAt,
|
this.deletedAt,
|
||||||
@@ -377,6 +401,9 @@ class ChatRoom extends DataClass implements Insertable<ChatRoom> {
|
|||||||
if (!nullToAbsent || realmId != null) {
|
if (!nullToAbsent || realmId != null) {
|
||||||
map['realm_id'] = Variable<String>(realmId);
|
map['realm_id'] = Variable<String>(realmId);
|
||||||
}
|
}
|
||||||
|
if (!nullToAbsent || accountId != null) {
|
||||||
|
map['account_id'] = Variable<String>(accountId);
|
||||||
|
}
|
||||||
map['created_at'] = Variable<DateTime>(createdAt);
|
map['created_at'] = Variable<DateTime>(createdAt);
|
||||||
map['updated_at'] = Variable<DateTime>(updatedAt);
|
map['updated_at'] = Variable<DateTime>(updatedAt);
|
||||||
if (!nullToAbsent || deletedAt != null) {
|
if (!nullToAbsent || deletedAt != null) {
|
||||||
@@ -414,6 +441,10 @@ class ChatRoom extends DataClass implements Insertable<ChatRoom> {
|
|||||||
realmId == null && nullToAbsent
|
realmId == null && nullToAbsent
|
||||||
? const Value.absent()
|
? const Value.absent()
|
||||||
: Value(realmId),
|
: Value(realmId),
|
||||||
|
accountId:
|
||||||
|
accountId == null && nullToAbsent
|
||||||
|
? const Value.absent()
|
||||||
|
: Value(accountId),
|
||||||
createdAt: Value(createdAt),
|
createdAt: Value(createdAt),
|
||||||
updatedAt: Value(updatedAt),
|
updatedAt: Value(updatedAt),
|
||||||
deletedAt:
|
deletedAt:
|
||||||
@@ -440,6 +471,7 @@ class ChatRoom extends DataClass implements Insertable<ChatRoom> {
|
|||||||
json['background'],
|
json['background'],
|
||||||
),
|
),
|
||||||
realmId: serializer.fromJson<String?>(json['realmId']),
|
realmId: serializer.fromJson<String?>(json['realmId']),
|
||||||
|
accountId: serializer.fromJson<String?>(json['accountId']),
|
||||||
createdAt: serializer.fromJson<DateTime>(json['createdAt']),
|
createdAt: serializer.fromJson<DateTime>(json['createdAt']),
|
||||||
updatedAt: serializer.fromJson<DateTime>(json['updatedAt']),
|
updatedAt: serializer.fromJson<DateTime>(json['updatedAt']),
|
||||||
deletedAt: serializer.fromJson<DateTime?>(json['deletedAt']),
|
deletedAt: serializer.fromJson<DateTime?>(json['deletedAt']),
|
||||||
@@ -458,6 +490,7 @@ class ChatRoom extends DataClass implements Insertable<ChatRoom> {
|
|||||||
'picture': serializer.toJson<Map<String, dynamic>?>(picture),
|
'picture': serializer.toJson<Map<String, dynamic>?>(picture),
|
||||||
'background': serializer.toJson<Map<String, dynamic>?>(background),
|
'background': serializer.toJson<Map<String, dynamic>?>(background),
|
||||||
'realmId': serializer.toJson<String?>(realmId),
|
'realmId': serializer.toJson<String?>(realmId),
|
||||||
|
'accountId': serializer.toJson<String?>(accountId),
|
||||||
'createdAt': serializer.toJson<DateTime>(createdAt),
|
'createdAt': serializer.toJson<DateTime>(createdAt),
|
||||||
'updatedAt': serializer.toJson<DateTime>(updatedAt),
|
'updatedAt': serializer.toJson<DateTime>(updatedAt),
|
||||||
'deletedAt': serializer.toJson<DateTime?>(deletedAt),
|
'deletedAt': serializer.toJson<DateTime?>(deletedAt),
|
||||||
@@ -474,6 +507,7 @@ class ChatRoom extends DataClass implements Insertable<ChatRoom> {
|
|||||||
Value<Map<String, dynamic>?> picture = const Value.absent(),
|
Value<Map<String, dynamic>?> picture = const Value.absent(),
|
||||||
Value<Map<String, dynamic>?> background = const Value.absent(),
|
Value<Map<String, dynamic>?> background = const Value.absent(),
|
||||||
Value<String?> realmId = const Value.absent(),
|
Value<String?> realmId = const Value.absent(),
|
||||||
|
Value<String?> accountId = const Value.absent(),
|
||||||
DateTime? createdAt,
|
DateTime? createdAt,
|
||||||
DateTime? updatedAt,
|
DateTime? updatedAt,
|
||||||
Value<DateTime?> deletedAt = const Value.absent(),
|
Value<DateTime?> deletedAt = const Value.absent(),
|
||||||
@@ -487,6 +521,7 @@ class ChatRoom extends DataClass implements Insertable<ChatRoom> {
|
|||||||
picture: picture.present ? picture.value : this.picture,
|
picture: picture.present ? picture.value : this.picture,
|
||||||
background: background.present ? background.value : this.background,
|
background: background.present ? background.value : this.background,
|
||||||
realmId: realmId.present ? realmId.value : this.realmId,
|
realmId: realmId.present ? realmId.value : this.realmId,
|
||||||
|
accountId: accountId.present ? accountId.value : this.accountId,
|
||||||
createdAt: createdAt ?? this.createdAt,
|
createdAt: createdAt ?? this.createdAt,
|
||||||
updatedAt: updatedAt ?? this.updatedAt,
|
updatedAt: updatedAt ?? this.updatedAt,
|
||||||
deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt,
|
deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt,
|
||||||
@@ -505,6 +540,7 @@ class ChatRoom extends DataClass implements Insertable<ChatRoom> {
|
|||||||
background:
|
background:
|
||||||
data.background.present ? data.background.value : this.background,
|
data.background.present ? data.background.value : this.background,
|
||||||
realmId: data.realmId.present ? data.realmId.value : this.realmId,
|
realmId: data.realmId.present ? data.realmId.value : this.realmId,
|
||||||
|
accountId: data.accountId.present ? data.accountId.value : this.accountId,
|
||||||
createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt,
|
createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt,
|
||||||
updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt,
|
updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt,
|
||||||
deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt,
|
deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt,
|
||||||
@@ -523,6 +559,7 @@ class ChatRoom extends DataClass implements Insertable<ChatRoom> {
|
|||||||
..write('picture: $picture, ')
|
..write('picture: $picture, ')
|
||||||
..write('background: $background, ')
|
..write('background: $background, ')
|
||||||
..write('realmId: $realmId, ')
|
..write('realmId: $realmId, ')
|
||||||
|
..write('accountId: $accountId, ')
|
||||||
..write('createdAt: $createdAt, ')
|
..write('createdAt: $createdAt, ')
|
||||||
..write('updatedAt: $updatedAt, ')
|
..write('updatedAt: $updatedAt, ')
|
||||||
..write('deletedAt: $deletedAt')
|
..write('deletedAt: $deletedAt')
|
||||||
@@ -541,6 +578,7 @@ class ChatRoom extends DataClass implements Insertable<ChatRoom> {
|
|||||||
picture,
|
picture,
|
||||||
background,
|
background,
|
||||||
realmId,
|
realmId,
|
||||||
|
accountId,
|
||||||
createdAt,
|
createdAt,
|
||||||
updatedAt,
|
updatedAt,
|
||||||
deletedAt,
|
deletedAt,
|
||||||
@@ -558,6 +596,7 @@ class ChatRoom extends DataClass implements Insertable<ChatRoom> {
|
|||||||
other.picture == this.picture &&
|
other.picture == this.picture &&
|
||||||
other.background == this.background &&
|
other.background == this.background &&
|
||||||
other.realmId == this.realmId &&
|
other.realmId == this.realmId &&
|
||||||
|
other.accountId == this.accountId &&
|
||||||
other.createdAt == this.createdAt &&
|
other.createdAt == this.createdAt &&
|
||||||
other.updatedAt == this.updatedAt &&
|
other.updatedAt == this.updatedAt &&
|
||||||
other.deletedAt == this.deletedAt);
|
other.deletedAt == this.deletedAt);
|
||||||
@@ -573,6 +612,7 @@ class ChatRoomsCompanion extends UpdateCompanion<ChatRoom> {
|
|||||||
final Value<Map<String, dynamic>?> picture;
|
final Value<Map<String, dynamic>?> picture;
|
||||||
final Value<Map<String, dynamic>?> background;
|
final Value<Map<String, dynamic>?> background;
|
||||||
final Value<String?> realmId;
|
final Value<String?> realmId;
|
||||||
|
final Value<String?> accountId;
|
||||||
final Value<DateTime> createdAt;
|
final Value<DateTime> createdAt;
|
||||||
final Value<DateTime> updatedAt;
|
final Value<DateTime> updatedAt;
|
||||||
final Value<DateTime?> deletedAt;
|
final Value<DateTime?> deletedAt;
|
||||||
@@ -587,6 +627,7 @@ class ChatRoomsCompanion extends UpdateCompanion<ChatRoom> {
|
|||||||
this.picture = const Value.absent(),
|
this.picture = const Value.absent(),
|
||||||
this.background = const Value.absent(),
|
this.background = const Value.absent(),
|
||||||
this.realmId = const Value.absent(),
|
this.realmId = const Value.absent(),
|
||||||
|
this.accountId = const Value.absent(),
|
||||||
this.createdAt = const Value.absent(),
|
this.createdAt = const Value.absent(),
|
||||||
this.updatedAt = const Value.absent(),
|
this.updatedAt = const Value.absent(),
|
||||||
this.deletedAt = const Value.absent(),
|
this.deletedAt = const Value.absent(),
|
||||||
@@ -602,6 +643,7 @@ class ChatRoomsCompanion extends UpdateCompanion<ChatRoom> {
|
|||||||
this.picture = const Value.absent(),
|
this.picture = const Value.absent(),
|
||||||
this.background = const Value.absent(),
|
this.background = const Value.absent(),
|
||||||
this.realmId = const Value.absent(),
|
this.realmId = const Value.absent(),
|
||||||
|
this.accountId = const Value.absent(),
|
||||||
required DateTime createdAt,
|
required DateTime createdAt,
|
||||||
required DateTime updatedAt,
|
required DateTime updatedAt,
|
||||||
this.deletedAt = const Value.absent(),
|
this.deletedAt = const Value.absent(),
|
||||||
@@ -620,6 +662,7 @@ class ChatRoomsCompanion extends UpdateCompanion<ChatRoom> {
|
|||||||
Expression<String>? picture,
|
Expression<String>? picture,
|
||||||
Expression<String>? background,
|
Expression<String>? background,
|
||||||
Expression<String>? realmId,
|
Expression<String>? realmId,
|
||||||
|
Expression<String>? accountId,
|
||||||
Expression<DateTime>? createdAt,
|
Expression<DateTime>? createdAt,
|
||||||
Expression<DateTime>? updatedAt,
|
Expression<DateTime>? updatedAt,
|
||||||
Expression<DateTime>? deletedAt,
|
Expression<DateTime>? deletedAt,
|
||||||
@@ -635,6 +678,7 @@ class ChatRoomsCompanion extends UpdateCompanion<ChatRoom> {
|
|||||||
if (picture != null) 'picture': picture,
|
if (picture != null) 'picture': picture,
|
||||||
if (background != null) 'background': background,
|
if (background != null) 'background': background,
|
||||||
if (realmId != null) 'realm_id': realmId,
|
if (realmId != null) 'realm_id': realmId,
|
||||||
|
if (accountId != null) 'account_id': accountId,
|
||||||
if (createdAt != null) 'created_at': createdAt,
|
if (createdAt != null) 'created_at': createdAt,
|
||||||
if (updatedAt != null) 'updated_at': updatedAt,
|
if (updatedAt != null) 'updated_at': updatedAt,
|
||||||
if (deletedAt != null) 'deleted_at': deletedAt,
|
if (deletedAt != null) 'deleted_at': deletedAt,
|
||||||
@@ -652,6 +696,7 @@ class ChatRoomsCompanion extends UpdateCompanion<ChatRoom> {
|
|||||||
Value<Map<String, dynamic>?>? picture,
|
Value<Map<String, dynamic>?>? picture,
|
||||||
Value<Map<String, dynamic>?>? background,
|
Value<Map<String, dynamic>?>? background,
|
||||||
Value<String?>? realmId,
|
Value<String?>? realmId,
|
||||||
|
Value<String?>? accountId,
|
||||||
Value<DateTime>? createdAt,
|
Value<DateTime>? createdAt,
|
||||||
Value<DateTime>? updatedAt,
|
Value<DateTime>? updatedAt,
|
||||||
Value<DateTime?>? deletedAt,
|
Value<DateTime?>? deletedAt,
|
||||||
@@ -667,6 +712,7 @@ class ChatRoomsCompanion extends UpdateCompanion<ChatRoom> {
|
|||||||
picture: picture ?? this.picture,
|
picture: picture ?? this.picture,
|
||||||
background: background ?? this.background,
|
background: background ?? this.background,
|
||||||
realmId: realmId ?? this.realmId,
|
realmId: realmId ?? this.realmId,
|
||||||
|
accountId: accountId ?? this.accountId,
|
||||||
createdAt: createdAt ?? this.createdAt,
|
createdAt: createdAt ?? this.createdAt,
|
||||||
updatedAt: updatedAt ?? this.updatedAt,
|
updatedAt: updatedAt ?? this.updatedAt,
|
||||||
deletedAt: deletedAt ?? this.deletedAt,
|
deletedAt: deletedAt ?? this.deletedAt,
|
||||||
@@ -708,6 +754,9 @@ class ChatRoomsCompanion extends UpdateCompanion<ChatRoom> {
|
|||||||
if (realmId.present) {
|
if (realmId.present) {
|
||||||
map['realm_id'] = Variable<String>(realmId.value);
|
map['realm_id'] = Variable<String>(realmId.value);
|
||||||
}
|
}
|
||||||
|
if (accountId.present) {
|
||||||
|
map['account_id'] = Variable<String>(accountId.value);
|
||||||
|
}
|
||||||
if (createdAt.present) {
|
if (createdAt.present) {
|
||||||
map['created_at'] = Variable<DateTime>(createdAt.value);
|
map['created_at'] = Variable<DateTime>(createdAt.value);
|
||||||
}
|
}
|
||||||
@@ -735,6 +784,7 @@ class ChatRoomsCompanion extends UpdateCompanion<ChatRoom> {
|
|||||||
..write('picture: $picture, ')
|
..write('picture: $picture, ')
|
||||||
..write('background: $background, ')
|
..write('background: $background, ')
|
||||||
..write('realmId: $realmId, ')
|
..write('realmId: $realmId, ')
|
||||||
|
..write('accountId: $accountId, ')
|
||||||
..write('createdAt: $createdAt, ')
|
..write('createdAt: $createdAt, ')
|
||||||
..write('updatedAt: $updatedAt, ')
|
..write('updatedAt: $updatedAt, ')
|
||||||
..write('deletedAt: $deletedAt, ')
|
..write('deletedAt: $deletedAt, ')
|
||||||
@@ -802,15 +852,6 @@ class $ChatMembersTable extends ChatMembers
|
|||||||
type: DriftSqlType.string,
|
type: DriftSqlType.string,
|
||||||
requiredDuringInsert: false,
|
requiredDuringInsert: false,
|
||||||
);
|
);
|
||||||
static const VerificationMeta _roleMeta = const VerificationMeta('role');
|
|
||||||
@override
|
|
||||||
late final GeneratedColumn<int> role = GeneratedColumn<int>(
|
|
||||||
'role',
|
|
||||||
aliasedName,
|
|
||||||
false,
|
|
||||||
type: DriftSqlType.int,
|
|
||||||
requiredDuringInsert: true,
|
|
||||||
);
|
|
||||||
static const VerificationMeta _notifyMeta = const VerificationMeta('notify');
|
static const VerificationMeta _notifyMeta = const VerificationMeta('notify');
|
||||||
@override
|
@override
|
||||||
late final GeneratedColumn<int> notify = GeneratedColumn<int>(
|
late final GeneratedColumn<int> notify = GeneratedColumn<int>(
|
||||||
@@ -853,38 +894,6 @@ class $ChatMembersTable extends ChatMembers
|
|||||||
type: DriftSqlType.dateTime,
|
type: DriftSqlType.dateTime,
|
||||||
requiredDuringInsert: false,
|
requiredDuringInsert: false,
|
||||||
);
|
);
|
||||||
static const VerificationMeta _isBotMeta = const VerificationMeta('isBot');
|
|
||||||
@override
|
|
||||||
late final GeneratedColumn<bool> isBot = GeneratedColumn<bool>(
|
|
||||||
'is_bot',
|
|
||||||
aliasedName,
|
|
||||||
false,
|
|
||||||
type: DriftSqlType.bool,
|
|
||||||
requiredDuringInsert: true,
|
|
||||||
defaultConstraints: GeneratedColumn.constraintIsAlways(
|
|
||||||
'CHECK ("is_bot" IN (0, 1))',
|
|
||||||
),
|
|
||||||
);
|
|
||||||
static const VerificationMeta _statusMeta = const VerificationMeta('status');
|
|
||||||
@override
|
|
||||||
late final GeneratedColumn<String> status = GeneratedColumn<String>(
|
|
||||||
'status',
|
|
||||||
aliasedName,
|
|
||||||
true,
|
|
||||||
type: DriftSqlType.string,
|
|
||||||
requiredDuringInsert: false,
|
|
||||||
);
|
|
||||||
static const VerificationMeta _lastTypedMeta = const VerificationMeta(
|
|
||||||
'lastTyped',
|
|
||||||
);
|
|
||||||
@override
|
|
||||||
late final GeneratedColumn<DateTime> lastTyped = GeneratedColumn<DateTime>(
|
|
||||||
'last_typed',
|
|
||||||
aliasedName,
|
|
||||||
true,
|
|
||||||
type: DriftSqlType.dateTime,
|
|
||||||
requiredDuringInsert: false,
|
|
||||||
);
|
|
||||||
static const VerificationMeta _createdAtMeta = const VerificationMeta(
|
static const VerificationMeta _createdAtMeta = const VerificationMeta(
|
||||||
'createdAt',
|
'createdAt',
|
||||||
);
|
);
|
||||||
@@ -925,14 +934,10 @@ class $ChatMembersTable extends ChatMembers
|
|||||||
accountId,
|
accountId,
|
||||||
account,
|
account,
|
||||||
nick,
|
nick,
|
||||||
role,
|
|
||||||
notify,
|
notify,
|
||||||
joinedAt,
|
joinedAt,
|
||||||
breakUntil,
|
breakUntil,
|
||||||
timeoutUntil,
|
timeoutUntil,
|
||||||
isBot,
|
|
||||||
status,
|
|
||||||
lastTyped,
|
|
||||||
createdAt,
|
createdAt,
|
||||||
updatedAt,
|
updatedAt,
|
||||||
deletedAt,
|
deletedAt,
|
||||||
@@ -979,14 +984,6 @@ class $ChatMembersTable extends ChatMembers
|
|||||||
nick.isAcceptableOrUnknown(data['nick']!, _nickMeta),
|
nick.isAcceptableOrUnknown(data['nick']!, _nickMeta),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (data.containsKey('role')) {
|
|
||||||
context.handle(
|
|
||||||
_roleMeta,
|
|
||||||
role.isAcceptableOrUnknown(data['role']!, _roleMeta),
|
|
||||||
);
|
|
||||||
} else if (isInserting) {
|
|
||||||
context.missing(_roleMeta);
|
|
||||||
}
|
|
||||||
if (data.containsKey('notify')) {
|
if (data.containsKey('notify')) {
|
||||||
context.handle(
|
context.handle(
|
||||||
_notifyMeta,
|
_notifyMeta,
|
||||||
@@ -1016,26 +1013,6 @@ class $ChatMembersTable extends ChatMembers
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (data.containsKey('is_bot')) {
|
|
||||||
context.handle(
|
|
||||||
_isBotMeta,
|
|
||||||
isBot.isAcceptableOrUnknown(data['is_bot']!, _isBotMeta),
|
|
||||||
);
|
|
||||||
} else if (isInserting) {
|
|
||||||
context.missing(_isBotMeta);
|
|
||||||
}
|
|
||||||
if (data.containsKey('status')) {
|
|
||||||
context.handle(
|
|
||||||
_statusMeta,
|
|
||||||
status.isAcceptableOrUnknown(data['status']!, _statusMeta),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
if (data.containsKey('last_typed')) {
|
|
||||||
context.handle(
|
|
||||||
_lastTypedMeta,
|
|
||||||
lastTyped.isAcceptableOrUnknown(data['last_typed']!, _lastTypedMeta),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
if (data.containsKey('created_at')) {
|
if (data.containsKey('created_at')) {
|
||||||
context.handle(
|
context.handle(
|
||||||
_createdAtMeta,
|
_createdAtMeta,
|
||||||
@@ -1092,11 +1069,6 @@ class $ChatMembersTable extends ChatMembers
|
|||||||
DriftSqlType.string,
|
DriftSqlType.string,
|
||||||
data['${effectivePrefix}nick'],
|
data['${effectivePrefix}nick'],
|
||||||
),
|
),
|
||||||
role:
|
|
||||||
attachedDatabase.typeMapping.read(
|
|
||||||
DriftSqlType.int,
|
|
||||||
data['${effectivePrefix}role'],
|
|
||||||
)!,
|
|
||||||
notify:
|
notify:
|
||||||
attachedDatabase.typeMapping.read(
|
attachedDatabase.typeMapping.read(
|
||||||
DriftSqlType.int,
|
DriftSqlType.int,
|
||||||
@@ -1114,19 +1086,6 @@ class $ChatMembersTable extends ChatMembers
|
|||||||
DriftSqlType.dateTime,
|
DriftSqlType.dateTime,
|
||||||
data['${effectivePrefix}timeout_until'],
|
data['${effectivePrefix}timeout_until'],
|
||||||
),
|
),
|
||||||
isBot:
|
|
||||||
attachedDatabase.typeMapping.read(
|
|
||||||
DriftSqlType.bool,
|
|
||||||
data['${effectivePrefix}is_bot'],
|
|
||||||
)!,
|
|
||||||
status: attachedDatabase.typeMapping.read(
|
|
||||||
DriftSqlType.string,
|
|
||||||
data['${effectivePrefix}status'],
|
|
||||||
),
|
|
||||||
lastTyped: attachedDatabase.typeMapping.read(
|
|
||||||
DriftSqlType.dateTime,
|
|
||||||
data['${effectivePrefix}last_typed'],
|
|
||||||
),
|
|
||||||
createdAt:
|
createdAt:
|
||||||
attachedDatabase.typeMapping.read(
|
attachedDatabase.typeMapping.read(
|
||||||
DriftSqlType.dateTime,
|
DriftSqlType.dateTime,
|
||||||
@@ -1159,14 +1118,10 @@ class ChatMember extends DataClass implements Insertable<ChatMember> {
|
|||||||
final String accountId;
|
final String accountId;
|
||||||
final Map<String, dynamic> account;
|
final Map<String, dynamic> account;
|
||||||
final String? nick;
|
final String? nick;
|
||||||
final int role;
|
|
||||||
final int notify;
|
final int notify;
|
||||||
final DateTime? joinedAt;
|
final DateTime? joinedAt;
|
||||||
final DateTime? breakUntil;
|
final DateTime? breakUntil;
|
||||||
final DateTime? timeoutUntil;
|
final DateTime? timeoutUntil;
|
||||||
final bool isBot;
|
|
||||||
final String? status;
|
|
||||||
final DateTime? lastTyped;
|
|
||||||
final DateTime createdAt;
|
final DateTime createdAt;
|
||||||
final DateTime updatedAt;
|
final DateTime updatedAt;
|
||||||
final DateTime? deletedAt;
|
final DateTime? deletedAt;
|
||||||
@@ -1176,14 +1131,10 @@ class ChatMember extends DataClass implements Insertable<ChatMember> {
|
|||||||
required this.accountId,
|
required this.accountId,
|
||||||
required this.account,
|
required this.account,
|
||||||
this.nick,
|
this.nick,
|
||||||
required this.role,
|
|
||||||
required this.notify,
|
required this.notify,
|
||||||
this.joinedAt,
|
this.joinedAt,
|
||||||
this.breakUntil,
|
this.breakUntil,
|
||||||
this.timeoutUntil,
|
this.timeoutUntil,
|
||||||
required this.isBot,
|
|
||||||
this.status,
|
|
||||||
this.lastTyped,
|
|
||||||
required this.createdAt,
|
required this.createdAt,
|
||||||
required this.updatedAt,
|
required this.updatedAt,
|
||||||
this.deletedAt,
|
this.deletedAt,
|
||||||
@@ -1202,7 +1153,6 @@ class ChatMember extends DataClass implements Insertable<ChatMember> {
|
|||||||
if (!nullToAbsent || nick != null) {
|
if (!nullToAbsent || nick != null) {
|
||||||
map['nick'] = Variable<String>(nick);
|
map['nick'] = Variable<String>(nick);
|
||||||
}
|
}
|
||||||
map['role'] = Variable<int>(role);
|
|
||||||
map['notify'] = Variable<int>(notify);
|
map['notify'] = Variable<int>(notify);
|
||||||
if (!nullToAbsent || joinedAt != null) {
|
if (!nullToAbsent || joinedAt != null) {
|
||||||
map['joined_at'] = Variable<DateTime>(joinedAt);
|
map['joined_at'] = Variable<DateTime>(joinedAt);
|
||||||
@@ -1213,13 +1163,6 @@ class ChatMember extends DataClass implements Insertable<ChatMember> {
|
|||||||
if (!nullToAbsent || timeoutUntil != null) {
|
if (!nullToAbsent || timeoutUntil != null) {
|
||||||
map['timeout_until'] = Variable<DateTime>(timeoutUntil);
|
map['timeout_until'] = Variable<DateTime>(timeoutUntil);
|
||||||
}
|
}
|
||||||
map['is_bot'] = Variable<bool>(isBot);
|
|
||||||
if (!nullToAbsent || status != null) {
|
|
||||||
map['status'] = Variable<String>(status);
|
|
||||||
}
|
|
||||||
if (!nullToAbsent || lastTyped != null) {
|
|
||||||
map['last_typed'] = Variable<DateTime>(lastTyped);
|
|
||||||
}
|
|
||||||
map['created_at'] = Variable<DateTime>(createdAt);
|
map['created_at'] = Variable<DateTime>(createdAt);
|
||||||
map['updated_at'] = Variable<DateTime>(updatedAt);
|
map['updated_at'] = Variable<DateTime>(updatedAt);
|
||||||
if (!nullToAbsent || deletedAt != null) {
|
if (!nullToAbsent || deletedAt != null) {
|
||||||
@@ -1235,7 +1178,6 @@ class ChatMember extends DataClass implements Insertable<ChatMember> {
|
|||||||
accountId: Value(accountId),
|
accountId: Value(accountId),
|
||||||
account: Value(account),
|
account: Value(account),
|
||||||
nick: nick == null && nullToAbsent ? const Value.absent() : Value(nick),
|
nick: nick == null && nullToAbsent ? const Value.absent() : Value(nick),
|
||||||
role: Value(role),
|
|
||||||
notify: Value(notify),
|
notify: Value(notify),
|
||||||
joinedAt:
|
joinedAt:
|
||||||
joinedAt == null && nullToAbsent
|
joinedAt == null && nullToAbsent
|
||||||
@@ -1249,13 +1191,6 @@ class ChatMember extends DataClass implements Insertable<ChatMember> {
|
|||||||
timeoutUntil == null && nullToAbsent
|
timeoutUntil == null && nullToAbsent
|
||||||
? const Value.absent()
|
? const Value.absent()
|
||||||
: Value(timeoutUntil),
|
: Value(timeoutUntil),
|
||||||
isBot: Value(isBot),
|
|
||||||
status:
|
|
||||||
status == null && nullToAbsent ? const Value.absent() : Value(status),
|
|
||||||
lastTyped:
|
|
||||||
lastTyped == null && nullToAbsent
|
|
||||||
? const Value.absent()
|
|
||||||
: Value(lastTyped),
|
|
||||||
createdAt: Value(createdAt),
|
createdAt: Value(createdAt),
|
||||||
updatedAt: Value(updatedAt),
|
updatedAt: Value(updatedAt),
|
||||||
deletedAt:
|
deletedAt:
|
||||||
@@ -1276,14 +1211,10 @@ class ChatMember extends DataClass implements Insertable<ChatMember> {
|
|||||||
accountId: serializer.fromJson<String>(json['accountId']),
|
accountId: serializer.fromJson<String>(json['accountId']),
|
||||||
account: serializer.fromJson<Map<String, dynamic>>(json['account']),
|
account: serializer.fromJson<Map<String, dynamic>>(json['account']),
|
||||||
nick: serializer.fromJson<String?>(json['nick']),
|
nick: serializer.fromJson<String?>(json['nick']),
|
||||||
role: serializer.fromJson<int>(json['role']),
|
|
||||||
notify: serializer.fromJson<int>(json['notify']),
|
notify: serializer.fromJson<int>(json['notify']),
|
||||||
joinedAt: serializer.fromJson<DateTime?>(json['joinedAt']),
|
joinedAt: serializer.fromJson<DateTime?>(json['joinedAt']),
|
||||||
breakUntil: serializer.fromJson<DateTime?>(json['breakUntil']),
|
breakUntil: serializer.fromJson<DateTime?>(json['breakUntil']),
|
||||||
timeoutUntil: serializer.fromJson<DateTime?>(json['timeoutUntil']),
|
timeoutUntil: serializer.fromJson<DateTime?>(json['timeoutUntil']),
|
||||||
isBot: serializer.fromJson<bool>(json['isBot']),
|
|
||||||
status: serializer.fromJson<String?>(json['status']),
|
|
||||||
lastTyped: serializer.fromJson<DateTime?>(json['lastTyped']),
|
|
||||||
createdAt: serializer.fromJson<DateTime>(json['createdAt']),
|
createdAt: serializer.fromJson<DateTime>(json['createdAt']),
|
||||||
updatedAt: serializer.fromJson<DateTime>(json['updatedAt']),
|
updatedAt: serializer.fromJson<DateTime>(json['updatedAt']),
|
||||||
deletedAt: serializer.fromJson<DateTime?>(json['deletedAt']),
|
deletedAt: serializer.fromJson<DateTime?>(json['deletedAt']),
|
||||||
@@ -1298,14 +1229,10 @@ class ChatMember extends DataClass implements Insertable<ChatMember> {
|
|||||||
'accountId': serializer.toJson<String>(accountId),
|
'accountId': serializer.toJson<String>(accountId),
|
||||||
'account': serializer.toJson<Map<String, dynamic>>(account),
|
'account': serializer.toJson<Map<String, dynamic>>(account),
|
||||||
'nick': serializer.toJson<String?>(nick),
|
'nick': serializer.toJson<String?>(nick),
|
||||||
'role': serializer.toJson<int>(role),
|
|
||||||
'notify': serializer.toJson<int>(notify),
|
'notify': serializer.toJson<int>(notify),
|
||||||
'joinedAt': serializer.toJson<DateTime?>(joinedAt),
|
'joinedAt': serializer.toJson<DateTime?>(joinedAt),
|
||||||
'breakUntil': serializer.toJson<DateTime?>(breakUntil),
|
'breakUntil': serializer.toJson<DateTime?>(breakUntil),
|
||||||
'timeoutUntil': serializer.toJson<DateTime?>(timeoutUntil),
|
'timeoutUntil': serializer.toJson<DateTime?>(timeoutUntil),
|
||||||
'isBot': serializer.toJson<bool>(isBot),
|
|
||||||
'status': serializer.toJson<String?>(status),
|
|
||||||
'lastTyped': serializer.toJson<DateTime?>(lastTyped),
|
|
||||||
'createdAt': serializer.toJson<DateTime>(createdAt),
|
'createdAt': serializer.toJson<DateTime>(createdAt),
|
||||||
'updatedAt': serializer.toJson<DateTime>(updatedAt),
|
'updatedAt': serializer.toJson<DateTime>(updatedAt),
|
||||||
'deletedAt': serializer.toJson<DateTime?>(deletedAt),
|
'deletedAt': serializer.toJson<DateTime?>(deletedAt),
|
||||||
@@ -1318,14 +1245,10 @@ class ChatMember extends DataClass implements Insertable<ChatMember> {
|
|||||||
String? accountId,
|
String? accountId,
|
||||||
Map<String, dynamic>? account,
|
Map<String, dynamic>? account,
|
||||||
Value<String?> nick = const Value.absent(),
|
Value<String?> nick = const Value.absent(),
|
||||||
int? role,
|
|
||||||
int? notify,
|
int? notify,
|
||||||
Value<DateTime?> joinedAt = const Value.absent(),
|
Value<DateTime?> joinedAt = const Value.absent(),
|
||||||
Value<DateTime?> breakUntil = const Value.absent(),
|
Value<DateTime?> breakUntil = const Value.absent(),
|
||||||
Value<DateTime?> timeoutUntil = const Value.absent(),
|
Value<DateTime?> timeoutUntil = const Value.absent(),
|
||||||
bool? isBot,
|
|
||||||
Value<String?> status = const Value.absent(),
|
|
||||||
Value<DateTime?> lastTyped = const Value.absent(),
|
|
||||||
DateTime? createdAt,
|
DateTime? createdAt,
|
||||||
DateTime? updatedAt,
|
DateTime? updatedAt,
|
||||||
Value<DateTime?> deletedAt = const Value.absent(),
|
Value<DateTime?> deletedAt = const Value.absent(),
|
||||||
@@ -1335,14 +1258,10 @@ class ChatMember extends DataClass implements Insertable<ChatMember> {
|
|||||||
accountId: accountId ?? this.accountId,
|
accountId: accountId ?? this.accountId,
|
||||||
account: account ?? this.account,
|
account: account ?? this.account,
|
||||||
nick: nick.present ? nick.value : this.nick,
|
nick: nick.present ? nick.value : this.nick,
|
||||||
role: role ?? this.role,
|
|
||||||
notify: notify ?? this.notify,
|
notify: notify ?? this.notify,
|
||||||
joinedAt: joinedAt.present ? joinedAt.value : this.joinedAt,
|
joinedAt: joinedAt.present ? joinedAt.value : this.joinedAt,
|
||||||
breakUntil: breakUntil.present ? breakUntil.value : this.breakUntil,
|
breakUntil: breakUntil.present ? breakUntil.value : this.breakUntil,
|
||||||
timeoutUntil: timeoutUntil.present ? timeoutUntil.value : this.timeoutUntil,
|
timeoutUntil: timeoutUntil.present ? timeoutUntil.value : this.timeoutUntil,
|
||||||
isBot: isBot ?? this.isBot,
|
|
||||||
status: status.present ? status.value : this.status,
|
|
||||||
lastTyped: lastTyped.present ? lastTyped.value : this.lastTyped,
|
|
||||||
createdAt: createdAt ?? this.createdAt,
|
createdAt: createdAt ?? this.createdAt,
|
||||||
updatedAt: updatedAt ?? this.updatedAt,
|
updatedAt: updatedAt ?? this.updatedAt,
|
||||||
deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt,
|
deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt,
|
||||||
@@ -1355,7 +1274,6 @@ class ChatMember extends DataClass implements Insertable<ChatMember> {
|
|||||||
accountId: data.accountId.present ? data.accountId.value : this.accountId,
|
accountId: data.accountId.present ? data.accountId.value : this.accountId,
|
||||||
account: data.account.present ? data.account.value : this.account,
|
account: data.account.present ? data.account.value : this.account,
|
||||||
nick: data.nick.present ? data.nick.value : this.nick,
|
nick: data.nick.present ? data.nick.value : this.nick,
|
||||||
role: data.role.present ? data.role.value : this.role,
|
|
||||||
notify: data.notify.present ? data.notify.value : this.notify,
|
notify: data.notify.present ? data.notify.value : this.notify,
|
||||||
joinedAt: data.joinedAt.present ? data.joinedAt.value : this.joinedAt,
|
joinedAt: data.joinedAt.present ? data.joinedAt.value : this.joinedAt,
|
||||||
breakUntil:
|
breakUntil:
|
||||||
@@ -1364,9 +1282,6 @@ class ChatMember extends DataClass implements Insertable<ChatMember> {
|
|||||||
data.timeoutUntil.present
|
data.timeoutUntil.present
|
||||||
? data.timeoutUntil.value
|
? data.timeoutUntil.value
|
||||||
: this.timeoutUntil,
|
: this.timeoutUntil,
|
||||||
isBot: data.isBot.present ? data.isBot.value : this.isBot,
|
|
||||||
status: data.status.present ? data.status.value : this.status,
|
|
||||||
lastTyped: data.lastTyped.present ? data.lastTyped.value : this.lastTyped,
|
|
||||||
createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt,
|
createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt,
|
||||||
updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt,
|
updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt,
|
||||||
deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt,
|
deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt,
|
||||||
@@ -1381,14 +1296,10 @@ class ChatMember extends DataClass implements Insertable<ChatMember> {
|
|||||||
..write('accountId: $accountId, ')
|
..write('accountId: $accountId, ')
|
||||||
..write('account: $account, ')
|
..write('account: $account, ')
|
||||||
..write('nick: $nick, ')
|
..write('nick: $nick, ')
|
||||||
..write('role: $role, ')
|
|
||||||
..write('notify: $notify, ')
|
..write('notify: $notify, ')
|
||||||
..write('joinedAt: $joinedAt, ')
|
..write('joinedAt: $joinedAt, ')
|
||||||
..write('breakUntil: $breakUntil, ')
|
..write('breakUntil: $breakUntil, ')
|
||||||
..write('timeoutUntil: $timeoutUntil, ')
|
..write('timeoutUntil: $timeoutUntil, ')
|
||||||
..write('isBot: $isBot, ')
|
|
||||||
..write('status: $status, ')
|
|
||||||
..write('lastTyped: $lastTyped, ')
|
|
||||||
..write('createdAt: $createdAt, ')
|
..write('createdAt: $createdAt, ')
|
||||||
..write('updatedAt: $updatedAt, ')
|
..write('updatedAt: $updatedAt, ')
|
||||||
..write('deletedAt: $deletedAt')
|
..write('deletedAt: $deletedAt')
|
||||||
@@ -1403,14 +1314,10 @@ class ChatMember extends DataClass implements Insertable<ChatMember> {
|
|||||||
accountId,
|
accountId,
|
||||||
account,
|
account,
|
||||||
nick,
|
nick,
|
||||||
role,
|
|
||||||
notify,
|
notify,
|
||||||
joinedAt,
|
joinedAt,
|
||||||
breakUntil,
|
breakUntil,
|
||||||
timeoutUntil,
|
timeoutUntil,
|
||||||
isBot,
|
|
||||||
status,
|
|
||||||
lastTyped,
|
|
||||||
createdAt,
|
createdAt,
|
||||||
updatedAt,
|
updatedAt,
|
||||||
deletedAt,
|
deletedAt,
|
||||||
@@ -1424,14 +1331,10 @@ class ChatMember extends DataClass implements Insertable<ChatMember> {
|
|||||||
other.accountId == this.accountId &&
|
other.accountId == this.accountId &&
|
||||||
other.account == this.account &&
|
other.account == this.account &&
|
||||||
other.nick == this.nick &&
|
other.nick == this.nick &&
|
||||||
other.role == this.role &&
|
|
||||||
other.notify == this.notify &&
|
other.notify == this.notify &&
|
||||||
other.joinedAt == this.joinedAt &&
|
other.joinedAt == this.joinedAt &&
|
||||||
other.breakUntil == this.breakUntil &&
|
other.breakUntil == this.breakUntil &&
|
||||||
other.timeoutUntil == this.timeoutUntil &&
|
other.timeoutUntil == this.timeoutUntil &&
|
||||||
other.isBot == this.isBot &&
|
|
||||||
other.status == this.status &&
|
|
||||||
other.lastTyped == this.lastTyped &&
|
|
||||||
other.createdAt == this.createdAt &&
|
other.createdAt == this.createdAt &&
|
||||||
other.updatedAt == this.updatedAt &&
|
other.updatedAt == this.updatedAt &&
|
||||||
other.deletedAt == this.deletedAt);
|
other.deletedAt == this.deletedAt);
|
||||||
@@ -1443,14 +1346,10 @@ class ChatMembersCompanion extends UpdateCompanion<ChatMember> {
|
|||||||
final Value<String> accountId;
|
final Value<String> accountId;
|
||||||
final Value<Map<String, dynamic>> account;
|
final Value<Map<String, dynamic>> account;
|
||||||
final Value<String?> nick;
|
final Value<String?> nick;
|
||||||
final Value<int> role;
|
|
||||||
final Value<int> notify;
|
final Value<int> notify;
|
||||||
final Value<DateTime?> joinedAt;
|
final Value<DateTime?> joinedAt;
|
||||||
final Value<DateTime?> breakUntil;
|
final Value<DateTime?> breakUntil;
|
||||||
final Value<DateTime?> timeoutUntil;
|
final Value<DateTime?> timeoutUntil;
|
||||||
final Value<bool> isBot;
|
|
||||||
final Value<String?> status;
|
|
||||||
final Value<DateTime?> lastTyped;
|
|
||||||
final Value<DateTime> createdAt;
|
final Value<DateTime> createdAt;
|
||||||
final Value<DateTime> updatedAt;
|
final Value<DateTime> updatedAt;
|
||||||
final Value<DateTime?> deletedAt;
|
final Value<DateTime?> deletedAt;
|
||||||
@@ -1461,14 +1360,10 @@ class ChatMembersCompanion extends UpdateCompanion<ChatMember> {
|
|||||||
this.accountId = const Value.absent(),
|
this.accountId = const Value.absent(),
|
||||||
this.account = const Value.absent(),
|
this.account = const Value.absent(),
|
||||||
this.nick = const Value.absent(),
|
this.nick = const Value.absent(),
|
||||||
this.role = const Value.absent(),
|
|
||||||
this.notify = const Value.absent(),
|
this.notify = const Value.absent(),
|
||||||
this.joinedAt = const Value.absent(),
|
this.joinedAt = const Value.absent(),
|
||||||
this.breakUntil = const Value.absent(),
|
this.breakUntil = const Value.absent(),
|
||||||
this.timeoutUntil = const Value.absent(),
|
this.timeoutUntil = const Value.absent(),
|
||||||
this.isBot = const Value.absent(),
|
|
||||||
this.status = const Value.absent(),
|
|
||||||
this.lastTyped = const Value.absent(),
|
|
||||||
this.createdAt = const Value.absent(),
|
this.createdAt = const Value.absent(),
|
||||||
this.updatedAt = const Value.absent(),
|
this.updatedAt = const Value.absent(),
|
||||||
this.deletedAt = const Value.absent(),
|
this.deletedAt = const Value.absent(),
|
||||||
@@ -1480,14 +1375,10 @@ class ChatMembersCompanion extends UpdateCompanion<ChatMember> {
|
|||||||
required String accountId,
|
required String accountId,
|
||||||
required Map<String, dynamic> account,
|
required Map<String, dynamic> account,
|
||||||
this.nick = const Value.absent(),
|
this.nick = const Value.absent(),
|
||||||
required int role,
|
|
||||||
required int notify,
|
required int notify,
|
||||||
this.joinedAt = const Value.absent(),
|
this.joinedAt = const Value.absent(),
|
||||||
this.breakUntil = const Value.absent(),
|
this.breakUntil = const Value.absent(),
|
||||||
this.timeoutUntil = const Value.absent(),
|
this.timeoutUntil = const Value.absent(),
|
||||||
required bool isBot,
|
|
||||||
this.status = const Value.absent(),
|
|
||||||
this.lastTyped = const Value.absent(),
|
|
||||||
required DateTime createdAt,
|
required DateTime createdAt,
|
||||||
required DateTime updatedAt,
|
required DateTime updatedAt,
|
||||||
this.deletedAt = const Value.absent(),
|
this.deletedAt = const Value.absent(),
|
||||||
@@ -1496,9 +1387,7 @@ class ChatMembersCompanion extends UpdateCompanion<ChatMember> {
|
|||||||
chatRoomId = Value(chatRoomId),
|
chatRoomId = Value(chatRoomId),
|
||||||
accountId = Value(accountId),
|
accountId = Value(accountId),
|
||||||
account = Value(account),
|
account = Value(account),
|
||||||
role = Value(role),
|
|
||||||
notify = Value(notify),
|
notify = Value(notify),
|
||||||
isBot = Value(isBot),
|
|
||||||
createdAt = Value(createdAt),
|
createdAt = Value(createdAt),
|
||||||
updatedAt = Value(updatedAt);
|
updatedAt = Value(updatedAt);
|
||||||
static Insertable<ChatMember> custom({
|
static Insertable<ChatMember> custom({
|
||||||
@@ -1507,14 +1396,10 @@ class ChatMembersCompanion extends UpdateCompanion<ChatMember> {
|
|||||||
Expression<String>? accountId,
|
Expression<String>? accountId,
|
||||||
Expression<String>? account,
|
Expression<String>? account,
|
||||||
Expression<String>? nick,
|
Expression<String>? nick,
|
||||||
Expression<int>? role,
|
|
||||||
Expression<int>? notify,
|
Expression<int>? notify,
|
||||||
Expression<DateTime>? joinedAt,
|
Expression<DateTime>? joinedAt,
|
||||||
Expression<DateTime>? breakUntil,
|
Expression<DateTime>? breakUntil,
|
||||||
Expression<DateTime>? timeoutUntil,
|
Expression<DateTime>? timeoutUntil,
|
||||||
Expression<bool>? isBot,
|
|
||||||
Expression<String>? status,
|
|
||||||
Expression<DateTime>? lastTyped,
|
|
||||||
Expression<DateTime>? createdAt,
|
Expression<DateTime>? createdAt,
|
||||||
Expression<DateTime>? updatedAt,
|
Expression<DateTime>? updatedAt,
|
||||||
Expression<DateTime>? deletedAt,
|
Expression<DateTime>? deletedAt,
|
||||||
@@ -1526,14 +1411,10 @@ class ChatMembersCompanion extends UpdateCompanion<ChatMember> {
|
|||||||
if (accountId != null) 'account_id': accountId,
|
if (accountId != null) 'account_id': accountId,
|
||||||
if (account != null) 'account': account,
|
if (account != null) 'account': account,
|
||||||
if (nick != null) 'nick': nick,
|
if (nick != null) 'nick': nick,
|
||||||
if (role != null) 'role': role,
|
|
||||||
if (notify != null) 'notify': notify,
|
if (notify != null) 'notify': notify,
|
||||||
if (joinedAt != null) 'joined_at': joinedAt,
|
if (joinedAt != null) 'joined_at': joinedAt,
|
||||||
if (breakUntil != null) 'break_until': breakUntil,
|
if (breakUntil != null) 'break_until': breakUntil,
|
||||||
if (timeoutUntil != null) 'timeout_until': timeoutUntil,
|
if (timeoutUntil != null) 'timeout_until': timeoutUntil,
|
||||||
if (isBot != null) 'is_bot': isBot,
|
|
||||||
if (status != null) 'status': status,
|
|
||||||
if (lastTyped != null) 'last_typed': lastTyped,
|
|
||||||
if (createdAt != null) 'created_at': createdAt,
|
if (createdAt != null) 'created_at': createdAt,
|
||||||
if (updatedAt != null) 'updated_at': updatedAt,
|
if (updatedAt != null) 'updated_at': updatedAt,
|
||||||
if (deletedAt != null) 'deleted_at': deletedAt,
|
if (deletedAt != null) 'deleted_at': deletedAt,
|
||||||
@@ -1547,14 +1428,10 @@ class ChatMembersCompanion extends UpdateCompanion<ChatMember> {
|
|||||||
Value<String>? accountId,
|
Value<String>? accountId,
|
||||||
Value<Map<String, dynamic>>? account,
|
Value<Map<String, dynamic>>? account,
|
||||||
Value<String?>? nick,
|
Value<String?>? nick,
|
||||||
Value<int>? role,
|
|
||||||
Value<int>? notify,
|
Value<int>? notify,
|
||||||
Value<DateTime?>? joinedAt,
|
Value<DateTime?>? joinedAt,
|
||||||
Value<DateTime?>? breakUntil,
|
Value<DateTime?>? breakUntil,
|
||||||
Value<DateTime?>? timeoutUntil,
|
Value<DateTime?>? timeoutUntil,
|
||||||
Value<bool>? isBot,
|
|
||||||
Value<String?>? status,
|
|
||||||
Value<DateTime?>? lastTyped,
|
|
||||||
Value<DateTime>? createdAt,
|
Value<DateTime>? createdAt,
|
||||||
Value<DateTime>? updatedAt,
|
Value<DateTime>? updatedAt,
|
||||||
Value<DateTime?>? deletedAt,
|
Value<DateTime?>? deletedAt,
|
||||||
@@ -1566,14 +1443,10 @@ class ChatMembersCompanion extends UpdateCompanion<ChatMember> {
|
|||||||
accountId: accountId ?? this.accountId,
|
accountId: accountId ?? this.accountId,
|
||||||
account: account ?? this.account,
|
account: account ?? this.account,
|
||||||
nick: nick ?? this.nick,
|
nick: nick ?? this.nick,
|
||||||
role: role ?? this.role,
|
|
||||||
notify: notify ?? this.notify,
|
notify: notify ?? this.notify,
|
||||||
joinedAt: joinedAt ?? this.joinedAt,
|
joinedAt: joinedAt ?? this.joinedAt,
|
||||||
breakUntil: breakUntil ?? this.breakUntil,
|
breakUntil: breakUntil ?? this.breakUntil,
|
||||||
timeoutUntil: timeoutUntil ?? this.timeoutUntil,
|
timeoutUntil: timeoutUntil ?? this.timeoutUntil,
|
||||||
isBot: isBot ?? this.isBot,
|
|
||||||
status: status ?? this.status,
|
|
||||||
lastTyped: lastTyped ?? this.lastTyped,
|
|
||||||
createdAt: createdAt ?? this.createdAt,
|
createdAt: createdAt ?? this.createdAt,
|
||||||
updatedAt: updatedAt ?? this.updatedAt,
|
updatedAt: updatedAt ?? this.updatedAt,
|
||||||
deletedAt: deletedAt ?? this.deletedAt,
|
deletedAt: deletedAt ?? this.deletedAt,
|
||||||
@@ -1601,9 +1474,6 @@ class ChatMembersCompanion extends UpdateCompanion<ChatMember> {
|
|||||||
if (nick.present) {
|
if (nick.present) {
|
||||||
map['nick'] = Variable<String>(nick.value);
|
map['nick'] = Variable<String>(nick.value);
|
||||||
}
|
}
|
||||||
if (role.present) {
|
|
||||||
map['role'] = Variable<int>(role.value);
|
|
||||||
}
|
|
||||||
if (notify.present) {
|
if (notify.present) {
|
||||||
map['notify'] = Variable<int>(notify.value);
|
map['notify'] = Variable<int>(notify.value);
|
||||||
}
|
}
|
||||||
@@ -1616,15 +1486,6 @@ class ChatMembersCompanion extends UpdateCompanion<ChatMember> {
|
|||||||
if (timeoutUntil.present) {
|
if (timeoutUntil.present) {
|
||||||
map['timeout_until'] = Variable<DateTime>(timeoutUntil.value);
|
map['timeout_until'] = Variable<DateTime>(timeoutUntil.value);
|
||||||
}
|
}
|
||||||
if (isBot.present) {
|
|
||||||
map['is_bot'] = Variable<bool>(isBot.value);
|
|
||||||
}
|
|
||||||
if (status.present) {
|
|
||||||
map['status'] = Variable<String>(status.value);
|
|
||||||
}
|
|
||||||
if (lastTyped.present) {
|
|
||||||
map['last_typed'] = Variable<DateTime>(lastTyped.value);
|
|
||||||
}
|
|
||||||
if (createdAt.present) {
|
if (createdAt.present) {
|
||||||
map['created_at'] = Variable<DateTime>(createdAt.value);
|
map['created_at'] = Variable<DateTime>(createdAt.value);
|
||||||
}
|
}
|
||||||
@@ -1648,14 +1509,10 @@ class ChatMembersCompanion extends UpdateCompanion<ChatMember> {
|
|||||||
..write('accountId: $accountId, ')
|
..write('accountId: $accountId, ')
|
||||||
..write('account: $account, ')
|
..write('account: $account, ')
|
||||||
..write('nick: $nick, ')
|
..write('nick: $nick, ')
|
||||||
..write('role: $role, ')
|
|
||||||
..write('notify: $notify, ')
|
..write('notify: $notify, ')
|
||||||
..write('joinedAt: $joinedAt, ')
|
..write('joinedAt: $joinedAt, ')
|
||||||
..write('breakUntil: $breakUntil, ')
|
..write('breakUntil: $breakUntil, ')
|
||||||
..write('timeoutUntil: $timeoutUntil, ')
|
..write('timeoutUntil: $timeoutUntil, ')
|
||||||
..write('isBot: $isBot, ')
|
|
||||||
..write('status: $status, ')
|
|
||||||
..write('lastTyped: $lastTyped, ')
|
|
||||||
..write('createdAt: $createdAt, ')
|
..write('createdAt: $createdAt, ')
|
||||||
..write('updatedAt: $updatedAt, ')
|
..write('updatedAt: $updatedAt, ')
|
||||||
..write('deletedAt: $deletedAt, ')
|
..write('deletedAt: $deletedAt, ')
|
||||||
@@ -3327,6 +3184,7 @@ typedef $$ChatRoomsTableCreateCompanionBuilder =
|
|||||||
Value<Map<String, dynamic>?> picture,
|
Value<Map<String, dynamic>?> picture,
|
||||||
Value<Map<String, dynamic>?> background,
|
Value<Map<String, dynamic>?> background,
|
||||||
Value<String?> realmId,
|
Value<String?> realmId,
|
||||||
|
Value<String?> accountId,
|
||||||
required DateTime createdAt,
|
required DateTime createdAt,
|
||||||
required DateTime updatedAt,
|
required DateTime updatedAt,
|
||||||
Value<DateTime?> deletedAt,
|
Value<DateTime?> deletedAt,
|
||||||
@@ -3343,6 +3201,7 @@ typedef $$ChatRoomsTableUpdateCompanionBuilder =
|
|||||||
Value<Map<String, dynamic>?> picture,
|
Value<Map<String, dynamic>?> picture,
|
||||||
Value<Map<String, dynamic>?> background,
|
Value<Map<String, dynamic>?> background,
|
||||||
Value<String?> realmId,
|
Value<String?> realmId,
|
||||||
|
Value<String?> accountId,
|
||||||
Value<DateTime> createdAt,
|
Value<DateTime> createdAt,
|
||||||
Value<DateTime> updatedAt,
|
Value<DateTime> updatedAt,
|
||||||
Value<DateTime?> deletedAt,
|
Value<DateTime?> deletedAt,
|
||||||
@@ -3454,6 +3313,11 @@ class $$ChatRoomsTableFilterComposer
|
|||||||
builder: (column) => ColumnFilters(column),
|
builder: (column) => ColumnFilters(column),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
ColumnFilters<String> get accountId => $composableBuilder(
|
||||||
|
column: $table.accountId,
|
||||||
|
builder: (column) => ColumnFilters(column),
|
||||||
|
);
|
||||||
|
|
||||||
ColumnFilters<DateTime> get createdAt => $composableBuilder(
|
ColumnFilters<DateTime> get createdAt => $composableBuilder(
|
||||||
column: $table.createdAt,
|
column: $table.createdAt,
|
||||||
builder: (column) => ColumnFilters(column),
|
builder: (column) => ColumnFilters(column),
|
||||||
@@ -3574,6 +3438,11 @@ class $$ChatRoomsTableOrderingComposer
|
|||||||
builder: (column) => ColumnOrderings(column),
|
builder: (column) => ColumnOrderings(column),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
ColumnOrderings<String> get accountId => $composableBuilder(
|
||||||
|
column: $table.accountId,
|
||||||
|
builder: (column) => ColumnOrderings(column),
|
||||||
|
);
|
||||||
|
|
||||||
ColumnOrderings<DateTime> get createdAt => $composableBuilder(
|
ColumnOrderings<DateTime> get createdAt => $composableBuilder(
|
||||||
column: $table.createdAt,
|
column: $table.createdAt,
|
||||||
builder: (column) => ColumnOrderings(column),
|
builder: (column) => ColumnOrderings(column),
|
||||||
@@ -3633,6 +3502,9 @@ class $$ChatRoomsTableAnnotationComposer
|
|||||||
GeneratedColumn<String> get realmId =>
|
GeneratedColumn<String> get realmId =>
|
||||||
$composableBuilder(column: $table.realmId, builder: (column) => column);
|
$composableBuilder(column: $table.realmId, builder: (column) => column);
|
||||||
|
|
||||||
|
GeneratedColumn<String> get accountId =>
|
||||||
|
$composableBuilder(column: $table.accountId, builder: (column) => column);
|
||||||
|
|
||||||
GeneratedColumn<DateTime> get createdAt =>
|
GeneratedColumn<DateTime> get createdAt =>
|
||||||
$composableBuilder(column: $table.createdAt, builder: (column) => column);
|
$composableBuilder(column: $table.createdAt, builder: (column) => column);
|
||||||
|
|
||||||
@@ -3730,6 +3602,7 @@ class $$ChatRoomsTableTableManager
|
|||||||
Value<Map<String, dynamic>?> picture = const Value.absent(),
|
Value<Map<String, dynamic>?> picture = const Value.absent(),
|
||||||
Value<Map<String, dynamic>?> background = const Value.absent(),
|
Value<Map<String, dynamic>?> background = const Value.absent(),
|
||||||
Value<String?> realmId = const Value.absent(),
|
Value<String?> realmId = const Value.absent(),
|
||||||
|
Value<String?> accountId = const Value.absent(),
|
||||||
Value<DateTime> createdAt = const Value.absent(),
|
Value<DateTime> createdAt = const Value.absent(),
|
||||||
Value<DateTime> updatedAt = const Value.absent(),
|
Value<DateTime> updatedAt = const Value.absent(),
|
||||||
Value<DateTime?> deletedAt = const Value.absent(),
|
Value<DateTime?> deletedAt = const Value.absent(),
|
||||||
@@ -3744,6 +3617,7 @@ class $$ChatRoomsTableTableManager
|
|||||||
picture: picture,
|
picture: picture,
|
||||||
background: background,
|
background: background,
|
||||||
realmId: realmId,
|
realmId: realmId,
|
||||||
|
accountId: accountId,
|
||||||
createdAt: createdAt,
|
createdAt: createdAt,
|
||||||
updatedAt: updatedAt,
|
updatedAt: updatedAt,
|
||||||
deletedAt: deletedAt,
|
deletedAt: deletedAt,
|
||||||
@@ -3760,6 +3634,7 @@ class $$ChatRoomsTableTableManager
|
|||||||
Value<Map<String, dynamic>?> picture = const Value.absent(),
|
Value<Map<String, dynamic>?> picture = const Value.absent(),
|
||||||
Value<Map<String, dynamic>?> background = const Value.absent(),
|
Value<Map<String, dynamic>?> background = const Value.absent(),
|
||||||
Value<String?> realmId = const Value.absent(),
|
Value<String?> realmId = const Value.absent(),
|
||||||
|
Value<String?> accountId = const Value.absent(),
|
||||||
required DateTime createdAt,
|
required DateTime createdAt,
|
||||||
required DateTime updatedAt,
|
required DateTime updatedAt,
|
||||||
Value<DateTime?> deletedAt = const Value.absent(),
|
Value<DateTime?> deletedAt = const Value.absent(),
|
||||||
@@ -3774,6 +3649,7 @@ class $$ChatRoomsTableTableManager
|
|||||||
picture: picture,
|
picture: picture,
|
||||||
background: background,
|
background: background,
|
||||||
realmId: realmId,
|
realmId: realmId,
|
||||||
|
accountId: accountId,
|
||||||
createdAt: createdAt,
|
createdAt: createdAt,
|
||||||
updatedAt: updatedAt,
|
updatedAt: updatedAt,
|
||||||
deletedAt: deletedAt,
|
deletedAt: deletedAt,
|
||||||
@@ -3874,14 +3750,10 @@ typedef $$ChatMembersTableCreateCompanionBuilder =
|
|||||||
required String accountId,
|
required String accountId,
|
||||||
required Map<String, dynamic> account,
|
required Map<String, dynamic> account,
|
||||||
Value<String?> nick,
|
Value<String?> nick,
|
||||||
required int role,
|
|
||||||
required int notify,
|
required int notify,
|
||||||
Value<DateTime?> joinedAt,
|
Value<DateTime?> joinedAt,
|
||||||
Value<DateTime?> breakUntil,
|
Value<DateTime?> breakUntil,
|
||||||
Value<DateTime?> timeoutUntil,
|
Value<DateTime?> timeoutUntil,
|
||||||
required bool isBot,
|
|
||||||
Value<String?> status,
|
|
||||||
Value<DateTime?> lastTyped,
|
|
||||||
required DateTime createdAt,
|
required DateTime createdAt,
|
||||||
required DateTime updatedAt,
|
required DateTime updatedAt,
|
||||||
Value<DateTime?> deletedAt,
|
Value<DateTime?> deletedAt,
|
||||||
@@ -3894,14 +3766,10 @@ typedef $$ChatMembersTableUpdateCompanionBuilder =
|
|||||||
Value<String> accountId,
|
Value<String> accountId,
|
||||||
Value<Map<String, dynamic>> account,
|
Value<Map<String, dynamic>> account,
|
||||||
Value<String?> nick,
|
Value<String?> nick,
|
||||||
Value<int> role,
|
|
||||||
Value<int> notify,
|
Value<int> notify,
|
||||||
Value<DateTime?> joinedAt,
|
Value<DateTime?> joinedAt,
|
||||||
Value<DateTime?> breakUntil,
|
Value<DateTime?> breakUntil,
|
||||||
Value<DateTime?> timeoutUntil,
|
Value<DateTime?> timeoutUntil,
|
||||||
Value<bool> isBot,
|
|
||||||
Value<String?> status,
|
|
||||||
Value<DateTime?> lastTyped,
|
|
||||||
Value<DateTime> createdAt,
|
Value<DateTime> createdAt,
|
||||||
Value<DateTime> updatedAt,
|
Value<DateTime> updatedAt,
|
||||||
Value<DateTime?> deletedAt,
|
Value<DateTime?> deletedAt,
|
||||||
@@ -3987,11 +3855,6 @@ class $$ChatMembersTableFilterComposer
|
|||||||
builder: (column) => ColumnFilters(column),
|
builder: (column) => ColumnFilters(column),
|
||||||
);
|
);
|
||||||
|
|
||||||
ColumnFilters<int> get role => $composableBuilder(
|
|
||||||
column: $table.role,
|
|
||||||
builder: (column) => ColumnFilters(column),
|
|
||||||
);
|
|
||||||
|
|
||||||
ColumnFilters<int> get notify => $composableBuilder(
|
ColumnFilters<int> get notify => $composableBuilder(
|
||||||
column: $table.notify,
|
column: $table.notify,
|
||||||
builder: (column) => ColumnFilters(column),
|
builder: (column) => ColumnFilters(column),
|
||||||
@@ -4012,21 +3875,6 @@ class $$ChatMembersTableFilterComposer
|
|||||||
builder: (column) => ColumnFilters(column),
|
builder: (column) => ColumnFilters(column),
|
||||||
);
|
);
|
||||||
|
|
||||||
ColumnFilters<bool> get isBot => $composableBuilder(
|
|
||||||
column: $table.isBot,
|
|
||||||
builder: (column) => ColumnFilters(column),
|
|
||||||
);
|
|
||||||
|
|
||||||
ColumnFilters<String> get status => $composableBuilder(
|
|
||||||
column: $table.status,
|
|
||||||
builder: (column) => ColumnFilters(column),
|
|
||||||
);
|
|
||||||
|
|
||||||
ColumnFilters<DateTime> get lastTyped => $composableBuilder(
|
|
||||||
column: $table.lastTyped,
|
|
||||||
builder: (column) => ColumnFilters(column),
|
|
||||||
);
|
|
||||||
|
|
||||||
ColumnFilters<DateTime> get createdAt => $composableBuilder(
|
ColumnFilters<DateTime> get createdAt => $composableBuilder(
|
||||||
column: $table.createdAt,
|
column: $table.createdAt,
|
||||||
builder: (column) => ColumnFilters(column),
|
builder: (column) => ColumnFilters(column),
|
||||||
@@ -4120,11 +3968,6 @@ class $$ChatMembersTableOrderingComposer
|
|||||||
builder: (column) => ColumnOrderings(column),
|
builder: (column) => ColumnOrderings(column),
|
||||||
);
|
);
|
||||||
|
|
||||||
ColumnOrderings<int> get role => $composableBuilder(
|
|
||||||
column: $table.role,
|
|
||||||
builder: (column) => ColumnOrderings(column),
|
|
||||||
);
|
|
||||||
|
|
||||||
ColumnOrderings<int> get notify => $composableBuilder(
|
ColumnOrderings<int> get notify => $composableBuilder(
|
||||||
column: $table.notify,
|
column: $table.notify,
|
||||||
builder: (column) => ColumnOrderings(column),
|
builder: (column) => ColumnOrderings(column),
|
||||||
@@ -4145,21 +3988,6 @@ class $$ChatMembersTableOrderingComposer
|
|||||||
builder: (column) => ColumnOrderings(column),
|
builder: (column) => ColumnOrderings(column),
|
||||||
);
|
);
|
||||||
|
|
||||||
ColumnOrderings<bool> get isBot => $composableBuilder(
|
|
||||||
column: $table.isBot,
|
|
||||||
builder: (column) => ColumnOrderings(column),
|
|
||||||
);
|
|
||||||
|
|
||||||
ColumnOrderings<String> get status => $composableBuilder(
|
|
||||||
column: $table.status,
|
|
||||||
builder: (column) => ColumnOrderings(column),
|
|
||||||
);
|
|
||||||
|
|
||||||
ColumnOrderings<DateTime> get lastTyped => $composableBuilder(
|
|
||||||
column: $table.lastTyped,
|
|
||||||
builder: (column) => ColumnOrderings(column),
|
|
||||||
);
|
|
||||||
|
|
||||||
ColumnOrderings<DateTime> get createdAt => $composableBuilder(
|
ColumnOrderings<DateTime> get createdAt => $composableBuilder(
|
||||||
column: $table.createdAt,
|
column: $table.createdAt,
|
||||||
builder: (column) => ColumnOrderings(column),
|
builder: (column) => ColumnOrderings(column),
|
||||||
@@ -4220,9 +4048,6 @@ class $$ChatMembersTableAnnotationComposer
|
|||||||
GeneratedColumn<String> get nick =>
|
GeneratedColumn<String> get nick =>
|
||||||
$composableBuilder(column: $table.nick, builder: (column) => column);
|
$composableBuilder(column: $table.nick, builder: (column) => column);
|
||||||
|
|
||||||
GeneratedColumn<int> get role =>
|
|
||||||
$composableBuilder(column: $table.role, builder: (column) => column);
|
|
||||||
|
|
||||||
GeneratedColumn<int> get notify =>
|
GeneratedColumn<int> get notify =>
|
||||||
$composableBuilder(column: $table.notify, builder: (column) => column);
|
$composableBuilder(column: $table.notify, builder: (column) => column);
|
||||||
|
|
||||||
@@ -4239,15 +4064,6 @@ class $$ChatMembersTableAnnotationComposer
|
|||||||
builder: (column) => column,
|
builder: (column) => column,
|
||||||
);
|
);
|
||||||
|
|
||||||
GeneratedColumn<bool> get isBot =>
|
|
||||||
$composableBuilder(column: $table.isBot, builder: (column) => column);
|
|
||||||
|
|
||||||
GeneratedColumn<String> get status =>
|
|
||||||
$composableBuilder(column: $table.status, builder: (column) => column);
|
|
||||||
|
|
||||||
GeneratedColumn<DateTime> get lastTyped =>
|
|
||||||
$composableBuilder(column: $table.lastTyped, builder: (column) => column);
|
|
||||||
|
|
||||||
GeneratedColumn<DateTime> get createdAt =>
|
GeneratedColumn<DateTime> get createdAt =>
|
||||||
$composableBuilder(column: $table.createdAt, builder: (column) => column);
|
$composableBuilder(column: $table.createdAt, builder: (column) => column);
|
||||||
|
|
||||||
@@ -4340,14 +4156,10 @@ class $$ChatMembersTableTableManager
|
|||||||
Value<String> accountId = const Value.absent(),
|
Value<String> accountId = const Value.absent(),
|
||||||
Value<Map<String, dynamic>> account = const Value.absent(),
|
Value<Map<String, dynamic>> account = const Value.absent(),
|
||||||
Value<String?> nick = const Value.absent(),
|
Value<String?> nick = const Value.absent(),
|
||||||
Value<int> role = const Value.absent(),
|
|
||||||
Value<int> notify = const Value.absent(),
|
Value<int> notify = const Value.absent(),
|
||||||
Value<DateTime?> joinedAt = const Value.absent(),
|
Value<DateTime?> joinedAt = const Value.absent(),
|
||||||
Value<DateTime?> breakUntil = const Value.absent(),
|
Value<DateTime?> breakUntil = const Value.absent(),
|
||||||
Value<DateTime?> timeoutUntil = const Value.absent(),
|
Value<DateTime?> timeoutUntil = const Value.absent(),
|
||||||
Value<bool> isBot = const Value.absent(),
|
|
||||||
Value<String?> status = const Value.absent(),
|
|
||||||
Value<DateTime?> lastTyped = const Value.absent(),
|
|
||||||
Value<DateTime> createdAt = const Value.absent(),
|
Value<DateTime> createdAt = const Value.absent(),
|
||||||
Value<DateTime> updatedAt = const Value.absent(),
|
Value<DateTime> updatedAt = const Value.absent(),
|
||||||
Value<DateTime?> deletedAt = const Value.absent(),
|
Value<DateTime?> deletedAt = const Value.absent(),
|
||||||
@@ -4358,14 +4170,10 @@ class $$ChatMembersTableTableManager
|
|||||||
accountId: accountId,
|
accountId: accountId,
|
||||||
account: account,
|
account: account,
|
||||||
nick: nick,
|
nick: nick,
|
||||||
role: role,
|
|
||||||
notify: notify,
|
notify: notify,
|
||||||
joinedAt: joinedAt,
|
joinedAt: joinedAt,
|
||||||
breakUntil: breakUntil,
|
breakUntil: breakUntil,
|
||||||
timeoutUntil: timeoutUntil,
|
timeoutUntil: timeoutUntil,
|
||||||
isBot: isBot,
|
|
||||||
status: status,
|
|
||||||
lastTyped: lastTyped,
|
|
||||||
createdAt: createdAt,
|
createdAt: createdAt,
|
||||||
updatedAt: updatedAt,
|
updatedAt: updatedAt,
|
||||||
deletedAt: deletedAt,
|
deletedAt: deletedAt,
|
||||||
@@ -4378,14 +4186,10 @@ class $$ChatMembersTableTableManager
|
|||||||
required String accountId,
|
required String accountId,
|
||||||
required Map<String, dynamic> account,
|
required Map<String, dynamic> account,
|
||||||
Value<String?> nick = const Value.absent(),
|
Value<String?> nick = const Value.absent(),
|
||||||
required int role,
|
|
||||||
required int notify,
|
required int notify,
|
||||||
Value<DateTime?> joinedAt = const Value.absent(),
|
Value<DateTime?> joinedAt = const Value.absent(),
|
||||||
Value<DateTime?> breakUntil = const Value.absent(),
|
Value<DateTime?> breakUntil = const Value.absent(),
|
||||||
Value<DateTime?> timeoutUntil = const Value.absent(),
|
Value<DateTime?> timeoutUntil = const Value.absent(),
|
||||||
required bool isBot,
|
|
||||||
Value<String?> status = const Value.absent(),
|
|
||||||
Value<DateTime?> lastTyped = const Value.absent(),
|
|
||||||
required DateTime createdAt,
|
required DateTime createdAt,
|
||||||
required DateTime updatedAt,
|
required DateTime updatedAt,
|
||||||
Value<DateTime?> deletedAt = const Value.absent(),
|
Value<DateTime?> deletedAt = const Value.absent(),
|
||||||
@@ -4396,14 +4200,10 @@ class $$ChatMembersTableTableManager
|
|||||||
accountId: accountId,
|
accountId: accountId,
|
||||||
account: account,
|
account: account,
|
||||||
nick: nick,
|
nick: nick,
|
||||||
role: role,
|
|
||||||
notify: notify,
|
notify: notify,
|
||||||
joinedAt: joinedAt,
|
joinedAt: joinedAt,
|
||||||
breakUntil: breakUntil,
|
breakUntil: breakUntil,
|
||||||
timeoutUntil: timeoutUntil,
|
timeoutUntil: timeoutUntil,
|
||||||
isBot: isBot,
|
|
||||||
status: status,
|
|
||||||
lastTyped: lastTyped,
|
|
||||||
createdAt: createdAt,
|
createdAt: createdAt,
|
||||||
updatedAt: updatedAt,
|
updatedAt: updatedAt,
|
||||||
deletedAt: deletedAt,
|
deletedAt: deletedAt,
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ class ChatRooms extends Table {
|
|||||||
TextColumn get picture => text().map(const MapConverter()).nullable()();
|
TextColumn get picture => text().map(const MapConverter()).nullable()();
|
||||||
TextColumn get background => text().map(const MapConverter()).nullable()();
|
TextColumn get background => text().map(const MapConverter()).nullable()();
|
||||||
TextColumn get realmId => text().nullable()();
|
TextColumn get realmId => text().nullable()();
|
||||||
|
TextColumn get accountId => text().nullable()();
|
||||||
DateTimeColumn get createdAt => dateTime()();
|
DateTimeColumn get createdAt => dateTime()();
|
||||||
DateTimeColumn get updatedAt => dateTime()();
|
DateTimeColumn get updatedAt => dateTime()();
|
||||||
DateTimeColumn get deletedAt => dateTime().nullable()();
|
DateTimeColumn get deletedAt => dateTime().nullable()();
|
||||||
@@ -62,14 +63,10 @@ class ChatMembers extends Table {
|
|||||||
TextColumn get accountId => text()();
|
TextColumn get accountId => text()();
|
||||||
TextColumn get account => text().map(const MapConverter())();
|
TextColumn get account => text().map(const MapConverter())();
|
||||||
TextColumn get nick => text().nullable()();
|
TextColumn get nick => text().nullable()();
|
||||||
IntColumn get role => integer()();
|
|
||||||
IntColumn get notify => integer()();
|
IntColumn get notify => integer()();
|
||||||
DateTimeColumn get joinedAt => dateTime().nullable()();
|
DateTimeColumn get joinedAt => dateTime().nullable()();
|
||||||
DateTimeColumn get breakUntil => dateTime().nullable()();
|
DateTimeColumn get breakUntil => dateTime().nullable()();
|
||||||
DateTimeColumn get timeoutUntil => dateTime().nullable()();
|
DateTimeColumn get timeoutUntil => dateTime().nullable()();
|
||||||
BoolColumn get isBot => boolean()();
|
|
||||||
TextColumn get status => text().nullable()();
|
|
||||||
DateTimeColumn get lastTyped => dateTime().nullable()();
|
|
||||||
DateTimeColumn get createdAt => dateTime()();
|
DateTimeColumn get createdAt => dateTime()();
|
||||||
DateTimeColumn get updatedAt => dateTime()();
|
DateTimeColumn get updatedAt => dateTime()();
|
||||||
DateTimeColumn get deletedAt => dateTime().nullable()();
|
DateTimeColumn get deletedAt => dateTime().nullable()();
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ sealed class SnAccount with _$SnAccount {
|
|||||||
required SnWalletSubscriptionRef? perkSubscription,
|
required SnWalletSubscriptionRef? perkSubscription,
|
||||||
@Default([]) List<SnAccountBadge> badges,
|
@Default([]) List<SnAccountBadge> badges,
|
||||||
@Default([]) List<SnContactMethod> contacts,
|
@Default([]) List<SnContactMethod> contacts,
|
||||||
|
required DateTime? activatedAt,
|
||||||
required DateTime createdAt,
|
required DateTime createdAt,
|
||||||
required DateTime updatedAt,
|
required DateTime updatedAt,
|
||||||
required DateTime? deletedAt,
|
required DateTime? deletedAt,
|
||||||
@@ -215,20 +216,20 @@ sealed class SnAuthDevice with _$SnAuthDevice {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
sealed class SnAuthDeviceWithChallenge with _$SnAuthDeviceWithChallenge {
|
sealed class SnAuthDeviceWithSession with _$SnAuthDeviceWithSession {
|
||||||
const factory SnAuthDeviceWithChallenge({
|
const factory SnAuthDeviceWithSession({
|
||||||
required String id,
|
required String id,
|
||||||
required String deviceId,
|
required String deviceId,
|
||||||
required String deviceName,
|
required String deviceName,
|
||||||
required String? deviceLabel,
|
required String? deviceLabel,
|
||||||
required String accountId,
|
required String accountId,
|
||||||
required int platform,
|
required int platform,
|
||||||
required List<SnAuthChallenge> challenges,
|
required List<SnAuthSession> sessions,
|
||||||
@Default(false) bool isCurrent,
|
@Default(false) bool isCurrent,
|
||||||
}) = _SnAuthDeviceWithChallengee;
|
}) = _SnAuthDeviceWithSessione;
|
||||||
|
|
||||||
factory SnAuthDeviceWithChallenge.fromJson(Map<String, dynamic> json) =>
|
factory SnAuthDeviceWithSession.fromJson(Map<String, dynamic> json) =>
|
||||||
_$SnAuthDeviceWithChallengeFromJson(json);
|
_$SnAuthDeviceWithSessionFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
|
|||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$SnAccount {
|
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
|
/// Create a copy of SnAccount
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@@ -28,16 +28,16 @@ $SnAccountCopyWith<SnAccount> get copyWith => _$SnAccountCopyWithImpl<SnAccount>
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
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)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@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
|
@override
|
||||||
String toString() {
|
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;
|
factory $SnAccountCopyWith(SnAccount value, $Res Function(SnAccount) _then) = _$SnAccountCopyWithImpl;
|
||||||
@useResult
|
@useResult
|
||||||
$Res call({
|
$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
|
/// Create a copy of SnAccount
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// 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(
|
return _then(_self.copyWith(
|
||||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
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,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 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 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<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,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,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
|
||||||
as DateTime?,
|
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) {
|
switch (_that) {
|
||||||
case _SnAccount() when $default != null:
|
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();
|
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) {
|
switch (_that) {
|
||||||
case _SnAccount():
|
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`
|
/// 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) {
|
switch (_that) {
|
||||||
case _SnAccount() when $default != null:
|
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;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -237,7 +238,7 @@ return $default(_that.id,_that.name,_that.nick,_that.language,_that.region,_that
|
|||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
|
|
||||||
class _SnAccount implements SnAccount {
|
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);
|
factory _SnAccount.fromJson(Map<String, dynamic> json) => _$SnAccountFromJson(json);
|
||||||
|
|
||||||
@override final String id;
|
@override final String id;
|
||||||
@@ -263,6 +264,7 @@ class _SnAccount implements SnAccount {
|
|||||||
return EqualUnmodifiableListView(_contacts);
|
return EqualUnmodifiableListView(_contacts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override final DateTime? activatedAt;
|
||||||
@override final DateTime createdAt;
|
@override final DateTime createdAt;
|
||||||
@override final DateTime updatedAt;
|
@override final DateTime updatedAt;
|
||||||
@override final DateTime? deletedAt;
|
@override final DateTime? deletedAt;
|
||||||
@@ -280,16 +282,16 @@ Map<String, dynamic> toJson() {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
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)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@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
|
@override
|
||||||
String toString() {
|
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;
|
factory _$SnAccountCopyWith(_SnAccount value, $Res Function(_SnAccount) _then) = __$SnAccountCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$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
|
/// Create a copy of SnAccount
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// 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(
|
return _then(_SnAccount(
|
||||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
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,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 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 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<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,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,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
|
||||||
as DateTime?,
|
as DateTime?,
|
||||||
@@ -3065,51 +3068,51 @@ as bool,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SnAuthDeviceWithChallenge _$SnAuthDeviceWithChallengeFromJson(
|
SnAuthDeviceWithSession _$SnAuthDeviceWithSessionFromJson(
|
||||||
Map<String, dynamic> json
|
Map<String, dynamic> json
|
||||||
) {
|
) {
|
||||||
return _SnAuthDeviceWithChallengee.fromJson(
|
return _SnAuthDeviceWithSessione.fromJson(
|
||||||
json
|
json
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @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;
|
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 SnAuthDeviceWithChallenge
|
/// Create a copy of SnAuthDeviceWithSession
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@pragma('vm:prefer-inline')
|
@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();
|
Map<String, dynamic> toJson();
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
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)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@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
|
@override
|
||||||
String toString() {
|
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
|
/// @nodoc
|
||||||
abstract mixin class $SnAuthDeviceWithChallengeCopyWith<$Res> {
|
abstract mixin class $SnAuthDeviceWithSessionCopyWith<$Res> {
|
||||||
factory $SnAuthDeviceWithChallengeCopyWith(SnAuthDeviceWithChallenge value, $Res Function(SnAuthDeviceWithChallenge) _then) = _$SnAuthDeviceWithChallengeCopyWithImpl;
|
factory $SnAuthDeviceWithSessionCopyWith(SnAuthDeviceWithSession value, $Res Function(SnAuthDeviceWithSession) _then) = _$SnAuthDeviceWithSessionCopyWithImpl;
|
||||||
@useResult
|
@useResult
|
||||||
$Res call({
|
$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
|
/// @nodoc
|
||||||
class _$SnAuthDeviceWithChallengeCopyWithImpl<$Res>
|
class _$SnAuthDeviceWithSessionCopyWithImpl<$Res>
|
||||||
implements $SnAuthDeviceWithChallengeCopyWith<$Res> {
|
implements $SnAuthDeviceWithSessionCopyWith<$Res> {
|
||||||
_$SnAuthDeviceWithChallengeCopyWithImpl(this._self, this._then);
|
_$SnAuthDeviceWithSessionCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
final SnAuthDeviceWithChallenge _self;
|
final SnAuthDeviceWithSession _self;
|
||||||
final $Res Function(SnAuthDeviceWithChallenge) _then;
|
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.
|
/// 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(
|
return _then(_self.copyWith(
|
||||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
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,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,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?,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 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 int,sessions: null == sessions ? _self.sessions : sessions // ignore: cast_nullable_to_non_nullable
|
||||||
as List<SnAuthChallenge>,isCurrent: null == isCurrent ? _self.isCurrent : isCurrent // ignore: cast_nullable_to_non_nullable
|
as List<SnAuthSession>,isCurrent: null == isCurrent ? _self.isCurrent : isCurrent // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,
|
as bool,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
@@ -3143,8 +3146,8 @@ as bool,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Adds pattern-matching-related methods to [SnAuthDeviceWithChallenge].
|
/// Adds pattern-matching-related methods to [SnAuthDeviceWithSession].
|
||||||
extension SnAuthDeviceWithChallengePatterns on SnAuthDeviceWithChallenge {
|
extension SnAuthDeviceWithSessionPatterns on SnAuthDeviceWithSession {
|
||||||
/// A variant of `map` that fallback to returning `orElse`.
|
/// A variant of `map` that fallback to returning `orElse`.
|
||||||
///
|
///
|
||||||
/// It is equivalent to doing:
|
/// 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;
|
final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnAuthDeviceWithChallengee() when $default != null:
|
case _SnAuthDeviceWithSessione() when $default != null:
|
||||||
return $default(_that);case _:
|
return $default(_that);case _:
|
||||||
return orElse();
|
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;
|
final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnAuthDeviceWithChallengee():
|
case _SnAuthDeviceWithSessione():
|
||||||
return $default(_that);}
|
return $default(_that);}
|
||||||
}
|
}
|
||||||
/// A variant of `map` that fallback to returning `null`.
|
/// 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;
|
final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnAuthDeviceWithChallengee() when $default != null:
|
case _SnAuthDeviceWithSessione() when $default != null:
|
||||||
return $default(_that);case _:
|
return $default(_that);case _:
|
||||||
return null;
|
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) {
|
switch (_that) {
|
||||||
case _SnAuthDeviceWithChallengee() when $default != null:
|
case _SnAuthDeviceWithSessione() when $default != null:
|
||||||
return $default(_that.id,_that.deviceId,_that.deviceName,_that.deviceLabel,_that.accountId,_that.platform,_that.challenges,_that.isCurrent);case _:
|
return $default(_that.id,_that.deviceId,_that.deviceName,_that.deviceLabel,_that.accountId,_that.platform,_that.sessions,_that.isCurrent);case _:
|
||||||
return orElse();
|
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) {
|
switch (_that) {
|
||||||
case _SnAuthDeviceWithChallengee():
|
case _SnAuthDeviceWithSessione():
|
||||||
return $default(_that.id,_that.deviceId,_that.deviceName,_that.deviceLabel,_that.accountId,_that.platform,_that.challenges,_that.isCurrent);}
|
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`
|
/// 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) {
|
switch (_that) {
|
||||||
case _SnAuthDeviceWithChallengee() when $default != null:
|
case _SnAuthDeviceWithSessione() when $default != null:
|
||||||
return $default(_that.id,_that.deviceId,_that.deviceName,_that.deviceLabel,_that.accountId,_that.platform,_that.challenges,_that.isCurrent);case _:
|
return $default(_that.id,_that.deviceId,_that.deviceName,_that.deviceLabel,_that.accountId,_that.platform,_that.sessions,_that.isCurrent);case _:
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -3270,9 +3273,9 @@ return $default(_that.id,_that.deviceId,_that.deviceName,_that.deviceLabel,_that
|
|||||||
/// @nodoc
|
/// @nodoc
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
|
|
||||||
class _SnAuthDeviceWithChallengee implements SnAuthDeviceWithChallenge {
|
class _SnAuthDeviceWithSessione implements SnAuthDeviceWithSession {
|
||||||
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;
|
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 _SnAuthDeviceWithChallengee.fromJson(Map<String, dynamic> json) => _$SnAuthDeviceWithChallengeeFromJson(json);
|
factory _SnAuthDeviceWithSessione.fromJson(Map<String, dynamic> json) => _$SnAuthDeviceWithSessioneFromJson(json);
|
||||||
|
|
||||||
@override final String id;
|
@override final String id;
|
||||||
@override final String deviceId;
|
@override final String deviceId;
|
||||||
@@ -3280,49 +3283,49 @@ class _SnAuthDeviceWithChallengee implements SnAuthDeviceWithChallenge {
|
|||||||
@override final String? deviceLabel;
|
@override final String? deviceLabel;
|
||||||
@override final String accountId;
|
@override final String accountId;
|
||||||
@override final int platform;
|
@override final int platform;
|
||||||
final List<SnAuthChallenge> _challenges;
|
final List<SnAuthSession> _sessions;
|
||||||
@override List<SnAuthChallenge> get challenges {
|
@override List<SnAuthSession> get sessions {
|
||||||
if (_challenges is EqualUnmodifiableListView) return _challenges;
|
if (_sessions is EqualUnmodifiableListView) return _sessions;
|
||||||
// ignore: implicit_dynamic_type
|
// ignore: implicit_dynamic_type
|
||||||
return EqualUnmodifiableListView(_challenges);
|
return EqualUnmodifiableListView(_sessions);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override@JsonKey() final bool isCurrent;
|
@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.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$SnAuthDeviceWithChallengeeCopyWith<_SnAuthDeviceWithChallengee> get copyWith => __$SnAuthDeviceWithChallengeeCopyWithImpl<_SnAuthDeviceWithChallengee>(this, _$identity);
|
_$SnAuthDeviceWithSessioneCopyWith<_SnAuthDeviceWithSessione> get copyWith => __$SnAuthDeviceWithSessioneCopyWithImpl<_SnAuthDeviceWithSessione>(this, _$identity);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
return _$SnAuthDeviceWithChallengeeToJson(this, );
|
return _$SnAuthDeviceWithSessioneToJson(this, );
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
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)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@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
|
@override
|
||||||
String toString() {
|
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
|
/// @nodoc
|
||||||
abstract mixin class _$SnAuthDeviceWithChallengeeCopyWith<$Res> implements $SnAuthDeviceWithChallengeCopyWith<$Res> {
|
abstract mixin class _$SnAuthDeviceWithSessioneCopyWith<$Res> implements $SnAuthDeviceWithSessionCopyWith<$Res> {
|
||||||
factory _$SnAuthDeviceWithChallengeeCopyWith(_SnAuthDeviceWithChallengee value, $Res Function(_SnAuthDeviceWithChallengee) _then) = __$SnAuthDeviceWithChallengeeCopyWithImpl;
|
factory _$SnAuthDeviceWithSessioneCopyWith(_SnAuthDeviceWithSessione value, $Res Function(_SnAuthDeviceWithSessione) _then) = __$SnAuthDeviceWithSessioneCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$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
|
/// @nodoc
|
||||||
class __$SnAuthDeviceWithChallengeeCopyWithImpl<$Res>
|
class __$SnAuthDeviceWithSessioneCopyWithImpl<$Res>
|
||||||
implements _$SnAuthDeviceWithChallengeeCopyWith<$Res> {
|
implements _$SnAuthDeviceWithSessioneCopyWith<$Res> {
|
||||||
__$SnAuthDeviceWithChallengeeCopyWithImpl(this._self, this._then);
|
__$SnAuthDeviceWithSessioneCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
final _SnAuthDeviceWithChallengee _self;
|
final _SnAuthDeviceWithSessione _self;
|
||||||
final $Res Function(_SnAuthDeviceWithChallengee) _then;
|
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.
|
/// 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,}) {
|
@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(_SnAuthDeviceWithChallengee(
|
return _then(_SnAuthDeviceWithSessione(
|
||||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
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,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,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,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?,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 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 int,sessions: null == sessions ? _self._sessions : sessions // ignore: cast_nullable_to_non_nullable
|
||||||
as List<SnAuthChallenge>,isCurrent: null == isCurrent ? _self.isCurrent : isCurrent // ignore: cast_nullable_to_non_nullable
|
as List<SnAuthSession>,isCurrent: null == isCurrent ? _self.isCurrent : isCurrent // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,
|
as bool,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,6 +31,10 @@ _SnAccount _$SnAccountFromJson(Map<String, dynamic> json) => _SnAccount(
|
|||||||
?.map((e) => SnContactMethod.fromJson(e as Map<String, dynamic>))
|
?.map((e) => SnContactMethod.fromJson(e as Map<String, dynamic>))
|
||||||
.toList() ??
|
.toList() ??
|
||||||
const [],
|
const [],
|
||||||
|
activatedAt:
|
||||||
|
json['activated_at'] == null
|
||||||
|
? null
|
||||||
|
: DateTime.parse(json['activated_at'] as String),
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt:
|
||||||
@@ -52,6 +56,7 @@ Map<String, dynamic> _$SnAccountToJson(_SnAccount instance) =>
|
|||||||
'perk_subscription': instance.perkSubscription?.toJson(),
|
'perk_subscription': instance.perkSubscription?.toJson(),
|
||||||
'badges': instance.badges.map((e) => e.toJson()).toList(),
|
'badges': instance.badges.map((e) => e.toJson()).toList(),
|
||||||
'contacts': instance.contacts.map((e) => e.toJson()).toList(),
|
'contacts': instance.contacts.map((e) => e.toJson()).toList(),
|
||||||
|
'activated_at': instance.activatedAt?.toIso8601String(),
|
||||||
'created_at': instance.createdAt.toIso8601String(),
|
'created_at': instance.createdAt.toIso8601String(),
|
||||||
'updated_at': instance.updatedAt.toIso8601String(),
|
'updated_at': instance.updatedAt.toIso8601String(),
|
||||||
'deleted_at': instance.deletedAt?.toIso8601String(),
|
'deleted_at': instance.deletedAt?.toIso8601String(),
|
||||||
@@ -362,24 +367,24 @@ Map<String, dynamic> _$SnAuthDeviceToJson(_SnAuthDevice instance) =>
|
|||||||
'is_current': instance.isCurrent,
|
'is_current': instance.isCurrent,
|
||||||
};
|
};
|
||||||
|
|
||||||
_SnAuthDeviceWithChallengee _$SnAuthDeviceWithChallengeeFromJson(
|
_SnAuthDeviceWithSessione _$SnAuthDeviceWithSessioneFromJson(
|
||||||
Map<String, dynamic> json,
|
Map<String, dynamic> json,
|
||||||
) => _SnAuthDeviceWithChallengee(
|
) => _SnAuthDeviceWithSessione(
|
||||||
id: json['id'] as String,
|
id: json['id'] as String,
|
||||||
deviceId: json['device_id'] as String,
|
deviceId: json['device_id'] as String,
|
||||||
deviceName: json['device_name'] as String,
|
deviceName: json['device_name'] as String,
|
||||||
deviceLabel: json['device_label'] as String?,
|
deviceLabel: json['device_label'] as String?,
|
||||||
accountId: json['account_id'] as String,
|
accountId: json['account_id'] as String,
|
||||||
platform: (json['platform'] as num).toInt(),
|
platform: (json['platform'] as num).toInt(),
|
||||||
challenges:
|
sessions:
|
||||||
(json['challenges'] as List<dynamic>)
|
(json['sessions'] as List<dynamic>)
|
||||||
.map((e) => SnAuthChallenge.fromJson(e as Map<String, dynamic>))
|
.map((e) => SnAuthSession.fromJson(e as Map<String, dynamic>))
|
||||||
.toList(),
|
.toList(),
|
||||||
isCurrent: json['is_current'] as bool? ?? false,
|
isCurrent: json['is_current'] as bool? ?? false,
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$SnAuthDeviceWithChallengeeToJson(
|
Map<String, dynamic> _$SnAuthDeviceWithSessioneToJson(
|
||||||
_SnAuthDeviceWithChallengee instance,
|
_SnAuthDeviceWithSessione instance,
|
||||||
) => <String, dynamic>{
|
) => <String, dynamic>{
|
||||||
'id': instance.id,
|
'id': instance.id,
|
||||||
'device_id': instance.deviceId,
|
'device_id': instance.deviceId,
|
||||||
@@ -387,7 +392,7 @@ Map<String, dynamic> _$SnAuthDeviceWithChallengeeToJson(
|
|||||||
'device_label': instance.deviceLabel,
|
'device_label': instance.deviceLabel,
|
||||||
'account_id': instance.accountId,
|
'account_id': instance.accountId,
|
||||||
'platform': instance.platform,
|
'platform': instance.platform,
|
||||||
'challenges': instance.challenges.map((e) => e.toJson()).toList(),
|
'sessions': instance.sessions.map((e) => e.toJson()).toList(),
|
||||||
'is_current': instance.isCurrent,
|
'is_current': instance.isCurrent,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ sealed class SnAuthChallenge with _$SnAuthChallenge {
|
|||||||
required int stepRemain,
|
required int stepRemain,
|
||||||
required int stepTotal,
|
required int stepTotal,
|
||||||
required int failedAttempts,
|
required int failedAttempts,
|
||||||
required int type,
|
|
||||||
required List<String> blacklistFactors,
|
required List<String> blacklistFactors,
|
||||||
required List<dynamic> audiences,
|
required List<dynamic> audiences,
|
||||||
required List<dynamic> scopes,
|
required List<dynamic> scopes,
|
||||||
@@ -58,9 +57,13 @@ sealed class SnAuthSession with _$SnAuthSession {
|
|||||||
required String? label,
|
required String? label,
|
||||||
required DateTime lastGrantedAt,
|
required DateTime lastGrantedAt,
|
||||||
required DateTime? expiredAt,
|
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 accountId,
|
||||||
required String challengeId,
|
|
||||||
required SnAuthChallenge challenge,
|
|
||||||
required DateTime createdAt,
|
required DateTime createdAt,
|
||||||
required DateTime updatedAt,
|
required DateTime updatedAt,
|
||||||
required DateTime? deletedAt,
|
required DateTime? deletedAt,
|
||||||
|
|||||||
@@ -541,7 +541,7 @@ as String?,
|
|||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$SnAuthChallenge {
|
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
|
/// Create a copy of SnAuthChallenge
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@@ -554,16 +554,16 @@ $SnAuthChallengeCopyWith<SnAuthChallenge> get copyWith => _$SnAuthChallengeCopyW
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
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)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@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
|
@override
|
||||||
String toString() {
|
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;
|
factory $SnAuthChallengeCopyWith(SnAuthChallenge value, $Res Function(SnAuthChallenge) _then) = _$SnAuthChallengeCopyWithImpl;
|
||||||
@useResult
|
@useResult
|
||||||
$Res call({
|
$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
|
/// Create a copy of SnAuthChallenge
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// 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(
|
return _then(_self.copyWith(
|
||||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
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 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 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,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,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 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<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
|
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) {
|
switch (_that) {
|
||||||
case _SnAuthChallenge() when $default != null:
|
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();
|
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) {
|
switch (_that) {
|
||||||
case _SnAuthChallenge():
|
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`
|
/// 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) {
|
switch (_that) {
|
||||||
case _SnAuthChallenge() when $default != null:
|
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;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -757,7 +756,7 @@ return $default(_that.id,_that.expiredAt,_that.stepRemain,_that.stepTotal,_that.
|
|||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
|
|
||||||
class _SnAuthChallenge implements SnAuthChallenge {
|
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);
|
factory _SnAuthChallenge.fromJson(Map<String, dynamic> json) => _$SnAuthChallengeFromJson(json);
|
||||||
|
|
||||||
@override final String id;
|
@override final String id;
|
||||||
@@ -765,7 +764,6 @@ class _SnAuthChallenge implements SnAuthChallenge {
|
|||||||
@override final int stepRemain;
|
@override final int stepRemain;
|
||||||
@override final int stepTotal;
|
@override final int stepTotal;
|
||||||
@override final int failedAttempts;
|
@override final int failedAttempts;
|
||||||
@override final int type;
|
|
||||||
final List<String> _blacklistFactors;
|
final List<String> _blacklistFactors;
|
||||||
@override List<String> get blacklistFactors {
|
@override List<String> get blacklistFactors {
|
||||||
if (_blacklistFactors is EqualUnmodifiableListView) return _blacklistFactors;
|
if (_blacklistFactors is EqualUnmodifiableListView) return _blacklistFactors;
|
||||||
@@ -809,16 +807,16 @@ Map<String, dynamic> toJson() {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
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)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@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
|
@override
|
||||||
String toString() {
|
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;
|
factory _$SnAuthChallengeCopyWith(_SnAuthChallenge value, $Res Function(_SnAuthChallenge) _then) = __$SnAuthChallengeCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$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
|
/// Create a copy of SnAuthChallenge
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// 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(
|
return _then(_SnAuthChallenge(
|
||||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
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 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 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,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,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 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<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
|
as List<dynamic>,scopes: null == scopes ? _self._scopes : scopes // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -888,7 +885,7 @@ $GeoIpLocationCopyWith<$Res>? get location {
|
|||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$SnAuthSession {
|
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
|
/// Create a copy of SnAuthSession
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@@ -901,16 +898,16 @@ $SnAuthSessionCopyWith<SnAuthSession> get copyWith => _$SnAuthSessionCopyWithImp
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
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)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@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
|
@override
|
||||||
String toString() {
|
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;
|
factory $SnAuthSessionCopyWith(SnAuthSession value, $Res Function(SnAuthSession) _then) = _$SnAuthSessionCopyWithImpl;
|
||||||
@useResult
|
@useResult
|
||||||
$Res call({
|
$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
|
/// @nodoc
|
||||||
@@ -938,16 +935,20 @@ class _$SnAuthSessionCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of SnAuthSession
|
/// Create a copy of SnAuthSession
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// 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(
|
return _then(_self.copyWith(
|
||||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
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,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 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,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 DateTime?,audiences: null == audiences ? _self.audiences : audiences // ignore: cast_nullable_to_non_nullable
|
||||||
as String,challengeId: null == challengeId ? _self.challengeId : challengeId // ignore: cast_nullable_to_non_nullable
|
as List<dynamic>,scopes: null == scopes ? _self.scopes : scopes // ignore: cast_nullable_to_non_nullable
|
||||||
as String,challenge: null == challenge ? _self.challenge : challenge // ignore: cast_nullable_to_non_nullable
|
as List<dynamic>,ipAddress: freezed == ipAddress ? _self.ipAddress : ipAddress // ignore: cast_nullable_to_non_nullable
|
||||||
as SnAuthChallenge,createdAt: null == createdAt ? _self.createdAt : createdAt // 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,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,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
|
||||||
as DateTime?,
|
as DateTime?,
|
||||||
@@ -957,10 +958,13 @@ as DateTime?,
|
|||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
$SnAuthChallengeCopyWith<$Res> get challenge {
|
$GeoIpLocationCopyWith<$Res>? get location {
|
||||||
|
if (_self.location == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return $SnAuthChallengeCopyWith<$Res>(_self.challenge, (value) {
|
return $GeoIpLocationCopyWith<$Res>(_self.location!, (value) {
|
||||||
return _then(_self.copyWith(challenge: 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) {
|
switch (_that) {
|
||||||
case _SnAuthSession() when $default != null:
|
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();
|
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) {
|
switch (_that) {
|
||||||
case _SnAuthSession():
|
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`
|
/// 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) {
|
switch (_that) {
|
||||||
case _SnAuthSession() when $default != null:
|
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;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1094,16 +1098,32 @@ return $default(_that.id,_that.label,_that.lastGrantedAt,_that.expiredAt,_that.a
|
|||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
|
|
||||||
class _SnAuthSession implements SnAuthSession {
|
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);
|
factory _SnAuthSession.fromJson(Map<String, dynamic> json) => _$SnAuthSessionFromJson(json);
|
||||||
|
|
||||||
@override final String id;
|
@override final String id;
|
||||||
@override final String? label;
|
@override final String? label;
|
||||||
@override final DateTime lastGrantedAt;
|
@override final DateTime lastGrantedAt;
|
||||||
@override final DateTime? expiredAt;
|
@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 accountId;
|
||||||
@override final String challengeId;
|
|
||||||
@override final SnAuthChallenge challenge;
|
|
||||||
@override final DateTime createdAt;
|
@override final DateTime createdAt;
|
||||||
@override final DateTime updatedAt;
|
@override final DateTime updatedAt;
|
||||||
@override final DateTime? deletedAt;
|
@override final DateTime? deletedAt;
|
||||||
@@ -1121,16 +1141,16 @@ Map<String, dynamic> toJson() {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
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)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@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
|
@override
|
||||||
String toString() {
|
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;
|
factory _$SnAuthSessionCopyWith(_SnAuthSession value, $Res Function(_SnAuthSession) _then) = __$SnAuthSessionCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$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
|
/// @nodoc
|
||||||
@@ -1158,16 +1178,20 @@ class __$SnAuthSessionCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of SnAuthSession
|
/// Create a copy of SnAuthSession
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// 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(
|
return _then(_SnAuthSession(
|
||||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
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,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 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,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 DateTime?,audiences: null == audiences ? _self._audiences : audiences // ignore: cast_nullable_to_non_nullable
|
||||||
as String,challengeId: null == challengeId ? _self.challengeId : challengeId // ignore: cast_nullable_to_non_nullable
|
as List<dynamic>,scopes: null == scopes ? _self._scopes : scopes // ignore: cast_nullable_to_non_nullable
|
||||||
as String,challenge: null == challenge ? _self.challenge : challenge // ignore: cast_nullable_to_non_nullable
|
as List<dynamic>,ipAddress: freezed == ipAddress ? _self.ipAddress : ipAddress // ignore: cast_nullable_to_non_nullable
|
||||||
as SnAuthChallenge,createdAt: null == createdAt ? _self.createdAt : createdAt // 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,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,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
|
||||||
as DateTime?,
|
as DateTime?,
|
||||||
@@ -1178,10 +1202,13 @@ as DateTime?,
|
|||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
$SnAuthChallengeCopyWith<$Res> get challenge {
|
$GeoIpLocationCopyWith<$Res>? get location {
|
||||||
|
if (_self.location == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return $SnAuthChallengeCopyWith<$Res>(_self.challenge, (value) {
|
return $GeoIpLocationCopyWith<$Res>(_self.location!, (value) {
|
||||||
return _then(_self.copyWith(challenge: value));
|
return _then(_self.copyWith(location: value));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ _SnAuthChallenge _$SnAuthChallengeFromJson(Map<String, dynamic> json) =>
|
|||||||
stepRemain: (json['step_remain'] as num).toInt(),
|
stepRemain: (json['step_remain'] as num).toInt(),
|
||||||
stepTotal: (json['step_total'] as num).toInt(),
|
stepTotal: (json['step_total'] as num).toInt(),
|
||||||
failedAttempts: (json['failed_attempts'] as num).toInt(),
|
failedAttempts: (json['failed_attempts'] as num).toInt(),
|
||||||
type: (json['type'] as num).toInt(),
|
|
||||||
blacklistFactors:
|
blacklistFactors:
|
||||||
(json['blacklist_factors'] as List<dynamic>)
|
(json['blacklist_factors'] as List<dynamic>)
|
||||||
.map((e) => e as String)
|
.map((e) => e as String)
|
||||||
@@ -73,7 +72,6 @@ Map<String, dynamic> _$SnAuthChallengeToJson(_SnAuthChallenge instance) =>
|
|||||||
'step_remain': instance.stepRemain,
|
'step_remain': instance.stepRemain,
|
||||||
'step_total': instance.stepTotal,
|
'step_total': instance.stepTotal,
|
||||||
'failed_attempts': instance.failedAttempts,
|
'failed_attempts': instance.failedAttempts,
|
||||||
'type': instance.type,
|
|
||||||
'blacklist_factors': instance.blacklistFactors,
|
'blacklist_factors': instance.blacklistFactors,
|
||||||
'audiences': instance.audiences,
|
'audiences': instance.audiences,
|
||||||
'scopes': instance.scopes,
|
'scopes': instance.scopes,
|
||||||
@@ -96,11 +94,18 @@ _SnAuthSession _$SnAuthSessionFromJson(Map<String, dynamic> json) =>
|
|||||||
json['expired_at'] == null
|
json['expired_at'] == null
|
||||||
? null
|
? null
|
||||||
: DateTime.parse(json['expired_at'] as String),
|
: DateTime.parse(json['expired_at'] as String),
|
||||||
accountId: json['account_id'] as String,
|
audiences: json['audiences'] as List<dynamic>,
|
||||||
challengeId: json['challenge_id'] as String,
|
scopes: json['scopes'] as List<dynamic>,
|
||||||
challenge: SnAuthChallenge.fromJson(
|
ipAddress: json['ip_address'] as String?,
|
||||||
json['challenge'] as Map<String, dynamic>,
|
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,
|
||||||
createdAt: DateTime.parse(json['created_at'] as String),
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
deletedAt:
|
deletedAt:
|
||||||
@@ -115,9 +120,13 @@ Map<String, dynamic> _$SnAuthSessionToJson(_SnAuthSession instance) =>
|
|||||||
'label': instance.label,
|
'label': instance.label,
|
||||||
'last_granted_at': instance.lastGrantedAt.toIso8601String(),
|
'last_granted_at': instance.lastGrantedAt.toIso8601String(),
|
||||||
'expired_at': instance.expiredAt?.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,
|
'account_id': instance.accountId,
|
||||||
'challenge_id': instance.challengeId,
|
|
||||||
'challenge': instance.challenge.toJson(),
|
|
||||||
'created_at': instance.createdAt.toIso8601String(),
|
'created_at': instance.createdAt.toIso8601String(),
|
||||||
'updated_at': instance.updatedAt.toIso8601String(),
|
'updated_at': instance.updatedAt.toIso8601String(),
|
||||||
'deleted_at': instance.deletedAt?.toIso8601String(),
|
'deleted_at': instance.deletedAt?.toIso8601String(),
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ sealed class SnChatRoom with _$SnChatRoom {
|
|||||||
required SnCloudFile? picture,
|
required SnCloudFile? picture,
|
||||||
required SnCloudFile? background,
|
required SnCloudFile? background,
|
||||||
required String? realmId,
|
required String? realmId,
|
||||||
|
required String? accountId,
|
||||||
required SnRealm? realm,
|
required SnRealm? realm,
|
||||||
required DateTime createdAt,
|
required DateTime createdAt,
|
||||||
required DateTime updatedAt,
|
required DateTime updatedAt,
|
||||||
@@ -85,12 +86,10 @@ sealed class SnChatMember with _$SnChatMember {
|
|||||||
required String accountId,
|
required String accountId,
|
||||||
required SnAccount account,
|
required SnAccount account,
|
||||||
required String? nick,
|
required String? nick,
|
||||||
required int role,
|
|
||||||
required int notify,
|
required int notify,
|
||||||
required DateTime? joinedAt,
|
required DateTime? joinedAt,
|
||||||
required DateTime? breakUntil,
|
required DateTime? breakUntil,
|
||||||
required DateTime? timeoutUntil,
|
required DateTime? timeoutUntil,
|
||||||
required bool isBot,
|
|
||||||
required SnAccountStatus? status,
|
required SnAccountStatus? status,
|
||||||
// Frontend data
|
// Frontend data
|
||||||
DateTime? lastTyped,
|
DateTime? lastTyped,
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
|
|||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$SnChatRoom {
|
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;
|
||||||
/// Create a copy of SnChatRoom
|
/// Create a copy of SnChatRoom
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@@ -28,16 +28,16 @@ $SnChatRoomCopyWith<SnChatRoom> get copyWith => _$SnChatRoomCopyWithImpl<SnChatR
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
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));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@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));
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
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)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ abstract mixin class $SnChatRoomCopyWith<$Res> {
|
|||||||
factory $SnChatRoomCopyWith(SnChatRoom value, $Res Function(SnChatRoom) _then) = _$SnChatRoomCopyWithImpl;
|
factory $SnChatRoomCopyWith(SnChatRoom value, $Res Function(SnChatRoom) _then) = _$SnChatRoomCopyWithImpl;
|
||||||
@useResult
|
@useResult
|
||||||
$Res call({
|
$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
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ class _$SnChatRoomCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of SnChatRoom
|
/// Create a copy of SnChatRoom
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// 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,}) {
|
||||||
return _then(_self.copyWith(
|
return _then(_self.copyWith(
|
||||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
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
|
as String,name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -76,6 +76,7 @@ as bool,isCommunity: null == isCommunity ? _self.isCommunity : isCommunity // ig
|
|||||||
as bool,picture: freezed == picture ? _self.picture : picture // ignore: cast_nullable_to_non_nullable
|
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?,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 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 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 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,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -199,10 +200,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)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnChatRoom() when $default != null:
|
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);case _:
|
||||||
return orElse();
|
return orElse();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -220,10 +221,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) $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnChatRoom():
|
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);}
|
||||||
}
|
}
|
||||||
/// A variant of `when` that fallback to returning `null`
|
/// A variant of `when` that fallback to returning `null`
|
||||||
///
|
///
|
||||||
@@ -237,10 +238,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)? $default,) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _SnChatRoom() when $default != null:
|
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);case _:
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -252,7 +253,7 @@ return $default(_that.id,_that.name,_that.description,_that.type,_that.isPublic,
|
|||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
|
|
||||||
class _SnChatRoom implements SnChatRoom {
|
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}): _members = members;
|
||||||
factory _SnChatRoom.fromJson(Map<String, dynamic> json) => _$SnChatRoomFromJson(json);
|
factory _SnChatRoom.fromJson(Map<String, dynamic> json) => _$SnChatRoomFromJson(json);
|
||||||
|
|
||||||
@override final String id;
|
@override final String id;
|
||||||
@@ -264,6 +265,7 @@ class _SnChatRoom implements SnChatRoom {
|
|||||||
@override final SnCloudFile? picture;
|
@override final SnCloudFile? picture;
|
||||||
@override final SnCloudFile? background;
|
@override final SnCloudFile? background;
|
||||||
@override final String? realmId;
|
@override final String? realmId;
|
||||||
|
@override final String? accountId;
|
||||||
@override final SnRealm? realm;
|
@override final SnRealm? realm;
|
||||||
@override final DateTime createdAt;
|
@override final DateTime createdAt;
|
||||||
@override final DateTime updatedAt;
|
@override final DateTime updatedAt;
|
||||||
@@ -291,16 +293,16 @@ Map<String, dynamic> toJson() {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
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));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@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));
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
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)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -311,7 +313,7 @@ abstract mixin class _$SnChatRoomCopyWith<$Res> implements $SnChatRoomCopyWith<$
|
|||||||
factory _$SnChatRoomCopyWith(_SnChatRoom value, $Res Function(_SnChatRoom) _then) = __$SnChatRoomCopyWithImpl;
|
factory _$SnChatRoomCopyWith(_SnChatRoom value, $Res Function(_SnChatRoom) _then) = __$SnChatRoomCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$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
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -328,7 +330,7 @@ class __$SnChatRoomCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of SnChatRoom
|
/// Create a copy of SnChatRoom
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// 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,}) {
|
||||||
return _then(_SnChatRoom(
|
return _then(_SnChatRoom(
|
||||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
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
|
as String,name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -339,6 +341,7 @@ as bool,isCommunity: null == isCommunity ? _self.isCommunity : isCommunity // ig
|
|||||||
as bool,picture: freezed == picture ? _self.picture : picture // ignore: cast_nullable_to_non_nullable
|
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?,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 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 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 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,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -1037,7 +1040,7 @@ $SnChatMemberCopyWith<$Res> get sender {
|
|||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$SnChatMember {
|
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;
|
DateTime? get lastTyped;
|
||||||
/// Create a copy of SnChatMember
|
/// Create a copy of SnChatMember
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@@ -1051,16 +1054,16 @@ $SnChatMemberCopyWith<SnChatMember> get copyWith => _$SnChatMemberCopyWithImpl<S
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
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)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@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
|
@override
|
||||||
String toString() {
|
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 +1074,7 @@ abstract mixin class $SnChatMemberCopyWith<$Res> {
|
|||||||
factory $SnChatMemberCopyWith(SnChatMember value, $Res Function(SnChatMember) _then) = _$SnChatMemberCopyWithImpl;
|
factory $SnChatMemberCopyWith(SnChatMember value, $Res Function(SnChatMember) _then) = _$SnChatMemberCopyWithImpl;
|
||||||
@useResult
|
@useResult
|
||||||
$Res call({
|
$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 +1091,7 @@ class _$SnChatMemberCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of SnChatMember
|
/// Create a copy of SnChatMember
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// 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(
|
return _then(_self.copyWith(
|
||||||
createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
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,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -1099,13 +1102,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 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 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 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 String?,notify: null == notify ? _self.notify : notify // ignore: cast_nullable_to_non_nullable
|
||||||
as int,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 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?,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?,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 DateTime?,status: freezed == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,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 SnAccountStatus?,lastTyped: freezed == lastTyped ? _self.lastTyped : lastTyped // ignore: cast_nullable_to_non_nullable
|
||||||
as DateTime?,
|
as DateTime?,
|
||||||
));
|
));
|
||||||
@@ -1222,10 +1223,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) {
|
switch (_that) {
|
||||||
case _SnChatMember() when $default != null:
|
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();
|
return orElse();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1243,10 +1244,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) {
|
switch (_that) {
|
||||||
case _SnChatMember():
|
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`
|
/// A variant of `when` that fallback to returning `null`
|
||||||
///
|
///
|
||||||
@@ -1260,10 +1261,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) {
|
switch (_that) {
|
||||||
case _SnChatMember() when $default != null:
|
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;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1275,7 +1276,7 @@ return $default(_that.createdAt,_that.updatedAt,_that.deletedAt,_that.id,_that.c
|
|||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
|
|
||||||
class _SnChatMember implements SnChatMember {
|
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);
|
factory _SnChatMember.fromJson(Map<String, dynamic> json) => _$SnChatMemberFromJson(json);
|
||||||
|
|
||||||
@override final DateTime createdAt;
|
@override final DateTime createdAt;
|
||||||
@@ -1287,12 +1288,10 @@ class _SnChatMember implements SnChatMember {
|
|||||||
@override final String accountId;
|
@override final String accountId;
|
||||||
@override final SnAccount account;
|
@override final SnAccount account;
|
||||||
@override final String? nick;
|
@override final String? nick;
|
||||||
@override final int role;
|
|
||||||
@override final int notify;
|
@override final int notify;
|
||||||
@override final DateTime? joinedAt;
|
@override final DateTime? joinedAt;
|
||||||
@override final DateTime? breakUntil;
|
@override final DateTime? breakUntil;
|
||||||
@override final DateTime? timeoutUntil;
|
@override final DateTime? timeoutUntil;
|
||||||
@override final bool isBot;
|
|
||||||
@override final SnAccountStatus? status;
|
@override final SnAccountStatus? status;
|
||||||
// Frontend data
|
// Frontend data
|
||||||
@override final DateTime? lastTyped;
|
@override final DateTime? lastTyped;
|
||||||
@@ -1310,16 +1309,16 @@ Map<String, dynamic> toJson() {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
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)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@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
|
@override
|
||||||
String toString() {
|
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 +1329,7 @@ abstract mixin class _$SnChatMemberCopyWith<$Res> implements $SnChatMemberCopyWi
|
|||||||
factory _$SnChatMemberCopyWith(_SnChatMember value, $Res Function(_SnChatMember) _then) = __$SnChatMemberCopyWithImpl;
|
factory _$SnChatMemberCopyWith(_SnChatMember value, $Res Function(_SnChatMember) _then) = __$SnChatMemberCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$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 +1346,7 @@ class __$SnChatMemberCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of SnChatMember
|
/// Create a copy of SnChatMember
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// 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(
|
return _then(_SnChatMember(
|
||||||
createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
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,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -1358,13 +1357,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 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 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 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 String?,notify: null == notify ? _self.notify : notify // ignore: cast_nullable_to_non_nullable
|
||||||
as int,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 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?,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?,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 DateTime?,status: freezed == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,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 SnAccountStatus?,lastTyped: freezed == lastTyped ? _self.lastTyped : lastTyped // ignore: cast_nullable_to_non_nullable
|
||||||
as DateTime?,
|
as DateTime?,
|
||||||
));
|
));
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ _SnChatRoom _$SnChatRoomFromJson(Map<String, dynamic> json) => _SnChatRoom(
|
|||||||
? null
|
? null
|
||||||
: SnCloudFile.fromJson(json['background'] as Map<String, dynamic>),
|
: SnCloudFile.fromJson(json['background'] as Map<String, dynamic>),
|
||||||
realmId: json['realm_id'] as String?,
|
realmId: json['realm_id'] as String?,
|
||||||
|
accountId: json['account_id'] as String?,
|
||||||
realm:
|
realm:
|
||||||
json['realm'] == null
|
json['realm'] == null
|
||||||
? null
|
? null
|
||||||
@@ -49,6 +50,7 @@ Map<String, dynamic> _$SnChatRoomToJson(_SnChatRoom instance) =>
|
|||||||
'picture': instance.picture?.toJson(),
|
'picture': instance.picture?.toJson(),
|
||||||
'background': instance.background?.toJson(),
|
'background': instance.background?.toJson(),
|
||||||
'realm_id': instance.realmId,
|
'realm_id': instance.realmId,
|
||||||
|
'account_id': instance.accountId,
|
||||||
'realm': instance.realm?.toJson(),
|
'realm': instance.realm?.toJson(),
|
||||||
'created_at': instance.createdAt.toIso8601String(),
|
'created_at': instance.createdAt.toIso8601String(),
|
||||||
'updated_at': instance.updatedAt.toIso8601String(),
|
'updated_at': instance.updatedAt.toIso8601String(),
|
||||||
@@ -162,7 +164,6 @@ _SnChatMember _$SnChatMemberFromJson(Map<String, dynamic> json) =>
|
|||||||
accountId: json['account_id'] as String,
|
accountId: json['account_id'] as String,
|
||||||
account: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
account: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
||||||
nick: json['nick'] as String?,
|
nick: json['nick'] as String?,
|
||||||
role: (json['role'] as num).toInt(),
|
|
||||||
notify: (json['notify'] as num).toInt(),
|
notify: (json['notify'] as num).toInt(),
|
||||||
joinedAt:
|
joinedAt:
|
||||||
json['joined_at'] == null
|
json['joined_at'] == null
|
||||||
@@ -176,7 +177,6 @@ _SnChatMember _$SnChatMemberFromJson(Map<String, dynamic> json) =>
|
|||||||
json['timeout_until'] == null
|
json['timeout_until'] == null
|
||||||
? null
|
? null
|
||||||
: DateTime.parse(json['timeout_until'] as String),
|
: DateTime.parse(json['timeout_until'] as String),
|
||||||
isBot: json['is_bot'] as bool,
|
|
||||||
status:
|
status:
|
||||||
json['status'] == null
|
json['status'] == null
|
||||||
? null
|
? null
|
||||||
@@ -200,12 +200,10 @@ Map<String, dynamic> _$SnChatMemberToJson(_SnChatMember instance) =>
|
|||||||
'account_id': instance.accountId,
|
'account_id': instance.accountId,
|
||||||
'account': instance.account.toJson(),
|
'account': instance.account.toJson(),
|
||||||
'nick': instance.nick,
|
'nick': instance.nick,
|
||||||
'role': instance.role,
|
|
||||||
'notify': instance.notify,
|
'notify': instance.notify,
|
||||||
'joined_at': instance.joinedAt?.toIso8601String(),
|
'joined_at': instance.joinedAt?.toIso8601String(),
|
||||||
'break_until': instance.breakUntil?.toIso8601String(),
|
'break_until': instance.breakUntil?.toIso8601String(),
|
||||||
'timeout_until': instance.timeoutUntil?.toIso8601String(),
|
'timeout_until': instance.timeoutUntil?.toIso8601String(),
|
||||||
'is_bot': instance.isBot,
|
|
||||||
'status': instance.status?.toJson(),
|
'status': instance.status?.toJson(),
|
||||||
'last_typed': instance.lastTyped?.toIso8601String(),
|
'last_typed': instance.lastTyped?.toIso8601String(),
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ sealed class SnStickerPack with _$SnStickerPack {
|
|||||||
required String description,
|
required String description,
|
||||||
required String prefix,
|
required String prefix,
|
||||||
required String publisherId,
|
required String publisherId,
|
||||||
|
required SnCloudFile? icon,
|
||||||
required SnPublisher? publisher,
|
required SnPublisher? publisher,
|
||||||
required DateTime createdAt,
|
required DateTime createdAt,
|
||||||
required DateTime updatedAt,
|
required DateTime updatedAt,
|
||||||
|
|||||||
@@ -335,7 +335,7 @@ $SnStickerPackCopyWith<$Res>? get pack {
|
|||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$SnStickerPack {
|
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
|
/// Create a copy of SnStickerPack
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@@ -348,16 +348,16 @@ $SnStickerPackCopyWith<SnStickerPack> get copyWith => _$SnStickerPackCopyWithImp
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
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)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@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
|
@override
|
||||||
String toString() {
|
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;
|
factory $SnStickerPackCopyWith(SnStickerPack value, $Res Function(SnStickerPack) _then) = _$SnStickerPackCopyWithImpl;
|
||||||
@useResult
|
@useResult
|
||||||
$Res call({
|
$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
|
/// @nodoc
|
||||||
@@ -385,14 +385,15 @@ class _$SnStickerPackCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of SnStickerPack
|
/// Create a copy of SnStickerPack
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// 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(
|
return _then(_self.copyWith(
|
||||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
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,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,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,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,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 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,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,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.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@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 {
|
$SnPublisherCopyWith<$Res>? get publisher {
|
||||||
if (_self.publisher == null) {
|
if (_self.publisher == null) {
|
||||||
return 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) {
|
switch (_that) {
|
||||||
case _SnStickerPack() when $default != null:
|
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();
|
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) {
|
switch (_that) {
|
||||||
case _SnStickerPack():
|
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`
|
/// 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) {
|
switch (_that) {
|
||||||
case _SnStickerPack() when $default != null:
|
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;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -544,7 +557,7 @@ return $default(_that.id,_that.name,_that.description,_that.prefix,_that.publish
|
|||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
|
|
||||||
class _SnStickerPack implements SnStickerPack {
|
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);
|
factory _SnStickerPack.fromJson(Map<String, dynamic> json) => _$SnStickerPackFromJson(json);
|
||||||
|
|
||||||
@override final String id;
|
@override final String id;
|
||||||
@@ -552,6 +565,7 @@ class _SnStickerPack implements SnStickerPack {
|
|||||||
@override final String description;
|
@override final String description;
|
||||||
@override final String prefix;
|
@override final String prefix;
|
||||||
@override final String publisherId;
|
@override final String publisherId;
|
||||||
|
@override final SnCloudFile? icon;
|
||||||
@override final SnPublisher? publisher;
|
@override final SnPublisher? publisher;
|
||||||
@override final DateTime createdAt;
|
@override final DateTime createdAt;
|
||||||
@override final DateTime updatedAt;
|
@override final DateTime updatedAt;
|
||||||
@@ -577,16 +591,16 @@ Map<String, dynamic> toJson() {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
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)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@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
|
@override
|
||||||
String toString() {
|
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;
|
factory _$SnStickerPackCopyWith(_SnStickerPack value, $Res Function(_SnStickerPack) _then) = __$SnStickerPackCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$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
|
/// @nodoc
|
||||||
@@ -614,14 +628,15 @@ class __$SnStickerPackCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of SnStickerPack
|
/// Create a copy of SnStickerPack
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// 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(
|
return _then(_SnStickerPack(
|
||||||
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
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,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,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,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,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 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,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,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.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@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 {
|
$SnPublisherCopyWith<$Res>? get publisher {
|
||||||
if (_self.publisher == null) {
|
if (_self.publisher == null) {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -42,6 +42,10 @@ _SnStickerPack _$SnStickerPackFromJson(Map<String, dynamic> json) =>
|
|||||||
description: json['description'] as String,
|
description: json['description'] as String,
|
||||||
prefix: json['prefix'] as String,
|
prefix: json['prefix'] as String,
|
||||||
publisherId: json['publisher_id'] as String,
|
publisherId: json['publisher_id'] as String,
|
||||||
|
icon:
|
||||||
|
json['icon'] == null
|
||||||
|
? null
|
||||||
|
: SnCloudFile.fromJson(json['icon'] as Map<String, dynamic>),
|
||||||
publisher:
|
publisher:
|
||||||
json['publisher'] == null
|
json['publisher'] == null
|
||||||
? null
|
? null
|
||||||
@@ -66,6 +70,7 @@ Map<String, dynamic> _$SnStickerPackToJson(_SnStickerPack instance) =>
|
|||||||
'description': instance.description,
|
'description': instance.description,
|
||||||
'prefix': instance.prefix,
|
'prefix': instance.prefix,
|
||||||
'publisher_id': instance.publisherId,
|
'publisher_id': instance.publisherId,
|
||||||
|
'icon': instance.icon?.toJson(),
|
||||||
'publisher': instance.publisher?.toJson(),
|
'publisher': instance.publisher?.toJson(),
|
||||||
'created_at': instance.createdAt.toIso8601String(),
|
'created_at': instance.createdAt.toIso8601String(),
|
||||||
'updated_at': instance.updatedAt.toIso8601String(),
|
'updated_at': instance.updatedAt.toIso8601String(),
|
||||||
|
|||||||
373
lib/pods/chat/chat_room.dart
Normal file
373
lib/pods/chat/chat_room.dart
Normal file
@@ -0,0 +1,373 @@
|
|||||||
|
import 'package:dio/dio.dart';
|
||||||
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
|
import 'package:island/database/drift_db.dart';
|
||||||
|
import 'package:island/models/account.dart';
|
||||||
|
import 'package:island/models/chat.dart';
|
||||||
|
import 'package:island/models/file.dart';
|
||||||
|
import 'package:island/pods/database.dart';
|
||||||
|
import 'package:island/pods/network.dart';
|
||||||
|
import 'package:island/pods/userinfo.dart';
|
||||||
|
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||||
|
|
||||||
|
part 'chat_room.g.dart';
|
||||||
|
|
||||||
|
final isSyncingProvider = StateProvider.autoDispose<bool>((ref) => false);
|
||||||
|
|
||||||
|
final flashingMessagesProvider = StateProvider<Set<String>>((ref) => {});
|
||||||
|
|
||||||
|
@riverpod
|
||||||
|
class ChatRoomJoinedNotifier extends _$ChatRoomJoinedNotifier {
|
||||||
|
@override
|
||||||
|
Future<List<SnChatRoom>> build() async {
|
||||||
|
final db = ref.watch(databaseProvider);
|
||||||
|
|
||||||
|
try {
|
||||||
|
final localRoomsData = await db.select(db.chatRooms).get();
|
||||||
|
if (localRoomsData.isNotEmpty) {
|
||||||
|
final localRooms = await Future.wait(
|
||||||
|
localRoomsData.map((row) async {
|
||||||
|
final membersRows =
|
||||||
|
await (db.select(db.chatMembers)
|
||||||
|
..where((m) => m.chatRoomId.equals(row.id))).get();
|
||||||
|
final members =
|
||||||
|
membersRows.map((mRow) {
|
||||||
|
final account = SnAccount.fromJson(mRow.account);
|
||||||
|
return SnChatMember(
|
||||||
|
id: mRow.id,
|
||||||
|
chatRoomId: mRow.chatRoomId,
|
||||||
|
accountId: mRow.accountId,
|
||||||
|
account: account,
|
||||||
|
nick: mRow.nick,
|
||||||
|
notify: mRow.notify,
|
||||||
|
joinedAt: mRow.joinedAt,
|
||||||
|
breakUntil: mRow.breakUntil,
|
||||||
|
timeoutUntil: mRow.timeoutUntil,
|
||||||
|
status: null,
|
||||||
|
createdAt: mRow.createdAt,
|
||||||
|
updatedAt: mRow.updatedAt,
|
||||||
|
deletedAt: mRow.deletedAt,
|
||||||
|
chatRoom: null,
|
||||||
|
);
|
||||||
|
}).toList();
|
||||||
|
return SnChatRoom(
|
||||||
|
id: row.id,
|
||||||
|
name: row.name,
|
||||||
|
description: row.description,
|
||||||
|
type: row.type,
|
||||||
|
isPublic: row.isPublic!,
|
||||||
|
isCommunity: row.isCommunity!,
|
||||||
|
picture:
|
||||||
|
row.picture != null
|
||||||
|
? SnCloudFile.fromJson(row.picture!)
|
||||||
|
: null,
|
||||||
|
background:
|
||||||
|
row.background != null
|
||||||
|
? SnCloudFile.fromJson(row.background!)
|
||||||
|
: null,
|
||||||
|
realmId: row.realmId,
|
||||||
|
accountId: row.accountId,
|
||||||
|
realm: null,
|
||||||
|
createdAt: row.createdAt,
|
||||||
|
updatedAt: row.updatedAt,
|
||||||
|
deletedAt: row.deletedAt,
|
||||||
|
members: members,
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
|
||||||
|
// Background sync
|
||||||
|
Future(() async {
|
||||||
|
try {
|
||||||
|
final client = ref.read(apiClientProvider);
|
||||||
|
final resp = await client.get('/sphere/chat');
|
||||||
|
final remoteRooms =
|
||||||
|
resp.data
|
||||||
|
.map((e) => SnChatRoom.fromJson(e))
|
||||||
|
.cast<SnChatRoom>()
|
||||||
|
.toList();
|
||||||
|
await db.saveChatRooms(remoteRooms, override: true);
|
||||||
|
// Update state with fresh data
|
||||||
|
state = AsyncData(await _buildRoomsFromDb(db));
|
||||||
|
} catch (_) {}
|
||||||
|
}).ignore();
|
||||||
|
|
||||||
|
return localRooms;
|
||||||
|
}
|
||||||
|
} catch (_) {}
|
||||||
|
|
||||||
|
// Fallback to API
|
||||||
|
final client = ref.watch(apiClientProvider);
|
||||||
|
final resp = await client.get('/sphere/chat');
|
||||||
|
final rooms =
|
||||||
|
resp.data
|
||||||
|
.map((e) => SnChatRoom.fromJson(e))
|
||||||
|
.cast<SnChatRoom>()
|
||||||
|
.toList();
|
||||||
|
await db.saveChatRooms(rooms, override: true);
|
||||||
|
return rooms;
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<List<SnChatRoom>> _buildRoomsFromDb(AppDatabase db) async {
|
||||||
|
final localRoomsData = await db.select(db.chatRooms).get();
|
||||||
|
return Future.wait(
|
||||||
|
localRoomsData.map((row) async {
|
||||||
|
final membersRows =
|
||||||
|
await (db.select(db.chatMembers)
|
||||||
|
..where((m) => m.chatRoomId.equals(row.id))).get();
|
||||||
|
final members =
|
||||||
|
membersRows.map((mRow) {
|
||||||
|
final account = SnAccount.fromJson(mRow.account);
|
||||||
|
return SnChatMember(
|
||||||
|
id: mRow.id,
|
||||||
|
chatRoomId: mRow.chatRoomId,
|
||||||
|
accountId: mRow.accountId,
|
||||||
|
account: account,
|
||||||
|
nick: mRow.nick,
|
||||||
|
notify: mRow.notify,
|
||||||
|
joinedAt: mRow.joinedAt,
|
||||||
|
breakUntil: mRow.breakUntil,
|
||||||
|
timeoutUntil: mRow.timeoutUntil,
|
||||||
|
status: null,
|
||||||
|
createdAt: mRow.createdAt,
|
||||||
|
updatedAt: mRow.updatedAt,
|
||||||
|
deletedAt: mRow.deletedAt,
|
||||||
|
chatRoom: null,
|
||||||
|
);
|
||||||
|
}).toList();
|
||||||
|
return SnChatRoom(
|
||||||
|
id: row.id,
|
||||||
|
name: row.name,
|
||||||
|
description: row.description,
|
||||||
|
type: row.type,
|
||||||
|
isPublic: row.isPublic!,
|
||||||
|
isCommunity: row.isCommunity!,
|
||||||
|
picture:
|
||||||
|
row.picture != null ? SnCloudFile.fromJson(row.picture!) : null,
|
||||||
|
background:
|
||||||
|
row.background != null
|
||||||
|
? SnCloudFile.fromJson(row.background!)
|
||||||
|
: null,
|
||||||
|
realmId: row.realmId,
|
||||||
|
accountId: row.accountId,
|
||||||
|
realm: null,
|
||||||
|
createdAt: row.createdAt,
|
||||||
|
updatedAt: row.updatedAt,
|
||||||
|
deletedAt: row.deletedAt,
|
||||||
|
members: members,
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@riverpod
|
||||||
|
class ChatRoomNotifier extends _$ChatRoomNotifier {
|
||||||
|
@override
|
||||||
|
Future<SnChatRoom?> build(String? identifier) async {
|
||||||
|
if (identifier == null) return null;
|
||||||
|
final db = ref.watch(databaseProvider);
|
||||||
|
|
||||||
|
try {
|
||||||
|
// Try to get from local database first
|
||||||
|
final localRoomData =
|
||||||
|
await (db.select(db.chatRooms)
|
||||||
|
..where((r) => r.id.equals(identifier))).getSingleOrNull();
|
||||||
|
|
||||||
|
if (localRoomData != null) {
|
||||||
|
// Fetch members for this room
|
||||||
|
final membersRows =
|
||||||
|
await (db.select(db.chatMembers)
|
||||||
|
..where((m) => m.chatRoomId.equals(localRoomData.id))).get();
|
||||||
|
final members =
|
||||||
|
membersRows.map((mRow) {
|
||||||
|
final account = SnAccount.fromJson(mRow.account);
|
||||||
|
return SnChatMember(
|
||||||
|
id: mRow.id,
|
||||||
|
chatRoomId: mRow.chatRoomId,
|
||||||
|
accountId: mRow.accountId,
|
||||||
|
account: account,
|
||||||
|
nick: mRow.nick,
|
||||||
|
notify: mRow.notify,
|
||||||
|
joinedAt: mRow.joinedAt,
|
||||||
|
breakUntil: mRow.breakUntil,
|
||||||
|
timeoutUntil: mRow.timeoutUntil,
|
||||||
|
status: null,
|
||||||
|
createdAt: mRow.createdAt,
|
||||||
|
updatedAt: mRow.updatedAt,
|
||||||
|
deletedAt: mRow.deletedAt,
|
||||||
|
chatRoom: null,
|
||||||
|
);
|
||||||
|
}).toList();
|
||||||
|
|
||||||
|
final localRoom = SnChatRoom(
|
||||||
|
id: localRoomData.id,
|
||||||
|
name: localRoomData.name,
|
||||||
|
description: localRoomData.description,
|
||||||
|
type: localRoomData.type,
|
||||||
|
isPublic: localRoomData.isPublic!,
|
||||||
|
isCommunity: localRoomData.isCommunity!,
|
||||||
|
picture:
|
||||||
|
localRoomData.picture != null
|
||||||
|
? SnCloudFile.fromJson(localRoomData.picture!)
|
||||||
|
: null,
|
||||||
|
background:
|
||||||
|
localRoomData.background != null
|
||||||
|
? SnCloudFile.fromJson(localRoomData.background!)
|
||||||
|
: null,
|
||||||
|
realmId: localRoomData.realmId,
|
||||||
|
accountId: localRoomData.accountId,
|
||||||
|
realm: null,
|
||||||
|
createdAt: localRoomData.createdAt,
|
||||||
|
updatedAt: localRoomData.updatedAt,
|
||||||
|
deletedAt: localRoomData.deletedAt,
|
||||||
|
members: members,
|
||||||
|
);
|
||||||
|
|
||||||
|
// Background sync
|
||||||
|
Future(() async {
|
||||||
|
try {
|
||||||
|
final client = ref.read(apiClientProvider);
|
||||||
|
final resp = await client.get('/sphere/chat/$identifier');
|
||||||
|
final remoteRoom = SnChatRoom.fromJson(resp.data);
|
||||||
|
// Update state with fresh data directly without saving to DB
|
||||||
|
// DB will be updated by ChatRoomJoinedNotifier's full sync
|
||||||
|
state = AsyncData(remoteRoom);
|
||||||
|
} catch (_) {}
|
||||||
|
}).ignore();
|
||||||
|
|
||||||
|
return localRoom;
|
||||||
|
}
|
||||||
|
} catch (_) {}
|
||||||
|
|
||||||
|
// Fallback to API
|
||||||
|
try {
|
||||||
|
final client = ref.watch(apiClientProvider);
|
||||||
|
final resp = await client.get('/sphere/chat/$identifier');
|
||||||
|
final room = SnChatRoom.fromJson(resp.data);
|
||||||
|
await db.saveChatRooms([room]);
|
||||||
|
return room;
|
||||||
|
} catch (err) {
|
||||||
|
if (err is DioException && err.response?.statusCode == 404) {
|
||||||
|
return null; // Chat room not found
|
||||||
|
}
|
||||||
|
rethrow; // Rethrow other errors
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@riverpod
|
||||||
|
class ChatRoomIdentityNotifier extends _$ChatRoomIdentityNotifier {
|
||||||
|
@override
|
||||||
|
Future<SnChatMember?> build(String? identifier) async {
|
||||||
|
if (identifier == null) return null;
|
||||||
|
final db = ref.watch(databaseProvider);
|
||||||
|
final userInfo = ref.watch(userInfoProvider);
|
||||||
|
|
||||||
|
try {
|
||||||
|
// Try to get from local database first
|
||||||
|
if (userInfo.value != null) {
|
||||||
|
final localMemberData =
|
||||||
|
await (db.select(db.chatMembers)
|
||||||
|
..where((m) => m.chatRoomId.equals(identifier))
|
||||||
|
..where((m) => m.accountId.equals(userInfo.value!.id)))
|
||||||
|
.getSingleOrNull();
|
||||||
|
|
||||||
|
if (localMemberData != null) {
|
||||||
|
final account = SnAccount.fromJson(localMemberData.account);
|
||||||
|
final localMember = SnChatMember(
|
||||||
|
id: localMemberData.id,
|
||||||
|
chatRoomId: localMemberData.chatRoomId,
|
||||||
|
accountId: localMemberData.accountId,
|
||||||
|
account: account,
|
||||||
|
nick: localMemberData.nick,
|
||||||
|
notify: localMemberData.notify,
|
||||||
|
joinedAt: localMemberData.joinedAt,
|
||||||
|
breakUntil: localMemberData.breakUntil,
|
||||||
|
timeoutUntil: localMemberData.timeoutUntil,
|
||||||
|
status: null,
|
||||||
|
createdAt: localMemberData.createdAt,
|
||||||
|
updatedAt: localMemberData.updatedAt,
|
||||||
|
deletedAt: localMemberData.deletedAt,
|
||||||
|
chatRoom: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
// Background sync
|
||||||
|
Future(() async {
|
||||||
|
try {
|
||||||
|
final client = ref.read(apiClientProvider);
|
||||||
|
final resp = await client.get(
|
||||||
|
'/sphere/chat/$identifier/members/me',
|
||||||
|
);
|
||||||
|
final remoteMember = SnChatMember.fromJson(resp.data);
|
||||||
|
await db.saveMember(remoteMember);
|
||||||
|
// Update state with fresh data
|
||||||
|
if (userInfo.value != null) {
|
||||||
|
state = AsyncData(
|
||||||
|
await _buildMemberFromDb(db, identifier, userInfo.value!.id),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} catch (_) {}
|
||||||
|
}).ignore();
|
||||||
|
|
||||||
|
return localMember;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (_) {}
|
||||||
|
|
||||||
|
// Fallback to API
|
||||||
|
try {
|
||||||
|
final client = ref.watch(apiClientProvider);
|
||||||
|
final resp = await client.get('/sphere/chat/$identifier/members/me');
|
||||||
|
final member = SnChatMember.fromJson(resp.data);
|
||||||
|
await db.saveMember(member);
|
||||||
|
return member;
|
||||||
|
} catch (err) {
|
||||||
|
if (err is DioException && err.response?.statusCode == 404) {
|
||||||
|
return null; // Chat member not found
|
||||||
|
}
|
||||||
|
rethrow; // Rethrow other errors
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<SnChatMember?> _buildMemberFromDb(
|
||||||
|
AppDatabase db,
|
||||||
|
String identifier,
|
||||||
|
String accountId,
|
||||||
|
) async {
|
||||||
|
final localMemberData =
|
||||||
|
await (db.select(db.chatMembers)
|
||||||
|
..where((m) => m.chatRoomId.equals(identifier))
|
||||||
|
..where((m) => m.accountId.equals(accountId)))
|
||||||
|
.getSingleOrNull();
|
||||||
|
|
||||||
|
if (localMemberData == null) return null;
|
||||||
|
|
||||||
|
final account = SnAccount.fromJson(localMemberData.account);
|
||||||
|
return SnChatMember(
|
||||||
|
id: localMemberData.id,
|
||||||
|
chatRoomId: localMemberData.chatRoomId,
|
||||||
|
accountId: localMemberData.accountId,
|
||||||
|
account: account,
|
||||||
|
nick: localMemberData.nick,
|
||||||
|
notify: localMemberData.notify,
|
||||||
|
joinedAt: localMemberData.joinedAt,
|
||||||
|
breakUntil: localMemberData.breakUntil,
|
||||||
|
timeoutUntil: localMemberData.timeoutUntil,
|
||||||
|
status: null,
|
||||||
|
createdAt: localMemberData.createdAt,
|
||||||
|
updatedAt: localMemberData.updatedAt,
|
||||||
|
deletedAt: localMemberData.deletedAt,
|
||||||
|
chatRoom: null,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@riverpod
|
||||||
|
Future<List<SnChatMember>> chatroomInvites(Ref ref) async {
|
||||||
|
final client = ref.watch(apiClientProvider);
|
||||||
|
final resp = await client.get('/sphere/chat/invites');
|
||||||
|
return resp.data
|
||||||
|
.map((e) => SnChatMember.fromJson(e))
|
||||||
|
.cast<SnChatMember>()
|
||||||
|
.toList();
|
||||||
|
}
|
||||||
355
lib/pods/chat/chat_room.g.dart
Normal file
355
lib/pods/chat/chat_room.g.dart
Normal file
@@ -0,0 +1,355 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'chat_room.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// RiverpodGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
String _$chatroomInvitesHash() => r'5cd6391b09c5517ede19bacce43b45c8d71dd087';
|
||||||
|
|
||||||
|
/// See also [chatroomInvites].
|
||||||
|
@ProviderFor(chatroomInvites)
|
||||||
|
final chatroomInvitesProvider =
|
||||||
|
AutoDisposeFutureProvider<List<SnChatMember>>.internal(
|
||||||
|
chatroomInvites,
|
||||||
|
name: r'chatroomInvitesProvider',
|
||||||
|
debugGetCreateSourceHash:
|
||||||
|
const bool.fromEnvironment('dart.vm.product')
|
||||||
|
? null
|
||||||
|
: _$chatroomInvitesHash,
|
||||||
|
dependencies: null,
|
||||||
|
allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||||
|
// ignore: unused_element
|
||||||
|
typedef ChatroomInvitesRef = AutoDisposeFutureProviderRef<List<SnChatMember>>;
|
||||||
|
String _$chatRoomJoinedNotifierHash() =>
|
||||||
|
r'c8092225ba0d9c08b2b5bca6f800f1877303b4ff';
|
||||||
|
|
||||||
|
/// See also [ChatRoomJoinedNotifier].
|
||||||
|
@ProviderFor(ChatRoomJoinedNotifier)
|
||||||
|
final chatRoomJoinedNotifierProvider = AutoDisposeAsyncNotifierProvider<
|
||||||
|
ChatRoomJoinedNotifier,
|
||||||
|
List<SnChatRoom>
|
||||||
|
>.internal(
|
||||||
|
ChatRoomJoinedNotifier.new,
|
||||||
|
name: r'chatRoomJoinedNotifierProvider',
|
||||||
|
debugGetCreateSourceHash:
|
||||||
|
const bool.fromEnvironment('dart.vm.product')
|
||||||
|
? null
|
||||||
|
: _$chatRoomJoinedNotifierHash,
|
||||||
|
dependencies: null,
|
||||||
|
allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
typedef _$ChatRoomJoinedNotifier = AutoDisposeAsyncNotifier<List<SnChatRoom>>;
|
||||||
|
String _$chatRoomNotifierHash() => r'1e6391e2ab4eeb114fa001aaa6b06ab2bd646f38';
|
||||||
|
|
||||||
|
/// Copied from Dart SDK
|
||||||
|
class _SystemHash {
|
||||||
|
_SystemHash._();
|
||||||
|
|
||||||
|
static int combine(int hash, int value) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
hash = 0x1fffffff & (hash + value);
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
||||||
|
return hash ^ (hash >> 6);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int finish(int hash) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
hash = hash ^ (hash >> 11);
|
||||||
|
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
abstract class _$ChatRoomNotifier
|
||||||
|
extends BuildlessAutoDisposeAsyncNotifier<SnChatRoom?> {
|
||||||
|
late final String? identifier;
|
||||||
|
|
||||||
|
FutureOr<SnChatRoom?> build(String? identifier);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// See also [ChatRoomNotifier].
|
||||||
|
@ProviderFor(ChatRoomNotifier)
|
||||||
|
const chatRoomNotifierProvider = ChatRoomNotifierFamily();
|
||||||
|
|
||||||
|
/// See also [ChatRoomNotifier].
|
||||||
|
class ChatRoomNotifierFamily extends Family<AsyncValue<SnChatRoom?>> {
|
||||||
|
/// See also [ChatRoomNotifier].
|
||||||
|
const ChatRoomNotifierFamily();
|
||||||
|
|
||||||
|
/// See also [ChatRoomNotifier].
|
||||||
|
ChatRoomNotifierProvider call(String? identifier) {
|
||||||
|
return ChatRoomNotifierProvider(identifier);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
ChatRoomNotifierProvider getProviderOverride(
|
||||||
|
covariant ChatRoomNotifierProvider provider,
|
||||||
|
) {
|
||||||
|
return call(provider.identifier);
|
||||||
|
}
|
||||||
|
|
||||||
|
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||||
|
|
||||||
|
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||||
|
_allTransitiveDependencies;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String? get name => r'chatRoomNotifierProvider';
|
||||||
|
}
|
||||||
|
|
||||||
|
/// See also [ChatRoomNotifier].
|
||||||
|
class ChatRoomNotifierProvider
|
||||||
|
extends
|
||||||
|
AutoDisposeAsyncNotifierProviderImpl<ChatRoomNotifier, SnChatRoom?> {
|
||||||
|
/// See also [ChatRoomNotifier].
|
||||||
|
ChatRoomNotifierProvider(String? identifier)
|
||||||
|
: this._internal(
|
||||||
|
() => ChatRoomNotifier()..identifier = identifier,
|
||||||
|
from: chatRoomNotifierProvider,
|
||||||
|
name: r'chatRoomNotifierProvider',
|
||||||
|
debugGetCreateSourceHash:
|
||||||
|
const bool.fromEnvironment('dart.vm.product')
|
||||||
|
? null
|
||||||
|
: _$chatRoomNotifierHash,
|
||||||
|
dependencies: ChatRoomNotifierFamily._dependencies,
|
||||||
|
allTransitiveDependencies:
|
||||||
|
ChatRoomNotifierFamily._allTransitiveDependencies,
|
||||||
|
identifier: identifier,
|
||||||
|
);
|
||||||
|
|
||||||
|
ChatRoomNotifierProvider._internal(
|
||||||
|
super._createNotifier, {
|
||||||
|
required super.name,
|
||||||
|
required super.dependencies,
|
||||||
|
required super.allTransitiveDependencies,
|
||||||
|
required super.debugGetCreateSourceHash,
|
||||||
|
required super.from,
|
||||||
|
required this.identifier,
|
||||||
|
}) : super.internal();
|
||||||
|
|
||||||
|
final String? identifier;
|
||||||
|
|
||||||
|
@override
|
||||||
|
FutureOr<SnChatRoom?> runNotifierBuild(covariant ChatRoomNotifier notifier) {
|
||||||
|
return notifier.build(identifier);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Override overrideWith(ChatRoomNotifier Function() create) {
|
||||||
|
return ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
override: ChatRoomNotifierProvider._internal(
|
||||||
|
() => create()..identifier = identifier,
|
||||||
|
from: from,
|
||||||
|
name: null,
|
||||||
|
dependencies: null,
|
||||||
|
allTransitiveDependencies: null,
|
||||||
|
debugGetCreateSourceHash: null,
|
||||||
|
identifier: identifier,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
AutoDisposeAsyncNotifierProviderElement<ChatRoomNotifier, SnChatRoom?>
|
||||||
|
createElement() {
|
||||||
|
return _ChatRoomNotifierProviderElement(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return other is ChatRoomNotifierProvider && other.identifier == identifier;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode {
|
||||||
|
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||||
|
hash = _SystemHash.combine(hash, identifier.hashCode);
|
||||||
|
|
||||||
|
return _SystemHash.finish(hash);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||||
|
// ignore: unused_element
|
||||||
|
mixin ChatRoomNotifierRef on AutoDisposeAsyncNotifierProviderRef<SnChatRoom?> {
|
||||||
|
/// The parameter `identifier` of this provider.
|
||||||
|
String? get identifier;
|
||||||
|
}
|
||||||
|
|
||||||
|
class _ChatRoomNotifierProviderElement
|
||||||
|
extends
|
||||||
|
AutoDisposeAsyncNotifierProviderElement<ChatRoomNotifier, SnChatRoom?>
|
||||||
|
with ChatRoomNotifierRef {
|
||||||
|
_ChatRoomNotifierProviderElement(super.provider);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String? get identifier => (origin as ChatRoomNotifierProvider).identifier;
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$chatRoomIdentityNotifierHash() =>
|
||||||
|
r'27c17d55366d39be81d7209837e5c01f80a68a24';
|
||||||
|
|
||||||
|
abstract class _$ChatRoomIdentityNotifier
|
||||||
|
extends BuildlessAutoDisposeAsyncNotifier<SnChatMember?> {
|
||||||
|
late final String? identifier;
|
||||||
|
|
||||||
|
FutureOr<SnChatMember?> build(String? identifier);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// See also [ChatRoomIdentityNotifier].
|
||||||
|
@ProviderFor(ChatRoomIdentityNotifier)
|
||||||
|
const chatRoomIdentityNotifierProvider = ChatRoomIdentityNotifierFamily();
|
||||||
|
|
||||||
|
/// See also [ChatRoomIdentityNotifier].
|
||||||
|
class ChatRoomIdentityNotifierFamily extends Family<AsyncValue<SnChatMember?>> {
|
||||||
|
/// See also [ChatRoomIdentityNotifier].
|
||||||
|
const ChatRoomIdentityNotifierFamily();
|
||||||
|
|
||||||
|
/// See also [ChatRoomIdentityNotifier].
|
||||||
|
ChatRoomIdentityNotifierProvider call(String? identifier) {
|
||||||
|
return ChatRoomIdentityNotifierProvider(identifier);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
ChatRoomIdentityNotifierProvider getProviderOverride(
|
||||||
|
covariant ChatRoomIdentityNotifierProvider provider,
|
||||||
|
) {
|
||||||
|
return call(provider.identifier);
|
||||||
|
}
|
||||||
|
|
||||||
|
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||||
|
|
||||||
|
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||||
|
_allTransitiveDependencies;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String? get name => r'chatRoomIdentityNotifierProvider';
|
||||||
|
}
|
||||||
|
|
||||||
|
/// See also [ChatRoomIdentityNotifier].
|
||||||
|
class ChatRoomIdentityNotifierProvider
|
||||||
|
extends
|
||||||
|
AutoDisposeAsyncNotifierProviderImpl<
|
||||||
|
ChatRoomIdentityNotifier,
|
||||||
|
SnChatMember?
|
||||||
|
> {
|
||||||
|
/// See also [ChatRoomIdentityNotifier].
|
||||||
|
ChatRoomIdentityNotifierProvider(String? identifier)
|
||||||
|
: this._internal(
|
||||||
|
() => ChatRoomIdentityNotifier()..identifier = identifier,
|
||||||
|
from: chatRoomIdentityNotifierProvider,
|
||||||
|
name: r'chatRoomIdentityNotifierProvider',
|
||||||
|
debugGetCreateSourceHash:
|
||||||
|
const bool.fromEnvironment('dart.vm.product')
|
||||||
|
? null
|
||||||
|
: _$chatRoomIdentityNotifierHash,
|
||||||
|
dependencies: ChatRoomIdentityNotifierFamily._dependencies,
|
||||||
|
allTransitiveDependencies:
|
||||||
|
ChatRoomIdentityNotifierFamily._allTransitiveDependencies,
|
||||||
|
identifier: identifier,
|
||||||
|
);
|
||||||
|
|
||||||
|
ChatRoomIdentityNotifierProvider._internal(
|
||||||
|
super._createNotifier, {
|
||||||
|
required super.name,
|
||||||
|
required super.dependencies,
|
||||||
|
required super.allTransitiveDependencies,
|
||||||
|
required super.debugGetCreateSourceHash,
|
||||||
|
required super.from,
|
||||||
|
required this.identifier,
|
||||||
|
}) : super.internal();
|
||||||
|
|
||||||
|
final String? identifier;
|
||||||
|
|
||||||
|
@override
|
||||||
|
FutureOr<SnChatMember?> runNotifierBuild(
|
||||||
|
covariant ChatRoomIdentityNotifier notifier,
|
||||||
|
) {
|
||||||
|
return notifier.build(identifier);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Override overrideWith(ChatRoomIdentityNotifier Function() create) {
|
||||||
|
return ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
override: ChatRoomIdentityNotifierProvider._internal(
|
||||||
|
() => create()..identifier = identifier,
|
||||||
|
from: from,
|
||||||
|
name: null,
|
||||||
|
dependencies: null,
|
||||||
|
allTransitiveDependencies: null,
|
||||||
|
debugGetCreateSourceHash: null,
|
||||||
|
identifier: identifier,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
AutoDisposeAsyncNotifierProviderElement<
|
||||||
|
ChatRoomIdentityNotifier,
|
||||||
|
SnChatMember?
|
||||||
|
>
|
||||||
|
createElement() {
|
||||||
|
return _ChatRoomIdentityNotifierProviderElement(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return other is ChatRoomIdentityNotifierProvider &&
|
||||||
|
other.identifier == identifier;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode {
|
||||||
|
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||||
|
hash = _SystemHash.combine(hash, identifier.hashCode);
|
||||||
|
|
||||||
|
return _SystemHash.finish(hash);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||||
|
// ignore: unused_element
|
||||||
|
mixin ChatRoomIdentityNotifierRef
|
||||||
|
on AutoDisposeAsyncNotifierProviderRef<SnChatMember?> {
|
||||||
|
/// The parameter `identifier` of this provider.
|
||||||
|
String? get identifier;
|
||||||
|
}
|
||||||
|
|
||||||
|
class _ChatRoomIdentityNotifierProviderElement
|
||||||
|
extends
|
||||||
|
AutoDisposeAsyncNotifierProviderElement<
|
||||||
|
ChatRoomIdentityNotifier,
|
||||||
|
SnChatMember?
|
||||||
|
>
|
||||||
|
with ChatRoomIdentityNotifierRef {
|
||||||
|
_ChatRoomIdentityNotifierProviderElement(super.provider);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String? get identifier =>
|
||||||
|
(origin as ChatRoomIdentityNotifierProvider).identifier;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore_for_file: type=lint
|
||||||
|
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
import "package:hooks_riverpod/hooks_riverpod.dart";
|
|
||||||
|
|
||||||
final isSyncingProvider = StateProvider.autoDispose<bool>((ref) => false);
|
|
||||||
|
|
||||||
final flashingMessagesProvider = StateProvider<Set<String>>((ref) => {});
|
|
||||||
@@ -3,10 +3,10 @@ import "dart:convert";
|
|||||||
import "package:flutter/material.dart";
|
import "package:flutter/material.dart";
|
||||||
import "package:flutter_riverpod/flutter_riverpod.dart";
|
import "package:flutter_riverpod/flutter_riverpod.dart";
|
||||||
import "package:island/models/chat.dart";
|
import "package:island/models/chat.dart";
|
||||||
|
import "package:island/pods/chat/chat_room.dart";
|
||||||
import "package:island/pods/lifecycle.dart";
|
import "package:island/pods/lifecycle.dart";
|
||||||
import "package:island/pods/chat/messages_notifier.dart";
|
import "package:island/pods/chat/messages_notifier.dart";
|
||||||
import "package:island/pods/websocket.dart";
|
import "package:island/pods/websocket.dart";
|
||||||
import "package:island/screens/chat/chat.dart";
|
|
||||||
import "package:island/widgets/chat/call_button.dart";
|
import "package:island/widgets/chat/call_button.dart";
|
||||||
import "package:riverpod_annotation/riverpod_annotation.dart";
|
import "package:riverpod_annotation/riverpod_annotation.dart";
|
||||||
|
|
||||||
@@ -16,10 +16,9 @@ final currentSubscribedChatIdProvider = StateProvider<String?>((ref) => null);
|
|||||||
|
|
||||||
@riverpod
|
@riverpod
|
||||||
class ChatSubscribeNotifier extends _$ChatSubscribeNotifier {
|
class ChatSubscribeNotifier extends _$ChatSubscribeNotifier {
|
||||||
late final String _roomId;
|
late SnChatRoom _chatRoom;
|
||||||
late final SnChatRoom _chatRoom;
|
late SnChatMember _chatIdentity;
|
||||||
late final SnChatMember _chatIdentity;
|
late MessagesNotifier _messagesNotifier;
|
||||||
late final MessagesNotifier _messagesNotifier;
|
|
||||||
|
|
||||||
final List<SnChatMember> _typingStatuses = [];
|
final List<SnChatMember> _typingStatuses = [];
|
||||||
Timer? _typingCleanupTimer;
|
Timer? _typingCleanupTimer;
|
||||||
@@ -29,10 +28,11 @@ class ChatSubscribeNotifier extends _$ChatSubscribeNotifier {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
List<SnChatMember> build(String roomId) {
|
List<SnChatMember> build(String roomId) {
|
||||||
_roomId = roomId;
|
|
||||||
final ws = ref.watch(websocketProvider);
|
final ws = ref.watch(websocketProvider);
|
||||||
final chatRoomAsync = ref.watch(chatroomProvider(roomId));
|
final chatRoomAsync = ref.watch(ChatRoomNotifierProvider(roomId));
|
||||||
final chatIdentityAsync = ref.watch(chatroomIdentityProvider(roomId));
|
final chatIdentityAsync = ref.watch(
|
||||||
|
ChatRoomIdentityNotifierProvider(roomId),
|
||||||
|
);
|
||||||
_messagesNotifier = ref.watch(messagesNotifierProvider(roomId).notifier);
|
_messagesNotifier = ref.watch(messagesNotifierProvider(roomId).notifier);
|
||||||
|
|
||||||
if (chatRoomAsync.isLoading || chatIdentityAsync.isLoading) {
|
if (chatRoomAsync.isLoading || chatIdentityAsync.isLoading) {
|
||||||
@@ -199,7 +199,7 @@ class ChatSubscribeNotifier extends _$ChatSubscribeNotifier {
|
|||||||
jsonEncode(
|
jsonEncode(
|
||||||
WebSocketPacket(
|
WebSocketPacket(
|
||||||
type: 'messages.read',
|
type: 'messages.read',
|
||||||
data: {'chat_room_id': _roomId},
|
data: {'chat_room_id': roomId},
|
||||||
endpoint: 'sphere',
|
endpoint: 'sphere',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -216,7 +216,7 @@ class ChatSubscribeNotifier extends _$ChatSubscribeNotifier {
|
|||||||
jsonEncode(
|
jsonEncode(
|
||||||
WebSocketPacket(
|
WebSocketPacket(
|
||||||
type: 'messages.typing',
|
type: 'messages.typing',
|
||||||
data: {'chat_room_id': _roomId},
|
data: {'chat_room_id': roomId},
|
||||||
endpoint: 'sphere',
|
endpoint: 'sphere',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ part of 'chat_subscribe.dart';
|
|||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$chatSubscribeNotifierHash() =>
|
String _$chatSubscribeNotifierHash() =>
|
||||||
r'c605e0c9c45df64e5ba7b65f8de9b47bde8e2b3b';
|
r'beec1ddf2e13f6d5af8a08c2c81eff740ae9b986';
|
||||||
|
|
||||||
/// Copied from Dart SDK
|
/// Copied from Dart SDK
|
||||||
class _SystemHash {
|
class _SystemHash {
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ class ChatUnreadCountNotifier extends _$ChatUnreadCountNotifier {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@riverpod
|
@Riverpod(keepAlive: true)
|
||||||
class ChatSummary extends _$ChatSummary {
|
class ChatSummary extends _$ChatSummary {
|
||||||
@override
|
@override
|
||||||
Future<Map<String, SnChatSummary>> build() async {
|
Future<Map<String, SnChatSummary>> build() async {
|
||||||
|
|||||||
@@ -24,22 +24,22 @@ final chatUnreadCountNotifierProvider =
|
|||||||
);
|
);
|
||||||
|
|
||||||
typedef _$ChatUnreadCountNotifier = AutoDisposeAsyncNotifier<int>;
|
typedef _$ChatUnreadCountNotifier = AutoDisposeAsyncNotifier<int>;
|
||||||
String _$chatSummaryHash() => r'33815a3bd81d20902b7063e8194fe336930df9b4';
|
String _$chatSummaryHash() => r'78d927d40cded9d7adbc20bd6f457fdf3c852632';
|
||||||
|
|
||||||
/// See also [ChatSummary].
|
/// See also [ChatSummary].
|
||||||
@ProviderFor(ChatSummary)
|
@ProviderFor(ChatSummary)
|
||||||
final chatSummaryProvider = AutoDisposeAsyncNotifierProvider<
|
final chatSummaryProvider =
|
||||||
ChatSummary,
|
AsyncNotifierProvider<ChatSummary, Map<String, SnChatSummary>>.internal(
|
||||||
Map<String, SnChatSummary>
|
|
||||||
>.internal(
|
|
||||||
ChatSummary.new,
|
ChatSummary.new,
|
||||||
name: r'chatSummaryProvider',
|
name: r'chatSummaryProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash:
|
||||||
const bool.fromEnvironment('dart.vm.product') ? null : _$chatSummaryHash,
|
const bool.fromEnvironment('dart.vm.product')
|
||||||
|
? null
|
||||||
|
: _$chatSummaryHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
allTransitiveDependencies: null,
|
allTransitiveDependencies: null,
|
||||||
);
|
);
|
||||||
|
|
||||||
typedef _$ChatSummary = AutoDisposeAsyncNotifier<Map<String, SnChatSummary>>;
|
typedef _$ChatSummary = AsyncNotifier<Map<String, SnChatSummary>>;
|
||||||
// ignore_for_file: type=lint
|
// ignore_for_file: type=lint
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import "package:island/models/chat.dart";
|
|||||||
import "package:island/models/file.dart";
|
import "package:island/models/file.dart";
|
||||||
import "package:island/models/poll.dart";
|
import "package:island/models/poll.dart";
|
||||||
import "package:island/models/wallet.dart";
|
import "package:island/models/wallet.dart";
|
||||||
|
import "package:island/pods/chat/chat_room.dart";
|
||||||
import "package:island/pods/database.dart";
|
import "package:island/pods/database.dart";
|
||||||
import "package:island/pods/lifecycle.dart";
|
import "package:island/pods/lifecycle.dart";
|
||||||
import "package:island/pods/network.dart";
|
import "package:island/pods/network.dart";
|
||||||
@@ -19,18 +20,16 @@ import "package:island/talker.dart";
|
|||||||
import "package:island/widgets/alert.dart";
|
import "package:island/widgets/alert.dart";
|
||||||
import "package:riverpod_annotation/riverpod_annotation.dart";
|
import "package:riverpod_annotation/riverpod_annotation.dart";
|
||||||
import "package:uuid/uuid.dart";
|
import "package:uuid/uuid.dart";
|
||||||
import "package:island/screens/chat/chat.dart";
|
|
||||||
import "package:island/pods/chat/chat_rooms.dart";
|
|
||||||
import "package:island/screens/account/profile.dart";
|
import "package:island/screens/account/profile.dart";
|
||||||
|
|
||||||
part 'messages_notifier.g.dart';
|
part 'messages_notifier.g.dart';
|
||||||
|
|
||||||
@riverpod
|
@riverpod
|
||||||
class MessagesNotifier extends _$MessagesNotifier {
|
class MessagesNotifier extends _$MessagesNotifier {
|
||||||
late final Dio _apiClient;
|
late Dio _apiClient;
|
||||||
late final AppDatabase _database;
|
late AppDatabase _database;
|
||||||
late final SnChatRoom _room;
|
late SnChatRoom _room;
|
||||||
late final SnChatMember _identity;
|
late SnChatMember _identity;
|
||||||
|
|
||||||
final Map<String, LocalChatMessage> _pendingMessages = {};
|
final Map<String, LocalChatMessage> _pendingMessages = {};
|
||||||
final Map<String, Map<int, double?>> _fileUploadProgress = {};
|
final Map<String, Map<int, double?>> _fileUploadProgress = {};
|
||||||
@@ -39,7 +38,6 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
bool? _withLinks;
|
bool? _withLinks;
|
||||||
bool? _withAttachments;
|
bool? _withAttachments;
|
||||||
|
|
||||||
late final String _roomId;
|
|
||||||
static const int _pageSize = 20;
|
static const int _pageSize = 20;
|
||||||
bool _hasMore = true;
|
bool _hasMore = true;
|
||||||
bool _isSyncing = false;
|
bool _isSyncing = false;
|
||||||
@@ -48,15 +46,16 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
bool _allRemoteMessagesFetched = false;
|
bool _allRemoteMessagesFetched = false;
|
||||||
DateTime? _lastPauseTime;
|
DateTime? _lastPauseTime;
|
||||||
|
|
||||||
late final Future<SnAccount?> Function(String) _fetchAccount;
|
late Future<SnAccount?> Function(String) _fetchAccount;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
FutureOr<List<LocalChatMessage>> build(String roomId) async {
|
FutureOr<List<LocalChatMessage>> build(String roomId) async {
|
||||||
_roomId = roomId;
|
|
||||||
_apiClient = ref.watch(apiClientProvider);
|
_apiClient = ref.watch(apiClientProvider);
|
||||||
_database = ref.watch(databaseProvider);
|
_database = ref.watch(databaseProvider);
|
||||||
final room = await ref.watch(chatroomProvider(roomId).future);
|
final room = await ref.watch(ChatRoomNotifierProvider(roomId).future);
|
||||||
final identity = await ref.watch(chatroomIdentityProvider(roomId).future);
|
final identity = await ref.watch(
|
||||||
|
ChatRoomIdentityNotifierProvider(roomId).future,
|
||||||
|
);
|
||||||
|
|
||||||
// Initialize fetch account method for corrupted data recovery
|
// Initialize fetch account method for corrupted data recovery
|
||||||
_fetchAccount = (String accountId) async {
|
_fetchAccount = (String accountId) async {
|
||||||
@@ -144,14 +143,14 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
|
|
||||||
if (searchQuery != null && searchQuery.isNotEmpty) {
|
if (searchQuery != null && searchQuery.isNotEmpty) {
|
||||||
dbMessages = await _database.searchMessages(
|
dbMessages = await _database.searchMessages(
|
||||||
_roomId,
|
roomId,
|
||||||
searchQuery,
|
searchQuery,
|
||||||
withAttachments: withAttachments,
|
withAttachments: withAttachments,
|
||||||
fetchAccount: _fetchAccount,
|
fetchAccount: _fetchAccount,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
final chatMessagesFromDb = await _database.getMessagesForRoom(
|
final chatMessagesFromDb = await _database.getMessagesForRoom(
|
||||||
_roomId,
|
roomId,
|
||||||
offset: offset,
|
offset: offset,
|
||||||
limit: take,
|
limit: take,
|
||||||
);
|
);
|
||||||
@@ -194,9 +193,7 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
|
|
||||||
if (offset == 0) {
|
if (offset == 0) {
|
||||||
final pendingForRoom =
|
final pendingForRoom =
|
||||||
_pendingMessages.values
|
_pendingMessages.values.where((msg) => msg.roomId == roomId).toList();
|
||||||
.where((msg) => msg.roomId == _roomId)
|
|
||||||
.toList();
|
|
||||||
|
|
||||||
final allMessages = [...pendingForRoom, ...uniqueMessages];
|
final allMessages = [...pendingForRoom, ...uniqueMessages];
|
||||||
_sortMessages(allMessages); // Use the helper function
|
_sortMessages(allMessages); // Use the helper function
|
||||||
@@ -221,7 +218,7 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
}) async {
|
}) async {
|
||||||
talker.log('Getting all messages for jump from offset $offset, take $take');
|
talker.log('Getting all messages for jump from offset $offset, take $take');
|
||||||
final chatMessagesFromDb = await _database.getMessagesForRoom(
|
final chatMessagesFromDb = await _database.getMessagesForRoom(
|
||||||
_roomId,
|
roomId,
|
||||||
offset: offset,
|
offset: offset,
|
||||||
limit: take,
|
limit: take,
|
||||||
);
|
);
|
||||||
@@ -245,9 +242,7 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
|
|
||||||
if (offset == 0) {
|
if (offset == 0) {
|
||||||
final pendingForRoom =
|
final pendingForRoom =
|
||||||
_pendingMessages.values
|
_pendingMessages.values.where((msg) => msg.roomId == roomId).toList();
|
||||||
.where((msg) => msg.roomId == _roomId)
|
|
||||||
.toList();
|
|
||||||
|
|
||||||
final allMessages = [...pendingForRoom, ...uniqueMessages];
|
final allMessages = [...pendingForRoom, ...uniqueMessages];
|
||||||
_sortMessages(allMessages);
|
_sortMessages(allMessages);
|
||||||
@@ -272,7 +267,7 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
talker.log('Fetching messages from API, offset $offset, take $take');
|
talker.log('Fetching messages from API, offset $offset, take $take');
|
||||||
if (_totalCount == null) {
|
if (_totalCount == null) {
|
||||||
final response = await _apiClient.get(
|
final response = await _apiClient.get(
|
||||||
'/sphere/chat/$_roomId/messages',
|
'/sphere/chat/$roomId/messages',
|
||||||
queryParameters: {'offset': 0, 'take': 1},
|
queryParameters: {'offset': 0, 'take': 1},
|
||||||
);
|
);
|
||||||
_totalCount = int.parse(response.headers['x-total']?.firstOrNull ?? '0');
|
_totalCount = int.parse(response.headers['x-total']?.firstOrNull ?? '0');
|
||||||
@@ -284,7 +279,7 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final response = await _apiClient.get(
|
final response = await _apiClient.get(
|
||||||
'/sphere/chat/$_roomId/messages',
|
'/sphere/chat/$roomId/messages',
|
||||||
queryParameters: {'offset': offset, 'take': take},
|
queryParameters: {'offset': offset, 'take': take},
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -546,7 +541,7 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
|
|
||||||
final mockMessage = SnChatMessage(
|
final mockMessage = SnChatMessage(
|
||||||
id: 'pending_$nonce',
|
id: 'pending_$nonce',
|
||||||
chatRoomId: _roomId,
|
chatRoomId: roomId,
|
||||||
senderId: _identity.id,
|
senderId: _identity.id,
|
||||||
content: content,
|
content: content,
|
||||||
createdAt: DateTime.now(),
|
createdAt: DateTime.now(),
|
||||||
@@ -590,8 +585,8 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
|
|
||||||
final response = await _apiClient.request(
|
final response = await _apiClient.request(
|
||||||
editingTo == null
|
editingTo == null
|
||||||
? '/sphere/chat/$_roomId/messages'
|
? '/sphere/chat/$roomId/messages'
|
||||||
: '/sphere/chat/$_roomId/messages/${editingTo.id}',
|
: '/sphere/chat/$roomId/messages/${editingTo.id}',
|
||||||
data: {
|
data: {
|
||||||
'content': content,
|
'content': content,
|
||||||
'attachments_id': cloudAttachments.map((e) => e.id).toList(),
|
'attachments_id': cloudAttachments.map((e) => e.id).toList(),
|
||||||
@@ -731,7 +726,7 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> receiveMessage(SnChatMessage remoteMessage) async {
|
Future<void> receiveMessage(SnChatMessage remoteMessage) async {
|
||||||
if (remoteMessage.chatRoomId != _roomId) return;
|
if (remoteMessage.chatRoomId != roomId) return;
|
||||||
|
|
||||||
// Block message receiving during jumps to prevent list resets
|
// Block message receiving during jumps to prevent list resets
|
||||||
if (_isJumping) {
|
if (_isJumping) {
|
||||||
@@ -783,7 +778,7 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> receiveMessageUpdate(SnChatMessage remoteMessage) async {
|
Future<void> receiveMessageUpdate(SnChatMessage remoteMessage) async {
|
||||||
if (remoteMessage.chatRoomId != _roomId) return;
|
if (remoteMessage.chatRoomId != roomId) return;
|
||||||
|
|
||||||
// Block message updates during jumps to prevent list resets
|
// Block message updates during jumps to prevent list resets
|
||||||
if (_isJumping) {
|
if (_isJumping) {
|
||||||
@@ -883,7 +878,7 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await _apiClient.delete('/sphere/chat/$_roomId/messages/$messageId');
|
await _apiClient.delete('/sphere/chat/$roomId/messages/$messageId');
|
||||||
await receiveMessageDeletion(messageId);
|
await receiveMessageDeletion(messageId);
|
||||||
} catch (err, stackTrace) {
|
} catch (err, stackTrace) {
|
||||||
talker.log(
|
talker.log(
|
||||||
@@ -991,7 +986,7 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final response = await _apiClient.get(
|
final response = await _apiClient.get(
|
||||||
'/sphere/chat/$_roomId/messages/$messageId',
|
'/sphere/chat/$roomId/messages/$messageId',
|
||||||
);
|
);
|
||||||
final remoteMessage = SnChatMessage.fromJson(response.data);
|
final remoteMessage = SnChatMessage.fromJson(response.data);
|
||||||
final message = LocalChatMessage.fromRemoteMessage(
|
final message = LocalChatMessage.fromRemoteMessage(
|
||||||
@@ -1048,7 +1043,7 @@ class MessagesNotifier extends _$MessagesNotifier {
|
|||||||
final query = _database.customSelect(
|
final query = _database.customSelect(
|
||||||
'SELECT COUNT(*) as count FROM chat_messages WHERE room_id = ? AND created_at > ?',
|
'SELECT COUNT(*) as count FROM chat_messages WHERE room_id = ? AND created_at > ?',
|
||||||
variables: [
|
variables: [
|
||||||
Variable.withString(_roomId),
|
Variable.withString(roomId),
|
||||||
Variable.withDateTime(message.createdAt),
|
Variable.withDateTime(message.createdAt),
|
||||||
],
|
],
|
||||||
readsFrom: {_database.chatMessages},
|
readsFrom: {_database.chatMessages},
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ part of 'messages_notifier.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$messagesNotifierHash() => r'27ce32c54e317a04e1d554ed4a70a24e4503fdd1';
|
String _$messagesNotifierHash() => r'd76d799494b06fac2adc42d94b7ecd7b8d68c352';
|
||||||
|
|
||||||
/// Copied from Dart SDK
|
/// Copied from Dart SDK
|
||||||
class _SystemHash {
|
class _SystemHash {
|
||||||
|
|||||||
@@ -2,14 +2,24 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|||||||
import 'package:island/models/file.dart';
|
import 'package:island/models/file.dart';
|
||||||
import 'package:island/models/file_list_item.dart';
|
import 'package:island/models/file_list_item.dart';
|
||||||
import 'package:island/pods/network.dart';
|
import 'package:island/pods/network.dart';
|
||||||
|
import 'package:island/pods/paging.dart';
|
||||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||||
import 'package:riverpod_paging_utils/riverpod_paging_utils.dart';
|
|
||||||
|
|
||||||
part 'file_list.g.dart';
|
part 'file_list.g.dart';
|
||||||
|
|
||||||
@riverpod
|
@riverpod
|
||||||
class CloudFileListNotifier extends _$CloudFileListNotifier
|
Future<Map<String, dynamic>?> billingUsage(Ref ref) async {
|
||||||
with CursorPagingNotifierMixin<FileListItem> {
|
final client = ref.read(apiClientProvider);
|
||||||
|
final response = await client.get('/drive/billing/usage');
|
||||||
|
return response.data;
|
||||||
|
}
|
||||||
|
|
||||||
|
final indexedCloudFileListNotifierProvider = AsyncNotifierProvider(
|
||||||
|
IndexedCloudFileListNotifier.new,
|
||||||
|
);
|
||||||
|
|
||||||
|
class IndexedCloudFileListNotifier extends AsyncNotifier<List<FileListItem>>
|
||||||
|
with AsyncPaginationController<FileListItem> {
|
||||||
String _currentPath = '/';
|
String _currentPath = '/';
|
||||||
String? _poolId;
|
String? _poolId;
|
||||||
String? _query;
|
String? _query;
|
||||||
@@ -42,12 +52,7 @@ class CloudFileListNotifier extends _$CloudFileListNotifier
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<CursorPagingData<FileListItem>> build() => fetch(cursor: null);
|
Future<List<FileListItem>> fetch() async {
|
||||||
|
|
||||||
@override
|
|
||||||
Future<CursorPagingData<FileListItem>> fetch({
|
|
||||||
required String? cursor,
|
|
||||||
}) async {
|
|
||||||
final client = ref.read(apiClientProvider);
|
final client = ref.read(apiClientProvider);
|
||||||
|
|
||||||
final queryParameters = <String, String>{'path': _currentPath};
|
final queryParameters = <String, String>{'path': _currentPath};
|
||||||
@@ -83,21 +88,16 @@ class CloudFileListNotifier extends _$CloudFileListNotifier
|
|||||||
...files.map((file) => FileListItem.file(file)),
|
...files.map((file) => FileListItem.file(file)),
|
||||||
];
|
];
|
||||||
|
|
||||||
// The new API returns all files in the path, no pagination
|
return items;
|
||||||
return CursorPagingData(items: items, hasMore: false, nextCursor: null);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@riverpod
|
final unindexedFileListNotifierProvider = AsyncNotifierProvider(
|
||||||
Future<Map<String, dynamic>?> billingUsage(Ref ref) async {
|
UnindexedFileListNotifier.new,
|
||||||
final client = ref.read(apiClientProvider);
|
);
|
||||||
final response = await client.get('/drive/billing/usage');
|
|
||||||
return response.data;
|
|
||||||
}
|
|
||||||
|
|
||||||
@riverpod
|
class UnindexedFileListNotifier extends AsyncNotifier<List<FileListItem>>
|
||||||
class UnindexedFileListNotifier extends _$UnindexedFileListNotifier
|
with AsyncPaginationController<FileListItem> {
|
||||||
with CursorPagingNotifierMixin<FileListItem> {
|
|
||||||
String? _poolId;
|
String? _poolId;
|
||||||
bool _recycled = false;
|
bool _recycled = false;
|
||||||
String? _query;
|
String? _query;
|
||||||
@@ -129,21 +129,15 @@ class UnindexedFileListNotifier extends _$UnindexedFileListNotifier
|
|||||||
ref.invalidateSelf();
|
ref.invalidateSelf();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
static const int pageSize = 20;
|
||||||
Future<CursorPagingData<FileListItem>> build() => fetch(cursor: null);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<CursorPagingData<FileListItem>> fetch({
|
Future<List<FileListItem>> fetch() async {
|
||||||
required String? cursor,
|
|
||||||
}) async {
|
|
||||||
final client = ref.read(apiClientProvider);
|
final client = ref.read(apiClientProvider);
|
||||||
|
|
||||||
final offset = cursor != null ? int.tryParse(cursor) ?? 0 : 0;
|
|
||||||
const take = 50; // Default page size
|
|
||||||
|
|
||||||
final queryParameters = <String, String>{
|
final queryParameters = <String, String>{
|
||||||
'take': take.toString(),
|
'take': pageSize.toString(),
|
||||||
'offset': offset.toString(),
|
'offset': fetchedCount.toString(),
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_poolId != null) {
|
if (_poolId != null) {
|
||||||
@@ -169,7 +163,7 @@ class UnindexedFileListNotifier extends _$UnindexedFileListNotifier
|
|||||||
queryParameters: queryParameters,
|
queryParameters: queryParameters,
|
||||||
);
|
);
|
||||||
|
|
||||||
final total = int.tryParse(response.headers.value('x-total') ?? '0') ?? 0;
|
totalCount = int.tryParse(response.headers.value('x-total') ?? '0') ?? 0;
|
||||||
|
|
||||||
final List<SnCloudFile> files =
|
final List<SnCloudFile> files =
|
||||||
(response.data as List)
|
(response.data as List)
|
||||||
@@ -179,14 +173,7 @@ class UnindexedFileListNotifier extends _$UnindexedFileListNotifier
|
|||||||
final List<FileListItem> items =
|
final List<FileListItem> items =
|
||||||
files.map((file) => FileListItem.unindexedFile(file)).toList();
|
files.map((file) => FileListItem.unindexedFile(file)).toList();
|
||||||
|
|
||||||
final hasMore = offset + take < total;
|
return items;
|
||||||
final nextCursor = hasMore ? (offset + take).toString() : null;
|
|
||||||
|
|
||||||
return CursorPagingData(
|
|
||||||
items: items,
|
|
||||||
hasMore: hasMore,
|
|
||||||
nextCursor: nextCursor,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,47 +44,5 @@ final billingQuotaProvider =
|
|||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||||
// ignore: unused_element
|
// ignore: unused_element
|
||||||
typedef BillingQuotaRef = AutoDisposeFutureProviderRef<Map<String, dynamic>?>;
|
typedef BillingQuotaRef = AutoDisposeFutureProviderRef<Map<String, dynamic>?>;
|
||||||
String _$cloudFileListNotifierHash() =>
|
|
||||||
r'533dfa86f920b60cf7491fb4aeb95ece19e428af';
|
|
||||||
|
|
||||||
/// See also [CloudFileListNotifier].
|
|
||||||
@ProviderFor(CloudFileListNotifier)
|
|
||||||
final cloudFileListNotifierProvider = AutoDisposeAsyncNotifierProvider<
|
|
||||||
CloudFileListNotifier,
|
|
||||||
CursorPagingData<FileListItem>
|
|
||||||
>.internal(
|
|
||||||
CloudFileListNotifier.new,
|
|
||||||
name: r'cloudFileListNotifierProvider',
|
|
||||||
debugGetCreateSourceHash:
|
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$cloudFileListNotifierHash,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
);
|
|
||||||
|
|
||||||
typedef _$CloudFileListNotifier =
|
|
||||||
AutoDisposeAsyncNotifier<CursorPagingData<FileListItem>>;
|
|
||||||
String _$unindexedFileListNotifierHash() =>
|
|
||||||
r'afa487d7b956b71b21ca1b073a01364a34ede1d5';
|
|
||||||
|
|
||||||
/// See also [UnindexedFileListNotifier].
|
|
||||||
@ProviderFor(UnindexedFileListNotifier)
|
|
||||||
final unindexedFileListNotifierProvider = AutoDisposeAsyncNotifierProvider<
|
|
||||||
UnindexedFileListNotifier,
|
|
||||||
CursorPagingData<FileListItem>
|
|
||||||
>.internal(
|
|
||||||
UnindexedFileListNotifier.new,
|
|
||||||
name: r'unindexedFileListNotifierProvider',
|
|
||||||
debugGetCreateSourceHash:
|
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$unindexedFileListNotifierHash,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
);
|
|
||||||
|
|
||||||
typedef _$UnindexedFileListNotifier =
|
|
||||||
AutoDisposeAsyncNotifier<CursorPagingData<FileListItem>>;
|
|
||||||
// ignore_for_file: type=lint
|
// ignore_for_file: type=lint
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||||
|
|||||||
84
lib/pods/paging.dart
Normal file
84
lib/pods/paging.dart
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
import 'dart:async';
|
||||||
|
|
||||||
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
|
|
||||||
|
abstract class PaginationController<T> {
|
||||||
|
int? get totalCount;
|
||||||
|
int get fetchedCount;
|
||||||
|
|
||||||
|
bool get fetchedAll;
|
||||||
|
|
||||||
|
FutureOr<List<T>> fetch();
|
||||||
|
|
||||||
|
Future<void> refresh();
|
||||||
|
|
||||||
|
Future<void> fetchFurther();
|
||||||
|
}
|
||||||
|
|
||||||
|
abstract class PaginationFiltered<F> {
|
||||||
|
late F currentFilter;
|
||||||
|
|
||||||
|
Future<void> applyFilter(F filter);
|
||||||
|
}
|
||||||
|
|
||||||
|
mixin AsyncPaginationController<T> on AsyncNotifier<List<T>>
|
||||||
|
implements PaginationController<T> {
|
||||||
|
@override
|
||||||
|
int? totalCount;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int fetchedCount = 0;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool get fetchedAll => totalCount != null && fetchedCount >= totalCount!;
|
||||||
|
|
||||||
|
@override
|
||||||
|
FutureOr<List<T>> build() async => fetch();
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<void> refresh() async {
|
||||||
|
totalCount = null;
|
||||||
|
fetchedCount = 0;
|
||||||
|
state = AsyncData<List<T>>([]);
|
||||||
|
|
||||||
|
final newState = await AsyncValue.guard<List<T>>(() async {
|
||||||
|
return await fetch();
|
||||||
|
});
|
||||||
|
state = newState;
|
||||||
|
fetchedCount = newState.value?.length ?? 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<void> fetchFurther() async {
|
||||||
|
if (fetchedAll) return;
|
||||||
|
|
||||||
|
state = AsyncLoading<List<T>>();
|
||||||
|
|
||||||
|
final newState = await AsyncValue.guard<List<T>>(() async {
|
||||||
|
final elements = await fetch();
|
||||||
|
return [...?state.valueOrNull, ...elements];
|
||||||
|
});
|
||||||
|
|
||||||
|
state = newState;
|
||||||
|
fetchedCount = newState.value?.length ?? 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mixin AsyncPaginationFilter<F, T> on AsyncPaginationController<T>
|
||||||
|
implements PaginationFiltered<F> {
|
||||||
|
@override
|
||||||
|
Future<void> applyFilter(F filter) async {
|
||||||
|
if (currentFilter == filter) return;
|
||||||
|
// Reset the data
|
||||||
|
totalCount = null;
|
||||||
|
fetchedCount = 0;
|
||||||
|
currentFilter = filter;
|
||||||
|
|
||||||
|
state = AsyncData<List<T>>([]);
|
||||||
|
|
||||||
|
final newState = await AsyncValue.guard<List<T>>(() async {
|
||||||
|
return await fetch();
|
||||||
|
});
|
||||||
|
state = newState;
|
||||||
|
}
|
||||||
|
}
|
||||||
65
lib/pods/timeline.dart
Normal file
65
lib/pods/timeline.dart
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
import 'package:flutter/foundation.dart';
|
||||||
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
|
import 'package:island/models/activity.dart';
|
||||||
|
import 'package:island/pods/network.dart';
|
||||||
|
import 'package:island/pods/paging.dart';
|
||||||
|
|
||||||
|
final activityListNotifierProvider =
|
||||||
|
AsyncNotifierProvider<ActivityListNotifier, List<SnTimelineEvent>>(
|
||||||
|
ActivityListNotifier.new,
|
||||||
|
);
|
||||||
|
|
||||||
|
class ActivityListNotifier extends AsyncNotifier<List<SnTimelineEvent>>
|
||||||
|
with
|
||||||
|
AsyncPaginationController<SnTimelineEvent>,
|
||||||
|
AsyncPaginationFilter<String?, SnTimelineEvent> {
|
||||||
|
static const int pageSize = 20;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String? currentFilter;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<List<SnTimelineEvent>> fetch() async {
|
||||||
|
final client = ref.read(apiClientProvider);
|
||||||
|
|
||||||
|
final cursor =
|
||||||
|
state.valueOrNull?.lastOrNull?.createdAt.toUtc().toIso8601String();
|
||||||
|
|
||||||
|
final queryParameters = {
|
||||||
|
if (cursor != null) 'cursor': cursor,
|
||||||
|
'take': pageSize,
|
||||||
|
if (currentFilter != null) 'filter': currentFilter,
|
||||||
|
if (kDebugMode)
|
||||||
|
'debugInclude': 'realms,publishers,articles,shuffledPosts',
|
||||||
|
};
|
||||||
|
|
||||||
|
final response = await client.get(
|
||||||
|
'/sphere/timeline',
|
||||||
|
queryParameters: queryParameters,
|
||||||
|
);
|
||||||
|
|
||||||
|
final List<SnTimelineEvent> items =
|
||||||
|
(response.data as List)
|
||||||
|
.map((e) => SnTimelineEvent.fromJson(e as Map<String, dynamic>))
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
final hasMore = (items.firstOrNull?.type ?? 'empty') != 'empty';
|
||||||
|
|
||||||
|
totalCount =
|
||||||
|
(state.valueOrNull?.length ?? 0) +
|
||||||
|
items.length +
|
||||||
|
(hasMore ? pageSize : 0);
|
||||||
|
|
||||||
|
return items;
|
||||||
|
}
|
||||||
|
|
||||||
|
void updateOne(int index, SnTimelineEvent activity) {
|
||||||
|
final currentState = state.valueOrNull;
|
||||||
|
if (currentState == null) return;
|
||||||
|
|
||||||
|
final updatedItems = [...currentState];
|
||||||
|
updatedItems[index] = activity;
|
||||||
|
|
||||||
|
state = AsyncData(updatedItems);
|
||||||
|
}
|
||||||
|
}
|
||||||
53
lib/pods/web_auth/web_auth_providers.dart
Normal file
53
lib/pods/web_auth/web_auth_providers.dart
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
|
import 'web_auth_server.dart';
|
||||||
|
|
||||||
|
class WebAuthServerState {
|
||||||
|
final bool isRunning;
|
||||||
|
final int? port;
|
||||||
|
final Object? error;
|
||||||
|
|
||||||
|
WebAuthServerState({this.isRunning = false, this.port, this.error});
|
||||||
|
|
||||||
|
WebAuthServerState copyWith({
|
||||||
|
bool? isRunning,
|
||||||
|
int? port,
|
||||||
|
Object? error,
|
||||||
|
bool clearError = false,
|
||||||
|
}) {
|
||||||
|
return WebAuthServerState(
|
||||||
|
isRunning: isRunning ?? this.isRunning,
|
||||||
|
port: port ?? this.port,
|
||||||
|
error: clearError ? null : error ?? this.error,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class WebAuthServerNotifier extends StateNotifier<WebAuthServerState> {
|
||||||
|
final WebAuthServer _server;
|
||||||
|
|
||||||
|
WebAuthServerNotifier(this._server) : super(WebAuthServerState());
|
||||||
|
|
||||||
|
Future<void> start() async {
|
||||||
|
try {
|
||||||
|
final port = await _server.start();
|
||||||
|
state = state.copyWith(isRunning: true, port: port, clearError: true);
|
||||||
|
} catch (e) {
|
||||||
|
state = state.copyWith(isRunning: false, error: e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void stop() {
|
||||||
|
_server.stop();
|
||||||
|
state = state.copyWith(isRunning: false, port: null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
final webAuthServerProvider = Provider<WebAuthServer>((ref) {
|
||||||
|
return WebAuthServer(ref);
|
||||||
|
});
|
||||||
|
|
||||||
|
final webAuthServerStateProvider =
|
||||||
|
StateNotifierProvider<WebAuthServerNotifier, WebAuthServerState>((ref) {
|
||||||
|
final server = ref.watch(webAuthServerProvider);
|
||||||
|
return WebAuthServerNotifier(server);
|
||||||
|
});
|
||||||
186
lib/pods/web_auth/web_auth_server.dart
Normal file
186
lib/pods/web_auth/web_auth_server.dart
Normal file
@@ -0,0 +1,186 @@
|
|||||||
|
import 'dart:io';
|
||||||
|
import 'dart:convert';
|
||||||
|
import 'dart:math';
|
||||||
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
|
import 'package:dio/dio.dart';
|
||||||
|
import 'package:island/pods/network.dart';
|
||||||
|
import 'package:island/talker.dart';
|
||||||
|
|
||||||
|
class WebAuthServer {
|
||||||
|
final Ref _ref;
|
||||||
|
HttpServer? _server;
|
||||||
|
String? _challenge;
|
||||||
|
DateTime? _challengeTimestamp;
|
||||||
|
|
||||||
|
final _challengeTtl = const Duration(seconds: 30);
|
||||||
|
|
||||||
|
WebAuthServer(this._ref);
|
||||||
|
|
||||||
|
Future<int> start() async {
|
||||||
|
if (_server != null) {
|
||||||
|
talker.warning('Web auth server already running.');
|
||||||
|
return _server!.port;
|
||||||
|
}
|
||||||
|
|
||||||
|
final port = await _findUnusedPort(40000, 41000);
|
||||||
|
_server = await HttpServer.bind(InternetAddress.loopbackIPv4, port);
|
||||||
|
talker.info('Web auth server started on http://127.0.0.1:$port');
|
||||||
|
|
||||||
|
_server!.listen(_handleRequest);
|
||||||
|
return port;
|
||||||
|
}
|
||||||
|
|
||||||
|
void stop() {
|
||||||
|
_server?.close(force: true);
|
||||||
|
_server = null;
|
||||||
|
talker.info('Web auth server stopped.');
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<int> _findUnusedPort(int start, int end) async {
|
||||||
|
for (var port = start; port <= end; port++) {
|
||||||
|
try {
|
||||||
|
var socket = await ServerSocket.bind(InternetAddress.loopbackIPv4, port);
|
||||||
|
await socket.close();
|
||||||
|
return port;
|
||||||
|
} catch (e) {
|
||||||
|
// Port is in use, try next
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw Exception('No unused port found in range $start-$end');
|
||||||
|
}
|
||||||
|
|
||||||
|
String _generateChallenge() {
|
||||||
|
final random = Random.secure();
|
||||||
|
final values = List<int>.generate(32, (i) => random.nextInt(256));
|
||||||
|
return base64Url.encode(values);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _addCorsHeaders(HttpResponse response) {
|
||||||
|
const webUrl = 'https://app.solian.fr';
|
||||||
|
|
||||||
|
response.headers.add('Access-Control-Allow-Origin', webUrl);
|
||||||
|
response.headers.add('Access-Control-Allow-Methods', 'GET, POST, OPTIONS');
|
||||||
|
response.headers.add('Access-Control-Allow-Headers', '*');
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _handleRequest(HttpRequest request) async {
|
||||||
|
try {
|
||||||
|
_addCorsHeaders(request.response);
|
||||||
|
|
||||||
|
if (request.method == 'OPTIONS') {
|
||||||
|
request.response.statusCode = HttpStatus.noContent;
|
||||||
|
await request.response.close();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
talker.info('Web auth request: ${request.method} ${request.uri.path}');
|
||||||
|
|
||||||
|
if (request.method == 'GET' && request.uri.path == '/alive') {
|
||||||
|
await _handleAlive(request);
|
||||||
|
} else if (request.method == 'POST' && request.uri.path == '/exchange') {
|
||||||
|
await _handleExchange(request);
|
||||||
|
} else {
|
||||||
|
request.response.statusCode = HttpStatus.notFound;
|
||||||
|
request.response.write(jsonEncode({'error': 'Not Found'}));
|
||||||
|
await request.response.close();
|
||||||
|
}
|
||||||
|
} catch (e, st) {
|
||||||
|
talker.handle(e, st, 'Error handling web auth request');
|
||||||
|
try {
|
||||||
|
request.response.statusCode = HttpStatus.internalServerError;
|
||||||
|
request.response.write(jsonEncode({'error': 'Internal Server Error'}));
|
||||||
|
await request.response.close();
|
||||||
|
} catch (e2) {
|
||||||
|
talker.error('Failed to send error response: $e2');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _handleAlive(HttpRequest request) async {
|
||||||
|
_challenge = _generateChallenge();
|
||||||
|
_challengeTimestamp = DateTime.now();
|
||||||
|
|
||||||
|
final response = {
|
||||||
|
'status': 'ok',
|
||||||
|
'challenge': _challenge,
|
||||||
|
};
|
||||||
|
|
||||||
|
request.response.statusCode = HttpStatus.ok;
|
||||||
|
request.response.headers.contentType = ContentType.json;
|
||||||
|
request.response.write(jsonEncode(response));
|
||||||
|
await request.response.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _handleExchange(HttpRequest request) async {
|
||||||
|
if (_challenge == null ||
|
||||||
|
_challengeTimestamp == null ||
|
||||||
|
DateTime.now().difference(_challengeTimestamp!) > _challengeTtl) {
|
||||||
|
request.response.statusCode = HttpStatus.badRequest;
|
||||||
|
request.response.write(jsonEncode({
|
||||||
|
'error': 'Invalid or expired challenge. Please call /alive first.'
|
||||||
|
}));
|
||||||
|
await request.response.close();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final requestBody = await utf8.decodeStream(request);
|
||||||
|
final Map<String, dynamic> data;
|
||||||
|
try {
|
||||||
|
data = jsonDecode(requestBody);
|
||||||
|
} catch (e) {
|
||||||
|
request.response.statusCode = HttpStatus.badRequest;
|
||||||
|
request.response.write(jsonEncode({'error': 'Invalid JSON body'}));
|
||||||
|
await request.response.close();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final String? signedChallenge = data['signedChallenge'];
|
||||||
|
final Map<String, dynamic>? deviceInfo = data['deviceInfo'];
|
||||||
|
|
||||||
|
if (signedChallenge == null) {
|
||||||
|
request.response.statusCode = HttpStatus.badRequest;
|
||||||
|
request.response.write(jsonEncode({'error': 'Missing signedChallenge'}));
|
||||||
|
await request.response.close();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final currentChallenge = _challenge!;
|
||||||
|
_challenge = null;
|
||||||
|
_challengeTimestamp = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
final dio = _ref.read(apiClientProvider);
|
||||||
|
|
||||||
|
final response = await dio.post(
|
||||||
|
'/pass/auth/login/session',
|
||||||
|
data: {
|
||||||
|
'signedChallenge': signedChallenge,
|
||||||
|
'challenge': currentChallenge,
|
||||||
|
...?deviceInfo,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
if (response.statusCode == 200 && response.data != null) {
|
||||||
|
final webToken = response.data['token'];
|
||||||
|
request.response.statusCode = HttpStatus.ok;
|
||||||
|
request.response.write(jsonEncode({'token': webToken}));
|
||||||
|
} else {
|
||||||
|
throw Exception(
|
||||||
|
'Backend exchange failed with status ${response.statusCode}');
|
||||||
|
}
|
||||||
|
} on DioException catch (e) {
|
||||||
|
talker.error('Backend exchange failed: ${e.response?.data}');
|
||||||
|
request.response.statusCode =
|
||||||
|
e.response?.statusCode ?? HttpStatus.internalServerError;
|
||||||
|
request.response.write(
|
||||||
|
jsonEncode(e.response?.data ?? {'error': 'Backend communication failed'}));
|
||||||
|
} catch (e, st) {
|
||||||
|
talker.handle(e, st, 'Error during backend exchange');
|
||||||
|
request.response.statusCode = HttpStatus.internalServerError;
|
||||||
|
request.response
|
||||||
|
.write(jsonEncode({'error': 'An unexpected error occurred'}));
|
||||||
|
} finally {
|
||||||
|
await request.response.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,8 +3,10 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
import 'package:gap/gap.dart';
|
import 'package:gap/gap.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
|
import 'package:island/pods/message.dart';
|
||||||
import 'package:island/pods/network.dart';
|
import 'package:island/pods/network.dart';
|
||||||
import 'package:island/pods/userinfo.dart';
|
import 'package:island/pods/userinfo.dart';
|
||||||
|
import 'package:island/pods/websocket.dart';
|
||||||
import 'package:island/screens/notification.dart';
|
import 'package:island/screens/notification.dart';
|
||||||
import 'package:island/services/responsive.dart';
|
import 'package:island/services/responsive.dart';
|
||||||
import 'package:island/widgets/account/account_name.dart';
|
import 'package:island/widgets/account/account_name.dart';
|
||||||
@@ -176,6 +178,8 @@ class AccountScreen extends HookConsumerWidget {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
).padding(horizontal: 8),
|
).padding(horizontal: 8),
|
||||||
|
if (user.value?.activatedAt == null)
|
||||||
|
AccountUnactivatedCard().padding(horizontal: 12, bottom: 4),
|
||||||
Card(
|
Card(
|
||||||
margin: EdgeInsets.zero,
|
margin: EdgeInsets.zero,
|
||||||
child: Column(
|
child: Column(
|
||||||
@@ -467,13 +471,16 @@ class AccountScreen extends HookConsumerWidget {
|
|||||||
contentPadding: EdgeInsets.symmetric(horizontal: 24),
|
contentPadding: EdgeInsets.symmetric(horizontal: 24),
|
||||||
title: Text('logout').tr(),
|
title: Text('logout').tr(),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
|
final ws = ref.watch(websocketStateProvider.notifier);
|
||||||
final apiClient = ref.watch(apiClientProvider);
|
final apiClient = ref.watch(apiClientProvider);
|
||||||
showLoadingModal(context);
|
showLoadingModal(context);
|
||||||
await apiClient.delete('/pass/accounts/me/sessions/current');
|
await apiClient.delete('/pass/accounts/me/sessions/current');
|
||||||
|
await resetDatabase(ref);
|
||||||
if (!context.mounted) return;
|
if (!context.mounted) return;
|
||||||
hideLoadingModal(context);
|
hideLoadingModal(context);
|
||||||
final userNotifier = ref.read(userInfoProvider.notifier);
|
final userNotifier = ref.read(userInfoProvider.notifier);
|
||||||
userNotifier.logOut();
|
userNotifier.logOut();
|
||||||
|
ws.close();
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -501,6 +508,7 @@ class _UnauthorizedAccountScreen extends StatelessWidget {
|
|||||||
padding: const EdgeInsets.symmetric(horizontal: 24),
|
padding: const EdgeInsets.symmetric(horizontal: 24),
|
||||||
child: Card(
|
child: Card(
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
|
borderRadius: const BorderRadius.all(Radius.circular(8)),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
context.pushNamed('createAccount');
|
context.pushNamed('createAccount');
|
||||||
},
|
},
|
||||||
@@ -523,6 +531,7 @@ class _UnauthorizedAccountScreen extends StatelessWidget {
|
|||||||
padding: const EdgeInsets.symmetric(horizontal: 24),
|
padding: const EdgeInsets.symmetric(horizontal: 24),
|
||||||
child: Card(
|
child: Card(
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
|
borderRadius: const BorderRadius.all(Radius.circular(8)),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
context.pushNamed('login');
|
context.pushNamed('login');
|
||||||
},
|
},
|
||||||
@@ -544,26 +553,35 @@ class _UnauthorizedAccountScreen extends StatelessWidget {
|
|||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
TextButton(
|
IconButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
context.pushNamed('about');
|
context.pushNamed('about');
|
||||||
},
|
},
|
||||||
child: Text('about').tr(),
|
iconSize: 18,
|
||||||
|
color: Theme.of(context).colorScheme.secondary,
|
||||||
|
icon: const Icon(Icons.info, fill: 1),
|
||||||
|
tooltip: 'about'.tr(),
|
||||||
),
|
),
|
||||||
TextButton(
|
IconButton(
|
||||||
child: Text('debugOptions').tr(),
|
icon: const Icon(Icons.bug_report, fill: 1),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
showModalBottomSheet(
|
showModalBottomSheet(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) => DebugSheet(),
|
builder: (context) => DebugSheet(),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
iconSize: 18,
|
||||||
|
color: Theme.of(context).colorScheme.secondary,
|
||||||
|
tooltip: 'debugOptions'.tr(),
|
||||||
),
|
),
|
||||||
TextButton(
|
IconButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
context.pushNamed('settings');
|
context.pushNamed('settings');
|
||||||
},
|
},
|
||||||
child: Text('appSettings').tr(),
|
icon: const Icon(Icons.settings, fill: 1),
|
||||||
|
iconSize: 18,
|
||||||
|
color: Theme.of(context).colorScheme.secondary,
|
||||||
|
tooltip: 'appSettings'.tr(),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -4,9 +4,11 @@ import 'package:gap/gap.dart';
|
|||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:island/models/account.dart';
|
import 'package:island/models/account.dart';
|
||||||
import 'package:island/pods/network.dart';
|
import 'package:island/pods/network.dart';
|
||||||
|
import 'package:island/pods/paging.dart';
|
||||||
|
import 'package:island/services/time.dart';
|
||||||
|
import 'package:island/widgets/paging/pagination_list.dart';
|
||||||
import 'package:material_symbols_icons/material_symbols_icons.dart';
|
import 'package:material_symbols_icons/material_symbols_icons.dart';
|
||||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||||
import 'package:riverpod_paging_utils/riverpod_paging_utils.dart';
|
|
||||||
import 'package:styled_widget/styled_widget.dart';
|
import 'package:styled_widget/styled_widget.dart';
|
||||||
|
|
||||||
part 'credits.g.dart';
|
part 'credits.g.dart';
|
||||||
@@ -21,40 +23,35 @@ Future<double> socialCredits(Ref ref) async {
|
|||||||
return response.data?.toDouble() ?? 0.0;
|
return response.data?.toDouble() ?? 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@riverpod
|
final socialCreditHistoryNotifierProvider = AsyncNotifierProvider(
|
||||||
class SocialCreditHistoryNotifier extends _$SocialCreditHistoryNotifier
|
SocialCreditHistoryNotifier.new,
|
||||||
with CursorPagingNotifierMixin<SnSocialCreditRecord> {
|
);
|
||||||
static const int _pageSize = 20;
|
|
||||||
|
class SocialCreditHistoryNotifier
|
||||||
|
extends AsyncNotifier<List<SnSocialCreditRecord>>
|
||||||
|
with AsyncPaginationController<SnSocialCreditRecord> {
|
||||||
|
static const int pageSize = 20;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<CursorPagingData<SnSocialCreditRecord>> build() => fetch(cursor: null);
|
Future<List<SnSocialCreditRecord>> fetch() async {
|
||||||
|
|
||||||
@override
|
|
||||||
Future<CursorPagingData<SnSocialCreditRecord>> fetch({
|
|
||||||
required String? cursor,
|
|
||||||
}) async {
|
|
||||||
final client = ref.read(apiClientProvider);
|
final client = ref.read(apiClientProvider);
|
||||||
final offset = cursor == null ? 0 : int.parse(cursor);
|
|
||||||
|
|
||||||
final queryParams = {'offset': offset, 'take': _pageSize};
|
final queryParams = {'offset': fetchedCount.toString(), 'take': pageSize};
|
||||||
|
|
||||||
final response = await client.get(
|
final response = await client.get(
|
||||||
'/pass/accounts/me/credits/history',
|
'/pass/accounts/me/credits/history',
|
||||||
queryParameters: queryParams,
|
queryParameters: queryParams,
|
||||||
);
|
);
|
||||||
final total = int.parse(response.headers.value('X-Total') ?? '0');
|
|
||||||
final List<dynamic> data = response.data;
|
totalCount = int.parse(response.headers.value('X-Total') ?? '0');
|
||||||
|
|
||||||
final records =
|
final records =
|
||||||
data.map((json) => SnSocialCreditRecord.fromJson(json)).toList();
|
response.data
|
||||||
|
.map((json) => SnSocialCreditRecord.fromJson(json))
|
||||||
|
.cast<SnSocialCreditRecord>()
|
||||||
|
.toList();
|
||||||
|
|
||||||
final hasMore = offset + records.length < total;
|
return records;
|
||||||
final nextCursor = hasMore ? (offset + records.length).toString() : null;
|
|
||||||
|
|
||||||
return CursorPagingData(
|
|
||||||
items: records,
|
|
||||||
hasMore: hasMore,
|
|
||||||
nextCursor: nextCursor,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -110,31 +107,39 @@ class SocialCreditsTab extends HookConsumerWidget {
|
|||||||
.padding(horizontal: 20, vertical: 16),
|
.padding(horizontal: 20, vertical: 16),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: PagingHelperView(
|
child: PaginationList(
|
||||||
provider: socialCreditHistoryNotifierProvider,
|
|
||||||
futureRefreshable: socialCreditHistoryNotifierProvider.future,
|
|
||||||
notifierRefreshable: socialCreditHistoryNotifierProvider.notifier,
|
|
||||||
contentBuilder:
|
|
||||||
(data, widgetCount, endItemView) => ListView.builder(
|
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
itemCount: widgetCount,
|
provider: socialCreditHistoryNotifierProvider,
|
||||||
itemBuilder: (context, index) {
|
notifier: socialCreditHistoryNotifierProvider.notifier,
|
||||||
if (index == widgetCount - 1) {
|
itemBuilder: (context, idx, record) {
|
||||||
return endItemView;
|
final isExpired =
|
||||||
}
|
record.expiredAt != null &&
|
||||||
final record = data.items[index];
|
record.expiredAt!.isBefore(DateTime.now());
|
||||||
return ListTile(
|
return ListTile(
|
||||||
contentPadding: const EdgeInsets.symmetric(
|
contentPadding: const EdgeInsets.symmetric(horizontal: 24),
|
||||||
horizontal: 24,
|
title: Text(
|
||||||
|
record.reason,
|
||||||
|
style:
|
||||||
|
isExpired
|
||||||
|
? TextStyle(
|
||||||
|
decoration: TextDecoration.lineThrough,
|
||||||
|
color: Theme.of(
|
||||||
|
context,
|
||||||
|
).colorScheme.onSurface.withOpacity(0.8),
|
||||||
|
)
|
||||||
|
: null,
|
||||||
),
|
),
|
||||||
title: Text(record.reason),
|
subtitle: Row(
|
||||||
subtitle: Text(
|
spacing: 4,
|
||||||
DateFormat.yMMMd().format(record.createdAt),
|
children: [
|
||||||
|
Text(record.createdAt.formatSystem()),
|
||||||
|
Text('to'),
|
||||||
|
if (record.expiredAt != null)
|
||||||
|
Text(record.expiredAt!.formatSystem()),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
trailing: Text(
|
trailing: Text(
|
||||||
record.delta > 0
|
record.delta > 0 ? '+${record.delta}' : '${record.delta}',
|
||||||
? '+${record.delta}'
|
|
||||||
: '${record.delta}',
|
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: record.delta > 0 ? Colors.green : Colors.red,
|
color: record.delta > 0 ? Colors.green : Colors.red,
|
||||||
),
|
),
|
||||||
@@ -143,7 +148,6 @@ class SocialCreditsTab extends HookConsumerWidget {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,26 +24,5 @@ final socialCreditsProvider = AutoDisposeFutureProvider<double>.internal(
|
|||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||||
// ignore: unused_element
|
// ignore: unused_element
|
||||||
typedef SocialCreditsRef = AutoDisposeFutureProviderRef<double>;
|
typedef SocialCreditsRef = AutoDisposeFutureProviderRef<double>;
|
||||||
String _$socialCreditHistoryNotifierHash() =>
|
|
||||||
r'3e87af246cc5dc72a1f3a87b81d1c87169bdfb5b';
|
|
||||||
|
|
||||||
/// See also [SocialCreditHistoryNotifier].
|
|
||||||
@ProviderFor(SocialCreditHistoryNotifier)
|
|
||||||
final socialCreditHistoryNotifierProvider = AutoDisposeAsyncNotifierProvider<
|
|
||||||
SocialCreditHistoryNotifier,
|
|
||||||
CursorPagingData<SnSocialCreditRecord>
|
|
||||||
>.internal(
|
|
||||||
SocialCreditHistoryNotifier.new,
|
|
||||||
name: r'socialCreditHistoryNotifierProvider',
|
|
||||||
debugGetCreateSourceHash:
|
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$socialCreditHistoryNotifierHash,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
);
|
|
||||||
|
|
||||||
typedef _$SocialCreditHistoryNotifier =
|
|
||||||
AutoDisposeAsyncNotifier<CursorPagingData<SnSocialCreditRecord>>;
|
|
||||||
// ignore_for_file: type=lint
|
// ignore_for_file: type=lint
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import 'package:gap/gap.dart';
|
|||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:island/models/account.dart';
|
import 'package:island/models/account.dart';
|
||||||
import 'package:island/pods/network.dart';
|
import 'package:island/pods/network.dart';
|
||||||
|
import 'package:island/pods/paging.dart';
|
||||||
import 'package:island/pods/userinfo.dart';
|
import 'package:island/pods/userinfo.dart';
|
||||||
import 'package:island/screens/account/credits.dart';
|
import 'package:island/screens/account/credits.dart';
|
||||||
import 'package:island/services/time.dart';
|
import 'package:island/services/time.dart';
|
||||||
@@ -10,46 +11,37 @@ import 'package:island/widgets/account/leveling_progress.dart';
|
|||||||
import 'package:island/widgets/account/stellar_program_tab.dart';
|
import 'package:island/widgets/account/stellar_program_tab.dart';
|
||||||
import 'package:island/widgets/app_scaffold.dart';
|
import 'package:island/widgets/app_scaffold.dart';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
import 'package:island/widgets/paging/pagination_list.dart';
|
||||||
import 'package:riverpod_paging_utils/riverpod_paging_utils.dart';
|
|
||||||
import 'package:styled_widget/styled_widget.dart';
|
import 'package:styled_widget/styled_widget.dart';
|
||||||
|
|
||||||
part 'leveling.g.dart';
|
final levelingHistoryNotifierProvider = AsyncNotifierProvider(
|
||||||
|
LevelingHistoryNotifier.new,
|
||||||
|
);
|
||||||
|
|
||||||
@riverpod
|
class LevelingHistoryNotifier extends AsyncNotifier<List<SnExperienceRecord>>
|
||||||
class LevelingHistoryNotifier extends _$LevelingHistoryNotifier
|
with AsyncPaginationController<SnExperienceRecord> {
|
||||||
with CursorPagingNotifierMixin<SnExperienceRecord> {
|
static const int pageSize = 20;
|
||||||
static const int _pageSize = 20;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<CursorPagingData<SnExperienceRecord>> build() => fetch(cursor: null);
|
Future<List<SnExperienceRecord>> fetch() async {
|
||||||
|
|
||||||
@override
|
|
||||||
Future<CursorPagingData<SnExperienceRecord>> fetch({
|
|
||||||
required String? cursor,
|
|
||||||
}) async {
|
|
||||||
final client = ref.read(apiClientProvider);
|
final client = ref.read(apiClientProvider);
|
||||||
final offset = cursor == null ? 0 : int.parse(cursor);
|
|
||||||
|
|
||||||
final queryParams = {'offset': offset, 'take': _pageSize};
|
final queryParams = {'offset': fetchedCount.toString(), 'take': pageSize};
|
||||||
|
|
||||||
final response = await client.get(
|
final response = await client.get(
|
||||||
'/pass/accounts/me/leveling',
|
'/pass/accounts/me/leveling',
|
||||||
queryParameters: queryParams,
|
queryParameters: queryParams,
|
||||||
);
|
);
|
||||||
final total = int.parse(response.headers.value('X-Total') ?? '0');
|
|
||||||
final List<dynamic> data = response.data;
|
|
||||||
final records =
|
|
||||||
data.map((json) => SnExperienceRecord.fromJson(json)).toList();
|
|
||||||
|
|
||||||
final hasMore = offset + records.length < total;
|
totalCount = int.parse(response.headers.value('X-Total') ?? '0');
|
||||||
final nextCursor = hasMore ? (offset + records.length).toString() : null;
|
|
||||||
|
|
||||||
return CursorPagingData(
|
final List<SnExperienceRecord> records =
|
||||||
items: records,
|
response.data
|
||||||
hasMore: hasMore,
|
.map((json) => SnExperienceRecord.fromJson(json))
|
||||||
nextCursor: nextCursor,
|
.cast<SnExperienceRecord>()
|
||||||
);
|
.toList();
|
||||||
|
|
||||||
|
return records;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -189,19 +181,13 @@ class LevelingScreen extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SliverGap(8),
|
const SliverGap(8),
|
||||||
PagingHelperSliverView(
|
PaginationList(
|
||||||
provider: levelingHistoryNotifierProvider,
|
provider: levelingHistoryNotifierProvider,
|
||||||
futureRefreshable: levelingHistoryNotifierProvider.future,
|
notifier: levelingHistoryNotifierProvider.notifier,
|
||||||
notifierRefreshable: levelingHistoryNotifierProvider.notifier,
|
isRefreshable: false,
|
||||||
contentBuilder:
|
isSliver: true,
|
||||||
(data, widgetCount, endItemView) => SliverList.builder(
|
itemBuilder:
|
||||||
itemCount: widgetCount,
|
(context, idx, record) => ListTile(
|
||||||
itemBuilder: (context, index) {
|
|
||||||
if (index == widgetCount - 1) {
|
|
||||||
return endItemView;
|
|
||||||
}
|
|
||||||
final record = data.items[index];
|
|
||||||
return ListTile(
|
|
||||||
title: Column(
|
title: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
@@ -214,9 +200,7 @@ class LevelingScreen extends HookConsumerWidget {
|
|||||||
record.createdAt.formatRelative(context),
|
record.createdAt.formatRelative(context),
|
||||||
).fontSize(13),
|
).fontSize(13),
|
||||||
Text('·').fontSize(13).bold(),
|
Text('·').fontSize(13).bold(),
|
||||||
Text(
|
Text(record.createdAt.formatSystem()).fontSize(13),
|
||||||
record.createdAt.formatSystem(),
|
|
||||||
).fontSize(13),
|
|
||||||
],
|
],
|
||||||
).opacity(0.8),
|
).opacity(0.8),
|
||||||
],
|
],
|
||||||
@@ -233,8 +217,6 @@ class LevelingScreen extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
minTileHeight: 56,
|
minTileHeight: 56,
|
||||||
contentPadding: EdgeInsets.symmetric(horizontal: 4),
|
contentPadding: EdgeInsets.symmetric(horizontal: 4),
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|||||||
@@ -1,31 +0,0 @@
|
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
||||||
|
|
||||||
part of 'leveling.dart';
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
// RiverpodGenerator
|
|
||||||
// **************************************************************************
|
|
||||||
|
|
||||||
String _$levelingHistoryNotifierHash() =>
|
|
||||||
r'de51012e1590ac46388b6f3f2050b21cb96698d1';
|
|
||||||
|
|
||||||
/// See also [LevelingHistoryNotifier].
|
|
||||||
@ProviderFor(LevelingHistoryNotifier)
|
|
||||||
final levelingHistoryNotifierProvider = AutoDisposeAsyncNotifierProvider<
|
|
||||||
LevelingHistoryNotifier,
|
|
||||||
CursorPagingData<SnExperienceRecord>
|
|
||||||
>.internal(
|
|
||||||
LevelingHistoryNotifier.new,
|
|
||||||
name: r'levelingHistoryNotifierProvider',
|
|
||||||
debugGetCreateSourceHash:
|
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$levelingHistoryNotifierHash,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
);
|
|
||||||
|
|
||||||
typedef _$LevelingHistoryNotifier =
|
|
||||||
AutoDisposeAsyncNotifier<CursorPagingData<SnExperienceRecord>>;
|
|
||||||
// ignore_for_file: type=lint
|
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
|
||||||
@@ -62,6 +62,7 @@ class AccountSettingsScreen extends HookConsumerWidget {
|
|||||||
final confirm = await showConfirmAlert(
|
final confirm = await showConfirmAlert(
|
||||||
'accountDeletionHint'.tr(),
|
'accountDeletionHint'.tr(),
|
||||||
'accountDeletion'.tr(),
|
'accountDeletion'.tr(),
|
||||||
|
isDanger: true,
|
||||||
);
|
);
|
||||||
if (!confirm || !context.mounted) return;
|
if (!confirm || !context.mounted) return;
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ class AuthFactorSheet extends HookConsumerWidget {
|
|||||||
final confirm = await showConfirmAlert(
|
final confirm = await showConfirmAlert(
|
||||||
'authFactorDeleteHint'.tr(),
|
'authFactorDeleteHint'.tr(),
|
||||||
'authFactorDelete'.tr(),
|
'authFactorDelete'.tr(),
|
||||||
|
isDanger: true,
|
||||||
);
|
);
|
||||||
if (!confirm || !context.mounted) return;
|
if (!confirm || !context.mounted) return;
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ class AccountConnectionSheet extends HookConsumerWidget {
|
|||||||
final confirm = await showConfirmAlert(
|
final confirm = await showConfirmAlert(
|
||||||
'accountConnectionDeleteHint'.tr(),
|
'accountConnectionDeleteHint'.tr(),
|
||||||
'accountConnectionDelete'.tr(),
|
'accountConnectionDelete'.tr(),
|
||||||
|
isDanger: true,
|
||||||
);
|
);
|
||||||
if (!confirm || !context.mounted) return;
|
if (!confirm || !context.mounted) return;
|
||||||
try {
|
try {
|
||||||
@@ -332,6 +333,7 @@ class AccountConnectionsSheet extends HookConsumerWidget {
|
|||||||
final confirm = await showConfirmAlert(
|
final confirm = await showConfirmAlert(
|
||||||
'accountConnectionDeleteHint'.tr(),
|
'accountConnectionDeleteHint'.tr(),
|
||||||
'accountConnectionDelete'.tr(),
|
'accountConnectionDelete'.tr(),
|
||||||
|
isDanger: true,
|
||||||
);
|
);
|
||||||
if (confirm && context.mounted) {
|
if (confirm && context.mounted) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ class ContactMethodSheet extends HookConsumerWidget {
|
|||||||
final confirm = await showConfirmAlert(
|
final confirm = await showConfirmAlert(
|
||||||
'contactMethodDeleteHint'.tr(),
|
'contactMethodDeleteHint'.tr(),
|
||||||
'contactMethodDelete'.tr(),
|
'contactMethodDelete'.tr(),
|
||||||
|
isDanger: true,
|
||||||
);
|
);
|
||||||
if (!confirm || !context.mounted) return;
|
if (!confirm || !context.mounted) return;
|
||||||
try {
|
try {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -38,6 +38,20 @@ final Map<int, (String, String, IconData)> kFactorTypes = {
|
|||||||
4: ('authFactorPin', 'authFactorPinDescription', Symbols.nest_secure_alarm),
|
4: ('authFactorPin', 'authFactorPinDescription', Symbols.nest_secure_alarm),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/// Performs post-login tasks including fetching user info, subscribing to push
|
||||||
|
/// notifications, connecting websocket, and closing the login dialog.
|
||||||
|
Future<void> performPostLogin(BuildContext context, WidgetRef ref) async {
|
||||||
|
final userNotifier = ref.read(userInfoProvider.notifier);
|
||||||
|
await userNotifier.fetchUser();
|
||||||
|
final apiClient = ref.read(apiClientProvider);
|
||||||
|
subscribePushNotification(apiClient);
|
||||||
|
final wsNotifier = ref.read(websocketStateProvider.notifier);
|
||||||
|
wsNotifier.connect();
|
||||||
|
if (context.mounted && Navigator.canPop(context)) {
|
||||||
|
Navigator.pop(context, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class _LoginCheckScreen extends HookConsumerWidget {
|
class _LoginCheckScreen extends HookConsumerWidget {
|
||||||
final SnAuthChallenge? challenge;
|
final SnAuthChallenge? challenge;
|
||||||
final SnAuthFactor? factor;
|
final SnAuthFactor? factor;
|
||||||
@@ -80,14 +94,7 @@ class _LoginCheckScreen extends HookConsumerWidget {
|
|||||||
if (!context.mounted) return;
|
if (!context.mounted) return;
|
||||||
|
|
||||||
// Do post login tasks
|
// Do post login tasks
|
||||||
final userNotifier = ref.read(userInfoProvider.notifier);
|
await performPostLogin(context, ref);
|
||||||
userNotifier.fetchUser().then((_) {
|
|
||||||
final apiClient = ref.read(apiClientProvider);
|
|
||||||
subscribePushNotification(apiClient);
|
|
||||||
final wsNotifier = ref.read(websocketStateProvider.notifier);
|
|
||||||
wsNotifier.connect();
|
|
||||||
if (context.mounted) Navigator.pop(context, true);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() {
|
useEffect(() {
|
||||||
@@ -628,17 +635,13 @@ class _LoginLookupScreen extends HookConsumerWidget {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
final challenge = SnAuthChallenge.fromJson(resp.data);
|
final token = resp.data['token'];
|
||||||
onChallenge(challenge);
|
setToken(ref.watch(sharedPreferencesProvider), token);
|
||||||
final factorResp = await client.get(
|
ref.invalidate(tokenProvider);
|
||||||
'/pass/auth/challenge/${challenge.id}/factors',
|
if (!context.mounted) return;
|
||||||
);
|
|
||||||
onFactor(
|
// Do post login tasks
|
||||||
List<SnAuthFactor>.from(
|
await performPostLogin(context, ref);
|
||||||
factorResp.data.map((ele) => SnAuthFactor.fromJson(ele)),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
onNext();
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (err is SignInWithAppleAuthorizationException) return;
|
if (err is SignInWithAppleAuthorizationException) return;
|
||||||
showErrorAlert(err);
|
showErrorAlert(err);
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:convert';
|
|
||||||
import 'package:dio/dio.dart';
|
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
@@ -8,10 +6,6 @@ import 'package:flutter_hooks/flutter_hooks.dart';
|
|||||||
import 'package:gap/gap.dart';
|
import 'package:gap/gap.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:island/models/chat.dart';
|
import 'package:island/models/chat.dart';
|
||||||
import 'package:island/models/file.dart';
|
|
||||||
import 'package:island/models/account.dart';
|
|
||||||
import 'package:island/pods/database.dart';
|
|
||||||
import 'package:island/pods/chat/call.dart';
|
|
||||||
import 'package:island/pods/chat/chat_summary.dart';
|
import 'package:island/pods/chat/chat_summary.dart';
|
||||||
import 'package:island/pods/network.dart';
|
import 'package:island/pods/network.dart';
|
||||||
import 'package:island/pods/userinfo.dart';
|
import 'package:island/pods/userinfo.dart';
|
||||||
@@ -26,10 +20,9 @@ import 'package:island/widgets/navigation/fab_menu.dart';
|
|||||||
import 'package:island/widgets/response.dart';
|
import 'package:island/widgets/response.dart';
|
||||||
import 'package:material_symbols_icons/symbols.dart';
|
import 'package:material_symbols_icons/symbols.dart';
|
||||||
import 'package:relative_time/relative_time.dart';
|
import 'package:relative_time/relative_time.dart';
|
||||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
|
||||||
import 'package:styled_widget/styled_widget.dart';
|
import 'package:styled_widget/styled_widget.dart';
|
||||||
|
import 'package:super_sliver_list/super_sliver_list.dart';
|
||||||
part 'chat.g.dart';
|
import 'package:island/pods/chat/chat_room.dart';
|
||||||
|
|
||||||
class ChatRoomListTile extends HookConsumerWidget {
|
class ChatRoomListTile extends HookConsumerWidget {
|
||||||
final SnChatRoom room;
|
final SnChatRoom room;
|
||||||
@@ -184,96 +177,6 @@ class ChatRoomListTile extends HookConsumerWidget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@riverpod
|
|
||||||
Future<List<SnChatRoom>> chatroomsJoined(Ref ref) async {
|
|
||||||
final db = ref.watch(databaseProvider);
|
|
||||||
|
|
||||||
try {
|
|
||||||
final localRoomsData = await db.select(db.chatRooms).get();
|
|
||||||
if (localRoomsData.isNotEmpty) {
|
|
||||||
final localRooms = await Future.wait(
|
|
||||||
localRoomsData.map((row) async {
|
|
||||||
final membersRows =
|
|
||||||
await (db.select(db.chatMembers)
|
|
||||||
..where((m) => m.chatRoomId.equals(row.id))).get();
|
|
||||||
final members =
|
|
||||||
membersRows.map((mRow) {
|
|
||||||
final account = SnAccount.fromJson(mRow.account);
|
|
||||||
SnAccountStatus? status;
|
|
||||||
if (mRow.status != null) {
|
|
||||||
status = SnAccountStatus.fromJson(jsonDecode(mRow.status!));
|
|
||||||
}
|
|
||||||
return SnChatMember(
|
|
||||||
id: mRow.id,
|
|
||||||
chatRoomId: mRow.chatRoomId,
|
|
||||||
accountId: mRow.accountId,
|
|
||||||
account: account,
|
|
||||||
nick: mRow.nick,
|
|
||||||
role: mRow.role,
|
|
||||||
notify: mRow.notify,
|
|
||||||
joinedAt: mRow.joinedAt,
|
|
||||||
breakUntil: mRow.breakUntil,
|
|
||||||
timeoutUntil: mRow.timeoutUntil,
|
|
||||||
isBot: mRow.isBot,
|
|
||||||
status: status,
|
|
||||||
lastTyped: mRow.lastTyped,
|
|
||||||
createdAt: mRow.createdAt,
|
|
||||||
updatedAt: mRow.updatedAt,
|
|
||||||
deletedAt: mRow.deletedAt,
|
|
||||||
chatRoom: null,
|
|
||||||
);
|
|
||||||
}).toList();
|
|
||||||
return SnChatRoom(
|
|
||||||
id: row.id,
|
|
||||||
name: row.name,
|
|
||||||
description: row.description,
|
|
||||||
type: row.type,
|
|
||||||
isPublic: row.isPublic!,
|
|
||||||
isCommunity: row.isCommunity!,
|
|
||||||
picture:
|
|
||||||
row.picture != null ? SnCloudFile.fromJson(row.picture!) : null,
|
|
||||||
background:
|
|
||||||
row.background != null
|
|
||||||
? SnCloudFile.fromJson(row.background!)
|
|
||||||
: null,
|
|
||||||
realmId: row.realmId,
|
|
||||||
realm: null,
|
|
||||||
createdAt: row.createdAt,
|
|
||||||
updatedAt: row.updatedAt,
|
|
||||||
deletedAt: row.deletedAt,
|
|
||||||
members: members,
|
|
||||||
);
|
|
||||||
}),
|
|
||||||
);
|
|
||||||
|
|
||||||
// Background sync
|
|
||||||
Future(() async {
|
|
||||||
try {
|
|
||||||
final client = ref.read(apiClientProvider);
|
|
||||||
final resp = await client.get('/sphere/chat');
|
|
||||||
final remoteRooms =
|
|
||||||
resp.data
|
|
||||||
.map((e) => SnChatRoom.fromJson(e))
|
|
||||||
.cast<SnChatRoom>()
|
|
||||||
.toList();
|
|
||||||
await db.saveChatRooms(remoteRooms);
|
|
||||||
ref.invalidateSelf();
|
|
||||||
} catch (_) {}
|
|
||||||
}).ignore();
|
|
||||||
|
|
||||||
return localRooms;
|
|
||||||
}
|
|
||||||
} catch (_) {}
|
|
||||||
|
|
||||||
// Fallback to API
|
|
||||||
final client = ref.watch(apiClientProvider);
|
|
||||||
final resp = await client.get('/sphere/chat');
|
|
||||||
final rooms =
|
|
||||||
resp.data.map((e) => SnChatRoom.fromJson(e)).cast<SnChatRoom>().toList();
|
|
||||||
await db.saveChatRooms(rooms);
|
|
||||||
return rooms;
|
|
||||||
}
|
|
||||||
|
|
||||||
class ChatListBodyWidget extends HookConsumerWidget {
|
class ChatListBodyWidget extends HookConsumerWidget {
|
||||||
final bool isFloating;
|
final bool isFloating;
|
||||||
final TabController tabController;
|
final TabController tabController;
|
||||||
@@ -288,8 +191,7 @@ class ChatListBodyWidget extends HookConsumerWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
final chats = ref.watch(chatroomsJoinedProvider);
|
final chats = ref.watch(chatRoomJoinedNotifierProvider);
|
||||||
final callState = ref.watch(callNotifierProvider);
|
|
||||||
|
|
||||||
Widget bodyWidget = Column(
|
Widget bodyWidget = Column(
|
||||||
children: [
|
children: [
|
||||||
@@ -312,12 +214,10 @@ class ChatListBodyWidget extends HookConsumerWidget {
|
|||||||
(items) => RefreshIndicator(
|
(items) => RefreshIndicator(
|
||||||
onRefresh:
|
onRefresh:
|
||||||
() => Future.sync(() {
|
() => Future.sync(() {
|
||||||
ref.invalidate(chatroomsJoinedProvider);
|
ref.invalidate(chatRoomJoinedNotifierProvider);
|
||||||
}),
|
}),
|
||||||
child: ListView.builder(
|
child: SuperListView.builder(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(bottom: 96),
|
||||||
bottom: callState.isConnected ? 96 : 0,
|
|
||||||
),
|
|
||||||
itemCount:
|
itemCount:
|
||||||
items
|
items
|
||||||
.where(
|
.where(
|
||||||
@@ -364,7 +264,7 @@ class ChatListBodyWidget extends HookConsumerWidget {
|
|||||||
(error, stack) => ResponseErrorWidget(
|
(error, stack) => ResponseErrorWidget(
|
||||||
error: error,
|
error: error,
|
||||||
onRetry: () {
|
onRetry: () {
|
||||||
ref.invalidate(chatroomsJoinedProvider);
|
ref.invalidate(chatRoomJoinedNotifierProvider);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -441,7 +341,7 @@ class ChatListScreen extends HookConsumerWidget {
|
|||||||
|
|
||||||
// Listen for chat rooms refresh events
|
// Listen for chat rooms refresh events
|
||||||
final subscription = eventBus.on<ChatRoomsRefreshEvent>().listen((event) {
|
final subscription = eventBus.on<ChatRoomsRefreshEvent>().listen((event) {
|
||||||
ref.invalidate(chatroomsJoinedProvider);
|
ref.invalidate(chatRoomJoinedNotifierProvider);
|
||||||
});
|
});
|
||||||
|
|
||||||
return () {
|
return () {
|
||||||
@@ -609,46 +509,6 @@ class ChatListScreen extends HookConsumerWidget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@riverpod
|
|
||||||
Future<SnChatRoom?> chatroom(Ref ref, String? identifier) async {
|
|
||||||
if (identifier == null) return null;
|
|
||||||
try {
|
|
||||||
final client = ref.watch(apiClientProvider);
|
|
||||||
final resp = await client.get('/sphere/chat/$identifier');
|
|
||||||
return SnChatRoom.fromJson(resp.data);
|
|
||||||
} catch (err) {
|
|
||||||
if (err is DioException && err.response?.statusCode == 404) {
|
|
||||||
return null; // Chat room not found
|
|
||||||
}
|
|
||||||
rethrow; // Rethrow other errors
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@riverpod
|
|
||||||
Future<SnChatMember?> chatroomIdentity(Ref ref, String? identifier) async {
|
|
||||||
if (identifier == null) return null;
|
|
||||||
try {
|
|
||||||
final client = ref.watch(apiClientProvider);
|
|
||||||
final resp = await client.get('/sphere/chat/$identifier/members/me');
|
|
||||||
return SnChatMember.fromJson(resp.data);
|
|
||||||
} catch (err) {
|
|
||||||
if (err is DioException && err.response?.statusCode == 404) {
|
|
||||||
return null; // Chat member not found
|
|
||||||
}
|
|
||||||
rethrow; // Rethrow other errors
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@riverpod
|
|
||||||
Future<List<SnChatMember>> chatroomInvites(Ref ref) async {
|
|
||||||
final client = ref.watch(apiClientProvider);
|
|
||||||
final resp = await client.get('/sphere/chat/invites');
|
|
||||||
return resp.data
|
|
||||||
.map((e) => SnChatMember.fromJson(e))
|
|
||||||
.cast<SnChatMember>()
|
|
||||||
.toList();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _ChatInvitesSheet extends HookConsumerWidget {
|
class _ChatInvitesSheet extends HookConsumerWidget {
|
||||||
const _ChatInvitesSheet();
|
const _ChatInvitesSheet();
|
||||||
|
|
||||||
@@ -661,7 +521,7 @@ class _ChatInvitesSheet extends HookConsumerWidget {
|
|||||||
final client = ref.read(apiClientProvider);
|
final client = ref.read(apiClientProvider);
|
||||||
await client.post('/sphere/chat/invites/${invite.chatRoom!.id}/accept');
|
await client.post('/sphere/chat/invites/${invite.chatRoom!.id}/accept');
|
||||||
ref.invalidate(chatroomInvitesProvider);
|
ref.invalidate(chatroomInvitesProvider);
|
||||||
ref.invalidate(chatroomsJoinedProvider);
|
ref.invalidate(chatRoomJoinedNotifierProvider);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
showErrorAlert(err);
|
showErrorAlert(err);
|
||||||
}
|
}
|
||||||
@@ -712,16 +572,6 @@ class _ChatInvitesSheet extends HookConsumerWidget {
|
|||||||
subtitle: Row(
|
subtitle: Row(
|
||||||
spacing: 6,
|
spacing: 6,
|
||||||
children: [
|
children: [
|
||||||
Flexible(
|
|
||||||
child:
|
|
||||||
Text(
|
|
||||||
invite.role >= 100
|
|
||||||
? 'permissionOwner'
|
|
||||||
: invite.role >= 50
|
|
||||||
? 'permissionModerator'
|
|
||||||
: 'permissionMember',
|
|
||||||
).tr(),
|
|
||||||
),
|
|
||||||
if (invite.chatRoom!.type == 1)
|
if (invite.chatRoom!.type == 1)
|
||||||
Badge(
|
Badge(
|
||||||
label: const Text('directMessage').tr(),
|
label: const Text('directMessage').tr(),
|
||||||
|
|||||||
@@ -1,309 +0,0 @@
|
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
||||||
|
|
||||||
part of 'chat.dart';
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
// RiverpodGenerator
|
|
||||||
// **************************************************************************
|
|
||||||
|
|
||||||
String _$chatroomsJoinedHash() => r'9523efecd1869e7dd26adfc8ec87be48db19ee1c';
|
|
||||||
|
|
||||||
/// See also [chatroomsJoined].
|
|
||||||
@ProviderFor(chatroomsJoined)
|
|
||||||
final chatroomsJoinedProvider =
|
|
||||||
AutoDisposeFutureProvider<List<SnChatRoom>>.internal(
|
|
||||||
chatroomsJoined,
|
|
||||||
name: r'chatroomsJoinedProvider',
|
|
||||||
debugGetCreateSourceHash:
|
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$chatroomsJoinedHash,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
);
|
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
|
||||||
// ignore: unused_element
|
|
||||||
typedef ChatroomsJoinedRef = AutoDisposeFutureProviderRef<List<SnChatRoom>>;
|
|
||||||
String _$chatroomHash() => r'2b17d94728026420d18d6c383d2400cf4a070913';
|
|
||||||
|
|
||||||
/// Copied from Dart SDK
|
|
||||||
class _SystemHash {
|
|
||||||
_SystemHash._();
|
|
||||||
|
|
||||||
static int combine(int hash, int value) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + value);
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
|
||||||
return hash ^ (hash >> 6);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int finish(int hash) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = hash ^ (hash >> 11);
|
|
||||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// See also [chatroom].
|
|
||||||
@ProviderFor(chatroom)
|
|
||||||
const chatroomProvider = ChatroomFamily();
|
|
||||||
|
|
||||||
/// See also [chatroom].
|
|
||||||
class ChatroomFamily extends Family<AsyncValue<SnChatRoom?>> {
|
|
||||||
/// See also [chatroom].
|
|
||||||
const ChatroomFamily();
|
|
||||||
|
|
||||||
/// See also [chatroom].
|
|
||||||
ChatroomProvider call(String? identifier) {
|
|
||||||
return ChatroomProvider(identifier);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
ChatroomProvider getProviderOverride(covariant ChatroomProvider provider) {
|
|
||||||
return call(provider.identifier);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
|
||||||
|
|
||||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
|
||||||
_allTransitiveDependencies;
|
|
||||||
|
|
||||||
@override
|
|
||||||
String? get name => r'chatroomProvider';
|
|
||||||
}
|
|
||||||
|
|
||||||
/// See also [chatroom].
|
|
||||||
class ChatroomProvider extends AutoDisposeFutureProvider<SnChatRoom?> {
|
|
||||||
/// See also [chatroom].
|
|
||||||
ChatroomProvider(String? identifier)
|
|
||||||
: this._internal(
|
|
||||||
(ref) => chatroom(ref as ChatroomRef, identifier),
|
|
||||||
from: chatroomProvider,
|
|
||||||
name: r'chatroomProvider',
|
|
||||||
debugGetCreateSourceHash:
|
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$chatroomHash,
|
|
||||||
dependencies: ChatroomFamily._dependencies,
|
|
||||||
allTransitiveDependencies: ChatroomFamily._allTransitiveDependencies,
|
|
||||||
identifier: identifier,
|
|
||||||
);
|
|
||||||
|
|
||||||
ChatroomProvider._internal(
|
|
||||||
super._createNotifier, {
|
|
||||||
required super.name,
|
|
||||||
required super.dependencies,
|
|
||||||
required super.allTransitiveDependencies,
|
|
||||||
required super.debugGetCreateSourceHash,
|
|
||||||
required super.from,
|
|
||||||
required this.identifier,
|
|
||||||
}) : super.internal();
|
|
||||||
|
|
||||||
final String? identifier;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Override overrideWith(
|
|
||||||
FutureOr<SnChatRoom?> Function(ChatroomRef provider) create,
|
|
||||||
) {
|
|
||||||
return ProviderOverride(
|
|
||||||
origin: this,
|
|
||||||
override: ChatroomProvider._internal(
|
|
||||||
(ref) => create(ref as ChatroomRef),
|
|
||||||
from: from,
|
|
||||||
name: null,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
debugGetCreateSourceHash: null,
|
|
||||||
identifier: identifier,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
AutoDisposeFutureProviderElement<SnChatRoom?> createElement() {
|
|
||||||
return _ChatroomProviderElement(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
bool operator ==(Object other) {
|
|
||||||
return other is ChatroomProvider && other.identifier == identifier;
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
int get hashCode {
|
|
||||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
|
||||||
hash = _SystemHash.combine(hash, identifier.hashCode);
|
|
||||||
|
|
||||||
return _SystemHash.finish(hash);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
|
||||||
// ignore: unused_element
|
|
||||||
mixin ChatroomRef on AutoDisposeFutureProviderRef<SnChatRoom?> {
|
|
||||||
/// The parameter `identifier` of this provider.
|
|
||||||
String? get identifier;
|
|
||||||
}
|
|
||||||
|
|
||||||
class _ChatroomProviderElement
|
|
||||||
extends AutoDisposeFutureProviderElement<SnChatRoom?>
|
|
||||||
with ChatroomRef {
|
|
||||||
_ChatroomProviderElement(super.provider);
|
|
||||||
|
|
||||||
@override
|
|
||||||
String? get identifier => (origin as ChatroomProvider).identifier;
|
|
||||||
}
|
|
||||||
|
|
||||||
String _$chatroomIdentityHash() => r'35e19a5a3e31752c79b97ba0358a7ec8fb8f6e99';
|
|
||||||
|
|
||||||
/// See also [chatroomIdentity].
|
|
||||||
@ProviderFor(chatroomIdentity)
|
|
||||||
const chatroomIdentityProvider = ChatroomIdentityFamily();
|
|
||||||
|
|
||||||
/// See also [chatroomIdentity].
|
|
||||||
class ChatroomIdentityFamily extends Family<AsyncValue<SnChatMember?>> {
|
|
||||||
/// See also [chatroomIdentity].
|
|
||||||
const ChatroomIdentityFamily();
|
|
||||||
|
|
||||||
/// See also [chatroomIdentity].
|
|
||||||
ChatroomIdentityProvider call(String? identifier) {
|
|
||||||
return ChatroomIdentityProvider(identifier);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
ChatroomIdentityProvider getProviderOverride(
|
|
||||||
covariant ChatroomIdentityProvider provider,
|
|
||||||
) {
|
|
||||||
return call(provider.identifier);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
|
||||||
|
|
||||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
|
||||||
_allTransitiveDependencies;
|
|
||||||
|
|
||||||
@override
|
|
||||||
String? get name => r'chatroomIdentityProvider';
|
|
||||||
}
|
|
||||||
|
|
||||||
/// See also [chatroomIdentity].
|
|
||||||
class ChatroomIdentityProvider
|
|
||||||
extends AutoDisposeFutureProvider<SnChatMember?> {
|
|
||||||
/// See also [chatroomIdentity].
|
|
||||||
ChatroomIdentityProvider(String? identifier)
|
|
||||||
: this._internal(
|
|
||||||
(ref) => chatroomIdentity(ref as ChatroomIdentityRef, identifier),
|
|
||||||
from: chatroomIdentityProvider,
|
|
||||||
name: r'chatroomIdentityProvider',
|
|
||||||
debugGetCreateSourceHash:
|
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$chatroomIdentityHash,
|
|
||||||
dependencies: ChatroomIdentityFamily._dependencies,
|
|
||||||
allTransitiveDependencies:
|
|
||||||
ChatroomIdentityFamily._allTransitiveDependencies,
|
|
||||||
identifier: identifier,
|
|
||||||
);
|
|
||||||
|
|
||||||
ChatroomIdentityProvider._internal(
|
|
||||||
super._createNotifier, {
|
|
||||||
required super.name,
|
|
||||||
required super.dependencies,
|
|
||||||
required super.allTransitiveDependencies,
|
|
||||||
required super.debugGetCreateSourceHash,
|
|
||||||
required super.from,
|
|
||||||
required this.identifier,
|
|
||||||
}) : super.internal();
|
|
||||||
|
|
||||||
final String? identifier;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Override overrideWith(
|
|
||||||
FutureOr<SnChatMember?> Function(ChatroomIdentityRef provider) create,
|
|
||||||
) {
|
|
||||||
return ProviderOverride(
|
|
||||||
origin: this,
|
|
||||||
override: ChatroomIdentityProvider._internal(
|
|
||||||
(ref) => create(ref as ChatroomIdentityRef),
|
|
||||||
from: from,
|
|
||||||
name: null,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
debugGetCreateSourceHash: null,
|
|
||||||
identifier: identifier,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
AutoDisposeFutureProviderElement<SnChatMember?> createElement() {
|
|
||||||
return _ChatroomIdentityProviderElement(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
bool operator ==(Object other) {
|
|
||||||
return other is ChatroomIdentityProvider && other.identifier == identifier;
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
int get hashCode {
|
|
||||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
|
||||||
hash = _SystemHash.combine(hash, identifier.hashCode);
|
|
||||||
|
|
||||||
return _SystemHash.finish(hash);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
|
||||||
// ignore: unused_element
|
|
||||||
mixin ChatroomIdentityRef on AutoDisposeFutureProviderRef<SnChatMember?> {
|
|
||||||
/// The parameter `identifier` of this provider.
|
|
||||||
String? get identifier;
|
|
||||||
}
|
|
||||||
|
|
||||||
class _ChatroomIdentityProviderElement
|
|
||||||
extends AutoDisposeFutureProviderElement<SnChatMember?>
|
|
||||||
with ChatroomIdentityRef {
|
|
||||||
_ChatroomIdentityProviderElement(super.provider);
|
|
||||||
|
|
||||||
@override
|
|
||||||
String? get identifier => (origin as ChatroomIdentityProvider).identifier;
|
|
||||||
}
|
|
||||||
|
|
||||||
String _$chatroomInvitesHash() => r'5cd6391b09c5517ede19bacce43b45c8d71dd087';
|
|
||||||
|
|
||||||
/// See also [chatroomInvites].
|
|
||||||
@ProviderFor(chatroomInvites)
|
|
||||||
final chatroomInvitesProvider =
|
|
||||||
AutoDisposeFutureProvider<List<SnChatMember>>.internal(
|
|
||||||
chatroomInvites,
|
|
||||||
name: r'chatroomInvitesProvider',
|
|
||||||
debugGetCreateSourceHash:
|
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$chatroomInvitesHash,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
);
|
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
|
||||||
// ignore: unused_element
|
|
||||||
typedef ChatroomInvitesRef = AutoDisposeFutureProviderRef<List<SnChatMember>>;
|
|
||||||
// ignore_for_file: type=lint
|
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
|
||||||
@@ -10,8 +10,8 @@ import 'package:image_picker/image_picker.dart';
|
|||||||
import 'package:island/models/chat.dart';
|
import 'package:island/models/chat.dart';
|
||||||
import 'package:island/models/file.dart';
|
import 'package:island/models/file.dart';
|
||||||
import 'package:island/models/realm.dart';
|
import 'package:island/models/realm.dart';
|
||||||
|
import 'package:island/pods/chat/chat_room.dart';
|
||||||
import 'package:island/pods/network.dart';
|
import 'package:island/pods/network.dart';
|
||||||
import 'package:island/screens/chat/chat.dart';
|
|
||||||
import 'package:island/screens/realm/realms.dart';
|
import 'package:island/screens/realm/realms.dart';
|
||||||
import 'package:island/services/file.dart';
|
import 'package:island/services/file.dart';
|
||||||
import 'package:island/services/file_uploader.dart';
|
import 'package:island/services/file_uploader.dart';
|
||||||
@@ -47,7 +47,7 @@ class EditChatScreen extends HookConsumerWidget {
|
|||||||
final isPublic = useState(true);
|
final isPublic = useState(true);
|
||||||
final isCommunity = useState(false);
|
final isCommunity = useState(false);
|
||||||
|
|
||||||
final chat = ref.watch(chatroomProvider(id));
|
final chat = ref.watch(ChatRoomNotifierProvider(id));
|
||||||
|
|
||||||
final joinedRealms = ref.watch(realmsJoinedProvider);
|
final joinedRealms = ref.watch(realmsJoinedProvider);
|
||||||
final currentRealm = useState<SnRealm?>(null);
|
final currentRealm = useState<SnRealm?>(null);
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import "package:flutter_hooks/flutter_hooks.dart";
|
|||||||
import "package:gap/gap.dart";
|
import "package:gap/gap.dart";
|
||||||
import "package:hooks_riverpod/hooks_riverpod.dart";
|
import "package:hooks_riverpod/hooks_riverpod.dart";
|
||||||
import "package:island/database/message.dart";
|
import "package:island/database/message.dart";
|
||||||
import "package:island/screens/chat/chat.dart";
|
import "package:island/pods/chat/chat_room.dart";
|
||||||
import "package:island/widgets/content/cloud_files.dart";
|
import "package:island/widgets/content/cloud_files.dart";
|
||||||
import "package:super_sliver_list/super_sliver_list.dart";
|
import "package:super_sliver_list/super_sliver_list.dart";
|
||||||
import "package:easy_localization/easy_localization.dart";
|
import "package:easy_localization/easy_localization.dart";
|
||||||
@@ -203,7 +203,7 @@ class PublicRoomPreview extends HookConsumerWidget {
|
|||||||
showLoadingModal(context);
|
showLoadingModal(context);
|
||||||
final apiClient = ref.read(apiClientProvider);
|
final apiClient = ref.read(apiClientProvider);
|
||||||
await apiClient.post('/sphere/chat/${room.id}/members/me');
|
await apiClient.post('/sphere/chat/${room.id}/members/me');
|
||||||
ref.invalidate(chatroomIdentityProvider(id));
|
ref.invalidate(ChatRoomIdentityNotifierProvider(id));
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
showErrorAlert(err);
|
showErrorAlert(err);
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import "dart:async";
|
|||||||
import "dart:math" as math;
|
import "dart:math" as math;
|
||||||
import "package:easy_localization/easy_localization.dart";
|
import "package:easy_localization/easy_localization.dart";
|
||||||
import "package:file_picker/file_picker.dart";
|
import "package:file_picker/file_picker.dart";
|
||||||
|
import "package:google_fonts/google_fonts.dart";
|
||||||
import "package:image_picker/image_picker.dart";
|
import "package:image_picker/image_picker.dart";
|
||||||
import "package:flutter/material.dart";
|
import "package:flutter/material.dart";
|
||||||
import "package:go_router/go_router.dart";
|
import "package:go_router/go_router.dart";
|
||||||
@@ -13,15 +14,15 @@ import "package:island/models/chat.dart";
|
|||||||
import "package:island/models/file.dart";
|
import "package:island/models/file.dart";
|
||||||
import "package:island/models/poll.dart";
|
import "package:island/models/poll.dart";
|
||||||
import "package:island/models/wallet.dart";
|
import "package:island/models/wallet.dart";
|
||||||
import "package:island/pods/chat/chat_rooms.dart";
|
import "package:island/pods/chat/chat_room.dart";
|
||||||
import "package:island/pods/chat/chat_subscribe.dart";
|
import "package:island/pods/chat/chat_subscribe.dart";
|
||||||
import "package:island/pods/chat/messages_notifier.dart";
|
import "package:island/pods/chat/messages_notifier.dart";
|
||||||
import "package:island/pods/network.dart";
|
import "package:island/pods/network.dart";
|
||||||
import "package:island/pods/chat/chat_online_count.dart";
|
import "package:island/pods/chat/chat_online_count.dart";
|
||||||
import "package:island/pods/config.dart";
|
import "package:island/pods/config.dart";
|
||||||
|
import "package:island/pods/userinfo.dart";
|
||||||
import "package:island/screens/chat/search_messages.dart";
|
import "package:island/screens/chat/search_messages.dart";
|
||||||
import "package:island/services/file_uploader.dart";
|
import "package:island/services/file_uploader.dart";
|
||||||
import "package:island/screens/chat/chat.dart";
|
|
||||||
import "package:island/services/responsive.dart";
|
import "package:island/services/responsive.dart";
|
||||||
import "package:island/widgets/alert.dart";
|
import "package:island/widgets/alert.dart";
|
||||||
import "package:island/widgets/app_scaffold.dart";
|
import "package:island/widgets/app_scaffold.dart";
|
||||||
@@ -47,14 +48,12 @@ class ChatRoomScreen extends HookConsumerWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
final chatRoom = ref.watch(chatroomProvider(id));
|
final chatRoom = ref.watch(ChatRoomNotifierProvider(id));
|
||||||
final chatIdentity = ref.watch(chatroomIdentityProvider(id));
|
final chatIdentity = ref.watch(ChatRoomIdentityNotifierProvider(id));
|
||||||
final isSyncing = ref.watch(isSyncingProvider);
|
final isSyncing = ref.watch(isSyncingProvider);
|
||||||
final onlineCount = ref.watch(chatOnlineCountNotifierProvider(id));
|
final onlineCount = ref.watch(chatOnlineCountNotifierProvider(id));
|
||||||
final settings = ref.watch(appSettingsNotifierProvider);
|
final settings = ref.watch(appSettingsNotifierProvider);
|
||||||
|
|
||||||
final hasOnlineCount = onlineCount.hasValue;
|
|
||||||
|
|
||||||
if (chatIdentity.isLoading || chatRoom.isLoading) {
|
if (chatIdentity.isLoading || chatRoom.isLoading) {
|
||||||
return AppScaffold(
|
return AppScaffold(
|
||||||
appBar: AppBar(leading: const PageBackButton()),
|
appBar: AppBar(leading: const PageBackButton()),
|
||||||
@@ -101,7 +100,9 @@ class ChatRoomScreen extends HookConsumerWidget {
|
|||||||
await apiClient.post(
|
await apiClient.post(
|
||||||
'/sphere/chat/${room.id}/members/me',
|
'/sphere/chat/${room.id}/members/me',
|
||||||
);
|
);
|
||||||
ref.invalidate(chatroomIdentityProvider(id));
|
ref.invalidate(
|
||||||
|
ChatRoomIdentityNotifierProvider(id),
|
||||||
|
);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
showErrorAlert(err);
|
showErrorAlert(err);
|
||||||
} finally {
|
} finally {
|
||||||
@@ -130,7 +131,7 @@ class ChatRoomScreen extends HookConsumerWidget {
|
|||||||
appBar: AppBar(leading: const PageBackButton()),
|
appBar: AppBar(leading: const PageBackButton()),
|
||||||
body: ResponseErrorWidget(
|
body: ResponseErrorWidget(
|
||||||
error: error,
|
error: error,
|
||||||
onRetry: () => ref.refresh(chatroomProvider(id)),
|
onRetry: () => ref.refresh(ChatRoomNotifierProvider(id)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -409,47 +410,37 @@ class ChatRoomScreen extends HookConsumerWidget {
|
|||||||
|
|
||||||
final compactHeader = isWideScreen(context);
|
final compactHeader = isWideScreen(context);
|
||||||
|
|
||||||
Widget onlineIndicator() => Row(
|
final userInfo = ref.watch(userInfoProvider);
|
||||||
spacing: 8,
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
List<SnChatMember> getValidMembers(List<SnChatMember> members) {
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
return members
|
||||||
children: [
|
.where((member) => member.accountId != userInfo.value?.id)
|
||||||
Container(
|
.toList();
|
||||||
width: 8,
|
}
|
||||||
height: 8,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
shape: BoxShape.circle,
|
|
||||||
color: (onlineCount as AsyncData).value > 1 ? Colors.green : null,
|
|
||||||
border:
|
|
||||||
(onlineCount as AsyncData).value <= 1
|
|
||||||
? Border.all(color: Colors.grey)
|
|
||||||
: null,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'${(onlineCount as AsyncData).value} online',
|
|
||||||
style: Theme.of(context).textTheme.bodySmall!.copyWith(
|
|
||||||
color: Theme.of(context).appBarTheme.foregroundColor!,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
|
|
||||||
Widget comfortHeaderWidget(SnChatRoom? room) => Column(
|
Widget comfortHeaderWidget(SnChatRoom? room) => Column(
|
||||||
spacing: 4,
|
spacing: 4,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
Badge(
|
||||||
|
isLabelVisible: (onlineCount.value ?? 0) > 1,
|
||||||
|
label: Text('${(onlineCount.value ?? 0)}'),
|
||||||
|
textStyle: GoogleFonts.robotoMono(fontSize: 10),
|
||||||
|
textColor: Colors.white,
|
||||||
|
backgroundColor:
|
||||||
|
(onlineCount.value ?? 0) > 1 ? Colors.green : Colors.grey,
|
||||||
|
offset: Offset(6, 14),
|
||||||
|
child: SizedBox(
|
||||||
height: 26,
|
height: 26,
|
||||||
width: 26,
|
width: 26,
|
||||||
child:
|
child:
|
||||||
(room!.type == 1 && room.picture?.id == null)
|
(room!.type == 1 && room.picture?.id == null)
|
||||||
? SplitAvatarWidget(
|
? SplitAvatarWidget(
|
||||||
filesId:
|
filesId:
|
||||||
room.members!
|
getValidMembers(
|
||||||
.map((e) => e.account.profile.picture?.id)
|
room.members!,
|
||||||
.toList(),
|
).map((e) => e.account.profile.picture?.id).toList(),
|
||||||
)
|
)
|
||||||
: room.picture?.id != null
|
: room.picture?.id != null
|
||||||
? ProfilePictureWidget(
|
? ProfilePictureWidget(
|
||||||
@@ -463,12 +454,14 @@ class ChatRoomScreen extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
Text(
|
Text(
|
||||||
(room.type == 1 && room.name == null)
|
(room.type == 1 && room.name == null)
|
||||||
? room.members!.map((e) => e.account.nick).join(', ')
|
? getValidMembers(
|
||||||
|
room.members!,
|
||||||
|
).map((e) => e.account.nick).join(', ')
|
||||||
: room.name!,
|
: room.name!,
|
||||||
).fontSize(15),
|
).fontSize(15),
|
||||||
if (hasOnlineCount) onlineIndicator(),
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -477,16 +470,24 @@ class ChatRoomScreen extends HookConsumerWidget {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
Badge(
|
||||||
|
isLabelVisible: (onlineCount.value ?? 0) > 1,
|
||||||
|
label: Text('${(onlineCount.value ?? 0)}'),
|
||||||
|
textStyle: GoogleFonts.robotoMono(fontSize: 10),
|
||||||
|
backgroundColor:
|
||||||
|
(onlineCount.value ?? 0) > 1 ? Colors.green : Colors.grey,
|
||||||
|
textColor: Colors.white,
|
||||||
|
offset: Offset(6, 14),
|
||||||
|
child: SizedBox(
|
||||||
height: 28,
|
height: 28,
|
||||||
width: 28,
|
width: 28,
|
||||||
child:
|
child:
|
||||||
(room!.type == 1 && room.picture?.id == null)
|
(room!.type == 1 && room.picture?.id == null)
|
||||||
? SplitAvatarWidget(
|
? SplitAvatarWidget(
|
||||||
filesId:
|
filesId:
|
||||||
room.members!
|
getValidMembers(
|
||||||
.map((e) => e.account.profile.picture?.id)
|
room.members!,
|
||||||
.toList(),
|
).map((e) => e.account.profile.picture?.id).toList(),
|
||||||
)
|
)
|
||||||
: room.picture?.id != null
|
: room.picture?.id != null
|
||||||
? ProfilePictureWidget(
|
? ProfilePictureWidget(
|
||||||
@@ -500,12 +501,14 @@ class ChatRoomScreen extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
Text(
|
Text(
|
||||||
(room.type == 1 && room.name == null)
|
(room.type == 1 && room.name == null)
|
||||||
? room.members!.map((e) => e.account.nick).join(', ')
|
? getValidMembers(
|
||||||
|
room.members!,
|
||||||
|
).map((e) => e.account.nick).join(', ')
|
||||||
: room.name!,
|
: room.name!,
|
||||||
).fontSize(19),
|
).fontSize(19),
|
||||||
if (hasOnlineCount) onlineIndicator().padding(left: 4, top: 6),
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -654,22 +657,35 @@ class ChatRoomScreen extends HookConsumerWidget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget chatMessageListWidget(
|
Widget chatMessageListWidget(List<LocalChatMessage> messageList) =>
|
||||||
List<LocalChatMessage> messageList,
|
ValueListenableBuilder<double>(
|
||||||
) => AnimatedPadding(
|
valueListenable: inputHeight,
|
||||||
|
builder: (context, height, child) {
|
||||||
|
return TweenAnimationBuilder<EdgeInsets>(
|
||||||
duration: const Duration(milliseconds: 200),
|
duration: const Duration(milliseconds: 200),
|
||||||
curve: Curves.easeOut,
|
curve: Curves.easeOut,
|
||||||
padding: EdgeInsets.only(
|
tween: EdgeInsetsTween(
|
||||||
bottom: MediaQuery.of(context).padding.bottom + 8 + inputHeight.value,
|
begin: EdgeInsets.only(
|
||||||
|
top: MediaQuery.of(context).padding.top,
|
||||||
|
bottom: MediaQuery.of(context).padding.bottom + 8 + height,
|
||||||
),
|
),
|
||||||
child: SuperListView.builder(
|
end: EdgeInsets.only(
|
||||||
|
top: MediaQuery.of(context).padding.top,
|
||||||
|
bottom: MediaQuery.of(context).padding.bottom + 8 + height,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
builder: (context, padding, child) {
|
||||||
|
return SuperListView.builder(
|
||||||
listController: listController,
|
listController: listController,
|
||||||
controller: scrollController,
|
controller: scrollController,
|
||||||
reverse: true, // Show newest messages at the bottom
|
reverse: true, // Show newest messages at the bottom
|
||||||
|
padding: padding,
|
||||||
itemCount: messageList.length,
|
itemCount: messageList.length,
|
||||||
findChildIndexCallback: (key) {
|
findChildIndexCallback: (key) {
|
||||||
if (key is! ValueKey<String>) return null;
|
if (key is! ValueKey<String>) return null;
|
||||||
final messageId = key.value.substring(messageKeyPrefix.length);
|
final messageId = key.value.substring(
|
||||||
|
messageKeyPrefix.length,
|
||||||
|
);
|
||||||
final index = messageList.indexWhere(
|
final index = messageList.indexWhere(
|
||||||
(m) => (m.nonce ?? m.id) == messageId,
|
(m) => (m.nonce ?? m.id) == messageId,
|
||||||
);
|
);
|
||||||
@@ -679,7 +695,9 @@ class ChatRoomScreen extends HookConsumerWidget {
|
|||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
final message = messageList[index];
|
final message = messageList[index];
|
||||||
final nextMessage =
|
final nextMessage =
|
||||||
index < messageList.length - 1 ? messageList[index + 1] : null;
|
index < messageList.length - 1
|
||||||
|
? messageList[index + 1]
|
||||||
|
: null;
|
||||||
final isLastInGroup =
|
final isLastInGroup =
|
||||||
nextMessage == null ||
|
nextMessage == null ||
|
||||||
nextMessage.senderId != message.senderId ||
|
nextMessage.senderId != message.senderId ||
|
||||||
@@ -689,7 +707,9 @@ class ChatRoomScreen extends HookConsumerWidget {
|
|||||||
.abs() >
|
.abs() >
|
||||||
3;
|
3;
|
||||||
|
|
||||||
final key = Key('$messageKeyPrefix${message.nonce ?? message.id}');
|
final key = Key(
|
||||||
|
'$messageKeyPrefix${message.nonce ?? message.id}',
|
||||||
|
);
|
||||||
|
|
||||||
return MessageItemWrapper(
|
return MessageItemWrapper(
|
||||||
key: key,
|
key: key,
|
||||||
@@ -716,14 +736,17 @@ class ChatRoomScreen extends HookConsumerWidget {
|
|||||||
roomOpenTime: roomOpenTime,
|
roomOpenTime: roomOpenTime,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
return AppScaffold(
|
return AppScaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
leading: !compactHeader ? const Center(child: PageBackButton()) : null,
|
leading: !compactHeader ? const Center(child: PageBackButton()) : null,
|
||||||
automaticallyImplyLeading: false,
|
automaticallyImplyLeading: false,
|
||||||
toolbarHeight: compactHeader ? null : 80,
|
toolbarHeight: compactHeader ? null : 74,
|
||||||
title: chatRoom.when(
|
title: chatRoom.when(
|
||||||
data:
|
data:
|
||||||
(room) =>
|
(room) =>
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import 'package:freezed_annotation/freezed_annotation.dart';
|
|||||||
import 'package:gap/gap.dart';
|
import 'package:gap/gap.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:island/models/chat.dart';
|
import 'package:island/models/chat.dart';
|
||||||
|
import 'package:island/pods/chat/chat_room.dart';
|
||||||
import 'package:island/pods/network.dart';
|
import 'package:island/pods/network.dart';
|
||||||
import 'package:island/screens/chat/chat.dart';
|
|
||||||
import 'package:island/widgets/account/account_pfc.dart';
|
import 'package:island/widgets/account/account_pfc.dart';
|
||||||
import 'package:island/widgets/account/account_picker.dart';
|
import 'package:island/widgets/account/account_picker.dart';
|
||||||
import 'package:island/widgets/account/status.dart';
|
import 'package:island/widgets/account/status.dart';
|
||||||
@@ -39,8 +39,8 @@ class ChatDetailScreen extends HookConsumerWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
final roomState = ref.watch(chatroomProvider(id));
|
final roomState = ref.watch(ChatRoomNotifierProvider(id));
|
||||||
final roomIdentity = ref.watch(chatroomIdentityProvider(id));
|
final roomIdentity = ref.watch(ChatRoomIdentityNotifierProvider(id));
|
||||||
final totalMessages = ref.watch(totalMessagesCountProvider(id));
|
final totalMessages = ref.watch(totalMessagesCountProvider(id));
|
||||||
|
|
||||||
const kNotifyLevelText = [
|
const kNotifyLevelText = [
|
||||||
@@ -56,7 +56,7 @@ class ChatDetailScreen extends HookConsumerWidget {
|
|||||||
'/sphere/chat/$id/members/me/notify',
|
'/sphere/chat/$id/members/me/notify',
|
||||||
data: {'notify_level': level},
|
data: {'notify_level': level},
|
||||||
);
|
);
|
||||||
ref.invalidate(chatroomIdentityProvider(id));
|
ref.invalidate(ChatRoomIdentityNotifierProvider(id));
|
||||||
if (context.mounted) {
|
if (context.mounted) {
|
||||||
showSnackBar(
|
showSnackBar(
|
||||||
'chatNotifyLevelUpdated'.tr(args: [kNotifyLevelText[level].tr()]),
|
'chatNotifyLevelUpdated'.tr(args: [kNotifyLevelText[level].tr()]),
|
||||||
@@ -74,7 +74,7 @@ class ChatDetailScreen extends HookConsumerWidget {
|
|||||||
'/sphere/chat/$id/members/me/notify',
|
'/sphere/chat/$id/members/me/notify',
|
||||||
data: {'break_until': until.toUtc().toIso8601String()},
|
data: {'break_until': until.toUtc().toIso8601String()},
|
||||||
);
|
);
|
||||||
ref.invalidate(chatroomProvider(id));
|
ref.invalidate(ChatRoomNotifierProvider(id));
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
showErrorAlert(err);
|
showErrorAlert(err);
|
||||||
}
|
}
|
||||||
@@ -439,13 +439,18 @@ class _ChatRoomActionMenu extends HookConsumerWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
final chatIdentity = ref.watch(chatroomIdentityProvider(id));
|
final chatIdentity = ref.watch(ChatRoomIdentityNotifierProvider(id));
|
||||||
|
final chatRoom = ref.watch(ChatRoomNotifierProvider(id));
|
||||||
|
|
||||||
|
final isManagable =
|
||||||
|
chatIdentity.value?.accountId == chatRoom.value?.accountId ||
|
||||||
|
chatRoom.value?.type == 1;
|
||||||
|
|
||||||
return PopupMenuButton(
|
return PopupMenuButton(
|
||||||
icon: Icon(Icons.more_vert, shadows: [iconShadow]),
|
icon: Icon(Icons.more_vert, shadows: [iconShadow]),
|
||||||
itemBuilder:
|
itemBuilder:
|
||||||
(context) => [
|
(context) => [
|
||||||
if ((chatIdentity.value?.role ?? 0) >= 50)
|
if (isManagable)
|
||||||
PopupMenuItem(
|
PopupMenuItem(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
showModalBottomSheet(
|
showModalBottomSheet(
|
||||||
@@ -456,7 +461,7 @@ class _ChatRoomActionMenu extends HookConsumerWidget {
|
|||||||
).then((value) {
|
).then((value) {
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
// Invalidate to refresh room data after edit
|
// Invalidate to refresh room data after edit
|
||||||
ref.invalidate(chatroomProvider(id));
|
ref.invalidate(ChatRoomNotifierProvider(id));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -471,7 +476,7 @@ class _ChatRoomActionMenu extends HookConsumerWidget {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if ((chatIdentity.value?.role ?? 0) >= 100)
|
if (isManagable)
|
||||||
PopupMenuItem(
|
PopupMenuItem(
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
@@ -487,11 +492,12 @@ class _ChatRoomActionMenu extends HookConsumerWidget {
|
|||||||
showConfirmAlert(
|
showConfirmAlert(
|
||||||
'deleteChatRoomHint'.tr(),
|
'deleteChatRoomHint'.tr(),
|
||||||
'deleteChatRoom'.tr(),
|
'deleteChatRoom'.tr(),
|
||||||
|
isDanger: true,
|
||||||
).then((confirm) async {
|
).then((confirm) async {
|
||||||
if (confirm) {
|
if (confirm) {
|
||||||
final client = ref.watch(apiClientProvider);
|
final client = ref.watch(apiClientProvider);
|
||||||
await client.delete('/sphere/chat/$id');
|
await client.delete('/sphere/chat/$id');
|
||||||
ref.invalidate(chatroomsJoinedProvider);
|
ref.invalidate(chatRoomJoinedNotifierProvider);
|
||||||
if (context.mounted) {
|
if (context.mounted) {
|
||||||
context.pop();
|
context.pop();
|
||||||
}
|
}
|
||||||
@@ -524,7 +530,7 @@ class _ChatRoomActionMenu extends HookConsumerWidget {
|
|||||||
if (confirm) {
|
if (confirm) {
|
||||||
final client = ref.watch(apiClientProvider);
|
final client = ref.watch(apiClientProvider);
|
||||||
await client.delete('/sphere/chat/$id/members/me');
|
await client.delete('/sphere/chat/$id/members/me');
|
||||||
ref.invalidate(chatroomsJoinedProvider);
|
ref.invalidate(chatRoomJoinedNotifierProvider);
|
||||||
if (context.mounted) {
|
if (context.mounted) {
|
||||||
context.pop();
|
context.pop();
|
||||||
}
|
}
|
||||||
@@ -642,7 +648,12 @@ class _ChatMemberListSheet extends HookConsumerWidget {
|
|||||||
final memberState = ref.watch(chatMemberStateProvider(roomId));
|
final memberState = ref.watch(chatMemberStateProvider(roomId));
|
||||||
final memberNotifier = ref.read(chatMemberStateProvider(roomId).notifier);
|
final memberNotifier = ref.read(chatMemberStateProvider(roomId).notifier);
|
||||||
|
|
||||||
final roomIdentity = ref.watch(chatroomIdentityProvider(roomId));
|
final roomIdentity = ref.watch(ChatRoomIdentityNotifierProvider(roomId));
|
||||||
|
final chatRoom = ref.watch(ChatRoomNotifierProvider(roomId));
|
||||||
|
|
||||||
|
final isManagable =
|
||||||
|
chatRoom.value?.accountId == roomIdentity.value?.accountId ||
|
||||||
|
chatRoom.value?.type == 1;
|
||||||
|
|
||||||
useEffect(() {
|
useEffect(() {
|
||||||
Future(() {
|
Future(() {
|
||||||
@@ -751,45 +762,11 @@ class _ChatMemberListSheet extends HookConsumerWidget {
|
|||||||
const Icon(Symbols.pending_actions, size: 20),
|
const Icon(Symbols.pending_actions, size: 20),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
subtitle: Row(
|
subtitle: Text("@${member.account.name}"),
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
member.role >= 100
|
|
||||||
? 'permissionOwner'
|
|
||||||
: member.role >= 50
|
|
||||||
? 'permissionModerator'
|
|
||||||
: 'permissionMember',
|
|
||||||
).tr(),
|
|
||||||
Text('·').bold().padding(horizontal: 6),
|
|
||||||
Expanded(child: Text("@${member.account.name}")),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
trailing: Row(
|
trailing: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
if ((roomIdentity.value?.role ?? 0) >= 50)
|
if (isManagable)
|
||||||
IconButton(
|
|
||||||
icon: const Icon(Symbols.edit),
|
|
||||||
onPressed: () {
|
|
||||||
showModalBottomSheet(
|
|
||||||
isScrollControlled: true,
|
|
||||||
context: context,
|
|
||||||
builder:
|
|
||||||
(context) => _ChatMemberRoleSheet(
|
|
||||||
roomId: roomId,
|
|
||||||
member: member,
|
|
||||||
),
|
|
||||||
).then((value) {
|
|
||||||
if (value != null) {
|
|
||||||
// Refresh both providers
|
|
||||||
memberNotifier.reset();
|
|
||||||
memberNotifier.loadMore();
|
|
||||||
ref.invalidate(memberListProvider);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
),
|
|
||||||
if ((roomIdentity.value?.role ?? 0) >= 50)
|
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: const Icon(Symbols.delete),
|
icon: const Icon(Symbols.delete),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
@@ -828,120 +805,3 @@ class _ChatMemberListSheet extends HookConsumerWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class _ChatMemberRoleSheet extends HookConsumerWidget {
|
|
||||||
final String roomId;
|
|
||||||
final SnChatMember member;
|
|
||||||
|
|
||||||
const _ChatMemberRoleSheet({required this.roomId, required this.member});
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
|
||||||
final roleController = useTextEditingController(
|
|
||||||
text: member.role.toString(),
|
|
||||||
);
|
|
||||||
|
|
||||||
return Container(
|
|
||||||
padding: EdgeInsets.only(
|
|
||||||
bottom: MediaQuery.of(context).viewInsets.bottom,
|
|
||||||
),
|
|
||||||
child: SafeArea(
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
||||||
children: [
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.only(
|
|
||||||
top: 16,
|
|
||||||
left: 20,
|
|
||||||
right: 16,
|
|
||||||
bottom: 12,
|
|
||||||
),
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
'memberRoleEdit'.tr(args: [member.account.name]),
|
|
||||||
style: Theme.of(context).textTheme.headlineSmall?.copyWith(
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
letterSpacing: -0.5,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const Spacer(),
|
|
||||||
IconButton(
|
|
||||||
icon: const Icon(Symbols.close),
|
|
||||||
onPressed: () => Navigator.pop(context),
|
|
||||||
style: IconButton.styleFrom(
|
|
||||||
minimumSize: const Size(36, 36),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const Divider(height: 1),
|
|
||||||
Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
||||||
children: [
|
|
||||||
Autocomplete<int>(
|
|
||||||
optionsBuilder: (TextEditingValue textEditingValue) {
|
|
||||||
if (textEditingValue.text.isEmpty) {
|
|
||||||
return const [100, 50, 0];
|
|
||||||
}
|
|
||||||
final int? value = int.tryParse(textEditingValue.text);
|
|
||||||
if (value == null) return const [100, 50, 0];
|
|
||||||
return [100, 50, 0].where(
|
|
||||||
(option) =>
|
|
||||||
option.toString().contains(textEditingValue.text),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
onSelected: (int selection) {
|
|
||||||
roleController.text = selection.toString();
|
|
||||||
},
|
|
||||||
fieldViewBuilder: (
|
|
||||||
context,
|
|
||||||
controller,
|
|
||||||
focusNode,
|
|
||||||
onFieldSubmitted,
|
|
||||||
) {
|
|
||||||
return TextField(
|
|
||||||
controller: controller,
|
|
||||||
focusNode: focusNode,
|
|
||||||
keyboardType: TextInputType.number,
|
|
||||||
decoration: InputDecoration(
|
|
||||||
labelText: 'memberRole'.tr(),
|
|
||||||
helperText: 'memberRoleHint'.tr(),
|
|
||||||
),
|
|
||||||
onTapOutside: (event) => focusNode.unfocus(),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
const Gap(16),
|
|
||||||
FilledButton.icon(
|
|
||||||
onPressed: () async {
|
|
||||||
try {
|
|
||||||
final newRole = int.parse(roleController.text);
|
|
||||||
if (newRole < 0 || newRole > 100) {
|
|
||||||
throw 'roleValidationHint'.tr();
|
|
||||||
}
|
|
||||||
|
|
||||||
final apiClient = ref.read(apiClientProvider);
|
|
||||||
await apiClient.patch(
|
|
||||||
'/sphere/chat/$roomId/members/${member.accountId}/role',
|
|
||||||
data: newRole,
|
|
||||||
);
|
|
||||||
|
|
||||||
if (context.mounted) Navigator.pop(context, true);
|
|
||||||
} catch (err) {
|
|
||||||
showErrorAlert(err);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
icon: const Icon(Symbols.save),
|
|
||||||
label: const Text('saveChanges').tr(),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
).padding(vertical: 16, horizontal: 24),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
|
import 'package:island/pods/chat/chat_room.dart';
|
||||||
import 'package:island/pods/chat/messages_notifier.dart';
|
import 'package:island/pods/chat/messages_notifier.dart';
|
||||||
import 'package:island/pods/chat/chat_rooms.dart';
|
|
||||||
import 'package:island/widgets/app_scaffold.dart';
|
import 'package:island/widgets/app_scaffold.dart';
|
||||||
import 'package:island/widgets/chat/message_list_tile.dart';
|
import 'package:island/widgets/chat/message_list_tile.dart';
|
||||||
import 'package:material_symbols_icons/material_symbols_icons.dart';
|
import 'package:material_symbols_icons/material_symbols_icons.dart';
|
||||||
|
|||||||
@@ -304,16 +304,18 @@ class CreatorHubScreen extends HookConsumerWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void deletePublisher() {
|
void deletePublisher() {
|
||||||
showConfirmAlert('deletePublisherHint'.tr(), 'deletePublisher'.tr()).then(
|
showConfirmAlert(
|
||||||
(confirm) {
|
'deletePublisherHint'.tr(),
|
||||||
|
'deletePublisher'.tr(),
|
||||||
|
isDanger: true,
|
||||||
|
).then((confirm) {
|
||||||
if (confirm) {
|
if (confirm) {
|
||||||
final client = ref.watch(apiClientProvider);
|
final client = ref.watch(apiClientProvider);
|
||||||
client.delete('/sphere/publishers/${currentPublisher.value!.name}');
|
client.delete('/sphere/publishers/${currentPublisher.value!.name}');
|
||||||
ref.invalidate(publishersManagedProvider);
|
ref.invalidate(publishersManagedProvider);
|
||||||
currentPublisher.value = null;
|
currentPublisher.value = null;
|
||||||
}
|
}
|
||||||
},
|
});
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
final List<DropdownMenuItem<SnPublisher>> publishersMenu = publishers.when(
|
final List<DropdownMenuItem<SnPublisher>> publishersMenu = publishers.when(
|
||||||
@@ -571,6 +573,7 @@ class CreatorHubScreen extends HookConsumerWidget {
|
|||||||
child: publisherStats.when(
|
child: publisherStats.when(
|
||||||
data:
|
data:
|
||||||
(stats) => SingleChildScrollView(
|
(stats) => SingleChildScrollView(
|
||||||
|
padding: const EdgeInsets.symmetric(vertical: 24),
|
||||||
child:
|
child:
|
||||||
currentPublisher.value == null
|
currentPublisher.value == null
|
||||||
? ConstrainedBox(
|
? ConstrainedBox(
|
||||||
@@ -600,7 +603,7 @@ class CreatorHubScreen extends HookConsumerWidget {
|
|||||||
).padding(horizontal: 12),
|
).padding(horizontal: 12),
|
||||||
buildNavigationWidget(true),
|
buildNavigationWidget(true),
|
||||||
],
|
],
|
||||||
).padding(vertical: 24)
|
)
|
||||||
: Column(
|
: Column(
|
||||||
spacing: 12,
|
spacing: 12,
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@@ -8,18 +8,16 @@ import 'package:island/pods/site_pages.dart';
|
|||||||
import 'package:island/widgets/sites/page_form.dart';
|
import 'package:island/widgets/sites/page_form.dart';
|
||||||
import 'package:island/widgets/sites/site_action_menu.dart';
|
import 'package:island/widgets/sites/site_action_menu.dart';
|
||||||
import 'package:island/widgets/sites/site_detail_content.dart';
|
import 'package:island/widgets/sites/site_detail_content.dart';
|
||||||
|
import 'package:island/widgets/sites/site_info_card.dart';
|
||||||
import 'package:island/widgets/app_scaffold.dart';
|
import 'package:island/widgets/app_scaffold.dart';
|
||||||
import 'package:material_symbols_icons/symbols.dart';
|
import 'package:material_symbols_icons/symbols.dart';
|
||||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||||
import 'package:island/widgets/sites/info_row.dart';
|
|
||||||
import 'package:island/widgets/sites/pages_section.dart';
|
import 'package:island/widgets/sites/pages_section.dart';
|
||||||
import 'package:island/widgets/sites/file_management_section.dart';
|
import 'package:island/widgets/sites/file_management_section.dart';
|
||||||
import 'package:island/widgets/sites/file_management_action_section.dart';
|
import 'package:island/widgets/sites/file_management_action_section.dart';
|
||||||
import 'package:island/services/responsive.dart';
|
import 'package:island/services/responsive.dart';
|
||||||
import 'package:island/services/time.dart';
|
|
||||||
import 'package:island/widgets/extended_refresh_indicator.dart';
|
import 'package:island/widgets/extended_refresh_indicator.dart';
|
||||||
import 'package:styled_widget/styled_widget.dart';
|
import 'package:styled_widget/styled_widget.dart';
|
||||||
import 'package:url_launcher/url_launcher_string.dart';
|
|
||||||
|
|
||||||
part 'site_detail.g.dart';
|
part 'site_detail.g.dart';
|
||||||
|
|
||||||
@@ -67,7 +65,6 @@ class PublicationSiteDetailScreen extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
body: siteAsync.when(
|
body: siteAsync.when(
|
||||||
data: (site) {
|
data: (site) {
|
||||||
final theme = Theme.of(context);
|
|
||||||
if (isWideScreen(context)) {
|
if (isWideScreen(context)) {
|
||||||
return ExtendedRefreshIndicator(
|
return ExtendedRefreshIndicator(
|
||||||
onRefresh:
|
onRefresh:
|
||||||
@@ -99,76 +96,7 @@ class PublicationSiteDetailScreen extends HookConsumerWidget {
|
|||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Card(
|
SiteInfoCard(site: site),
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.all(16),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
'siteInformation'.tr(),
|
|
||||||
style: theme.textTheme.titleMedium
|
|
||||||
?.copyWith(fontWeight: FontWeight.bold),
|
|
||||||
),
|
|
||||||
const Gap(16),
|
|
||||||
InfoRow(
|
|
||||||
label: 'name'.tr(),
|
|
||||||
value: site.name,
|
|
||||||
icon: Symbols.title,
|
|
||||||
),
|
|
||||||
const Gap(8),
|
|
||||||
InfoRow(
|
|
||||||
label: 'slug'.tr(),
|
|
||||||
value: site.slug,
|
|
||||||
icon: Symbols.tag,
|
|
||||||
monospace: true,
|
|
||||||
),
|
|
||||||
const Gap(8),
|
|
||||||
InfoRow(
|
|
||||||
label: 'siteDomain'.tr(),
|
|
||||||
value: '${site.slug}.solian.page',
|
|
||||||
icon: Symbols.globe,
|
|
||||||
monospace: true,
|
|
||||||
onTap: () {
|
|
||||||
final url =
|
|
||||||
'https://${site.slug}.solian.page';
|
|
||||||
launchUrlString(url);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
const Gap(8),
|
|
||||||
InfoRow(
|
|
||||||
label: 'siteMode'.tr(),
|
|
||||||
value:
|
|
||||||
site.mode == 0
|
|
||||||
? 'siteModeFullyManaged'.tr()
|
|
||||||
: 'siteModeSelfManaged'.tr(),
|
|
||||||
icon: Symbols.settings,
|
|
||||||
),
|
|
||||||
if (site.description != null &&
|
|
||||||
site.description!.isNotEmpty) ...[
|
|
||||||
const Gap(8),
|
|
||||||
InfoRow(
|
|
||||||
label: 'description'.tr(),
|
|
||||||
value: site.description!,
|
|
||||||
icon: Symbols.description,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
const Gap(8),
|
|
||||||
InfoRow(
|
|
||||||
label: 'siteCreated'.tr(),
|
|
||||||
value: site.createdAt.formatSystem(),
|
|
||||||
icon: Symbols.calendar_add_on,
|
|
||||||
),
|
|
||||||
const Gap(8),
|
|
||||||
InfoRow(
|
|
||||||
label: 'siteUpdated'.tr(),
|
|
||||||
value: site.updatedAt.formatSystem(),
|
|
||||||
icon: Symbols.update,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const Gap(8),
|
const Gap(8),
|
||||||
if (site.mode == 1) // Self-Managed only
|
if (site.mode == 1) // Self-Managed only
|
||||||
FileManagementActionSection(
|
FileManagementActionSection(
|
||||||
|
|||||||
@@ -190,6 +190,7 @@ class SiteForm extends HookConsumerWidget {
|
|||||||
final confirmed = await showConfirmAlert(
|
final confirmed = await showConfirmAlert(
|
||||||
'publicationSiteDeleteConfirm'.tr(),
|
'publicationSiteDeleteConfirm'.tr(),
|
||||||
'deletePublicationSite'.tr(),
|
'deletePublicationSite'.tr(),
|
||||||
|
isDanger: true,
|
||||||
);
|
);
|
||||||
if (confirmed != true) return;
|
if (confirmed != true) return;
|
||||||
|
|
||||||
|
|||||||
@@ -221,7 +221,9 @@ class _CreatorSiteItem extends HookConsumerWidget {
|
|||||||
if (confirmed == true) {
|
if (confirmed == true) {
|
||||||
try {
|
try {
|
||||||
final client = ref.read(apiClientProvider);
|
final client = ref.read(apiClientProvider);
|
||||||
await client.delete('/zone/sites/${site.id}');
|
await client.delete(
|
||||||
|
'/zone/sites/$pubName/${site.slug}',
|
||||||
|
);
|
||||||
ref.invalidate(siteListNotifierProvider(pubName));
|
ref.invalidate(siteListNotifierProvider(pubName));
|
||||||
showSnackBar('siteDeletedSuccess'.tr());
|
showSnackBar('siteDeletedSuccess'.tr());
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
@@ -288,6 +288,7 @@ class StickerPackActionMenu extends HookConsumerWidget {
|
|||||||
showConfirmAlert(
|
showConfirmAlert(
|
||||||
'deleteStickerPackHint'.tr(),
|
'deleteStickerPackHint'.tr(),
|
||||||
'deleteStickerPack'.tr(),
|
'deleteStickerPack'.tr(),
|
||||||
|
isDanger: true,
|
||||||
).then((confirm) {
|
).then((confirm) {
|
||||||
if (confirm) {
|
if (confirm) {
|
||||||
final client = ref.watch(apiClientProvider);
|
final client = ref.watch(apiClientProvider);
|
||||||
@@ -319,7 +320,6 @@ class StickerForm extends HookConsumerWidget {
|
|||||||
final formKey = useMemoized(() => GlobalKey<FormState>(), []);
|
final formKey = useMemoized(() => GlobalKey<FormState>(), []);
|
||||||
|
|
||||||
final image = useState<String?>(id == null ? '' : sticker.value?.image.id);
|
final image = useState<String?>(id == null ? '' : sticker.value?.image.id);
|
||||||
final imageController = useTextEditingController(text: image.value);
|
|
||||||
final slugController = useTextEditingController(
|
final slugController = useTextEditingController(
|
||||||
text: id == null ? '' : sticker.value?.slug,
|
text: id == null ? '' : sticker.value?.slug,
|
||||||
);
|
);
|
||||||
@@ -327,7 +327,6 @@ class StickerForm extends HookConsumerWidget {
|
|||||||
useEffect(() {
|
useEffect(() {
|
||||||
if (sticker.value != null) {
|
if (sticker.value != null) {
|
||||||
image.value = sticker.value!.image.id;
|
image.value = sticker.value!.image.id;
|
||||||
imageController.text = sticker.value!.image.id;
|
|
||||||
slugController.text = sticker.value!.slug;
|
slugController.text = sticker.value!.slug;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
@@ -343,7 +342,7 @@ class StickerForm extends HookConsumerWidget {
|
|||||||
id == null
|
id == null
|
||||||
? '/sphere/stickers/$packId/content'
|
? '/sphere/stickers/$packId/content'
|
||||||
: '/sphere/stickers/$packId/content/$id',
|
: '/sphere/stickers/$packId/content/$id',
|
||||||
data: {'slug': slugController.text, 'image_id': imageController.text},
|
data: {'slug': slugController.text, 'image_id': image.value},
|
||||||
options: Options(method: id == null ? 'POST' : 'PATCH'),
|
options: Options(method: id == null ? 'POST' : 'PATCH'),
|
||||||
);
|
);
|
||||||
if (context.mounted) {
|
if (context.mounted) {
|
||||||
@@ -391,7 +390,6 @@ class StickerForm extends HookConsumerWidget {
|
|||||||
).then((value) {
|
).then((value) {
|
||||||
if (value == null) return;
|
if (value == null) return;
|
||||||
image.value = value[0].id;
|
image.value = value[0].id;
|
||||||
imageController.text = image.value!;
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
icon: const Icon(Symbols.cloud_upload),
|
icon: const Icon(Symbols.cloud_upload),
|
||||||
|
|||||||
@@ -4,11 +4,14 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||||
import 'package:gap/gap.dart';
|
import 'package:gap/gap.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
|
import 'package:island/models/file.dart';
|
||||||
import 'package:island/models/sticker.dart';
|
import 'package:island/models/sticker.dart';
|
||||||
import 'package:island/pods/network.dart';
|
import 'package:island/pods/network.dart';
|
||||||
import 'package:island/services/responsive.dart';
|
import 'package:island/services/responsive.dart';
|
||||||
import 'package:island/widgets/alert.dart';
|
import 'package:island/widgets/alert.dart';
|
||||||
import 'package:island/widgets/app_scaffold.dart';
|
import 'package:island/widgets/app_scaffold.dart';
|
||||||
|
import 'package:island/widgets/content/cloud_file_picker.dart';
|
||||||
|
import 'package:island/widgets/content/cloud_files.dart';
|
||||||
import 'package:island/widgets/content/sheet.dart';
|
import 'package:island/widgets/content/sheet.dart';
|
||||||
import 'package:island/screens/creators/stickers/pack_detail.dart';
|
import 'package:island/screens/creators/stickers/pack_detail.dart';
|
||||||
import 'package:material_symbols_icons/symbols.dart';
|
import 'package:material_symbols_icons/symbols.dart';
|
||||||
@@ -207,6 +210,9 @@ class StickerPackForm extends HookConsumerWidget {
|
|||||||
final formKey = useMemoized(() => GlobalKey<FormState>(), []);
|
final formKey = useMemoized(() => GlobalKey<FormState>(), []);
|
||||||
final initialPack = ref.watch(stickerPackProvider(packId));
|
final initialPack = ref.watch(stickerPackProvider(packId));
|
||||||
|
|
||||||
|
final icon = useState<String?>(
|
||||||
|
packId == null ? '' : initialPack.value?.icon?.id,
|
||||||
|
);
|
||||||
final nameController = useTextEditingController();
|
final nameController = useTextEditingController();
|
||||||
final descriptionController = useTextEditingController();
|
final descriptionController = useTextEditingController();
|
||||||
final prefixController = useTextEditingController();
|
final prefixController = useTextEditingController();
|
||||||
@@ -229,11 +235,12 @@ class StickerPackForm extends HookConsumerWidget {
|
|||||||
submitting.value = true;
|
submitting.value = true;
|
||||||
final apiClient = ref.watch(apiClientProvider);
|
final apiClient = ref.watch(apiClientProvider);
|
||||||
final resp = await apiClient.request(
|
final resp = await apiClient.request(
|
||||||
'/sphere/stickers',
|
packId == null ? '/sphere/stickers' : '/sphere/stickers/$packId',
|
||||||
data: {
|
data: {
|
||||||
'name': nameController.text,
|
'name': nameController.text,
|
||||||
'description': descriptionController.text,
|
'description': descriptionController.text,
|
||||||
'prefix': prefixController.text,
|
'prefix': prefixController.text,
|
||||||
|
'icon_id': icon.value,
|
||||||
},
|
},
|
||||||
queryParameters: {'pub': pubName},
|
queryParameters: {'pub': pubName},
|
||||||
options: Options(method: packId == null ? 'POST' : 'PATCH'),
|
options: Options(method: packId == null ? 'POST' : 'PATCH'),
|
||||||
@@ -255,6 +262,44 @@ class StickerPackForm extends HookConsumerWidget {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
spacing: 16,
|
spacing: 16,
|
||||||
children: [
|
children: [
|
||||||
|
Row(
|
||||||
|
spacing: 8,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 80,
|
||||||
|
width: 80,
|
||||||
|
child: ClipRRect(
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(8)),
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Theme.of(context).colorScheme.surfaceContainer,
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(8)),
|
||||||
|
),
|
||||||
|
child:
|
||||||
|
(icon.value?.isEmpty ?? true)
|
||||||
|
? const SizedBox.shrink()
|
||||||
|
: CloudImageWidget(fileId: icon.value!),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
IconButton.filledTonal(
|
||||||
|
onPressed: () {
|
||||||
|
showModalBottomSheet(
|
||||||
|
context: context,
|
||||||
|
builder:
|
||||||
|
(context) => CloudFilePicker(
|
||||||
|
allowedTypes: {UniversalFileType.image},
|
||||||
|
),
|
||||||
|
).then((value) {
|
||||||
|
if (value == null) return;
|
||||||
|
icon.value = value[0].id;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
icon: const Icon(Symbols.cloud_upload),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
TextFormField(
|
TextFormField(
|
||||||
controller: nameController,
|
controller: nameController,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ class WebfeedForm extends HookConsumerWidget {
|
|||||||
final confirmed = await showConfirmAlert(
|
final confirmed = await showConfirmAlert(
|
||||||
'Are you sure you want to delete this web feed? This action cannot be undone.',
|
'Are you sure you want to delete this web feed? This action cannot be undone.',
|
||||||
'Delete Web Feed',
|
'Delete Web Feed',
|
||||||
|
isDanger: true,
|
||||||
);
|
);
|
||||||
if (confirmed != true) return;
|
if (confirmed != true) return;
|
||||||
|
|
||||||
|
|||||||
@@ -211,6 +211,7 @@ class AppSecretsScreen extends HookConsumerWidget {
|
|||||||
showConfirmAlert(
|
showConfirmAlert(
|
||||||
'deleteSecretHint'.tr(),
|
'deleteSecretHint'.tr(),
|
||||||
'deleteSecret'.tr(),
|
'deleteSecret'.tr(),
|
||||||
|
isDanger: true,
|
||||||
).then((confirm) {
|
).then((confirm) {
|
||||||
if (confirm) {
|
if (confirm) {
|
||||||
final client = ref.read(apiClientProvider);
|
final client = ref.read(apiClientProvider);
|
||||||
|
|||||||
@@ -231,6 +231,7 @@ class CustomAppsScreen extends HookConsumerWidget {
|
|||||||
showConfirmAlert(
|
showConfirmAlert(
|
||||||
'deleteCustomAppHint'.tr(),
|
'deleteCustomAppHint'.tr(),
|
||||||
'deleteCustomApp'.tr(),
|
'deleteCustomApp'.tr(),
|
||||||
|
isDanger: true,
|
||||||
).then((confirm) {
|
).then((confirm) {
|
||||||
if (confirm) {
|
if (confirm) {
|
||||||
final client = ref.read(
|
final client = ref.read(
|
||||||
|
|||||||
@@ -159,9 +159,11 @@ class BotKeysScreen extends HookConsumerWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void revokeKey(String keyId) {
|
void revokeKey(String keyId) {
|
||||||
showConfirmAlert('revokeBotKeyHint'.tr(), 'revokeBotKey'.tr()).then((
|
showConfirmAlert(
|
||||||
confirm,
|
'revokeBotKeyHint'.tr(),
|
||||||
) {
|
'revokeBotKey'.tr(),
|
||||||
|
isDanger: true,
|
||||||
|
).then((confirm) {
|
||||||
if (confirm) {
|
if (confirm) {
|
||||||
final client = ref.read(apiClientProvider);
|
final client = ref.read(apiClientProvider);
|
||||||
client
|
client
|
||||||
|
|||||||
@@ -172,6 +172,7 @@ class BotsScreen extends HookConsumerWidget {
|
|||||||
showConfirmAlert(
|
showConfirmAlert(
|
||||||
'deleteBotHint'.tr(),
|
'deleteBotHint'.tr(),
|
||||||
'deleteBot'.tr(),
|
'deleteBot'.tr(),
|
||||||
|
isDanger: true,
|
||||||
).then((confirm) {
|
).then((confirm) {
|
||||||
if (confirm) {
|
if (confirm) {
|
||||||
final client = ref.read(apiClientProvider);
|
final client = ref.read(apiClientProvider);
|
||||||
|
|||||||
@@ -109,7 +109,9 @@ class DeveloperHubScreen extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
_MainContentSection(
|
Expanded(
|
||||||
|
child: Center(
|
||||||
|
child: _MainContentSection(
|
||||||
currentDeveloper: currentDeveloper.value,
|
currentDeveloper: currentDeveloper.value,
|
||||||
projects: projects,
|
projects: projects,
|
||||||
developerStats: developerStats,
|
developerStats: developerStats,
|
||||||
@@ -144,6 +146,8 @@ class DeveloperHubScreen extends HookConsumerWidget {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -210,9 +214,12 @@ class _MainContentSection extends HookConsumerWidget {
|
|||||||
data:
|
data:
|
||||||
(stats) =>
|
(stats) =>
|
||||||
currentDeveloper == null
|
currentDeveloper == null
|
||||||
? _DeveloperUnselectedWidget(
|
? ConstrainedBox(
|
||||||
|
constraints: BoxConstraints(maxWidth: 640),
|
||||||
|
child: _DeveloperUnselectedWidget(
|
||||||
onDeveloperSelected: onDeveloperSelected,
|
onDeveloperSelected: onDeveloperSelected,
|
||||||
)
|
),
|
||||||
|
).center()
|
||||||
: Padding(
|
: Padding(
|
||||||
padding: const EdgeInsets.all(16),
|
padding: const EdgeInsets.all(16),
|
||||||
child: Column(
|
child: Column(
|
||||||
@@ -631,6 +638,7 @@ class _ProjectListTile extends HookConsumerWidget {
|
|||||||
showConfirmAlert(
|
showConfirmAlert(
|
||||||
'deleteProjectHint'.tr(),
|
'deleteProjectHint'.tr(),
|
||||||
'deleteProject'.tr(),
|
'deleteProject'.tr(),
|
||||||
|
isDanger: true,
|
||||||
).then((confirm) {
|
).then((confirm) {
|
||||||
if (confirm) {
|
if (confirm) {
|
||||||
final client = ref.read(apiClientProvider);
|
final client = ref.read(apiClientProvider);
|
||||||
@@ -724,6 +732,7 @@ class _DeveloperUnselectedWidget extends HookConsumerWidget {
|
|||||||
return Card(
|
return Card(
|
||||||
margin: const EdgeInsets.all(16),
|
margin: const EdgeInsets.all(16),
|
||||||
child: Column(
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
if (!hasDevelopers) ...[
|
if (!hasDevelopers) ...[
|
||||||
const Icon(
|
const Icon(
|
||||||
|
|||||||
@@ -1,38 +1,39 @@
|
|||||||
|
import 'package:desktop_drop/desktop_drop.dart';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||||
import 'package:gap/gap.dart';
|
import 'package:gap/gap.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
|
import 'package:island/models/account.dart';
|
||||||
import 'package:island/models/activity.dart';
|
import 'package:island/models/activity.dart';
|
||||||
import 'package:island/models/publisher.dart';
|
import 'package:island/models/publisher.dart';
|
||||||
import 'package:island/models/realm.dart';
|
import 'package:island/models/realm.dart';
|
||||||
import 'package:island/models/webfeed.dart';
|
import 'package:island/models/webfeed.dart';
|
||||||
import 'package:island/pods/event_calendar.dart';
|
import 'package:island/pods/event_calendar.dart';
|
||||||
|
import 'package:island/pods/timeline.dart';
|
||||||
import 'package:island/pods/userinfo.dart';
|
import 'package:island/pods/userinfo.dart';
|
||||||
import 'package:island/screens/auth/login_modal.dart';
|
import 'package:island/screens/auth/login_modal.dart';
|
||||||
import 'package:island/screens/notification.dart';
|
import 'package:island/screens/notification.dart';
|
||||||
import 'package:island/services/responsive.dart';
|
import 'package:island/services/responsive.dart';
|
||||||
|
import 'package:island/widgets/account/account_name.dart';
|
||||||
import 'package:island/widgets/account/friends_overview.dart';
|
import 'package:island/widgets/account/friends_overview.dart';
|
||||||
import 'package:island/widgets/app_scaffold.dart';
|
import 'package:island/widgets/app_scaffold.dart';
|
||||||
import 'package:island/models/post.dart';
|
import 'package:island/models/post.dart';
|
||||||
import 'package:island/widgets/check_in.dart';
|
import 'package:island/widgets/check_in.dart';
|
||||||
|
import 'package:island/widgets/extended_refresh_indicator.dart';
|
||||||
import 'package:island/widgets/navigation/fab_menu.dart';
|
import 'package:island/widgets/navigation/fab_menu.dart';
|
||||||
|
import 'package:island/widgets/paging/pagination_list.dart';
|
||||||
import 'package:island/widgets/post/post_featured.dart';
|
import 'package:island/widgets/post/post_featured.dart';
|
||||||
import 'package:island/widgets/post/post_item.dart';
|
import 'package:island/widgets/post/post_item.dart';
|
||||||
import 'package:material_symbols_icons/symbols.dart';
|
import 'package:material_symbols_icons/symbols.dart';
|
||||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
|
||||||
import 'package:riverpod_paging_utils/riverpod_paging_utils.dart';
|
|
||||||
import 'package:island/pods/network.dart';
|
|
||||||
import 'package:island/widgets/realm/realm_card.dart';
|
import 'package:island/widgets/realm/realm_card.dart';
|
||||||
import 'package:island/widgets/publisher/publisher_card.dart';
|
import 'package:island/widgets/publisher/publisher_card.dart';
|
||||||
import 'package:island/widgets/web_article_card.dart';
|
import 'package:island/widgets/web_article_card.dart';
|
||||||
import 'package:island/widgets/extended_refresh_indicator.dart';
|
|
||||||
import 'package:island/services/event_bus.dart';
|
import 'package:island/services/event_bus.dart';
|
||||||
|
import 'package:island/widgets/share/share_sheet.dart';
|
||||||
import 'package:styled_widget/styled_widget.dart';
|
import 'package:styled_widget/styled_widget.dart';
|
||||||
|
import 'package:super_sliver_list/super_sliver_list.dart';
|
||||||
part 'explore.g.dart';
|
|
||||||
|
|
||||||
Widget notificationIndicatorWidget(
|
Widget notificationIndicatorWidget(
|
||||||
BuildContext context, {
|
BuildContext context, {
|
||||||
@@ -71,8 +72,8 @@ class ExploreScreen extends HookConsumerWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
final tabController = useTabController(initialLength: 3);
|
|
||||||
final currentFilter = useState<String?>(null);
|
final currentFilter = useState<String?>(null);
|
||||||
|
final notifier = ref.watch(activityListNotifierProvider.notifier);
|
||||||
|
|
||||||
useEffect(() {
|
useEffect(() {
|
||||||
// Set FAB type to chat
|
// Set FAB type to chat
|
||||||
@@ -90,32 +91,15 @@ class ExploreScreen extends HookConsumerWidget {
|
|||||||
};
|
};
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
useEffect(() {
|
void handleFilterChange(String? filter) {
|
||||||
void listener() {
|
currentFilter.value = filter;
|
||||||
switch (tabController.index) {
|
notifier.applyFilter(filter);
|
||||||
case 0:
|
|
||||||
currentFilter.value = null;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
currentFilter.value = 'subscriptions';
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
currentFilter.value = 'friends';
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
tabController.addListener(listener);
|
|
||||||
return () => tabController.removeListener(listener);
|
|
||||||
}, [tabController]);
|
|
||||||
|
|
||||||
// Listen for post creation events to refresh activities
|
// Listen for post creation events to refresh activities
|
||||||
useEffect(() {
|
useEffect(() {
|
||||||
final subscription = eventBus.on<PostCreatedEvent>().listen((event) {
|
final subscription = eventBus.on<PostCreatedEvent>().listen((event) {
|
||||||
// Refresh all activity lists when a new post is created
|
ref.invalidate(activityListNotifierProvider);
|
||||||
ref.invalidate(activityListNotifierProvider(null));
|
|
||||||
ref.invalidate(activityListNotifierProvider('subscriptions'));
|
|
||||||
ref.invalidate(activityListNotifierProvider('friends'));
|
|
||||||
});
|
});
|
||||||
return subscription.cancel;
|
return subscription.cancel;
|
||||||
}, []);
|
}, []);
|
||||||
@@ -142,35 +126,51 @@ class ExploreScreen extends HookConsumerWidget {
|
|||||||
margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top),
|
margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Row(
|
||||||
child: TabBar(
|
spacing: 8,
|
||||||
controller: tabController,
|
children: [
|
||||||
tabAlignment: TabAlignment.start,
|
IconButton(
|
||||||
isScrollable: true,
|
onPressed: () => handleFilterChange(null),
|
||||||
dividerColor: Colors.transparent,
|
icon: Icon(
|
||||||
labelPadding: const EdgeInsets.symmetric(horizontal: 12),
|
Symbols.explore,
|
||||||
tabs: [
|
fill: currentFilter.value == null ? 1 : null,
|
||||||
Tab(
|
|
||||||
icon: Tooltip(
|
|
||||||
message: 'explore'.tr(),
|
|
||||||
child: Icon(Symbols.explore),
|
|
||||||
),
|
),
|
||||||
|
tooltip: 'explore'.tr(),
|
||||||
|
isSelected: currentFilter.value == null,
|
||||||
|
color:
|
||||||
|
currentFilter.value == null
|
||||||
|
? Theme.of(context).colorScheme.primary
|
||||||
|
: null,
|
||||||
),
|
),
|
||||||
Tab(
|
IconButton(
|
||||||
icon: Tooltip(
|
onPressed: () => handleFilterChange('subscriptions'),
|
||||||
message: 'exploreFilterSubscriptions'.tr(),
|
icon: Icon(
|
||||||
child: Icon(Symbols.subscriptions),
|
Symbols.subscriptions,
|
||||||
|
fill: currentFilter.value == 'subscriptions' ? 1 : null,
|
||||||
),
|
),
|
||||||
|
tooltip: 'exploreFilterSubscriptions'.tr(),
|
||||||
|
isSelected: currentFilter.value == 'subscriptions',
|
||||||
|
color:
|
||||||
|
currentFilter.value == 'subscriptions'
|
||||||
|
? Theme.of(context).colorScheme.primary
|
||||||
|
: null,
|
||||||
),
|
),
|
||||||
Tab(
|
IconButton(
|
||||||
icon: Tooltip(
|
onPressed: () => handleFilterChange('friends'),
|
||||||
message: 'exploreFilterFriends'.tr(),
|
icon: Icon(
|
||||||
child: Icon(Symbols.people),
|
Symbols.people,
|
||||||
|
fill: currentFilter.value == 'friends' ? 1 : null,
|
||||||
),
|
),
|
||||||
|
tooltip: 'exploreFilterFriends'.tr(),
|
||||||
|
isSelected: currentFilter.value == 'friends',
|
||||||
|
color:
|
||||||
|
currentFilter.value == 'friends'
|
||||||
|
? Theme.of(context).colorScheme.primary
|
||||||
|
: null,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
const Spacer(),
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
context.pushNamed('articles');
|
context.pushNamed('articles');
|
||||||
@@ -234,12 +234,33 @@ class ExploreScreen extends HookConsumerWidget {
|
|||||||
tooltip: 'search'.tr(),
|
tooltip: 'search'.tr(),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
).padding(horizontal: 8),
|
).padding(horizontal: 8, vertical: 4),
|
||||||
);
|
);
|
||||||
|
|
||||||
final appBar = isWide ? null : _buildAppBar(tabController, context);
|
final appBar =
|
||||||
|
isWide
|
||||||
|
? null
|
||||||
|
: _buildAppBar(currentFilter.value, handleFilterChange, context);
|
||||||
|
|
||||||
return AppScaffold(
|
final dragging = useState(false);
|
||||||
|
|
||||||
|
return DropTarget(
|
||||||
|
onDragDone: (detail) {
|
||||||
|
dragging.value = false;
|
||||||
|
if (detail.files.isNotEmpty) {
|
||||||
|
showModalBottomSheet(
|
||||||
|
context: context,
|
||||||
|
isScrollControlled: true,
|
||||||
|
useRootNavigator: true,
|
||||||
|
builder: (context) => ShareSheet.files(files: detail.files),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onDragEntered: (_) => dragging.value = true,
|
||||||
|
onDragExited: (_) => dragging.value = false,
|
||||||
|
child: Stack(
|
||||||
|
children: [
|
||||||
|
AppScaffold(
|
||||||
isNoBackground: false,
|
isNoBackground: false,
|
||||||
appBar: appBar,
|
appBar: appBar,
|
||||||
body:
|
body:
|
||||||
@@ -253,35 +274,56 @@ class ExploreScreen extends HookConsumerWidget {
|
|||||||
query,
|
query,
|
||||||
events,
|
events,
|
||||||
selectedDay,
|
selectedDay,
|
||||||
currentFilter.value,
|
|
||||||
)
|
)
|
||||||
: _buildNarrowBody(context, ref, currentFilter.value),
|
: _buildNarrowBody(context, ref, currentFilter.value),
|
||||||
|
),
|
||||||
|
if (dragging.value)
|
||||||
|
Positioned.fill(
|
||||||
|
child: Container(
|
||||||
|
color: Theme.of(
|
||||||
|
context,
|
||||||
|
).colorScheme.primaryContainer.withOpacity(0.9),
|
||||||
|
child: Center(
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Icon(
|
||||||
|
Symbols.upload_file,
|
||||||
|
size: 64,
|
||||||
|
color: Theme.of(context).colorScheme.primary,
|
||||||
|
),
|
||||||
|
const Gap(16),
|
||||||
|
Text(
|
||||||
|
'dropToShare'.tr(),
|
||||||
|
style: Theme.of(
|
||||||
|
context,
|
||||||
|
).textTheme.headlineMedium?.copyWith(
|
||||||
|
color: Theme.of(context).colorScheme.primary,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildActivityList(
|
Widget _buildActivityList(BuildContext context, WidgetRef ref) {
|
||||||
BuildContext context,
|
|
||||||
WidgetRef ref,
|
|
||||||
String? filter,
|
|
||||||
) {
|
|
||||||
final activitiesNotifier = ref.watch(
|
|
||||||
activityListNotifierProvider(filter).notifier,
|
|
||||||
);
|
|
||||||
|
|
||||||
final isWide = isWideScreen(context);
|
final isWide = isWideScreen(context);
|
||||||
|
|
||||||
return PagingHelperSliverView(
|
return PaginationWidget(
|
||||||
provider: activityListNotifierProvider(filter),
|
provider: activityListNotifierProvider,
|
||||||
futureRefreshable: activityListNotifierProvider(filter).future,
|
notifier: activityListNotifierProvider.notifier,
|
||||||
notifierRefreshable: activityListNotifierProvider(filter).notifier,
|
// Sliver list cannot provide refresh handled by the pagination list
|
||||||
|
isRefreshable: false,
|
||||||
|
isSliver: true,
|
||||||
contentBuilder:
|
contentBuilder:
|
||||||
(data, widgetCount, endItemView) => _ActivityListView(
|
(data, footer) =>
|
||||||
data: data,
|
_ActivityListView(data: data, isWide: isWide, footer: footer),
|
||||||
widgetCount: widgetCount,
|
|
||||||
endItemView: endItemView,
|
|
||||||
activitiesNotifier: activitiesNotifier,
|
|
||||||
isWide: isWide,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -289,18 +331,15 @@ class ExploreScreen extends HookConsumerWidget {
|
|||||||
BuildContext context,
|
BuildContext context,
|
||||||
WidgetRef ref,
|
WidgetRef ref,
|
||||||
Widget filterBar,
|
Widget filterBar,
|
||||||
AsyncValue<dynamic> user,
|
AsyncValue<SnAccount?> user,
|
||||||
AsyncValue<int?> notificationCount,
|
AsyncValue<int?> notificationCount,
|
||||||
ValueNotifier<EventCalendarQuery> query,
|
ValueNotifier<EventCalendarQuery> query,
|
||||||
AsyncValue<List<dynamic>> events,
|
AsyncValue<List<dynamic>> events,
|
||||||
ValueNotifier<DateTime> selectedDay,
|
ValueNotifier<DateTime> selectedDay,
|
||||||
String? currentFilter,
|
|
||||||
) {
|
) {
|
||||||
final bodyView = _buildActivityList(context, ref, currentFilter);
|
final bodyView = _buildActivityList(context, ref);
|
||||||
|
|
||||||
final activitiesNotifier = ref.watch(
|
final notifier = ref.watch(activityListNotifierProvider.notifier);
|
||||||
activityListNotifierProvider(currentFilter).notifier,
|
|
||||||
);
|
|
||||||
|
|
||||||
return Row(
|
return Row(
|
||||||
spacing: 12,
|
spacing: 12,
|
||||||
@@ -308,7 +347,7 @@ class ExploreScreen extends HookConsumerWidget {
|
|||||||
Flexible(
|
Flexible(
|
||||||
flex: 3,
|
flex: 3,
|
||||||
child: ExtendedRefreshIndicator(
|
child: ExtendedRefreshIndicator(
|
||||||
onRefresh: () => Future.sync(activitiesNotifier.forceRefresh),
|
onRefresh: notifier.refresh,
|
||||||
child: CustomScrollView(
|
child: CustomScrollView(
|
||||||
slivers: [
|
slivers: [
|
||||||
const SliverGap(12),
|
const SliverGap(12),
|
||||||
@@ -328,8 +367,11 @@ class ExploreScreen extends HookConsumerWidget {
|
|||||||
child: Column(
|
child: Column(
|
||||||
spacing: 8,
|
spacing: 8,
|
||||||
children: [
|
children: [
|
||||||
|
const Gap(4),
|
||||||
|
if (user.value?.activatedAt == null)
|
||||||
|
AccountUnactivatedCard(),
|
||||||
CheckInWidget(
|
CheckInWidget(
|
||||||
margin: EdgeInsets.only(top: 12),
|
margin: EdgeInsets.zero,
|
||||||
onChecked: () {
|
onChecked: () {
|
||||||
ref.invalidate(eventCalendarProvider(query.value));
|
ref.invalidate(eventCalendarProvider(query.value));
|
||||||
},
|
},
|
||||||
@@ -390,54 +432,57 @@ class ExploreScreen extends HookConsumerWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
PreferredSizeWidget _buildAppBar(
|
PreferredSizeWidget _buildAppBar(
|
||||||
TabController tabController,
|
String? currentFilter,
|
||||||
|
void Function(String?) handleFilterChange,
|
||||||
BuildContext context,
|
BuildContext context,
|
||||||
) {
|
) {
|
||||||
final foregroundColor = Theme.of(context).appBarTheme.foregroundColor;
|
final foregroundColor = Theme.of(context).appBarTheme.foregroundColor;
|
||||||
|
|
||||||
return AppBar(
|
return AppBar(
|
||||||
toolbarHeight: 48 + 4,
|
toolbarHeight: 48,
|
||||||
flexibleSpace: Container(
|
flexibleSpace: Container(
|
||||||
height: 48,
|
height: 48,
|
||||||
margin: EdgeInsets.only(
|
margin: EdgeInsets.only(
|
||||||
left: 8,
|
left: 8,
|
||||||
right: 8,
|
right: 8,
|
||||||
top: 4 + MediaQuery.of(context).padding.top,
|
top: 4 + MediaQuery.of(context).padding.top,
|
||||||
|
bottom: 4,
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
|
spacing: 8,
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
IconButton(
|
||||||
child: TabBar(
|
onPressed: () => handleFilterChange(null),
|
||||||
controller: tabController,
|
icon: Icon(
|
||||||
tabAlignment: TabAlignment.start,
|
Symbols.explore,
|
||||||
isScrollable: true,
|
color: foregroundColor,
|
||||||
dividerColor: Colors.transparent,
|
fill: currentFilter == null ? 1 : null,
|
||||||
labelPadding: const EdgeInsets.symmetric(horizontal: 12),
|
|
||||||
tabs: [
|
|
||||||
Tab(
|
|
||||||
icon: Tooltip(
|
|
||||||
message: 'explore'.tr(),
|
|
||||||
child: Icon(Symbols.explore, color: foregroundColor),
|
|
||||||
),
|
),
|
||||||
|
tooltip: 'explore'.tr(),
|
||||||
|
isSelected: currentFilter == null,
|
||||||
|
color: currentFilter == null ? foregroundColor : null,
|
||||||
),
|
),
|
||||||
Tab(
|
IconButton(
|
||||||
icon: Tooltip(
|
onPressed: () => handleFilterChange('subscriptions'),
|
||||||
message: 'exploreFilterSubscriptions'.tr(),
|
icon: Icon(
|
||||||
child: Icon(
|
|
||||||
Symbols.subscriptions,
|
Symbols.subscriptions,
|
||||||
color: foregroundColor,
|
color: foregroundColor,
|
||||||
|
fill: currentFilter == 'subscription' ? 1 : null,
|
||||||
),
|
),
|
||||||
|
tooltip: 'exploreFilterSubscriptions'.tr(),
|
||||||
|
isSelected: currentFilter == 'subscriptions',
|
||||||
),
|
),
|
||||||
|
IconButton(
|
||||||
|
onPressed: () => handleFilterChange('friends'),
|
||||||
|
icon: Icon(
|
||||||
|
Symbols.people,
|
||||||
|
color: foregroundColor,
|
||||||
|
fill: currentFilter == 'friends' ? 1 : null,
|
||||||
),
|
),
|
||||||
Tab(
|
tooltip: 'exploreFilterFriends'.tr(),
|
||||||
icon: Tooltip(
|
isSelected: currentFilter == 'friends',
|
||||||
message: 'exploreFilterFriends'.tr(),
|
|
||||||
child: Icon(Symbols.people, color: foregroundColor),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
|
const Spacer(),
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
context.pushNamed('articles');
|
context.pushNamed('articles');
|
||||||
@@ -516,20 +561,22 @@ class ExploreScreen extends HookConsumerWidget {
|
|||||||
notificationUnreadCountNotifierProvider,
|
notificationUnreadCountNotifierProvider,
|
||||||
);
|
);
|
||||||
|
|
||||||
final activitiesNotifier = ref.watch(
|
final bodyView = _buildActivityList(context, ref);
|
||||||
activityListNotifierProvider(currentFilter).notifier,
|
|
||||||
);
|
|
||||||
|
|
||||||
final bodyView = _buildActivityList(context, ref, currentFilter);
|
final notifier = ref.watch(activityListNotifierProvider.notifier);
|
||||||
|
|
||||||
return Expanded(
|
return Expanded(
|
||||||
child: ExtendedRefreshIndicator(
|
|
||||||
onRefresh: () => Future.sync(activitiesNotifier.forceRefresh),
|
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(8)),
|
borderRadius: const BorderRadius.all(Radius.circular(8)),
|
||||||
|
child: ExtendedRefreshIndicator(
|
||||||
|
onRefresh: notifier.refresh,
|
||||||
child: CustomScrollView(
|
child: CustomScrollView(
|
||||||
slivers: [
|
slivers: [
|
||||||
const SliverGap(8),
|
const SliverGap(8),
|
||||||
|
if (user.value?.activatedAt == null)
|
||||||
|
SliverToBoxAdapter(
|
||||||
|
child: AccountUnactivatedCard().padding(bottom: 8),
|
||||||
|
),
|
||||||
if (user.value != null)
|
if (user.value != null)
|
||||||
SliverToBoxAdapter(
|
SliverToBoxAdapter(
|
||||||
child: CheckInWidget(
|
child: CheckInWidget(
|
||||||
@@ -560,8 +607,8 @@ class ExploreScreen extends HookConsumerWidget {
|
|||||||
bodyView,
|
bodyView,
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
).padding(horizontal: 8),
|
|
||||||
),
|
),
|
||||||
|
).padding(horizontal: 8),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -582,7 +629,7 @@ class _DiscoveryActivityItem extends StatelessWidget {
|
|||||||
final height = type == 'post' ? 280.0 : 180.0;
|
final height = type == 'post' ? 280.0 : 180.0;
|
||||||
|
|
||||||
final contentWidget = switch (type) {
|
final contentWidget = switch (type) {
|
||||||
'post' => ListView.separated(
|
'post' => SuperListView.separated(
|
||||||
scrollDirection: Axis.horizontal,
|
scrollDirection: Axis.horizontal,
|
||||||
itemCount: items.length,
|
itemCount: items.length,
|
||||||
separatorBuilder: (context, index) => const Gap(12),
|
separatorBuilder: (context, index) => const Gap(12),
|
||||||
@@ -678,31 +725,29 @@ class _DiscoveryActivityItem extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _ActivityListView extends HookConsumerWidget {
|
class _ActivityListView extends HookConsumerWidget {
|
||||||
final CursorPagingData<SnTimelineEvent> data;
|
final List<SnTimelineEvent> data;
|
||||||
final int widgetCount;
|
|
||||||
final Widget endItemView;
|
|
||||||
final ActivityListNotifier activitiesNotifier;
|
|
||||||
final bool isWide;
|
final bool isWide;
|
||||||
|
final Widget footer;
|
||||||
|
|
||||||
const _ActivityListView({
|
const _ActivityListView({
|
||||||
required this.data,
|
required this.data,
|
||||||
required this.widgetCount,
|
|
||||||
required this.endItemView,
|
|
||||||
required this.activitiesNotifier,
|
|
||||||
required this.isWide,
|
required this.isWide,
|
||||||
|
required this.footer,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
|
final notifier = ref.watch(activityListNotifierProvider.notifier);
|
||||||
|
|
||||||
return SliverList.separated(
|
return SliverList.separated(
|
||||||
itemCount: widgetCount,
|
itemCount: data.length + 1,
|
||||||
separatorBuilder: (_, _) => const Gap(8),
|
separatorBuilder: (_, _) => const Gap(8),
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
if (index == widgetCount - 1) {
|
if (index == data.length) {
|
||||||
return endItemView;
|
return footer;
|
||||||
}
|
}
|
||||||
|
|
||||||
final item = data.items[index];
|
final item = data[index];
|
||||||
if (item.data == null) {
|
if (item.data == null) {
|
||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
}
|
}
|
||||||
@@ -715,13 +760,10 @@ class _ActivityListView extends HookConsumerWidget {
|
|||||||
borderRadius: 8,
|
borderRadius: 8,
|
||||||
item: SnPost.fromJson(item.data!),
|
item: SnPost.fromJson(item.data!),
|
||||||
onRefresh: () {
|
onRefresh: () {
|
||||||
activitiesNotifier.forceRefresh();
|
notifier.refresh();
|
||||||
},
|
},
|
||||||
onUpdate: (post) {
|
onUpdate: (post) {
|
||||||
activitiesNotifier.updateOne(
|
notifier.updateOne(index, item.copyWith(data: post.toJson()));
|
||||||
index,
|
|
||||||
item.copyWith(data: post.toJson()),
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
itemWidget = Card(margin: EdgeInsets.zero, child: itemWidget);
|
itemWidget = Card(margin: EdgeInsets.zero, child: itemWidget);
|
||||||
@@ -738,69 +780,3 @@ class _ActivityListView extends HookConsumerWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@riverpod
|
|
||||||
class ActivityListNotifier extends _$ActivityListNotifier
|
|
||||||
with CursorPagingNotifierMixin<SnTimelineEvent> {
|
|
||||||
@override
|
|
||||||
Future<CursorPagingData<SnTimelineEvent>> build(String? filter) =>
|
|
||||||
fetch(cursor: null);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Future<CursorPagingData<SnTimelineEvent>> fetch({
|
|
||||||
required String? cursor,
|
|
||||||
}) async {
|
|
||||||
final client = ref.read(apiClientProvider);
|
|
||||||
final take = 20;
|
|
||||||
|
|
||||||
final queryParameters = {
|
|
||||||
if (cursor != null) 'cursor': cursor,
|
|
||||||
'take': take,
|
|
||||||
if (filter != null) 'filter': filter,
|
|
||||||
if (kDebugMode)
|
|
||||||
'debugInclude': 'realms,publishers,articles,shuffledPosts',
|
|
||||||
};
|
|
||||||
|
|
||||||
final response = await client.get(
|
|
||||||
'/sphere/timeline',
|
|
||||||
queryParameters: queryParameters,
|
|
||||||
);
|
|
||||||
|
|
||||||
final List<SnTimelineEvent> items =
|
|
||||||
(response.data as List)
|
|
||||||
.map((e) => SnTimelineEvent.fromJson(e as Map<String, dynamic>))
|
|
||||||
.toList();
|
|
||||||
|
|
||||||
final hasMore = (items.firstOrNull?.type ?? 'empty') != 'empty';
|
|
||||||
final nextCursor =
|
|
||||||
items.isNotEmpty
|
|
||||||
? items
|
|
||||||
.map((x) => x.createdAt)
|
|
||||||
.reduce((a, b) => a.isBefore(b) ? a : b)
|
|
||||||
.toUtc()
|
|
||||||
.toIso8601String()
|
|
||||||
: null;
|
|
||||||
|
|
||||||
return CursorPagingData(
|
|
||||||
items: items,
|
|
||||||
hasMore: hasMore,
|
|
||||||
nextCursor: nextCursor,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
void updateOne(int index, SnTimelineEvent activity) {
|
|
||||||
final currentState = state.valueOrNull;
|
|
||||||
if (currentState == null) return;
|
|
||||||
|
|
||||||
final updatedItems = [...currentState.items];
|
|
||||||
updatedItems[index] = activity;
|
|
||||||
|
|
||||||
state = AsyncData(
|
|
||||||
CursorPagingData(
|
|
||||||
items: updatedItems,
|
|
||||||
hasMore: currentState.hasMore,
|
|
||||||
nextCursor: currentState.nextCursor,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,181 +0,0 @@
|
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
||||||
|
|
||||||
part of 'explore.dart';
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
// RiverpodGenerator
|
|
||||||
// **************************************************************************
|
|
||||||
|
|
||||||
String _$activityListNotifierHash() =>
|
|
||||||
r'77ffc7852feffa5438b56fa26123d453b7c310cf';
|
|
||||||
|
|
||||||
/// Copied from Dart SDK
|
|
||||||
class _SystemHash {
|
|
||||||
_SystemHash._();
|
|
||||||
|
|
||||||
static int combine(int hash, int value) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + value);
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
|
||||||
return hash ^ (hash >> 6);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int finish(int hash) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = hash ^ (hash >> 11);
|
|
||||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
abstract class _$ActivityListNotifier
|
|
||||||
extends
|
|
||||||
BuildlessAutoDisposeAsyncNotifier<CursorPagingData<SnTimelineEvent>> {
|
|
||||||
late final String? filter;
|
|
||||||
|
|
||||||
FutureOr<CursorPagingData<SnTimelineEvent>> build(String? filter);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// See also [ActivityListNotifier].
|
|
||||||
@ProviderFor(ActivityListNotifier)
|
|
||||||
const activityListNotifierProvider = ActivityListNotifierFamily();
|
|
||||||
|
|
||||||
/// See also [ActivityListNotifier].
|
|
||||||
class ActivityListNotifierFamily
|
|
||||||
extends Family<AsyncValue<CursorPagingData<SnTimelineEvent>>> {
|
|
||||||
/// See also [ActivityListNotifier].
|
|
||||||
const ActivityListNotifierFamily();
|
|
||||||
|
|
||||||
/// See also [ActivityListNotifier].
|
|
||||||
ActivityListNotifierProvider call(String? filter) {
|
|
||||||
return ActivityListNotifierProvider(filter);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
ActivityListNotifierProvider getProviderOverride(
|
|
||||||
covariant ActivityListNotifierProvider provider,
|
|
||||||
) {
|
|
||||||
return call(provider.filter);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
|
||||||
|
|
||||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
|
||||||
_allTransitiveDependencies;
|
|
||||||
|
|
||||||
@override
|
|
||||||
String? get name => r'activityListNotifierProvider';
|
|
||||||
}
|
|
||||||
|
|
||||||
/// See also [ActivityListNotifier].
|
|
||||||
class ActivityListNotifierProvider
|
|
||||||
extends
|
|
||||||
AutoDisposeAsyncNotifierProviderImpl<
|
|
||||||
ActivityListNotifier,
|
|
||||||
CursorPagingData<SnTimelineEvent>
|
|
||||||
> {
|
|
||||||
/// See also [ActivityListNotifier].
|
|
||||||
ActivityListNotifierProvider(String? filter)
|
|
||||||
: this._internal(
|
|
||||||
() => ActivityListNotifier()..filter = filter,
|
|
||||||
from: activityListNotifierProvider,
|
|
||||||
name: r'activityListNotifierProvider',
|
|
||||||
debugGetCreateSourceHash:
|
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$activityListNotifierHash,
|
|
||||||
dependencies: ActivityListNotifierFamily._dependencies,
|
|
||||||
allTransitiveDependencies:
|
|
||||||
ActivityListNotifierFamily._allTransitiveDependencies,
|
|
||||||
filter: filter,
|
|
||||||
);
|
|
||||||
|
|
||||||
ActivityListNotifierProvider._internal(
|
|
||||||
super._createNotifier, {
|
|
||||||
required super.name,
|
|
||||||
required super.dependencies,
|
|
||||||
required super.allTransitiveDependencies,
|
|
||||||
required super.debugGetCreateSourceHash,
|
|
||||||
required super.from,
|
|
||||||
required this.filter,
|
|
||||||
}) : super.internal();
|
|
||||||
|
|
||||||
final String? filter;
|
|
||||||
|
|
||||||
@override
|
|
||||||
FutureOr<CursorPagingData<SnTimelineEvent>> runNotifierBuild(
|
|
||||||
covariant ActivityListNotifier notifier,
|
|
||||||
) {
|
|
||||||
return notifier.build(filter);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Override overrideWith(ActivityListNotifier Function() create) {
|
|
||||||
return ProviderOverride(
|
|
||||||
origin: this,
|
|
||||||
override: ActivityListNotifierProvider._internal(
|
|
||||||
() => create()..filter = filter,
|
|
||||||
from: from,
|
|
||||||
name: null,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
debugGetCreateSourceHash: null,
|
|
||||||
filter: filter,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
AutoDisposeAsyncNotifierProviderElement<
|
|
||||||
ActivityListNotifier,
|
|
||||||
CursorPagingData<SnTimelineEvent>
|
|
||||||
>
|
|
||||||
createElement() {
|
|
||||||
return _ActivityListNotifierProviderElement(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
bool operator ==(Object other) {
|
|
||||||
return other is ActivityListNotifierProvider && other.filter == filter;
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
int get hashCode {
|
|
||||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
|
||||||
hash = _SystemHash.combine(hash, filter.hashCode);
|
|
||||||
|
|
||||||
return _SystemHash.finish(hash);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
|
||||||
// ignore: unused_element
|
|
||||||
mixin ActivityListNotifierRef
|
|
||||||
on AutoDisposeAsyncNotifierProviderRef<CursorPagingData<SnTimelineEvent>> {
|
|
||||||
/// The parameter `filter` of this provider.
|
|
||||||
String? get filter;
|
|
||||||
}
|
|
||||||
|
|
||||||
class _ActivityListNotifierProviderElement
|
|
||||||
extends
|
|
||||||
AutoDisposeAsyncNotifierProviderElement<
|
|
||||||
ActivityListNotifier,
|
|
||||||
CursorPagingData<SnTimelineEvent>
|
|
||||||
>
|
|
||||||
with ActivityListNotifierRef {
|
|
||||||
_ActivityListNotifierProviderElement(super.provider);
|
|
||||||
|
|
||||||
@override
|
|
||||||
String? get filter => (origin as ActivityListNotifierProvider).filter;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ignore_for_file: type=lint
|
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
|
||||||
@@ -116,7 +116,7 @@ class FileListScreen extends HookConsumerWidget {
|
|||||||
completer.future
|
completer.future
|
||||||
.then((uploadedFile) {
|
.then((uploadedFile) {
|
||||||
if (uploadedFile != null) {
|
if (uploadedFile != null) {
|
||||||
ref.invalidate(cloudFileListNotifierProvider);
|
ref.invalidate(indexedCloudFileListNotifierProvider);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catchError((error) {
|
.catchError((error) {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ part of 'notification.dart';
|
|||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$notificationUnreadCountNotifierHash() =>
|
String _$notificationUnreadCountNotifierHash() =>
|
||||||
r'08c773809958d96a7ce82acf04af1f9e0b23e119';
|
r'8bff5ad3b65389589b4112add3246afd9b8e38f9';
|
||||||
|
|
||||||
/// See also [NotificationUnreadCountNotifier].
|
/// See also [NotificationUnreadCountNotifier].
|
||||||
@ProviderFor(NotificationUnreadCountNotifier)
|
@ProviderFor(NotificationUnreadCountNotifier)
|
||||||
|
|||||||
@@ -256,7 +256,9 @@ class ArticleComposeScreen extends HookConsumerWidget {
|
|||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
ComposeFormFields(
|
Expanded(
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: ComposeFormFields(
|
||||||
state: state,
|
state: state,
|
||||||
showPublisherAvatar: false,
|
showPublisherAvatar: false,
|
||||||
onPublisherTap: () {
|
onPublisherTap: () {
|
||||||
@@ -271,6 +273,8 @@ class ArticleComposeScreen extends HookConsumerWidget {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
).padding(top: 16),
|
).padding(top: 16),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
// Attachments preview
|
// Attachments preview
|
||||||
ValueListenableBuilder<List<UniversalFile>>(
|
ValueListenableBuilder<List<UniversalFile>>(
|
||||||
|
|||||||
@@ -145,9 +145,11 @@ class PostActionButtons extends HookConsumerWidget {
|
|||||||
message: 'delete'.tr(),
|
message: 'delete'.tr(),
|
||||||
child: FilledButton.tonal(
|
child: FilledButton.tonal(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
showConfirmAlert('deletePostHint'.tr(), 'deletePost'.tr()).then((
|
showConfirmAlert(
|
||||||
confirm,
|
'deletePostHint'.tr(),
|
||||||
) {
|
'deletePost'.tr(),
|
||||||
|
isDanger: true,
|
||||||
|
).then((confirm) {
|
||||||
if (confirm) {
|
if (confirm) {
|
||||||
final client = ref.watch(apiClientProvider);
|
final client = ref.watch(apiClientProvider);
|
||||||
client
|
client
|
||||||
|
|||||||
@@ -427,6 +427,7 @@ class _RealmActionMenu extends HookConsumerWidget {
|
|||||||
showConfirmAlert(
|
showConfirmAlert(
|
||||||
'deleteRealmHint'.tr(),
|
'deleteRealmHint'.tr(),
|
||||||
'deleteRealm'.tr(),
|
'deleteRealm'.tr(),
|
||||||
|
isDanger: true,
|
||||||
).then((confirm) {
|
).then((confirm) {
|
||||||
if (confirm) {
|
if (confirm) {
|
||||||
final client = ref.watch(apiClientProvider);
|
final client = ref.watch(apiClientProvider);
|
||||||
|
|||||||
@@ -1,60 +1,72 @@
|
|||||||
|
import 'dart:math' as math;
|
||||||
|
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||||
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
import 'package:gap/gap.dart';
|
import 'package:gap/gap.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:island/models/sticker.dart';
|
import 'package:island/models/sticker.dart';
|
||||||
import 'package:island/pods/network.dart';
|
import 'package:island/pods/network.dart';
|
||||||
|
import 'package:island/pods/paging.dart';
|
||||||
import 'package:island/widgets/app_scaffold.dart';
|
import 'package:island/widgets/app_scaffold.dart';
|
||||||
|
import 'package:island/widgets/content/cloud_files.dart';
|
||||||
|
import 'package:island/widgets/paging/pagination_list.dart';
|
||||||
import 'package:material_symbols_icons/symbols.dart';
|
import 'package:material_symbols_icons/symbols.dart';
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
import 'package:styled_widget/styled_widget.dart';
|
||||||
import 'package:riverpod_paging_utils/riverpod_paging_utils.dart';
|
|
||||||
|
|
||||||
part 'sticker_marketplace.g.dart';
|
part 'sticker_marketplace.freezed.dart';
|
||||||
|
|
||||||
@riverpod
|
@freezed
|
||||||
class MarketplaceStickerPacksNotifier extends _$MarketplaceStickerPacksNotifier
|
sealed class MarketplaceStickerQuery with _$MarketplaceStickerQuery {
|
||||||
with CursorPagingNotifierMixin<SnStickerPack> {
|
const factory MarketplaceStickerQuery({
|
||||||
@override
|
|
||||||
Future<CursorPagingData<SnStickerPack>> build({
|
|
||||||
required String? query,
|
|
||||||
required bool byUsage,
|
required bool byUsage,
|
||||||
}) {
|
required String? query,
|
||||||
return fetch(cursor: null);
|
}) = _MarketplaceStickerQuery;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final marketplaceStickerPacksNotifierProvider = AsyncNotifierProvider(
|
||||||
|
MarketplaceStickerPacksNotifier.new,
|
||||||
|
);
|
||||||
|
|
||||||
|
class MarketplaceStickerPacksNotifier extends AsyncNotifier<List<SnStickerPack>>
|
||||||
|
with
|
||||||
|
AsyncPaginationController<SnStickerPack>,
|
||||||
|
AsyncPaginationFilter<MarketplaceStickerQuery, SnStickerPack> {
|
||||||
|
static const int pageSize = 20;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<CursorPagingData<SnStickerPack>> fetch({
|
MarketplaceStickerQuery currentFilter = MarketplaceStickerQuery(
|
||||||
required String? cursor,
|
byUsage: true,
|
||||||
}) async {
|
query: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<List<SnStickerPack>> fetch() async {
|
||||||
final client = ref.read(apiClientProvider);
|
final client = ref.read(apiClientProvider);
|
||||||
final offset = cursor == null ? 0 : int.parse(cursor);
|
|
||||||
|
|
||||||
final response = await client.get(
|
final response = await client.get(
|
||||||
'/sphere/stickers',
|
'/sphere/stickers',
|
||||||
queryParameters: {
|
queryParameters: {
|
||||||
'offset': offset,
|
'offset': fetchedCount.toString(),
|
||||||
'take': 20,
|
'take': pageSize,
|
||||||
'order': byUsage ? 'usage' : 'date',
|
'order': currentFilter.byUsage ? 'usage' : 'date',
|
||||||
if (query != null && query!.isNotEmpty) 'query': query,
|
if (currentFilter.query != null && currentFilter.query!.isNotEmpty)
|
||||||
|
'query': currentFilter.query,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
final total = int.parse(response.headers.value('X-Total') ?? '0');
|
totalCount = int.parse(response.headers.value('X-Total') ?? '0');
|
||||||
final List<dynamic> data = response.data;
|
final stickers =
|
||||||
final stickers = data.map((e) => SnStickerPack.fromJson(e)).toList();
|
response.data
|
||||||
|
.map((e) => SnStickerPack.fromJson(e))
|
||||||
|
.cast<SnStickerPack>()
|
||||||
|
.toList();
|
||||||
|
|
||||||
final hasMore = offset + stickers.length < total;
|
return stickers;
|
||||||
final nextCursor = hasMore ? (offset + stickers.length).toString() : null;
|
|
||||||
|
|
||||||
return CursorPagingData(
|
|
||||||
items: stickers,
|
|
||||||
hasMore: hasMore,
|
|
||||||
nextCursor: nextCursor,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,17 +77,23 @@ class MarketplaceStickersScreen extends HookConsumerWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
final byUsage = useState(true);
|
final query = useState<MarketplaceStickerQuery>(
|
||||||
final query = useState<String?>(null);
|
MarketplaceStickerQuery(byUsage: true, query: null),
|
||||||
|
);
|
||||||
final searchController = useTextEditingController();
|
final searchController = useTextEditingController();
|
||||||
final focusNode = useFocusNode();
|
final focusNode = useFocusNode();
|
||||||
final debounceTimer = useState<Timer?>(null);
|
final debounceTimer = useState<Timer?>(null);
|
||||||
|
|
||||||
|
final notifier = ref.watch(
|
||||||
|
marketplaceStickerPacksNotifierProvider.notifier,
|
||||||
|
);
|
||||||
|
|
||||||
// Clear search when query is cleared
|
// Clear search when query is cleared
|
||||||
useEffect(() {
|
useEffect(() {
|
||||||
if (query.value == null || query.value!.isEmpty) {
|
if (query.value.query == null || query.value.query!.isEmpty) {
|
||||||
searchController.clear();
|
searchController.clear();
|
||||||
}
|
}
|
||||||
|
notifier.applyFilter(query.value);
|
||||||
return null;
|
return null;
|
||||||
}, [query]);
|
}, [query]);
|
||||||
|
|
||||||
@@ -92,41 +110,24 @@ class MarketplaceStickersScreen extends HookConsumerWidget {
|
|||||||
actions: [
|
actions: [
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
byUsage.value = !byUsage.value;
|
query.value = query.value.copyWith(byUsage: !query.value.byUsage);
|
||||||
},
|
},
|
||||||
icon:
|
icon:
|
||||||
byUsage.value
|
query.value.byUsage
|
||||||
? const Icon(Symbols.local_fire_department)
|
? const Icon(Symbols.local_fire_department)
|
||||||
: const Icon(Symbols.access_time),
|
: const Icon(Symbols.access_time),
|
||||||
tooltip:
|
tooltip:
|
||||||
byUsage.value
|
query.value.byUsage
|
||||||
? 'orderByPopularity'.tr()
|
? 'orderByPopularity'.tr()
|
||||||
: 'orderByReleaseDate'.tr(),
|
: 'orderByReleaseDate'.tr(),
|
||||||
),
|
),
|
||||||
const Gap(8),
|
const Gap(8),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
body: PagingHelperView(
|
body: Column(
|
||||||
provider: marketplaceStickerPacksNotifierProvider(
|
|
||||||
byUsage: byUsage.value,
|
|
||||||
query: query.value,
|
|
||||||
),
|
|
||||||
futureRefreshable:
|
|
||||||
marketplaceStickerPacksNotifierProvider(
|
|
||||||
byUsage: byUsage.value,
|
|
||||||
query: query.value,
|
|
||||||
).future,
|
|
||||||
notifierRefreshable:
|
|
||||||
marketplaceStickerPacksNotifierProvider(
|
|
||||||
byUsage: byUsage.value,
|
|
||||||
query: query.value,
|
|
||||||
).notifier,
|
|
||||||
contentBuilder:
|
|
||||||
(data, widgetCount, endItemView) => Column(
|
|
||||||
children: [
|
children: [
|
||||||
// Search bar above the list
|
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.all(16),
|
padding: const EdgeInsets.fromLTRB(16, 16, 16, 0),
|
||||||
child: SearchBar(
|
child: SearchBar(
|
||||||
elevation: WidgetStateProperty.all(4),
|
elevation: WidgetStateProperty.all(4),
|
||||||
controller: searchController,
|
controller: searchController,
|
||||||
@@ -139,11 +140,11 @@ class MarketplaceStickersScreen extends HookConsumerWidget {
|
|||||||
onTapOutside:
|
onTapOutside:
|
||||||
(_) => FocusManager.instance.primaryFocus?.unfocus(),
|
(_) => FocusManager.instance.primaryFocus?.unfocus(),
|
||||||
trailing: [
|
trailing: [
|
||||||
if (query.value != null && query.value!.isNotEmpty)
|
if (query.value.query != null && query.value.query!.isNotEmpty)
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: const Icon(Symbols.close),
|
icon: const Icon(Symbols.close),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
query.value = null;
|
query.value = query.value.copyWith(query: null);
|
||||||
searchController.clear();
|
searchController.clear();
|
||||||
focusNode.unfocus();
|
focusNode.unfocus();
|
||||||
},
|
},
|
||||||
@@ -155,27 +156,121 @@ class MarketplaceStickersScreen extends HookConsumerWidget {
|
|||||||
debounceTimer.value = Timer(
|
debounceTimer.value = Timer(
|
||||||
const Duration(milliseconds: 500),
|
const Duration(milliseconds: 500),
|
||||||
() {
|
() {
|
||||||
query.value = value.isEmpty ? null : value;
|
query.value = query.value.copyWith(query: value);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
onSubmitted: (value) {
|
onSubmitted: (value) {
|
||||||
query.value = value.isEmpty ? null : value;
|
query.value = query.value.copyWith(query: value);
|
||||||
focusNode.unfocus();
|
focusNode.unfocus();
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: ListView.builder(
|
child: PaginationList(
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.only(top: 8),
|
||||||
itemCount: widgetCount,
|
provider: marketplaceStickerPacksNotifierProvider,
|
||||||
itemBuilder: (context, index) {
|
notifier: marketplaceStickerPacksNotifierProvider.notifier,
|
||||||
if (index == widgetCount - 1) {
|
itemBuilder:
|
||||||
return endItemView;
|
(context, idx, pack) => Card(
|
||||||
}
|
margin: EdgeInsets.symmetric(horizontal: 12, vertical: 4),
|
||||||
|
child: Column(
|
||||||
final pack = data.items[index];
|
children: [
|
||||||
return ListTile(
|
Container(
|
||||||
|
color:
|
||||||
|
Theme.of(context).colorScheme.secondaryContainer,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 20,
|
||||||
|
vertical: 20,
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: List.generate(
|
||||||
|
math.min(pack.stickers.length, 4),
|
||||||
|
(index) => Padding(
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
right: index < 3 ? 8 : 0,
|
||||||
|
),
|
||||||
|
child: Container(
|
||||||
|
constraints: const BoxConstraints(
|
||||||
|
maxWidth: 80,
|
||||||
|
),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(
|
||||||
|
8,
|
||||||
|
),
|
||||||
|
color:
|
||||||
|
Theme.of(
|
||||||
|
context,
|
||||||
|
).colorScheme.tertiaryContainer,
|
||||||
|
),
|
||||||
|
child: CloudImageWidget(
|
||||||
|
file: pack.stickers[index].image,
|
||||||
|
),
|
||||||
|
).clipRRect(all: 8),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (pack.stickers.length > 4)
|
||||||
|
const SizedBox(height: 8),
|
||||||
|
if (pack.stickers.length > 4)
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: List.generate(
|
||||||
|
math.min(pack.stickers.length - 4, 4),
|
||||||
|
(index) => Padding(
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
right: index < 3 ? 8 : 0,
|
||||||
|
),
|
||||||
|
child: Container(
|
||||||
|
constraints: const BoxConstraints(
|
||||||
|
maxWidth: 80,
|
||||||
|
),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(
|
||||||
|
8,
|
||||||
|
),
|
||||||
|
color:
|
||||||
|
Theme.of(
|
||||||
|
context,
|
||||||
|
).colorScheme.tertiaryContainer,
|
||||||
|
),
|
||||||
|
child: CloudImageWidget(
|
||||||
|
file:
|
||||||
|
pack.stickers[index + 4].image,
|
||||||
|
),
|
||||||
|
).clipRRect(all: 8),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
).clipRRect(topLeft: 8, topRight: 8),
|
||||||
|
ListTile(
|
||||||
|
leading: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color:
|
||||||
|
Theme.of(
|
||||||
|
context,
|
||||||
|
).colorScheme.tertiaryContainer,
|
||||||
|
borderRadius: const BorderRadius.all(
|
||||||
|
Radius.circular(8),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: CloudImageWidget(
|
||||||
|
file: pack.icon ?? pack.stickers.first.image,
|
||||||
|
),
|
||||||
|
).width(40).height(40).clipRRect(all: 8),
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: const BorderRadius.all(
|
||||||
|
Radius.circular(8),
|
||||||
|
),
|
||||||
|
),
|
||||||
title: Text(pack.name),
|
title: Text(pack.name),
|
||||||
subtitle: Text(pack.description),
|
subtitle: Text(pack.description),
|
||||||
trailing: const Icon(Symbols.chevron_right),
|
trailing: const Icon(Symbols.chevron_right),
|
||||||
@@ -187,13 +282,14 @@ class MarketplaceStickersScreen extends HookConsumerWidget {
|
|||||||
pathParameters: {'packId': pack.id},
|
pathParameters: {'packId': pack.id},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
268
lib/screens/stickers/sticker_marketplace.freezed.dart
Normal file
268
lib/screens/stickers/sticker_marketplace.freezed.dart
Normal file
@@ -0,0 +1,268 @@
|
|||||||
|
// 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 'sticker_marketplace.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// FreezedGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// dart format off
|
||||||
|
T _$identity<T>(T value) => value;
|
||||||
|
/// @nodoc
|
||||||
|
mixin _$MarketplaceStickerQuery {
|
||||||
|
|
||||||
|
bool get byUsage; String? get query;
|
||||||
|
/// Create a copy of MarketplaceStickerQuery
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$MarketplaceStickerQueryCopyWith<MarketplaceStickerQuery> get copyWith => _$MarketplaceStickerQueryCopyWithImpl<MarketplaceStickerQuery>(this as MarketplaceStickerQuery, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is MarketplaceStickerQuery&&(identical(other.byUsage, byUsage) || other.byUsage == byUsage)&&(identical(other.query, query) || other.query == query));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,byUsage,query);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'MarketplaceStickerQuery(byUsage: $byUsage, query: $query)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class $MarketplaceStickerQueryCopyWith<$Res> {
|
||||||
|
factory $MarketplaceStickerQueryCopyWith(MarketplaceStickerQuery value, $Res Function(MarketplaceStickerQuery) _then) = _$MarketplaceStickerQueryCopyWithImpl;
|
||||||
|
@useResult
|
||||||
|
$Res call({
|
||||||
|
bool byUsage, String? query
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class _$MarketplaceStickerQueryCopyWithImpl<$Res>
|
||||||
|
implements $MarketplaceStickerQueryCopyWith<$Res> {
|
||||||
|
_$MarketplaceStickerQueryCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final MarketplaceStickerQuery _self;
|
||||||
|
final $Res Function(MarketplaceStickerQuery) _then;
|
||||||
|
|
||||||
|
/// Create a copy of MarketplaceStickerQuery
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@pragma('vm:prefer-inline') @override $Res call({Object? byUsage = null,Object? query = freezed,}) {
|
||||||
|
return _then(_self.copyWith(
|
||||||
|
byUsage: null == byUsage ? _self.byUsage : byUsage // ignore: cast_nullable_to_non_nullable
|
||||||
|
as bool,query: freezed == query ? _self.query : query // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Adds pattern-matching-related methods to [MarketplaceStickerQuery].
|
||||||
|
extension MarketplaceStickerQueryPatterns on MarketplaceStickerQuery {
|
||||||
|
/// 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( _MarketplaceStickerQuery value)? $default,{required TResult orElse(),}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _MarketplaceStickerQuery() 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( _MarketplaceStickerQuery value) $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _MarketplaceStickerQuery():
|
||||||
|
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( _MarketplaceStickerQuery value)? $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _MarketplaceStickerQuery() 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 byUsage, String? query)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _MarketplaceStickerQuery() when $default != null:
|
||||||
|
return $default(_that.byUsage,_that.query);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 byUsage, String? query) $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _MarketplaceStickerQuery():
|
||||||
|
return $default(_that.byUsage,_that.query);}
|
||||||
|
}
|
||||||
|
/// 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 byUsage, String? query)? $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _MarketplaceStickerQuery() when $default != null:
|
||||||
|
return $default(_that.byUsage,_that.query);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
|
||||||
|
class _MarketplaceStickerQuery implements MarketplaceStickerQuery {
|
||||||
|
const _MarketplaceStickerQuery({required this.byUsage, required this.query});
|
||||||
|
|
||||||
|
|
||||||
|
@override final bool byUsage;
|
||||||
|
@override final String? query;
|
||||||
|
|
||||||
|
/// Create a copy of MarketplaceStickerQuery
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
_$MarketplaceStickerQueryCopyWith<_MarketplaceStickerQuery> get copyWith => __$MarketplaceStickerQueryCopyWithImpl<_MarketplaceStickerQuery>(this, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _MarketplaceStickerQuery&&(identical(other.byUsage, byUsage) || other.byUsage == byUsage)&&(identical(other.query, query) || other.query == query));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,byUsage,query);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'MarketplaceStickerQuery(byUsage: $byUsage, query: $query)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class _$MarketplaceStickerQueryCopyWith<$Res> implements $MarketplaceStickerQueryCopyWith<$Res> {
|
||||||
|
factory _$MarketplaceStickerQueryCopyWith(_MarketplaceStickerQuery value, $Res Function(_MarketplaceStickerQuery) _then) = __$MarketplaceStickerQueryCopyWithImpl;
|
||||||
|
@override @useResult
|
||||||
|
$Res call({
|
||||||
|
bool byUsage, String? query
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class __$MarketplaceStickerQueryCopyWithImpl<$Res>
|
||||||
|
implements _$MarketplaceStickerQueryCopyWith<$Res> {
|
||||||
|
__$MarketplaceStickerQueryCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final _MarketplaceStickerQuery _self;
|
||||||
|
final $Res Function(_MarketplaceStickerQuery) _then;
|
||||||
|
|
||||||
|
/// Create a copy of MarketplaceStickerQuery
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @pragma('vm:prefer-inline') $Res call({Object? byUsage = null,Object? query = freezed,}) {
|
||||||
|
return _then(_MarketplaceStickerQuery(
|
||||||
|
byUsage: null == byUsage ? _self.byUsage : byUsage // ignore: cast_nullable_to_non_nullable
|
||||||
|
as bool,query: freezed == query ? _self.query : query // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// dart format on
|
||||||
@@ -1,213 +0,0 @@
|
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
||||||
|
|
||||||
part of 'sticker_marketplace.dart';
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
// RiverpodGenerator
|
|
||||||
// **************************************************************************
|
|
||||||
|
|
||||||
String _$marketplaceStickerPacksNotifierHash() =>
|
|
||||||
r'3bde76e18bb024f45ff6261fe735cdba97b02808';
|
|
||||||
|
|
||||||
/// Copied from Dart SDK
|
|
||||||
class _SystemHash {
|
|
||||||
_SystemHash._();
|
|
||||||
|
|
||||||
static int combine(int hash, int value) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + value);
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
|
||||||
return hash ^ (hash >> 6);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int finish(int hash) {
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
hash = hash ^ (hash >> 11);
|
|
||||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
abstract class _$MarketplaceStickerPacksNotifier
|
|
||||||
extends BuildlessAutoDisposeAsyncNotifier<CursorPagingData<SnStickerPack>> {
|
|
||||||
late final String? query;
|
|
||||||
late final bool byUsage;
|
|
||||||
|
|
||||||
FutureOr<CursorPagingData<SnStickerPack>> build({
|
|
||||||
required String? query,
|
|
||||||
required bool byUsage,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/// See also [MarketplaceStickerPacksNotifier].
|
|
||||||
@ProviderFor(MarketplaceStickerPacksNotifier)
|
|
||||||
const marketplaceStickerPacksNotifierProvider =
|
|
||||||
MarketplaceStickerPacksNotifierFamily();
|
|
||||||
|
|
||||||
/// See also [MarketplaceStickerPacksNotifier].
|
|
||||||
class MarketplaceStickerPacksNotifierFamily
|
|
||||||
extends Family<AsyncValue<CursorPagingData<SnStickerPack>>> {
|
|
||||||
/// See also [MarketplaceStickerPacksNotifier].
|
|
||||||
const MarketplaceStickerPacksNotifierFamily();
|
|
||||||
|
|
||||||
/// See also [MarketplaceStickerPacksNotifier].
|
|
||||||
MarketplaceStickerPacksNotifierProvider call({
|
|
||||||
required String? query,
|
|
||||||
required bool byUsage,
|
|
||||||
}) {
|
|
||||||
return MarketplaceStickerPacksNotifierProvider(
|
|
||||||
query: query,
|
|
||||||
byUsage: byUsage,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
MarketplaceStickerPacksNotifierProvider getProviderOverride(
|
|
||||||
covariant MarketplaceStickerPacksNotifierProvider provider,
|
|
||||||
) {
|
|
||||||
return call(query: provider.query, byUsage: provider.byUsage);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
|
||||||
|
|
||||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
|
||||||
_allTransitiveDependencies;
|
|
||||||
|
|
||||||
@override
|
|
||||||
String? get name => r'marketplaceStickerPacksNotifierProvider';
|
|
||||||
}
|
|
||||||
|
|
||||||
/// See also [MarketplaceStickerPacksNotifier].
|
|
||||||
class MarketplaceStickerPacksNotifierProvider
|
|
||||||
extends
|
|
||||||
AutoDisposeAsyncNotifierProviderImpl<
|
|
||||||
MarketplaceStickerPacksNotifier,
|
|
||||||
CursorPagingData<SnStickerPack>
|
|
||||||
> {
|
|
||||||
/// See also [MarketplaceStickerPacksNotifier].
|
|
||||||
MarketplaceStickerPacksNotifierProvider({
|
|
||||||
required String? query,
|
|
||||||
required bool byUsage,
|
|
||||||
}) : this._internal(
|
|
||||||
() =>
|
|
||||||
MarketplaceStickerPacksNotifier()
|
|
||||||
..query = query
|
|
||||||
..byUsage = byUsage,
|
|
||||||
from: marketplaceStickerPacksNotifierProvider,
|
|
||||||
name: r'marketplaceStickerPacksNotifierProvider',
|
|
||||||
debugGetCreateSourceHash:
|
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$marketplaceStickerPacksNotifierHash,
|
|
||||||
dependencies: MarketplaceStickerPacksNotifierFamily._dependencies,
|
|
||||||
allTransitiveDependencies:
|
|
||||||
MarketplaceStickerPacksNotifierFamily._allTransitiveDependencies,
|
|
||||||
query: query,
|
|
||||||
byUsage: byUsage,
|
|
||||||
);
|
|
||||||
|
|
||||||
MarketplaceStickerPacksNotifierProvider._internal(
|
|
||||||
super._createNotifier, {
|
|
||||||
required super.name,
|
|
||||||
required super.dependencies,
|
|
||||||
required super.allTransitiveDependencies,
|
|
||||||
required super.debugGetCreateSourceHash,
|
|
||||||
required super.from,
|
|
||||||
required this.query,
|
|
||||||
required this.byUsage,
|
|
||||||
}) : super.internal();
|
|
||||||
|
|
||||||
final String? query;
|
|
||||||
final bool byUsage;
|
|
||||||
|
|
||||||
@override
|
|
||||||
FutureOr<CursorPagingData<SnStickerPack>> runNotifierBuild(
|
|
||||||
covariant MarketplaceStickerPacksNotifier notifier,
|
|
||||||
) {
|
|
||||||
return notifier.build(query: query, byUsage: byUsage);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Override overrideWith(MarketplaceStickerPacksNotifier Function() create) {
|
|
||||||
return ProviderOverride(
|
|
||||||
origin: this,
|
|
||||||
override: MarketplaceStickerPacksNotifierProvider._internal(
|
|
||||||
() =>
|
|
||||||
create()
|
|
||||||
..query = query
|
|
||||||
..byUsage = byUsage,
|
|
||||||
from: from,
|
|
||||||
name: null,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
debugGetCreateSourceHash: null,
|
|
||||||
query: query,
|
|
||||||
byUsage: byUsage,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
AutoDisposeAsyncNotifierProviderElement<
|
|
||||||
MarketplaceStickerPacksNotifier,
|
|
||||||
CursorPagingData<SnStickerPack>
|
|
||||||
>
|
|
||||||
createElement() {
|
|
||||||
return _MarketplaceStickerPacksNotifierProviderElement(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
bool operator ==(Object other) {
|
|
||||||
return other is MarketplaceStickerPacksNotifierProvider &&
|
|
||||||
other.query == query &&
|
|
||||||
other.byUsage == byUsage;
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
int get hashCode {
|
|
||||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
|
||||||
hash = _SystemHash.combine(hash, query.hashCode);
|
|
||||||
hash = _SystemHash.combine(hash, byUsage.hashCode);
|
|
||||||
|
|
||||||
return _SystemHash.finish(hash);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
|
||||||
// ignore: unused_element
|
|
||||||
mixin MarketplaceStickerPacksNotifierRef
|
|
||||||
on AutoDisposeAsyncNotifierProviderRef<CursorPagingData<SnStickerPack>> {
|
|
||||||
/// The parameter `query` of this provider.
|
|
||||||
String? get query;
|
|
||||||
|
|
||||||
/// The parameter `byUsage` of this provider.
|
|
||||||
bool get byUsage;
|
|
||||||
}
|
|
||||||
|
|
||||||
class _MarketplaceStickerPacksNotifierProviderElement
|
|
||||||
extends
|
|
||||||
AutoDisposeAsyncNotifierProviderElement<
|
|
||||||
MarketplaceStickerPacksNotifier,
|
|
||||||
CursorPagingData<SnStickerPack>
|
|
||||||
>
|
|
||||||
with MarketplaceStickerPacksNotifierRef {
|
|
||||||
_MarketplaceStickerPacksNotifierProviderElement(super.provider);
|
|
||||||
|
|
||||||
@override
|
|
||||||
String? get query =>
|
|
||||||
(origin as MarketplaceStickerPacksNotifierProvider).query;
|
|
||||||
@override
|
|
||||||
bool get byUsage =>
|
|
||||||
(origin as MarketplaceStickerPacksNotifierProvider).byUsage;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ignore_for_file: type=lint
|
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
|
||||||
@@ -2,6 +2,7 @@ import 'dart:convert';
|
|||||||
|
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:gap/gap.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:island/models/account.dart';
|
import 'package:island/models/account.dart';
|
||||||
import 'package:island/pods/network.dart';
|
import 'package:island/pods/network.dart';
|
||||||
@@ -11,6 +12,7 @@ import 'package:island/services/udid.dart';
|
|||||||
import 'package:island/widgets/alert.dart';
|
import 'package:island/widgets/alert.dart';
|
||||||
import 'package:island/widgets/content/sheet.dart';
|
import 'package:island/widgets/content/sheet.dart';
|
||||||
import 'package:island/widgets/response.dart';
|
import 'package:island/widgets/response.dart';
|
||||||
|
import 'package:island/widgets/sites/info_row.dart';
|
||||||
import 'package:material_symbols_icons/symbols.dart';
|
import 'package:material_symbols_icons/symbols.dart';
|
||||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||||
import 'package:styled_widget/styled_widget.dart';
|
import 'package:styled_widget/styled_widget.dart';
|
||||||
@@ -19,28 +21,30 @@ import 'package:island/widgets/extended_refresh_indicator.dart';
|
|||||||
part 'account_devices.g.dart';
|
part 'account_devices.g.dart';
|
||||||
|
|
||||||
@riverpod
|
@riverpod
|
||||||
Future<List<SnAuthDeviceWithChallenge>> authDevices(Ref ref) async {
|
Future<List<SnAuthDeviceWithSession>> authDevices(Ref ref) async {
|
||||||
final resp = await ref
|
final resp = await ref
|
||||||
.watch(apiClientProvider)
|
.watch(apiClientProvider)
|
||||||
.get('/pass/accounts/me/devices');
|
.get('/pass/accounts/me/devices');
|
||||||
final currentId = await getUdid();
|
final currentId = await getUdid();
|
||||||
final data =
|
final data =
|
||||||
resp.data.map<SnAuthDeviceWithChallenge>((e) {
|
resp.data.map<SnAuthDeviceWithSession>((e) {
|
||||||
final ele = SnAuthDeviceWithChallenge.fromJson(e);
|
final ele = SnAuthDeviceWithSession.fromJson(e);
|
||||||
return ele.copyWith(isCurrent: ele.deviceId == currentId);
|
return ele.copyWith(isCurrent: ele.deviceId == currentId);
|
||||||
}).toList();
|
}).toList();
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
class _DeviceListTile extends StatelessWidget {
|
class _DeviceListTile extends StatelessWidget {
|
||||||
final SnAuthDeviceWithChallenge device;
|
final SnAuthDeviceWithSession device;
|
||||||
final Function(String) updateDeviceLabel;
|
final Function(String) updateDeviceLabel;
|
||||||
final Function(String) logoutDevice;
|
final Function(String) logoutDevice;
|
||||||
|
final Function(String) logoutSession;
|
||||||
|
|
||||||
const _DeviceListTile({
|
const _DeviceListTile({
|
||||||
required this.device,
|
required this.device,
|
||||||
required this.updateDeviceLabel,
|
required this.updateDeviceLabel,
|
||||||
required this.logoutDevice,
|
required this.logoutDevice,
|
||||||
|
required this.logoutSession,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -69,9 +73,10 @@ class _DeviceListTile extends StatelessWidget {
|
|||||||
subtitle: Column(
|
subtitle: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
children: [
|
children: [
|
||||||
|
if (device.sessions.isNotEmpty)
|
||||||
Text(
|
Text(
|
||||||
'lastActiveAt'.tr(
|
'lastActiveAt'.tr(
|
||||||
args: [device.challenges.first.createdAt.formatSystem()],
|
args: [device.sessions.first.createdAt.formatSystem()],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -114,26 +119,55 @@ class _DeviceListTile extends StatelessWidget {
|
|||||||
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||||
child: Text('authDeviceChallenges'.tr()),
|
child: Text('authDeviceChallenges'.tr()),
|
||||||
),
|
),
|
||||||
for (final challenge in device.challenges)
|
...device.sessions
|
||||||
ListTile(
|
.map(
|
||||||
minTileHeight: 48,
|
(session) => Row(
|
||||||
title: Text(DateFormat().format(challenge.createdAt.toLocal())),
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
subtitle: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
||||||
children: [
|
children: [
|
||||||
Text(challenge.ipAddress),
|
Expanded(
|
||||||
if (challenge.location != null)
|
child: Column(
|
||||||
Row(
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
spacing: 4,
|
spacing: 4,
|
||||||
children:
|
children: [
|
||||||
[challenge.location?.city, challenge.location?.country]
|
InfoRow(
|
||||||
.where((e) => e?.isNotEmpty ?? false)
|
label: 'createdAt'.tr(
|
||||||
.map((e) => Text(e!))
|
args: [session.createdAt.toLocal().formatSystem()],
|
||||||
.toList(),
|
),
|
||||||
|
icon: Symbols.join,
|
||||||
|
),
|
||||||
|
InfoRow(
|
||||||
|
label: 'lastActiveAt'.tr(
|
||||||
|
args: [
|
||||||
|
session.lastGrantedAt.toLocal().formatSystem(),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
icon: Symbols.refresh_rounded,
|
||||||
|
),
|
||||||
|
InfoRow(
|
||||||
|
label:
|
||||||
|
'${'location'.tr()} ${session.location?.city ?? 'unknown'.tr()}',
|
||||||
|
icon: Symbols.pin_drop,
|
||||||
|
),
|
||||||
|
InfoRow(
|
||||||
|
label:
|
||||||
|
'${'ipAddress'.tr()} ${session.ipAddress ?? 'unknown'.tr()}',
|
||||||
|
icon: Symbols.dns,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
IconButton(
|
||||||
|
icon: Icon(Icons.logout),
|
||||||
|
tooltip: 'authSessionLogout'.tr(),
|
||||||
|
onPressed: () => logoutSession(session.id),
|
||||||
|
),
|
||||||
|
const Gap(4),
|
||||||
|
],
|
||||||
|
).padding(horizontal: 20, vertical: 8),
|
||||||
|
)
|
||||||
|
.expand((element) => [element, const Divider(height: 1)])
|
||||||
|
.toList()
|
||||||
|
..removeLast(),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -150,6 +184,7 @@ class AccountSessionSheet extends HookConsumerWidget {
|
|||||||
final confirm = await showConfirmAlert(
|
final confirm = await showConfirmAlert(
|
||||||
'authDeviceLogoutHint'.tr(),
|
'authDeviceLogoutHint'.tr(),
|
||||||
'authDeviceLogout'.tr(),
|
'authDeviceLogout'.tr(),
|
||||||
|
isDanger: true,
|
||||||
);
|
);
|
||||||
if (!confirm || !context.mounted) return;
|
if (!confirm || !context.mounted) return;
|
||||||
try {
|
try {
|
||||||
@@ -161,6 +196,22 @@ class AccountSessionSheet extends HookConsumerWidget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void logoutSession(String sessionId) async {
|
||||||
|
final confirm = await showConfirmAlert(
|
||||||
|
'authSessionLogoutHint'.tr(),
|
||||||
|
'authSessionLogout'.tr(),
|
||||||
|
isDanger: true,
|
||||||
|
);
|
||||||
|
if (!confirm || !context.mounted) return;
|
||||||
|
try {
|
||||||
|
final apiClient = ref.watch(apiClientProvider);
|
||||||
|
await apiClient.delete('/pass/accounts/me/sessions/$sessionId');
|
||||||
|
ref.invalidate(authDevicesProvider);
|
||||||
|
} catch (err) {
|
||||||
|
showErrorAlert(err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void updateDeviceLabel(String sessionId) async {
|
void updateDeviceLabel(String sessionId) async {
|
||||||
final controller = TextEditingController();
|
final controller = TextEditingController();
|
||||||
final label = await showDialog<String>(
|
final label = await showDialog<String>(
|
||||||
@@ -248,6 +299,7 @@ class AccountSessionSheet extends HookConsumerWidget {
|
|||||||
device: device,
|
device: device,
|
||||||
updateDeviceLabel: updateDeviceLabel,
|
updateDeviceLabel: updateDeviceLabel,
|
||||||
logoutDevice: logoutDevice,
|
logoutDevice: logoutDevice,
|
||||||
|
logoutSession: logoutSession,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return Dismissible(
|
return Dismissible(
|
||||||
@@ -276,6 +328,7 @@ class AccountSessionSheet extends HookConsumerWidget {
|
|||||||
final confirm = await showConfirmAlert(
|
final confirm = await showConfirmAlert(
|
||||||
'authDeviceLogoutHint'.tr(),
|
'authDeviceLogoutHint'.tr(),
|
||||||
'authDeviceLogout'.tr(),
|
'authDeviceLogout'.tr(),
|
||||||
|
isDanger: true,
|
||||||
);
|
);
|
||||||
if (confirm && context.mounted) {
|
if (confirm && context.mounted) {
|
||||||
try {
|
try {
|
||||||
@@ -302,6 +355,7 @@ class AccountSessionSheet extends HookConsumerWidget {
|
|||||||
device: device,
|
device: device,
|
||||||
updateDeviceLabel: updateDeviceLabel,
|
updateDeviceLabel: updateDeviceLabel,
|
||||||
logoutDevice: logoutDevice,
|
logoutDevice: logoutDevice,
|
||||||
|
logoutSession: logoutSession,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,12 +6,12 @@ part of 'account_devices.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$authDevicesHash() => r'35735af4ed75b73fe80c8942e53b3bc26a569c01';
|
String _$authDevicesHash() => r'1af378149286020ec263be178c573ccc247a0cd1';
|
||||||
|
|
||||||
/// See also [authDevices].
|
/// See also [authDevices].
|
||||||
@ProviderFor(authDevices)
|
@ProviderFor(authDevices)
|
||||||
final authDevicesProvider =
|
final authDevicesProvider =
|
||||||
AutoDisposeFutureProvider<List<SnAuthDeviceWithChallenge>>.internal(
|
AutoDisposeFutureProvider<List<SnAuthDeviceWithSession>>.internal(
|
||||||
authDevices,
|
authDevices,
|
||||||
name: r'authDevicesProvider',
|
name: r'authDevicesProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash:
|
||||||
@@ -25,6 +25,6 @@ final authDevicesProvider =
|
|||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||||
// ignore: unused_element
|
// ignore: unused_element
|
||||||
typedef AuthDevicesRef =
|
typedef AuthDevicesRef =
|
||||||
AutoDisposeFutureProviderRef<List<SnAuthDeviceWithChallenge>>;
|
AutoDisposeFutureProviderRef<List<SnAuthDeviceWithSession>>;
|
||||||
// ignore_for_file: type=lint
|
// ignore_for_file: type=lint
|
||||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:gap/gap.dart';
|
import 'package:gap/gap.dart';
|
||||||
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:island/models/account.dart';
|
import 'package:island/models/account.dart';
|
||||||
import 'package:island/models/wallet.dart';
|
import 'package:island/models/wallet.dart';
|
||||||
|
import 'package:island/pods/network.dart';
|
||||||
|
import 'package:island/widgets/alert.dart';
|
||||||
import 'package:material_symbols_icons/symbols.dart';
|
import 'package:material_symbols_icons/symbols.dart';
|
||||||
import 'package:styled_widget/styled_widget.dart';
|
import 'package:styled_widget/styled_widget.dart';
|
||||||
|
|
||||||
@@ -428,3 +431,47 @@ class VerificationStatusCard extends StatelessWidget {
|
|||||||
).padding(horizontal: 24, vertical: 16);
|
).padding(horizontal: 24, vertical: 16);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class AccountUnactivatedCard extends HookConsumerWidget {
|
||||||
|
const AccountUnactivatedCard({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
|
return Card(
|
||||||
|
margin: EdgeInsets.zero,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
const Icon(
|
||||||
|
Symbols.warning_amber_rounded,
|
||||||
|
size: 40,
|
||||||
|
fill: 1,
|
||||||
|
color: Colors.amber,
|
||||||
|
),
|
||||||
|
const Gap(4),
|
||||||
|
Text('accountActivationAlert').tr().fontSize(16).bold(),
|
||||||
|
Text('accountActivationAlertHint').tr(),
|
||||||
|
const Gap(4),
|
||||||
|
Text('accountActivationResendHint').tr().opacity(0.8),
|
||||||
|
const Gap(16),
|
||||||
|
FilledButton.icon(
|
||||||
|
icon: const Icon(Symbols.email),
|
||||||
|
label: Text('accountActivationResend').tr(),
|
||||||
|
onPressed: () async {
|
||||||
|
final client = ref.watch(apiClientProvider);
|
||||||
|
try {
|
||||||
|
showLoadingModal(context);
|
||||||
|
await client.post('/pass/spells/activation/resend');
|
||||||
|
showSnackBar("Activation magic spell has been resend");
|
||||||
|
} catch (err) {
|
||||||
|
showErrorAlert(err);
|
||||||
|
} finally {
|
||||||
|
if (context.mounted) hideLoadingModal(context);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
).width(double.infinity),
|
||||||
|
],
|
||||||
|
).padding(horizontal: 24, vertical: 16),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -431,6 +431,9 @@ class _ActivityPresenceWidgetState extends State<ActivityPresenceWidget>
|
|||||||
if (activity.titleUrl != null &&
|
if (activity.titleUrl != null &&
|
||||||
activity.titleUrl!.isNotEmpty)
|
activity.titleUrl!.isNotEmpty)
|
||||||
IconButton(
|
IconButton(
|
||||||
|
visualDensity: const VisualDensity(
|
||||||
|
vertical: -4,
|
||||||
|
),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
launchUrlString(activity.titleUrl!);
|
launchUrlString(activity.titleUrl!);
|
||||||
},
|
},
|
||||||
@@ -583,6 +586,9 @@ class _ActivityPresenceWidgetState extends State<ActivityPresenceWidget>
|
|||||||
if (activity.titleUrl != null &&
|
if (activity.titleUrl != null &&
|
||||||
activity.titleUrl!.isNotEmpty)
|
activity.titleUrl!.isNotEmpty)
|
||||||
IconButton(
|
IconButton(
|
||||||
|
visualDensity: const VisualDensity(
|
||||||
|
vertical: -4,
|
||||||
|
),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
launchUrlString(
|
launchUrlString(
|
||||||
activity.titleUrl!,
|
activity.titleUrl!,
|
||||||
@@ -616,6 +622,8 @@ class _ActivityPresenceWidgetState extends State<ActivityPresenceWidget>
|
|||||||
'assets/images/oidc/spotify.png',
|
'assets/images/oidc/spotify.png',
|
||||||
width: 24,
|
width: 24,
|
||||||
height: 24,
|
height: 24,
|
||||||
|
color:
|
||||||
|
Theme.of(context).colorScheme.onSurface,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
@@ -62,7 +63,10 @@ class FriendsOverviewWidget extends HookConsumerWidget {
|
|||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
spacing: 8,
|
spacing: 8,
|
||||||
children: [const Icon(Symbols.group), Text('Friends Online')],
|
children: [
|
||||||
|
const Icon(Symbols.group),
|
||||||
|
Text('friendsOnline').tr(),
|
||||||
|
],
|
||||||
).padding(horizontal: 16).height(48),
|
).padding(horizontal: 16).height(48),
|
||||||
if (onlineFriends.isEmpty)
|
if (onlineFriends.isEmpty)
|
||||||
Container(
|
Container(
|
||||||
@@ -182,6 +186,7 @@ class _FriendTile extends ConsumerWidget {
|
|||||||
Symbols.play_arrow,
|
Symbols.play_arrow,
|
||||||
size: 10,
|
size: 10,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
|
fill: 1,
|
||||||
)
|
)
|
||||||
: null,
|
: null,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:gap/gap.dart';
|
import 'package:gap/gap.dart';
|
||||||
import 'package:island/main.dart';
|
import 'package:island/main.dart';
|
||||||
import 'package:island/talker.dart';
|
import 'package:island/talker.dart';
|
||||||
|
import 'package:material_symbols_icons/symbols.dart';
|
||||||
import 'package:styled_widget/styled_widget.dart';
|
import 'package:styled_widget/styled_widget.dart';
|
||||||
import 'package:top_snackbar_flutter/top_snack_bar.dart';
|
import 'package:top_snackbar_flutter/top_snack_bar.dart';
|
||||||
|
|
||||||
@@ -30,7 +31,11 @@ void showSnackBar(String message, {SnackBarAction? action}) {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
curve: Curves.easeInOut,
|
displayDuration: const Duration(milliseconds: 1500),
|
||||||
|
animationDuration: const Duration(milliseconds: 300),
|
||||||
|
reverseAnimationDuration: const Duration(milliseconds: 300),
|
||||||
|
curve: Curves.fastLinearToSlowEaseIn,
|
||||||
|
dismissType: DismissType.onTap,
|
||||||
snackBarPosition: SnackBarPosition.bottom,
|
snackBarPosition: SnackBarPosition.bottom,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -156,6 +161,9 @@ String _parseRemoteError(DioException err) {
|
|||||||
return message ?? err.toString();
|
return message ?? err.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Track active overlay dialogs for dismissal
|
||||||
|
final List<void Function()> _activeOverlayDialogs = [];
|
||||||
|
|
||||||
Future<T?> showOverlayDialog<T>({
|
Future<T?> showOverlayDialog<T>({
|
||||||
required Widget Function(BuildContext context, void Function(T? result) close)
|
required Widget Function(BuildContext context, void Function(T? result) close)
|
||||||
builder,
|
builder,
|
||||||
@@ -174,6 +182,7 @@ Future<T?> showOverlayDialog<T>({
|
|||||||
}
|
}
|
||||||
|
|
||||||
entry.remove();
|
entry.remove();
|
||||||
|
_activeOverlayDialogs.remove(close);
|
||||||
completer.complete(result);
|
completer.complete(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -214,11 +223,24 @@ Future<T?> showOverlayDialog<T>({
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
_activeOverlayDialogs.add(() => close(null));
|
||||||
globalOverlay.currentState!.insert(entry);
|
globalOverlay.currentState!.insert(entry);
|
||||||
return completer.future;
|
return completer.future;
|
||||||
}
|
}
|
||||||
|
|
||||||
void showErrorAlert(dynamic err) {
|
// Close the topmost overlay dialog if any exists
|
||||||
|
bool closeTopmostOverlayDialog() {
|
||||||
|
if (_activeOverlayDialogs.isNotEmpty) {
|
||||||
|
final closeFunc = _activeOverlayDialogs.last;
|
||||||
|
closeFunc();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const kDialogMaxWidth = 480.0;
|
||||||
|
|
||||||
|
void showErrorAlert(dynamic err, {IconData? icon}) {
|
||||||
if (err is Error) {
|
if (err is Error) {
|
||||||
talker.error('Something went wrong...', err, err.stackTrace);
|
talker.error('Something went wrong...', err, err.stackTrace);
|
||||||
}
|
}
|
||||||
@@ -231,9 +253,31 @@ void showErrorAlert(dynamic err) {
|
|||||||
|
|
||||||
showOverlayDialog<void>(
|
showOverlayDialog<void>(
|
||||||
builder:
|
builder:
|
||||||
(context, close) => AlertDialog(
|
(context, close) => ConstrainedBox(
|
||||||
title: Text('somethingWentWrong'.tr()),
|
constraints: const BoxConstraints(maxWidth: kDialogMaxWidth),
|
||||||
content: Text(text),
|
child: AlertDialog(
|
||||||
|
title: null,
|
||||||
|
titlePadding: EdgeInsets.zero,
|
||||||
|
contentPadding: const EdgeInsets.fromLTRB(24, 24, 24, 0),
|
||||||
|
content: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Icon(
|
||||||
|
icon ?? Icons.error_outline_rounded,
|
||||||
|
size: 48,
|
||||||
|
color: Theme.of(context).colorScheme.error,
|
||||||
|
),
|
||||||
|
const Gap(16),
|
||||||
|
Text(
|
||||||
|
'somethingWentWrong'.tr(),
|
||||||
|
style: Theme.of(context).textTheme.titleLarge,
|
||||||
|
),
|
||||||
|
const Gap(8),
|
||||||
|
Text(text),
|
||||||
|
const Gap(8),
|
||||||
|
],
|
||||||
|
),
|
||||||
actions: [
|
actions: [
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: () => close(null),
|
onPressed: () => close(null),
|
||||||
@@ -241,15 +285,36 @@ void showErrorAlert(dynamic err) {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void showInfoAlert(String message, String title) {
|
void showInfoAlert(String message, String title, {IconData? icon}) {
|
||||||
showOverlayDialog<void>(
|
showOverlayDialog<void>(
|
||||||
builder:
|
builder:
|
||||||
(context, close) => AlertDialog(
|
(context, close) => ConstrainedBox(
|
||||||
title: Text(title),
|
constraints: const BoxConstraints(maxWidth: kDialogMaxWidth),
|
||||||
content: Text(message),
|
child: AlertDialog(
|
||||||
|
title: null,
|
||||||
|
titlePadding: EdgeInsets.zero,
|
||||||
|
contentPadding: const EdgeInsets.fromLTRB(24, 24, 24, 0),
|
||||||
|
content: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Icon(
|
||||||
|
icon ?? Symbols.info_rounded,
|
||||||
|
fill: 1,
|
||||||
|
size: 48,
|
||||||
|
color: Theme.of(context).colorScheme.primary,
|
||||||
|
),
|
||||||
|
const Gap(16),
|
||||||
|
Text(title, style: Theme.of(context).textTheme.titleLarge),
|
||||||
|
const Gap(8),
|
||||||
|
Text(message),
|
||||||
|
const Gap(8),
|
||||||
|
],
|
||||||
|
),
|
||||||
actions: [
|
actions: [
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: () => close(null),
|
onPressed: () => close(null),
|
||||||
@@ -257,26 +322,61 @@ void showInfoAlert(String message, String title) {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<bool> showConfirmAlert(String message, String title) async {
|
Future<bool> showConfirmAlert(
|
||||||
|
String message,
|
||||||
|
String title, {
|
||||||
|
IconData? icon,
|
||||||
|
bool isDanger = false,
|
||||||
|
}) async {
|
||||||
final result = await showOverlayDialog<bool>(
|
final result = await showOverlayDialog<bool>(
|
||||||
builder:
|
builder:
|
||||||
(context, close) => AlertDialog(
|
(context, close) => ConstrainedBox(
|
||||||
title: Text(title),
|
constraints: const BoxConstraints(maxWidth: kDialogMaxWidth),
|
||||||
content: Text(message),
|
child: AlertDialog(
|
||||||
|
title: null,
|
||||||
|
titlePadding: EdgeInsets.zero,
|
||||||
|
contentPadding: const EdgeInsets.fromLTRB(24, 24, 24, 0),
|
||||||
|
content: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Icon(
|
||||||
|
icon ?? Symbols.help_rounded,
|
||||||
|
size: 48,
|
||||||
|
fill: 1,
|
||||||
|
color: Theme.of(context).colorScheme.primary,
|
||||||
|
),
|
||||||
|
const Gap(16),
|
||||||
|
Text(title, style: Theme.of(context).textTheme.titleLarge),
|
||||||
|
const Gap(8),
|
||||||
|
Text(message),
|
||||||
|
const Gap(8),
|
||||||
|
],
|
||||||
|
),
|
||||||
actions: [
|
actions: [
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: () => close(false),
|
onPressed: () => close(false),
|
||||||
child: Text(MaterialLocalizations.of(context).cancelButtonLabel),
|
child: Text(
|
||||||
|
MaterialLocalizations.of(context).cancelButtonLabel,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: () => close(true),
|
onPressed: () => close(true),
|
||||||
|
style:
|
||||||
|
isDanger
|
||||||
|
? TextButton.styleFrom(
|
||||||
|
foregroundColor: Theme.of(context).colorScheme.error,
|
||||||
|
)
|
||||||
|
: null,
|
||||||
child: Text(MaterialLocalizations.of(context).okButtonLabel),
|
child: Text(MaterialLocalizations.of(context).okButtonLabel),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
return result ?? false;
|
return result ?? false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import 'package:island/route.dart';
|
|||||||
import 'package:island/pods/userinfo.dart';
|
import 'package:island/pods/userinfo.dart';
|
||||||
import 'package:island/pods/websocket.dart';
|
import 'package:island/pods/websocket.dart';
|
||||||
import 'package:island/services/responsive.dart';
|
import 'package:island/services/responsive.dart';
|
||||||
|
import 'package:island/widgets/alert.dart';
|
||||||
import 'package:island/widgets/upload_overlay.dart';
|
import 'package:island/widgets/upload_overlay.dart';
|
||||||
import 'package:material_symbols_icons/material_symbols_icons.dart';
|
import 'package:material_symbols_icons/material_symbols_icons.dart';
|
||||||
import 'package:path_provider/path_provider.dart';
|
import 'package:path_provider/path_provider.dart';
|
||||||
@@ -364,6 +365,12 @@ class PopAction extends Action<PopIntent> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void invoke(PopIntent intent) {
|
void invoke(PopIntent intent) {
|
||||||
|
// First, try to close any overlay dialogs
|
||||||
|
if (closeTopmostOverlayDialog()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If no overlay to close, pop the route
|
||||||
if (ref.watch(routerProvider).canPop()) {
|
if (ref.watch(routerProvider).canPop()) {
|
||||||
ref.read(routerProvider).pop();
|
ref.read(routerProvider).pop();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,10 +5,13 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
import 'package:protocol_handler/protocol_handler.dart';
|
import 'package:protocol_handler/protocol_handler.dart';
|
||||||
import 'package:island/pods/activity/activity_rpc.dart';
|
import 'package:island/pods/activity/activity_rpc.dart';
|
||||||
|
import 'package:island/pods/config.dart';
|
||||||
|
import 'package:island/pods/network.dart';
|
||||||
import 'package:island/pods/websocket.dart';
|
import 'package:island/pods/websocket.dart';
|
||||||
import 'package:island/route.dart';
|
import 'package:island/route.dart';
|
||||||
|
import 'package:island/screens/auth/login_content.dart';
|
||||||
import 'package:island/screens/tray_manager.dart';
|
import 'package:island/screens/tray_manager.dart';
|
||||||
import 'package:island/services/event_bus.dart';
|
import 'package:island/pods/web_auth/web_auth_providers.dart';
|
||||||
import 'package:island/services/notify.dart';
|
import 'package:island/services/notify.dart';
|
||||||
import 'package:island/services/sharing_intent.dart';
|
import 'package:island/services/sharing_intent.dart';
|
||||||
import 'package:island/services/update_service.dart';
|
import 'package:island/services/update_service.dart';
|
||||||
@@ -44,6 +47,7 @@ class _AppWrapperState extends ConsumerState<AppWrapper>
|
|||||||
TrayService.instance.initialize(this);
|
TrayService.instance.initialize(this);
|
||||||
|
|
||||||
ref.read(rpcServerStateProvider.notifier).start();
|
ref.read(rpcServerStateProvider.notifier).start();
|
||||||
|
ref.read(webAuthServerStateProvider.notifier).start();
|
||||||
|
|
||||||
final initialUrl = await protocolHandler.getInitialUrl();
|
final initialUrl = await protocolHandler.getInitialUrl();
|
||||||
if (initialUrl != null && mounted) {
|
if (initialUrl != null && mounted) {
|
||||||
@@ -115,14 +119,20 @@ class _AppWrapperState extends ConsumerState<AppWrapper>
|
|||||||
TrayService.instance.handleAction(menuItem);
|
TrayService.instance.handleAction(menuItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _handleDeepLink(Uri uri, WidgetRef ref) {
|
void _handleDeepLink(Uri uri, WidgetRef ref) async {
|
||||||
String path = '/${uri.host}${uri.path}';
|
String path = '/${uri.host}${uri.path}';
|
||||||
|
|
||||||
// Special handling for OIDC auth callback
|
// Special handling for OIDC auth callback
|
||||||
if (path == '/auth/callback' &&
|
if (path == '/auth/callback' && uri.queryParameters.containsKey('token')) {
|
||||||
uri.queryParameters.containsKey('challenge')) {
|
final token = uri.queryParameters['token']!;
|
||||||
final challenge = uri.queryParameters['challenge']!;
|
setToken(ref.read(sharedPreferencesProvider), token);
|
||||||
eventBus.fire(OidcAuthCallbackEvent(challenge));
|
ref.invalidate(tokenProvider);
|
||||||
|
|
||||||
|
// Do post login tasks
|
||||||
|
if (mounted) {
|
||||||
|
await performPostLogin(context, ref);
|
||||||
|
}
|
||||||
|
|
||||||
if (!kIsWeb &&
|
if (!kIsWeb &&
|
||||||
(Platform.isWindows || Platform.isLinux || Platform.isMacOS)) {
|
(Platform.isWindows || Platform.isLinux || Platform.isMacOS)) {
|
||||||
windowManager.show();
|
windowManager.show();
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import "package:island/models/wallet.dart";
|
|||||||
import "package:island/models/realm.dart";
|
import "package:island/models/realm.dart";
|
||||||
import "package:island/models/sticker.dart";
|
import "package:island/models/sticker.dart";
|
||||||
import "package:island/pods/config.dart";
|
import "package:island/pods/config.dart";
|
||||||
|
import "package:island/pods/userinfo.dart";
|
||||||
import "package:island/services/autocomplete_service.dart";
|
import "package:island/services/autocomplete_service.dart";
|
||||||
import "package:island/services/responsive.dart";
|
import "package:island/services/responsive.dart";
|
||||||
import "package:island/widgets/content/attachment_preview.dart";
|
import "package:island/widgets/content/attachment_preview.dart";
|
||||||
@@ -344,6 +345,14 @@ class ChatInput extends HookConsumerWidget {
|
|||||||
final double rightMargin = isWideScreen(context) ? leftMargin + 8 : 16;
|
final double rightMargin = isWideScreen(context) ? leftMargin + 8 : 16;
|
||||||
const double bottomMargin = 16;
|
const double bottomMargin = 16;
|
||||||
|
|
||||||
|
final userInfo = ref.watch(userInfoProvider);
|
||||||
|
|
||||||
|
List<SnChatMember> getValidMembers(List<SnChatMember> members) {
|
||||||
|
return members
|
||||||
|
.where((member) => member.accountId != userInfo.value?.id)
|
||||||
|
.toList();
|
||||||
|
}
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
margin: EdgeInsets.only(
|
margin: EdgeInsets.only(
|
||||||
left: leftMargin,
|
left: leftMargin,
|
||||||
@@ -878,9 +887,9 @@ class ChatInput extends HookConsumerWidget {
|
|||||||
(chatRoom.type == 1 && chatRoom.name == null)
|
(chatRoom.type == 1 && chatRoom.name == null)
|
||||||
? 'chatDirectMessageHint'.tr(
|
? 'chatDirectMessageHint'.tr(
|
||||||
args: [
|
args: [
|
||||||
chatRoom.members!
|
getValidMembers(
|
||||||
.map((e) => e.account.nick)
|
chatRoom.members!,
|
||||||
.join(', '),
|
).map((e) => e.account.nick).join(', '),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
: 'chatMessageHint'.tr(
|
: 'chatMessageHint'.tr(
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import 'package:flutter_hooks/flutter_hooks.dart';
|
|||||||
import 'package:gap/gap.dart';
|
import 'package:gap/gap.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:island/database/message.dart';
|
import 'package:island/database/message.dart';
|
||||||
import 'package:island/pods/chat/chat_rooms.dart';
|
import 'package:island/pods/chat/chat_room.dart';
|
||||||
import 'package:island/pods/chat/messages_notifier.dart';
|
import 'package:island/pods/chat/messages_notifier.dart';
|
||||||
import 'package:island/pods/translate.dart';
|
import 'package:island/pods/translate.dart';
|
||||||
import 'package:island/pods/config.dart';
|
import 'package:island/pods/config.dart';
|
||||||
@@ -596,6 +596,7 @@ class MessageHoverActionMenu extends StatelessWidget {
|
|||||||
final confirmed = await showConfirmAlert(
|
final confirmed = await showConfirmAlert(
|
||||||
'deleteMessageConfirmation'.tr(),
|
'deleteMessageConfirmation'.tr(),
|
||||||
'deleteMessage'.tr(),
|
'deleteMessage'.tr(),
|
||||||
|
isDanger: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (confirmed) {
|
if (confirmed) {
|
||||||
|
|||||||
@@ -115,26 +115,10 @@ class MessageSenderInfo extends StatelessWidget {
|
|||||||
spacing: 2,
|
spacing: 2,
|
||||||
children: [
|
children: [
|
||||||
Text(timestamp, style: TextStyle(fontSize: 10, color: textColor)),
|
Text(timestamp, style: TextStyle(fontSize: 10, color: textColor)),
|
||||||
Row(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
spacing: 5,
|
|
||||||
children: [
|
|
||||||
AccountName(
|
AccountName(
|
||||||
account: sender.account,
|
account: sender.account,
|
||||||
style: Theme.of(context).textTheme.bodySmall,
|
style: Theme.of(context).textTheme.bodySmall,
|
||||||
),
|
),
|
||||||
Badge(
|
|
||||||
label:
|
|
||||||
Text(
|
|
||||||
sender.role >= 100
|
|
||||||
? 'permissionOwner'
|
|
||||||
: sender.role >= 50
|
|
||||||
? 'permissionModerator'
|
|
||||||
: 'permissionMember',
|
|
||||||
).tr(),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import "package:gap/gap.dart";
|
|||||||
import "package:hooks_riverpod/hooks_riverpod.dart";
|
import "package:hooks_riverpod/hooks_riverpod.dart";
|
||||||
import "package:island/database/message.dart";
|
import "package:island/database/message.dart";
|
||||||
import "package:island/models/chat.dart";
|
import "package:island/models/chat.dart";
|
||||||
|
import "package:island/pods/chat/chat_room.dart";
|
||||||
import "package:island/pods/chat/messages_notifier.dart";
|
import "package:island/pods/chat/messages_notifier.dart";
|
||||||
import "package:island/pods/network.dart";
|
import "package:island/pods/network.dart";
|
||||||
import "package:island/services/responsive.dart";
|
import "package:island/services/responsive.dart";
|
||||||
@@ -19,8 +20,6 @@ import "package:styled_widget/styled_widget.dart";
|
|||||||
import "package:super_sliver_list/super_sliver_list.dart";
|
import "package:super_sliver_list/super_sliver_list.dart";
|
||||||
import "package:material_symbols_icons/symbols.dart";
|
import "package:material_symbols_icons/symbols.dart";
|
||||||
|
|
||||||
import "package:island/screens/chat/chat.dart";
|
|
||||||
|
|
||||||
class PublicRoomPreview extends HookConsumerWidget {
|
class PublicRoomPreview extends HookConsumerWidget {
|
||||||
final String id;
|
final String id;
|
||||||
final SnChatRoom room;
|
final SnChatRoom room;
|
||||||
@@ -205,7 +204,7 @@ class PublicRoomPreview extends HookConsumerWidget {
|
|||||||
showLoadingModal(context);
|
showLoadingModal(context);
|
||||||
final apiClient = ref.read(apiClientProvider);
|
final apiClient = ref.read(apiClientProvider);
|
||||||
await apiClient.post('/sphere/chat/${room.id}/members/me');
|
await apiClient.post('/sphere/chat/${room.id}/members/me');
|
||||||
ref.invalidate(chatroomIdentityProvider(id));
|
ref.invalidate(ChatRoomIdentityNotifierProvider(id));
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
showErrorAlert(err);
|
showErrorAlert(err);
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import 'package:collection/collection.dart';
|
import 'package:collection/collection.dart';
|
||||||
|
import 'package:dismissible_page/dismissible_page.dart';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
@@ -14,12 +15,14 @@ import 'package:island/screens/account/profile.dart';
|
|||||||
import 'package:island/screens/creators/publishers_form.dart';
|
import 'package:island/screens/creators/publishers_form.dart';
|
||||||
import 'package:island/widgets/alert.dart';
|
import 'package:island/widgets/alert.dart';
|
||||||
import 'package:island/widgets/content/cloud_files.dart';
|
import 'package:island/widgets/content/cloud_files.dart';
|
||||||
|
import 'package:island/widgets/content/cloud_file_lightbox.dart';
|
||||||
import 'package:island/widgets/content/markdown_latex.dart';
|
import 'package:island/widgets/content/markdown_latex.dart';
|
||||||
import 'package:markdown/markdown.dart' as markdown;
|
import 'package:markdown/markdown.dart' as markdown;
|
||||||
import 'package:markdown_widget/markdown_widget.dart';
|
import 'package:markdown_widget/markdown_widget.dart';
|
||||||
import 'package:material_symbols_icons/symbols.dart';
|
import 'package:material_symbols_icons/symbols.dart';
|
||||||
import 'package:styled_widget/styled_widget.dart';
|
import 'package:styled_widget/styled_widget.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
import 'package:uuid/uuid.dart';
|
||||||
|
|
||||||
import 'image.dart';
|
import 'image.dart';
|
||||||
|
|
||||||
@@ -185,20 +188,34 @@ class MarkdownTextContent extends HookConsumerWidget {
|
|||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
}
|
}
|
||||||
|
|
||||||
return ClipRRect(
|
final heroTag = 'cloud-file-markdown#${const Uuid().v4()}';
|
||||||
|
return InkWell(
|
||||||
|
onTap: () {
|
||||||
|
context.pushTransparentRoute(
|
||||||
|
CloudFileLightbox(item: file, heroTag: heroTag),
|
||||||
|
rootNavigator: true,
|
||||||
|
);
|
||||||
|
},
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(8)),
|
borderRadius: const BorderRadius.all(Radius.circular(8)),
|
||||||
|
child: ClipRRect(
|
||||||
|
borderRadius: const BorderRadius.all(
|
||||||
|
Radius.circular(8),
|
||||||
|
),
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Theme.of(context).colorScheme.surfaceContainer,
|
color:
|
||||||
|
Theme.of(context).colorScheme.surfaceContainer,
|
||||||
borderRadius: const BorderRadius.all(
|
borderRadius: const BorderRadius.all(
|
||||||
Radius.circular(8),
|
Radius.circular(8),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: CloudFileWidget(
|
child: CloudFileWidget(
|
||||||
item: file,
|
item: file,
|
||||||
|
heroTag: heroTag,
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
).clipRRect(all: 8),
|
).clipRRect(all: 8),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ class NetworkStatusSheet extends HookConsumerWidget {
|
|||||||
final wsState = ref.watch(websocketStateProvider);
|
final wsState = ref.watch(websocketStateProvider);
|
||||||
|
|
||||||
return SheetScaffold(
|
return SheetScaffold(
|
||||||
|
heightFactor: 0.4,
|
||||||
titleText:
|
titleText:
|
||||||
wsState == WebSocketState.connected()
|
wsState == WebSocketState.connected()
|
||||||
? 'Connection Status'
|
? 'Connection Status'
|
||||||
|
|||||||
@@ -22,9 +22,9 @@ import 'package:island/utils/format.dart';
|
|||||||
import 'package:island/utils/text.dart';
|
import 'package:island/utils/text.dart';
|
||||||
import 'package:island/widgets/alert.dart';
|
import 'package:island/widgets/alert.dart';
|
||||||
import 'package:island/widgets/content/cloud_files.dart';
|
import 'package:island/widgets/content/cloud_files.dart';
|
||||||
|
import 'package:island/widgets/paging/pagination_list.dart';
|
||||||
import 'package:syncfusion_flutter_pdfviewer/pdfviewer.dart';
|
import 'package:syncfusion_flutter_pdfviewer/pdfviewer.dart';
|
||||||
import 'package:material_symbols_icons/symbols.dart';
|
import 'package:material_symbols_icons/symbols.dart';
|
||||||
import 'package:riverpod_paging_utils/riverpod_paging_utils.dart';
|
|
||||||
import 'package:styled_widget/styled_widget.dart';
|
import 'package:styled_widget/styled_widget.dart';
|
||||||
|
|
||||||
enum FileListMode { normal, unindexed }
|
enum FileListMode { normal, unindexed }
|
||||||
@@ -59,7 +59,9 @@ class FileListView extends HookConsumerWidget {
|
|||||||
|
|
||||||
useEffect(() {
|
useEffect(() {
|
||||||
if (mode.value == FileListMode.normal) {
|
if (mode.value == FileListMode.normal) {
|
||||||
final notifier = ref.read(cloudFileListNotifierProvider.notifier);
|
final notifier = ref.read(
|
||||||
|
indexedCloudFileListNotifierProvider.notifier,
|
||||||
|
);
|
||||||
notifier.setPath(currentPath.value);
|
notifier.setPath(currentPath.value);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
@@ -70,7 +72,9 @@ class FileListView extends HookConsumerWidget {
|
|||||||
final unindexedNotifier = ref.read(
|
final unindexedNotifier = ref.read(
|
||||||
unindexedFileListNotifierProvider.notifier,
|
unindexedFileListNotifierProvider.notifier,
|
||||||
);
|
);
|
||||||
final cloudNotifier = ref.read(cloudFileListNotifierProvider.notifier);
|
final cloudNotifier = ref.read(
|
||||||
|
indexedCloudFileListNotifierProvider.notifier,
|
||||||
|
);
|
||||||
final recycled = useState<bool>(false);
|
final recycled = useState<bool>(false);
|
||||||
final poolsAsync = ref.watch(poolsProvider);
|
final poolsAsync = ref.watch(poolsProvider);
|
||||||
final isSelectionMode = useState<bool>(false);
|
final isSelectionMode = useState<bool>(false);
|
||||||
@@ -115,49 +119,50 @@ class FileListView extends HookConsumerWidget {
|
|||||||
|
|
||||||
final isRefreshing = ref.watch(
|
final isRefreshing = ref.watch(
|
||||||
mode.value == FileListMode.normal
|
mode.value == FileListMode.normal
|
||||||
? cloudFileListNotifierProvider.select((value) => value.isLoading)
|
? indexedCloudFileListNotifierProvider.select(
|
||||||
|
(value) => value.isLoading,
|
||||||
|
)
|
||||||
: unindexedFileListNotifierProvider.select(
|
: unindexedFileListNotifierProvider.select(
|
||||||
(value) => value.isLoading,
|
(value) => value.isLoading,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final bodyWidget = switch (mode.value) {
|
final bodyWidget = switch (mode.value) {
|
||||||
FileListMode.unindexed => PagingHelperSliverView(
|
FileListMode.unindexed => PaginationWidget(
|
||||||
provider: unindexedFileListNotifierProvider,
|
provider: unindexedFileListNotifierProvider,
|
||||||
futureRefreshable: unindexedFileListNotifierProvider.future,
|
notifier: unindexedFileListNotifierProvider.notifier,
|
||||||
notifierRefreshable: unindexedFileListNotifierProvider.notifier,
|
isRefreshable: false,
|
||||||
|
isSliver: true,
|
||||||
contentBuilder:
|
contentBuilder:
|
||||||
(data, widgetCount, endItemView) =>
|
(data, footer) =>
|
||||||
data.items.isEmpty
|
data.isEmpty
|
||||||
? SliverToBoxAdapter(
|
? SliverToBoxAdapter(
|
||||||
child: _buildEmptyUnindexedFilesHint(ref),
|
child: _buildEmptyUnindexedFilesHint(ref),
|
||||||
)
|
)
|
||||||
: _buildUnindexedFileListContent(
|
: _buildUnindexedFileListContent(
|
||||||
data.items,
|
data,
|
||||||
widgetCount,
|
|
||||||
endItemView,
|
|
||||||
ref,
|
ref,
|
||||||
context,
|
context,
|
||||||
viewMode,
|
viewMode,
|
||||||
isSelectionMode,
|
isSelectionMode,
|
||||||
selectedFileIds,
|
selectedFileIds,
|
||||||
currentVisibleItems,
|
currentVisibleItems,
|
||||||
|
footer,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
_ => PagingHelperSliverView(
|
_ => PaginationWidget(
|
||||||
provider: cloudFileListNotifierProvider,
|
provider: indexedCloudFileListNotifierProvider,
|
||||||
futureRefreshable: cloudFileListNotifierProvider.future,
|
notifier: indexedCloudFileListNotifierProvider.notifier,
|
||||||
notifierRefreshable: cloudFileListNotifierProvider.notifier,
|
isRefreshable: false,
|
||||||
|
isSliver: true,
|
||||||
contentBuilder:
|
contentBuilder:
|
||||||
(data, widgetCount, endItemView) =>
|
(data, footer) =>
|
||||||
data.items.isEmpty
|
data.isEmpty
|
||||||
? SliverToBoxAdapter(
|
? SliverToBoxAdapter(
|
||||||
child: _buildEmptyDirectoryHint(ref, currentPath),
|
child: _buildEmptyDirectoryHint(ref, currentPath),
|
||||||
)
|
)
|
||||||
: _buildFileListContent(
|
: _buildFileListContent(
|
||||||
data.items,
|
data,
|
||||||
widgetCount,
|
|
||||||
endItemView,
|
|
||||||
ref,
|
ref,
|
||||||
context,
|
context,
|
||||||
currentPath,
|
currentPath,
|
||||||
@@ -165,6 +170,7 @@ class FileListView extends HookConsumerWidget {
|
|||||||
isSelectionMode,
|
isSelectionMode,
|
||||||
selectedFileIds,
|
selectedFileIds,
|
||||||
currentVisibleItems,
|
currentVisibleItems,
|
||||||
|
footer,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
@@ -255,7 +261,7 @@ class FileListView extends HookConsumerWidget {
|
|||||||
completer.future
|
completer.future
|
||||||
.then((uploadedFile) {
|
.then((uploadedFile) {
|
||||||
if (uploadedFile != null) {
|
if (uploadedFile != null) {
|
||||||
ref.invalidate(cloudFileListNotifierProvider);
|
ref.invalidate(indexedCloudFileListNotifierProvider);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catchError((error) {
|
.catchError((error) {
|
||||||
@@ -512,6 +518,7 @@ class FileListView extends HookConsumerWidget {
|
|||||||
final confirmed = await showConfirmAlert(
|
final confirmed = await showConfirmAlert(
|
||||||
'Are you sure you want to delete the selected files?',
|
'Are you sure you want to delete the selected files?',
|
||||||
'Delete Selected Files',
|
'Delete Selected Files',
|
||||||
|
isDanger: true,
|
||||||
);
|
);
|
||||||
if (!confirmed) return;
|
if (!confirmed) return;
|
||||||
if (context.mounted) {
|
if (context.mounted) {
|
||||||
@@ -531,7 +538,7 @@ class FileListView extends HookConsumerWidget {
|
|||||||
isSelectionMode.value = false;
|
isSelectionMode.value = false;
|
||||||
ref.invalidate(
|
ref.invalidate(
|
||||||
mode.value == FileListMode.normal
|
mode.value == FileListMode.normal
|
||||||
? cloudFileListNotifierProvider
|
? indexedCloudFileListNotifierProvider
|
||||||
: unindexedFileListNotifierProvider,
|
: unindexedFileListNotifierProvider,
|
||||||
);
|
);
|
||||||
showSnackBar('Deleted $count files.');
|
showSnackBar('Deleted $count files.');
|
||||||
@@ -559,8 +566,6 @@ class FileListView extends HookConsumerWidget {
|
|||||||
|
|
||||||
Widget _buildFileListContent(
|
Widget _buildFileListContent(
|
||||||
List<FileListItem> items,
|
List<FileListItem> items,
|
||||||
int widgetCount,
|
|
||||||
Widget endItemView,
|
|
||||||
WidgetRef ref,
|
WidgetRef ref,
|
||||||
BuildContext context,
|
BuildContext context,
|
||||||
ValueNotifier<String> currentPath,
|
ValueNotifier<String> currentPath,
|
||||||
@@ -568,6 +573,7 @@ class FileListView extends HookConsumerWidget {
|
|||||||
ValueNotifier<bool> isSelectionMode,
|
ValueNotifier<bool> isSelectionMode,
|
||||||
ValueNotifier<Set<String>> selectedFileIds,
|
ValueNotifier<Set<String>> selectedFileIds,
|
||||||
ValueNotifier<List<FileListItem>> currentVisibleItems,
|
ValueNotifier<List<FileListItem>> currentVisibleItems,
|
||||||
|
Widget footer,
|
||||||
) {
|
) {
|
||||||
currentVisibleItems.value = items;
|
currentVisibleItems.value = items;
|
||||||
return switch (currentViewMode.value) {
|
return switch (currentViewMode.value) {
|
||||||
@@ -579,11 +585,10 @@ class FileListView extends HookConsumerWidget {
|
|||||||
crossAxisSpacing: 8,
|
crossAxisSpacing: 8,
|
||||||
mainAxisSpacing: 8,
|
mainAxisSpacing: 8,
|
||||||
delegate: SliverChildBuilderDelegate((context, index) {
|
delegate: SliverChildBuilderDelegate((context, index) {
|
||||||
if (index == widgetCount - 1) {
|
if (index == items.length) {
|
||||||
return endItemView;
|
return footer;
|
||||||
}
|
}
|
||||||
|
if (index > items.length) {
|
||||||
if (index >= items.length) {
|
|
||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -614,16 +619,15 @@ class FileListView extends HookConsumerWidget {
|
|||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}, childCount: widgetCount),
|
}, childCount: items.length + 1),
|
||||||
),
|
),
|
||||||
// ListView mode
|
// ListView mode
|
||||||
_ => SliverList.builder(
|
_ => SliverList.builder(
|
||||||
itemCount: widgetCount,
|
itemCount: items.length + 1,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
if (index == widgetCount - 1) {
|
if (index == items.length) {
|
||||||
return endItemView;
|
return footer;
|
||||||
}
|
}
|
||||||
|
|
||||||
final item = items[index];
|
final item = items[index];
|
||||||
return item.map(
|
return item.map(
|
||||||
file:
|
file:
|
||||||
@@ -742,7 +746,9 @@ class FileListView extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
const Gap(16),
|
const Gap(16),
|
||||||
Row(
|
SingleChildScrollView(
|
||||||
|
scrollDirection: Axis.horizontal,
|
||||||
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
ElevatedButton.icon(
|
ElevatedButton.icon(
|
||||||
@@ -759,6 +765,7 @@ class FileListView extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -785,6 +792,7 @@ class FileListView extends HookConsumerWidget {
|
|||||||
final confirmed = await showConfirmAlert(
|
final confirmed = await showConfirmAlert(
|
||||||
'confirmDeleteFile'.tr(),
|
'confirmDeleteFile'.tr(),
|
||||||
'deleteFile'.tr(),
|
'deleteFile'.tr(),
|
||||||
|
isDanger: true,
|
||||||
);
|
);
|
||||||
if (!confirmed) return;
|
if (!confirmed) return;
|
||||||
|
|
||||||
@@ -796,7 +804,7 @@ class FileListView extends HookConsumerWidget {
|
|||||||
await client.delete(
|
await client.delete(
|
||||||
'/drive/index/remove/${fileItem.fileIndex.id}',
|
'/drive/index/remove/${fileItem.fileIndex.id}',
|
||||||
);
|
);
|
||||||
ref.invalidate(cloudFileListNotifierProvider);
|
ref.invalidate(indexedCloudFileListNotifierProvider);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
showSnackBar('failedToDeleteFile'.tr());
|
showSnackBar('failedToDeleteFile'.tr());
|
||||||
} finally {
|
} finally {
|
||||||
@@ -1005,14 +1013,13 @@ class FileListView extends HookConsumerWidget {
|
|||||||
|
|
||||||
Widget _buildUnindexedFileListContent(
|
Widget _buildUnindexedFileListContent(
|
||||||
List<FileListItem> items,
|
List<FileListItem> items,
|
||||||
int widgetCount,
|
|
||||||
Widget endItemView,
|
|
||||||
WidgetRef ref,
|
WidgetRef ref,
|
||||||
BuildContext context,
|
BuildContext context,
|
||||||
ValueNotifier<FileListViewMode> currentViewMode,
|
ValueNotifier<FileListViewMode> currentViewMode,
|
||||||
ValueNotifier<bool> isSelectionMode,
|
ValueNotifier<bool> isSelectionMode,
|
||||||
ValueNotifier<Set<String>> selectedFileIds,
|
ValueNotifier<Set<String>> selectedFileIds,
|
||||||
ValueNotifier<List<FileListItem>> currentVisibleItems,
|
ValueNotifier<List<FileListItem>> currentVisibleItems,
|
||||||
|
Widget footer,
|
||||||
) {
|
) {
|
||||||
currentVisibleItems.value = items;
|
currentVisibleItems.value = items;
|
||||||
return switch (currentViewMode.value) {
|
return switch (currentViewMode.value) {
|
||||||
@@ -1024,11 +1031,10 @@ class FileListView extends HookConsumerWidget {
|
|||||||
crossAxisSpacing: 12,
|
crossAxisSpacing: 12,
|
||||||
mainAxisSpacing: 12,
|
mainAxisSpacing: 12,
|
||||||
delegate: SliverChildBuilderDelegate((context, index) {
|
delegate: SliverChildBuilderDelegate((context, index) {
|
||||||
if (index == widgetCount - 1) {
|
if (index == items.length) {
|
||||||
return endItemView;
|
return footer;
|
||||||
}
|
}
|
||||||
|
if (index > items.length) {
|
||||||
if (index >= items.length) {
|
|
||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1062,16 +1068,15 @@ class FileListView extends HookConsumerWidget {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}, childCount: widgetCount),
|
}, childCount: items.length + 1),
|
||||||
),
|
),
|
||||||
// ListView mode
|
// ListView mode
|
||||||
_ => SliverList.builder(
|
_ => SliverList.builder(
|
||||||
itemCount: widgetCount,
|
itemCount: items.length + 1,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
if (index == widgetCount - 1) {
|
if (index == items.length) {
|
||||||
return endItemView;
|
return footer;
|
||||||
}
|
}
|
||||||
|
|
||||||
final item = items[index];
|
final item = items[index];
|
||||||
return item.map(
|
return item.map(
|
||||||
file: (fileItem) {
|
file: (fileItem) {
|
||||||
@@ -1153,6 +1158,7 @@ class FileListView extends HookConsumerWidget {
|
|||||||
final confirmed = await showConfirmAlert(
|
final confirmed = await showConfirmAlert(
|
||||||
'confirmDeleteFile'.tr(),
|
'confirmDeleteFile'.tr(),
|
||||||
'deleteFile'.tr(),
|
'deleteFile'.tr(),
|
||||||
|
isDanger: true,
|
||||||
);
|
);
|
||||||
if (!confirmed) return;
|
if (!confirmed) return;
|
||||||
|
|
||||||
@@ -1162,7 +1168,7 @@ class FileListView extends HookConsumerWidget {
|
|||||||
try {
|
try {
|
||||||
final client = ref.read(apiClientProvider);
|
final client = ref.read(apiClientProvider);
|
||||||
await client.delete('/drive/index/remove/${fileItem.fileIndex.id}');
|
await client.delete('/drive/index/remove/${fileItem.fileIndex.id}');
|
||||||
ref.invalidate(cloudFileListNotifierProvider);
|
ref.invalidate(indexedCloudFileListNotifierProvider);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
showSnackBar('failedToDeleteFile'.tr());
|
showSnackBar('failedToDeleteFile'.tr());
|
||||||
} finally {
|
} finally {
|
||||||
@@ -1221,6 +1227,7 @@ class FileListView extends HookConsumerWidget {
|
|||||||
final confirmed = await showConfirmAlert(
|
final confirmed = await showConfirmAlert(
|
||||||
'confirmDeleteFile'.tr(),
|
'confirmDeleteFile'.tr(),
|
||||||
'deleteFile'.tr(),
|
'deleteFile'.tr(),
|
||||||
|
isDanger: true,
|
||||||
);
|
);
|
||||||
if (!confirmed) return;
|
if (!confirmed) return;
|
||||||
|
|
||||||
@@ -1263,6 +1270,7 @@ class FileListView extends HookConsumerWidget {
|
|||||||
final confirmed = await showConfirmAlert(
|
final confirmed = await showConfirmAlert(
|
||||||
'confirmDeleteFile'.tr(),
|
'confirmDeleteFile'.tr(),
|
||||||
'deleteFile'.tr(),
|
'deleteFile'.tr(),
|
||||||
|
isDanger: true,
|
||||||
);
|
);
|
||||||
if (!confirmed) return;
|
if (!confirmed) return;
|
||||||
|
|
||||||
|
|||||||
167
lib/widgets/paging/pagination_list.dart
Normal file
167
lib/widgets/paging/pagination_list.dart
Normal file
@@ -0,0 +1,167 @@
|
|||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
|
import 'package:island/pods/paging.dart';
|
||||||
|
|
||||||
|
import 'package:island/widgets/extended_refresh_indicator.dart';
|
||||||
|
import 'package:island/widgets/response.dart';
|
||||||
|
import 'package:material_symbols_icons/material_symbols_icons.dart';
|
||||||
|
import 'package:styled_widget/styled_widget.dart';
|
||||||
|
import 'package:super_sliver_list/super_sliver_list.dart';
|
||||||
|
import 'package:visibility_detector/visibility_detector.dart';
|
||||||
|
|
||||||
|
class PaginationList<T> extends HookConsumerWidget {
|
||||||
|
final ProviderListenable<AsyncValue<List<T>>> provider;
|
||||||
|
final Refreshable<PaginationController<T>> notifier;
|
||||||
|
final Widget? Function(BuildContext, int, T) itemBuilder;
|
||||||
|
final bool isRefreshable;
|
||||||
|
final bool isSliver;
|
||||||
|
final bool showDefaultWidgets;
|
||||||
|
final EdgeInsets? padding;
|
||||||
|
const PaginationList({
|
||||||
|
super.key,
|
||||||
|
required this.provider,
|
||||||
|
required this.notifier,
|
||||||
|
required this.itemBuilder,
|
||||||
|
this.isRefreshable = true,
|
||||||
|
this.isSliver = false,
|
||||||
|
this.showDefaultWidgets = true,
|
||||||
|
this.padding,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
|
final data = ref.watch(provider);
|
||||||
|
final noti = ref.watch(notifier);
|
||||||
|
|
||||||
|
if (data.isLoading && data.valueOrNull?.isEmpty == true) {
|
||||||
|
final content = ResponseLoadingWidget();
|
||||||
|
return isSliver ? SliverFillRemaining(child: content) : content;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data.hasError) {
|
||||||
|
final content = ResponseErrorWidget(
|
||||||
|
error: data.error,
|
||||||
|
onRetry: noti.refresh,
|
||||||
|
);
|
||||||
|
return isSliver ? SliverFillRemaining(child: content) : content;
|
||||||
|
}
|
||||||
|
|
||||||
|
final listView =
|
||||||
|
isSliver
|
||||||
|
? SuperSliverList.builder(
|
||||||
|
itemCount: (data.valueOrNull?.length ?? 0) + 1,
|
||||||
|
itemBuilder: (context, idx) {
|
||||||
|
if (idx == data.valueOrNull?.length) {
|
||||||
|
return PaginationListFooter(noti: noti, data: data);
|
||||||
|
}
|
||||||
|
final entry = data.valueOrNull?[idx];
|
||||||
|
if (entry != null) return itemBuilder(context, idx, entry);
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
)
|
||||||
|
: SuperListView.builder(
|
||||||
|
padding: padding,
|
||||||
|
itemCount: (data.valueOrNull?.length ?? 0) + 1,
|
||||||
|
itemBuilder: (context, idx) {
|
||||||
|
if (idx == data.valueOrNull?.length) {
|
||||||
|
return PaginationListFooter(noti: noti, data: data);
|
||||||
|
}
|
||||||
|
final entry = data.valueOrNull?[idx];
|
||||||
|
if (entry != null) return itemBuilder(context, idx, entry);
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
return isRefreshable
|
||||||
|
? ExtendedRefreshIndicator(onRefresh: noti.refresh, child: listView)
|
||||||
|
: listView;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class PaginationWidget<T> extends HookConsumerWidget {
|
||||||
|
final ProviderListenable<AsyncValue<List<T>>> provider;
|
||||||
|
final Refreshable<PaginationController<T>> notifier;
|
||||||
|
final Widget Function(List<T>, Widget) contentBuilder;
|
||||||
|
final bool isRefreshable;
|
||||||
|
final bool isSliver;
|
||||||
|
final bool showDefaultWidgets;
|
||||||
|
const PaginationWidget({
|
||||||
|
super.key,
|
||||||
|
required this.provider,
|
||||||
|
required this.notifier,
|
||||||
|
required this.contentBuilder,
|
||||||
|
this.isRefreshable = true,
|
||||||
|
this.isSliver = false,
|
||||||
|
this.showDefaultWidgets = true,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
|
final data = ref.watch(provider);
|
||||||
|
final noti = ref.watch(notifier);
|
||||||
|
|
||||||
|
if (data.isLoading && data.valueOrNull?.isEmpty == true) {
|
||||||
|
final content = ResponseLoadingWidget();
|
||||||
|
return isSliver ? SliverFillRemaining(child: content) : content;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data.hasError) {
|
||||||
|
final content = ResponseErrorWidget(
|
||||||
|
error: data.error,
|
||||||
|
onRetry: noti.refresh,
|
||||||
|
);
|
||||||
|
return isSliver ? SliverFillRemaining(child: content) : content;
|
||||||
|
}
|
||||||
|
|
||||||
|
final footer = PaginationListFooter(noti: noti, data: data);
|
||||||
|
final content = contentBuilder(data.valueOrNull ?? [], footer);
|
||||||
|
|
||||||
|
return isRefreshable
|
||||||
|
? ExtendedRefreshIndicator(onRefresh: noti.refresh, child: content)
|
||||||
|
: content;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class PaginationListFooter<T> extends StatelessWidget {
|
||||||
|
final PaginationController<T> noti;
|
||||||
|
final AsyncValue<List<T>> data;
|
||||||
|
final bool isSliver;
|
||||||
|
|
||||||
|
const PaginationListFooter({
|
||||||
|
super.key,
|
||||||
|
required this.noti,
|
||||||
|
required this.data,
|
||||||
|
this.isSliver = false,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final child = SizedBox(
|
||||||
|
height: 64,
|
||||||
|
child: Center(
|
||||||
|
child:
|
||||||
|
data.isLoading
|
||||||
|
? CircularProgressIndicator()
|
||||||
|
: Row(
|
||||||
|
spacing: 8,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
const Icon(Symbols.close, size: 16),
|
||||||
|
Text('noFurtherData').tr().fontSize(13),
|
||||||
|
],
|
||||||
|
).opacity(0.9),
|
||||||
|
).padding(all: 8),
|
||||||
|
);
|
||||||
|
|
||||||
|
return VisibilityDetector(
|
||||||
|
key: Key("pagination-list-${noti.hashCode}"),
|
||||||
|
onVisibilityChanged: (VisibilityInfo info) {
|
||||||
|
if (!noti.fetchedAll && !data.isLoading && !data.hasError) {
|
||||||
|
noti.fetchFurther();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: isSliver ? SliverToBoxAdapter(child: child) : child,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,6 +5,7 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|||||||
import 'package:island/models/file.dart';
|
import 'package:island/models/file.dart';
|
||||||
import 'package:island/models/post.dart';
|
import 'package:island/models/post.dart';
|
||||||
import 'package:island/screens/posts/compose.dart';
|
import 'package:island/screens/posts/compose.dart';
|
||||||
|
import 'package:island/screens/posts/post_detail.dart';
|
||||||
import 'package:island/services/compose_storage_db.dart';
|
import 'package:island/services/compose_storage_db.dart';
|
||||||
import 'package:island/widgets/content/sheet.dart';
|
import 'package:island/widgets/content/sheet.dart';
|
||||||
import 'package:island/widgets/post/compose_card.dart';
|
import 'package:island/widgets/post/compose_card.dart';
|
||||||
@@ -50,19 +51,33 @@ class PostComposeSheet extends HookConsumerWidget {
|
|||||||
final restoredInitialState = useState<PostComposeInitialState?>(null);
|
final restoredInitialState = useState<PostComposeInitialState?>(null);
|
||||||
final prompted = useState(false);
|
final prompted = useState(false);
|
||||||
|
|
||||||
final repliedPost = initialState?.replyingTo ?? originalPost?.repliedPost;
|
// Fetch full post data if we're editing a post
|
||||||
|
final fullPostData =
|
||||||
|
originalPost != null
|
||||||
|
? ref.watch(postProvider(originalPost!.id))
|
||||||
|
: const AsyncValue.data(null);
|
||||||
|
|
||||||
|
// Use the full post data if available, otherwise fall back to originalPost
|
||||||
|
final effectiveOriginalPost = fullPostData.when(
|
||||||
|
data: (fullPost) => fullPost ?? originalPost,
|
||||||
|
loading: () => originalPost,
|
||||||
|
error: (_, _) => originalPost,
|
||||||
|
);
|
||||||
|
|
||||||
|
final repliedPost =
|
||||||
|
initialState?.replyingTo ?? effectiveOriginalPost?.repliedPost;
|
||||||
final forwardedPost =
|
final forwardedPost =
|
||||||
initialState?.forwardingTo ?? originalPost?.forwardedPost;
|
initialState?.forwardingTo ?? effectiveOriginalPost?.forwardedPost;
|
||||||
|
|
||||||
// Create compose state
|
// Create compose state
|
||||||
final ComposeState state = useMemoized(
|
final ComposeState state = useMemoized(
|
||||||
() => ComposeLogic.createState(
|
() => ComposeLogic.createState(
|
||||||
originalPost: originalPost,
|
originalPost: effectiveOriginalPost,
|
||||||
forwardedPost: forwardedPost,
|
forwardedPost: forwardedPost,
|
||||||
repliedPost: repliedPost,
|
repliedPost: repliedPost,
|
||||||
postType: 0,
|
postType: 0,
|
||||||
),
|
),
|
||||||
[originalPost, forwardedPost, repliedPost],
|
[effectiveOriginalPost, forwardedPost, repliedPost],
|
||||||
);
|
);
|
||||||
|
|
||||||
// Add a listener to the entire state to trigger rebuilds
|
// Add a listener to the entire state to trigger rebuilds
|
||||||
@@ -112,7 +127,7 @@ class PostComposeSheet extends HookConsumerWidget {
|
|||||||
ref,
|
ref,
|
||||||
state,
|
state,
|
||||||
context,
|
context,
|
||||||
originalPost: originalPost,
|
originalPost: effectiveOriginalPost,
|
||||||
repliedPost: repliedPost,
|
repliedPost: repliedPost,
|
||||||
forwardedPost: forwardedPost,
|
forwardedPost: forwardedPost,
|
||||||
onSuccess: () {
|
onSuccess: () {
|
||||||
@@ -139,8 +154,13 @@ class PostComposeSheet extends HookConsumerWidget {
|
|||||||
height: 24,
|
height: 24,
|
||||||
child: const CircularProgressIndicator(strokeWidth: 2),
|
child: const CircularProgressIndicator(strokeWidth: 2),
|
||||||
)
|
)
|
||||||
: Icon(originalPost != null ? Symbols.edit : Symbols.upload),
|
: Icon(
|
||||||
tooltip: originalPost != null ? 'postUpdate'.tr() : 'postPublish'.tr(),
|
effectiveOriginalPost != null ? Symbols.edit : Symbols.upload,
|
||||||
|
),
|
||||||
|
tooltip:
|
||||||
|
effectiveOriginalPost != null
|
||||||
|
? 'postUpdate'.tr()
|
||||||
|
: 'postPublish'.tr(),
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -148,7 +168,7 @@ class PostComposeSheet extends HookConsumerWidget {
|
|||||||
titleText: 'postCompose'.tr(),
|
titleText: 'postCompose'.tr(),
|
||||||
actions: actions,
|
actions: actions,
|
||||||
child: PostComposeCard(
|
child: PostComposeCard(
|
||||||
originalPost: originalPost,
|
originalPost: effectiveOriginalPost,
|
||||||
initialState: restoredInitialState.value ?? initialState,
|
initialState: restoredInitialState.value ?? initialState,
|
||||||
onCancel: () => Navigator.of(context).pop(),
|
onCancel: () => Navigator.of(context).pop(),
|
||||||
onSubmit: () {
|
onSubmit: () {
|
||||||
|
|||||||
@@ -122,6 +122,7 @@ class DraftManagerSheet extends HookConsumerWidget {
|
|||||||
final confirmed = await showConfirmAlert(
|
final confirmed = await showConfirmAlert(
|
||||||
'clearAllDraftsConfirm'.tr(),
|
'clearAllDraftsConfirm'.tr(),
|
||||||
'clearAllDrafts'.tr(),
|
'clearAllDrafts'.tr(),
|
||||||
|
isDanger: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (confirmed == true) {
|
if (confirmed == true) {
|
||||||
|
|||||||
@@ -197,6 +197,7 @@ class PostActionableItem extends HookConsumerWidget {
|
|||||||
showConfirmAlert(
|
showConfirmAlert(
|
||||||
'deletePostHint'.tr(),
|
'deletePostHint'.tr(),
|
||||||
'deletePost'.tr(),
|
'deletePost'.tr(),
|
||||||
|
isDanger: true,
|
||||||
).then((confirm) {
|
).then((confirm) {
|
||||||
if (confirm) {
|
if (confirm) {
|
||||||
final client = ref.watch(apiClientProvider);
|
final client = ref.watch(apiClientProvider);
|
||||||
|
|||||||
@@ -69,8 +69,11 @@ class PostItemCreator extends HookConsumerWidget {
|
|||||||
title: 'delete'.tr(),
|
title: 'delete'.tr(),
|
||||||
image: MenuImage.icon(Symbols.delete),
|
image: MenuImage.icon(Symbols.delete),
|
||||||
callback: () {
|
callback: () {
|
||||||
showConfirmAlert('deletePostHint'.tr(), 'deletePost'.tr()).then(
|
showConfirmAlert(
|
||||||
(confirm) {
|
'deletePostHint'.tr(),
|
||||||
|
'deletePost'.tr(),
|
||||||
|
isDanger: true,
|
||||||
|
).then((confirm) {
|
||||||
if (confirm) {
|
if (confirm) {
|
||||||
final client = ref.watch(apiClientProvider);
|
final client = ref.watch(apiClientProvider);
|
||||||
client
|
client
|
||||||
@@ -83,8 +86,7 @@ class PostItemCreator extends HookConsumerWidget {
|
|||||||
onRefresh?.call();
|
onRefresh?.call();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
});
|
||||||
);
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
MenuSeparator(),
|
MenuSeparator(),
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ class PostReplyPreview extends HookConsumerWidget {
|
|||||||
: (featuredReply!).map(
|
: (featuredReply!).map(
|
||||||
data:
|
data:
|
||||||
(data) => Row(
|
(data) => Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
spacing: 8,
|
spacing: 8,
|
||||||
children: [
|
children: [
|
||||||
ProfilePictureWidget(
|
ProfilePictureWidget(
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user