support gif

This commit is contained in:
pompurin404 2024-09-24 20:15:56 +08:00
parent 062c417208
commit b6559cbaf9
No known key found for this signature in database

View File

@ -221,6 +221,9 @@ const Proxies: React.FC = () => {
size="sm" size="sm"
onLoad={() => { onLoad={() => {
if (!groups[index].icon.startsWith('http')) return if (!groups[index].icon.startsWith('http')) return
if (localStorage.getItem(groups[index].icon)) return
// canvas 只支持静态图片
if (groups[index].icon.endsWith('gif')) return
const img = new Image() const img = new Image()
img.crossOrigin = 'anonymous' img.crossOrigin = 'anonymous'
img.onload = (): void => { img.onload = (): void => {