From 1f3f7dd3d810bdba5676987e2cf93f363763fd1f Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Mon, 8 Jan 2024 21:53:18 +0100 Subject: [PATCH] server: add read only mode (#92) In read only mode the endpoint to save new effects or add new versions is deactivated. Also in the gallery the create button is deactivated and there is a notice that says: The server is in maintenance mode. You can not create or modify effects. The button to save effects in the editor is not deactivated as it will take a bit more time and wanted to have the page up as soon as possible. --- server/assets/gallery.html | 6 ++++++ server/cmd/glslsandbox/main.go | 2 ++ server/server.go | 15 +++++++++++---- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/server/assets/gallery.html b/server/assets/gallery.html index 20e60e0..c988e56 100644 --- a/server/assets/gallery.html +++ b/server/assets/gallery.html @@ -123,7 +123,13 @@ gallery by @thevaw, @mrdoob
editor by @mrdoob, @mrkishi, @p01, @alteredq, @kusmabite and @emackey

+ +{{ if .ReadOnly }} +

The server is in maintenance mode. You can not create or modify effects.

+{{ else }} +{{ end }} +