mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-16 19:12:24 +00:00
* feat: add `ConfirmDialog` This usually appears in the `playability_status` object. * fix(PlayerErrorMessage): check if `iconType` exists before parsing * chore(parser): fix a few inconsistencies * feat(ytmusic): add `MetadataScreen` TODO: Check TrackInfo, YouTube Music is probably getting some minor UI updates.
24 lines
661 B
TypeScript
24 lines
661 B
TypeScript
import Parser from '..';
|
|
import Text from './misc/Text';
|
|
import Button from './Button';
|
|
|
|
import { YTNode } from '../helpers';
|
|
|
|
class ConfirmDialog extends YTNode {
|
|
static type = 'ConfirmDialog';
|
|
|
|
title: Text;
|
|
confirm_button: Button | null;
|
|
cancel_button: Button | null;
|
|
dialog_messages: Text[];
|
|
|
|
constructor (data: any) {
|
|
super();
|
|
this.title = new Text(data.title);
|
|
this.confirm_button = Parser.parseItem<Button>(data.confirmButton, Button);
|
|
this.cancel_button = Parser.parseItem<Button>(data.cancelButton, Button);
|
|
this.dialog_messages = data.dialogMessages.map((txt: any) => new Text(txt));
|
|
}
|
|
}
|
|
|
|
export default ConfirmDialog; |