Web server for multi-user sticker picker
tulir opened this issue · comments
Currently the picker is just some static files, which means everyone has the same packs and they can only be configured server-side.
The project could include a simple web server which can serve different packs for different users, based on some identifier in the picker URL. Once that server exists, it could also have a bot or other interface that users can use to add packs to their own picker.
It shouldn't have any auth other than the unique ID in the URL, as widget authentication is a mess that's different on all platforms.
As an alternative to including a webserver the potential bot could also provision all required static files into some subdir scheme like:
<webroot>/stickerpicker-user1-randomid/<stickerpicker-webdir>
<webroot>/stickerpicker-user2-randomid/<stickerpicker-webdir>
I copied ./web/packs/index.json
to index_h6wxarlac.json
, deleted the packs in the file, I don't want to give to the user and added the following lines to the server {}
in nginx.conf
location /h6wxarlac {
alias /opt/stickerpicker/web;
try_files $uri $uri/ =404;
}
location /h6wxarlac/packs/index.json {
alias /opt/stickerpicker/web/index_h6wxarlac.json;
try_files $uri $uri/ =404;
}
msrd0/docker-stickerpicker does also support multiple profiles
I would suggest adding an "Edit Visibility" button to the settings section so users can decide wich packs are visible to them. When the button is pressed, the window goes into an "edit mode" where packs can be enabled or disabled with a switch, just like in Dimension. The state could also be saved in the local storage like the other settings.
Here I made a small visual concept of how this idea could look in the UI: