add zoom buttons

This commit is contained in:
marlon-erler
2024-07-11 19:52:18 +02:00
parent 393a2aee4d
commit 0675447413
5 changed files with 53 additions and 10 deletions
+12
View File
@@ -133,6 +133,18 @@ UDN.onmailboxdelete = () => {
// MISC
export const isEncryptionAvailable = window.crypto.subtle != undefined;
export const senderName = React.restoreState("sender-name", "");
export const pageZoom = React.restoreState("page-zoom", 100);
pageZoom.subscribe(() => {
document.body.style.zoom = `${pageZoom.value}%`;
});
const zoomStep = 10;
export function zoomOut() {
pageZoom.value -= zoomStep;
}
export function zoomIn() {
pageZoom.value += zoomStep;
}
// CHAT
export const chats = new React.ListState<Chat>();