Skip to content

Commit

Permalink
classic: Show th save button only if it's usable
Browse files Browse the repository at this point in the history
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
  • Loading branch information
simonbaird committed Apr 21, 2024
1 parent c521106 commit 66003ba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rails/tw_content/plugins/thost_upload_plugin.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,10 @@ if (config.shadowTiddlers.TiddlyHostIsLoggedIn == "yes") {
// If user is logged in to Tiddlyhost then disregard the value of
// the chkHttpReadOnly cookie and always show the edit buttons
config.options.chkHttpReadOnly = false
}

// Add 'upload to tiddlyhost' button
config.shadowTiddlers.SideBarOptions = config.shadowTiddlers.SideBarOptions
.replace(/(<<saveChanges>>)/,"$1<<thostUpload>>");
// Add the 'save to tiddlyhost' button after the regular save button
config.shadowTiddlers.SideBarOptions = config.shadowTiddlers.SideBarOptions
.replace(/(<<saveChanges>>)/,"$1<<thostUpload>>");
}

//}}}

0 comments on commit 66003ba

Please sign in to comment.