maunium / stickerpicker

A fast and simple Matrix sticker picker widget
GNU Affero General Public License v3.0
312 stars 592 forks source link

Allow using external index.json and stickerpack #38

Closed p1gp1g closed 2 years ago

p1gp1g commented 2 years ago

The idea behind :

If there is no config GET parameter, it does today's behavior (index.json @ /packs/index.json).

The packs in the index.json takes the full URL

{
  "packs": [
    "https://example1.tld/stickerpicker/web/packs/aaa.json",
    "https://example2.tld/stickerpicker/web/packs/bbb.json",
    "https://example.tld/stickerpicker/web/packs/ccc.json"
  ]
}

Note: json packs and index.json needs to have wildcard CORS

p1gp1g commented 2 years ago

For the public repo, I've done a preview feature here : https://github.com/p1gp1g/stickerpicker/tree/preview It currently lists available packs in the config. Clicking on a preview copy the packFile URL. It misses (at least) :

I'll open a PR for the preview when/if this current PR is merged. Contribution is welcomed :)