PrivateBin / PrivateBin

A minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted in the browser using 256 bits AES.
https://privatebin.info/
Other
6.33k stars 781 forks source link

Switch to client side rendering using static (HTML) templates instead of PHP ones #312

Open rugk opened 6 years ago

rugk commented 6 years ago

Needed for https://github.com/PrivateBin/PrivateBin/issues/302 to make HTML content more static and modify everything only after the settings are loaded/fetched.

rugk commented 6 years ago

To be more broad and exact we need to drop all template logic, i.e. the template has to deliver all things and only the JS must determinate whether the stuff needs to be shown or not.

Settings, which should still not be exposed via an endpoint:

elrido commented 3 months ago

Is this still an issue or can this be closed?

rugk commented 3 months ago

Ah yeah theoretically for sure, we use server-side-rendering (SSR) here while this issue calls for client-side rendering (which is relatively simple in our case, just fetch the config and hide/show all elements as needed; via JS.). I'll adjust the title, given it is really unclear. The thing I am not that sure anymore is how important it is to achieve https://github.com/PrivateBin/PrivateBin/issues/302 given nearly nobody uses that extension(s), but sure it would be cool to have and a point we could advertise in such a decentralized project.

It would be a benefit without that IMHO though, as the templates may be easier to adjust and less (or even none?) PHP code would be in there then.