1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-30 09:13:16 +00:00
Commit Graph

3717 Commits

Author SHA1 Message Date
jeremy@jermolene.com
77a929faa3 ActionPopup widget: Add ability to cancel all popups 2020-04-21 22:19:03 +01:00
jeremy@jermolene.com
c86a621d5d BrowseWidget: Add "accepts" attribute
And add docs for the 'message' and 'param' attributes
2020-04-21 22:18:34 +01:00
jeremy@jermolene.com
d6ee700bca Fix $tw.utils.getSubdirectories() 2020-04-21 21:21:38 +01:00
Simon Huber
39d532a4a0
Revert "Make input fields dismiss their popups when the ... (#4579)" (#4586)
This reverts commit 4efcad46f3.
2020-04-20 19:26:54 +01:00
Simon Huber
86d7564661
Update gruvbox dark for better readability of ... (#4585)
... toolbar buttons
2020-04-20 17:13:00 +01:00
Simon Huber
4efcad46f3
Make input fields dismiss their popups when the ... (#4579)
* Make input fields dismiss their popups when the ...

... fields loose focus (`blur`)

* Update simple.js
2020-04-20 15:49:30 +01:00
jeremy@jermolene.com
1546a4a189 Client-server: Add message about disabled plugin library
Fixes #4570
2020-04-20 13:28:02 +01:00
jeremy@jermolene.com
2649d2f7dc Syncer: Fix typos
Fixes a bug introduced in #4584
2020-04-20 13:19:27 +01:00
idotobi
154e886873
Fix Comment in Webserver API route tidlers.json (#4557)
This commit fixes the the comment in the route
`recipes/default/tiddlers.json` which was inconsistent with the actually
used regex. Furthermore, the 403 response was adjusted to also agree
with the the new comment and the regex.

Co-authored-by: tobidot <post@tobidot.net>
2020-04-20 13:07:06 +01:00
jeremy@jermolene.com
5688670da6 makelibrary command: Guard against invalid directories 2020-04-20 12:58:27 +01:00
jeremy@jermolene.com
678e25f510 makelibrary command should skip non-directories
Fixes #4583
2020-04-20 11:47:54 +01:00
jeremy@jermolene.com
15d7255728 Syncer: Should not call syncadaptor for missing tiddlers
Fixes #4580
2020-04-20 11:35:11 +01:00
Daniel Rodríguez Rivero
4ea79cb0c3
fix(syncer): restore tiddlerInfo param to saveTiddler (#4584)
This was added on a159b5baf3 and lost in #4373.
Will be a good idea to introduce tests against this kind of changes
2020-04-20 11:17:27 +01:00
jeremy@jermolene.com
e71a27ac2d Fix link widget to work within SVG elements 2020-04-19 12:57:56 +01:00
Jeremy Ruston
00686fc002 Preparing for v5.1.23-prerelease 2020-04-15 16:23:19 +01:00
Mario Pietsch
22802b4be8
Action create tiddler improvements (#4436)
* add a new-line before the log text to increase readability of the test output

* make eslint, jslint happy

* add $template and $overwrite parameter

* documentation for new parameters + 4 new examples

* remove unwanted files
2020-04-15 15:51:21 +01:00
Jeremy Ruston
7cbe766bde Utils: ParseInt should specify a radix
Thanks @pmario
2020-04-15 15:28:03 +01:00
Jeremy Ruston
f21d013241 jsontiddlers macro: parse "spaces" parameter as integer 2020-04-15 15:27:53 +01:00
Mario Pietsch
de5b0062b5
Add new parameters to fields-widget and fields-operator. (#4433)
* add a new-line before the log text to increase readability of the test output

* make eslint, jslint happy

* extend fields-widget with include/exclude/sort/reverse and fields-filter with include and exclude params plus DOCS

* remove new-line

* remove eslint settings

* restore old eslint settings

* remove typo
2020-04-15 12:36:48 +01:00
Mario Pietsch
2b6c87fb4b
Remove unwanted whitespace from sidebar links (#4552)
* add a new-line before the log text to increase readability of the test output

* make eslint, jslint happy

* it shouldn't be there

* fremove this file from my PRs

* fix 4532. Links should not add unwanted whitespace, since this causes problems with CSS styling

* remove whitespace from tiddler title and add a little bit of margin-right to the tiddler icon.

* use default parameters for link handling, which results in less code

* introduce tc-viewswitcher class to be able to style icon distance to text
2020-04-15 12:35:35 +01:00
Jeremy Ruston
2f3a95a0b8 Plugin Chooser: Display libraries as separate tabs
Suggested by @kookma
2020-04-15 10:20:17 +01:00
Cameron Fischer
65347ae858
Fixed join filter operator to never returns null (#4396)
If the operator were passed an empty list, it would return null
which could cause some proceeding operators to crash.
2020-04-14 17:49:38 +01:00
Cameron Fischer
43fdb553b7
Reduced indexOf calls in wiki.sortByList (#4275) (#4397)
Examined the tests in test-tag. They already cover all the use cases
I could think of.
2020-04-14 17:49:10 +01:00
Joshua Fontany
69c8058b72
Add has:index (#4540)
* has:index

* has:index

* has:index docs

* has op examples

* has op examples

* operator macros typo missing </div>

* possible mistake
2020-04-14 16:52:56 +01:00
Jeremy Ruston
0836fb7184 Makelibrary.js: Minor refactoring 2020-04-14 12:08:15 +01:00
jed
4146a04a9e
Fix makelibrary.js to use enviroment variable paths (#4559)
This makes makelibrary.js use environment variables to find paths for plugins, themes and languages instead of just using the paths hardcoded in boot.js
2020-04-14 12:03:12 +01:00
Jeremy Ruston
84eaee8210 Control Panel Plugin Listing: Fallback to last component of title if name field is missing 2020-04-14 11:52:01 +01:00
Jeremy Ruston
4bbc58dd24 Plugin Chooser: Ensure official plugin library is shown first 2020-04-13 11:45:06 +01:00
Jeremy Ruston
4529123777 Plugin Chooser: Colour of update all button should match individual update buttons
Fixes the final issue mentioned by @kookma at https://github.com/Jermolene/TiddlyWiki5/issues/4486#issuecomment-612841838
2020-04-13 11:38:53 +01:00
Jeremy Ruston
0d0698ea6e Plugin Chooser: Don't display the "already installed" message twice
Fixing the first issue here https://github.com/Jermolene/TiddlyWiki5/issues/4486#issuecomment-612841838 by @kookma
2020-04-13 11:35:52 +01:00
Jeremy Ruston
63dee16611 Plugin Chooser: Use separate tab state for each plugin library
Fixing the third issue at https://github.com/Jermolene/TiddlyWiki5/issues/4486#issuecomment-612841838 from @kookma
2020-04-13 11:28:24 +01:00
Jeremy Ruston
dc98432fa0 Plugin Chooser: Use existing template for updates tab 2020-04-13 11:11:16 +01:00
Jeremy Ruston
86296b67aa Plugin Chooser: Distinguish between install, reinstall, update and downgrade 2020-04-13 10:04:14 +01:00
Jeremy Ruston
245dab0c8c Plugin Chooser: Include currently installed version 2020-04-13 10:03:24 +01:00
Jeremy Ruston
7b53f5724c Add new compare filter operator
Fixes #4554
2020-04-13 10:03:01 +01:00
Jeremy Ruston
308ac8c5b0 AddPlugins: Add new "updates" tab 2020-04-09 11:07:13 +01:00
Jeremy Ruston
bc8859b550 AddPlugins: Add a clearer prompt for plugins that have subplugins 2020-04-09 11:06:54 +01:00
Jeremy Ruston
bdc5ac592f Fix count widget to return "0" for an empty filter string instead of undefined 2020-04-09 11:04:50 +01:00
Nils-Hero Lindemann
322c37d693
Let chained > blockquotes generate valid HTML (#4332)
* Replace "p" with "div" in itemTag

'>> text' will now be valid html.

* Make the new div's behave like p's
2020-04-07 20:39:13 +01:00
Jeremy Ruston
59fd557067 Minor tweaks to plugin library listings
* Adds a name to the core plugin
* Make plugin listings consistently show "name: description"
* Make plugin listings consistently sort by title (thus grouping publishers)
* Add a missing plugin name

See discussion here: https://github.com/Jermolene/TiddlyWiki5/pull/4508#issuecomment-609671970
2020-04-06 10:15:18 +01:00
saqimtiaz
21565f635e
Fix range widget for IE10/11 (#4534)
As detailed in #4519 the range widget currently does not save its value to the state tiddler on IE 10/11 as they do not support the input event, but rather the change event is fired instead of the input event. This has patch has been tested in IE11 and should work in IE10 as well.

Note that on Chrome and Firefox, the change event will fire only once after the user stops dragging the range slider (In addition the input event). However this does lead to an extra refresh as the handleInputEvent method already checks to see if the current value of the slider is different from the saved value before saving to the store.
2020-04-03 13:07:55 +01:00
Jeremy Ruston
cf46b6b0ff Add "class" attribute to dropzone widget 2020-04-03 10:33:39 +01:00
Simon Huber
bbdebb27ce
Add TiddlyDesktop's wikilist colours to Gruvbox palette (#4521) 2020-04-02 17:29:24 +01:00
Jeremy Ruston
1154372a7b Update syncer to distinguish connection errors from other errors
We can automatically remove connection errors when things resume working
2020-03-31 10:47:17 +01:00
Jeremy Ruston
b95723a022
Fix syncer to handler errors properly (#4373)
* First commit

* Add throttling of saves

Now we refuse to save a tiddler more often than once per second.

* Wait for a timeout before trying again after an error

* Modest optimisations of isDirty() method

* Synchronise system tiddlers and deletions from the server

Fixes two long-standing issues:

* Changes to system tiddlers are not synchronised from the server to the browser
* Deletions of tiddlers on the server are not propagated to browser clients

* Make sure we update the dirty status even if there isn't a task to perform

* Replace save-wiki button with popup sync menu

* Remove the "Server" control panel tab

We don't need it with the enhanced sync dropdown

* Add indentation to the save-wiki button

* Fix spacing in dropdown menu items

* Switch between cloud icons according to dirty status

* Add a menu item to copy syncer logs to the clipboard

* Improve animated icon

* Remove indentation from save-wiki button

@pmario the annoying thing is that using `\trim whitespace` trims significant whitespace too, so it means we have to use <$text text=" "/> when we need a space that won't be trimmed. For the moment, I've removed the indentation but will keep thinking about it.

* Further icon, UI and copy text tweaks

Move the icons and styles from the core into the TiddlyWeb plugin

* Clean up PR diff

* Tweak animation durations

* Break the actions from the syncer dropdown into separate tiddlers

@pmario I think this makes things a bit easier to follow

* Refactor syncadaptor creation and logging

The goal is for the syncadaptor to be able to log to the same logger as the syncer, so that the "copy syncer logs to clipboard" data is more useful.

* Don't transition the dirty indicator container colour, just the SVG's colour

* Only trigger a sync for changes to tiddlers we're interested in

Otherwise it is triggered by the creation of the alert tiddlers used to display errors.

* Restore deleting local tiddlers removed from the server

(I had commented it out for some testing and accidentally commited it).

* Guard against missing adaptor info

* We still need to trigger a timeout when there was no task to process

* Avoid repeatedly polling for changes

Instead we only trigger a timeout call at if there is a pending task (ie a tiddler that has changed but isn't yet old enough to save).

* Lazy loading: include skinny versions of lazily loaded tiddlers in the index.html

* Introduce _is_skinny field for indicating that a tiddler is subject to lazy loading

* Remove savetrail plugin from prerelease

It doesn't yet work with the new syncer

* Make the savetrail plugin work again

* Clear outstanding alerts when synchronisation is restored

* Logger: only remove alerts from the same component

Missed off 9f5c0de07

* Make the saving throttle interval configurable (#4385)

After switching Bob to use the core syncer the throttle interval makes saving feel very sluggish compared to the message queue setup that I had before.
The editing lock that I use to prevent conflicts with multiple users doesn't go away until the save is completed, and with the 1 second delay it means that if you edit a tiddler and save it than you have to wait one second before you can edit it again.

* Tweaks to appearance of alerts

* Exclude temp tiddlers from offline snapshots

Otherwise alerts will persist

* Tweak appearance of status line in dropdown

* Update release note

* Web server: Don't include full path in error messages

Fixes #3724

* In change event handler check for deletions

* Disable the official plugin library when the tiddlyweb plugin is loaded

* Hide error details from browser for /files/ route

See https://github.com/Jermolene/TiddlyWiki5/issues/3724#issuecomment-565702492 -- thanks @pmario

* Revert all the changes to the relationship between the syncer and the syncadaptor

Previously we had some major rearrangements to make it possible for the syncadaptor to route it's logging to the logger used by the syncer. The motivation is so that the "copy logs to clipboard" button is more useful.

On reflection, changing the interface this drastically is undesirable from a backwards compatibility perspective, so I'm going to investigate other ways to achieve the logger sharing

* Make the tiddlyweb adaptor use the syncer's logger

So that both are availavble when copying the syncer logs to the clipboard

* Update release note

* Support setting port=0 to get an OS assigned port

Quite useful

* Update code comment

* UI: Use "Get latest changes from server" instead of "Refresh"

* Add getUpdatedTiddlers() method to syncadaptor API

See https://github.com/Jermolene/TiddlyWiki5/pull/4373#issuecomment-573579495

* Refactor revision handling within the syncer

Thanks @pmario

* Fix typo in tiddlywebadaptor

* Improve presentation of errors

See https://github.com/Jermolene/TiddlyWiki5/pull/4373#issuecomment-573695267

* Add docs for getTiddlerRevision()

* Remove unused error animation

* Update comment for GET /recipes/default/tiddlers/tiddlers.json

* Optimise SVG cloud image

* Add optional list of allowed filters for get all tiddlers route

An attempt to address @Arlen22's concern here:

https://github.com/Jermolene/TiddlyWiki5/pull/4373#pullrequestreview-342146190

* Fix network error alert text translatability

* Fix error code and logging for GET /recipes/default/tiddlers/tiddlers.json

Thanks @Arlen22

* Flip GET /recipes/default/tiddlers/tiddlers.json allowed filter handling to be secure by default

* Validate updates received from getUpdatedTiddlers()

* Add syncer method to force loading of a tiddler from the server

* Remove the release note update to remove the merge conflict

* Fix crash when there's no config section in the tiddlywiki.info file

* Use config tiddler title to check filter query (merge into fix-syncer) (#4478)

* Use config tiddler title to check filter query

* Create config-tiddlers-filter.tid

* Add config switch to enable all filters on GET /recipes/default/tiddlers/tiddlers.json

And update docs

* Fix bug when deleting a tiddler with a shadow

Reported by @kookma at https://github.com/Jermolene/TiddlyWiki5/pull/4373#issuecomment-604027528

Co-authored-by: jed <inmysocks@fastmail.com>
Co-authored-by: Arlen22 <arlenbee@gmail.com>
2020-03-30 15:24:05 +01:00
Jeremy Ruston
091bcfce7d Fix the datauri macro to work with _canonical_uri tiddlers 2020-03-30 10:55:37 +01:00
Joshua Fontany
6f4daa70e1
GruvBoxDark palette contrast tweaks (#4522) 2020-03-29 13:44:09 +01:00
Rob Hoelz
ae04a425c0
Add backlinks indexer (#4421)
* Add tests for backlinks

* Add backlinks indexer

* Use backlinks indexer in getTiddlerBacklinks if available

* Extract link extraction into its own method

This way we can provide an arbitrary parse tree, rather than just a
title, which will allow us to compare lists of outgoing links between
versions of a single tiddler

* Use new extractLinks method in backlinks indexer

...rather than copy-pasting the implementation

* Remove ES6-isms

TiddlyWiki needs to work with browsers that only support ES5
2020-03-26 13:15:02 +00:00
Simon Huber
4232b402ab
Update Vanilla.tid (#4515) 2020-03-20 18:31:57 +00:00
Simon Huber
10ab83940a
Update Nord Palette for better readability (#4517) 2020-03-20 12:47:48 +00:00