Fixed interface
This commit is contained in:
parent
d84d0b65ca
commit
138ed6a487
|
@ -131,22 +131,18 @@ RemoteVideo.prototype._generatePopupContent = function () {
|
||||||
id: 'mutelink_' + this.id,
|
id: 'mutelink_' + this.id,
|
||||||
handler: muteHandler,
|
handler: muteHandler,
|
||||||
icon: 'icon-mic-disabled',
|
icon: 'icon-mic-disabled',
|
||||||
text: {
|
|
||||||
className: muteClassName,
|
className: muteClassName,
|
||||||
data: {
|
data: {
|
||||||
i18n: muteTranslationKey
|
i18n: muteTranslationKey
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}, {
|
}, {
|
||||||
id: 'ejectlink_' + this.id,
|
id: 'ejectlink_' + this.id,
|
||||||
handler: kickHandler,
|
handler: kickHandler,
|
||||||
icon: 'icon-kick',
|
icon: 'icon-kick',
|
||||||
text: {
|
|
||||||
data: {
|
data: {
|
||||||
i18n: 'videothumbnail.kick'
|
i18n: 'videothumbnail.kick'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
];
|
];
|
||||||
|
|
||||||
menuItems.forEach(el => {
|
menuItems.forEach(el => {
|
||||||
|
@ -185,7 +181,8 @@ RemoteVideo.prototype._generatePopupMenuItem = function (opts = {}) {
|
||||||
id,
|
id,
|
||||||
handler,
|
handler,
|
||||||
icon,
|
icon,
|
||||||
text
|
data,
|
||||||
|
className
|
||||||
} = opts;
|
} = opts;
|
||||||
|
|
||||||
handler = handler || $.noop;
|
handler = handler || $.noop;
|
||||||
|
@ -196,6 +193,10 @@ RemoteVideo.prototype._generatePopupMenuItem = function (opts = {}) {
|
||||||
let linkItem = document.createElement('a');
|
let linkItem = document.createElement('a');
|
||||||
linkItem.className = 'popupmenu__link';
|
linkItem.className = 'popupmenu__link';
|
||||||
|
|
||||||
|
if (className) {
|
||||||
|
linkItem.className += ` ${className}`;
|
||||||
|
}
|
||||||
|
|
||||||
if (icon) {
|
if (icon) {
|
||||||
let indicator = document.createElement('span');
|
let indicator = document.createElement('span');
|
||||||
indicator.className = 'popupmenu__icon';
|
indicator.className = 'popupmenu__icon';
|
||||||
|
@ -206,11 +207,12 @@ RemoteVideo.prototype._generatePopupMenuItem = function (opts = {}) {
|
||||||
let textContent = document.createElement('span');
|
let textContent = document.createElement('span');
|
||||||
textContent.className = 'popupmenu__text';
|
textContent.className = 'popupmenu__text';
|
||||||
|
|
||||||
let dataKeys = Object.keys(text.data);
|
if (data) {
|
||||||
|
let dataKeys = Object.keys(data);
|
||||||
dataKeys.forEach(key => {
|
dataKeys.forEach(key => {
|
||||||
textContent.dataset[key] = text.data[key];
|
textContent.dataset[key] = data[key];
|
||||||
});
|
});
|
||||||
textContent.className += ` ${text.className}` || '';
|
}
|
||||||
|
|
||||||
linkItem.appendChild(textContent);
|
linkItem.appendChild(textContent);
|
||||||
linkItem.id = id;
|
linkItem.id = id;
|
||||||
|
|
Loading…
Reference in New Issue