| | 1 | | using System; |
| | 2 | |
|
| | 3 | | namespace DCL |
| | 4 | | { |
| | 5 | | public record GenericConfirmationNotificationData |
| | 6 | | { |
| | 7 | | public readonly string Title; |
| | 8 | | public readonly string Body; |
| | 9 | | public readonly string CancelButton; |
| | 10 | | public readonly string ConfirmButton; |
| | 11 | | public readonly Action CancelAction; |
| | 12 | | public readonly Action ConfirmAction; |
| | 13 | |
|
| 4 | 14 | | public GenericConfirmationNotificationData(string title, string body, string cancelButton, string confirmButton, |
| | 15 | | Action cancelAction, Action confirmAction) |
| | 16 | | { |
| 4 | 17 | | Title = title; |
| 4 | 18 | | Body = body; |
| 4 | 19 | | CancelButton = cancelButton; |
| 4 | 20 | | ConfirmButton = confirmButton; |
| 4 | 21 | | CancelAction = cancelAction; |
| 4 | 22 | | ConfirmAction = confirmAction; |
| 4 | 23 | | } |
| | 24 | |
|
| | 25 | | public static GenericConfirmationNotificationData CreateUnFriendData(string userName, Action confirmationAction) |
| 0 | 26 | | new ( |
| | 27 | | $"Are you sure you want to unfriend {userName}?", |
| | 28 | | "This player and you will no longer be friends, meaning you won't be able to send each other private mes |
| | 29 | | "CANCEL", |
| | 30 | | "UNFRIEND", |
| | 31 | | null, |
| | 32 | | confirmationAction); |
| | 33 | |
|
| | 34 | | public static GenericConfirmationNotificationData CreateBlockUserData(string userName, Action confirmationAction |
| 1 | 35 | | new ( |
| | 36 | | $"Are you sure you want to block {userName}?", |
| | 37 | | "Blocking someone means that you will no longer see their avatar in-world. Both of you will also not see |
| | 38 | | "CANCEL", |
| | 39 | | "BLOCK", |
| | 40 | | null, |
| | 41 | | confirmationAction); |
| | 42 | |
|
| | 43 | | public static GenericConfirmationNotificationData CreateUnBlockUserData(string userName, Action confirmationActi |
| 0 | 44 | | new ( |
| | 45 | | $"Are you sure you want to unblock {userName}?", |
| | 46 | | "Once you unblock someone, you will see their avatar in-world and you will both be able to see each othe |
| | 47 | | "CANCEL", |
| | 48 | | "UNBLOCK", |
| | 49 | | null, |
| | 50 | | confirmationAction); |
| | 51 | | } |
| | 52 | |
|
| | 53 | | public class DataStore_Notifications |
| | 54 | | { |
| | 55 | | public readonly BaseVariable<string> DefaultErrorNotification = new (); |
| | 56 | | public readonly BaseVariable<GenericConfirmationNotificationData> GenericConfirmation = new (); |
| | 57 | | } |
| | 58 | | } |