From 48262b46b63597ccf45e4631913152b32857db3f Mon Sep 17 00:00:00 2001 From: Simon Baird Date: Tue, 27 Feb 2024 16:51:22 -0500 Subject: [PATCH] classic: Show th save button only if it's usable There are some pros and cons to this, e.g. with this change, a user with an expired login session might be confused about why they can no longer save. On the other hand showing the "save to tiddlyhost" button when a save is not possible is also potentially confusing. Anyway, let's try it this way and see how we like it. Closely related to the changes in the previous commit for issue #326. --- rails/tw_content/plugins/thost_upload_plugin.js.erb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rails/tw_content/plugins/thost_upload_plugin.js.erb b/rails/tw_content/plugins/thost_upload_plugin.js.erb index 65a41838..d9d3b519 100644 --- a/rails/tw_content/plugins/thost_upload_plugin.js.erb +++ b/rails/tw_content/plugins/thost_upload_plugin.js.erb @@ -200,10 +200,10 @@ if (config.shadowTiddlers.TiddlyHostIsLoggedIn == "yes") { // set it here to make sure TW is editable, unlike window.showBackstage // which is set after window.readOnly = false -} -// Add 'upload to tiddlyhost' button -config.shadowTiddlers.SideBarOptions = config.shadowTiddlers.SideBarOptions - .replace(/(<>)/,"$1<>"); + // Add the 'save to tiddlyhost' button after the regular save button + config.shadowTiddlers.SideBarOptions = config.shadowTiddlers.SideBarOptions + .replace(/(<>)/,"$1<>"); +} //}}}