Telegram Web K with changes to work inside I2P https://web.telegram.i2p/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

42 lines
1.0 KiB

/*
* https://github.com/morethanwords/tweb
* Copyright (C) 2019-2021 Eduard Kuzmenko
* https://github.com/morethanwords/tweb/blob/master/LICENSE
*/
import appMessagesManager from "../../lib/appManagers/appMessagesManager";
import { PopupButton } from ".";
import PopupPeer from "./peer";
export default class PopupSendNow {
constructor(peerId: number, mids: number[], onConfirm?: () => void) {
let title: string, description: string, buttons: PopupButton[] = [];
title = `Send Message${mids.length > 1 ? 's' : ''} Now`;
description = mids.length > 1 ? 'Send ' + mids.length + ' messages now?' : 'Send message now?';
const callback = () => {
onConfirm && onConfirm();
appMessagesManager.sendScheduledMessages(peerId, mids);
};
buttons.push({
text: 'SEND',
callback
});
buttons.push({
text: 'CANCEL',
isCancel: true
});
const popup = new PopupPeer('popup-delete-chat', {
peerId,
title,
description,
buttons
});
popup.show();
}
}