Fixing toast background for all but i386. Fixes #794
This commit is contained in:
parent
ee32072489
commit
2e4c725647
1 changed files with 2 additions and 4 deletions
6
ui/src/utils.ts
vendored
6
ui/src/utils.ts
vendored
|
@ -481,7 +481,7 @@ export function messageToastify(
|
||||||
text: `${body}<br />${creator}`,
|
text: `${body}<br />${creator}`,
|
||||||
avatar: avatar,
|
avatar: avatar,
|
||||||
backgroundColor: backgroundColor,
|
backgroundColor: backgroundColor,
|
||||||
className: 'text-body',
|
className: 'text-dark',
|
||||||
close: true,
|
close: true,
|
||||||
gravity: 'top',
|
gravity: 'top',
|
||||||
position: 'right',
|
position: 'right',
|
||||||
|
@ -868,9 +868,7 @@ function canUseWebP() {
|
||||||
if (!!(elem.getContext && elem.getContext('2d'))) {
|
if (!!(elem.getContext && elem.getContext('2d'))) {
|
||||||
var testString = !(window.mozInnerScreenX == null) ? 'png' : 'webp';
|
var testString = !(window.mozInnerScreenX == null) ? 'png' : 'webp';
|
||||||
// was able or not to get WebP representation
|
// was able or not to get WebP representation
|
||||||
return (
|
return elem.toDataURL('image/webp').startsWith('data:image/' + testString);
|
||||||
elem.toDataURL('image/webp').startsWith('data:image/' + testString)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// very old browser like IE 8, canvas not supported
|
// very old browser like IE 8, canvas not supported
|
||||||
|
|
Reference in a new issue