antfu-collective / icones

⚡️ Icon Explorer with Instant searching, powered by Iconify
https://icones.js.org
MIT License
5.13k stars 250 forks source link

feat: intercept iconify api requests #136

Closed userquin closed 1 year ago

userquin commented 1 year ago

Description

This PR adds iconify api fetch interception to avoid make requests to iconify api server serving collections from local.

EDIT: icones is using prompt for update, this PR also updates it to use auto update, but we should use virtual module instead registerSW script (not included in the PR, ping me if you want to include it).

Linked Issues

closes #135

Additional context

iconify-icon provides also a way to disable local storage: I've included the required logic to disable it when using PWA:

imagen

antfu commented 1 year ago

Ok, let's see how it goes