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 #326.
  • Loading branch information
simonbaird committed Jun 16, 2024
1 parent e7fc384 commit 48262b4
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 @@ -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(/(<<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 48262b4

Please sign in to comment.