mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-19 23:16:21 +00:00
🆙 Init V3
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
import { NotificationAlertType } from './NotificationAlertType';
|
||||
|
||||
export class NotificationAlertItem
|
||||
{
|
||||
private static ITEM_ID: number = -1;
|
||||
|
||||
private _id: number;
|
||||
private _messages: string[];
|
||||
private _alertType: string;
|
||||
private _clickUrl: string;
|
||||
private _clickUrlText: string;
|
||||
private _title: string;
|
||||
private _imageUrl: string;
|
||||
|
||||
constructor(messages: string[], alertType: string = NotificationAlertType.DEFAULT, clickUrl: string = null, clickUrlText: string = null, title: string = null, imageUrl: string = null)
|
||||
{
|
||||
NotificationAlertItem.ITEM_ID += 1;
|
||||
|
||||
this._id = NotificationAlertItem.ITEM_ID;
|
||||
this._messages = messages;
|
||||
this._alertType = alertType;
|
||||
this._clickUrl = clickUrl;
|
||||
this._clickUrlText = clickUrlText;
|
||||
this._title = title;
|
||||
this._imageUrl = imageUrl;
|
||||
}
|
||||
|
||||
public get id(): number
|
||||
{
|
||||
return this._id;
|
||||
}
|
||||
|
||||
public get messages(): string[]
|
||||
{
|
||||
return this._messages;
|
||||
}
|
||||
|
||||
public set alertType(alertType: string)
|
||||
{
|
||||
this._alertType = alertType;
|
||||
}
|
||||
|
||||
public get alertType(): string
|
||||
{
|
||||
return this._alertType;
|
||||
}
|
||||
|
||||
public get clickUrl(): string
|
||||
{
|
||||
return this._clickUrl;
|
||||
}
|
||||
|
||||
public get clickUrlText(): string
|
||||
{
|
||||
return this._clickUrlText;
|
||||
}
|
||||
|
||||
public get title(): string
|
||||
{
|
||||
return this._title;
|
||||
}
|
||||
|
||||
public get imageUrl(): string
|
||||
{
|
||||
return this._imageUrl;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
export class NotificationAlertType
|
||||
{
|
||||
public static DEFAULT: string = 'default';
|
||||
public static MOTD: string = 'motd';
|
||||
public static MODERATION: string = 'moderation';
|
||||
public static EVENT: string = 'event';
|
||||
public static NITRO: string = 'nitro';
|
||||
public static SEARCH: string = 'search';
|
||||
public static ALERT: string = 'alert';
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
import { NotificationBubbleType } from './NotificationBubbleType';
|
||||
|
||||
export class NotificationBubbleItem
|
||||
{
|
||||
private static ITEM_ID: number = -1;
|
||||
|
||||
private _id: number;
|
||||
private _message: string;
|
||||
private _notificationType: string;
|
||||
private _iconUrl: string;
|
||||
private _linkUrl: string;
|
||||
|
||||
constructor(message: string, notificationType: string = NotificationBubbleType.INFO, iconUrl: string = null, linkUrl: string = null)
|
||||
{
|
||||
NotificationBubbleItem.ITEM_ID += 1;
|
||||
|
||||
this._id = NotificationBubbleItem.ITEM_ID;
|
||||
this._message = message;
|
||||
this._notificationType = notificationType;
|
||||
this._iconUrl = iconUrl;
|
||||
this._linkUrl = linkUrl;
|
||||
}
|
||||
|
||||
public get id(): number
|
||||
{
|
||||
return this._id;
|
||||
}
|
||||
|
||||
public get message(): string
|
||||
{
|
||||
return this._message;
|
||||
}
|
||||
|
||||
public get notificationType(): string
|
||||
{
|
||||
return this._notificationType;
|
||||
}
|
||||
|
||||
public get iconUrl(): string
|
||||
{
|
||||
return this._iconUrl;
|
||||
}
|
||||
|
||||
public get linkUrl(): string
|
||||
{
|
||||
return this._linkUrl;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
export class NotificationBubbleType
|
||||
{
|
||||
public static FRIENDOFFLINE: string = 'friendoffline';
|
||||
public static FRIENDONLINE: string = 'friendonline';
|
||||
public static THIRDPARTYFRIENDOFFLINE: string = 'thirdpartyfriendoffline';
|
||||
public static THIRDPARTYFRIENDONLINE: string = 'thirdpartyfriendonline';
|
||||
public static ACHIEVEMENT: string = 'achievement';
|
||||
public static BADGE_RECEIVED: string = 'badge_received';
|
||||
public static INFO: string = 'info';
|
||||
public static RECYCLEROK: string = 'recyclerok';
|
||||
public static RESPECT: string = 'respect';
|
||||
public static CLUB: string = 'club';
|
||||
public static SOUNDMACHINE: string = 'soundmachine';
|
||||
public static PETLEVEL: string = 'petlevel';
|
||||
public static CLUBGIFT: string = 'clubgift';
|
||||
public static BUYFURNI: string = 'buyfurni';
|
||||
public static VIP: string = 'vip';
|
||||
public static ROOMMESSAGESPOSTED: string = 'roommessagesposted';
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
export class NotificationConfirmItem
|
||||
{
|
||||
private static ITEM_ID: number = -1;
|
||||
|
||||
private _id: number;
|
||||
private _confirmType: string;
|
||||
private _message: string;
|
||||
private _onConfirm: Function;
|
||||
private _onCancel: Function;
|
||||
private _confirmText: string;
|
||||
private _cancelText: string;
|
||||
private _title: string;
|
||||
|
||||
constructor(confirmType: string, message: string, onConfirm: Function, onCancel: Function, confirmText: string, cancelText: string, title: string)
|
||||
{
|
||||
NotificationConfirmItem.ITEM_ID += 1;
|
||||
|
||||
this._id = NotificationConfirmItem.ITEM_ID;
|
||||
this._confirmType = confirmType;
|
||||
this._message = message;
|
||||
this._onConfirm = onConfirm;
|
||||
this._onCancel = onCancel;
|
||||
this._confirmText = confirmText;
|
||||
this._cancelText = cancelText;
|
||||
this._title = title;
|
||||
}
|
||||
|
||||
public get id(): number
|
||||
{
|
||||
return this._id;
|
||||
}
|
||||
|
||||
public get confirmType(): string
|
||||
{
|
||||
return this._confirmType;
|
||||
}
|
||||
|
||||
public get message(): string
|
||||
{
|
||||
return this._message;
|
||||
}
|
||||
|
||||
public get onConfirm(): Function
|
||||
{
|
||||
return this._onConfirm;
|
||||
}
|
||||
|
||||
public get onCancel(): Function
|
||||
{
|
||||
return this._onCancel;
|
||||
}
|
||||
|
||||
public get confirmText(): string
|
||||
{
|
||||
return this._confirmText;
|
||||
}
|
||||
|
||||
public get cancelText(): string
|
||||
{
|
||||
return this._cancelText;
|
||||
}
|
||||
|
||||
public get title(): string
|
||||
{
|
||||
return this._title;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
export class NotificationConfirmType
|
||||
{
|
||||
public static DEFAULT: string = 'default';
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
export * from './NotificationAlertItem';
|
||||
export * from './NotificationAlertType';
|
||||
export * from './NotificationBubbleItem';
|
||||
export * from './NotificationBubbleType';
|
||||
export * from './NotificationConfirmItem';
|
||||
export * from './NotificationConfirmType';
|
||||
Reference in New Issue
Block a user