1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-29 00:33:15 +00:00
Commit Graph

3251 Commits

Author SHA1 Message Date
Jermolene
b55a3102be Fix typo from 8a38685 2018-08-16 16:08:33 +01:00
Jermolene
8a38685de9 Optionally adjust scroll targets to allow for a top menu bar
Fixes #3396
2018-08-16 12:07:50 +01:00
Jermolene
763f8afaf2 Add "contains" filter operator for searching list fields 2018-08-15 13:50:07 +01:00
Jermolene
3140ff9e49 Extent tm-full-screen message to support forcing the status
Now one can force "enter" or "exit", instead of just toggling the current status
2018-08-14 22:53:53 +01:00
Jermolene
7b9dc7557c Popup manager enhancements 2018-08-09 19:39:58 +01:00
Jermolene
c87c18be96 Fix tm-new-tiddler overwriting creation fields of existing tiddlers
Fixes #3371
2018-08-08 15:08:34 +01:00
Jermolene
097c87fa7b Modularize the sidebar
Fixes #2758
2018-08-02 13:22:21 +01:00
Jermolene
2d231a2e07 Fix typo in reveal widget
Introduced in a3a4c28143
2018-07-31 13:30:00 +01:00
Jermolene
4b9bc1b766 Fix crash with malformed hexadecimal HTML entities
Fixes #3373
2018-07-28 16:22:38 +01:00
Jermolene
a3a4c28143 Fix bug with reveal widget not refreshing when state tiddler changes 2018-07-20 17:07:48 +01:00
Jermolene
8520c9d8fd Coding style tweaks for #3346 2018-07-19 21:48:40 +01:00
Evan Balster
be58de8409 Add range operator and documentation (#3346) 2018-07-19 21:42:09 +01:00
Jermolene
34e04b7ca6 Minor tweaks for #3362 2018-07-19 21:28:31 +01:00
Arlen22
aa8b2e11bb Allow all methods and add bodyFormat property to route definition (#3362)
* Allow all methods and add bodyFormat property to route definition

* Set string as the default bodyFormat

* Only set encoding on string routes
2018-07-19 21:24:57 +01:00
Jermolene
8b787cd806 Add new palette colours from #3360 to other core palettes 2018-07-19 21:19:21 +01:00
Jermolene
1317e13974 Fix issue with #3360
See https://github.com/Jermolene/TiddlyWiki5/pull/3360#issuecomment-406400700
2018-07-19 21:18:54 +01:00
Talha Mansoor
e0be9a3d09 Add <select> color setting to the palette (#3360)
* Add <select> color setting to the palette

* Signing the CLA
2018-07-19 17:25:35 +01:00
snlhnk
c05c0d3df6 Module-ize server routes, add static file support and other enhancements(#2679)
* Module-ize server routes and add static file support (#2510)

* Refactor server routes to modules

New module type: serverroute

Caveats: Loading order is not deterministic but this would only matter
if two route modules attempted to use the same path regexp (that would
be silly).

* Add static assets plugin

This plugin allows the node server to fetch static assets in the /assets
directory. I felt that this was a feature that goes above the core
functionality. That is why I added it as a plugin. with the modular
route extensions this was a breeze.

* Add serverroute description to ModuleTypes

* Coding standards tweaks

* Fix filename typo

* Move support for attachments from a plugin into the core

* Missing "else"

* Refactor server handling

* Introduce a new named parameter scheme for commands
* Move the SimpleServer class into it's own module
* Deprecate the --server command because of the unwieldy syntax
* Add a new --listen command using the new syntax

For example:

tiddlywiki mywiki --listen host:0.0.0.0 port:8090

* Add check for unknown parameters

* Add support for multiple basic authentication credentials in a CSV file

Beware: Passwords are stored in plain text. If that's a problem, use an authenticating proxy and the trusted header authentication approach.

* Refactor module locations

* Rename "serverroute" module type to "route"

* Remove support for verifying optional named command parameters

The idea was to be able to flag unknown parameter names, but requiring a command to pre-specify all the parameter names makes it harder for (say) the listen command to be extensible so that plugins can add new optional parameters that they handle. (This is particularly in the context of work in progress to encapsulate authenticators into their own modules).

* Refactor the two authenticators into separate modules and add support for authorization

* Correct mistaken path.join vs. path.resolve

See https://stackoverflow.com/a/39836259

* Docs for the named command parameters

I'd be grateful if anyone with sufficient Windows experience could confirm that the note about double quotes in "NamedCommandParameters" is correct.

* Be consistent about lower case parameter names

* Do the right thing when we have a username but no password

With a username parameter but no password parameter we'll attribute edits to that username, but not require authentication.

* Remove obsolete code

* Add support for requiring authentication without restricting the username

* Refactor authorization checks

* Return read_only status in /status response

* Fix two code typos

* Add basic support for detecting readonly status and avoiding write errors

We now have syncadaptors returning  readonly status and avoid attempting to write to the server if it's going to fail

* Add readonly-styles

We hide editing-related buttons in read only mode

I've made this part of the tiddlyweb plugin but I think a case could be made for putting it into the core.

* Add custom request header as CSRF mitigation

By default we require the header X-Requested-With to be set to TiddlyWiki. Can be overriden by setting csrfdisable to "yes"

See https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)_Prevention_Cheat_Sheet#Protecting_REST_Services:_Use_of_Custom_Request_Headers

* Add support for HTTPS

* First pass at a route for serving rendered tiddlers

cc @Drakor

* Tweaks to the single tiddler static view

Adding a simple sidebar

* Switch to "dash" separated parameter names

* Typo

* Docs: Update ServerCommand and ListenCommand

* First pass at docs for the new web server stuff

Writing the docs is turning out to be quite an undertaking, much harder than writing the code!

* Get rid of extraneous paragraphs in static renderings

* Rejig anonymous user handling

Now we can support wikis that are read-only for anonymous access, but allow a user to login for read/write access.

* More docs

Slowly getting there...

* Static tiddler rendering: Fix HTML content in page title

* Docs updates

* Fix server command parameter names

Missed off 30ce7ea

* Docs: Missing quotes

* Avoid inadvertent dependency on Node.js > v9.6.0

The listenOptions parameter of the plain HTTP version of CreateServer was only introduced in v9.6.0

cc @Drakor @pmario

* Typo
2018-07-18 16:54:43 +01:00
Jermolene
c72e4f01f1 Fix typo in excise button
It meant that the excise button didn't appear on tiddlers of type text/vnd.tiddlywiki
2018-07-03 11:12:12 +01:00
Jermolene
bef3242075 New text editor operation: save selection to a tiddler 2018-06-29 15:09:51 +01:00
Jermolene
f54a0a11bc Add support for editor toolbar buttons to have action widgets 2018-06-29 15:09:34 +01:00
Jermolene
acaa07a964 First stab at a threaded commenting plugin 2018-06-21 08:36:15 +01:00
Jermolene
1ce9973bed Add optional debug logging to the server command 2018-06-20 12:43:41 +01:00
Jermolene
c29f5a1b61 Server command: map missing path to "/"
Otherwise, the user gets a 404 if we use a path prefix and the user omits the trailing slash
2018-06-20 12:18:35 +01:00
BurningTreeC
2a3f1b4403 Make tm-full-screen work in all windows (#3334)
this makes tm-full-screen work in new windows, too
2018-06-16 10:03:38 +01:00
Jermolene
7557b8b5b7 Remove extraneous debugging code from 35cbb127a3 2018-06-15 11:34:06 +01:00
Jermolene
35cbb127a3 Restrict variable substitutions to macros defined with the define pragma
Fixes #3333
2018-06-15 08:31:02 +01:00
Jermolene
aba9c94f5a Fix coding standards for put.js
A few minor things, but the accidental use of "const" is serious: TW5 is intended to run on ES5.
2018-06-13 15:50:47 +01:00
Jermolene
bacf500d50 Avoid deprecated new Buffer() usage
See https://alexatnet.com/node-js-10-important-changes/#buffer-1

> Uses of new Buffer() and Buffer() outside of the node_modules directory will now emit a runtime deprecation warning.

More details: https://nodejs.org/api/buffer.html#buffer_buffer_from_buffer_alloc_and_buffer_allocunsafe
2018-06-13 11:22:17 +01:00
Jermolene
2e51f08bef Add support for rebasing headings at render time
Fixes #3330
2018-06-10 15:54:23 +01:00
Jermolene
29606c6d24 Refactor new journal actions
Using contained actions, as we were, meant that the actions (and in this case the wikify widget) were being rendered at render time, but might have been out of date by the time the actions were triggered. Using the action attribute ensures the actions are rendered when they are executed.

Fixes #3326
2018-06-06 19:41:02 +01:00
Jermolene
6b14969cf6 Display a warning for binary tiddlers in view mode
The base64 data is currently parsed as wikitext, which is slow and unhelpful

We already display the same warning for binary tiddlers in edit mode.
2018-05-18 17:53:07 +01:00
Jermolene
33453039fc Fix broken import previews
All three were inadvertently showing the existing tiddler (if any), not the imported tiddler.
2018-05-16 17:40:15 +01:00
Jermolene
6e2b4ebf3e Remove print-tiddler-window button for v5.1.17
We'll reconsider it for v5.1.18
2018-05-12 11:20:43 +01:00
Jermolene
737e9ae4cb Revert multiple suboperator functionality from the "is" operator
See the discussion here: https://github.com/Jermolene/TiddlyWiki5/pull/3240#issuecomment-388035466
2018-05-10 13:15:49 +01:00
Jermolene
e11282cc08 Fix name of print tiddler button 2018-05-10 11:36:57 +01:00
Jermolene
2beae0db2e Tweaks for the new print tiddler toolbar button 2018-05-10 11:35:18 +01:00
Jermolene
523060e823 Add new "print tiddler" button for the view toolbar
It works by opening the tiddler in a new window and then triggering the browser print dialogue.
2018-05-10 11:33:23 +01:00
Jermolene
b95aa6ec6a Fix problem with repeated "new journal" with text set
Fixes problem whereby a repeated "new journal" would replace the text of the existing journal tiddler if the control panel new journal text was set.

Fixes #3028 and #3265
2018-05-10 11:28:07 +01:00
Jermolene
e6466b2c32 Fix problem with extraneous space in new journal titles 2018-05-10 08:52:02 +01:00
Matt Lauber
0ab9ec1ad3 Refactored the is operator for simplicity and efficiency. (#3240)
* Refactored the is operator for simplicity and efficiency.

* Improve `is` filter documentation.

* Update is.js

* extracted `subops.length` to `num_of_subops`
* renamed `subop` to `operator` for clarity/differentiation from `subops`
* refactored to avoid using a `Set` object.

* Update is.js
2018-05-09 18:07:08 +01:00
Devin Weaver
230c13129a Fix undefined xhr bug (#3262)
Closes #3261

Bug introduced in commit f9be41720 ("Minor tweak for RetrieveETag
(#3257)", 2018-05-05)
2018-05-09 18:04:52 +01:00
Daniel Rodríguez Rivero
4c89bbabbe Retain $:/status/UserName when logged out (#2893)
The user name tiddler should not be removed just because we are not logged in
2018-05-09 14:22:55 +01:00
Bram Chen
f9be417204 Minor tweak for RetrieveETag (#3257)
Need to check if the server responses a null value for ETag.
(In the case testing with build-in webdav server of CarotDAV on Windows 10)
2018-05-05 11:40:41 +01:00
Sebastian Silva
46e8e4343a Fix WebDAV by requesting new ETag. (#3230)
* Fix WebDAV by requesting new ETag conditionally

For me. this was saving only the first time and subsequently failing.
Having revised the requests, I noticed it didn't get a new ETag after saving.
Seems not all WebDAV implementations return a new ETag in PUT requests.

In my WebDAV service (WsgiDAV) - ETag is only served from a HEAD
request.

So if no ETag is found with PUT - we request one with HEAD.

This patch fixes error handling and should also work with servers that
provide ETag directly upon PUT.

* Add tweak from PMario
2018-05-04 11:48:38 +01:00
Jermolene
ab5e5795e8 Fix issue with lazy loading temporary tiddlers
Fixes #3235
2018-05-03 18:27:17 +01:00
Jermolene
c569df4bd4 Update hint for sticky titles option
Fixes #3249
2018-05-03 16:14:05 +01:00
Jermolene
b2173d11ea Restore default of preview pane hidden 2018-05-02 16:52:45 +01:00
Sebastian Silva
895447c40c Add write condition for DAT protocol (#3244)
In order to write to a DAT with Beaker Browser, it needs to have access to the file via `dat:` protocol.
2018-05-02 15:57:47 +01:00
BurningTreeC
5626148202 Fix for sidebar not showing #3223 (#3226)
* fix for sidebar not showing

I believe this fixes #3223

* add explaining comment

* ... and fix indentation.
2018-05-02 15:31:26 +01:00