mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-09-10 23:30:57 +00:00
Fix issues with logged out users for actions.
Look up the room login from the ID when rendering a chat line if we don't have the login already. Add color validation to the color picker component. If room is null, don't even try sending a message. Allow sending messages to any room and not just the current room. Swallow errors when processing colors and return null.
This commit is contained in:
parent
fdde05030f
commit
c548f15290
9 changed files with 188 additions and 128 deletions
|
@ -592,7 +592,7 @@ export class ColorAdjuster {
|
|||
}
|
||||
}
|
||||
|
||||
process(color) {
|
||||
process(color, throw_errors = false) {
|
||||
if ( this._mode === -1 )
|
||||
return '';
|
||||
else if ( this._mode === 0 )
|
||||
|
@ -607,7 +607,16 @@ export class ColorAdjuster {
|
|||
if ( this._cache.has(color) )
|
||||
return this._cache.get(color);
|
||||
|
||||
let rgb = RGBAColor.fromCSS(color);
|
||||
let rgb;
|
||||
|
||||
try {
|
||||
rgb = RGBAColor.fromCSS(color);
|
||||
} catch(err) {
|
||||
if ( throw_errors )
|
||||
throw err;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
if ( this._mode === 1 ) {
|
||||
// HSL Luma
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue