snapshot of https://github.com/jitsi/jitsi-meet.git @ fd1749dd28f4138aa80234fc7f311b19aaffa0e7 (2026-09-15)
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { translate } from '../../base/i18n/functions';
|
||||
import { IconTrash } from '../../base/icons/svg';
|
||||
import AbstractButton, { IProps as AbstractButtonProps } from '../../base/toolbox/components/AbstractButton';
|
||||
import { deleteRecentListEntry } from '../actions';
|
||||
|
||||
export interface IProps extends AbstractButtonProps {
|
||||
|
||||
/**
|
||||
* The ID of the entry to be deleted.
|
||||
*/
|
||||
itemId: Object;
|
||||
}
|
||||
|
||||
/**
|
||||
* A recent list menu button which deletes the selected entry.
|
||||
*/
|
||||
class DeleteItemButton extends AbstractButton<IProps> {
|
||||
override accessibilityLabel = 'welcomepage.recentListDelete';
|
||||
override icon = IconTrash;
|
||||
override label = 'welcomepage.recentListDelete';
|
||||
|
||||
/**
|
||||
* Handles clicking / pressing the button.
|
||||
*
|
||||
* @private
|
||||
* @returns {void}
|
||||
*/
|
||||
override _handleClick() {
|
||||
const { dispatch, itemId } = this.props;
|
||||
|
||||
dispatch(deleteRecentListEntry(itemId));
|
||||
}
|
||||
}
|
||||
|
||||
export default translate(connect()(DeleteItemButton));
|
||||
Reference in New Issue
Block a user