1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-07-16 08:54:22 +00:00
Commit Graph

2160 Commits

Author SHA1 Message Date
Jeremy Ruston
f703330962 Merge branch 'master' into single-tiddler-mode 2020-01-17 12:54:51 +00:00
Jermolene
7f99b8c32e Merge branch 'master' into single-tiddler-mode 2018-10-02 14:19:22 +01:00
Jermolene
83a245ed21 Refactor utility for converting tiddlers to JSON 2018-10-01 11:27:45 +01:00
Jermolene
95111db7ee Merge branch 'master' into single-tiddler-mode 2018-09-28 18:32:07 +01:00
Jermolene
fe85845c3c Add new "\import" pragma 2018-09-28 16:01:32 +01:00
Jermolene
a0084eee9a Merge branch 'master' into single-tiddler-mode 2018-09-27 09:48:12 +01:00
Jermolene
cfb2d7c9c8 Add support for splash screens during loading
Fixes #3417

Addresses some of the requirements discussed in #2254
2018-09-27 09:47:55 +01:00
Jermolene
55740fbfaf Merge branch 'master' into single-tiddler-mode 2018-09-21 10:56:43 +01:00
Jermolene
7368cc74e1 Remove inadvertant usage of Object.assign
In order to retain compatibiltiy with IE11

See this discussion: https://groups.google.com/d/topic/tiddlywiki/RjA7_mee5oc/discussion
2018-09-21 10:56:01 +01:00
Jermolene
226a635c5c Merge branch 'master' into single-tiddler-mode 2018-09-13 20:42:52 +01:00
Jermolene
f98b4d5956 Add more logging for drop operations 2018-09-13 20:42:35 +01:00
Jermolene
874318091e Fix crash with illegal arguments to decodeuri(component)
Fixes #3428
2018-09-09 20:48:53 +01:00
Jermolene
9bc8cbfe98 Refactor getstoryviewsingletiddlermode operator into getstoryviewmode
Thanks @pmario
2018-08-31 13:00:30 +01:00
Jermolene
0d40b691e7 Make "close tiddler" button in STM go back to the previous tiddler in the history stack 2018-08-27 18:12:54 +01:00
Jermolene
7a50edb56d Refactor navigator attribute handling
And fix a bug whereby we weren't refreshing when some attributes changed
2018-08-26 23:57:17 +01:00
Jermolene
aba835fb74 Basics of single tiddler mode
* Storyviews expose a static "singleTiddlerMode" property to determine if they require single tiddler mode
* Navigator widget adds a "singleTiddlerMode" attribute; when set to "yes", the story list is entirely replaced during navigation
* Navigator widget now updates "list" field of $:/HistoryList with a more accessible version of the history list
* Add a getstoryviewsingletiddlermode[] operator so that we can obtain the story view STM status for passing to the navigator widget
2018-08-26 15:43:06 +01:00
Jermolene
e237d8fa97 Transliterate servername to safe ASCII
Fixes #3410
2018-08-24 14:33:31 +01:00
Jermolene
0f7ce7b67f Refactor navigator widget to use story utility to manipulate the storylist as well as the historylist 2018-08-23 18:31:48 +01:00
Jermolene
7dbe117bc5 Add username (if set) to the title of draft tiddlers
Makes things a bit easier to follow when working in multiuser environments.

@inmysocks, @danielo515, @arlen22, @pmario, @drakor does this make sense for your use cases?
2018-08-23 17:43:06 +01:00
Jermolene
7a6213dcbf Update code comment for $tw.utils.http 2018-08-23 13:13:49 +01:00
Jermolene
09112ed455 Add support for webp, heic, and heif image formats
https://en.wikipedia.org/wiki/WebP
https://en.wikipedia.org/wiki/High_Efficiency_Image_File_Format
2018-08-21 11:46:46 +01:00
Jermolene
fbaceaa8bd Don't steal "paste" events from contenteditable elements
Fixes pasting with a WYSIWYG editor
2018-08-20 15:26:41 +01:00
Andreas Hahn
fe527b7eaf Fixed type mismatch (#3403) 2018-08-19 18:22:52 +01:00
Jermolene
5a2e87eb09 Extend permalink/permaview to optionally copy URL to the clipboard
Fixes #3255
2018-08-16 19:39:18 +01:00
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
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
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
bef3242075 New text editor operation: save selection to a tiddler 2018-06-29 15:09:51 +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
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
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