Compare commits

...
154 Commits
Author SHA1 Message Date
Lauri Ojansivu dfcabc5a36 v7.60 2024-09-23 22:00:47 +03:00
Lauri Ojansivu 5c8cf2ebbd Updated ChangeLog. 2024-09-23 21:18:54 +03:00
Lauri Ojansivu a9d41217bd Removed outdated dependency page. To be seen, does anything break.
Thanks to xet7 !
2024-09-23 21:15:19 +03:00
Lauri Ojansivu 75f44a821c Merge branch 'feature/ostrio-flow-router-extra' of https://github.com/majus/wekan 2024-09-23 20:52:11 +03:00
Lauri Ojansivu 0ab16764d1 Updated ChangeLog. 2024-09-23 20:28:13 +03:00
Lauri Ojansivu b6e7e03c95 Added to Docs CNAME DNS info about CloudFlare and Sandstorm.
Thanks to xet7 !
2024-09-23 20:26:20 +03:00
Denis Perov 718c1a393d Switch from kadira:flow-router to ostrio:flow-router-extra 2024-09-23 19:25:55 +03:00
Lauri Ojansivu 50f3316088 Removed old models files that caused problems with login.
Thanks to xet7 !
2024-09-15 19:40:49 +03:00
Lauri Ojansivu 2727651897 Comment out not in use old attachments models code. 2024-09-08 17:42:04 +03:00
Lauri Ojansivu e72646a4d4 Add back old attachments models for attachment migrations.
Thanks to xet7 !
2024-09-08 16:46:17 +03:00
Lauri Ojansivu 8ef8d546c5 v7.59 2024-09-04 21:06:53 +03:00
Lauri Ojansivu a8b2d7a6bd Updated ChangeLog. 2024-09-04 21:00:19 +03:00
Lauri Ojansivu 0a1074ca6e Try 2 to fix apparmor denied in syslog at Snap Candidate. Newest MongoDB uses --host, not anymore --bind_ip.
Thanks to webenefits and xet7 !

Fixes #4855
2024-09-04 20:56:32 +03:00
Lauri Ojansivu 019d7c92c3 v7.58 2024-09-04 19:08:01 +03:00
Lauri Ojansivu cb653e03f2 Updated ChangeLog. 2024-09-04 19:04:18 +03:00
Lauri Ojansivu a6c8833f65 Try to fix apparrmor denied in syslog at Snap Candidate.
Thanks to webenefits and xet7 !

Fixes #4855
2024-09-04 19:01:41 +03:00
Lauri Ojansivu f00b39d154 v7.57 2024-09-04 11:57:53 +03:00
Lauri Ojansivu 39597e04ac Updated ChangeLog. 2024-09-04 10:57:49 +03:00
Lauri Ojansivu 1610eff0e9 Updated dependencies.
Thanks to developers of dependencies.
2024-09-04 10:55:48 +03:00
Lauri Ojansivu c944f9fdff Updated ChangeLog. 2024-09-04 10:37:38 +03:00
Lauri Ojansivu 9b4d4c5953 Merge pull request #5523 from walster001/main
Large updates to UI
2024-09-04 10:32:13 +03:00
walster001 a8f09011e9 Exodark Margin Fix
Added 10px margin to ExoDark lists also (following on from Clearblue fix) as with those rounded backgrounded lists I feel it looks nicer to give it some padding. 

Open to other contributors perspective however.
2024-09-04 14:17:11 +09:30
walster001 2e1675969a Clearblue Margin - comment
Add comment to explain changes to margin in case someone wants to revert in future
2024-09-04 14:10:31 +09:30
walster001 a71973cc80 Clearblue Margin Fix
Fix ClearBlue lists being butted up against the left hand side of the screen when viewed from a non-editor account (IE comment only).
2024-09-04 14:09:28 +09:30
walster001 608ec63899 Large updates to UI
- Added a wide range of updates/tweaks to various board themes
- Better defined theme start/endpoints in code
- Added modern scrollbars matching each theme
- Added styling to scrollbars in pop-over and horizontally across screen
- Tweaks to opacity/themes to work better with board backgrounds.
2024-09-04 13:56:06 +09:30
Lauri Ojansivu 52bdba8e85 Updated ChangeLog. 2024-09-01 19:15:00 +03:00
Lauri Ojansivu f5b11b15ce Merge pull request #5519 from LanetNetwork/templ_upd
Update templates
2024-08-28 14:45:24 +03:00
Dmytro Novash 3359559ad2 Merge branch 'wekan:main' into templ_upd 2024-08-28 14:24:28 +03:00
Dmytro Novash b4aa464473 use label instead of span 2024-08-28 14:23:35 +03:00
Lauri Ojansivu dbe31a86b7 Update LICENSE 2024-08-28 05:27:49 +03:00
Lauri Ojansivu bd283ff4e2 Merge pull request #5517 from walster001/main
Rework fix for mobile devices to incorporate all themes/list headers
2024-08-27 20:58:27 +03:00
walster001 c020ce8895 Remove vertical-align - doesn't fix for all board themes 2024-08-27 19:53:19 +09:30
walster001 f3562525db Create boardColors.css 2024-08-27 19:50:01 +09:30
walster001 cc89c35c8d Merge branch 'main' of https://github.com/walster001/wekan-atlanz 2024-08-27 19:38:38 +09:30
walster001 2457084db2 Update padding values/display for Mobile Devices
Have modified this in my test dev server, it appears this is the property that defines the spacing/containment of text for lists. When tested on iOS device this appears to work correctly. 

Last commit removing vertical align, and iinitial commit unsetting line height for ModernDark fixes an issue where text was super spaced out on ModernDark theme only.
2024-08-27 19:31:13 +09:30
walster001 508a2d7103 Revert vertical-align. Left line-height unset.
Didn't fix issue as its more than just modern-dark theme. Have played around on dev server and found its in the list css itself.
2024-08-27 19:28:06 +09:30
Lauri Ojansivu 3d7fef67d8 v7.56 2024-08-26 17:39:24 +03:00
Lauri Ojansivu d63d445b7d Upgraded Snap Candidate MongoDB to 6.0.17.
Thanks to MongoDB developers !
2024-08-26 17:30:05 +03:00
Lauri Ojansivu 8d3fe29c68 Update Browser-compatibility-matrix.md 2024-08-23 15:29:46 +03:00
Lauri Ojansivu ad3ecbfd96 Update Browser-compatibility-matrix.md 2024-08-23 15:28:21 +03:00
Lauri Ojansivu 51ec43e7bc Update Browser-compatibility-matrix.md 2024-08-23 15:27:24 +03:00
Lauri Ojansivu 88dfc57e7e Update Browser-compatibility-matrix.md 2024-08-23 15:25:13 +03:00
Lauri Ojansivu 7409c366f6 Update Browser-compatibility-matrix.md 2024-08-23 15:24:01 +03:00
Lauri Ojansivu b99b2a6d66 Update Browser-compatibility-matrix.md 2024-08-23 15:21:21 +03:00
walster001 fa21b00bb6 Merge branch 'wekan:main' into main 2024-08-23 00:27:31 +09:30
walster001 f061b5e12a Clean up theme descriptions, add scrollbars
- Cleaned up theme descriptions as many themes weren't labelled/or had mismatched descriptions.
- Began adding scrollbars to default themes/board canvases.
- Test removal of lines/editing margins on nephritis theme
2024-08-23 00:25:29 +09:30
Lauri Ojansivu 8ca642edc8 Updated ChangeLog. 2024-08-21 00:55:31 +03:00
Lauri Ojansivu c3909edc5e Fix apparmor denied in syslog at Snap Candidate.
Thanks to webenefits and xet7 !

Fixes #4855
2024-08-21 00:52:15 +03:00
Lauri Ojansivu f4cf09d394 Merge pull request #5511 from wekan/dependabot/github_actions/docker/build-push-action-6.7.0
Bump docker/build-push-action from 6.6.1 to 6.7.0
2024-08-19 23:37:54 +03:00
dependabot[bot] 6aa4f9fb86 Bump docker/build-push-action from 6.6.1 to 6.7.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.6.1 to 6.7.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/16ebe778df0e7752d2cfcbd924afdbbd89c1a755...5cd11c3a4ced054e52742c5fd54dca954e0edd85)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-19 20:10:48 +00:00
Lauri Ojansivu a31545824e Updated ChangeLog. 2024-08-19 22:23:18 +03:00
Lauri Ojansivu a94cfd5b91 Update Docker.md for docker compose commands and building custom docker image
Update Docker.md for docker compose commands and building custom docker image
2024-08-19 11:03:58 +03:00
Lauri Ojansivu 6d6d51310e Update docker-compose.yml docker compose command
Update docker-compose.yml docker compose command
2024-08-19 11:00:47 +03:00
Lauri Ojansivu c9cf2971de Merge pull request #5505 from wekan/dependabot/github_actions/docker/build-push-action-6.6.1
Bump docker/build-push-action from 6.5.0 to 6.6.1
2024-08-12 23:47:53 +03:00
dependabot[bot] 54c481e3d8 Bump docker/build-push-action from 6.5.0 to 6.6.1
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.5.0 to 6.6.1.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/5176d81f87c23d6fc96624dfdbcd9f3830bbe445...16ebe778df0e7752d2cfcbd924afdbbd89c1a755)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-12 20:46:26 +00:00
Lauri Ojansivu 8b4fbd266d Merge pull request #5503 from walster001/main
Fix ModernDark Mobile View List Titles
2024-08-12 22:56:01 +03:00
Lauri Ojansivu 3c5241b007 Updated ChangeLog. 2024-08-12 22:09:48 +03:00
Lauri Ojansivu 42a1f94931 Updated ChangeLog. 2024-08-12 22:04:43 +03:00
Lauri Ojansivu cae6f38b80 Updated code of conduct. 2024-08-12 21:59:01 +03:00
walster001 25722e5e9d Tweaks to exodark for board backgrounds
Removed drop shadow on exodark cards, as when background applied to board it looks a bit rough design wise. 

Added background-color that will disappear when background is applied, and when background is not applied gives exodark a bit of a smoother cleaner look IMO
2024-08-12 23:49:12 +09:30
walster001 1d339ec17e Update boardColors.css 2024-08-12 21:28:14 +09:30
Lauri Ojansivu ec534c8cca Update Browser-compatibility-matrix.md 2024-08-11 19:15:15 +03:00
Lauri Ojansivu cab285c34d Update Browser-compatibility-matrix.md 2024-08-11 19:12:36 +03:00
Lauri Ojansivu 975993dd6d v7.55 2024-08-08 17:32:35 +03:00
Lauri Ojansivu 43084eb664 Updated ChangeLog. 2024-08-08 17:25:16 +03:00
Lauri Ojansivu 0e770ac3b3 Merge pull request #5501 from walster001/main
Fix board backgrounds not showing correctly after V7.54
2024-08-08 17:20:08 +03:00
walster001 206abc8c68 Fix board backgrounds not showing correctly.
Fixed board backgrounds not showing correctly on the following themes. Various code modified as different themes have used different code to implement the background.

Have tried to stick with board-wrapper as a standard to apply the background colour to.
Board background image will override board-wrapper colour every time.

Dark
Relax
Natural
Modern
ModernDark
Exodark
CleanDark
CleanLight

- Updated pull due to original file I had stored on my pc 139 commits behind! So synced that and then redid code changes to bring it all up to date.
2024-08-08 23:34:09 +09:30
walster001 62b13cc343 Merge branch 'main' of https://github.com/walster001/wekan-atlanz 2024-08-08 23:23:00 +09:30
walster001 7822dd3b75 Fix board backgrounds not showing correctly
Fixed board backgrounds not showing correctly on the following themes.
Various code modified as different themes have used different code to implement the background.

Have tried to stick with board-wrapper as a standard to apply the background colour to.

Board background image will override this every time.

- Dark
- Relax
- Natural
- Modern
- ModernDark
- Exodark
- CleanDark
- CleanLight
2024-08-08 22:51:07 +09:30
Lauri Ojansivu a214cd64b6 v7.54 2024-08-07 17:51:01 +03:00
Lauri Ojansivu 8839a8ea39 Updated ChangeLog. 2024-08-07 17:26:47 +03:00
Lauri Ojansivu a4169f3da7 Fix LDAP login fails after upgrade.
Thanks to juppees !

Fixes #5499
2024-08-07 17:24:14 +03:00
Lauri Ojansivu 19d59b3ab4 Updated ChangeLog. 2024-08-07 00:25:57 +03:00
Lauri Ojansivu 27b2e2384c Merge pull request #5498 from mfilser/master
Bugfix, edit description didn't work if it was clicked
2024-08-07 00:24:58 +03:00
Lauri Ojansivu 49d2cbc2c1 Updated ChangeLog. 2024-08-07 00:23:49 +03:00
Martin Filser bf2b3b40cd Bugfix, edit description didn't work if it was clicked
- introduced by commit: 0cc63b810c
2024-08-06 23:22:58 +02:00
Lauri Ojansivu 1541c6ca23 Merge pull request #5497 from mfilser/master
listHeader, simpler code logic at collapsed if conditions
2024-08-07 00:22:23 +03:00
Lauri Ojansivu 42c1ff94e2 Updated ChangeLog. 2024-08-07 00:13:13 +03:00
Martin Filser 53aa5ebc17 listHeader, simpler code logic at collapsed if conditions 2024-08-06 23:12:31 +02:00
Lauri Ojansivu 0f43818757 Merge pull request #5496 from mfilser/master
Bugfix, Cards Count on mobile view was missing
2024-08-07 00:12:11 +03:00
Lauri Ojansivu f3c5b1eb07 Updated ChangeLog. 2024-08-07 00:11:36 +03:00
Martin Filser 517d1bb7fa Bugfix, Cards Count on mobile view was missing
introduced by:
a601ba542a
2024-08-06 23:10:30 +02:00
Lauri Ojansivu 6ee0919ead Merge pull request #5495 from mfilser/master
Editor, Bugfix, copy text is now at each editor (textarea) again
2024-08-07 00:10:03 +03:00
Martin Filser 13eb1a58e0 Editor, migrate to markdown at same line than copy text icon 2024-08-06 23:06:51 +02:00
Martin Filser 08f9c09484 Editor, Bugfix, copy text is now at each editor (textarea) again 2024-08-06 23:05:54 +02:00
Lauri Ojansivu 3f3abe26ee Updated ChangeLog. 2024-08-07 00:05:09 +03:00
Lauri Ojansivu e31c5b6d42 Merge pull request #5494 from mfilser/master
Minicard, show creator, defaultValue of schema and other code is now the same
2024-08-07 00:03:47 +03:00
Martin Filser 7bf77fa7cb Minicard, show creator, defaultValue of schema and other code is now the same 2024-08-06 23:00:42 +02:00
Lauri Ojansivu a2662f1366 Updated ChangeLog. 2024-08-06 23:57:40 +03:00
Lauri Ojansivu 116cf6aa21 Merge pull request #5493 from mfilser/master
board view, first column a bit smaller to save screen space
2024-08-06 23:56:20 +03:00
Lauri Ojansivu 79bb6d0c55 Updated ChangeLog. 2024-08-06 23:55:12 +03:00
Martin Filser c157ecec38 board view, first column to add a new list was too large 2024-08-06 22:53:53 +02:00
Martin Filser 28893cf637 Bugfix, in View "Lists" the first column only showed the first 10 minicards, now all minicards again 2024-08-06 22:53:53 +02:00
Lauri Ojansivu 73ffc99f37 Merge pull request #5492 from mfilser/master
sidebar xmark icon, add padding and background color
2024-08-06 23:53:24 +03:00
Martin Filser 35802c7c62 sidebar xmark-icon, background color on hover the icon 2024-08-06 22:45:51 +02:00
Martin Filser bc44fdf89c sidebar xmark icon, add padding to easier click 2024-08-06 22:45:51 +02:00
Lauri Ojansivu 030c3dd587 Updated ChangeLog. 2024-08-06 23:38:33 +03:00
Lauri Ojansivu 498be2759e Merge pull request #5491 from mfilser/master
fix empty parentId in cards
2024-08-06 23:37:38 +03:00
Lauri Ojansivu 649d00733a Updated ChangeLog. 2024-08-06 23:36:07 +03:00
Martin Filser 8a7a4f3033 fix empty parentId in cards
- if the parentId is undefined or empty, the code run in a infinite loop and
  the browser "hangs"
2024-08-06 22:35:16 +02:00
Lauri Ojansivu b6ce81dc79 Merge pull request #5490 from mfilser/master
change Meteor.user() to ReactiveCache.getCurrentUser()
2024-08-06 23:35:07 +03:00
Lauri Ojansivu 490c417cee Updated ChangeLog. 2024-08-06 23:33:59 +03:00
Martin Filser 2dfeb3924b reactiveCache, removing commented out code 2024-08-06 22:33:03 +02:00
Martin Filser bff96f6ae2 change Meteor.user() to ReactiveCache.getCurrentUser()
- see also: https://github.com/wekan/wekan/issues/5000
2024-08-06 22:33:03 +02:00
Lauri Ojansivu 4801e26b2f Merge pull request #5489 from mfilser/master
attachment popup back was broken since new attachment viewer, now fixed
2024-08-06 23:32:53 +03:00
Lauri Ojansivu 027997f7b3 Updated ChangeLog. 2024-08-06 23:32:29 +03:00
Martin Filser 76aaefbde1 attachment popup back was broken since new attachment viewer, now fixed 2024-08-06 22:30:51 +02:00
Lauri Ojansivu a01bc0f325 Merge pull request #5488 from mfilser/master
remove attachment storage name from attachment list
2024-08-06 23:30:23 +03:00
Martin Filser f6f4f5660e remove attachment storage name from attachment list
- this was for debugging, now not necessary anymore
2024-08-06 22:26:00 +02:00
Lauri Ojansivu 956925889a Updated ChangeLog. 2024-08-06 23:23:42 +03:00
Lauri Ojansivu 0bd49326d8 Merge pull request #5487 from mfilser/master
little opacity to minicards to see the background image a little bit
2024-08-06 23:22:32 +03:00
Lauri Ojansivu 64c4e8eca8 Updated ChangeLog. 2024-08-06 23:22:04 +03:00
Lauri Ojansivu 55fc342f6d Added info how with Caddy webserver config, PWA and Android app override icons, showing toolbars, etc.
Thanks to xet7 !
2024-08-06 23:19:43 +03:00
Martin Filser 3ae0d96760 little opacity to minicards to see the background image a little bit 2024-08-06 22:03:16 +02:00
Lauri Ojansivu fc1e55cc19 Updated ChangeLog. 2024-08-06 22:58:13 +03:00
Lauri Ojansivu 58fc810a43 Merge pull request #5486 from mfilser/master
Bugfix, variable "color" didn't exist
2024-08-06 22:55:58 +03:00
Martin Filser 3c477e9783 Bugfix, variable "color" didn't exist
- background-color is maybe wrong too, but better than throwing an exception
2024-08-06 21:50:57 +02:00
Lauri Ojansivu f2247ed86d Updated ChangeLog. 2024-08-06 22:48:32 +03:00
Lauri Ojansivu 0d9a9d1ed8 Merge branch 'main' of github.com:wekan/wekan 2024-08-06 22:46:00 +03:00
Lauri Ojansivu ca5a579e22 PWA, move to standalone (standard) to display the status bar.
Thanks to mfilser !

Related https://github.com/wekan/wekan/pull/5484
2024-08-06 22:44:51 +03:00
Lauri Ojansivu 53d97a593f Merge pull request #5485 from mfilser/master
don't set background image in .board-canvas too
2024-08-06 22:38:27 +03:00
Martin Filser 3641a8f389 don't set background image in .board-canvas too 2024-08-06 21:30:27 +02:00
Lauri Ojansivu 1dea1bd09d Merge pull request #5483 from mfilser/master
fix error on console when user logout
2024-08-06 19:09:22 +03:00
Martin Filser 3db265d57f fix error on console when user logout (Part 2) 2024-08-06 17:24:43 +02:00
Martin Filser 38a32824ea fix error on console when user logout (Part 1) 2024-08-06 17:24:43 +02:00
Lauri Ojansivu b0c94f7ff2 Updated ChangeLog. 2024-08-05 13:06:51 +03:00
Lauri Ojansivu 2415aa3d2b v7.53 2024-08-03 22:16:18 +03:00
Lauri Ojansivu 1af1844f37 Updated Snap Candidate to MongoDB 6.0.16.
Thanks to MongoDB developers !
2024-08-03 22:13:08 +03:00
Lauri Ojansivu 75bb247c2b Updated ChangeLog. 2024-08-03 21:52:34 +03:00
Lauri Ojansivu 5a1b517733 Merge pull request #5481 from mfilser/master
reducing card size in database if no planning poker was started
2024-08-03 21:50:27 +03:00
Lauri Ojansivu 0fbc8754f7 Updated ChangeLog. 2024-08-03 21:49:12 +03:00
Lauri Ojansivu aaca60b676 Copied changes from wiki to docs.
Thanks to xet7 !
2024-08-03 21:47:10 +03:00
Martin Filser a929d1e3a4 reducing card size in database if no planning poker was started
reducing:
- cards collection size
- database size
- size to transfer from server to client (publish / subscribe)
2024-08-03 20:40:29 +02:00
Lauri Ojansivu 4a7fa7c396 Updated ChangeLog. 2024-08-03 21:36:22 +03:00
Lauri Ojansivu 45674806d7 Fix dragscroll package name.
Thanks to xet7 !
2024-08-03 21:35:04 +03:00
Lauri Ojansivu 8905bc7dfe Updated ChangeLog. 2024-08-03 21:21:19 +03:00
Lauri Ojansivu dd6aec1ba9 Merge pull request #5480 from mfilser/master
changing card color now closes the popup and doesn't refresh the whole boards page
2024-08-03 21:12:05 +03:00
Lauri Ojansivu aca5fa4d0a Merge branch 'main' of github.com:wekan/wekan 2024-08-03 21:11:23 +03:00
Lauri Ojansivu 0d1f45b8a2 Updated ChangeLog. 2024-08-03 21:11:01 +03:00
Lauri Ojansivu 3f9ae57144 Updated dependencies.
Thanks to developers of dependencies.
2024-08-03 21:09:30 +03:00
Martin Filser 45c2f1007b changing card color now closes the popup and doesn't refresh the whole boards page 2024-08-03 20:06:51 +02:00
Lauri Ojansivu 83adaa3074 Merge pull request #5479 from mfilser/master
fixing of "mode is undefined" on first activity component creation
2024-08-03 21:06:33 +03:00
Martin Filser 1951b279c0 fixing of "mode is undefined" on first activity component creation 2024-08-03 20:03:46 +02:00
Lauri Ojansivu 50406ad683 Merge pull request #5478 from mfilser/master
Board Menu Popup's were opened twice because of 2 same event creation
2024-08-03 21:03:15 +03:00
Martin Filser 95740eaa01 Board Menu Popup's were opened twice because of 2 same event creation 2024-08-03 19:58:25 +02:00
Lauri Ojansivu 08f2c1c735 Merge pull request #5477 from mfilser/dragscroll
adding Dragscroll to scroll the board
2024-08-03 20:54:03 +03:00
Martin Filser 32459ec405 No dragscroll on card details 2024-08-03 19:45:55 +02:00
Martin Filser c7ac0cbce1 No dragscroll while sorting swimlanes 2024-08-03 19:45:55 +02:00
Martin Filser 711fb5754e No dragscroll while sorting checklists 2024-08-03 19:45:55 +02:00
Martin Filser 24fffd8bfa Dragscroll, change cursor while scrolling + support summernote compatibily 2024-08-03 19:45:55 +02:00
Martin Filser 52556aff68 Dragscroll, disable scroll on input, textarea and select 2024-08-03 19:45:55 +02:00
Martin Filser c76959ff25 Dragscroll possible, scroll the screen with the mouse at desktop view
- click on a empty list area and drag the view left/right to scroll
2024-08-03 19:45:45 +02:00
Lauri Ojansivu a141871e60 Updated ChangeLog. 2024-08-03 20:42:30 +03:00
Lauri Ojansivu 5e639a7c2d Updated release script: New install webpage location.
Thanks to xet7 !
2024-08-03 20:39:49 +03:00
112 changed files with 1764 additions and 5306 deletions

No files matched your search

+2 -2
View File
@@ -8,8 +8,8 @@ LABEL org.opencontainers.image.source="https://github.com/wekan/wekan"
# - gyp does not yet work with Ubuntu 22.04 ubuntu:rolling,
# so changing to 21.10. https://github.com/wekan/wekan/issues/4488
ENV BUILD_DEPS="apt-utils gnupg gosu wget bzip2 g++ iproute2 apt-transport-https libarchive-tools git"
ENV DEV_DEPS="curl python3 ca-certificates build-essential"
ENV BUILD_DEPS="apt-utils gnupg gosu wget bzip2 g++ iproute2 apt-transport-https libarchive-tools"
ENV DEV_DEPS="curl python3 ca-certificates build-essential git"
ARG DEBIAN_FRONTEND=noninteractive
ENV \
-2
View File
@@ -97,12 +97,10 @@
"Avatar": true,
"Avatars": true,
"BlazeComponent": false,
"BlazeLayout": false,
"CollectionHooks": false,
"DocHead": false,
"ESSearchResults": false,
"FastRender": false,
"FlowRouter": false,
"FS": false,
"getSlug": false,
"Migrations": false,
+1 -1
View File
@@ -55,7 +55,7 @@ jobs:
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
uses: docker/build-push-action@5176d81f87c23d6fc96624dfdbcd9f3830bbe445
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
+2 -4
View File
@@ -26,7 +26,6 @@ mquandalle:collection-mutations
# Account system
accounts-password@2.4.0
useraccounts:core
useraccounts:flow-routing
useraccounts:unstyled
simple:rest-accounts-password
wekan-ldap
@@ -44,7 +43,6 @@ reactive-dict@1.3.1
session@1.2.1
tracker@1.3.3
underscore@1.0.13
arillo:flow-router-helpers
audit-argument-checks@1.0.7
kadira:dochead
mquandalle:autofocus
@@ -81,16 +79,16 @@ meteortesting:mocha@2.0.3
aldeed:simple-schema
matb33:collection-hooks
simple:json-routes
kadira:flow-router
spacebars
service-configuration@1.3.2
communitypackages:picker
minifier-css@1.6.4
blaze
kadira:blaze-layout
peerlibrary:blaze-components
ejson@1.1.3
logging@1.3.3
wekan-fullcalendar
momentjs:moment@2.29.3
wekan-fontawesome
ostrio:flow-router-extra
useraccounts:flow-routing-extra
+2 -5
View File
@@ -7,7 +7,6 @@ aldeed:schema-deny@1.1.0
aldeed:schema-index@1.1.1
aldeed:simple-schema@1.5.4
allow-deny@1.1.1
arillo:flow-router-helpers@0.5.2
audit-argument-checks@1.0.7
autoupdate@1.8.0
babel-compiler@7.10.5
@@ -54,9 +53,7 @@ id-map@1.1.1
idmontie:migrations@1.0.3
inter-process-messaging@0.1.1
jquery@3.0.0
kadira:blaze-layout@2.3.0
kadira:dochead@1.5.0
kadira:flow-router@2.12.1
konecty:mongo-counter@0.0.5_3
lmieulet:meteor-coverage@1.1.4
localstorage@1.2.0
@@ -103,6 +100,7 @@ ordered-dict@1.1.0
ostrio:cookies@2.7.2
ostrio:cstorage@4.0.1
ostrio:files@2.3.3
ostrio:flow-router-extra@3.9.0
ostrio:i18n@3.2.1
pascoual:pdfkit@1.0.7
peerlibrary:assert@0.3.0
@@ -147,7 +145,7 @@ ui@1.0.13
underscore@1.0.13
url@1.3.2
useraccounts:core@1.16.2
useraccounts:flow-routing@1.15.0
useraccounts:flow-routing-extra@1.1.0
useraccounts:unstyled@1.14.2
webapp@1.13.6
webapp-hashing@1.1.1
@@ -162,5 +160,4 @@ wekan-ldap@0.0.2
wekan-markdown@1.0.9
wekan-oidc@1.0.12
yasaricli:slugify@0.0.7
zimme:active-route@2.3.2
zodern:types@1.0.10
+166
View File
@@ -15,6 +15,172 @@ Fixing other platforms In Progress.
[How to upgrade WeKan](https://github.com/wekan/wekan/issues/4585)
# v7.60 2024-09-23 WeKan ® release
This release adds the following updates:
- [Added to Docs CNAME DNS info about CloudFlare and Sandstorm](https://github.com/wekan/wekan/commit/b6e7e03c95dfa68c8de6922ffb7663631e476d91).
Thanks to xet7.
- [Switch from kadira:flow-router to ostrio:flow-router-extra](https://github.com/wekan/wekan/pull/5530).
Thanks to imajus.
- [Removed outdated dependency page. To be seen, does anything break](https://github.com/wekan/wekan/commit/a9d41217bd8c797b28510efec3e21a92d7ec4bba).
Thanks to xet7.
Thanks to above GitHub users for their contributions and translators for their translations.
# v7.59 2024-09-04 WeKan ® release
This release tries to fix the following bugs:
- [Try 2 to fix apparmor denied in syslog at Snap Candidate](https://github.com/wekan/wekan/commit/0a1074ca6e95728b0da30bd701ba783f2a4bdd98).
Newest MongoDB uses --host, not anymore --bind_ip.
Thanks to webenefits and xet7.
Thanks to above GitHub users for their contributions and translators for their translations.
# v7.58 2024-09-04 WeKan ® release
This release tries to fix the following bugs:
- [Try to fix apparrmor denied in syslog at Snap Candidate](https://github.com/wekan/wekan/commit/a6c8833f652ee84284da2195bf79fb8edaa818b7).
Thanks to webenefits and xet7.
Thanks to above GitHub users for their contributions and translators for their translations.
# v7.57 2024-09-04 WeKan ® release
This release adds the following updates:
- [Rework fix for mobile devices to incorporate all themes/list headers](https://github.com/wekan/wekan/pull/5517).
Thanks to walster001.
- [Update templates to use label instead of span](https://github.com/wekan/wekan/pull/5519).
Thanks to novashdima.
- [Large updates to UI CSS](https://github.com/wekan/wekan/pull/5523).
Thanks to walster001.
- [Updated dependencies](https://github.com/wekan/wekan/commit/1610eff0e9212fdf6423ce5579b7bdaf8e45950b).
Thanks to developers of dependencies.
Thanks to above GitHub users for their contributions and translators for their translations.
# v7.56 2024-08-21 WeKan ® release
This release adds the following updates:
- Updated Browser compatibility matrix.
[Part 1](https://github.com/wekan/wekan/commit/cab285c34d1f159120ccd48b17a897e95bd48471),
[Part 2](https://github.com/wekan/wekan/commit/ec534c8cca3f0256091c2d870c128d26033d40ad).
- [Updated code of conduct](https://github.com/wekan/wekan/commit/cae6f38b8070cfcc2f2529027f7e66b965a19f05).
Thanks to xet7.
- [Updated Docker build actions](https://github.com/wekan/wekan/pull/5505).
Thanks to dependabot.
- Updated docs for building custom Docker image.
[Part 1](https://github.com/wekan/wekan/issues/5509),
[Part 2](https://github.com/wekan/wekan/commit/6d6d51310e4168cd0fc75f550d3af35df9ccef9f),
[Part 3](https://github.com/wekan/wekan/commit/a94cfd5b91d29f81e51e67ed03ba84f820d4892a).
- [Update mongodb chart version to 15.6.18 and enables wekan to be deployed on an OpenShift cluster](https://github.com/wekan/charts/pull/36).
Thanks to fobrice.
- [Upgraded Snap Candidate MongoDB to 6.0.17](https://github.com/wekan/wekan/commit/d63d445b7d5da48c05d0fbd4e560c00283b1aef7).
Thanks to MongoDB developers.
and fixes the following bugs:
- [Fix ModernDark Mobile View List Titles](https://github.com/wekan/wekan/pull/5503).
Thanks to walster001.
- [Fix apparmor denied in syslog at Snap Candidate](https://github.com/wekan/wekan/commit/c3909edc5ee7a82b694b19ca7e022cbdfd12affd).
Thanks to webenefits and xet7.
Thanks to above GitHub users for their contributions and translators for their translations.
# v7.55 2024-08-08 WeKan ® release
This release fixes the following bugs:
- [Fix board backgrounds not showing correctly after v7.54](https://github.com/wekan/wekan/pull/5501).
Thanks to walster001.
Thanks to above GitHub users for their contributions and translators for their translations.
# v7.54 2024-08-07 WeKan ® release
This release adds the following new features:
- [Helm Chart: Add Support for Overriding Image Registry in Airgapped Environments](https://github.com/wekan/charts/pull/35).
Thanks to geilername.
- [PWA, move to standalone (standard) to display the status bar](https://github.com/wekan/wekan/pull/5484)
Thanks to mfilser.
- [Added info how with Caddy webserver config, PWA and Android app override icons, showing toolbars, etc](https://github.com/wekan/wekan/commit/55fc342f6d90d8e30b70a8903ecead1c4370bd89).
Thanks to xet7.
and fixes the following bugs:
- [Don't set background image in .board-canvas too](https://github.com/wekan/wekan/pull/5485).
Thanks to mfilser.
- [Bugfix, variable "color" didn't exist](https://github.com/wekan/wekan/pull/5486).
Thanks to mfilser.
- [Little opacity to minicards to see the background image a little bit](https://github.com/wekan/wekan/pull/5487).
Thanks to mfilser.
- [Remove attachment storage name from attachment list](https://github.com/wekan/wekan/pull/5488).
Thanks to mfilser.
- [Attachment popup back was broken since new attachment viewer, now fixed](https://github.com/wekan/wekan/pull/5489).
Thanks to mfilser.
- [Change Meteor.user() to ReactiveCache.getCurrentUser()](https://github.com/wekan/wekan/pull/5490).
Thanks to mfilser.
- [Fix empty parentId in cards](https://github.com/wekan/wekan/pull/5491).
Thanks to mfilser.
- [Sidebar xmark icon, add padding and background color](https://github.com/wekan/wekan/pull/5492).
Thanks to mfilser.
- [Board view, first column a bit smaller to save screen space](https://github.com/wekan/wekan/pull/5493).
Thanks to mfilser.
- [Minicard, show creator, defaultValue of schema and other code is now the same](https://github.com/wekan/wekan/pull/5494).
Thanks to mfilser.
- [Editor, Bugfix, copy text is now at each editor (textarea) again](https://github.com/wekan/wekan/pull/5495).
Thanks to mfilser.
- [Bugfix, Cards Count on mobile view was missing](https://github.com/wekan/wekan/pull/5496).
Thanks to mfilser.
- [ListHeader, simpler code logic at collapsed if conditions](https://github.com/wekan/wekan/pull/5497).
Thanks to mfilser.
- [Bugfix, edit description didn't work if it was clicked](https://github.com/wekan/wekan/pull/5498).
Thanks to mfilser.
- [Fix LDAP login fails after upgrade](https://github.com/wekan/wekan/commit/a4169f3da773e4fd961acd0266260085a753cdab).
Thanks to juppees and xet7.
Thanks to above GitHub users for their contributions and translators for their translations.
# v7.53 2024-08-03 WeKan ® release
This release adds the following new features:
- [Added Dragscroll to scroll the board](https://github.com/wekan/wekan/pull/5477).
Click on an empty space in the board, hold the left mouse and move left and right
to scroll the board easily.
Thanks to mfilser.
and adds the following updates:
- [Updated release script: New install webpage location](https://github.com/wekan/wekan/commit/5e639a7c2d6dc1182ba95e44875ac8a6798a62be).
Thanks to xet7.
- [Updated dependencies](https://github.com/wekan/wekan/commit/3f9ae57144dc9befd674c784896d68b5db9df146).
Thanks to developers of dependencies.
- [Copied changes from wiki to docs](https://github.com/wekan/wekan/commit/aaca60b6760cc84b56a24fc15c93f23b4a34f06e).
Thanks to xet7.
- [Updated Snap Candidate to MongoDB 6.0.16](https://github.com/wekan/wekan/commit/1af1844f37d17f9f54ca358ccf0f44eed1dfbef4).
Thanks to MongoDB developers.
and fixes the following bugs:
- [Board Menu Popup's were opened twice because of 2 same event creation](https://github.com/wekan/wekan/pull/5478).
Thanks to mfilser.
- [Fixing of "mode is undefined" on first activity component creation](https://github.com/wekan/wekan/pull/5479).
Thanks to mfilser.
- [Changing card color now closes the popup and doesn't refresh the whole board page](https://github.com/wekan/wekan/pull/5480).
Thanks to mfilser.
- [Fix dragscroll package name](https://github.com/wekan/wekan/commit/45674806d78fddb8a3b8a75890e5059cc1a680ea).
Thanks to xet7.
- [Reducing card size in database if no planning poker was started](https://github.com/wekan/wekan/pull/5481).
Thanks to mfilser.
Thanks to above GitHub users for their contributions and translators for their translations.
# v7.52 2024-08-03 WeKan ® release
This release adds the following new features:
+1 -1
View File
@@ -11,7 +11,7 @@ For all code at WeKan GitHub Organization https://github.com/wekan
## Private reports
- Email support (at) wekan.team using [this PGP public key](support-at-wekan.team_pgp-publickey.asc) if possible
- Email support@wekan.team
- Security issues: [SECURITY.md](SECURITY.md)
- License violations
- Anything private, sensitive or negative
+1 -1
View File
@@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2014-2023 The Wekan Team
Copyright (c) 2014-2024 The Wekan Team
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
+1 -1
View File
@@ -1,5 +1,5 @@
appId: wekan-public/apps/77b94f60-dec9-0136-304e-16ff53095928
appVersion: "v7.52.0"
appVersion: "v7.60.0"
files:
userUploads:
- README.md
+34 -32
View File
@@ -13,39 +13,41 @@ BlazeComponent.extendComponent({
const sidebar = Sidebar;
sidebar && sidebar.callFirstWith(null, 'resetNextPeak');
this.autorun(() => {
let mode = this.data().mode;
const capitalizedMode = Utils.capitalize(mode);
let searchId;
if (mode === 'linkedcard' || mode === 'linkedboard') {
searchId = Utils.getCurrentCard().linkedId;
mode = mode.replace('linked', '');
} else if (mode === 'card') {
searchId = Utils.getCurrentCardId();
} else {
searchId = Session.get(`current${capitalizedMode}`);
}
const limit = this.page.get() * activitiesPerPage;
const user = ReactiveCache.getCurrentUser();
const hideSystem = user ? user.hasHiddenSystemMessages() : false;
if (searchId === null) return;
this.subscribe('activities', mode, searchId, limit, hideSystem, () => {
this.loadNextPageLocked = false;
// TODO the guard can be removed as soon as the TODO above is resolved
if (!sidebar) return;
// If the sibear peak hasn't increased, that mean that there are no more
// activities, and we can stop calling new subscriptions.
// XXX This is hacky! We need to know excatly and reactively how many
// activities there are, we probably want to denormalize this number
// dirrectly into card and board documents.
const nextPeakBefore = sidebar.callFirstWith(null, 'getNextPeak');
sidebar.calculateNextPeak();
const nextPeakAfter = sidebar.callFirstWith(null, 'getNextPeak');
if (nextPeakBefore === nextPeakAfter) {
sidebar.callFirstWith(null, 'resetNextPeak');
let mode = this.data()?.mode;
if (mode) {
const capitalizedMode = Utils.capitalize(mode);
let searchId;
if (mode === 'linkedcard' || mode === 'linkedboard') {
searchId = Utils.getCurrentCard().linkedId;
mode = mode.replace('linked', '');
} else if (mode === 'card') {
searchId = Utils.getCurrentCardId();
} else {
searchId = Session.get(`current${capitalizedMode}`);
}
});
const limit = this.page.get() * activitiesPerPage;
const user = ReactiveCache.getCurrentUser();
const hideSystem = user ? user.hasHiddenSystemMessages() : false;
if (searchId === null) return;
this.subscribe('activities', mode, searchId, limit, hideSystem, () => {
this.loadNextPageLocked = false;
// TODO the guard can be removed as soon as the TODO above is resolved
if (!sidebar) return;
// If the sibear peak hasn't increased, that mean that there are no more
// activities, and we can stop calling new subscriptions.
// XXX This is hacky! We need to know excatly and reactively how many
// activities there are, we probably want to denormalize this number
// dirrectly into card and board documents.
const nextPeakBefore = sidebar.callFirstWith(null, 'getNextPeak');
sidebar.calculateNextPeak();
const nextPeakAfter = sidebar.callFirstWith(null, 'getNextPeak');
if (nextPeakBefore === nextPeakAfter) {
sidebar.callFirstWith(null, 'resetNextPeak');
}
});
}
});
},
loadNextPage() {
+1
View File
@@ -1,4 +1,5 @@
import { ReactiveCache } from '/imports/reactiveCache';
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
BlazeComponent.extendComponent({
onCreated() {
+1 -1
View File
@@ -18,7 +18,7 @@ template(name="boardBody")
else
.board-wrapper(class=currentBoard.colorClass)
+sidebar
.board-canvas.js-swimlanes(
.board-canvas.js-swimlanes.dragscroll(
class="{{#if Sidebar.isOpen}}is-sibling-sidebar-open{{/if}}"
class="{{#if MultiSelection.isActive}}is-multiselection-active{{/if}}"
class="{{#if draggingActive.get}}is-dragging-active{{/if}}")
+3
View File
@@ -1,5 +1,7 @@
import { ReactiveCache } from '/imports/reactiveCache';
import { TAPi18n } from '/imports/i18n';
import dragscroll from '@wekanteam/dragscroll';
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
const subManager = new SubsManager();
const { calculateIndex } = Utils;
@@ -219,6 +221,7 @@ BlazeComponent.extendComponent({
boardComponent.openNewListForm();
}
dragscroll.reset();
Utils.setBackgroundImage();
},
+570 -35
View File
@@ -1,3 +1,7 @@
/* ===============
THEME - NEPHRITIS
=================*/
.board-color-nephritis#header,
.board-color-nephritis.sk-spinner div,
.board-backgrounds-list .board-color-nephritis.background-box,
@@ -70,6 +74,35 @@
.board-color-nephritis#header-quick-access ul li.current {
border-bottom: 4px solid #3dd37c;
}
/* Transparent modern scrollbar - Nephritis*/
.board-color-nephritis .board-canvas {
scrollbar-color: #27ae60f2 #e4e4e400;
}
/* Apply scrollbar to sidebar content*/
.board-color-nephritis .sidebar .sidebar-content {
scrollbar-color: #27ae60f2 #e4e4e400;
}
/* Remove margins in between columns/fix spacing */
.board-color-nephritis .list {
border-left: none;
padding-bottom: 8px;
}
.board-color-nephritis .list-body {
margin-top: 8px;
}
/* === END NEPHRITIS THEME === */
/* ===============
THEME - Pomegranate
=================*/
.board-color-pomegranate#header,
.board-color-pomegranate.sk-spinner div,
.board-backgrounds-list .board-color-pomegranate.background-box,
@@ -142,6 +175,35 @@
.board-color-pomegranate#header-quick-access ul li.current {
border-bottom: 4px solid #d7584b;
}
/* Transparent modern scrollbar - pomegranate*/
.board-color-pomegranate .board-canvas {
scrollbar-color: #c0392bf2 #e4e4e400;
}
/* Apply scrollbar to sidebar content*/
.board-color-pomegranate .sidebar .sidebar-content {
scrollbar-color: #c0392bf2 #e4e4e400;
}
/* Remove margins in between columns/fix spacing */
.board-color-pomegranate .list {
border-left: none;
padding-bottom: 8px;
}
.board-color-pomegranate .list-body {
margin-top: 8px;
}
/* === END Pomegranate THEME === */
/* ===============
THEME - Belize
=================*/
.board-color-belize#header,
.board-color-belize.sk-spinner div,
.board-backgrounds-list .board-color-belize.background-box,
@@ -214,6 +276,35 @@
.board-color-belize#header-quick-access ul li.current {
border-bottom: 4px solid #459cd6;
}
/* Transparent modern scrollbar - belize*/
.board-color-belize .board-canvas {
scrollbar-color: #2573a7f2 #e4e4e400;
}
/* Apply scrollbar to sidebar content*/
.board-color-belize .sidebar .sidebar-content {
scrollbar-color: #2980b9f2 #e4e4e400;
}
/* Remove margins in between columns/fix spacing */
.board-color-belize .list {
border-left: none;
padding-bottom: 8px;
}
.board-color-belize .list-body {
margin-top: 8px;
}
/* === END Belize THEME === */
/* ===============
THEME - Wisteria
=================*/
.board-color-wisteria#header,
.board-color-wisteria.sk-spinner div,
.board-backgrounds-list .board-color-wisteria.background-box,
@@ -286,6 +377,35 @@
.board-color-wisteria#header-quick-access ul li.current {
border-bottom: 4px solid #a765c2;
}
/* Transparent modern scrollbar - wisteria*/
.board-color-wisteria .board-canvas {
scrollbar-color: #8e44adf2 #e4e4e400;
}
/* Apply scrollbar to sidebar content*/
.board-color-wisteria .sidebar .sidebar-content {
scrollbar-color: #8e44adf2 #e4e4e400;
}
/* Remove margins in between columns/fix spacing */
.board-color-wisteria .list {
border-left: none;
padding-bottom: 8px;
}
.board-color-wisteria .list-body {
margin-top: 8px;
}
/* === END Wisteria THEME === */
/* ===============
THEME - Midnight
=================*/
.board-color-midnight#header,
.board-color-midnight.sk-spinner div,
.board-backgrounds-list .board-color-midnight.background-box,
@@ -358,6 +478,35 @@
.board-color-midnight#header-quick-access ul li.current {
border-bottom: 4px solid #476582;
}
/* Transparent modern scrollbar - midnight*/
.board-color-midnight .board-canvas {
scrollbar-color: #2c3e50f2 #e4e4e400;
}
/* Apply scrollbar to sidebar content*/
.board-color-midnight .sidebar .sidebar-content {
scrollbar-color: #2c3e50f2 #e4e4e400;
}
/* Remove margins in between columns/fix spacing */
.board-color-midnight .list {
border-left: none;
padding-bottom: 8px;
}
.board-color-midnight .list-body {
margin-top: 8px;
}
/* === END Midnight THEME === */
/* ===============
THEME - Pumpkin
=================*/
.board-color-pumpkin#header,
.board-color-pumpkin.sk-spinner div,
.board-backgrounds-list .board-color-pumpkin.background-box,
@@ -430,6 +579,35 @@
.board-color-pumpkin#header-quick-access ul li.current {
border-bottom: 4px solid #eb984e;
}
/* Transparent modern scrollbar - pumpkin*/
.board-color-pumpkin .board-canvas {
scrollbar-color: #e67e22f2 #e4e4e400;
}
/* Apply scrollbar to sidebar content*/
.board-color-pumpkin .sidebar .sidebar-content {
scrollbar-color: #e67e22f2 #e4e4e400;
}
/* Remove margins in between columns/fix spacing */
.board-color-pumpkin .list {
border-left: none;
padding-bottom: 8px;
}
.board-color-pumpkin .list-body {
margin-top: 8px;
}
/* === END Pumpkin THEME === */
/* ===============
THEME - Moderate Pink
=================*/
.board-color-moderatepink#header,
.board-color-moderatepink.sk-spinner div,
.board-backgrounds-list .board-color-moderatepink.background-box,
@@ -502,6 +680,35 @@
.board-color-moderatepink#header-quick-access ul li.current {
border-bottom: 4px solid #d77ba7;
}
/* Transparent modern scrollbar - moderatepink*/
.board-color-moderatepink .board-canvas {
scrollbar-color: #cd5a91f2 #e4e4e400;
}
/* Apply scrollbar to sidebar content*/
.board-color-moderatepink .sidebar .sidebar-content {
scrollbar-color: #cd5a91f2 #e4e4e400;
}
/* Remove margins in between columns/fix spacing */
.board-color-moderatepink .list {
border-left: none;
padding-bottom: 8px;
}
.board-color-moderatepink .list-body {
margin-top: 8px;
}
/* === END Moderatepink THEME === */
/* ===============
THEME - Strong Cyan
=================*/
.board-color-strongcyan#header,
.board-color-strongcyan.sk-spinner div,
.board-backgrounds-list .board-color-strongcyan.background-box,
@@ -574,6 +781,35 @@
.board-color-strongcyan#header-quick-access ul li.current {
border-bottom: 4px solid #0adbff;
}
/* Transparent modern scrollbar - strongcyan*/
.board-color-strongcyan .board-canvas {
scrollbar-color: #00aeccf2 #e4e4e400;
}
/* Apply scrollbar to sidebar content*/
.board-color-strongcyan .sidebar .sidebar-content {
scrollbar-color: #00aeccf2 #e4e4e400;
}
/* Remove margins in between columns/fix spacing */
.board-color-strongcyan .list {
border-left: none;
padding-bottom: 8px;
}
.board-color-strongcyan .list-body {
margin-top: 8px;
}
/* === END Strongcyan THEME === */
/* ===============
THEME - Lime Green
=================*/
.board-color-limegreen#header,
.board-color-limegreen.sk-spinner div,
.board-backgrounds-list .board-color-limegreen.background-box,
@@ -646,6 +882,35 @@
.board-color-limegreen#header-quick-access ul li.current {
border-bottom: 4px solid #6fcc89;
}
/* Transparent modern scrollbar - limegreen*/
.board-color-limegreen .board-canvas {
scrollbar-color: #4bbf6bf2 #e4e4e400;
}
/* Apply scrollbar to sidebar content*/
.board-color-limegreen .sidebar .sidebar-content {
scrollbar-color: #4bbf6bf2 #e4e4e400;
}
/* Remove margins in between columns/fix spacing */
.board-color-limegreen .list {
border-left: none;
padding-bottom: 8px;
}
.board-color-limegreen .list-body {
margin-top: 8px;
}
/* === END Limegreen THEME === */
/* ===============
THEME - Dark
=================*/
.board-color-dark#header,
.board-color-dark.sk-spinner div,
.board-backgrounds-list .board-color-dark.background-box,
@@ -659,6 +924,7 @@
border-radius: 7px;
padding: 10px 10px 4px 10px;
box-shadow: 2px 2px 4px 0px rgba(0,0,0,0.15);
background-color: rgb(255 255 255 / 90%);
}
.board-color-dark button[type=submit].primary,
.board-color-dark input[type=submit].primary,
@@ -718,7 +984,12 @@
.board-color-dark#header-quick-access ul li.current {
border-bottom: 4px solid #476483;
}
.board-color-dark .ui-sortable,
/* Board Wrapper background fix for dark theme */
.board-color-dark.board-wrapper {
background-color: #2c3e50;
}
.board-color-dark .swimlane,
.board-color-dark .swimlane >.swimlane-header-wrap,
.board-color-dark .swimlane >.list.js-list,
@@ -815,6 +1086,35 @@
background-color: #ccc;
color: #222;
}
/* Transparent modern scrollbar - dark*/
.board-color-dark .board-canvas {
scrollbar-color: #f2f2f2f2 #e4e4e400;
}
/* Apply scrollbar to sidebar content*/
.board-color-dark .sidebar .sidebar-content {
scrollbar-color: #f2f2f2f2 #e4e4e400;
}
/* Remove margins in between columns/fix spacing */
.board-color-dark .list {
border-left: none; /* Remove this property to bring back lines in-between columns if needed*/
padding: 0px 1px 8px 1px; /* Improves spacing between columns due to no borders, 8px padding at bottom to separate horizontal scrollbar/lists */
}
.board-color-dark .list-body {
margin-top: 8px;
}
/* === END Dark THEME === */
/* ===============
THEME - Relax
=================*/
.board-color-relax#header,
.board-color-relax.sk-spinner div,
.board-backgrounds-list .board-color-relax.background-box,
@@ -887,7 +1187,7 @@
.board-color-relax#header-quick-access ul li.current {
border-bottom: 4px solid #3dd37e;
}
.board-color-relax .ui-sortable {
.board-color-relax .board-wrapper {
background-color: #a7e366;
}
.board-color-relax .list-header {
@@ -916,6 +1216,35 @@
font-weight: bold;
font-size: 11pt;
}
/* Transparent modern scrollbar - relax*/
.board-color-relax .board-canvas {
scrollbar-color: #fffffff2 #e4e4e400;
}
/* Apply scrollbar to sidebar content*/
.board-color-relax .sidebar .sidebar-content {
scrollbar-color: #a7e366 #e4e4e400;
}
/* Remove margins in between columns/fix spacing */
.board-color-relax .list {
border-left: none;
/* padding-bottom: 8px; - Removed to get rid of grey bars for relax theme */
}
.board-color-relax .list-body {
margin-top: 8px;
}
/* === END Relax THEME === */
/* ===============
THEME - Corteza
=================*/
.board-color-corteza#header,
.board-color-corteza.sk-spinner div,
.board-backgrounds-list .board-color-corteza.background-box,
@@ -988,9 +1317,35 @@
.board-color-corteza#header-quick-access ul li.current {
border-bottom: 4px solid #76a3b6;
}
/*
Alternate "Clear" Styling
*/
/* Transparent modern scrollbar - corteza*/
.board-color-corteza .board-canvas {
scrollbar-color: #568ba2f2 #e4e4e400;
}
/* Apply scrollbar to sidebar content*/
.board-color-corteza .sidebar .sidebar-content {
scrollbar-color: #568ba2f2 #e4e4e400;
}
/* Remove margins in between columns/fix spacing */
.board-color-corteza .list {
border-left: none;
padding-bottom: 8px;
}
.board-color-corteza .list-body {
margin-top: 8px;
}
/* === END Corteza THEME === */
/* ===============
THEME - Clear Blue
=================*/
.board-color-clearblue.sk-spinner div,
.board-backgrounds-list .board-color-clearblue.background-box,
.board-list .board-color-clearblue a {
@@ -1054,7 +1409,7 @@
.board-color-clearblue .toggle-switch:checked ~ .toggle-label:after {
background-color: #197ddc;
}
.board-color-clearblue .board-canvas {
.board-color-clearblue.board-wrapper {
background: linear-gradient(135deg, #499bea 0%, #00aecc 100%);
}
.board-color-clearblue .swimlane {
@@ -1062,7 +1417,7 @@
}
.board-color-clearblue .swimlane .list:first-child {
min-width: 20px;
margin-left: 0px;
margin-left: 10px; /* Added 10px margin left to stop lists being butted up against the edge of the screen */
border-left: none;
}
.board-color-clearblue .swimlane .list:nth-child {
@@ -1096,7 +1451,7 @@
color: rgba(0,0,0,0.6);
}
.board-color-clearblue .list-header {
background-color: rgba(255,255,255,0.25);
background-color: rgb(255 255 255 / 68%);
border-radius: 14px 14px 0 0;
}
.board-color-clearblue .list-header:not([class*="list-header-"]) {
@@ -1224,9 +1579,40 @@
cursor: -webkit-grabbing;
cursor: grabbing;
}
/*
Alternate "Natural" Styling
*/
/* Transparent modern scrollbar - clearblue*/
.board-color-clearblue .board-canvas {
scrollbar-color: #ffffffdb #ffffff00;
scrollbar-width: thin;
}
.board-color-clearblue .list-body {
scrollbar-width: thin;
}
/* Apply scrollbar to sidebar content*/
.board-color-clearblue .sidebar .sidebar-content {
scrollbar-color: #00aecc #ffffff00;
}
/* Remove margins in between columns/fix spacing */
.board-color-clearblue .list {
border-left: none;
padding-bottom: 8px;
}
.board-color-clearblue .list-body {
margin-top: 8px;
}
/* === END Clearblue THEME === */
/* ===============
THEME - Natural
=================*/
.board-color-natural#header,
.board-color-natural.sk-spinner div,
.board-backgrounds-list .board-color-natural.background-box,
@@ -1302,15 +1688,41 @@
.board-color-natural#header-quick-access {
background-color: #2d392b;
}
.board-color-natural .ui-sortable {
.board-color-natural.board-wrapper {
background-color: #dedede;
}
.board-color-natural .swimlane .swimlane-header-wrap {
background-color: #c2c0ab;
}
/*
Alternate "Modern" Styling
*/
/* Transparent modern scrollbar - natural*/
.board-color-natural .board-canvas {
scrollbar-color: #596557f2 #e4e4e400;
}
/* Apply scrollbar to sidebar content*/
.board-color-natural .sidebar .sidebar-content {
scrollbar-color: #596557f2 #e4e4e400;
}
/* Remove margins in between columns/fix spacing */
.board-color-natural .list {
border-left: none;
padding-bottom: 8px;
}
.board-color-natural .list-body {
margin-top: 8px;
}
/* === END Natural THEME === */
/* ===============
THEME - Modern
=================*/
.board-color-modern#header,
.board-color-modern.sk-spinner div,
.board-backgrounds-list .board-color-modern.background-box,
@@ -1433,7 +1845,7 @@
height: 21px;
background: #f7f7f7;
}
.board-color-modern .board-canvas {
.board-color-modern.board-wrapper {
background: #f5f5f5;
}
.board-color-modern .swimlane {
@@ -1476,7 +1888,7 @@
color: #222;
}
.board-color-modern .list-header {
background: none;
background: #f5f5f5f2; /*Added background colour same colour as base board background, prevents poor text visibility when bgd image applied*/
}
.board-color-modern .list-header .list-header-name {
/* font-family: Poppins; */
@@ -1569,9 +1981,35 @@
.board-color-modern section#notifications-drawer .header .toggle-read {
top: 18px;
}
/*
Alternate "Modern Dark" Styling
*/
/* Transparent modern scrollbar - modern*/
.board-color-modern .board-canvas {
scrollbar-color: #333333f2 #e4e4e400;
}
/* Apply scrollbar to sidebar content*/
.board-color-modern .sidebar .sidebar-content {
scrollbar-color: #333333f2 #e4e4e400;
}
/* Remove margins in between columns/fix spacing */
.board-color-modern .list {
border-left: none;
padding-bottom: 8px;
}
.board-color-modern .list-body {
margin-top: 8px;
}
/* === END Modern THEME === */
/* ===============
THEME - Modern Dark
=================*/
.board-color-moderndark#header,
.board-color-moderndark.sk-spinner div,
.board-backgrounds-list .board-color-moderndark.background-box,
@@ -1731,7 +2169,7 @@
line-height: 0.8em;
padding-top: 10px;
}
.board-color-moderndark .board-canvas {
.board-color-moderndark.board-wrapper {
background: #2a2a2a;
}
.board-color-moderndark .swimlane .swimlane-header-wrap {
@@ -1790,7 +2228,7 @@
}
@media screen and (max-width: 800px) {
.board-color-moderndark .list-header .list-header-name {
line-height: 40px;
line-height: unset;
padding-top: 10px;
}
.board-color-moderndark .list-header-black, .board-color-moderndark .mini-list {
@@ -2030,6 +2468,38 @@
.pop-over.board-color-moderndark .pop-over-list li > a:hover {
background-color: rgba(255,255,255,0.2);
}
/* Transparent moderndark scrollbar - moderndark*/
.board-color-moderndark .board-canvas {
scrollbar-width: thin;
scrollbar-color: #343434f2 #999999f2;
}
/* Apply scrollbar to sidebar content*/
.board-color-moderndark .sidebar .sidebar-content {
scrollbar-width: thin;
scrollbar-color: #343434f2 #999999f2;
}
/* Remove margins in between columns/fix spacing */
.board-color-moderndark .list {
border-left: none;
padding-bottom: 8px;
}
.board-color-moderndark .list-body {
margin-top: 8px;
}
/* === END ModernDark THEME === */
/* ===============
THEME - Exodark
=================*/
.board-color-exodark#header,
.board-color-exodark.sk-spinner div,
.board-backgrounds-list .board-color-exodark.background-box,
@@ -2110,7 +2580,7 @@
color: #fff !important;
}
*/
.board-color-exodark .board-canvas {
.board-color-exodark.board-wrapper {
background: #222;
/* font-family: Poppins; */
}
@@ -2121,13 +2591,12 @@
margin: 10px;
color: #fff;
border-radius: 15px;
background: #222;
box-shadow: inset 15px 15px 37px #1c1c1c, inset -15px -15px 37px #282828;
background-color: #1c1c1c;
border: none;
}
.board-color-exodark .swimlane .list:first-child {
min-width: 20px;
margin-left: 0px;
margin-left: 10px; /*Added 10px margin to prevent butting up against edge of screen */
border-left: none;
}
.board-color-exodark .swimlane .list:nth-child {
@@ -2252,10 +2721,30 @@
color: #fff;
}
.board-color-cleandark {
background: #0A0A14
/* Transparent modern scrollbar - Exodark*/
.board-color-exodark .list-body {
scrollbar-color: #e4e4e4d4 #202020ba;
}
.board-color-exodark .list {
overflow: hidden;
}
.board-color-exodark .board-canvas {
scrollbar-color: #e4e4e4d4 #202020ba;
}
/* Apply scrollbar to sidebar content*/
.board-color-exodark .sidebar .sidebar-content {
scrollbar-color: #e4e4e4d4 #202020ba;
}
/* === END Exodark THEME === */
/* ===============
THEME - Clean Dark
=================*/
.board-color-cleandark#header ul li,
.board-color-cleandark#header-quick-access ul li {
color: rgba(255, 255, 255, 50%);
@@ -2286,7 +2775,7 @@
color: rgba(255, 255, 255, 1);
}
.board-color-cleandark .board-canvas {
.board-color-cleandark.board-wrapper {
background: #0A0A14;
}
@@ -2677,6 +3166,33 @@
align-items: center;
}
/* Transparent modern scrollbar - cleandark*/
.board-color-cleandark .board-canvas {
scrollbar-color: #23232be6 #e4e4e400;
}
/* Apply scrollbar to sidebar content*/
.board-color-cleandark .sidebar .sidebar-content {
scrollbar-color: #ff6d00 #e4e4e400;
}
/* Remove margins in between columns/fix spacing */
.board-color-cleandark .list {
border-left: none;
padding-bottom: 8px;
}
.board-color-cleandark .list-body {
margin-top: 8px;
}
/* ===============
THEME - Clean Light
=================*/
/* Please note Clean Light theme elements also contain references to some cleandark theme elements so if unable to find code you're looking for under CleanDark it might be here. This should probably be cleaned up*/
.board-color-cleanlight {
background: #E0E0E0;
}
@@ -2721,11 +3237,6 @@
color: rgba(10, 10, 20, 1) !important;
}
.board-color-cleanlight {
background: #FFFFFF !important;
color: #000000;
}
.board-color-cleanlight#header ul li.current,
.board-color-cleanlight#header-quick-access ul li.current {
color: rgba(10, 10, 20, 0.85) !important;
@@ -2739,7 +3250,7 @@
color: rgba(10, 10, 20, 1);
}
.board-color-cleanlight .board-canvas {
.board-color-cleanlight.board-wrapper {
background: #FFFFFF;
}
@@ -3690,3 +4201,27 @@
.board-color-cleandark .is-selected .minicard, .draggable-hover-card .minicard {
background: #23232B;
}
/* Transparent modern scrollbar - cleanlight*/
.board-color-cleanlight .board-canvas {
scrollbar-color: #0a0a14d1 #e4e4e400;
}
/* Apply scrollbar to sidebar content*/
.board-color-cleanlight .sidebar .sidebar-content {
scrollbar-color: #0a0a14d1 #e4e4e400;
}
/* Remove margins in between columns/fix spacing */
.board-color-cleanlight .list {
border-left: none;
padding-bottom: 8px;
}
.board-color-cleanlight .list-body {
margin-top: 8px;
}
/* === END CleanDark/Light THEME === */
+1 -31
View File
@@ -1,42 +1,12 @@
import { ReactiveCache } from '/imports/reactiveCache';
import { TAPi18n } from '/imports/i18n';
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
/*
const DOWNCLS = 'fa-sort-down';
const UPCLS = 'fa-sort-up';
*/
const sortCardsBy = new ReactiveVar('');
Template.boardMenuPopup.events({
'click .js-rename-board': Popup.open('boardChangeTitle'),
'click .js-custom-fields'() {
Sidebar.setView('customFields');
Popup.back();
},
'click .js-open-archives'() {
Sidebar.setView('archives');
Popup.back();
},
'click .js-change-board-color': Popup.open('boardChangeColor'),
'click .js-change-language': Popup.open('changeLanguage'),
'click .js-archive-board ': Popup.afterConfirm('archiveBoard', function() {
const currentBoard = Utils.getCurrentBoard();
currentBoard.archive();
// XXX We should have some kind of notification on top of the page to
// confirm that the board was successfully archived.
FlowRouter.go('home');
}),
'click .js-delete-board': Popup.afterConfirm('deleteBoard', function() {
const currentBoard = Utils.getCurrentBoard();
Popup.back();
Boards.remove(currentBoard._id);
FlowRouter.go('home');
}),
'click .js-outgoing-webhooks': Popup.open('outgoingWebhooks'),
'click .js-import-board': Popup.open('chooseBoardSource'),
'click .js-subtask-settings': Popup.open('boardSubtaskSettings'),
'click .js-card-settings': Popup.open('boardCardSettings'),
'click .js-minicard-settings': Popup.open('boardMinicardSettings'),
});
Template.boardChangeTitlePopup.events({
submit(event, templateInstance) {
+8 -10
View File
@@ -1,5 +1,6 @@
import { ReactiveCache } from '/imports/reactiveCache';
import { TAPi18n } from '/imports/i18n';
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
const subManager = new SubsManager();
@@ -151,8 +152,8 @@ BlazeComponent.extendComponent({
}
const currUser = ReactiveCache.getCurrentUser();
let orgIdsUserBelongs = currUser !== undefined && currUser.teams !== 'undefined' ? currUser.orgIdsUserBelongs() : '';
if (orgIdsUserBelongs && orgIdsUserBelongs != '') {
let orgIdsUserBelongs = currUser?.orgIdsUserBelongs() || '';
if (orgIdsUserBelongs) {
let orgsIds = orgIdsUserBelongs.split(',');
// for(let i = 0; i < orgsIds.length; i++){
// query.$and[2].$or.push({'orgs.orgId': orgsIds[i]});
@@ -162,8 +163,8 @@ BlazeComponent.extendComponent({
query.$and[2].$or.push({ 'orgs.orgId': { $in: orgsIds } });
}
let teamIdsUserBelongs = currUser !== undefined && currUser.teams !== 'undefined' ? currUser.teamIdsUserBelongs() : '';
if (teamIdsUserBelongs && teamIdsUserBelongs != '') {
let teamIdsUserBelongs = currUser?.teamIdsUserBelongs() || '';
if (teamIdsUserBelongs) {
let teamsIds = teamIdsUserBelongs.split(',');
// for(let i = 0; i < teamsIds.length; i++){
// query.$or[2].$or.push({'teams.teamId': teamsIds[i]});
@@ -199,15 +200,12 @@ BlazeComponent.extendComponent({
},
boardMembers(boardId) {
let boardMembers = [];
/* Bug Board icons random dance https://github.com/wekan/wekan/issues/4214
const lists = ReactiveCache.getBoard(boardId)
let members = lists.members
members.forEach(member => {
boardMembers.push(member.userId);
});
*/
const boardMembers = lists?.members.map(member => member.userId);
return boardMembers;
*/
return [];
},
isStarred() {
-2
View File
@@ -117,8 +117,6 @@ template(name="attachmentActionsPopup")
| {{_ 'remove-background-image'}}
else
| {{_ 'add-background-image'}}
p.attachment-storage
| {{versions.original.storage}}
if $neq versions.original.storage "fs"
a.js-move-storage-fs
+2 -2
View File
@@ -39,7 +39,7 @@ Template.attachmentGallery.events({
'click .js-rename': Popup.open('attachmentRename'),
'click .js-confirm-delete': Popup.afterConfirm('attachmentDelete', function() {
Attachments.remove(this._id);
Popup.back(2);
Popup.back();
}),
});
@@ -501,7 +501,7 @@ BlazeComponent.extendComponent({
if (name === DOMPurify.sanitize(name)) {
Meteor.call('renameAttachment', this.data()._id, name);
}
Popup.back(2);
Popup.back();
},
}
]
+5 -4
View File
@@ -5,7 +5,7 @@ template(name="cardDetails")
+attachmentViewer
section.card-details.js-card-details(class='{{#if cardMaximized}}card-details-maximized{{/if}}' class='{{#if isPopup}}card-details-popup{{/if}}'): .card-details-canvas
section.card-details.js-card-details.nodragscroll(class='{{#if cardMaximized}}card-details-maximized{{/if}}' class='{{#if isPopup}}card-details-popup{{/if}}'): .card-details-canvas
.card-details-header(class='{{#if colorClass}}card-details-{{colorClass}}{{/if}}')
+inlinedForm(classNames="js-card-details-title")
+editCardTitleForm
@@ -527,9 +527,10 @@ template(name="cardDetails")
if currentBoard.allowsDescriptionText
a.js-open-inlined-form(title="{{_ 'edit'}}" value=title)
i.fa.fa-pencil-square-o
if getDescription
+viewer
= getDescription
a.js-open-inlined-form(title="{{_ 'edit'}}" value=title)
if getDescription
+viewer
= getDescription
if (hasUnsavedValue 'cardDescription' _id)
p.quiet
| {{_ 'unsaved-description'}}
+7 -4
View File
@@ -12,6 +12,7 @@ import CardComments from '/models/cardComments';
import { ALLOWED_COLORS } from '/config/const';
import { UserAvatar } from '../users/userAvatar';
import { DialogWithBoardSwimlaneList } from '/client/lib/dialogWithBoardSwimlaneList';
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
const subManager = new SubsManager();
const { calculateIndexData } = Utils;
@@ -846,13 +847,15 @@ BlazeComponent.extendComponent({
'click .js-palette-color'() {
this.currentColor.set(this.currentData().color);
},
'click .js-submit'() {
'click .js-submit'(event) {
event.preventDefault();
this.currentCard.setColor(this.currentColor.get());
Popup.close();
Popup.back();
},
'click .js-remove-color'() {
'click .js-remove-color'(event) {
event.preventDefault();
this.currentCard.setColor(null);
Popup.close();
Popup.back();
},
},
];
+1 -1
View File
@@ -22,7 +22,7 @@ template(name="checklists")
i.fa.fa-plus
template(name="checklistDetail")
.js-checklist.checklist
.js-checklist.checklist.nodragscroll
+inlinedForm(classNames="js-edit-checklist-title" checklist = checklist)
+editChecklistItemForm(checklist = checklist)
else
+1 -1
View File
@@ -1,5 +1,5 @@
template(name="minicard")
.minicard(
.minicard.nodragscroll(
class="{{#if isLinkedCard}}linked-card{{/if}}"
class="{{#if isLinkedBoard}}linked-board{{/if}}"
class="{{#if colorClass}}minicard-{{colorClass}}{{/if}}")
+1 -5
View File
@@ -42,11 +42,7 @@ BlazeComponent.extendComponent({
const board = this.data().board();
let ret = false;
if (board) {
ret =
board.allowsCreatorOnMinicard === null ||
board.allowsCreatorOnMinicard === undefined ||
board.allowsCreatorOnMinicard
;
ret = board.allowsCreatorOnMinicard ?? false;
}
return ret;
},
+1
View File
@@ -1,4 +1,5 @@
import { ReactiveCache } from '/imports/reactiveCache';
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
BlazeComponent.extendComponent({
addSubtask(event) {
+1
View File
@@ -2,6 +2,7 @@ import { ReactiveCache } from '/imports/reactiveCache';
import { trelloGetMembersToMap } from './trelloMembersMapper';
import { wekanGetMembersToMap } from './wekanMembersMapper';
import { csvGetMembersToMap } from './csvMembersMapper';
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
const Papa = require('papaparse');
+7 -13
View File
@@ -7,17 +7,11 @@
border-left: 1px solid #ccc;
padding: 0;
float: left;
/* min-width: 100px; TODO(mark-i-m): hardcoded? */
/*max-width: 270px;*/
/* Reverted incomplete change list width: */
/* https://github.com/wekan/wekan/issues/4558 */
/* Orinal width: 270px. Changes not saved yet: */
/*resize: both; - List width and height resizeable */
/* overflow: auto; - List width and height resizeable */
}
[id^="swimlane-"] .list:first-child {
min-width: 20px;
}
.list:first-child {
min-width: 20px;
margin-left: 5px;
border-left: none;
}
.card-details + .list {
@@ -48,7 +42,7 @@
}
.list-header-add {
flex: 0 0 auto;
padding: 20px 12px 4px;
padding: 12px;
position: relative;
min-height: 20px;
}
@@ -251,11 +245,11 @@
padding: 15px 19px;
}
.list-header {
padding: 0 12px 0px;
/*Updated padding values for mobile devices, this should fix text grouping issue*/
padding: 20px 0px 20px 0px;
border-bottom: 0px solid #e4e4e4;
height: 60px;
min-height: 30px;
margin-top: 10px;
display: flex;
align-items: center;
}
.list-header .list-header-left-icon {
+1 -1
View File
@@ -196,7 +196,7 @@ BlazeComponent.extendComponent({
},
listWidth() {
const user = Meteor.user();
const user = ReactiveCache.getCurrentUser();
const list = Template.currentData();
return user.getListWidth(list.boardId, list._id);
},
+1
View File
@@ -1,6 +1,7 @@
import { ReactiveCache } from '/imports/reactiveCache';
import { TAPi18n } from '/imports/i18n';
import { Spinner } from '/client/lib/spinner';
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
const subManager = new SubsManager();
const InfiniteScrollIter = 10;
+8 -8
View File
@@ -1,20 +1,18 @@
template(name="listHeader")
.list-header.js-list-header(
.list-header.js-list-header.nodragscroll(
class="{{#if limitToShowCardsCount}}list-header-card-count{{/if}}"
class=colorClass)
+inlinedForm
+editListTitleForm
else
unless isMiniScreen
if isMiniScreen
if currentList
a.list-header-left-icon.fa.fa-angle-left.js-unselect-list
else
if collapsed
a.js-collapse(title="{{_ 'uncollapse'}}")
i.fa.fa-arrow-left.list-header-uncollapse-left
i.fa.fa-arrow-right.list-header-uncollapse-right
if isMiniScreen
if currentList
a.list-header-left-icon.fa.fa-angle-left.js-unselect-list
unless isMiniScreen
if collapsed
if showCardsCountForList cards.length
br
span.cardCount {{cardsCount}}
@@ -28,7 +26,9 @@ template(name="listHeader")
|&nbsp;(
span(class="{{#if exceededWipLimit}}highlight{{/if}}") {{cards.length}}
|/#{wipLimit.value})
unless isMiniScreen
if showCardsCountForList cards.length
span.cardCount {{cardsCount}} {{cardsCountForListIsOne cards.length}}
else
div(class="{{#if collapsed}}list-rotated{{/if}}")
h2.list-header-name(
title="{{ moment modifiedAt 'LLL' }}"
+1 -1
View File
@@ -362,7 +362,7 @@ BlazeComponent.extendComponent({
listWidthValue() {
const list = Template.currentData();
const board = list.boardId;
return Meteor.user().getListWidth(board, list._id);
return ReactiveCache.getCurrentUser().getListWidth(board, list._id);
},
events() {
+4 -4
View File
@@ -2,15 +2,15 @@
.inlined-form a.fa.fa-brands.fa-markdown {
float: right;
position: absolute;
top: -20px;
top: -10px;
right: 60px;
}
.new-comment a.fa.fa-copy,
.inlined-form a.fa.fa-copy {
float: right;
position: absolute;
top: -20px;
right: 6px;
position: relative;
top: -10px;
right: 5px;
}
.js-inlined-form.viewer.btn-sm {
position: absolute;
+2 -1
View File
@@ -1,7 +1,8 @@
import { ReactiveCache } from '/imports/reactiveCache';
import { TAPi18n } from '/imports/i18n';
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
BlazeLayout.setRoot('body');
FlowRouter.Renderer.rootElement = () => document.body;
let alreadyCheck = 1;
let isCheckDone = false;
+2 -2
View File
@@ -500,9 +500,9 @@ template(name="modifyTeamsUsers")
| {{_ 'r-action'}}
.form-group.flex
input.wekan-form-control#addAction(type="radio" name="action" value="true" checked="checked")
span {{_ 'add'}}
label(for=addAction) {{_ 'add'}}
input.wekan-form-control#deleteAction(type="radio" name="action" value="false")
span {{_ 'delete'}}
label(for=deleteAction) {{_ 'delete'}}
div.buttonsContainer
input.primary.wide#addTeamBtn(type="submit" value="{{_ 'save'}}")
input.primary.wide#cancelBtn(type="submit" value="{{_ 'cancel'}}")
+1
View File
@@ -1,4 +1,5 @@
import { ReactiveCache } from '/imports/reactiveCache';
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
const orgsPerPage = 25;
const teamsPerPage = 25;
+16 -16
View File
@@ -137,9 +137,9 @@ template(name='tableVisibilityModeSettings')
.title {{_ 'tableVisibilityMode-allowPrivateOnly'}}
.form-group.flex
input.wekan-form-control#accounts-allowPrivateOnly(type="radio" name="allowPrivateOnly" value="true" checked="{{#if allowPrivateOnly}}checked{{/if}}")
span {{_ 'yes'}}
label {{_ 'yes'}}
input.wekan-form-control#accounts-allowPrivateOnly(type="radio" name="allowPrivateOnly" value="false" checked="{{#unless allowPrivateOnly}}checked{{/unless}}")
span {{_ 'no'}}
label {{_ 'no'}}
button.js-tableVisibilityMode-save.primary {{_ 'save'}}
template(name='accountSettings')
@@ -150,21 +150,21 @@ template(name='accountSettings')
.title {{_ 'accounts-allowEmailChange'}}
.form-group.flex
input.wekan-form-control#accounts-allowEmailChange(type="radio" name="allowEmailChange" value="true" checked="{{#if allowEmailChange}}checked{{/if}}")
span {{_ 'yes'}}
label {{_ 'yes'}}
input.wekan-form-control#accounts-allowEmailChange(type="radio" name="allowEmailChange" value="false" checked="{{#unless allowEmailChange}}checked{{/unless}}")
span {{_ 'no'}}
label {{_ 'no'}}
.title {{_ 'accounts-allowUserNameChange'}}
.form-group.flex
input.wekan-form-control#accounts-allowUserNameChange(type="radio" name="allowUserNameChange" value="true" checked="{{#if allowUserNameChange}}checked{{/if}}")
span {{_ 'yes'}}
label {{_ 'yes'}}
input.wekan-form-control#accounts-allowUserNameChange(type="radio" name="allowUserNameChange" value="false" checked="{{#unless allowUserNameChange}}checked{{/unless}}")
span {{_ 'no'}}
label {{_ 'no'}}
.title {{_ 'accounts-allowUserDelete'}}
.form-group.flex
input.wekan-form-control#accounts-allowUserDelete(type="radio" name="allowUserDelete" value="true" checked="{{#if allowUserDelete}}checked{{/if}}")
span {{_ 'yes'}}
label {{_ 'yes'}}
input.wekan-form-control#accounts-allowUserDelete(type="radio" name="allowUserDelete" value="false" checked="{{#unless allowUserDelete}}checked{{/unless}}")
span {{_ 'no'}}
label {{_ 'no'}}
button.js-accounts-save.primary {{_ 'save'}}
template(name='announcementSettings')
@@ -201,9 +201,9 @@ template(name='layoutSettings')
.title {{_ 'display-authentication-method'}}
.form-group.flex
input.wekan-form-control#display-authentication-method(type="radio" name="displayAuthenticationMethod" value="true" checked="{{#if currentSetting.displayAuthenticationMethod}}checked{{/if}}")
span {{_ 'yes'}}
label {{_ 'yes'}}
input.wekan-form-control#display-authentication-method(type="radio" name="displayAuthenticationMethod" value="false" checked="{{#unless currentSetting.displayAuthenticationMethod}}checked{{/unless}}")
span {{_ 'no'}}
label {{_ 'no'}}
li.layout-form
.title {{_ 'default-authentication-method'}}
+selectAuthenticationMethod(authenticationMethod=currentSetting.defaultAuthenticationMethod)
@@ -218,9 +218,9 @@ template(name='layoutSettings')
.title {{_ 'hide-logo'}}
.form-group.flex
input.wekan-form-control#hide-logo(type="radio" name="hideLogo" value="true" checked="{{#if currentSetting.hideLogo}}checked{{/if}}")
span {{_ 'yes'}}
label {{_ 'yes'}}
input.wekan-form-control#hide-logo(type="radio" name="hideLogo" value="false" checked="{{#unless currentSetting.hideLogo}}checked{{/unless}}")
span {{_ 'no'}}
label {{_ 'no'}}
li.layout-form
.title {{_ 'custom-login-logo-image-url'}}
.form-group
@@ -257,16 +257,16 @@ template(name='layoutSettings')
.title {{_ 'hide-card-counter-list'}}
.form-group.flex
input.wekan-form-control#hide-card-counter-list(type="radio" name="hideCardCounterList" value="true" checked="{{#if currentSetting.hideCardCounterList}}checked{{/if}}")
span {{_ 'yes'}}
label {{_ 'yes'}}
input.wekan-form-control#hide-card-counter-list(type="radio" name="hideCardCounterList" value="false" checked="{{#unless currentSetting.hideCardCounterList}}checked{{/unless}}")
span {{_ 'no'}}
label {{_ 'no'}}
li.layout-form
.title {{_ 'hide-board-member-list'}}
.form-group.flex
input.wekan-form-control#hide-board-member-list(type="radio" name="hideBoardMemberList" value="true" checked="{{#if currentSetting.hideBoardMemberList}}checked{{/if}}")
span {{_ 'yes'}}
label {{_ 'yes'}}
input.wekan-form-control#hide-board-member-list(type="radio" name="hideBoardMemberList" value="false" checked="{{#unless currentSetting.hideBoardMemberList}}checked{{/unless}}")
span {{_ 'no'}}
label {{_ 'no'}}
li
button.js-save-layout.primary {{_ 'save'}}
+6 -2
View File
@@ -16,9 +16,13 @@
}
.sidebar-xmark {
position: absolute;
right: 10px;
top: 5px;
right: 0px;
top: 0px;
font-size: 25px;
padding: 10px;
}
.sidebar-xmark:hover {
background: rgba(0,0,0,0.15);
}
.sidebar .sidebar-content {
padding: 12px;
+3 -10
View File
@@ -1,5 +1,6 @@
import { ReactiveCache } from '/imports/reactiveCache';
import { TAPi18n } from '/imports/i18n';
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
Sidebar = null;
@@ -913,19 +914,11 @@ BlazeComponent.extendComponent({
},
allowsCreator() {
return (
this.currentBoard.allowsCreator === null ||
this.currentBoard.allowsCreator === undefined ||
this.currentBoard.allowsCreator
);
return this.currentBoard.allowsCreator ?? false;
},
allowsCreatorOnMinicard() {
return (
this.currentBoard.allowsCreatorOnMinicard === null ||
this.currentBoard.allowsCreatorOnMinicard === undefined ||
this.currentBoard.allowsCreatorOnMinicard
);
return this.currentBoard.allowsCreatorOnMinicard ?? false;
},
allowsMembers() {
@@ -224,7 +224,7 @@ BlazeComponent.extendComponent({
swimlaneHeightValue() {
const swimlane = this.currentData();
const board = swimlane.boardId;
return Meteor.user().getSwimlaneHeight(board, swimlane._id);
return ReactiveCache.getCurrentUser().getSwimlaneHeight(board, swimlane._id);
},
events() {
+1 -1
View File
@@ -1,5 +1,5 @@
template(name="swimlane")
.swimlane
.swimlane.nodragscroll
+swimlaneHeader
unless collapseSwimlane
.swimlane.js-lists.js-swimlane(id="swimlane-{{_id}}"
+2 -2
View File
@@ -225,7 +225,7 @@ BlazeComponent.extendComponent({
},
swimlaneHeight() {
const user = Meteor.user();
const user = ReactiveCache.getCurrentUser();
const swimlane = Template.currentData();
const height = user.getSwimlaneHeight(swimlane.boardId, swimlane._id);
return height == -1 ? "auto" : (height + "px");
@@ -288,7 +288,7 @@ BlazeComponent.extendComponent({
Template.swimlane.helpers({
canSeeAddList() {
return Meteor.user().isBoardAdmin();
return ReactiveCache.getCurrentUser().isBoardAdmin();
},
});
+3 -3
View File
@@ -325,7 +325,7 @@ Template.changeSettingsPopup.helpers({
});
},
startDayOfWeek() {
currentUser = Meteor.user();
currentUser = ReactiveCache.getCurrentUser();
if (currentUser) {
return currentUser.getStartDayOfWeek();
} else {
@@ -343,7 +343,7 @@ Template.changeSettingsPopup.events({
return ret;
},
'click .js-toggle-desktop-drag-handles'() {
currentUser = Meteor.user();
const currentUser = ReactiveCache.getCurrentUser();
if (currentUser) {
Meteor.call('toggleDesktopDragHandles');
} else if (window.localStorage.getItem('showDesktopDragHandles')) {
@@ -375,7 +375,7 @@ Template.changeSettingsPopup.events({
templateInstance.$('#start-day-of-week').val(),
10,
);
const currentUser = Meteor.user();
const currentUser = ReactiveCache.getCurrentUser();
if (isNaN(minLimit) || minLimit < -1) {
minLimit = -1;
}
+1
View File
@@ -1,4 +1,5 @@
import { ReactiveCache } from '/imports/reactiveCache';
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
// XXX There is no reason to define these shortcuts globally, they should be
// attached to a template (most of them will go in the `board` template).
+2
View File
@@ -1,3 +1,5 @@
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
const closedValue = null;
window.Modal = new (class {
+5 -3
View File
@@ -1,13 +1,15 @@
import { ReactiveCache } from '/imports/reactiveCache';
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
Utils = {
setBackgroundImage(url) {
const currentBoard = Utils.getCurrentBoard();
if (currentBoard.backgroundImageURL !== undefined) {
$(".board-wrapper,.board-wrapper .board-canvas").css({"background":"url(" + currentBoard.backgroundImageURL + ")","background-size":"cover"});
$(".board-wrapper").css({"background":"url(" + currentBoard.backgroundImageURL + ")","background-size":"cover"});
$(".swimlane,.swimlane .list,.swimlane .list .list-body,.swimlane .list:first-child .list-body").css({"background-color":"transparent"});
} else if (currentBoard.color !== undefined) {
currentBoard.setColor(currentBoard.color);
$(".minicard").css({"opacity": "0.9"});
} else if (currentBoard["background-color"]) {
currentBoard.setColor(currentBoard["background-color"]);
}
},
/** returns the current board id
+1
View File
@@ -1,4 +1,5 @@
import { TAPi18n } from '/imports/i18n';
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
const passwordField = AccountsTemplates.removeField('password');
const emailField = AccountsTemplates.removeField('email');
+21 -20
View File
@@ -1,4 +1,5 @@
import { TAPi18n } from '/imports/i18n';
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
let previousPath;
FlowRouter.triggers.exit([
@@ -24,7 +25,7 @@ FlowRouter.route('/', {
Utils.manageCustomUI();
Utils.manageMatomo();
BlazeLayout.render('defaultLayout', {
this.render('defaultLayout', {
headerBar: 'boardListHeaderBar',
content: 'boardList',
});
@@ -48,7 +49,7 @@ FlowRouter.route('/public', {
Utils.manageCustomUI();
Utils.manageMatomo();
BlazeLayout.render('defaultLayout', {
this.render('defaultLayout', {
headerBar: 'boardListHeaderBar',
content: 'boardList',
});
@@ -78,7 +79,7 @@ FlowRouter.route('/b/:id/:slug', {
Utils.manageCustomUI();
Utils.manageMatomo();
BlazeLayout.render('defaultLayout', {
this.render('defaultLayout', {
headerBar: 'boardHeaderBar',
content: 'board',
});
@@ -98,7 +99,7 @@ FlowRouter.route('/b/:boardId/:slug/:cardId', {
Utils.manageCustomUI();
Utils.manageMatomo();
BlazeLayout.render('defaultLayout', {
this.render('defaultLayout', {
headerBar: 'boardHeaderBar',
content: 'board',
});
@@ -118,7 +119,7 @@ FlowRouter.route('/shortcuts', {
onCloseGoTo: previousPath,
});
} else {
BlazeLayout.render('defaultLayout', {
this.render('defaultLayout', {
headerBar: 'shortcutsHeaderBar',
content: shortcutsTemplate,
});
@@ -143,7 +144,7 @@ FlowRouter.route('/b/templates', {
Utils.manageCustomUI();
Utils.manageMatomo();
BlazeLayout.render('defaultLayout', {
this.render('defaultLayout', {
headerBar: 'boardListHeaderBar',
content: 'boardList',
});
@@ -162,7 +163,7 @@ FlowRouter.route('/my-cards', {
Utils.manageCustomUI();
Utils.manageMatomo();
BlazeLayout.render('defaultLayout', {
this.render('defaultLayout', {
headerBar: 'myCardsHeaderBar',
content: 'myCards',
});
@@ -182,7 +183,7 @@ FlowRouter.route('/due-cards', {
Utils.manageCustomUI();
Utils.manageMatomo();
BlazeLayout.render('defaultLayout', {
this.render('defaultLayout', {
headerBar: 'dueCardsHeaderBar',
content: 'dueCards',
});
@@ -209,7 +210,7 @@ FlowRouter.route('/global-search', {
decodeURIComponent(FlowRouter.getQueryParam('q')),
);
}
BlazeLayout.render('defaultLayout', {
this.render('defaultLayout', {
headerBar: 'globalSearchHeaderBar',
content: 'globalSearch',
});
@@ -229,7 +230,7 @@ FlowRouter.route('/broken-cards', {
Utils.manageCustomUI();
Utils.manageMatomo();
BlazeLayout.render('defaultLayout', {
this.render('defaultLayout', {
headerBar: 'brokenCardsHeaderBar',
content: brokenCardsTemplate,
});
@@ -253,7 +254,7 @@ FlowRouter.route('/import/:source', {
Filter.reset();
Session.set('sortBy', '');
EscapeActions.executeAll();
BlazeLayout.render('defaultLayout', {
this.render('defaultLayout', {
headerBar: 'importHeaderBar',
content: 'import',
});
@@ -278,7 +279,7 @@ FlowRouter.route('/setting', {
],
action() {
Utils.manageCustomUI();
BlazeLayout.render('defaultLayout', {
this.render('defaultLayout', {
headerBar: 'settingHeaderBar',
content: 'setting',
});
@@ -302,7 +303,7 @@ FlowRouter.route('/information', {
},
],
action() {
BlazeLayout.render('defaultLayout', {
this.render('defaultLayout', {
headerBar: 'settingHeaderBar',
content: 'information',
});
@@ -326,7 +327,7 @@ FlowRouter.route('/people', {
},
],
action() {
BlazeLayout.render('defaultLayout', {
this.render('defaultLayout', {
headerBar: 'settingHeaderBar',
content: 'people',
});
@@ -350,7 +351,7 @@ FlowRouter.route('/admin-reports', {
},
],
action() {
BlazeLayout.render('defaultLayout', {
this.render('defaultLayout', {
headerBar: 'settingHeaderBar',
content: 'adminReports',
});
@@ -374,7 +375,7 @@ FlowRouter.route('/attachments', {
},
],
action() {
BlazeLayout.render('defaultLayout', {
this.render('defaultLayout', {
headerBar: 'settingHeaderBar',
content: 'attachments',
});
@@ -398,18 +399,18 @@ FlowRouter.route('/translation', {
},
],
action() {
BlazeLayout.render('defaultLayout', {
this.render('defaultLayout', {
headerBar: 'settingHeaderBar',
content: 'translation',
});
},
});
FlowRouter.notFound = {
FlowRouter.route('*', {
action() {
BlazeLayout.render('defaultLayout', { content: 'notFound' });
this.render('defaultLayout', { content: 'notFound' });
},
};
});
// We maintain a list of redirections to ensure that we don't break old URLs
// when we change our routing scheme.
+8 -8
View File
@@ -10,13 +10,13 @@
# NOTE: MongoDB has changed from 3.x to 4.x, in that case you need backup/restore with --noIndexRestore
# see https://github.com/wekan/wekan/wiki/Backup
# 1) Stop Wekan:
# docker-compose stop
# docker compose stop
# 2) Remove old Wekan app (wekan-app only, not that wekan-db container that has all your data)
# docker rm wekan-app
# 3) Get newest docker-compose.yml from https://github.com/wekan/wekan to have correct image,
# for example: "image: quay.io/wekan/wekan" or version tag "image: quay.io/wekan/wekan:v4.52"
# 4) Start Wekan:
# docker-compose up -d
# docker compose up -d
#----------------------------------------------------------------------------------
# ==== OPTIONAL: DEDICATED DOCKER USER ====
# 1) Optionally create a dedicated user for Wekan, for example:
@@ -36,14 +36,14 @@
# ----------------------------------------------------------------------------------
# ==== USAGE OF THIS docker-compose.yml ====
# 1) For seeing does Wekan work, try this and check with your web browser:
# docker-compose up
# docker compose up
# 2) Stop Wekan and start Wekan in background:
# docker-compose stop
# docker-compose up -d
# docker compose stop
# docker compose up -d
# 3) See running Docker containers:
# docker ps
# 4) Stop Docker containers:
# docker-compose stop
# docker compose stop
# ----------------------------------------------------------------------------------
# ===== INSIDE DOCKER CONTAINERS, AND BACKUP/RESTORE ====
# https://github.com/wekan/wekan/wiki/Backup
@@ -140,7 +140,7 @@ services:
- wekan-tier
#-------------------------------------------------------------------------------------
# ==== BUILD wekan-app DOCKER CONTAINER FROM SOURCE, if you uncomment these ====
# ==== and use commands: docker-compose up -d --build
# ==== and use commands: docker compose up -d --build
#build:
# context: .
# dockerfile: Dockerfile
@@ -585,7 +585,7 @@ services:
# If using LDAPS: LDAP_ENCRYPTION=ssl
#- LDAP_ENCRYPTION=false
#
# The certification for the LDAPS server. Certificate needs to be included in this docker-compose.yml file.
# The certification for the LDAPS server. Certificate needs to be included in this docker compose.yml file.
#- LDAP_CA_CERT=-----BEGIN CERTIFICATE-----MIIE+G2FIdAgIC...-----END CERTIFICATE-----
#
# Reject Unauthorized Certificate
+17 -5
View File
@@ -18,14 +18,15 @@ Any telemetry at any Firefox based browser can be additionally most locked down
Browser | [PWA](PWA) | Mobile | Desktop | OS
------- | ----| ------ | ------- | -------
[Mypal](https://releases.wekan.team/mypal/) | No | No | Newest | For 32bit ReactOS/WinXP/Win7/etc [issue](https://github.com/wekan/wekan/issues/3132), Other 32bit browsers probably not
Firefox | Android Yes | Android Newest | Newest | Win/Mac/Linux/RasPi
Morph Browser | No | Yes | Yes | [Ubuntu Touch](https://ubports.com) (based on Ubuntu 16.04) on PinePhone, OnePlus 3, [RasPi3](https://ci.ubports.com/job/rootfs/job/rootfs-rpi/) (not RasPi4 yet). Works best with bluetooth or USB mouse and keyboard.
Firefox | Android Yes | Android Newest | Newest | Win/Mac/Linux/BSD/RasPi. [Haiku](https://discuss.haiku-os.org/t/progress-on-porting-firefox/13493/143) not tested yet - [HN](https://news.ycombinator.com/item?id=41214762).
Morph Browser | No | Yes | Yes | [Ubuntu Touch](https://ubports.com) (based on Ubuntu 16.04) on PinePhone, OnePlus 3, [RasPi3](https://ci.ubports.com/job/rootfs/job/rootfs-rpi/) (not RasPi4 yet). Works best with bluetooth or USB mouse and keyboard. [Repo](https://gitlab.com/ubports/development/core/morph-browser)
[OpenStore App](https://open-store.io/app/wekan.wekanteam) | Yes | Yes | Yes | Based on [Wekan PWA](https://boards.wekan.team/b/D2SzJKZDS4Z48yeQH/wekan-open-source-kanban-board-with-mit-license/s7SkzYviC2e963FkT), [Ubuntu Touch](https://ubports.com) app at [OpenStore](https://open-store.io/app/wekan.wekanteam) using Morph browser with Wekan demo & development server https://boards.wekan.team . Tested on [RasPi3](https://ci.ubports.com/job/rootfs/job/rootfs-rpi/). PWA URL is configured here https://github.com/wekan/wekan-openstore/blob/master/wekan.desktop#L3
[Waterfox](https://www.waterfox.net) | No | No | Yes | Win/Mac/Linux, more private than Firefox, no tracking
[Waterfox](https://www.waterfox.net) | No | No | Yes | Win/Mac/Linux, more private than Firefox, no tracking. [Repo](https://github.com/BrowserWorks/Waterfox)
[Floorp](https://floorp.app) | No | No | Yes | [Win/Mac/Linux](https://github.com/Floorp-Projects/Floorp/releases), more private than Firefox, [Repo](https://github.com/Floorp-Projects/Floorp)
[Mercury](https://thorium.rocks/mercury) | No | No | Yes | [Win/Linux](https://github.com/Alex313031/Mercury/releases), more private than Firefox, [Repo](https://github.com/Alex313031/Mercury)
[SeaLion](https://github.com/wicknix/SeaLion) | No | No | Yes | [MacOS 10.7-14.1 x32,x64,ppc,ppc64/Linux x64](https://github.com/wicknix/SeaLion/releases), [Repo](https://github.com/wicknix/SeaLion)
[LibreWolf](https://librewolf.net) | No | No | Yes | [Win/Mac/Linux](https://librewolf.net/installation/)
[LibreWolf](https://librewolf.net) | No | No | Yes | [Win/Mac/Linux](https://librewolf.net/installation/), [Repos](https://codeberg.org/librewolf)
[Zen Browser](https://www.zen-browser.app/) | No | No | Yes | [Win/Mac/Linux](https://www.zen-browser.app/download), [Repos](https://github.com/zen-browser), [Review at YouTube](https://www.youtube.com/watch?v=tKM2N4TQHQY)
## Chromium based
@@ -54,6 +55,17 @@ Browser | [PWA](PWA) | Mobile | Desktop | OS
------- | ----| ------ | ------- | -------
Internet Explorer | No | No | No | No | No
## Servo based, not tested yet
- Apache 2.0 or MIT license
- Repo: https://github.com/versotile-org/verso
## Ladybird based, not tested yet:
- BSD-2-Clause license
- Website: https://ladybird.org
- Repo: https://github.com/LadybirdBrowser/ladybird
## Other ways to create Mobile App with Meteor
https://guide.meteor.com/cordova
@@ -70,4 +82,4 @@ https://forums.meteor.com/t/desktop-electron-meteor-app-with-todesktop/60904
- If there is sometime a need to develop payment feature, that does not exist yet
- https://forums.meteor.com/t/need-help-adding-in-app-purchases-to-a-meteor-app-specifically-adding-subscription-support-for-android-play-store/40510
- https://www.npmjs.com/package/cordova-plugin-purchase
- https://www.npmjs.com/package/cordova-plugin-purchase
+2 -2
View File
@@ -1,6 +1,6 @@
# Routing
We're using [FlowRouter](https://github.com/kadirahq/flow-router) client side router inside **[config/router.js](https://github.com/wekan/wekan/tree/main/config/router.js)**.
We're using [FlowRouter](https://github.com/veliovgroup/flow-router) client side router inside **[config/router.js](https://github.com/wekan/wekan/tree/main/config/router.js)**.
For accounts there is [AccountsTemplates](https://github.com/meteor-useraccounts) configured in **[config/accounts.js](https://github.com/wekan/wekan/tree/main/config/accounts.js)**.
# Client
@@ -183,5 +183,5 @@ Other files:
# Contributions to this page
This documentation was contributed by [TNick](https://github.com/TNick) and [xet7](https://github.com/xet7) while Wekan was at commit [e2f768c](https://github.com/wekan/wekan/tree/e2f768c6a0f913b7c5f07695dce8cec692037255).
This documentation was contributed by [TNick](https://github.com/TNick) and [xet7](https://github.com/xet7) while Wekan was at commit [e2f768c](https://github.com/wekan/wekan/tree/e2f768c6a0f913b7c5f07695dce8cec692037255).
Please add new files, fixes, updates, etc directly to this page.
+67 -14
View File
@@ -1,18 +1,71 @@
## Upgrading Meteor
## Videos about upgrading to Meteor 3
- Disclaimer:
- These are opinions about upgrading, from xet7, maintainer of WeKan Open Source kanban https://wekan.github.io
- xet7 thinks, that it is good to keep using current frontend and backend frameworks, upgrade them when possible. If there is any problems, ask at https://forums.meteor.com
- xet7 thinks, that upgrading to newest Meteor 2 and Meteor 3 is being made more easier all the time, when new dependencies become available, any bugs are fixed, etc. So it is good to make all possible upgrading steps available.
- Upgrade to newest 2.14 https://guide.meteor.com/2.14-migration . Currently xet7 is using newest 2.14.1-beta.0 in production release of WeKan https://forums.meteor.com/t/meteor-v2-14-1-beta-0-is-out/61142
- Prepare for 3.0 https://guide.meteor.com/3.0-migration
- Migrate Async
- Helper tool https://forums.meteor.com/t/blaze-async-migration-helper-babel-plugin-tracker-async-enhance-for-the-client-side-released/60842
- https://guide.meteor.com/prepare-meteor-3.0
- Look at progress of migrated packages https://forums.meteor.com/t/looking-for-help-migrating-packages-to-meteor-3-0/60985
- Storyteller
- 2024-07-15: WeKan Upgrades https://www.youtube.com/watch?v=Zjb3m9JsAD0
- 2024-07-08: Upgrading Meteor examples https://www.youtube.com/watch?v=jzWXxOe93t4
- Upcoming and past: https://www.youtube.com/@storytellercz/streams
- React.js
- WeKan uses Blaze and Jade, not React.
- 2024-08-02:
- https://www.youtube.com/watch?v=NnT7AbVMnj4
- https://thenewstack.io/after-a-decade-of-react-is-frontend-a-post-react-world-now/
- https://thenewstack.io/pivoting-from-react-to-native-dom-apis-a-real-world-example/
- https://thenewstack.io/how-web-components-are-used-at-github-and-salesforce/
- https://devclass.com/2024/07/22/react-community-splitting-into-full-stack-and-client-only-camps-suggests-survey/
- https://news.ycombinator.com/item?id=41068685
- 2024-07-10: Storyteller at React Wroclaw Meetup, talking about Meteor.js and React: https://www.youtube.com/watch?v=4dnM6bXZCz4&t=741s
- How A Small Team of Developers Created React at Facebook | React.js: The Documentary https://www.youtube.com/watch?v=8pDqJVdNa44
https://www.youtube.com/watch?v=8pDqJVdNa44
- Meteor Dispatches Podcast
- 46: 2024-07-12: Packages you need in every app https://www.youtube.com/watch?v=S2YkZfKN0DI
- 25: 2024-02-09: WeKan Security https://www.youtube.com/watch?v=zic-h8jG6F8
- 16: 2023-12-08: WeKan interview https://www.youtube.com/watch?v=ke-mbnZM3zE
- Upcoming and past: https://www.youtube.com/@meteorjscommunity/streams
- Playlists: https://www.youtube.com/@meteorjscommunity/playlists
- Some recent also had info, how to make dependencies compatible with both Meteor 2 and Meteor 3
- Add Eslint 3 and fix anything found
- https://youtu.be/rFjNNNc_7-E
- https://www.youtube.com/watch?v=rFjNNNc_7-E
- https://github.com/quavedev/eslint-plugin
- https://github.com/quavedev/meteor-template/pull/8
- Watch Meteor Dispatches etc Podcasts https://www.youtube.com/@meteorjscommunity/playlists
- Some recent also had info, how to make dependencies compatible with both Meteor 2 and Meteor 3
## Upgrading to Meteor 3
- Meteor 3 migration guide: https://v3-migration-docs.meteor.com ( older pages at https://guide.meteor.com/3.0-migration or https://guide.meteor.com/prepare-meteor-3.0 )
- Look at progress of migrated packages https://forums.meteor.com/t/looking-for-help-migrating-packages-to-meteor-3-0/60985
- Migrate from Fibers (works only at Meteor 2 and Node.js 14) to Async/Await (works with Meteor 3 and Node.js 20)
- Helper tool https://forums.meteor.com/t/blaze-async-migration-helper-babel-plugin-tracker-async-enhance-for-the-client-side-released/60842
- Info how Async/Await works, from Storyteller: https://github.com/wekan/wekan/wiki/AsyncAwait
- Forums posts about migrating: https://forums.meteor.com
- ( Older version upgrade to newest 2.14 https://guide.meteor.com/2.14-migration )
## Removing unused files
From Meteor Discord chat from someone:
> Nice tool that I found out about today. I was able to remove 58 unused files, functions, exports, types and dependencies 😄
>
> https://knip.dev
## Lint
From Meteor Discord chat from someone:
> We started using https://biomejs.dev to replace eslint and prettier on Galaxy 2, and it's been amazing. It's speedy, easy to configure, and has fewer packages to care about.
>
> Just sharing it here in case someone has never heard about it before
## Building WeKan
- https://github.com/wekan/wekan/wiki/Emoji
- Docs: https://github.com/wekan/wekan/tree/main/docs
## Similar technology
- https://en.wikipedia.org/wiki/JavaScript_engine
- https://en.wikipedia.org/wiki/Single-page_application
- https://en.wikipedia.org/wiki/Web_framework
- https://en.wikipedia.org/wiki/Progressive_web_app
- https://en.wikipedia.org/wiki/Web_2.0
- https://en.wikipedia.org/wiki/Meteor_(web_framework)
- https://en.wikipedia.org/wiki/Next.js
+2 -2
View File
@@ -1,5 +1,5 @@
Some Python etc code in WeKan, that is not yet added directly to WeKan:
- [LDAP sync script, that also correctly removes users](https://github.com/wekan/wekan/blob/main/ldap-sync/ldap-sync.py)
- [LDAP sync script, that also correctly removes users](https://github.com/wekan/wekan/blob/main/docs/Login/ldap-sync/ldap-sync.py)
- [Email notifications to AWS SES](https://github.com/wekan/wekan/issues/3543#issuecomment-1199897164)
- [Prometheus Exporter](https://github.com/wekan/wekan-prometheus-exporter)
- [Burndown Chart](Burndown-and-Velocity-Chart)
@@ -12,4 +12,4 @@ Some Python etc code in WeKan, that is not yet added directly to WeKan:
- [Logstash and ElasticSearch](https://github.com/wekan/wekan-logstash)
- iCal server in [Python](https://github.com/wekan/wekan-ical-server) and [PHP](https://github.com/wekan/wekan-ical-php)
- [Sandstorm CSV related Python code](Wekan-Sandstorm-cards-to-CSV-using-Python)
- [Trello API test code](https://github.com/wekan/wekan/tree/main/trello)
- [Trello API test code](https://github.com/wekan/wekan/tree/main/docs/ImportExport/trello)
+12
View File
@@ -0,0 +1,12 @@
Q: ​​Is Multi-tenancy like ability to configure multiple ROOT_URL for same Meteor app? Or having relative URLs?
A: Yes
https://www.youtube.com/watch?v=917v1a01-Ko
https://github.com/Meteor-Community-Packages/meteor-partitioner
Related:
- https://www.enterpriseready.io
- https://github.com/clinical-meteor/hipaa-audit-log
+29 -1
View File
@@ -1,4 +1,32 @@
Related SAML code, not in WeKan yet: https://forums.meteor.com/t/what-are-you-working-on/59187
Related Meteor SAML code, not in WeKan yet:
- New: https://forums.meteor.com/t/meteor-and-saml/61561
- Old link: https://forums.meteor.com/t/what-are-you-working-on/59187
Sandstorm has SAML login, and old WeKan that will be updated someday:
- https://github.com/wekan/wekan/wiki/Sandstorm
How SAML works:
- https://ssoready.com/blog/engineering/a-gentle-intro-to-saml/
- https://news.ycombinator.com/item?id=41036982
- https://www.sheshbabu.com/posts/visual-explanation-of-saml-authentication/
- https://news.ycombinator.com/item?id=41057814
Ruby on Rails OmniAuth, that has Shibboleth and SAML:
- https://github.com/omniauth/omniauth/wiki/List-of-Strategies
- https://github.com/omniauth/omniauth
SAML at SSOReady:
- https://github.com/ssoready/ssoready
- https://news.ycombinator.com/item?id=41110850
The SSO Wall of Shame:
- https://sso.tax
[SAML Issue](https://github.com/wekan/wekan/issues/708)
+54 -10
View File
@@ -1,3 +1,47 @@
## Building custom Docker image
This is only for developers. For normal users, do not add these options, just start with `docker compose up -d`
This only builds `wekan-app` Docker image, where is Node.js 14.x and all Javascript code. This does not build `wekan-db` MongoDB image, that usually does not require modifications.
Alpine Linux does not work properly with current Meteor 2 based WeKan. Ubuntu works, and has newest security fixes.
Only amd64 currently works. Currently used Node.js 14.x segfaults at arm64 and s390x. Only Node.js 14.x is compatible with current version of Meteor 2 based WeKan. Trying to upgrade is in progress https://github.com/wekan/wekan/issues/5475
Dockerfile is at https://raw.githubusercontent.com/wekan/wekan/main/Dockerfile
For building custom image, and then running it, uncomment these lines,
that are currently here, but line numbers could change, if that docker-compose.yml
is later modified:
https://github.com/wekan/wekan/blob/main/docker-compose.yml#L144-L146
After your above modifications, text should look like this:
```
#-------------------------------------------------------------------------------------
# ==== BUILD wekan-app DOCKER CONTAINER FROM SOURCE, if you uncomment these ====
# ==== and use commands: docker compose up -d --build
build:
context: .
dockerfile: Dockerfile
#-------------------------------------------------------------------------------------
```
Then modify ROOT_URL, etc settings as needed, see https://github.com/wekan/wekan/wiki/Settings
Start WeKan with custom built Dockerfile with this command:
```
docker compose up -d --build
```
If you like to only build Dockerfile:
```
docker build .
```
You can also push your image to some Docker registry, like here it's done for WeKan:
https://github.com/wekan/wekan/blob/main/releases/docker-push-wekan.sh
## Docker Containers
- [GitHub](https://github.com/wekan/wekan/pkgs/container/wekan)
@@ -12,7 +56,7 @@ export ROOT_URL=http://SERVER-IP-ADDRESS-HERE
```
Then start WeKan with:
```
docker-compose up -d
docker compose up -d
```
SSL/TLS info at https://github.com/wekan/wekan/wiki/Settings
@@ -35,7 +79,7 @@ There is much more settings at well-documented [docker-compose.yml](https://raw.
If you don't need to build Wekan, use prebuilt container with docker-compose.yml from https://github.com/wekan/wekan like this:
```
docker-compose up -d
docker compose up -d
```
If you like to build from source, clone Wekan repo:
@@ -46,7 +90,7 @@ Then edit docker-compose.yml with [these lines uncommented](https://github.com/w
```
#-------------------------------------------------------------------------------------
# ==== BUILD wekan-app DOCKER CONTAINER FROM SOURCE, if you uncomment these ====
# ==== and use commands: docker-compose up -d --build
# ==== and use commands: docker compose up -d --build
build:
context: .
dockerfile: Dockerfile
@@ -62,7 +106,7 @@ Then edit docker-compose.yml with [these lines uncommented](https://github.com/w
```
Then you can build Wekan with
```
docker-compose up -d --build
docker compose up -d --build
```
## Example for latest Wekan, port 2000 to Docker Wekan internal port 8080
@@ -112,7 +156,7 @@ docker rm wekan-app
```
Then edit docker-compose.yml to have higher wekan-app image version tag, like `image: wekanteam/wekan:v4.12`. Then:
```
docker-compose up -d
docker compose up -d
```
### Images
Quay: `image: quay.io/wekan/wekan:v4.07`
@@ -206,25 +250,25 @@ docker run -d --restart=always --name wekan --link "wekan-db:db" -e "MONGO_URL=m
- No build step and pull from [quay](https://quay.io/repository/wekan/wekan?tab=tags)
```
sudo docker-compose up -d --nobuild
sudo docker compose up -d --nobuild
```
- Build default
```
sudo docker-compose up -d --build
sudo docker compose up -d --build
```
- Build with newer Node version:
```
echo 'NODE_VERSION=v8.11.1' >> .env && \
sudo docker-compose up -d --build
sudo docker compose up -d --build
```
- Build custom image off a release candidate or beta for meteor
```
echo 'METEOR_EDGE=1.5-beta.17' >> .env && \
echo 'USE_EDGE=true' >> .env && \
sudo docker-compose up -d --build
sudo docker compose up -d --build
```
## Docker env for Wekan dev
@@ -239,4 +283,4 @@ sudo docker-compose up -d --build
* [Caddy Webserver Config](Caddy-Webserver-Config)
* [Nginx Webserver Config](Nginx-Webserver-Config)
* [Apache Webserver Config](Apache)
* [Apache Webserver Config](Apache)
+4 -4
View File
@@ -8,19 +8,19 @@ This is without container (without Docker or Snap).
Right click and download files 1-4:
1. [wekan-7.49-amd64-windows.zip](https://github.com/wekan/wekan/releases/download/v7.49/wekan-7.49-amd64-windows.zip)
1. [wekan-7.59-amd64-windows.zip](https://github.com/wekan/wekan/releases/download/v7.59/wekan-7.59-amd64-windows.zip)
2. [node.exe](https://nodejs.org/dist/latest-v14.x/win-x64/node.exe)
3. [mongodb-windows-x86_64-6.0.15-signed.msi](https://fastdl.mongodb.org/windows/mongodb-windows-x86_64-6.0.15-signed.msi)
3. [mongodb-windows-x86_64-6.0.17-signed.msi](https://fastdl.mongodb.org/windows/mongodb-windows-x86_64-6.0.17-signed.msi)
4. [start-wekan.bat](https://raw.githubusercontent.com/wekan/wekan/main/start-wekan.bat)
5. Copy files from steps 1-4 with USB stick or DVD to offline Windows computer
6. Double click `mongodb-windows-x86_64-6.0.15-signed.msi` . In installer, uncheck downloading MongoDB compass.
6. Double click `mongodb-windows-x86_64-6.0.17-signed.msi` . In installer, uncheck downloading MongoDB compass.
7. Unzip `wekan-7.49-amd64-windows.zip` , inside it is directory `bundle`, to it copy other files:
7. Unzip `wekan-7.59-amd64-windows.zip` , inside it is directory `bundle`, to it copy other files:
```
bundle (directory)
+1
View File
@@ -0,0 +1 @@
https://arstechnica.com/security/2024/07/secure-boot-is-completely-compromised-on-200-models-from-5-big-device-makers/
+458 -1
View File
@@ -1,5 +1,22 @@
[Caddy 2 .well-known/assetlinks.json config for WeKan Android Play Store app](../PWA#fullscreen-android-app-with-caddy-and-wekan-server)
# CloudFlare DNS
CNAME:
If some customer has CNAME to hosting platform subdomain,
hosting platform subdomain needs to be A record IP address to
hosting server Caddy webserver, because only that way
it can get Let's Encrypt TLS cert. It can not be nested like
customer CNAME to hosting CNAME to hosting A record,
because then getting Let's Encrypt TLS cert does not work.
Wildcard:
Wildcard DNS for Sandstorm only works with CloudFlare DNS.
It does not work with FreeDNS of Namecheap. More info at
https://github.com/wekan/wekan/wiki/Sandstorm
## Caddy 2
WeKan Snap Candidate for any Snap distros: https://github.com/wekan/wekan/wiki/OpenSuse , disable internal old Caddy 1, when using Caddy 2:
@@ -76,6 +93,446 @@ Caddy commands list:
caddy help
```
***
### PWA site.webmanifest icons override Caddy example
PWABuilder settings to create Android app at https://pwabuilder.com
- Web view (not Custom Tabs)
- Fullscreen (When not showing top and bottom toolbars. If you like to show those toolbars, change fullscreen to standalone)
- Notifications [X] Enable
- Signing key [X] Use mine
PWABuilder upgrades:
- Android app upgrade to Android SDK 34 was made with help of this video https://github.com/pwa-builder/PWABuilder/issues/4766#issuecomment-2229867608
Icons override at site.webmanifest:
- These settings at Caddyfile override icon URLs etc
If you like to show toolbars at top and bottom, change also here `fullscreen` to `standalone`
```
boards.wekan.team {
tls {
alpn http/1.1
}
header /.well-known/* Content-Type application/json
header /.well-known/* Access-Control-Allow-Origin *
respond /.well-known/assetlinks.json `[ {
"relation": ["delegate_permission/common.handle_all_urls"],
"target": {
"namespace": "android_app",
"package_name": "team.wekan.boards.twa",
"sha256_cert_fingerprints": ["AA:AA:ED:7D:4C:9C:5A:A3:B5:DA:10:66:14:34:07:5D:EB:BE:96:CD:82:7B:09:46:47:13:65:29:5B:EA:96:30","61:41:86:5B:05:13:9B:64:5F:39:75:5A:16:C3:F2:22:25:6C:DA:74:B9:B0:8C:5F:93:B0:D2:26:65:16:1B:E6"]
}
} ]`
header /site.webmanifest/* Content-Type application/json
header /site.webmanifest/* Access-Control-Allow-Origin *
respond /site.webmanifest ` {
"name": "Wekan",
"short_name": "Wekan",
"icons": [ {
"src": "svg-etc/wekan-logo-512.svg",
"sizes": "any",
"type": "image/svg"
} , {
"src": "android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
} , {
"src": "android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
} , {
"src": "Square150x150Logo.scale-100.png",
"sizes": "150x150",
"type": "image/png"
} , {
"src": "Square44x44Logo.scale-100.png",
"sizes": "44x44",
"type": "image/png"
} , {
"src": "StoreLogo.scale-100.png",
"sizes": "50x50",
"type": "image/png"
} , {
"src": "maskable_icon.png",
"sizes": "474x474",
"type": "image/png",
"purpose": "maskable"
} , {
"src": "monochrome-icon-512x512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "monochrome"
} , {
"src": "windows11/SmallTile.scale-100.png",
"sizes": "71x71"
} , {
"src": "windows11/SmallTile.scale-125.png",
"sizes": "89x89"
} , {
"src": "windows11/SmallTile.scale-150.png",
"sizes": "107x107"
} , {
"src": "windows11/SmallTile.scale-200.png",
"sizes": "142x142"
} , {
"src": "windows11/SmallTile.scale-400.png",
"sizes": "284x284"
} , {
"src": "windows11/Square150x150Logo.scale-100.png",
"sizes": "150x150"
} , {
"src": "windows11/Square150x150Logo.scale-125.png",
"sizes": "188x188"
} , {
"src": "windows11/Square150x150Logo.scale-150.png",
"sizes": "225x225"
} , {
"src": "windows11/Square150x150Logo.scale-200.png",
"sizes": "300x300"
} , {
"src": "windows11/Square150x150Logo.scale-400.png",
"sizes": "600x600"
} , {
"src": "windows11/Wide310x150Logo.scale-100.png",
"sizes": "310x150"
} , {
"src": "windows11/Wide310x150Logo.scale-125.png",
"sizes": "388x188"
} , {
"src": "windows11/Wide310x150Logo.scale-150.png",
"sizes": "465x225"
} , {
"src": "windows11/Wide310x150Logo.scale-200.png",
"sizes": "620x300"
} , {
"src": "windows11/Wide310x150Logo.scale-400.png",
"sizes": "1240x600"
} , {
"src": "windows11/LargeTile.scale-100.png",
"sizes": "310x310"
} , {
"src": "windows11/LargeTile.scale-125.png",
"sizes": "388x388"
} , {
"src": "windows11/LargeTile.scale-150.png",
"sizes": "465x465"
} , {
"src": "windows11/LargeTile.scale-200.png",
"sizes": "620x620"
} , {
"src": "windows11/LargeTile.scale-400.png",
"sizes": "1240x1240"
} , {
"src": "windows11/Square44x44Logo.scale-100.png",
"sizes": "44x44"
} , {
"src": "windows11/Square44x44Logo.scale-125.png",
"sizes": "55x55"
} , {
"src": "windows11/Square44x44Logo.scale-150.png",
"sizes": "66x66"
} , {
"src": "windows11/Square44x44Logo.scale-200.png",
"sizes": "88x88"
} , {
"src": "windows11/Square44x44Logo.scale-400.png",
"sizes": "176x176"
} , {
"src": "windows11/StoreLogo.scale-100.png",
"sizes": "50x50"
} , {
"src": "windows11/StoreLogo.scale-125.png",
"sizes": "63x63"
} , {
"src": "windows11/StoreLogo.scale-150.png",
"sizes": "75x75"
} , {
"src": "windows11/StoreLogo.scale-200.png",
"sizes": "100x100"
} , {
"src": "windows11/StoreLogo.scale-400.png",
"sizes": "200x200"
} , {
"src": "windows11/SplashScreen.scale-100.png",
"sizes": "620x300"
} , {
"src": "windows11/SplashScreen.scale-125.png",
"sizes": "775x375"
} , {
"src": "windows11/SplashScreen.scale-150.png",
"sizes": "930x450"
} , {
"src": "windows11/SplashScreen.scale-200.png",
"sizes": "1240x600"
} , {
"src": "windows11/SplashScreen.scale-400.png",
"sizes": "2480x1200"
} , {
"src": "windows11/Square44x44Logo.targetsize-16.png",
"sizes": "16x16"
} , {
"src": "windows11/Square44x44Logo.targetsize-20.png",
"sizes": "20x20"
} , {
"src": "windows11/Square44x44Logo.targetsize-24.png",
"sizes": "24x24"
} , {
"src": "windows11/Square44x44Logo.targetsize-30.png",
"sizes": "30x30"
} , {
"src": "windows11/Square44x44Logo.targetsize-32.png",
"sizes": "32x32"
} , {
"src": "windows11/Square44x44Logo.targetsize-36.png",
"sizes": "36x36"
} , {
"src": "windows11/Square44x44Logo.targetsize-40.png",
"sizes": "40x40"
} , {
"src": "windows11/Square44x44Logo.targetsize-44.png",
"sizes": "44x44"
} , {
"src": "windows11/Square44x44Logo.targetsize-48.png",
"sizes": "48x48"
} , {
"src": "windows11/Square44x44Logo.targetsize-60.png",
"sizes": "60x60"
} , {
"src": "windows11/Square44x44Logo.targetsize-64.png",
"sizes": "64x64"
} , {
"src": "windows11/Square44x44Logo.targetsize-72.png",
"sizes": "72x72"
} , {
"src": "windows11/Square44x44Logo.targetsize-80.png",
"sizes": "80x80"
} , {
"src": "windows11/Square44x44Logo.targetsize-96.png",
"sizes": "96x96"
} , {
"src": "windows11/Square44x44Logo.targetsize-256.png",
"sizes": "256x256"
} , {
"src": "windows11/Square44x44Logo.altform-unplated_targetsize-16.png",
"sizes": "16x16"
} , {
"src": "windows11/Square44x44Logo.altform-unplated_targetsize-20.png",
"sizes": "20x20"
} , {
"src": "windows11/Square44x44Logo.altform-unplated_targetsize-24.png",
"sizes": "24x24"
} , {
"src": "windows11/Square44x44Logo.altform-unplated_targetsize-30.png",
"sizes": "30x30"
} , {
"src": "windows11/Square44x44Logo.altform-unplated_targetsize-32.png",
"sizes": "32x32"
} , {
"src": "windows11/Square44x44Logo.altform-unplated_targetsize-36.png",
"sizes": "36x36"
} , {
"src": "windows11/Square44x44Logo.altform-unplated_targetsize-40.png",
"sizes": "40x40"
} , {
"src": "windows11/Square44x44Logo.altform-unplated_targetsize-44.png",
"sizes": "44x44"
} , {
"src": "windows11/Square44x44Logo.altform-unplated_targetsize-48.png",
"sizes": "48x48"
} , {
"src": "windows11/Square44x44Logo.altform-unplated_targetsize-60.png",
"sizes": "60x60"
} , {
"src": "windows11/Square44x44Logo.altform-unplated_targetsize-64.png",
"sizes": "64x64"
} , {
"src": "windows11/Square44x44Logo.altform-unplated_targetsize-72.png",
"sizes": "72x72"
} , {
"src": "windows11/Square44x44Logo.altform-unplated_targetsize-80.png",
"sizes": "80x80"
} , {
"src": "windows11/Square44x44Logo.altform-unplated_targetsize-96.png",
"sizes": "96x96"
} , {
"src": "windows11/Square44x44Logo.altform-unplated_targetsize-256.png",
"sizes": "256x256"
} , {
"src": "windows11/Square44x44Logo.altform-lightunplated_targetsize-16.png",
"sizes": "16x16"
} , {
"src": "windows11/Square44x44Logo.altform-lightunplated_targetsize-20.png",
"sizes": "20x20"
} , {
"src": "windows11/Square44x44Logo.altform-lightunplated_targetsize-24.png",
"sizes": "24x24"
} , {
"src": "windows11/Square44x44Logo.altform-lightunplated_targetsize-30.png",
"sizes": "30x30"
} , {
"src": "windows11/Square44x44Logo.altform-lightunplated_targetsize-32.png",
"sizes": "32x32"
} , {
"src": "windows11/Square44x44Logo.altform-lightunplated_targetsize-36.png",
"sizes": "36x36"
} , {
"src": "windows11/Square44x44Logo.altform-lightunplated_targetsize-40.png",
"sizes": "40x40"
} , {
"src": "windows11/Square44x44Logo.altform-lightunplated_targetsize-44.png",
"sizes": "44x44"
} , {
"src": "windows11/Square44x44Logo.altform-lightunplated_targetsize-48.png",
"sizes": "48x48"
} , {
"src": "windows11/Square44x44Logo.altform-lightunplated_targetsize-60.png",
"sizes": "60x60"
} , {
"src": "windows11/Square44x44Logo.altform-lightunplated_targetsize-64.png",
"sizes": "64x64"
} , {
"src": "windows11/Square44x44Logo.altform-lightunplated_targetsize-72.png",
"sizes": "72x72"
} , {
"src": "windows11/Square44x44Logo.altform-lightunplated_targetsize-80.png",
"sizes": "80x80"
} , {
"src": "windows11/Square44x44Logo.altform-lightunplated_targetsize-96.png",
"sizes": "96x96"
} , {
"src": "windows11/Square44x44Logo.altform-lightunplated_targetsize-256.png",
"sizes": "256x256"
} , {
"src": "android/android-launchericon-512-512.png",
"sizes": "512x512"
} , {
"src": "android/android-launchericon-192-192.png",
"sizes": "192x192"
} , {
"src": "android/android-launchericon-144-144.png",
"sizes": "144x144"
} , {
"src": "android/android-launchericon-96-96.png",
"sizes": "96x96"
} , {
"src": "android/android-launchericon-72-72.png",
"sizes": "72x72"
} , {
"src": "android/android-launchericon-48-48.png",
"sizes": "48x48"
} , {
"src": "ios/16.png",
"sizes": "16x16"
} , {
"src": "ios/20.png",
"sizes": "20x20"
} , {
"src": "ios/29.png",
"sizes": "29x29"
} , {
"src": "ios/32.png",
"sizes": "32x32"
} , {
"src": "ios/40.png",
"sizes": "40x40"
} , {
"src": "ios/50.png",
"sizes": "50x50"
} , {
"src": "ios/57.png",
"sizes": "57x57"
} , {
"src": "ios/58.png",
"sizes": "58x58"
} , {
"src": "ios/60.png",
"sizes": "60x60"
} , {
"src": "ios/64.png",
"sizes": "64x64"
} , {
"src": "ios/72.png",
"sizes": "72x72"
} , {
"src": "ios/76.png",
"sizes": "76x76"
} , {
"src": "ios/80.png",
"sizes": "80x80"
} , {
"src": "ios/87.png",
"sizes": "87x87"
} , {
"src": "ios/100.png",
"sizes": "100x100"
} , {
"src": "ios/114.png",
"sizes": "114x114"
} , {
"src": "ios/120.png",
"sizes": "120x120"
} , {
"src": "ios/128.png",
"sizes": "128x128"
} , {
"src": "ios/144.png",
"sizes": "144x144"
} , {
"src": "ios/152.png",
"sizes": "152x152"
} , {
"src": "ios/167.png",
"sizes": "167x167"
} , {
"src": "ios/180.png",
"sizes": "180x180"
} , {
"src": "ios/192.png",
"sizes": "192x192"
} , {
"src": "ios/256.png",
"sizes": "256x256"
} , {
"src": "ios/512.png",
"sizes": "512x512"
} , {
"src": "ios/1024.png",
"sizes": "1024x1024"
}
],
"screenshots": [ {
"src": "screenshot1.webp",
"sizes": "1280x720",
"type": "image/webp"
} , {
"src": "screenshot2.webp",
"sizes": "1280x720",
"type": "image/webp"
}
],
"theme_color": "#000000",
"background_color": "#000000",
"start_url": "sign-in",
"display": "fullscreen",
"orientation": "any",
"categories": [
"productivity"
],
"iarc_rating_id": "70d7c4a4-3e5a-4714-a7dc-fa006613ba96",
"description": "Open Source kanban with MIT license",
"dir": "auto",
"scope": "https://boards.wekan.team",
"prefer_related_applications": false,
"display_override": [
"fullscreen"
]
} `
reverse_proxy 127.0.0.1:3025
}
```
***
@@ -278,4 +735,4 @@ Start caddy and enable service:
sudo systemctl daemon-reload
sudo systemctl start caddy@username
sudo systemctl enable caddy@username
```
```
-3
View File
@@ -128,9 +128,6 @@ ReactiveCacheServer = {
return ret;
},
getUsers(selector = {}, options = {}, getQuery = false) {
// getUsers(selector, options, getQuery) {
// let ret = Users.find(undefined, {});
// console.log("getUser count: ", ret.count())
let ret = Users.find(selector, options);
if (getQuery !== true) {
ret = ret.fetch();
+2 -1
View File
@@ -9,6 +9,7 @@ import {
TYPE_TEMPLATE_CONTAINER,
} from '/config/const';
import Users from "./users";
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
// const escapeForRegex = require('escape-string-regexp');
@@ -2208,7 +2209,7 @@ if (Meteor.isServer) {
});
}
});
/**
* @operation add_board_label
* @summary Add a label to a board
+15 -20
View File
@@ -8,6 +8,7 @@ import {
} from '../config/const';
import Attachments, { fileStoreStrategyFactory } from "./attachments";
import { copyFile } from './lib/fileStoreStrategy.js';
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
Cards = new Mongo.Collection('cards');
@@ -351,7 +352,7 @@ Cards.attachSchema(
},
'poker.question': {
type: Boolean,
defaultValue: false,
optional: true,
},
'poker.one': {
/**
@@ -359,7 +360,6 @@ Cards.attachSchema(
*/
type: [String],
optional: true,
defaultValue: [],
},
'poker.two': {
/**
@@ -367,7 +367,6 @@ Cards.attachSchema(
*/
type: [String],
optional: true,
defaultValue: [],
},
'poker.three': {
/**
@@ -375,7 +374,6 @@ Cards.attachSchema(
*/
type: [String],
optional: true,
defaultValue: [],
},
'poker.five': {
/**
@@ -383,7 +381,6 @@ Cards.attachSchema(
*/
type: [String],
optional: true,
defaultValue: [],
},
'poker.eight': {
/**
@@ -391,7 +388,6 @@ Cards.attachSchema(
*/
type: [String],
optional: true,
defaultValue: [],
},
'poker.thirteen': {
/**
@@ -399,7 +395,6 @@ Cards.attachSchema(
*/
type: [String],
optional: true,
defaultValue: [],
},
'poker.twenty': {
/**
@@ -407,7 +402,6 @@ Cards.attachSchema(
*/
type: [String],
optional: true,
defaultValue: [],
},
'poker.forty': {
/**
@@ -415,7 +409,6 @@ Cards.attachSchema(
*/
type: [String],
optional: true,
defaultValue: [],
},
'poker.oneHundred': {
/**
@@ -423,7 +416,6 @@ Cards.attachSchema(
*/
type: [String],
optional: true,
defaultValue: [],
},
'poker.unsure': {
/**
@@ -431,16 +423,14 @@ Cards.attachSchema(
*/
type: [String],
optional: true,
defaultValue: [],
},
'poker.end': {
type: Date,
optional: true,
defaultValue: null,
},
'poker.allowNonBoardMembers': {
type: Boolean,
defaultValue: false,
optional: true,
},
'poker.estimation': {
/**
@@ -993,15 +983,16 @@ Cards.helpers({
},
parentCard() {
if (this.parentId === '') {
return null;
let ret = null;
if (this.parentId) {
ret = ReactiveCache.getCard(this.parentId);
}
return ReactiveCache.getCard(this.parentId);
return ret;
},
parentCardName() {
let result = '';
if (this.parentId !== '') {
if (this.parentId) {
const card = ReactiveCache.getCard(this.parentId);
if (card) {
result = card.title;
@@ -1013,7 +1004,7 @@ Cards.helpers({
parentListId() {
const result = [];
let crtParentId = this.parentId;
while (crtParentId !== '') {
while (crtParentId) {
const crt = ReactiveCache.getCard(crtParentId);
if (crt === null || crt === undefined) {
// maybe it has been deleted
@@ -1033,7 +1024,7 @@ Cards.helpers({
const resultId = [];
const result = [];
let crtParentId = this.parentId;
while (crtParentId !== '') {
while (crtParentId) {
const crt = ReactiveCache.getCard(crtParentId);
if (crt === null || crt === undefined) {
// maybe it has been deleted
@@ -1059,7 +1050,11 @@ Cards.helpers({
},
isTopLevel() {
return this.parentId === '';
let ret = false;
if (this.parentId) {
ret = true;
}
return ret;
},
isLinkedCard() {
+1
View File
@@ -2,6 +2,7 @@ import { ReactiveCache } from '/imports/reactiveCache';
import moment from 'moment/min/moment-with-locales';
const Papa = require('papaparse');
import { TAPi18n } from '/imports/i18n';
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
//const stringify = require('csv-stringify');
+1
View File
@@ -1,6 +1,7 @@
import { ReactiveCache } from '/imports/reactiveCache';
// exporter maybe is broken since Gridfs introduced, add fs and path
import { createWorkbook } from './createWorkbook';
// import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
class ExporterCardPDF {
constructor(boardId) {
+1
View File
@@ -2,6 +2,7 @@ import { ReactiveCache } from '/imports/reactiveCache';
import moment from 'moment/min/moment-with-locales';
import { TAPi18n } from '/imports/i18n';
import { createWorkbook } from './createWorkbook';
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
// exporter maybe is broken since Gridfs introduced, add fs and path
+1
View File
@@ -1,5 +1,6 @@
import { ReactiveCache } from '/imports/reactiveCache';
import { TAPi18n } from '/imports/i18n';
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
//var nodemailer = require('nodemailer');
// Sandstorm context is detected using the METEOR_SETTINGS environment variable
+8 -14
View File
@@ -687,14 +687,11 @@ Users.helpers({
return '';
},
orgIdsUserBelongs() {
let ret = '';
if (this.orgs) {
return this.orgs
.map(function (org) {
return org.orgId;
})
.join(',');
ret = this.orgs.map(org => org.orgId).join(',');
}
return '';
return ret;
},
teamsUserBelongs() {
if (this.teams) {
@@ -708,14 +705,11 @@ Users.helpers({
return '';
},
teamIdsUserBelongs() {
let ret = '';
if (this.teams) {
return this.teams
.map(function (team) {
return team.teamId;
})
.join(',');
ret = this.teams.map(team => team.teamId).join(',');
}
return '';
return ret;
},
boards() {
return Boards.userBoards(this._id, null, {}, { sort: { sort: 1 } });
@@ -1254,14 +1248,14 @@ Meteor.methods({
check(boardId, String);
check(listId, String);
check(width, Number);
const user = Meteor.user();
const user = ReactiveCache.getCurrentUser();
user.setListWidth(boardId, listId, width);
},
applySwimlaneHeight(boardId, swimlaneId, height) {
check(boardId, String);
check(swimlaneId, String);
check(height, Number);
const user = Meteor.user();
const user = ReactiveCache.getCurrentUser();
user.setSwimlaneHeight(boardId, swimlaneId, height);
},
});
+96 -167
View File
@@ -1,13 +1,13 @@
{
"name": "wekan",
"version": "v7.52.0",
"version": "v7.60.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@babel/runtime": {
"version": "7.24.7",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.7.tgz",
"integrity": "sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw==",
"version": "7.25.0",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.0.tgz",
"integrity": "sha512-7dRy4DwXwtzBrPbZflqxnvfxLF8kdZXPkhymtDeFoFqE6ldzjQFgYTtYIFARcLEYDrqfBfYcZt1WqFxRoyC9Rw==",
"requires": {
"regenerator-runtime": "^0.14.0"
}
@@ -39,85 +39,6 @@
"lodash.uniq": "^4.5.0"
}
},
"@ldapjs/asn1": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@ldapjs/asn1/-/asn1-2.0.0.tgz",
"integrity": "sha512-G9+DkEOirNgdPmD0I8nu57ygQJKOOgFEMKknEuQvIHbGLwP3ny1mY+OTUYLCbCaGJP4sox5eYgBJRuSUpnAddA=="
},
"@ldapjs/attribute": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@ldapjs/attribute/-/attribute-1.0.0.tgz",
"integrity": "sha512-ptMl2d/5xJ0q+RgmnqOi3Zgwk/TMJYG7dYMC0Keko+yZU6n+oFM59MjQOUht5pxJeS4FWrImhu/LebX24vJNRQ==",
"requires": {
"@ldapjs/asn1": "2.0.0",
"@ldapjs/protocol": "^1.2.1",
"process-warning": "^2.1.0"
}
},
"@ldapjs/change": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@ldapjs/change/-/change-1.0.0.tgz",
"integrity": "sha512-EOQNFH1RIku3M1s0OAJOzGfAohuFYXFY4s73wOhRm4KFGhmQQ7MChOh2YtYu9Kwgvuq1B0xKciXVzHCGkB5V+Q==",
"requires": {
"@ldapjs/asn1": "2.0.0",
"@ldapjs/attribute": "1.0.0"
}
},
"@ldapjs/controls": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/@ldapjs/controls/-/controls-2.1.0.tgz",
"integrity": "sha512-2pFdD1yRC9V9hXfAWvCCO2RRWK9OdIEcJIos/9cCVP9O4k72BY1bLDQQ4KpUoJnl4y/JoD4iFgM+YWT3IfITWw==",
"requires": {
"@ldapjs/asn1": "^1.2.0",
"@ldapjs/protocol": "^1.2.1"
},
"dependencies": {
"@ldapjs/asn1": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@ldapjs/asn1/-/asn1-1.2.0.tgz",
"integrity": "sha512-KX/qQJ2xxzvO2/WOvr1UdQ+8P5dVvuOLk/C9b1bIkXxZss8BaR28njXdPgFCpj5aHaf1t8PmuVnea+N9YG9YMw=="
}
}
},
"@ldapjs/dn": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@ldapjs/dn/-/dn-1.1.0.tgz",
"integrity": "sha512-R72zH5ZeBj/Fujf/yBu78YzpJjJXG46YHFo5E4W1EqfNpo1UsVPqdLrRMXeKIsJT3x9dJVIfR6OpzgINlKpi0A==",
"requires": {
"@ldapjs/asn1": "2.0.0",
"process-warning": "^2.1.0"
}
},
"@ldapjs/filter": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/@ldapjs/filter/-/filter-2.1.1.tgz",
"integrity": "sha512-TwPK5eEgNdUO1ABPBUQabcZ+h9heDORE4V9WNZqCtYLKc06+6+UAJ3IAbr0L0bYTnkkWC/JEQD2F+zAFsuikNw==",
"requires": {
"@ldapjs/asn1": "2.0.0",
"@ldapjs/protocol": "^1.2.1",
"process-warning": "^2.1.0"
}
},
"@ldapjs/messages": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/@ldapjs/messages/-/messages-1.3.0.tgz",
"integrity": "sha512-K7xZpXJ21bj92jS35wtRbdcNrwmxAtPwy4myeh9duy/eR3xQKvikVycbdWVzkYEAVE5Ce520VXNOwCHjomjCZw==",
"requires": {
"@ldapjs/asn1": "^2.0.0",
"@ldapjs/attribute": "^1.0.0",
"@ldapjs/change": "^1.0.0",
"@ldapjs/controls": "^2.1.0",
"@ldapjs/dn": "^1.1.0",
"@ldapjs/filter": "^2.1.1",
"@ldapjs/protocol": "^1.2.1",
"process-warning": "^2.2.0"
}
},
"@ldapjs/protocol": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/@ldapjs/protocol/-/protocol-1.2.1.tgz",
"integrity": "sha512-O89xFDLW2gBoZWNXuXpBSM32/KealKCTb3JGtJdtUQc7RjAk8XzrRgyz02cPAwGKwKPxy0ivuC7UP9bmN87egQ=="
},
"@mapbox/node-pre-gyp": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz",
@@ -187,6 +108,10 @@
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.63.tgz",
"integrity": "sha512-fAtCfv4jJg+ExtXhvCkCqUKZ+4ok/JQk01qDKhL5BDDoS3AxKXhV5/MAVUZyQnSEd2GT92fkgZl0pz0Q0AzcIQ=="
},
"@wekanteam/dragscroll": {
"version": "github:wekan/dragscroll#6ea215c8cdbde9362ecba8ffb72ce9f9fde842d2",
"from": "github:wekan/dragscroll"
},
"@wekanteam/exceljs": {
"version": "github:wekan/exceljs#e0229907e7a81bc3fe6daf4e42b1fdfbecdcb7cb",
"from": "github:wekan/exceljs",
@@ -347,6 +272,14 @@
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
},
"asn1": {
"version": "0.2.6",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz",
"integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==",
"requires": {
"safer-buffer": "~2.1.0"
}
},
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
@@ -667,9 +600,9 @@
}
},
"dompurify": {
"version": "2.5.5",
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.5.5.tgz",
"integrity": "sha512-FgbqnEPiv5Vdtwt6Mxl7XSylttCC03cqP5ldNT2z+Kj0nLxPHJH4+1Cyf5Jasxhw93Rl4Oo11qRoUV72fmya2Q=="
"version": "2.5.6",
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.5.6.tgz",
"integrity": "sha512-zUTaUBO8pY4+iJMPE1B9XlO2tXVYIcEA4SNGtvDELzTSCQO7RzH+j7S180BmhmJId78lqGU2z19vgVx2Sxs/PQ=="
},
"domutils": {
"version": "2.8.0",
@@ -1244,25 +1177,27 @@
}
}
},
"ldapjs": {
"version": "3.0.7",
"resolved": "https://registry.npmjs.org/ldapjs/-/ldapjs-3.0.7.tgz",
"integrity": "sha512-1ky+WrN+4CFMuoekUOv7Y1037XWdjKpu0xAPwSP+9KdvmV9PG+qOKlssDV6a+U32apwxdD3is/BZcWOYzN30cg==",
"ldap-filter": {
"version": "0.3.3",
"resolved": "https://registry.npmjs.org/ldap-filter/-/ldap-filter-0.3.3.tgz",
"integrity": "sha512-/tFkx5WIn4HuO+6w9lsfxq4FN3O+fDZeO9Mek8dCD8rTUpqzRa766BOBO7BcGkn3X86m5+cBm1/2S/Shzz7gMg==",
"requires": {
"@ldapjs/asn1": "^2.0.0",
"@ldapjs/attribute": "^1.0.0",
"@ldapjs/change": "^1.0.0",
"@ldapjs/controls": "^2.1.0",
"@ldapjs/dn": "^1.1.0",
"@ldapjs/filter": "^2.1.1",
"@ldapjs/messages": "^1.3.0",
"@ldapjs/protocol": "^1.2.1",
"abstract-logging": "^2.0.1",
"assert-plus": "^1.0.0"
}
},
"ldapjs": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/ldapjs/-/ldapjs-2.3.3.tgz",
"integrity": "sha512-75QiiLJV/PQqtpH+HGls44dXweviFwQ6SiIK27EqzKQ5jU/7UFrl2E5nLdQ3IYRBzJ/AVFJI66u0MZ0uofKYwg==",
"requires": {
"abstract-logging": "^2.0.0",
"asn1": "^0.2.4",
"assert-plus": "^1.0.0",
"backoff": "^2.5.0",
"ldap-filter": "^0.3.3",
"once": "^1.4.0",
"vasync": "^2.2.1",
"verror": "^1.10.1"
"vasync": "^2.2.0",
"verror": "^1.8.1"
}
},
"lie": {
@@ -1438,9 +1373,9 @@
"integrity": "sha512-SBbbYWvFYvsxHVL+q6ZB8lT3rp2LSvfALD2V52H+MGH2IgJsevy0VtXRkRG0EsUewwOaDTIKBn9DlD8HQ3GSwg=="
},
"meteor-node-stubs": {
"version": "1.2.9",
"resolved": "https://registry.npmjs.org/meteor-node-stubs/-/meteor-node-stubs-1.2.9.tgz",
"integrity": "sha512-EKRezc1/PblYtYiK4BOT3h5geWDo9AFBBSYNamPNh8AC5msUbVCcg8kekzAa7r7JPzBX8nZWaXEQVar4t8q/Hg==",
"version": "1.2.10",
"resolved": "https://registry.npmjs.org/meteor-node-stubs/-/meteor-node-stubs-1.2.10.tgz",
"integrity": "sha512-zP1AVg8sOATz15yfy11R2VTx+IZFfAOXi8GuZa8tOfeVT1tKaqDooAbFylnIXwpStSu6HRBUhQqHtR06Qr9aEA==",
"requires": {
"@meteorjs/crypto-browserify": "^3.12.1",
"assert": "^2.1.0",
@@ -1449,7 +1384,7 @@
"console-browserify": "^1.2.0",
"constants-browserify": "^1.0.0",
"domain-browser": "^4.23.0",
"elliptic": "^6.5.4",
"elliptic": "^6.5.7",
"events": "^3.3.0",
"https-browserify": "^1.0.0",
"os-browserify": "^0.3.0",
@@ -1463,7 +1398,7 @@
"string_decoder": "^1.3.0",
"timers-browserify": "^2.0.12",
"tty-browserify": "0.0.1",
"url": "^0.11.3",
"url": "^0.11.4",
"util": "^0.12.5",
"vm-browserify": "^1.1.2"
},
@@ -1663,12 +1598,14 @@
"bundled": true
},
"call-bind": {
"version": "1.0.5",
"version": "1.0.7",
"bundled": true,
"requires": {
"es-define-property": "^1.0.0",
"es-errors": "^1.3.0",
"function-bind": "^1.1.2",
"get-intrinsic": "^1.2.1",
"set-function-length": "^1.1.1"
"get-intrinsic": "^1.2.4",
"set-function-length": "^1.2.1"
}
},
"cipher-base": {
@@ -1729,12 +1666,12 @@
}
},
"define-data-property": {
"version": "1.1.1",
"version": "1.1.4",
"bundled": true,
"requires": {
"get-intrinsic": "^1.2.1",
"gopd": "^1.0.1",
"has-property-descriptors": "^1.0.0"
"es-define-property": "^1.0.0",
"es-errors": "^1.3.0",
"gopd": "^1.0.1"
}
},
"define-properties": {
@@ -1774,7 +1711,7 @@
"bundled": true
},
"elliptic": {
"version": "6.5.5",
"version": "6.5.7",
"bundled": true,
"requires": {
"bn.js": "^4.11.9",
@@ -1792,6 +1729,17 @@
}
}
},
"es-define-property": {
"version": "1.0.0",
"bundled": true,
"requires": {
"get-intrinsic": "^1.2.4"
}
},
"es-errors": {
"version": "1.3.0",
"bundled": true
},
"events": {
"version": "3.3.0",
"bundled": true
@@ -1816,9 +1764,10 @@
"bundled": true
},
"get-intrinsic": {
"version": "1.2.2",
"version": "1.2.4",
"bundled": true,
"requires": {
"es-errors": "^1.3.0",
"function-bind": "^1.1.2",
"has-proto": "^1.0.1",
"has-symbols": "^1.0.3",
@@ -1833,10 +1782,10 @@
}
},
"has-property-descriptors": {
"version": "1.0.1",
"version": "1.0.2",
"bundled": true,
"requires": {
"get-intrinsic": "^1.2.2"
"es-define-property": "^1.0.0"
}
},
"has-proto": {
@@ -1969,7 +1918,7 @@
"bundled": true
},
"object-inspect": {
"version": "1.13.1",
"version": "1.13.2",
"bundled": true
},
"object-is": {
@@ -2070,10 +2019,10 @@
"bundled": true
},
"qs": {
"version": "6.11.2",
"version": "6.13.0",
"bundled": true,
"requires": {
"side-channel": "^1.0.4"
"side-channel": "^1.0.6"
}
},
"querystring-es3": {
@@ -2117,13 +2066,15 @@
"bundled": true
},
"set-function-length": {
"version": "1.1.1",
"version": "1.2.2",
"bundled": true,
"requires": {
"define-data-property": "^1.1.1",
"get-intrinsic": "^1.2.1",
"define-data-property": "^1.1.4",
"es-errors": "^1.3.0",
"function-bind": "^1.1.2",
"get-intrinsic": "^1.2.4",
"gopd": "^1.0.1",
"has-property-descriptors": "^1.0.0"
"has-property-descriptors": "^1.0.2"
}
},
"setimmediate": {
@@ -2139,12 +2090,13 @@
}
},
"side-channel": {
"version": "1.0.4",
"version": "1.0.6",
"bundled": true,
"requires": {
"call-bind": "^1.0.0",
"get-intrinsic": "^1.0.2",
"object-inspect": "^1.9.0"
"call-bind": "^1.0.7",
"es-errors": "^1.3.0",
"get-intrinsic": "^1.2.4",
"object-inspect": "^1.13.1"
}
},
"stream-browserify": {
@@ -2184,11 +2136,11 @@
"bundled": true
},
"url": {
"version": "0.11.3",
"version": "0.11.4",
"bundled": true,
"requires": {
"punycode": "^1.4.1",
"qs": "^6.11.2"
"qs": "^6.12.3"
}
},
"util": {
@@ -2382,9 +2334,9 @@
"dev": true
},
"path-to-regexp": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz",
"integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==",
"version": "1.9.0",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.9.0.tgz",
"integrity": "sha512-xIp7/apCFJuUHdDLWe8O1HIkb0kQrOMb/0u6FXQjemHn/ii5LrIzU6bdECnsiTF/GjZkMEKg1xdiZwNqDYlZ6g==",
"dev": true,
"requires": {
"isarray": "0.0.1"
@@ -2438,9 +2390,9 @@
"integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg=="
},
"object-inspect": {
"version": "1.13.1",
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz",
"integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ=="
"version": "1.13.2",
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz",
"integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g=="
},
"once": {
"version": "1.4.0",
@@ -2455,14 +2407,6 @@
"resolved": "https://registry.npmjs.org/os/-/os-0.1.2.tgz",
"integrity": "sha512-ZoXJkvAnljwvc56MbvhtKVWmSkzV712k42Is2mA0+0KTSRakq5XXuXpjZjgAt9ctzl51ojhQWakQQpmOvXWfjQ=="
},
"page": {
"version": "1.11.6",
"resolved": "https://registry.npmjs.org/page/-/page-1.11.6.tgz",
"integrity": "sha512-P6e2JfzkBrPeFCIPplLP7vDDiU84RUUZMrWdsH4ZBGJ8OosnwFkcUkBHp1DTIjuipLliw9yQn/ZJsXZvarsO+g==",
"requires": {
"path-to-regexp": "~1.2.1"
}
},
"pako": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz",
@@ -2496,21 +2440,6 @@
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg=="
},
"path-to-regexp": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.2.1.tgz",
"integrity": "sha512-DBw9IhWfevR2zCVwEZURTuQNseCvu/Q9f5ZgqMCK0Rh61bDa4uyjPAOy9b55yKiPT59zZn+7uYKxmWwsguInwg==",
"requires": {
"isarray": "0.0.1"
},
"dependencies": {
"isarray": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
"integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ=="
}
}
},
"peek-readable": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-4.1.0.tgz",
@@ -2534,20 +2463,15 @@
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
},
"process-warning": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/process-warning/-/process-warning-2.3.2.tgz",
"integrity": "sha512-n9wh8tvBe5sFmsqlg+XQhaQLumwpqoAUruLwjCopgTmUBjJ/fjtBsJzKleCaIGBOMXYEhp1YfKl4d7rJ5ZKJGA=="
},
"punycode": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
"integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg=="
},
"qs": {
"version": "6.12.1",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.12.1.tgz",
"integrity": "sha512-zWmv4RSuB9r2mYQw3zxQuHWeU+42aKi1wWig/j4ele4ygELZ7PEO6MM7rim9oAQH2A5MWfsAVf/jPvTPgCbvUQ==",
"version": "6.13.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz",
"integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==",
"requires": {
"side-channel": "^1.0.6"
}
@@ -2625,6 +2549,11 @@
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
},
"safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"sax": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/sax/-/sax-1.3.0.tgz",
+7 -7
View File
@@ -1,6 +1,6 @@
{
"name": "wekan",
"version": "v7.52.0",
"version": "v7.60.0",
"description": "Open-Source kanban",
"private": true,
"repository": {
@@ -17,9 +17,10 @@
"sinon": "^13.0.2"
},
"dependencies": {
"@babel/runtime": "^7.24.7",
"@babel/runtime": "^7.25.0",
"@mapbox/node-pre-gyp": "^1.0.10",
"@rwap/jquery-ui-touch-punch": "^1.0.11",
"@wekanteam/dragscroll": "github:wekan/dragscroll",
"@wekanteam/exceljs": "github:wekan/exceljs",
"@wekanteam/html-to-markdown": "^1.0.2",
"@wekanteam/meteor-globals": "^1.1.4",
@@ -27,7 +28,7 @@
"ajv": "^6.12.6",
"bcryptjs": "^2.4.3",
"bson": "^4.5.2",
"dompurify": "^2.5.5",
"dompurify": "^2.5.6",
"es6-promise": "^4.2.4",
"escape-string-regexp": "^5.0.0",
"fibers": "^5.0.3",
@@ -38,19 +39,18 @@
"jquery": "^3.7.1",
"jquery-ui": "^1.13.3",
"jszip": "^3.7.1",
"ldapjs": "^3.0.7",
"ldapjs": "^2.3.3",
"markdown-it": "^12.3.2",
"markdown-it-emoji": "^2.0.0",
"markdown-it-mathjax3": "^4.3.2",
"meteor-accounts-t9n": "^2.6.0",
"meteor-node-stubs": "^1.2.9",
"meteor-node-stubs": "^1.2.10",
"minio": "^7.1.3",
"moment": "^2.29.4",
"os": "^0.1.2",
"page": "^1.11.6",
"papaparse": "^5.3.1",
"pretty-ms": "^7.0.1",
"qs": "^6.12.1",
"qs": "^6.13.0",
"simpl-schema": "^3.4.6",
"source-map-support": "^0.5.20",
"uuid": "^8.3.2"
-3
View File
@@ -1,3 +0,0 @@
.build*
*.browserify.js.cached
*.browserify.js.map
-8
View File
@@ -1,8 +0,0 @@
sudo: required
language: node_js
node_js:
- "0.10"
before_install:
- "curl -L http://git.io/ejPSng | /bin/sh"
env:
- TEST_COMMAND=meteor
-155
View File
@@ -1,155 +0,0 @@
# Changelog
### v2.12.1
* Add NPM modules back. Fixes: [#602](https://github.com/kadirahq/flow-router/issues/602)
### v2.12.0
* Update Fast Render to v2.14.0
### v2.11.0
* Add support for Meteor 1.3 RC-1.
* Removes browserify and get modules from Meteor 1.3.
### v2.10.1
* Fix the url generation for prefixed paths. See: [#508](https://github.com/kadirahq/flow-router/issues/508)
### v2.10.0
* Update few dependencies to the latest versions: pagejs, qs, cosmos:browserify
### v2.9.0
* Add FlowRouter.url() See: [#374](https://github.com/kadirahq/flow-router/pull/374)
### v2.8.0
* Allow to access options in groups as well. See: [#378](https://github.com/kadirahq/flow-router/pull/378)
### v2.7.0
* Add Path Prefix support. See: [#329](https://github.com/kadirahq/flow-router/pull/329)
### v2.6.2
* Now .current() sends a cloned version of the internal current object. Which prevent outside mutations to params and queryParams
### v2.6.1
* Fix [#143](https://github.com/kadirahq/flow-router/issues/314).
This says that when we are doing a trigger redirect,
We won't get reactive changes like: `getRouteName()`
### v2.6.0
* Add hashbang support. See [#311](https://github.com/kadirahq/flow-router/pull/311)
### v2.5.0
* Add a stop callback on the triggers. See: [#306](https://github.com/kadirahq/flow-router/pull/306).
### v2.4.0
* Add a name to the route groups. See: [#290](https://github.com/kadirahq/flow-router/pull/290)
### v2.3.0
* We've used `path` for both the current path and for the pathDef earlier. Now we differentiate it. See: [#272](https://github.com/kadirahq/flow-router/issues/272) and [#273](https://github.com/kadirahq/flow-router/pull/273) for more information.
### v2.2.0
* Add the first addOn api: FlowRouter.onRouteRegister(cb)
### v2.1.1
* There was an issue in IE9 support. We fix it with this version.
### v2.1.0
* Add IE9 Support. See this issue [#111](https://github.com/kadirahq/flow-router/issues/111) for more info.
### v2.0.2
* Add missing queryParams object in the subscriptions method (with FR on the server)
* With that, [#237](https://github.com/kadirahq/flow-router/issues/237) is partially fixed.
### v2.0.1
* Use pagejs.redirect() for our redirection process.
* Above fixes [#239](https://github.com/kadirahq/flow-router/issues/239)
### v2.0.0
* Released 2.0 :)
* Now flow-router comes as `kadira:flow-router`
* Remove deprecated APIs
- `FlowRouter.reactiveCurrent()`
- Middlewares
- `FlowRouter.current().params.query`
* Follow the [migration guide](https://github.com/kadirahq/flow-router#migrating-into-20) for more information.
### v1.18.0
* Implement idempotent routing on withReplaceState. See: [#197](https://github.com/meteorhacks/flow-router/issues/197)
* Add an [API](https://github.com/meteorhacks/flow-router#flowrouterwithtrailingslashfn) to set trailing slashes.
### v1.17.2
* Fix [#182](https://github.com/meteorhacks/flow-router/issues/182) - Now trigger's redirect function support `FlowRouter.go()` syntax.
### v1.17.1
* Fix [#164](https://github.com/meteorhacks/flow-router/issues/164) - It's an issue when using `check` with flow router query params.
* Fix [#168](https://github.com/meteorhacks/flow-router/pull/168) - It's URL encoding issue.
### v1.17.0
* Add an API called `FlowRouter.wait()` to wait the initialization and pass it back to the app. Fixes issue [180](https://github.com/meteorhacks/flow-router/issues/180).
### v1.16.3
* Fix a crazy context switching issue. For more information see commit [6ca54cc](https://github.com/meteorhacks/flow-router/commit/6ca54cc7969b3a8aa71d63c98c99a20b175125a2)
### v1.16.2
* Fix issue [#167](https://github.com/meteorhacks/flow-router/issues/167) via [#175](https://github.com/meteorhacks/flow-router/pull/175)
* Fix [#176](https://github.com/meteorhacks/flow-router/issues/176) by the removal of `Tracker.flush` usage.
### v1.16.1
* Fix [issue](https://github.com/meteorhacks/flow-router/pull/173) of overwriting global triggers when written multiple times.
### v1.16.0
* [Refactor](https://github.com/meteorhacks/flow-router/pull/172) triggers API for clean code
* Added [redirect](https://github.com/meteorhacks/flow-router#redirecting-with-triggers) functionality for triggers
* Now we are API complete for the 2.x release
### v1.15.0
* Now all our routes are idempotent.
* If some one needs to re-run the route, he needs to use our `FlowRouter.reload()` API.
### v1.14.1
* Fix regression came from v1.11.0. With that, `FlowRouter.go("/")` does not work. More information on [#147](https://github.com/meteorhacks/flow-router/issues/147).
### v1.14.0
* Bring browserify back with the updated version of `cosmos:browserify` which fixes some size issues. See [more info](https://github.com/meteorhacks/flow-router/issues/128#issuecomment-109799953).
### v1.13.0
* Remove browserified pagejs and qs dependency loading. With that we could reduce ~10kb of data size (without compression). We can look for a bower integration in the future. For now, here are the dependencies we have.
- page@1.6.3: https://github.com/visionmedia/page.js
- qs@3.1.0: https://github.com/hapijs/qs
### v1.12.0
* Add [`FlowRouter.withReplaceState`](https://github.com/meteorhacks/flow-router#flowrouterwithreplcaestatefn) api to use replaceState when changing routes via FlowRouter apis.
### v1.11.0
* Fix [#145](https://github.com/meteorhacks/flow-router/issues/145) by changing how safeToRun works.
* Add `FlowRouter.path()` to the server side
* Fix [#130](https://github.com/meteorhacks/flow-router/issues/130)
### v1.10.0
Add support for [triggers](https://github.com/meteorhacks/flow-router#triggers). This is something similar to middlewares but not as middlewares. Visit [here](https://github.com/meteorhacks/flow-router/pull/59) to learn about design decisions.
_**Now, middlewares are deprecated.**_
### v1.9.0
Fix [#120](https://github.com/meteorhacks/flow-router/issues/120) and added callback support for `FlowRouter.subsReady()`.
### v1.8.0
This release comes with improvements to the reactive API.
* Fixed [#77](https://github.com/meteorhacks/flow-router/issues/77), [#85](https://github.com/meteorhacks/flow-router/issues/85), [#95](https://github.com/meteorhacks/flow-router/issues/95), [#96](https://github.com/meteorhacks/flow-router/issues/96), [#103](https://github.com/meteorhacks/flow-router/issues/103)
* Add a new API called `FlowRouter.watchPathChange()`
* Deprecated `FlowRouter.reactiveCurrent()` in the favour of `FlowRouter.watchPathChange()`
@@ -1,16 +0,0 @@
## Whether to submit an issue or not?
We've very limited time to answer all the issues and respond them in a proper manner.
So, this repo's issue list only used to report **bugs** and **new features.**
For any other questions, issues or asking for best practices use [Meteor Forums](https://forums.meteor.com/).
Even before you ask a question on Meteor Forums, make sure you read the [Meteor Routing Guide](https://kadira.io/academy/meteor-routing-guide).
## Implementing Feature and Bug Fixes
We are welcome and greedy for PRs. So,
* If you wanna fix a bug, simply submit it.
* If you wanna implement feature or support with contributions, just drop a message to arunoda [at] kadira.io.
-21
View File
@@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) 2015 MeteorHacks Pvt Ltd (Sri Lanka). <hello@meteorhacks.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-777
View File
@@ -1,777 +0,0 @@
# FlowRouter [![Build Status](https://travis-ci.org/kadirahq/flow-router.svg?branch=master)](https://travis-ci.org/kadirahq/flow-router) [![Stories in Ready](https://badge.waffle.io/kadirahq/flow-router.svg?label=doing&title=Activities)](http://waffle.io/kadirahq/flow-router)
Forked for bug fixes
Carefully Designed Client Side Router for Meteor.
FlowRouter is a very simple router for Meteor. It does routing for client-side apps and does not handle rendering itself.
It exposes a great API for changing the URL and reactively getting data from the URL. However, inside the router, it's not reactive. Most importantly, FlowRouter is designed with performance in mind and it focuses on what it does best: **routing**.
> We've released 2.0 and follow this [migration guide](#migrating-into-20) if you are already using FlowRouter.
## TOC
* [Meteor Routing Guide](#meteor-routing-guide)
* [Getting Started](#getting-started)
* [Routes Definition](#routes-definition)
* [Group Routes](#group-routes)
* [Rendering and Layout Management](#rendering-and-layout-management)
* [Triggers](#triggers)
* [Not Found Routes](#not-found-routes)
* [API](#api)
* [Subscription Management](#subscription-management)
* [IE9 Support](#ie9-support)
* [Hashbang URLs](#hashbang-urls)
* [Prefixed paths](#prefixed-paths)
* [Add-ons](#add-ons)
* [Difference with Iron Router](#difference-with-iron-router)
* [Migrating into 2.0](#migrating-into-20)
## Meteor Routing Guide
[Meteor Routing Guide](https://kadira.io/academy/meteor-routing-guide) is a completed guide into **routing** and related topics in Meteor. It talks about how to use FlowRouter properly and use it with **Blaze and React**. It also shows how to manage **subscriptions** and implement **auth logic** in the view layer.
[![Meteor Routing Guide](https://cldup.com/AxlPfoxXmR.png)](https://kadira.io/academy/meteor-routing-guide)
## Getting Started
Add FlowRouter to your app:
~~~shell
meteor add kadira:flow-router
~~~
Let's write our first route (add this file to `lib/router.js`):
~~~js
FlowRouter.route('/blog/:postId', {
action: function(params, queryParams) {
console.log("Yeah! We are on the post:", params.postId);
}
});
~~~
Then visit `/blog/my-post-id` from the browser or invoke the following command from the browser console:
~~~js
FlowRouter.go('/blog/my-post-id');
~~~
Then you can see some messages printed in the console.
## Routes Definition
FlowRouter routes are very simple and based on the syntax of [path-to-regexp](https://github.com/pillarjs/path-to-regexp) which is used in both [Express](http://expressjs.com/) and `iron:router`.
Here's the syntax for a simple route:
~~~js
FlowRouter.route('/blog/:postId', {
// do some action for this route
action: function(params, queryParams) {
console.log("Params:", params);
console.log("Query Params:", queryParams);
},
name: "<name for the route>" // optional
});
~~~
So, this route will be activated when you visit a url like below:
~~~js
FlowRouter.go('/blog/my-post?comments=on&color=dark');
~~~
After you've visit the route, this will be printed in the console:
~~~
Params: {postId: "my-post"}
Query Params: {comments: "on", color: "dark"}
~~~
For a single interaction, the router only runs once. That means, after you've visit a route, first it will call `triggers`, then `subscriptions` and finally `action`. After that happens, none of those methods will be called again for that route visit.
You can define routes anywhere in the `client` directory. But, we recommend to add them in the `lib` directory. Then `fast-render` can detect subscriptions and send them for you (we'll talk about this is a moment).
### Group Routes
You can group routes for better route organization. Here's an example:
~~~js
var adminRoutes = FlowRouter.group({
prefix: '/admin',
name: 'admin',
triggersEnter: [function(context, redirect) {
console.log('running group triggers');
}]
});
// handling /admin route
adminRoutes.route('/', {
action: function() {
BlazeLayout.render('componentLayout', {content: 'admin'});
},
triggersEnter: [function(context, redirect) {
console.log('running /admin trigger');
}]
});
// handling /admin/posts
adminRoutes.route('/posts', {
action: function() {
BlazeLayout.render('componentLayout', {content: 'posts'});
}
});
~~~
**All of the options for the `FlowRouter.group()` are optional.**
You can even have nested group routes as shown below:
~~~js
var adminRoutes = FlowRouter.group({
prefix: "/admin",
name: "admin"
});
var superAdminRoutes = adminRoutes.group({
prefix: "/super",
name: "superadmin"
});
// handling /admin/super/post
superAdminRoutes.route('/post', {
action: function() {
}
});
~~~
You can determine which group the current route is in using:
~~~js
FlowRouter.current().route.group.name
~~~
This can be useful for determining if the current route is in a specific group (e.g. *admin*, *public*, *loggedIn*) without needing to use prefixes if you don't want to. If it's a nested group, you can get the parent group's name with:
~~~js
FlowRouter.current().route.group.parent.name
~~~
As with all current route properties, these are not reactive, but can be combined with `FlowRouter.watchPathChange()` to get group names reactively.
## Rendering and Layout Management
FlowRouter does not handle rendering or layout management. For that, you can use:
* [Blaze Layout for Blaze](https://github.com/kadirahq/blaze-layout)
* [React Layout for React](https://github.com/kadirahq/meteor-react-layout)
Then you can invoke the layout manager inside the `action` method in the router.
~~~js
FlowRouter.route('/blog/:postId', {
action: function(params) {
BlazeLayout.render("mainLayout", {area: "blog"});
}
});
~~~
## Triggers
Triggers are the way FlowRouter allows you to perform tasks before you **enter** into a route and after you **exit** from a route.
#### Defining triggers for a route
Here's how you can define triggers for a route:
~~~js
FlowRouter.route('/home', {
// calls just before the action
triggersEnter: [trackRouteEntry],
action: function() {
// do something you like
},
// calls when we decide to move to another route
// but calls before the next route started
triggersExit: [trackRouteClose]
});
function trackRouteEntry(context) {
// context is the output of `FlowRouter.current()`
Mixpanel.track("visit-to-home", context.queryParams);
}
function trackRouteClose(context) {
Mixpanel.track("move-from-home", context.queryParams);
}
~~~
#### Defining triggers for a group route
This is how you can define triggers on a group definition.
~~~js
var adminRoutes = FlowRouter.group({
prefix: '/admin',
triggersEnter: [trackRouteEntry],
triggersExit: [trackRouteEntry]
});
~~~
> You can add triggers to individual routes in the group too.
#### Defining Triggers Globally
You can also define triggers globally. Here's how to do it:
~~~js
FlowRouter.triggers.enter([cb1, cb2]);
FlowRouter.triggers.exit([cb1, cb2]);
// filtering
FlowRouter.triggers.enter([trackRouteEntry], {only: ["home"]});
FlowRouter.triggers.exit([trackRouteExit], {except: ["home"]});
~~~
As you can see from the last two examples, you can filter routes using the `only` or `except` keywords. But, you can't use both `only` and `except` at once.
> If you'd like to learn more about triggers and design decisions, visit [here](https://github.com/meteorhacks/flow-router/pull/59).
#### Redirecting With Triggers
You can redirect to a different route using triggers. You can do it from both enter and exit triggers. See how to do it:
~~~js
FlowRouter.route('/', {
triggersEnter: [function(context, redirect) {
redirect('/some-other-path');
}],
action: function(_params) {
throw new Error("this should not get called");
}
});
~~~
Every trigger callback comes with a second argument: a function you can use to redirect to a different route. Redirect also has few properties to make sure it's not blocking the router.
* redirect must be called with an URL
* redirect must be called within the same event loop cycle (no async or called inside a Tracker)
* redirect cannot be called multiple times
Check this [PR](https://github.com/meteorhacks/flow-router/pull/172) to learn more about our redirect API.
#### Stopping the Callback With Triggers
In some cases, you may need to stop the route callback from firing using triggers. You can do this in **before** triggers, using the third argument: the `stop` function. For example, you can check the prefix and if it fails, show the notFound layout and stop before the action fires.
```js
var localeGroup = FlowRouter.group({
prefix: '/:locale?',
triggersEnter: [localeCheck]
});
localeGroup.route('/login', {
action: function (params, queryParams) {
BlazeLayout.render('componentLayout', {content: 'login'});
}
});
function localeCheck(context, redirect, stop) {
var locale = context.params.locale;
if (locale !== undefined && locale !== 'fr') {
BlazeLayout.render('notFound');
stop();
}
}
```
> **Note**: When using the stop function, you should always pass the second **redirect** argument, even if you won't use it.
## Not Found Routes
You can configure Not Found routes like this:
~~~js
FlowRouter.notFound = {
// Subscriptions registered here don't have Fast Render support.
subscriptions: function() {
},
action: function() {
}
};
~~~
## API
FlowRouter has a rich API to help you to navigate the router and reactively get information from the router.
#### FlowRouter.getParam(paramName);
Reactive function which you can use to get a parameter from the URL.
~~~js
// route def: /apps/:appId
// url: /apps/this-is-my-app
var appId = FlowRouter.getParam("appId");
console.log(appId); // prints "this-is-my-app"
~~~
#### FlowRouter.getQueryParam(queryStringKey);
Reactive function which you can use to get a value from the queryString.
~~~js
// route def: /apps/:appId
// url: /apps/this-is-my-app?show=yes&color=red
var color = FlowRouter.getQueryParam("color");
console.log(color); // prints "red"
~~~
#### FlowRouter.path(pathDef, params, queryParams)
Generate a path from a path definition. Both `params` and `queryParams` are optional.
Special characters in `params` and `queryParams` will be URL encoded.
~~~js
var pathDef = "/blog/:cat/:id";
var params = {cat: "met eor", id: "abc"};
var queryParams = {show: "y+e=s", color: "black"};
var path = FlowRouter.path(pathDef, params, queryParams);
console.log(path); // prints "/blog/met%20eor/abc?show=y%2Be%3Ds&color=black"
~~~
If there are no params or queryParams, this will simply return the pathDef as it is.
##### Using Route name instead of the pathDef
You can also use the route's name instead of the pathDef. Then, FlowRouter will pick the pathDef from the given route. See the following example:
~~~js
FlowRouter.route("/blog/:cat/:id", {
name: "blogPostRoute",
action: function(params) {
//...
}
})
var params = {cat: "meteor", id: "abc"};
var queryParams = {show: "yes", color: "black"};
var path = FlowRouter.path("blogPostRoute", params, queryParams);
console.log(path); // prints "/blog/meteor/abc?show=yes&color=black"
~~~
#### FlowRouter.go(pathDef, params, queryParams);
This will get the path via `FlowRouter.path` based on the arguments and re-route to that path.
You can call `FlowRouter.go` like this as well:
~~~js
FlowRouter.go("/blog");
~~~
#### FlowRouter.url(pathDef, params, queryParams)
Just like `FlowRouter.path`, but gives the absolute url. (Uses `Meteor.absoluteUrl` behind the scenes.)
#### FlowRouter.setParams(newParams)
This will change the current params with the newParams and re-route to the new path.
~~~js
// route def: /apps/:appId
// url: /apps/this-is-my-app?show=yes&color=red
FlowRouter.setParams({appId: "new-id"});
// Then the user will be redirected to the following path
// /apps/new-id?show=yes&color=red
~~~
#### FlowRouter.setQueryParams(newQueryParams)
Just like `FlowRouter.setParams`, but for queryString params.
To remove a query param set it to `null` like below:
~~~js
FlowRouter.setQueryParams({paramToRemove: null});
~~~
#### FlowRouter.getRouteName()
To get the name of the route reactively.
~~~js
Tracker.autorun(function() {
var routeName = FlowRouter.getRouteName();
console.log("Current route name is: ", routeName);
});
~~~
#### FlowRouter.current()
Get the current state of the router. **This API is not reactive**.
If you need to watch the changes in the path simply use `FlowRouter.watchPathChange()`.
This gives an object like this:
~~~js
// route def: /apps/:appId
// url: /apps/this-is-my-app?show=yes&color=red
var current = FlowRouter.current();
console.log(current);
// prints following object
// {
// path: "/apps/this-is-my-app?show=yes&color=red",
// params: {appId: "this-is-my-app"},
// queryParams: {show: "yes", color: "red"}
// route: {pathDef: "/apps/:appId", name: "name-of-the-route"}
// }
~~~
#### FlowRouter.watchPathChange()
Reactively watch the changes in the path. If you need to simply get the params or queryParams use dedicated APIs like `FlowRouter.getQueryParam()`.
~~~js
Tracker.autorun(function() {
FlowRouter.watchPathChange();
var currentContext = FlowRouter.current();
// do anything with the current context
// or anything you wish
});
~~~
#### FlowRouter.withReplaceState(fn)
Normally, all the route changes made via APIs like `FlowRouter.go` and `FlowRouter.setParams()` add a URL item to the browser history. For example, run the following code:
~~~js
FlowRouter.setParams({id: "the-id-1"});
FlowRouter.setParams({id: "the-id-2"});
FlowRouter.setParams({id: "the-id-3"});
~~~
Now you can hit the back button of your browser two times. This is normal behavior since users may click the back button and expect to see the previous state of the app.
But sometimes, this is not something you want. You don't need to pollute the browser history. Then, you can use the following syntax.
~~~js
FlowRouter.withReplaceState(function() {
FlowRouter.setParams({id: "the-id-1"});
FlowRouter.setParams({id: "the-id-2"});
FlowRouter.setParams({id: "the-id-3"});
});
~~~
Now, there is no item in the browser history. Just like `FlowRouter.setParams`, you can use any FlowRouter API inside `FlowRouter.withReplaceState`.
> We named this function as `withReplaceState` because, replaceState is the underline API used for this functionality. Read more about [replace state & the history API](https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Manipulating_the_browser_history).
#### FlowRouter.reload()
FlowRouter routes are idempotent. That means, even if you call `FlowRouter.go()` to the same URL multiple times, it only activates in the first run. This is also true for directly clicking on paths.
So, if you really need to reload the route, this is the API you want.
#### FlowRouter.wait() and FlowRouter.initialize()
By default, FlowRouter initializes the routing process in a `Meteor.startup()` callback. This works for most of the apps. But, some apps have custom initializations and FlowRouter needs to initialize after that.
So, that's where `FlowRouter.wait()` comes to save you. You need to call it directly inside your JavaScript file. After that, whenever your app is ready call `FlowRouter.initialize()`.
eg:-
~~~js
// file: app.js
FlowRouter.wait();
WhenEverYourAppIsReady(function() {
FlowRouter.initialize();
});
~~~
For more information visit [issue #180](https://github.com/meteorhacks/flow-router/issues/180).
#### FlowRouter.onRouteRegister(cb)
This API is specially designed for add-on developers. They can listen for any registered route and add custom functionality to FlowRouter. This works on both server and client alike.
~~~js
FlowRouter.onRouteRegister(function(route) {
// do anything with the route object
console.log(route);
});
~~~
Let's say a user defined a route like this:
~~~js
FlowRouter.route('/blog/:post', {
name: 'postList',
triggersEnter: [function() {}],
subscriptions: function() {},
action: function() {},
triggersExit: [function() {}],
customField: 'customName'
});
~~~
Then the route object will be something like this:
~~~js
{
pathDef: '/blog/:post',
name: 'postList',
options: {customField: 'customName'}
}
~~~
So, it's not the internal route object we are using.
## Subscription Management
For Subscription Management, we highly suggest you to follow [Template/Component level subscriptions](https://kadira.io/academy/meteor-routing-guide/content/subscriptions-and-data-management). Visit this [guide](https://kadira.io/academy/meteor-routing-guide/content/subscriptions-and-data-management) for that.
FlowRouter also has it's own subscription registration mechanism. We will remove this in version 3.0. We don't remove or deprecate it in version 2.x because this is the easiest way to implement FastRender support for your app. In 3.0 we've better support for FastRender with Server Side Rendering.
FlowRouter only deals with registration of subscriptions. It does not wait until subscription becomes ready. This is how to register a subscription.
~~~js
FlowRouter.route('/blog/:postId', {
subscriptions: function(params, queryParams) {
this.register('myPost', Meteor.subscribe('blogPost', params.postId));
}
});
~~~
We can also register global subscriptions like this:
~~~js
FlowRouter.subscriptions = function() {
this.register('myCourses', Meteor.subscribe('courses'));
};
~~~
All these global subscriptions run on every route. So, pay special attention to names when registering subscriptions.
After you've registered your subscriptions, you can reactively check for the status of those subscriptions like this:
~~~js
Tracker.autorun(function() {
console.log("Is myPost ready?:", FlowRouter.subsReady("myPost"));
console.log("Are all subscriptions ready?:", FlowRouter.subsReady());
});
~~~
So, you can use `FlowRouter.subsReady` inside template helpers to show the loading status and act accordingly.
### FlowRouter.subsReady() with a callback
Sometimes, we need to use `FlowRouter.subsReady()` in places where an autorun is not available. One such example is inside an event handler. For such places, we can use the callback API of `FlowRouter.subsReady()`.
~~~js
Template.myTemplate.events({
"click #id": function(){
FlowRouter.subsReady("myPost", function() {
// do something
});
}
});
~~~
> Arunoda has discussed more about Subscription Management in FlowRouter in [this](https://meteorhacks.com/flow-router-and-subscription-management.html#subscription-management) blog post about [FlowRouter and Subscription Management](https://meteorhacks.com/flow-router-and-subscription-management.html).
> He's showing how to build an app like this:
>![FlowRouter's Subscription Management](https://cldup.com/esLzM8cjEL.gif)
#### Fast Render
FlowRouter has built in support for [Fast Render](https://github.com/meteorhacks/fast-render).
- `meteor add meteorhacks:fast-render`
- Put `router.js` in a shared location. We suggest `lib/router.js`.
You can exclude Fast Render support by wrapping the subscription registration in an `isClient` block:
~~~js
FlowRouter.route('/blog/:postId', {
subscriptions: function(params, queryParams) {
// using Fast Render
this.register('myPost', Meteor.subscribe('blogPost', params.postId));
// not using Fast Render
if(Meteor.isClient) {
this.register('data', Meteor.subscribe('bootstrap-data');
}
}
});
~~~
#### Subscription Caching
You can also use [Subs Manager](https://github.com/meteorhacks/subs-manager) for caching subscriptions on the client. We haven't done anything special to make it work. It should work as it works with other routers.
## IE9 Support
FlowRouter has IE9 support. But it does not ship the **HTML5 history polyfill** out of the box. That's because most apps do not require it.
If you need to support IE9, add the **HTML5 history polyfill** with the following package.
~~~shell
meteor add tomwasd:history-polyfill
~~~
## Hashbang URLs
To enable hashbang urls like `mydomain.com/#!/mypath` simple set the `hashbang` option to `true` in the initialize function:
~~~js
// file: app.js
FlowRouter.wait();
WhenEverYourAppIsReady(function() {
FlowRouter.initialize({hashbang: true});
});
~~~
## Prefixed paths
In cases you wish to run multiple web application on the same domain name, you’ll probably want to serve your particular meteor application under a sub-path (eg `example.com/myapp`). In this case simply include the path prefix in the meteor `ROOT_URL` environment variable and FlowRouter will handle it transparently without any additional configuration.
## Add-ons
Router is a base package for an app. Other projects like [useraccounts](http://useraccounts.meteor.com/) should have support for FlowRouter. Otherwise, it's hard to use FlowRouter in a real project. Now a lot of packages have [started to support FlowRouter](https://kadira.io/blog/meteor/addon-packages-for-flowrouter).
So, you can use your your favorite package with FlowRouter as well. If not, there is an [easy process](https://kadira.io/blog/meteor/addon-packages-for-flowrouter#what-if-project-xxx-still-doesn-t-support-flowrouter-) to convert them to FlowRouter.
**Add-on API**
We have also released a [new API](https://github.com/kadirahq/flow-router#flowrouteronrouteregistercb) to support add-on developers. With that add-on packages can get a notification, when the user created a route in their app.
If you've more ideas for the add-on API, [let us know](https://github.com/kadirahq/flow-router/issues).
## Difference with Iron Router
FlowRouter and Iron Router are two different routers. Iron Router tries to be a full featured solution. It tries to do everything including routing, subscriptions, rendering and layout management.
FlowRouter is a minimalistic solution focused on routing with UI performance in mind. It exposes APIs for related functionality.
Let's learn more about the differences:
### Rendering
FlowRouter doesn't handle rendering. By decoupling rendering from the router it's possible to use any rendering framework, such as [Blaze Layout](https://github.com/kadirahq/blaze-layout) to render with Blaze's Dynamic Templates. Rendering calls are made in the the route's action. We have a layout manager for [React](https://github.com/kadirahq/meteor-react-layout) as well.
### Subscriptions
With FlowRouter, we highly suggest using template/component layer subscriptions. But, if you need to do routing in the router layer, FlowRouter has [subscription registration](#subscription-management) mechanism. Even with that, FlowRouter never waits for the subscriptions and view layer to do it.
### Reactive Content
In Iron Router you can use reactive content inside the router, but any hook or method can re-run in an unpredictable manner. FlowRouter limits reactive data sources to a single run; when it is first called.
We think that's the way to go. Router is just a user action. We can work with reactive content in the rendering layer.
### router.current() is evil
`Router.current()` is evil. Why? Let's look at following example. Imagine we have a route like this in our app:
~~~
/apps/:appId/:section
~~~
Now let's say, we need to get `appId` from the URL. Then we will do, something like this in Iron Router.
~~~js
Templates['foo'].helpers({
"someData": function() {
var appId = Router.current().params.appId;
return doSomething(appId);
}
});
~~~
Let's say we changed `:section` in the route. Then the above helper also gets rerun. If we add a query param to the URL, it gets rerun. That's because `Router.current()` looks for changes in the route(or URL). But in any of above cases, `appId` didn't get changed.
Because of this, a lot parts of our app get re-run and re-rendered. This creates unpredictable rendering behavior in our app.
FlowRouter fixes this issue by providing the `Router.getParam()` API. See how to use it:
~~~js
Templates['foo'].helpers({
"someData": function() {
var appId = FlowRouter.getParam('appId');
return doSomething(appId);
}
});
~~~
### No data context
FlowRouter does not have a data context. Data context has the same problem as reactive `.current()`. We believe, it'll possible to get data directly in the template (component) layer.
### Built in Fast Render Support
FlowRouter has built in [Fast Render](https://github.com/meteorhacks/fast-render) support. Just add Fast Render to your app and it'll work. Nothing to change in the router.
For more information check [docs](#fast-render).
### Server Side Routing
FlowRouter is a client side router and it **does not** support server side routing at all. But `subscriptions` run on the server to enable Fast Render support.
#### Reason behind that
Meteor is not a traditional framework where you can send HTML directly from the server. Meteor needs to send a special set of HTML to the client initially. So, you can't directly send something to the client yourself.
Also, in the server we need look for different things compared with the client. For example:
* In the server we have to deal with headers.
* In the server we have to deal with methods like `GET`, `POST`, etc.
* In the server we have Cookies.
So, it's better to use a dedicated server-side router like [`meteorhacks:picker`](https://github.com/meteorhacks/picker). It supports connect and express middlewares and has a very easy to use route syntax.
### Server Side Rendering
FlowRouter 3.0 will have server side rendering support. We've already started the initial version and check our [`ssr`](https://github.com/meteorhacks/flow-router/tree/ssr) branch for that.
It's currently very usable and Kadira already using it for <https://kadira.io>
### Better Initial Loading Support
In Meteor, we have to wait until all the JS and other resources send before rendering anything. This is an issue. In 3.0, with the support from Server Side Rendering we are going to fix it.
## Migrating into 2.0
Migrating into version 2.0 is easy and you don't need to change any application code since you are already using 2.0 features and the APIs. In 2.0, we've changed names and removed some deprecated APIs.
Here are the steps to migrate your app into 2.0.
#### Use the New FlowRouter Package
* Now FlowRouter comes as `kadira:flow-router`
* So, remove `meteorhacks:flow-router` with : `meteor remove meteorhacks:flow-router`
* Then, add `kadira:flow-router` with `meteor add kadira:flow-router`
#### Change FlowLayout into BlazeLayout
* We've also renamed FlowLayout as [BlazeLayout](https://github.com/kadirahq/blaze-layout).
* So, remove `meteorhacks:flow-layout` and add `kadira:blaze-layout` instead.
* You need to use `BlazeLayout.render()` instead of `FlowLayout.render()`
#### Stop using deprecated Apis
* There is no middleware support. Use triggers instead.
* There is no API called `.reactiveCurrent()`, use `.watchPathChange()` instead.
* Earlier, you can access query params with `FlowRouter.current().params.query`. But, now you can't do that. Use `FlowRouter.current().queryParams` instead.
@@ -1,11 +0,0 @@
// Export Router Instance
FlowRouter = new Router();
FlowRouter.Router = Router;
FlowRouter.Route = Route;
// Initialize FlowRouter
Meteor.startup(function () {
if(!FlowRouter._askedToWait) {
FlowRouter.initialize();
}
});
@@ -1,57 +0,0 @@
Group = function(router, options, parent) {
options = options || {};
if (options.prefix && !/^\/.*/.test(options.prefix)) {
var message = "group's prefix must start with '/'";
throw new Error(message);
}
this._router = router;
this.prefix = options.prefix || '';
this.name = options.name;
this.options = options;
this._triggersEnter = options.triggersEnter || [];
this._triggersExit = options.triggersExit || [];
this._subscriptions = options.subscriptions || Function.prototype;
this.parent = parent;
if (this.parent) {
this.prefix = parent.prefix + this.prefix;
this._triggersEnter = parent._triggersEnter.concat(this._triggersEnter);
this._triggersExit = this._triggersExit.concat(parent._triggersExit);
}
};
Group.prototype.route = function(pathDef, options, group) {
options = options || {};
if (!/^\/.*/.test(pathDef)) {
var message = "route's path must start with '/'";
throw new Error(message);
}
group = group || this;
pathDef = this.prefix + pathDef;
var triggersEnter = options.triggersEnter || [];
options.triggersEnter = this._triggersEnter.concat(triggersEnter);
var triggersExit = options.triggersExit || [];
options.triggersExit = triggersExit.concat(this._triggersExit);
return this._router.route(pathDef, options, group);
};
Group.prototype.group = function(options) {
return new Group(this._router, options, this);
};
Group.prototype.callSubscriptions = function(current) {
if (this.parent) {
this.parent.callSubscriptions(current);
}
this._subscriptions.call(current.route, current.params, current.queryParams);
};
@@ -1,2 +0,0 @@
page = require('page');
qs = require('qs');
-125
View File
@@ -1,125 +0,0 @@
Route = function(router, pathDef, options, group) {
options = options || {};
this.options = options;
this.pathDef = pathDef
// Route.path is deprecated and will be removed in 3.0
this.path = pathDef;
if (options.name) {
this.name = options.name;
}
this._action = options.action || Function.prototype;
this._subscriptions = options.subscriptions || Function.prototype;
this._triggersEnter = options.triggersEnter || [];
this._triggersExit = options.triggersExit || [];
this._subsMap = {};
this._router = router;
this._params = new ReactiveDict();
this._queryParams = new ReactiveDict();
this._routeCloseDep = new Tracker.Dependency();
// tracks the changes in the URL
this._pathChangeDep = new Tracker.Dependency();
this.group = group;
};
Route.prototype.clearSubscriptions = function() {
this._subsMap = {};
};
Route.prototype.register = function(name, sub, options) {
this._subsMap[name] = sub;
};
Route.prototype.getSubscription = function(name) {
return this._subsMap[name];
};
Route.prototype.getAllSubscriptions = function() {
return this._subsMap;
};
Route.prototype.callAction = function(current) {
var self = this;
self._action(current.params, current.queryParams);
};
Route.prototype.callSubscriptions = function(current) {
this.clearSubscriptions();
if (this.group) {
this.group.callSubscriptions(current);
}
this._subscriptions(current.params, current.queryParams);
};
Route.prototype.getRouteName = function() {
this._routeCloseDep.depend();
return this.name;
};
Route.prototype.getParam = function(key) {
this._routeCloseDep.depend();
return this._params.get(key);
};
Route.prototype.getQueryParam = function(key) {
this._routeCloseDep.depend();
return this._queryParams.get(key);
};
Route.prototype.watchPathChange = function() {
this._pathChangeDep.depend();
};
Route.prototype.registerRouteClose = function() {
this._params = new ReactiveDict();
this._queryParams = new ReactiveDict();
this._routeCloseDep.changed();
this._pathChangeDep.changed();
};
Route.prototype.registerRouteChange = function(currentContext, routeChanging) {
// register params
var params = currentContext.params;
this._updateReactiveDict(this._params, params);
// register query params
var queryParams = currentContext.queryParams;
this._updateReactiveDict(this._queryParams, queryParams);
// if the route is changing, we need to defer triggering path changing
// if we did this, old route's path watchers will detect this
// Real issue is, above watcher will get removed with the new route
// So, we don't need to trigger it now
// We are doing it on the route close event. So, if they exists they'll
// get notify that
if(!routeChanging) {
this._pathChangeDep.changed();
}
};
Route.prototype._updateReactiveDict = function(dict, newValues) {
var currentKeys = _.keys(newValues);
var oldKeys = _.keys(dict.keyDeps);
// set new values
// params is an array. So, _.each(params) does not works
// to iterate params
_.each(currentKeys, function(key) {
dict.set(key, newValues[key]);
});
// remove keys which does not exisits here
var removedKeys = _.difference(oldKeys, currentKeys);
_.each(removedKeys, function(key) {
dict.set(key, undefined);
});
};
@@ -1,587 +0,0 @@
Router = function () {
var self = this;
this.globals = [];
this.subscriptions = Function.prototype;
this._tracker = this._buildTracker();
this._current = {};
// tracks the current path change
this._onEveryPath = new Tracker.Dependency();
this._globalRoute = new Route(this);
// holds onRoute callbacks
this._onRouteCallbacks = [];
// if _askedToWait is true. We don't automatically start the router
// in Meteor.startup callback. (see client/_init.js)
// Instead user need to call `.initialize()
this._askedToWait = false;
this._initialized = false;
this._triggersEnter = [];
this._triggersExit = [];
this._routes = [];
this._routesMap = {};
this._updateCallbacks();
this.notFound = this.notfound = null;
// indicate it's okay (or not okay) to run the tracker
// when doing subscriptions
// using a number and increment it help us to support FlowRouter.go()
// and legitimate reruns inside tracker on the same event loop.
// this is a solution for #145
this.safeToRun = 0;
// Meteor exposes to the client the path prefix that was defined using the
// ROOT_URL environement variable on the server using the global runtime
// configuration. See #315.
this._basePath = __meteor_runtime_config__.ROOT_URL_PATH_PREFIX || '';
// this is a chain contains a list of old routes
// most of the time, there is only one old route
// but when it's the time for a trigger redirect we've a chain
this._oldRouteChain = [];
this.env = {
replaceState: new Meteor.EnvironmentVariable(),
reload: new Meteor.EnvironmentVariable(),
trailingSlash: new Meteor.EnvironmentVariable()
};
// redirect function used inside triggers
this._redirectFn = function(pathDef, fields, queryParams) {
if (/^http(s)?:\/\//.test(pathDef)) {
var message = "Redirects to URLs outside of the app are not supported in this version of Flow Router. Use 'window.location = yourUrl' instead";
throw new Error(message);
}
self.withReplaceState(function() {
var path = FlowRouter.path(pathDef, fields, queryParams);
self._page.redirect(path);
});
};
this._initTriggersAPI();
};
Router.prototype.route = function(pathDef, options, group) {
if (!/^\/.*/.test(pathDef)) {
var message = "route's path must start with '/'";
throw new Error(message);
}
options = options || {};
var self = this;
var route = new Route(this, pathDef, options, group);
// calls when the page route being activates
route._actionHandle = function (context, next) {
var oldRoute = self._current.route;
self._oldRouteChain.push(oldRoute);
var queryParams = self._qs.parse(context.querystring);
// _qs.parse() gives us a object without prototypes,
// created with Object.create(null)
// Meteor's check doesn't play nice with it.
// So, we need to fix it by cloning it.
// see more: https://github.com/meteorhacks/flow-router/issues/164
queryParams = JSON.parse(JSON.stringify(queryParams));
self._current = {
path: context.path,
context: context,
params: context.params,
queryParams: queryParams,
route: route,
oldRoute: oldRoute
};
// we need to invalidate if all the triggers have been completed
// if not that means, we've been redirected to another path
// then we don't need to invalidate
var afterAllTriggersRan = function() {
self._invalidateTracker();
};
var triggers = self._triggersEnter.concat(route._triggersEnter);
Triggers.runTriggers(
triggers,
self._current,
self._redirectFn,
afterAllTriggersRan
);
};
// calls when you exit from the page js route
route._exitHandle = function(context, next) {
var triggers = self._triggersExit.concat(route._triggersExit);
Triggers.runTriggers(
triggers,
self._current,
self._redirectFn,
next
);
};
this._routes.push(route);
if (options.name) {
this._routesMap[options.name] = route;
}
this._updateCallbacks();
this._triggerRouteRegister(route);
return route;
};
Router.prototype.group = function(options) {
return new Group(this, options);
};
Router.prototype.path = function(pathDef, fields, queryParams) {
if (this._routesMap[pathDef]) {
pathDef = this._routesMap[pathDef].pathDef;
}
var path = "";
// Prefix the path with the router global prefix
if (this._basePath) {
path += "/" + this._basePath + "/";
}
fields = fields || {};
var regExp = /(:[\w\(\)\\\+\*\.\?]+)+/g;
path += pathDef.replace(regExp, function(key) {
var firstRegexpChar = key.indexOf("(");
// get the content behind : and (\\d+/)
key = key.substring(1, (firstRegexpChar > 0)? firstRegexpChar: undefined);
// remove +?*
key = key.replace(/[\+\*\?]+/g, "");
// this is to allow page js to keep the custom characters as it is
// we need to encode 2 times otherwise "/" char does not work properly
// So, in that case, when I includes "/" it will think it's a part of the
// route. encoding 2times fixes it
return encodeURIComponent(encodeURIComponent(fields[key] || ""));
});
// Replace multiple slashes with single slash
path = path.replace(/\/\/+/g, "/");
// remove trailing slash
// but keep the root slash if it's the only one
path = path.match(/^\/{1}$/) ? path: path.replace(/\/$/, "");
// explictly asked to add a trailing slash
if(this.env.trailingSlash.get() && _.last(path) !== "/") {
path += "/";
}
var strQueryParams = this._qs.stringify(queryParams || {});
if(strQueryParams) {
path += "?" + strQueryParams;
}
return path;
};
Router.prototype.go = function(pathDef, fields, queryParams) {
var path = this.path(pathDef, fields, queryParams);
var useReplaceState = this.env.replaceState.get();
if(useReplaceState) {
this._page.replace(path);
} else {
this._page(path);
}
};
Router.prototype.reload = function() {
var self = this;
self.env.reload.withValue(true, function() {
self._page.replace(self._current.path);
});
};
Router.prototype.redirect = function(path) {
this._page.redirect(path);
};
Router.prototype.setParams = function(newParams) {
if(!this._current.route) {return false;}
var pathDef = this._current.route.pathDef;
var existingParams = this._current.params;
var params = {};
_.each(_.keys(existingParams), function(key) {
params[key] = existingParams[key];
});
params = _.extend(params, newParams);
var queryParams = this._current.queryParams;
this.go(pathDef, params, queryParams);
return true;
};
Router.prototype.setQueryParams = function(newParams) {
if(!this._current.route) {return false;}
var queryParams = _.clone(this._current.queryParams);
_.extend(queryParams, newParams);
for (var k in queryParams) {
if (queryParams[k] === null || queryParams[k] === undefined) {
delete queryParams[k];
}
}
var pathDef = this._current.route.pathDef;
var params = this._current.params;
this.go(pathDef, params, queryParams);
return true;
};
// .current is not reactive
// This is by design. use .getParam() instead
// If you really need to watch the path change, use .watchPathChange()
Router.prototype.current = function() {
// We can't trust outside, that's why we clone this
// Anyway, we can't clone the whole object since it has non-jsonable values
// That's why we clone what's really needed.
var current = _.clone(this._current);
current.queryParams = EJSON.clone(current.queryParams);
current.params = EJSON.clone(current.params);
return current;
};
// Implementing Reactive APIs
var reactiveApis = [
'getParam', 'getQueryParam',
'getRouteName', 'watchPathChange'
];
reactiveApis.forEach(function(api) {
Router.prototype[api] = function(arg1) {
// when this is calling, there may not be any route initiated
// so we need to handle it
var currentRoute = this._current.route;
if(!currentRoute) {
this._onEveryPath.depend();
return;
}
// currently, there is only one argument. If we've more let's add more args
// this is not clean code, but better in performance
return currentRoute[api].call(currentRoute, arg1);
};
});
Router.prototype.subsReady = function() {
var callback = null;
var args = _.toArray(arguments);
if (typeof _.last(args) === "function") {
callback = args.pop();
}
var currentRoute = this.current().route;
var globalRoute = this._globalRoute;
// we need to depend for every route change and
// rerun subscriptions to check the ready state
this._onEveryPath.depend();
if(!currentRoute) {
return false;
}
var subscriptions;
if(args.length === 0) {
subscriptions = _.values(globalRoute.getAllSubscriptions());
subscriptions = subscriptions.concat(_.values(currentRoute.getAllSubscriptions()));
} else {
subscriptions = _.map(args, function(subName) {
return globalRoute.getSubscription(subName) || currentRoute.getSubscription(subName);
});
}
var isReady = function() {
var ready = _.every(subscriptions, function(sub) {
return sub && sub.ready();
});
return ready;
};
if (callback) {
Tracker.autorun(function(c) {
if (isReady()) {
callback();
c.stop();
}
});
} else {
return isReady();
}
};
Router.prototype.withReplaceState = function(fn) {
return this.env.replaceState.withValue(true, fn);
};
Router.prototype.withTrailingSlash = function(fn) {
return this.env.trailingSlash.withValue(true, fn);
};
Router.prototype._notfoundRoute = function(context) {
this._current = {
path: context.path,
context: context,
params: [],
queryParams: {},
};
// XXX this.notfound kept for backwards compatibility
this.notFound = this.notFound || this.notfound;
if(!this.notFound) {
console.error("There is no route for the path:", context.path);
return;
}
this._current.route = new Route(this, "*", this.notFound);
this._invalidateTracker();
};
Router.prototype.initialize = function(options) {
options = options || {};
if(this._initialized) {
throw new Error("FlowRouter is already initialized");
}
var self = this;
this._updateCallbacks();
// Implementing idempotent routing
// by overriding page.js`s "show" method.
// Why?
// It is impossible to bypass exit triggers,
// because they execute before the handler and
// can not know what the next path is, inside exit trigger.
//
// we need override both show, replace to make this work
// since we use redirect when we are talking about withReplaceState
_.each(['show', 'replace'], function(fnName) {
var original = self._page[fnName];
self._page[fnName] = function(path, state, dispatch, push) {
var reload = self.env.reload.get();
if (!reload && self._current.path === path) {
return;
}
original.call(this, path, state, dispatch, push);
};
});
// this is very ugly part of pagejs and it does decoding few times
// in unpredicatable manner. See #168
// this is the default behaviour and we need keep it like that
// we are doing a hack. see .path()
this._page.base(this._basePath);
this._page({
decodeURLComponents: true,
hashbang: !!options.hashbang
});
this._initialized = true;
};
Router.prototype._buildTracker = function() {
var self = this;
// main autorun function
var tracker = Tracker.autorun(function () {
if(!self._current || !self._current.route) {
return;
}
// see the definition of `this._processingContexts`
var currentContext = self._current;
var route = currentContext.route;
var path = currentContext.path;
if(self.safeToRun === 0) {
var message =
"You can't use reactive data sources like Session" +
" inside the `.subscriptions` method!";
throw new Error(message);
}
// We need to run subscriptions inside a Tracker
// to stop subs when switching between routes
// But we don't need to run this tracker with
// other reactive changes inside the .subscription method
// We tackle this with the `safeToRun` variable
self._globalRoute.clearSubscriptions();
self.subscriptions.call(self._globalRoute, path);
route.callSubscriptions(currentContext);
// otherwise, computations inside action will trigger to re-run
// this computation. which we do not need.
Tracker.nonreactive(function() {
var isRouteChange = currentContext.oldRoute !== currentContext.route;
var isFirstRoute = !currentContext.oldRoute;
// first route is not a route change
if(isFirstRoute) {
isRouteChange = false;
}
// Clear oldRouteChain just before calling the action
// We still need to get a copy of the oldestRoute first
// It's very important to get the oldest route and registerRouteClose() it
// See: https://github.com/kadirahq/flow-router/issues/314
var oldestRoute = self._oldRouteChain[0];
self._oldRouteChain = [];
currentContext.route.registerRouteChange(currentContext, isRouteChange);
route.callAction(currentContext);
Tracker.afterFlush(function() {
self._onEveryPath.changed();
if(isRouteChange) {
// We need to trigger that route (definition itself) has changed.
// So, we need to re-run all the register callbacks to current route
// This is pretty important, otherwise tracker
// can't identify new route's items
// We also need to afterFlush, otherwise this will re-run
// helpers on templates which are marked for destroying
if(oldestRoute) {
oldestRoute.registerRouteClose();
}
}
});
});
self.safeToRun--;
});
return tracker;
};
Router.prototype._invalidateTracker = function() {
var self = this;
this.safeToRun++;
this._tracker.invalidate();
// After the invalidation we need to flush to make changes imediately
// otherwise, we have face some issues context mix-maches and so on.
// But there are some cases we can't flush. So we need to ready for that.
// we clearly know, we can't flush inside an autorun
// this may leads some issues on flow-routing
// we may need to do some warning
if(!Tracker.currentComputation) {
// Still there are some cases where we can't flush
// eg:- when there is a flush currently
// But we've no public API or hacks to get that state
// So, this is the only solution
try {
Tracker.flush();
} catch(ex) {
// only handling "while flushing" errors
if(!/Tracker\.flush while flushing/.test(ex.message)) {
return;
}
// XXX: fix this with a proper solution by removing subscription mgt.
// from the router. Then we don't need to run invalidate using a tracker
// this happens when we are trying to invoke a route change
// with inside a route chnage. (eg:- Template.onCreated)
// Since we use page.js and tracker, we don't have much control
// over this process.
// only solution is to defer route execution.
// It's possible to have more than one path want to defer
// But, we only need to pick the last one.
// self._nextPath = self._current.path;
Meteor.defer(function() {
var path = self._nextPath;
if(!path) {
return;
}
delete self._nextPath;
self.env.reload.withValue(true, function() {
self.go(path);
});
});
}
}
};
Router.prototype._updateCallbacks = function () {
var self = this;
self._page.callbacks = [];
self._page.exits = [];
_.each(self._routes, function(route) {
self._page(route.pathDef, route._actionHandle);
self._page.exit(route.pathDef, route._exitHandle);
});
self._page("*", function(context) {
self._notfoundRoute(context);
});
};
Router.prototype._initTriggersAPI = function() {
var self = this;
this.triggers = {
enter: function(triggers, filter) {
triggers = Triggers.applyFilters(triggers, filter);
if(triggers.length) {
self._triggersEnter = self._triggersEnter.concat(triggers);
}
},
exit: function(triggers, filter) {
triggers = Triggers.applyFilters(triggers, filter);
if(triggers.length) {
self._triggersExit = self._triggersExit.concat(triggers);
}
}
};
};
Router.prototype.wait = function() {
if(this._initialized) {
throw new Error("can't wait after FlowRouter has been initialized");
}
this._askedToWait = true;
};
Router.prototype.onRouteRegister = function(cb) {
this._onRouteCallbacks.push(cb);
};
Router.prototype._triggerRouteRegister = function(currentRoute) {
// We should only need to send a safe set of fields on the route
// object.
// This is not to hide what's inside the route object, but to show
// these are the public APIs
var routePublicApi = _.pick(currentRoute, 'name', 'pathDef', 'path');
var omittingOptionFields = [
'triggersEnter', 'triggersExit', 'action', 'subscriptions', 'name'
];
routePublicApi.options = _.omit(currentRoute.options, omittingOptionFields);
_.each(this._onRouteCallbacks, function(cb) {
cb(routePublicApi);
});
};
Router.prototype._page = page;
Router.prototype._qs = qs;
@@ -1,116 +0,0 @@
// a set of utility functions for triggers
Triggers = {};
// Apply filters for a set of triggers
// @triggers - a set of triggers
// @filter - filter with array fileds with `only` and `except`
// support only either `only` or `except`, but not both
Triggers.applyFilters = function(triggers, filter) {
if(!(triggers instanceof Array)) {
triggers = [triggers];
}
if(!filter) {
return triggers;
}
if(filter.only && filter.except) {
throw new Error("Triggers don't support only and except filters at once");
}
if(filter.only && !(filter.only instanceof Array)) {
throw new Error("only filters needs to be an array");
}
if(filter.except && !(filter.except instanceof Array)) {
throw new Error("except filters needs to be an array");
}
if(filter.only) {
return Triggers.createRouteBoundTriggers(triggers, filter.only);
}
if(filter.except) {
return Triggers.createRouteBoundTriggers(triggers, filter.except, true);
}
throw new Error("Provided a filter but not supported");
};
// create triggers by bounding them to a set of route names
// @triggers - a set of triggers
// @names - list of route names to be bound (trigger runs only for these names)
// @negate - negate the result (triggers won't run for above names)
Triggers.createRouteBoundTriggers = function(triggers, names, negate) {
var namesMap = {};
_.each(names, function(name) {
namesMap[name] = true;
});
var filteredTriggers = _.map(triggers, function(originalTrigger) {
var modifiedTrigger = function(context, next) {
var routeName = context.route.name;
var matched = (namesMap[routeName])? 1: -1;
matched = (negate)? matched * -1 : matched;
if(matched === 1) {
originalTrigger(context, next);
}
};
return modifiedTrigger;
});
return filteredTriggers;
};
// run triggers and abort if redirected or callback stopped
// @triggers - a set of triggers
// @context - context we need to pass (it must have the route)
// @redirectFn - function which used to redirect
// @after - called after if only all the triggers runs
Triggers.runTriggers = function(triggers, context, redirectFn, after) {
var abort = false;
var inCurrentLoop = true;
var alreadyRedirected = false;
for(var lc=0; lc<triggers.length; lc++) {
var trigger = triggers[lc];
trigger(context, doRedirect, doStop);
if(abort) {
return;
}
}
// mark that, we've exceeds the currentEventloop for
// this set of triggers.
inCurrentLoop = false;
after();
function doRedirect(url, params, queryParams) {
if(alreadyRedirected) {
throw new Error("already redirected");
}
/*
// Commenting out, so that redirects work when not in sync.
// https://github.com/wekan/wekan/issues/4514
if(!inCurrentLoop) {
throw new Error("redirect needs to be done in sync");
}
*/
if(!url) {
throw new Error("trigger redirect requires an URL");
}
abort = true;
alreadyRedirected = true;
redirectFn(url, params, queryParams);
}
function doStop() {
abort = true;
}
};
@@ -1,9 +0,0 @@
Router.prototype.url = function() {
// We need to remove the leading base path, or "/", as it will be inserted
// automatically by `Meteor.absoluteUrl` as documented in:
// http://docs.meteor.com/#/full/meteor_absoluteurl
var completePath = this.path.apply(this, arguments);
var basePath = this._basePath || '/';
var pathWithoutBase = completePath.replace(new RegExp('^' + basePath + '\/|(\/)'), '');
return Meteor.absoluteUrl(pathWithoutBase);
};
-81
View File
@@ -1,81 +0,0 @@
Package.describe({
name: 'kadira:flow-router',
summary: 'Carefully Designed Client Side Router for Meteor, fixed by Serubin',
version: '2.12.1',
git: 'https://github.com/serubin/flow-router.git'
});
Npm.depends({
// In order to support IE9, we had to fork pagejs and apply
// this PR: https://github.com/visionmedia/page.js/pull/288
'page':'https://github.com/kadirahq/page.js/archive/34ddf45ea8e4c37269ce3df456b44fc0efc595c6.tar.gz',
'qs':'5.2.0'
});
Package.onUse(function(api) {
configure(api);
api.export('FlowRouter');
});
Package.onTest(function(api) {
configure(api);
api.use('tinytest');
api.use('check');
api.use('mongo');
api.use('http');
api.use('random');
api.use('meteorhacks:fast-render');
api.use('meteorhacks:inject-data');
api.use('tmeasday:html5-history-api');
api.addFiles('test/common/fast_render_route.js', ['client', 'server']);
api.addFiles('test/client/_helpers.js', 'client');
api.addFiles('test/server/_helpers.js', 'server');
api.addFiles('test/client/loader.spec.js', 'client');
api.addFiles('test/client/route.reactivity.spec.js', 'client');
api.addFiles('test/client/router.core.spec.js', 'client');
api.addFiles('test/client/router.subs_ready.spec.js', 'client');
api.addFiles('test/client/router.reactivity.spec.js', 'client');
api.addFiles('test/client/group.spec.js', 'client');
api.addFiles('test/client/trigger.spec.js', 'client');
api.addFiles('test/client/triggers.js', 'client');
api.addFiles('test/server/plugins/fast_render.js', 'server');
api.addFiles('test/common/router.path.spec.js', ['client', 'server']);
api.addFiles('test/common/router.url.spec.js', ['client', 'server']);
api.addFiles('test/common/router.addons.spec.js', ['client', 'server']);
api.addFiles('test/common/route.spec.js', ['client', 'server']);
api.addFiles('test/common/group.spec.js', ['client', 'server']);
});
function configure(api) {
//api.versionsFrom('METEOR@1.3-rc.1');
api.use('underscore');
api.use('tracker');
api.use('reactive-dict');
api.use('reactive-var');
api.use('ejson');
api.use('modules');
api.use('meteorhacks:fast-render@2.14.0', ['client', 'server'], {weak: true});
api.addFiles('client/modules.js', 'client');
api.addFiles('client/triggers.js', 'client');
api.addFiles('client/router.js', 'client');
api.addFiles('client/group.js', 'client');
api.addFiles('client/route.js', 'client');
api.addFiles('client/_init.js', 'client');
api.addFiles('server/router.js', 'server');
api.addFiles('server/group.js', 'server');
api.addFiles('server/route.js', 'server');
api.addFiles('server/_init.js', 'server');
api.addFiles('server/plugins/fast_render.js', 'server');
api.addFiles('lib/router.js', ['client', 'server']);
}
@@ -1,4 +0,0 @@
// Export Router Instance
FlowRouter = new Router();
FlowRouter.Router = Router;
FlowRouter.Route = Route;
@@ -1,18 +0,0 @@
Group = function(router, options) {
options = options || {};
this.prefix = options.prefix || '';
this.options = options;
this._router = router;
};
Group.prototype.route = function(pathDef, options) {
pathDef = this.prefix + pathDef;
return this._router.route(pathDef, options);
};
Group.prototype.group = function(options) {
var group = new Group(this._router, options);
group.parent = this;
return group;
};
@@ -1,40 +0,0 @@
if(!Package['meteorhacks:fast-render']) {
return;
}
FastRender = Package['meteorhacks:fast-render'].FastRender;
// hack to run after eveything else on startup
Meteor.startup(function () {
Meteor.startup(function () {
setupFastRender();
});
});
function setupFastRender () {
_.each(FlowRouter._routes, function (route) {
FastRender.route(route.pathDef, function (routeParams, path) {
var self = this;
// anyone using Meteor.subscribe for something else?
var original = Meteor.subscribe;
Meteor.subscribe = function () {
return _.toArray(arguments);
};
route._subsMap = {};
FlowRouter.subscriptions.call(route, path);
if(route.subscriptions) {
var queryParams = routeParams.query;
var params = _.omit(routeParams, 'query');
route.subscriptions(params, queryParams);
}
_.each(route._subsMap, function (args) {
self.subscribe.apply(self, args);
});
// restore Meteor.subscribe, ... on server side
Meteor.subscribe = original;
});
});
}
@@ -1,28 +0,0 @@
Route = function(router, pathDef, options) {
options = options || {};
this.options = options;
this.name = options.name;
this.pathDef = pathDef;
// Route.path is deprecated and will be removed in 3.0
this.path = pathDef;
this.action = options.action || Function.prototype;
this.subscriptions = options.subscriptions || Function.prototype;
this._subsMap = {};
};
Route.prototype.register = function(name, sub, options) {
this._subsMap[name] = sub;
};
Route.prototype.subscription = function(name) {
return this._subsMap[name];
};
Route.prototype.middleware = function(middleware) {
};
@@ -1,146 +0,0 @@
var Qs = Npm.require('qs');
Router = function () {
this._routes = [];
this._routesMap = {};
this.subscriptions = Function.prototype;
// holds onRoute callbacks
this._onRouteCallbacks = [];
};
Router.prototype.route = function(pathDef, options) {
if (!/^\/.*/.test(pathDef)) {
var message = "route's path must start with '/'";
throw new Error(message);
}
options = options || {};
var route = new Route(this, pathDef, options);
this._routes.push(route);
if (options.name) {
this._routesMap[options.name] = route;
}
this._triggerRouteRegister(route);
return route;
};
Router.prototype.group = function(options) {
return new Group(this, options);
};
Router.prototype.path = function(pathDef, fields, queryParams) {
if (this._routesMap[pathDef]) {
pathDef = this._routesMap[pathDef].path;
}
fields = fields || {};
var regExp = /(:[\w\(\)\\\+\*\.\?]+)+/g;
var path = pathDef.replace(regExp, function(key) {
var firstRegexpChar = key.indexOf("(");
// get the content behind : and (\\d+/)
key = key.substring(1, (firstRegexpChar > 0)? firstRegexpChar: undefined);
// remove +?*
key = key.replace(/[\+\*\?]+/g, "");
return fields[key] || "";
});
path = path.replace(/\/\/+/g, "/"); // Replace multiple slashes with single slash
// remove trailing slash
// but keep the root slash if it's the only one
path = path.match(/^\/{1}$/) ? path: path.replace(/\/$/, "");
var strQueryParams = Qs.stringify(queryParams || {});
if(strQueryParams) {
path += "?" + strQueryParams;
}
return path;
};
Router.prototype.onRouteRegister = function(cb) {
this._onRouteCallbacks.push(cb);
};
Router.prototype._triggerRouteRegister = function(currentRoute) {
// We should only need to send a safe set of fields on the route
// object.
// This is not to hide what's inside the route object, but to show
// these are the public APIs
var routePublicApi = _.pick(currentRoute, 'name', 'pathDef', 'path');
var omittingOptionFields = [
'triggersEnter', 'triggersExit', 'action', 'subscriptions', 'name'
];
routePublicApi.options = _.omit(currentRoute.options, omittingOptionFields);
_.each(this._onRouteCallbacks, function(cb) {
cb(routePublicApi);
});
};
Router.prototype.go = function() {
// client only
};
Router.prototype.current = function() {
// client only
};
Router.prototype.triggers = {
enter: function() {
// client only
},
exit: function() {
// client only
}
};
Router.prototype.middleware = function() {
// client only
};
Router.prototype.getState = function() {
// client only
};
Router.prototype.getAllStates = function() {
// client only
};
Router.prototype.setState = function() {
// client only
};
Router.prototype.removeState = function() {
// client only
};
Router.prototype.clearStates = function() {
// client only
};
Router.prototype.ready = function() {
// client only
};
Router.prototype.initialize = function() {
// client only
};
Router.prototype.wait = function() {
// client only
};
@@ -1,10 +0,0 @@
GetSub = function (name) {
for(var id in Meteor.connection._subscriptions) {
var sub = Meteor.connection._subscriptions[id];
if(name === sub.name) {
return sub;
}
}
};
FlowRouter.route('/');
@@ -1,113 +0,0 @@
Tinytest.add('Client - Group - validate path definition', function (test, next) {
// path & prefix must start with '/'
test.throws(function() {
new Group(null, {prefix: Random.id()});
});
var group = FlowRouter.group({prefix: '/' + Random.id()});
test.throws(function() {
group.route(Random.id());
});
});
Tinytest.addAsync('Client - Group - define and go to route with prefix', function (test, next) {
var prefix = Random.id();
var rand = Random.id();
var rendered = 0;
var group = FlowRouter.group({prefix: '/' + prefix});
group.route('/' + rand, {
action: function(_params) {
rendered++;
}
});
FlowRouter.go('/' + prefix + '/' + rand);
setTimeout(function() {
test.equal(rendered, 1);
setTimeout(next, 100);
}, 100);
});
Tinytest.addAsync('Client - Group - define and go to route without prefix', function (test, next) {
var rand = Random.id();
var rendered = 0;
var group = FlowRouter.group();
group.route('/' + rand, {
action: function(_params) {
rendered++;
}
});
FlowRouter.go('/' + rand);
setTimeout(function() {
test.equal(rendered, 1);
setTimeout(next, 100);
}, 100);
});
Tinytest.addAsync('Client - Group - subscribe', function (test, next) {
var rand = Random.id();
var group = FlowRouter.group({
subscriptions: function (params) {
this.register('baz', Meteor.subscribe('baz'));
}
});
group.route('/' + rand);
FlowRouter.go('/' + rand);
setTimeout(function() {
test.isTrue(!!GetSub('baz'));
next();
}, 100);
});
Tinytest.addAsync('Client - Group - set and retrieve group name', function (test, next) {
var rand = Random.id();
var name = Random.id();
var group = FlowRouter.group({
name: name
});
group.route('/' + rand);
FlowRouter.go('/' + rand);
setTimeout(function() {
test.isTrue(FlowRouter.current().route.group.name === name);
next();
}, 100);
});
Tinytest.add('Client - Group - expose group options on a route', function (test) {
var pathDef = "/" + Random.id();
var name = Random.id();
var groupName = Random.id();
var data = {aa: 10};
var layout = 'blah';
var group = FlowRouter.group({
name: groupName,
prefix: '/admin',
layout: layout,
someData: data
});
group.route(pathDef, {
name: name
});
var route = FlowRouter._routesMap[name];
test.equal(route.group.options.someData, data);
test.equal(route.group.options.layout, layout);
});
@@ -1,17 +0,0 @@
Router = FlowRouter.Router;
Tinytest.add('Client - import page.js', function (test) {
test.isTrue(!!Router.prototype._page);
test.isFalse(!!window.page);
});
Tinytest.add('Client - import query.js', function (test) {
test.isTrue(!!Router.prototype._qs);
});
Tinytest.add('Client - create FlowRouter', function (test) {
test.isTrue(!!FlowRouter);
});
@@ -1,158 +0,0 @@
Route = FlowRouter.Route;
Tinytest.addAsync('Client - Route - Reactivity - getParam', function (test, done) {
var r = new Route();
Tracker.autorun(function(c) {
var param = r.getParam("id");
if(param) {
test.equal(param, "hello");
c.stop();
Meteor.defer(done);
}
});
setTimeout(function() {
var context = {
params: {id: "hello"},
queryParams: {}
};
r.registerRouteChange(context);
}, 10);
});
Tinytest.addAsync('Client - Route - Reactivity - getParam on route close', function (test, done) {
var r = new Route();
var closeTriggered = false;
Tracker.autorun(function(c) {
var param = r.getParam("id");
if(closeTriggered) {
test.equal(param, undefined);
c.stop();
Meteor.defer(done);
}
});
setTimeout(function() {
closeTriggered = true;
r.registerRouteClose();
}, 10);
});
Tinytest.addAsync('Client - Route - Reactivity - getQueryParam', function (test, done) {
var r = new Route();
Tracker.autorun(function(c) {
var param = r.getQueryParam("id");
if(param) {
test.equal(param, "hello");
c.stop();
Meteor.defer(done);
}
});
setTimeout(function() {
var context = {
params: {},
queryParams: {id: "hello"}
};
r.registerRouteChange(context);
}, 10);
});
Tinytest.addAsync('Client - Route - Reactivity - getQueryParam on route close', function (test, done) {
var r = new Route();
var closeTriggered = false;
Tracker.autorun(function(c) {
var param = r.getQueryParam("id");
if(closeTriggered) {
test.equal(param, undefined);
c.stop();
Meteor.defer(done);
}
});
setTimeout(function() {
closeTriggered = true;
r.registerRouteClose();
}, 10);
});
Tinytest.addAsync('Client - Route - Reactivity - getRouteName rerun when route closed', function (test, done) {
var r = new Route();
r.name = "my-route";
var closeTriggered = false;
Tracker.autorun(function(c) {
var name = r.getRouteName();
test.equal(name, r.name);
if(closeTriggered) {
c.stop();
Meteor.defer(done);
}
});
setTimeout(function() {
closeTriggered = true;
r.registerRouteClose();
}, 10);
});
Tinytest.addAsync('Client - Route - Reactivity - watchPathChange when routeChange', function (test, done) {
var r = new Route();
var pathChangeCounts = 0;
var c = Tracker.autorun(function() {
r.watchPathChange();
pathChangeCounts++;
});
var context = {
params: {},
queryParams: {}
};
setTimeout(function() {
r.registerRouteChange(context);
setTimeout(checkAfterNormalRouteChange, 50);
}, 10);
function checkAfterNormalRouteChange() {
test.equal(pathChangeCounts, 2);
var lastRouteChange = true;
r.registerRouteChange(context, lastRouteChange);
setTimeout(checkAfterLastRouteChange, 10);
}
function checkAfterLastRouteChange() {
test.equal(pathChangeCounts, 2);
c.stop();
Meteor.defer(done);
}
});
Tinytest.addAsync('Client - Route - Reactivity - watchPathChange when routeClose', function (test, done) {
var r = new Route();
var pathChangeCounts = 0;
var c = Tracker.autorun(function() {
r.watchPathChange();
pathChangeCounts++;
});
var context = {
params: {},
queryParams: {}
};
setTimeout(function() {
r.registerRouteClose();
setTimeout(checkAfterRouteClose, 10);
}, 10);
function checkAfterRouteClose() {
test.equal(pathChangeCounts, 2);
c.stop();
Meteor.defer(done);
}
});
@@ -1,632 +0,0 @@
Router = FlowRouter.Router;
Tinytest.addAsync('Client - Router - define and go to route', function (test, next) {
var rand = Random.id();
var rendered = 0;
FlowRouter.route('/' + rand, {
action: function(_params) {
rendered++;
}
});
FlowRouter.go('/' + rand);
setTimeout(function() {
test.equal(rendered, 1);
setTimeout(next, 100);
}, 100);
});
Tinytest.addAsync('Client - Router - define and go to route with fields',
function (test, next) {
var rand = Random.id();
var pathDef = "/" + rand + "/:key";
var rendered = 0;
FlowRouter.route(pathDef, {
action: function(params) {
test.equal(params.key, "abc +@%");
rendered++;
}
});
FlowRouter.go(pathDef, {key: "abc +@%"});
setTimeout(function() {
test.equal(rendered, 1);
setTimeout(next, 100);
}, 100);
});
Tinytest.addAsync('Client - Router - parse params and query', function (test, next) {
var rand = Random.id();
var rendered = 0;
var params = null;
FlowRouter.route('/' + rand + '/:foo', {
action: function(_params) {
rendered++;
params = _params;
}
});
FlowRouter.go('/' + rand + '/bar');
setTimeout(function() {
test.equal(rendered, 1);
test.equal(params.foo, 'bar');
setTimeout(next, 100);
}, 100);
});
Tinytest.addAsync('Client - Router - redirect using FlowRouter.go', function (test, next) {
var rand = Random.id(), rand2 = Random.id();
var log = [];
var paths = ['/' + rand2, '/' + rand];
var done = false;
FlowRouter.route(paths[0], {
action: function(_params) {
log.push(1);
FlowRouter.go(paths[1]);
}
});
FlowRouter.route(paths[1], {
action: function(_params) {
log.push(2);
}
});
FlowRouter.go(paths[0]);
setTimeout(function() {
test.equal(log, [1, 2]);
done = true;
next();
}, 100);
});
Tinytest.addAsync('Client - Router - get current route path', function (test, next) {
var value = Random.id();
var randomValue = Random.id();
var pathDef = "/" + randomValue + '/:_id';
var path = "/" + randomValue + "/" + value;
var detectedValue = null;
FlowRouter.route(pathDef, {
action: function(params) {
detectedValue = params._id;
}
});
FlowRouter.go(path);
Meteor.setTimeout(function() {
test.equal(detectedValue, value);
test.equal(FlowRouter.current().path, path);
next();
}, 50);
});
Tinytest.addAsync('Client - Router - subscribe to global subs', function (test, next) {
var rand = Random.id();
FlowRouter.route('/' + rand);
FlowRouter.subscriptions = function (path) {
test.equal(path, '/' + rand);
this.register('baz', Meteor.subscribe('baz'));
};
FlowRouter.go('/' + rand);
setTimeout(function() {
test.isTrue(!!GetSub('baz'));
FlowRouter.subscriptions = Function.prototype;
next();
}, 100);
});
Tinytest.addAsync('Client - Router - setParams - generic', function (test, done) {
var randomKey = Random.id();
var pathDef = "/" + randomKey + "/:cat/:id";
var paramsList = [];
FlowRouter.route(pathDef, {
action: function(params) {
paramsList.push(params);
}
});
FlowRouter.go(pathDef, {cat: "meteor", id: "200"});
setTimeout(function() {
// return done();
var success = FlowRouter.setParams({id: "700"});
test.isTrue(success);
setTimeout(validate, 50);
}, 50);
function validate() {
test.equal(paramsList.length, 2);
test.equal(_.pick(paramsList[0], "id", "cat"), {cat: "meteor", id: "200"});
test.equal(_.pick(paramsList[1], "id", "cat"), {cat: "meteor", id: "700"});
done();
}
});
Tinytest.addAsync('Client - Router - setParams - preserve query strings', function (test, done) {
var randomKey = Random.id();
var pathDef = "/" + randomKey + "/:cat/:id";
var paramsList = [];
var queryParamsList = [];
FlowRouter.route(pathDef, {
action: function(params, queryParams) {
paramsList.push(params);
queryParamsList.push(queryParams);
}
});
FlowRouter.go(pathDef, {cat: "meteor", id: "200 +% / ad"}, {aa: "20 +%"});
setTimeout(function() {
// return done();
var success = FlowRouter.setParams({id: "700 +% / ad"});
test.isTrue(success);
setTimeout(validate, 50);
}, 50);
function validate() {
test.equal(paramsList.length, 2);
test.equal(queryParamsList.length, 2);
test.equal(_.pick(paramsList[0], "id", "cat"), {cat: "meteor", id: "200 +% / ad"});
test.equal(_.pick(paramsList[1], "id", "cat"), {cat: "meteor", id: "700 +% / ad"});
test.equal(queryParamsList, [{aa: "20 +%"}, {aa: "20 +%"}]);
done();
}
});
Tinytest.add('Client - Router - setParams - no route selected', function (test) {
var originalRoute = FlowRouter._current.route;
FlowRouter._current.route = undefined;
var success = FlowRouter.setParams({id: "800"});
test.isFalse(success);
FlowRouter._current.route = originalRoute;
});
Tinytest.addAsync('Client - Router - setQueryParams - using check', function (test, done) {
var randomKey = Random.id();
var pathDef = "/" + randomKey + "";
var queryParamsList = [];
FlowRouter.route(pathDef, {
action: function(params, queryParams) {
queryParamsList.push(queryParams);
}
});
FlowRouter.go(pathDef, {}, {cat: "meteor", id: "200"});
setTimeout(function() {
check(FlowRouter.current().queryParams, {cat: String, id: String});
done();
}, 50);
});
Tinytest.addAsync('Client - Router - setQueryParams - generic', function (test, done) {
var randomKey = Random.id();
var pathDef = "/" + randomKey + "";
var queryParamsList = [];
FlowRouter.route(pathDef, {
action: function(params, queryParams) {
queryParamsList.push(queryParams);
}
});
FlowRouter.go(pathDef, {}, {cat: "meteor", id: "200"});
setTimeout(function() {
// return done();
var success = FlowRouter.setQueryParams({id: "700"});
test.isTrue(success);
setTimeout(validate, 50);
}, 50);
function validate() {
test.equal(queryParamsList.length, 2);
test.equal(_.pick(queryParamsList[0], "id", "cat"), {cat: "meteor", id: "200"});
test.equal(_.pick(queryParamsList[1], "id", "cat"), {cat: "meteor", id: "700"});
done();
}
});
Tinytest.addAsync('Client - Router - setQueryParams - remove query param null', function (test, done) {
var randomKey = Random.id();
var pathDef = "/" + randomKey + "";
var queryParamsList = [];
FlowRouter.route(pathDef, {
action: function(params, queryParams) {
queryParamsList.push(queryParams);
}
});
FlowRouter.go(pathDef, {}, {cat: "meteor", id: "200"});
setTimeout(function() {
var success = FlowRouter.setQueryParams({id: "700", cat: null});
test.isTrue(success);
setTimeout(validate, 50);
}, 50);
function validate() {
test.equal(queryParamsList.length, 2);
test.equal(_.pick(queryParamsList[0], "id", "cat"), {cat: "meteor", id: "200"});
test.equal(queryParamsList[1], {id: "700"});
done();
}
});
Tinytest.addAsync('Client - Router - setQueryParams - remove query param undefined', function (test, done) {
var randomKey = Random.id();
var pathDef = "/" + randomKey + "";
var queryParamsList = [];
FlowRouter.route(pathDef, {
action: function(params, queryParams) {
queryParamsList.push(queryParams);
}
});
FlowRouter.go(pathDef, {}, {cat: "meteor", id: "200"});
setTimeout(function() {
var success = FlowRouter.setQueryParams({id: "700", cat: undefined});
test.isTrue(success);
setTimeout(validate, 50);
}, 50);
function validate() {
test.equal(queryParamsList.length, 2);
test.equal(_.pick(queryParamsList[0], "id", "cat"), {cat: "meteor", id: "200"});
test.equal(queryParamsList[1], {id: "700"});
done();
}
});
Tinytest.addAsync('Client - Router - setQueryParams - preserve params', function (test, done) {
var randomKey = Random.id();
var pathDef = "/" + randomKey + "/:abc";
var queryParamsList = [];
var paramsList = [];
FlowRouter.route(pathDef, {
action: function(params, queryParams) {
paramsList.push(params);
queryParamsList.push(queryParams);
}
});
FlowRouter.go(pathDef, {abc: "20"}, {cat: "meteor", id: "200"});
setTimeout(function() {
// return done();
var success = FlowRouter.setQueryParams({id: "700"});
test.isTrue(success);
setTimeout(validate, 50);
}, 50);
function validate() {
test.equal(queryParamsList.length, 2);
test.equal(queryParamsList, [
{cat: "meteor", id: "200"}, {cat: "meteor", id: "700"}
]);
test.equal(paramsList.length, 2);
test.equal(_.pick(paramsList[0], "abc"), {abc: "20"});
test.equal(_.pick(paramsList[1], "abc"), {abc: "20"});
done();
}
});
Tinytest.add('Client - Router - setQueryParams - no route selected', function (test) {
var originalRoute = FlowRouter._current.route;
FlowRouter._current.route = undefined;
var success = FlowRouter.setQueryParams({id: "800"});
test.isFalse(success);
FlowRouter._current.route = originalRoute;
});
Tinytest.addAsync('Client - Router - notFound', function (test, done) {
var data = [];
FlowRouter.notFound = {
subscriptions: function() {
data.push("subscriptions");
},
action: function() {
data.push("action");
}
};
FlowRouter.go("/" + Random.id());
setTimeout(function() {
test.equal(data, ["subscriptions", "action"]);
done();
}, 50);
});
Tinytest.addAsync('Client - Router - withReplaceState - enabled',
function (test, done) {
var pathDef = "/" + Random.id() + "/:id";
var originalRedirect = FlowRouter._page.replace;
var callCount = 0;
FlowRouter._page.replace = function(path) {
callCount++;
originalRedirect.call(FlowRouter._page, path);
};
FlowRouter.route(pathDef, {
name: name,
action: function(params) {
test.equal(params.id, "awesome");
test.equal(callCount, 1);
FlowRouter._page.replace = originalRedirect;
// We don't use Meteor.defer here since it carries
// Meteor.Environment vars too
// Which breaks our test below
setTimeout(done, 0);
}
});
FlowRouter.withReplaceState(function() {
FlowRouter.go(pathDef, {id: "awesome"});
});
});
Tinytest.addAsync('Client - Router - withReplaceState - disabled',
function (test, done) {
var pathDef = "/" + Random.id() + "/:id";
var originalRedirect = FlowRouter._page.replace;
var callCount = 0;
FlowRouter._page.replace = function(path) {
callCount++;
originalRedirect.call(FlowRouter._page, path);
};
FlowRouter.route(pathDef, {
name: name,
action: function(params) {
test.equal(params.id, "awesome");
test.equal(callCount, 0);
FlowRouter._page.replace = originalRedirect;
Meteor.defer(done);
}
});
FlowRouter.go(pathDef, {id: "awesome"});
});
Tinytest.addAsync('Client - Router - withTrailingSlash - enabled', function (test, next) {
var rand = Random.id();
var rendered = 0;
FlowRouter.route('/' + rand, {
action: function(_params) {
rendered++;
}
});
FlowRouter.withTrailingSlash(function() {
FlowRouter.go('/' + rand);
});
setTimeout(function() {
test.equal(rendered, 1);
test.equal(_.last(location.href), '/');
setTimeout(next, 100);
}, 100);
});
Tinytest.addAsync('Client - Router - idempotent routing - action',
function (test, done) {
var rand = Random.id();
var pathDef = "/" + rand;
var rendered = 0;
FlowRouter.route(pathDef, {
action: function(params) {
rendered++;
}
});
FlowRouter.go(pathDef);
Meteor.defer(function() {
FlowRouter.go(pathDef);
Meteor.defer(function() {
test.equal(rendered, 1);
done();
});
});
});
Tinytest.addAsync('Client - Router - idempotent routing - triggers',
function (test, next) {
var rand = Random.id();
var pathDef = "/" + rand;
var runnedTriggers = 0;
var done = false;
var triggerFns = [function(params) {
if (done) return;
runnedTriggers++;
}];
FlowRouter.triggers.enter(triggerFns);
FlowRouter.route(pathDef, {
triggersEnter: triggerFns,
triggersExit: triggerFns
});
FlowRouter.go(pathDef);
FlowRouter.triggers.exit(triggerFns);
Meteor.defer(function() {
FlowRouter.go(pathDef);
Meteor.defer(function() {
test.equal(runnedTriggers, 2);
done = true;
next();
});
});
});
Tinytest.addAsync('Client - Router - reload - action',
function (test, done) {
var rand = Random.id();
var pathDef = "/" + rand;
var rendered = 0;
FlowRouter.route(pathDef, {
action: function(params) {
rendered++;
}
});
FlowRouter.go(pathDef);
Meteor.defer(function() {
FlowRouter.reload();
Meteor.defer(function() {
test.equal(rendered, 2);
done();
});
});
});
Tinytest.addAsync('Client - Router - reload - triggers',
function (test, next) {
var rand = Random.id();
var pathDef = "/" + rand;
var runnedTriggers = 0;
var done = false;
var triggerFns = [function(params) {
if (done) return;
runnedTriggers++;
}];
FlowRouter.triggers.enter(triggerFns);
FlowRouter.route(pathDef, {
triggersEnter: triggerFns,
triggersExit: triggerFns
});
FlowRouter.go(pathDef);
FlowRouter.triggers.exit(triggerFns);
Meteor.defer(function() {
FlowRouter.reload();
Meteor.defer(function() {
test.equal(runnedTriggers, 6);
done = true;
next();
});
});
});
Tinytest.addAsync(
'Client - Router - wait - before initialize',
function(test, done) {
FlowRouter._initialized = false;
FlowRouter.wait();
test.equal(FlowRouter._askedToWait, true);
FlowRouter._initialized = true;
FlowRouter._askedToWait = false;
done();
});
Tinytest.addAsync(
'Client - Router - wait - after initialized',
function(test, done) {
try {
FlowRouter.wait();
} catch(ex) {
test.isTrue(/can't wait/.test(ex.message));
done();
}
});
Tinytest.addAsync(
'Client - Router - initialize - after initialized',
function(test, done) {
try {
FlowRouter.initialize();
} catch(ex) {
test.isTrue(/already initialized/.test(ex.message));
done();
}
});
Tinytest.addAsync(
'Client - Router - base path - url updated',
function(test, done) {
var simulatedBasePath = '/flow';
var rand = Random.id();
FlowRouter.route('/' + rand, { action: function() {} });
setBasePath(simulatedBasePath);
FlowRouter.go('/' + rand);
setTimeout(function() {
test.equal(location.pathname, simulatedBasePath + '/' + rand);
resetBasePath();
done();
}, 100);
});
Tinytest.addAsync(
'Client - Router - base path - route action called',
function(test, done) {
var simulatedBasePath = '/flow';
var rand = Random.id();
FlowRouter.route('/' + rand, {
action: function() {
resetBasePath();
done();
}
});
setBasePath(simulatedBasePath);
FlowRouter.go('/' + rand);
});
Tinytest.add(
'Client - Router - base path - path generation',
function(test, done) {
_.each(['/flow', '/flow/', 'flow/', 'flow'], function(simulatedBasePath) {
var rand = Random.id();
setBasePath(simulatedBasePath);
test.equal(FlowRouter.path('/' + rand), '/flow/' + rand);
});
resetBasePath();
});
function setBasePath(path) {
FlowRouter._initialized = false;
FlowRouter._basePath = path;
FlowRouter.initialize();
}
var defaultBasePath = FlowRouter._basePath;
function resetBasePath() {
setBasePath(defaultBasePath);
}
function bind(obj, method) {
return function() {
obj[method].apply(obj, arguments);
};
}
@@ -1,208 +0,0 @@
Tinytest.addAsync(
'Client - Router - Reactivity - detectChange only once',
function (test, done) {
var route = "/" + Random.id();
var name = Random.id();
FlowRouter.route(route, {name: name});
var ranCount = 0;
var pickedId = null;
var c = Tracker.autorun(function() {
ranCount++;
pickedId = FlowRouter.getQueryParam("id");
if(pickedId) {
test.equal(pickedId, "hello");
test.equal(ranCount, 2);
c.stop();
Meteor.defer(done);
}
});
setTimeout(function() {
FlowRouter.go(name, {}, {id: "hello"});
}, 2);
});
Tinytest.addAsync(
'Client - Router - Reactivity - detectChange in the action',
function (test, done) {
var route = "/" + Random.id();
var name = Random.id();
FlowRouter.route(route, {
name: name,
action: function() {
var id = FlowRouter.getQueryParam("id");
test.equal(id, "hello");
Meteor.defer(done);
}
});
setTimeout(function() {
FlowRouter.go(name, {}, {id: "hello"});
}, 2);
});
Tinytest.addAsync(
'Client - Router - Reactivity - detect prev routeChange after new action',
function (test, done) {
var route1 = "/" + Random.id();
var name1 = Random.id();
var pickedName1 = null;
var route2 = "/" + Random.id();
var name2 = Random.id();
var pickedName2 = Random.id();
FlowRouter.route(route1, {
name: name1,
action: function() {
Tracker.autorun(function(c) {
pickedName1 = FlowRouter.getRouteName();
if(pickedName1 == name2) {
test.equal(pickedName1, pickedName2);
c.stop();
Meteor.defer(done);
}
});
}
});
FlowRouter.route(route2, {
name: name2,
action: function() {
pickedName2 = FlowRouter.getRouteName();
test.equal(pickedName1, name1);
test.equal(pickedName2, name2);
}
});
FlowRouter.go(name1);
Meteor.setTimeout(function() {
FlowRouter.go(name2);
}, 10);
});
Tinytest.addAsync(
'Client - Router - Reactivity - defer watchPathChange until new route rendered',
function(test, done) {
var route1 = "/" + Random.id();
var name1 = Random.id();
var pickedName1 = null;
var route2 = "/" + Random.id();
var name2 = Random.id();
var pickedName2 = Random.id();
FlowRouter.route(route1, {
name: name1,
action: function() {
Tracker.autorun(function(c) {
FlowRouter.watchPathChange();
pickedName1 = FlowRouter.current().route.name;
if(pickedName1 == name2) {
test.equal(pickedName1, pickedName2);
c.stop();
Meteor.defer(done);
}
});
}
});
FlowRouter.route(route2, {
name: name2,
action: function() {
pickedName2 = FlowRouter.current().route.name;
test.equal(pickedName1, name1);
test.equal(pickedName2, name2);
}
});
FlowRouter.go(name1);
Meteor.setTimeout(function() {
FlowRouter.go(name2);
}, 10);
});
Tinytest.addAsync(
'Client - Router - Reactivity - reactive changes and trigger redirects',
function(test, done) {
var name1 = Random.id();
var route1 = "/" + name1;
FlowRouter.route(route1, {
name: name1
});
var name2 = Random.id();
var route2 = "/" + name2;
FlowRouter.route(route2, {
name: name2,
triggersEnter: [function(context, redirect) {
redirect(name3);
}]
});
var name3 = Random.id();
var route3 = "/" + name3;
FlowRouter.route(route3, {
name: name3
});
var routeNamesFired = [];
FlowRouter.go(name1);
var c = null;
setTimeout(function() {
c = Tracker.autorun(function(c) {
routeNamesFired.push(FlowRouter.getRouteName());
});
FlowRouter.go(name2);
}, 50);
setTimeout(function() {
c.stop();
test.equal(routeNamesFired, [name1, name3]);
Meteor.defer(done);
}, 250);
});
Tinytest.addAsync(
'Client - Router - Reactivity - watchPathChange for every route change',
function(test, done) {
var route1 = "/" + Random.id();
var name1 = Random.id();
var pickedName1 = null;
var route2 = "/" + Random.id();
var name2 = Random.id();
var pickedName2 = Random.id();
FlowRouter.route(route1, {
name: name1
});
FlowRouter.route(route2, {
name: name2
});
var ids = [];
var c = Tracker.autorun(function() {
FlowRouter.watchPathChange();
ids.push(FlowRouter.current().queryParams['id']);
});
FlowRouter.go(name1, {}, {id: "one"});
Meteor.setTimeout(function() {
FlowRouter.go(name1, {}, {id: "two"});
}, 10);
Meteor.setTimeout(function() {
FlowRouter.go(name2, {}, {id: "three"});
}, 20);
Meteor.setTimeout(function() {
test.equal(ids, [undefined, "one", "two", "three"]);
c.stop();
done();
}, 40);
});
@@ -1,225 +0,0 @@
Tinytest.addAsync('Client - Router - subsReady - with no args - all subscriptions ready', function (test, next) {
var rand = Random.id();
FlowRouter.route('/' + rand, {
subscriptions: function(params) {
this.register('bar', Meteor.subscribe('bar'));
this.register('foo', Meteor.subscribe('foo'));
}
});
FlowRouter.subscriptions = function () {
this.register('baz', Meteor.subscribe('baz'));
};
FlowRouter.go('/' + rand);
Tracker.autorun(function(c) {
if(FlowRouter.subsReady()) {
FlowRouter.subscriptions = Function.prototype;
next();
c.stop();
}
});
});
Tinytest.addAsync('Client - Router - subsReady - with no args - all subscriptions does not ready', function (test, next) {
var rand = Random.id();
FlowRouter.route('/' + rand, {
subscriptions: function(params) {
this.register('fooNotReady', Meteor.subscribe('fooNotReady'));
}
});
FlowRouter.subscriptions = function () {
this.register('bazNotReady', Meteor.subscribe('bazNotReady'));
};
FlowRouter.go('/' + rand);
setTimeout(function() {
test.isTrue(!FlowRouter.subsReady());
FlowRouter.subscriptions = Function.prototype;
next();
}, 100);
});
Tinytest.addAsync('Client - Router - subsReady - with no args - global subscriptions does not ready', function (test, next) {
var rand = Random.id();
FlowRouter.route('/' + rand, {
subscriptions: function(params) {
this.register('bar', Meteor.subscribe('bar'));
this.register('foo', Meteor.subscribe('foo'));
}
});
FlowRouter.subscriptions = function () {
this.register('bazNotReady', Meteor.subscribe('bazNotReady'));
};
FlowRouter.go('/' + rand);
setTimeout(function() {
test.isTrue(!FlowRouter.subsReady());
FlowRouter.subscriptions = Function.prototype;
next();
}, 100);
});
Tinytest.addAsync('Client - Router - subsReady - with no args - current subscriptions does not ready', function (test, next) {
var rand = Random.id();
FlowRouter.route('/' + rand, {
subscriptions: function(params) {
this.register('bar', Meteor.subscribe('bar'));
this.register('fooNotReady', Meteor.subscribe('fooNotReady'));
}
});
FlowRouter.subscriptions = function () {
this.register('baz', Meteor.subscribe('baz'));
};
FlowRouter.go('/' + rand);
setTimeout(function() {
test.isTrue(!FlowRouter.subsReady());
FlowRouter.subscriptions = Function.prototype;
next();
}, 100);
});
Tinytest.addAsync('Client - Router - subsReady - with args - all subscriptions ready', function (test, next) {
var rand = Random.id();
FlowRouter.route('/' + rand, {
subscriptions: function(params) {
this.register('bar', Meteor.subscribe('bar'));
this.register('foo', Meteor.subscribe('foo'));
}
});
FlowRouter.subscriptions = function () {
this.register('baz', Meteor.subscribe('baz'));
};
FlowRouter.go('/' + rand);
Tracker.autorun(function(c) {
if(FlowRouter.subsReady('foo', 'baz')) {
FlowRouter.subscriptions = Function.prototype;
next();
c.stop();
}
});
});
Tinytest.addAsync('Client - Router - subsReady - with args - all subscriptions does not ready', function (test, next) {
var rand = Random.id();
FlowRouter.route('/' + rand, {
subscriptions: function(params) {
this.register('fooNotReady', Meteor.subscribe('fooNotReady'));
}
});
FlowRouter.subscriptions = function () {
this.register('bazNotReady', Meteor.subscribe('bazNotReady'));
};
FlowRouter.go('/' + rand);
setTimeout(function() {
test.isTrue(!FlowRouter.subsReady('fooNotReady', 'bazNotReady'));
FlowRouter.subscriptions = Function.prototype;
next();
}, 100);
});
Tinytest.addAsync('Client - Router - subsReady - with args - global subscriptions does not ready', function (test, next) {
var rand = Random.id();
FlowRouter.route('/' + rand, {
subscriptions: function(params) {
this.register('bar', Meteor.subscribe('bar'));
this.register('foo', Meteor.subscribe('foo'));
}
});
FlowRouter.subscriptions = function () {
this.register('bazNotReady', Meteor.subscribe('bazNotReady'));
};
FlowRouter.go('/' + rand);
setTimeout(function() {
test.isTrue(!FlowRouter.subsReady('foo', 'bazNotReady'));
FlowRouter.subscriptions = Function.prototype;
next();
}, 100);
});
Tinytest.addAsync('Client - Router - subsReady - with args - current subscriptions does not ready', function (test, next) {
var rand = Random.id();
FlowRouter.route('/' + rand, {
subscriptions: function(params) {
this.register('bar', Meteor.subscribe('bar'));
this.register('fooNotReady', Meteor.subscribe('fooNotReady'));
}
});
FlowRouter.subscriptions = function () {
this.register('baz', Meteor.subscribe('baz'));
};
FlowRouter.go('/' + rand);
setTimeout(function() {
test.isTrue(!FlowRouter.subsReady('fooNotReady', 'baz'));
FlowRouter.subscriptions = Function.prototype;
next();
}, 100);
});
Tinytest.addAsync('Client - Router - subsReady - with args - subscribe with wrong name', function (test, next) {
var rand = Random.id();
FlowRouter.route('/' + rand, {
subscriptions: function(params) {
this.register('bar', Meteor.subscribe('bar'));
}
});
FlowRouter.subscriptions = function () {
this.register('baz', Meteor.subscribe('baz'));
};
FlowRouter.go('/' + rand);
setTimeout(function() {
test.isTrue(!FlowRouter.subsReady('baz', 'xxx', 'baz'));
FlowRouter.subscriptions = Function.prototype;
next();
}, 100);
});
Tinytest.addAsync('Client - Router - subsReady - with args - same route two different subs', function (test, next) {
var rand = Random.id();
var count = 0;
FlowRouter.route('/' + rand, {
subscriptions: function(params) {
if(++count == 1) {
this.register('not-exisitng', Meteor.subscribe('not-exisitng'));
}
}
});
FlowRouter.subscriptions = Function.prototype;
FlowRouter.go('/' + rand);
setTimeout(function() {
test.isFalse(FlowRouter.subsReady());
FlowRouter.go('/' + rand, {}, {param: "111"});
setTimeout(function() {
test.isTrue(FlowRouter.subsReady());
next();
}, 100)
}, 100);
});
Tinytest.addAsync('Client - Router - subsReady - no subscriptions - simple', function (test, next) {
var rand = Random.id();
FlowRouter.route('/' + rand, {});
FlowRouter.subscriptions = Function.prototype;
FlowRouter.go('/' + rand);
setTimeout(function() {
test.isTrue(FlowRouter.subsReady());
next();
}, 100);
});
@@ -1,570 +0,0 @@
Tinytest.addAsync('Client - Triggers - global enter triggers', function(test, next) {
var rand = Random.id(), rand2 = Random.id();
var log = [];
var paths = ['/' + rand2, '/' + rand];
var done = false;
FlowRouter.route('/' + rand, {
action: function(_params) {
log.push(1);
}
});
FlowRouter.route('/' + rand2, {
action: function(_params) {
log.push(2);
}
});
FlowRouter.triggers.enter([function(context) {
if(done) return;
test.equal(context.path, paths.pop());
log.push(0);
}]);
FlowRouter.go('/' + rand);
setTimeout(function() {
FlowRouter.go('/' + rand2);
setTimeout(function() {
test.equal(log, [0, 1, 0, 2]);
done = true;
setTimeout(next, 100);
}, 100);
}, 100);
});
Tinytest.addAsync('Client - Triggers - global enter triggers with "only"', function (test, next) {
var rand = Random.id(), rand2 = Random.id();
var log = [];
var done = false;
FlowRouter.route('/' + rand, {
action: function(_params) {
log.push(1);
}
});
FlowRouter.route('/' + rand2, {
name: 'foo',
action: function(_params) {
log.push(2);
}
});
FlowRouter.triggers.enter([function(context) {
if(done) return;
test.equal(context.path, '/' + rand2);
log.push(8);
}], {only: ['foo']});
FlowRouter.go('/' + rand);
setTimeout(function() {
FlowRouter.go('/' + rand2);
setTimeout(function() {
test.equal(log, [1, 8, 2]);
done = true;
setTimeout(next, 100);
}, 100);
}, 100);
});
Tinytest.addAsync('Client - Triggers - global enter triggers with "except"', function (test, next) {
var rand = Random.id(), rand2 = Random.id();
var log = [];
var done = false;
FlowRouter.route('/' + rand, {
action: function(_params) {
log.push(1);
}
});
FlowRouter.route('/' + rand2, {
name: 'foo',
action: function(_params) {
log.push(2);
}
});
FlowRouter.triggers.enter([function(context) {
if(done) return;
test.equal(context.path, '/' + rand);
log.push(8);
}], {except: ['foo']});
FlowRouter.go('/' + rand);
setTimeout(function() {
FlowRouter.go('/' + rand2);
setTimeout(function() {
test.equal(log, [8, 1, 2]);
done = true;
setTimeout(next, 100);
}, 100);
}, 100);
});
Tinytest.addAsync('Client - Triggers - global exit triggers', function (test, next) {
var rand = Random.id(), rand2 = Random.id();
var log = [];
var done =false;
FlowRouter.route('/' + rand, {
action: function(_params) {
log.push(1);
}
});
FlowRouter.route('/' + rand2, {
action: function(_params) {
log.push(2);
}
});
FlowRouter.go('/' + rand);
FlowRouter.triggers.exit([function(context) {
if(done) return;
test.equal(context.path, '/' + rand);
log.push(0);
}]);
setTimeout(function() {
FlowRouter.go('/' + rand2);
setTimeout(function() {
test.equal(log, [1, 0, 2]);
done = true;
setTimeout(next, 100);
}, 100);
}, 100);
});
Tinytest.addAsync('Client - Triggers - global exit triggers with "only"', function (test, next) {
var rand = Random.id(), rand2 = Random.id();
var log = [];
var done = false;
FlowRouter.route('/' + rand, {
action: function(_params) {
log.push(1);
}
});
FlowRouter.route('/' + rand2, {
name: 'foo',
action: function(_params) {
log.push(2);
}
});
FlowRouter.triggers.exit([function(context) {
if(done) return;
test.equal(context.path, '/' + rand2);
log.push(8);
}], {only: ['foo']});
FlowRouter.go('/' + rand);
setTimeout(function() {
FlowRouter.go('/' + rand2);
setTimeout(function() {
FlowRouter.go('/' + rand);
setTimeout(function() {
test.equal(log, [1, 2, 8, 1]);
done = true;
setTimeout(next, 100);
}, 100);
}, 100);
}, 100);
});
Tinytest.addAsync('Client - Triggers - global exit triggers with "except"', function (test, next) {
var rand = Random.id(), rand2 = Random.id();
var log = [];
var done = false;
FlowRouter.route('/' + rand, {
action: function(_params) {
log.push(1);
}
});
FlowRouter.route('/' + rand2, {
name: 'foo',
action: function(_params) {
log.push(2);
}
});
FlowRouter.go('/' + rand);
FlowRouter.triggers.exit([function(context) {
if(done) return;
test.equal(context.path, '/' + rand);
log.push(9);
}], {except: ['foo']});
setTimeout(function() {
FlowRouter.go('/' + rand2);
setTimeout(function() {
FlowRouter.go('/' + rand);
setTimeout(function() {
test.equal(log, [1, 9, 2, 1]);
done = true;
setTimeout(next, 100);
}, 100);
}, 100);
}, 100);
});
Tinytest.addAsync('Client - Triggers - route enter triggers', function (test, next) {
var rand = Random.id();
var log = [];
var triggerFn = function (context) {
test.equal(context.path, '/' + rand);
log.push(5);
};
FlowRouter.route('/' + rand, {
triggersEnter: [triggerFn],
action: function(_params) {
log.push(1);
}
});
FlowRouter.go('/' + rand);
setTimeout(function() {
test.equal(log, [5, 1]);
setTimeout(next, 100);
}, 100);
});
Tinytest.addAsync('Client - Triggers - router exit triggers', function (test, next) {
var rand = Random.id();
var log = [];
var triggerFn = function (context) {
test.equal(context.path, '/' + rand);
log.push(6);
};
FlowRouter.route('/' + rand, {
triggersExit: [triggerFn],
action: function(_params) {
log.push(1);
}
});
FlowRouter.go('/' + rand);
setTimeout(function() {
FlowRouter.go('/' + Random.id());
setTimeout(function() {
test.equal(log, [1, 6]);
setTimeout(next, 100);
}, 100);
}, 100);
});
Tinytest.addAsync('Client - Triggers - group enter triggers', function (test, next) {
var rand = Random.id(), rand2 = Random.id();
var log = [];
var paths = ['/' + rand2, '/' + rand];
var triggerFn = function (context) {
test.equal(context.path, paths.pop());
log.push(3);
};
var group = FlowRouter.group({
triggersEnter: [triggerFn]
});
group.route('/' + rand, {
action: function(_params) {
log.push(1);
}
});
group.route('/' + rand2, {
action: function(_params) {
log.push(2);
}
});
FlowRouter.go('/' + rand);
setTimeout(function() {
FlowRouter.go('/' + rand2);
setTimeout(function() {
test.equal(log, [3, 1, 3, 2]);
setTimeout(next, 100);
}, 100);
}, 100);
});
Tinytest.addAsync('Client - Triggers - group exit triggers', function (test, next) {
var rand = Random.id(), rand2 = Random.id();
var log = [];
var triggerFn = function (context) {
log.push(4);
};
var group = FlowRouter.group({
triggersExit: [triggerFn]
});
group.route('/' + rand, {
action: function(_params) {
log.push(1);
}
});
group.route('/' + rand2, {
action: function(_params) {
log.push(2);
}
});
FlowRouter.go('/' + rand);
setTimeout(function() {
FlowRouter.go('/' + rand2);
setTimeout(function() {
test.equal(log, [1, 4, 2]);
setTimeout(next, 100);
}, 100);
}, 100);
});
Tinytest.addAsync('Client - Triggers - redirect from enter', function(test, next) {
var rand = Random.id(), rand2 = Random.id();
var log = [];
FlowRouter.route('/' + rand, {
triggersEnter: [function(context, redirect) {
redirect("/" + rand2);
}, function() {
throw new Error("should not execute this trigger");
}],
action: function(_params) {
log.push(1);
},
name: rand
});
FlowRouter.route('/' + rand2, {
action: function(_params) {
log.push(2);
},
name: rand2
});
FlowRouter.go('/');
FlowRouter.go('/' + rand);
setTimeout(function() {
test.equal(log, [2]);
next();
}, 300);
});
Tinytest.addAsync('Client - Triggers - redirect by routeName', function(test, next) {
var rand = Random.id(), rand2 = Random.id();
var log = [];
FlowRouter.route('/' + rand, {
name: rand,
triggersEnter: [function(context, redirect) {
redirect(rand2, null, {aa: "bb"});
}, function() {
throw new Error("should not execute this trigger");
}],
action: function(_params) {
log.push(1);
},
name: rand
});
FlowRouter.route('/' + rand2, {
name: rand2,
action: function(_params, queryParams) {
log.push(2);
test.equal(queryParams, {aa: "bb"});
},
name: rand2
});
FlowRouter.go('/');
FlowRouter.go('/' + rand);
setTimeout(function() {
test.equal(log, [2]);
next();
}, 300);
});
Tinytest.addAsync('Client - Triggers - redirect from exit', function(test, next) {
var rand = Random.id(), rand2 = Random.id(), rand3 = Random.id();
var log = [];
FlowRouter.route('/' + rand, {
action: function() {
log.push(1);
},
triggersExit: [
function(context, redirect) {
redirect('/' + rand3);
},
function() {
throw new Error("should not call this trigger");
}
]
});
FlowRouter.route('/' + rand2, {
action: function() {
log.push(2);
}
});
FlowRouter.route('/' + rand3, {
action: function() {
log.push(3);
}
});
FlowRouter.go('/' + rand);
setTimeout(function() {
FlowRouter.go('/' + rand2);
setTimeout(function() {
test.equal(log, [1, 3]);
next();
}, 100);
}, 100);
});
Tinytest.addAsync('Client - Triggers - redirect to external URL fails', function(test, next) {
var rand = Random.id(), rand2 = Random.id();
var log = [];
// testing "http://" URLs
FlowRouter.route('/' + rand, {
triggersEnter: [function(context, redirect) {
test.throws(function() {
redirect("http://example.com/")
}, "Redirects to URLs outside of the app are not supported")
}],
action: function(_params) {
log.push(1);
},
name: rand
});
// testing "https://" URLs
FlowRouter.route('/' + rand2, {
triggersEnter: [function(context, redirect) {
test.throws(function() {
redirect("https://example.com/")
})
}],
action: function(_params) {
log.push(2);
},
name: rand2
});
FlowRouter.go('/');
FlowRouter.go('/' + rand);
FlowRouter.go('/' + rand2);
setTimeout(function() {
test.equal(log, []);
next();
}, 300);
});
Tinytest.addAsync('Client - Triggers - stop callback from enter', function(test, next) {
var rand = Random.id();
var log = [];
FlowRouter.route('/' + rand, {
triggersEnter: [function(context, redirect, stop) {
log.push(10);
stop();
}, function() {
throw new Error("should not execute this trigger");
}],
action: function(_params) {
throw new Error("should not execute the action");
}
});
FlowRouter.go('/');
FlowRouter.go('/' + rand);
setTimeout(function() {
test.equal(log, [10]);
next();
}, 100);
});
Tinytest.addAsync(
'Client - Triggers - invalidate inside an autorun',
function(test, next) {
var rand = Random.id(), rand2 = Random.id();
var log = [];
var paths = ['/' + rand2, '/' + rand];
var done = false;
FlowRouter.route('/' + rand, {
action: function(_params) {
log.push(1);
}
});
FlowRouter.route('/' + rand2, {
action: function(_params) {
log.push(2);
}
});
FlowRouter.triggers.enter([function(context) {
if(done) return;
test.equal(context.path, paths.pop());
log.push(0);
}]);
Tracker.autorun(function(c) {
FlowRouter.go('/' + rand);
});
setTimeout(function() {
FlowRouter.go('/' + rand2);
setTimeout(function() {
test.equal(log, [0, 1, 0, 2]);
done = true;
setTimeout(next, 100);
}, 100);
}, 100);
});
@@ -1,297 +0,0 @@
Tinytest.addAsync(
'Triggers - runTriggers - run all and after',
function(test, done) {
var store = [];
var triggers = MakeTriggers(2, store);
Triggers.runTriggers(triggers, null, null, function() {
test.equal(store, [0, 1]);
done();
});
});
Tinytest.addAsync(
'Triggers - runTriggers - redirect with url',
function(test, done) {
var store = [];
var url = "http://google.com";
var triggers = MakeTriggers(2, store);
triggers.splice(1, 0, function(context, redirect) {
redirect(url);
});
Triggers.runTriggers(triggers, null, function(u) {
test.equal(store, [0]);
test.equal(u, url);
done();
}, null);
});
Tinytest.addAsync(
'Triggers - runTriggers - redirect without url',
function(test, done) {
var store = [];
var url = "http://google.com";
var triggers = MakeTriggers(2, store);
triggers.splice(1, 0, function(context, redirect) {
try {
redirect();
} catch(ex) {
test.isTrue(/requires an URL/.test(ex.message));
test.equal(store, [0]);
done();
}
});
Triggers.runTriggers(triggers, null, null, null);
});
Tinytest.addAsync(
'Triggers - runTriggers - redirect in a different event loop',
function(test, done) {
var store = [];
var url = "http://google.com";
var triggers = MakeTriggers(2, store);
var doneCalled = false;
triggers.splice(1, 0, function(context, redirect) {
setTimeout(function() {
try {
redirect(url);
} catch(ex) {
test.isTrue(/sync/.test(ex.message));
test.equal(store, [0, 1]);
test.isTrue(doneCalled);
done();
}
}, 0);
});
Triggers.runTriggers(triggers, null, null, function() {
doneCalled = true;
});
});
Tinytest.addAsync(
'Triggers - runTriggers - redirect called multiple times',
function(test, done) {
var store = [];
var url = "http://google.com";
var triggers = MakeTriggers(2, store);
var redirectCalled = false;
triggers.splice(1, 0, function(context, redirect) {
redirect(url);
try {
redirect(url);
} catch(ex) {
test.isTrue(/already redirected/.test(ex.message));
test.equal(store, [0]);
test.isTrue(redirectCalled);
done();
}
});
Triggers.runTriggers(triggers, null, function() {
redirectCalled = true;
}, null);
});
Tinytest.addAsync(
'Triggers - runTriggers - stop callback',
function(test, done) {
var store = [];
var triggers = MakeTriggers(2, store);
triggers.splice(1, 0, function(context, redirect, stop) {
stop();
});
Triggers.runTriggers(triggers, null, null, function() {
store.push(2);
});
test.equal(store, [0]);
done();
});
Tinytest.addAsync(
'Triggers - runTriggers - get context',
function(test, done) {
var context = {};
var trigger = function(c) {
test.equal(c, context);
done();
};
Triggers.runTriggers([trigger], context, function() {}, function() {});
});
Tinytest.addAsync(
'Triggers - createRouteBoundTriggers - matching trigger',
function(test, done) {
var context = {route: {name: "abc"}};
var redirect = function() {};
var trigger = function(c, r) {
test.equal(c, context);
test.equal(r, redirect);
done();
};
var triggers = Triggers.createRouteBoundTriggers([trigger], ["abc"]);
triggers[0](context, redirect);
});
Tinytest.addAsync(
'Triggers - createRouteBoundTriggers - multiple matching triggers',
function(test, done) {
var context = {route: {name: "abc"}};
var redirect = function() {};
var doneCount = 0;
var trigger = function(c, r) {
test.equal(c, context);
test.equal(r, redirect);
doneCount++;
};
var triggers = Triggers.createRouteBoundTriggers([trigger, trigger], ["abc"]);
triggers[0](context, redirect);
triggers[1](context, redirect);
test.equal(doneCount, 2);
done();
});
Tinytest.addAsync(
'Triggers - createRouteBoundTriggers - no matching trigger',
function(test, done) {
var context = {route: {name: "some-other-route"}};
var redirect = function() {};
var doneCount = 0;
var trigger = function(c, r) {
test.equal(c, context);
test.equal(r, redirect);
doneCount++;
};
var triggers = Triggers.createRouteBoundTriggers([trigger], ["abc"]);
triggers[0](context, redirect);
test.equal(doneCount, 0);
done();
});
Tinytest.addAsync(
'Triggers - createRouteBoundTriggers - negate logic',
function(test, done) {
var context = {route: {name: "some-other-route"}};
var redirect = function() {};
var doneCount = 0;
var trigger = function(c, r) {
test.equal(c, context);
test.equal(r, redirect);
doneCount++;
};
var triggers = Triggers.createRouteBoundTriggers([trigger], ["abc"], true);
triggers[0](context, redirect);
test.equal(doneCount, 1);
done();
});
Tinytest.addAsync(
'Triggers - applyFilters - no filters',
function(test, done) {
var original = [];
test.equal(Triggers.applyFilters(original), original);
done();
});
Tinytest.addAsync(
'Triggers - applyFilters - single trigger to array',
function(test, done) {
var original = function() {};
test.equal(Triggers.applyFilters(original)[0], original);
done();
});
Tinytest.addAsync(
'Triggers - applyFilters - only and except both',
function(test, done) {
var original = [];
try {
Triggers.applyFilters(original, {only: [], except: []});
} catch(ex) {
test.isTrue(/only and except/.test(ex.message));
done();
}
});
Tinytest.addAsync(
'Triggers - applyFilters - only is not an array',
function(test, done) {
var original = [];
try {
Triggers.applyFilters(original, {only: "name"});
} catch(ex) {
test.isTrue(/to be an array/.test(ex.message));
done();
}
});
Tinytest.addAsync(
'Triggers - applyFilters - except is not an array',
function(test, done) {
var original = [];
try {
Triggers.applyFilters(original, {except: "name"});
} catch(ex) {
test.isTrue(/to be an array/.test(ex.message));
done();
}
});
Tinytest.addAsync(
'Triggers - applyFilters - unsupported filter',
function(test, done) {
var original = [];
try {
Triggers.applyFilters(original, {wowFilter: []});
} catch(ex) {
test.isTrue(/not supported/.test(ex.message));
done();
}
});
Tinytest.addAsync(
'Triggers - applyFilters - just only filter',
function(test, done) {
var bounded = Triggers.applyFilters(done, {only: ["abc"]});
bounded[0]({route: {name: "abc"}});
});
Tinytest.addAsync(
'Triggers - applyFilters - just except filter',
function(test, done) {
var bounded = Triggers.applyFilters(done, {except: ["abc"]});
bounded[0]({route: {name: "some-other"}});
});
function MakeTriggers(count, store) {
var triggers = [];
function addTrigger(no) {
triggers.push(function() {
store.push(no);
});
}
for(var lc=0; lc<count; lc++) {
addTrigger(lc);
}
return triggers;
}
@@ -1,48 +0,0 @@
FastRenderColl = new Mongo.Collection('fast-render-coll');
FlowRouter.route('/the-fast-render-route', {
subscriptions: function() {
this.register('data', Meteor.subscribe('fast-render-data'));
}
});
FlowRouter.route('/the-fast-render-route-params/:id', {
subscriptions: function(params, queryParams) {
this.register('data', Meteor.subscribe('fast-render-data-params', params, queryParams));
}
});
FlowRouter.route('/no-fast-render', {
subscriptions: function() {
if(Meteor.isClient) {
this.register('data', Meteor.subscribe('fast-render-data'));
}
}
});
var frGroup = FlowRouter.group({
prefix: "/fr"
});
frGroup.route("/have-fr", {
subscriptions: function() {
this.register('data', Meteor.subscribe('fast-render-data'));
}
});
if(Meteor.isServer) {
if(!FastRenderColl.findOne()) {
FastRenderColl.insert({_id: "one", aa: 10});
FastRenderColl.insert({_id: "two", aa: 20});
}
Meteor.publish('fast-render-data', function() {
return FastRenderColl.find({}, {sort: {aa: -1}});
});
Meteor.publish('fast-render-data-params', function(params, queryParams) {
var fields = {params: params, queryParams: queryParams};
this.added('fast-render-coll', 'one', fields);
this.ready();
});
}
@@ -1,16 +0,0 @@
Tinytest.add('Common - Group - expose group options', function (test) {
var pathDef = "/" + Random.id();
var name = Random.id();
var data = {aa: 10};
var layout = 'blah';
var group = FlowRouter.group({
name: name,
prefix: '/admin',
layout: layout,
someData: data
});
test.equal(group.options.someData, data);
test.equal(group.options.layout, layout);
});
@@ -1,15 +0,0 @@
Router = FlowRouter.Router;
Tinytest.addAsync('Common - Route - expose route options', function (test, next) {
var pathDef = "/" + Random.id();
var name = Random.id();
var data = {aa: 10};
FlowRouter.route(pathDef, {
name: name,
someData: data
});
test.equal(FlowRouter._routesMap[name].options.someData, data);
next();
});
@@ -1,30 +0,0 @@
Router = FlowRouter.Router;
Tinytest.addAsync('Common - Addons - onRouteRegister basic usage', function (test, done) {
var name = Random.id();
var customField = Random.id();
var pathDef = '/' + name;
FlowRouter.onRouteRegister(function(route) {
test.equal(route, {
pathDef: pathDef,
// Route.path is deprecated and will be removed in 3.0
path: pathDef,
name: name,
options: {customField: customField}
});
FlowRouter._onRouteCallbacks = [];
done();
});
FlowRouter.route(pathDef, {
name: name,
action: function() {},
subscriptions: function() {},
triggersEnter: function() {},
triggersExit: function() {},
customField: customField
});
});
@@ -1,135 +0,0 @@
Router = FlowRouter.Router;
Tinytest.addAsync('Common - Router - validate path definition', function (test, next) {
// path must start with '/'
try {
FlowRouter.route(Random.id());
} catch(ex) {
next();
}
});
Tinytest.add('Common - Router - path - generic', function (test) {
var pathDef = "/blog/:blogId/some/:name";
var fields = {
blogId: "1001",
name: "superb"
};
var expectedPath = "/blog/1001/some/superb";
var path = FlowRouter.path(pathDef, fields);
test.equal(path, expectedPath);
});
Tinytest.add('Common - Router - path - queryParams', function (test) {
var pathDef = "/blog/:blogId/some/:name";
var fields = {
blogId: "1001",
name: "superb"
};
var queryParams = {
aa: "100",
bb: "200"
};
var expectedPath = "/blog/1001/some/superb?aa=100&bb=200";
var path = FlowRouter.path(pathDef, fields, queryParams);
test.equal(path, expectedPath);
});
Tinytest.add('Common - Router - path - just queryParams', function (test) {
var pathDef = "/blog/abc";
var queryParams = {
aa: "100",
bb: "200"
};
var expectedPath = "/blog/abc?aa=100&bb=200";
var path = FlowRouter.path(pathDef, null, queryParams);
test.equal(path, expectedPath);
});
Tinytest.add('Common - Router - path - missing fields', function (test) {
var pathDef = "/blog/:blogId/some/:name";
var fields = {
blogId: "1001",
};
var expectedPath = "/blog/1001/some";
var path = FlowRouter.path(pathDef, fields);
test.equal(path, expectedPath);
});
Tinytest.add('Common - Router - path - no fields', function (test) {
var pathDef = "/blog/blogId/some/name";
var path = FlowRouter.path(pathDef);
test.equal(path, pathDef);
});
Tinytest.add('Common - Router - path - complex route', function (test) {
var pathDef = "/blog/:blogId/some/:name(\\d*)+";
var fields = {
blogId: "1001",
name: 20
};
var expectedPath = "/blog/1001/some/20";
var path = FlowRouter.path(pathDef, fields);
test.equal(path, expectedPath);
});
Tinytest.add('Common - Router - path - optional last param missing', function (test) {
var pathDef = "/blog/:blogId/some/:name?";
var fields = {
blogId: "1001"
};
var expectedPath = "/blog/1001/some";
var path = FlowRouter.path(pathDef, fields);
test.equal(path, expectedPath);
});
Tinytest.add('Common - Router - path - optional last param exists', function (test) {
var pathDef = "/blog/:blogId/some/:name?";
var fields = {
blogId: "1001",
name: 20
};
var expectedPath = "/blog/1001/some/20";
var path = FlowRouter.path(pathDef, fields);
test.equal(path, expectedPath);
});
Tinytest.add('Common - Router - path - remove trailing slashes', function (test) {
var pathDef = "/blog/:blogId/some/:name//";
var fields = {
blogId: "1001",
name: "superb"
};
var expectedPath = "/blog/1001/some/superb";
var path = FlowRouter.path(pathDef, fields);
test.equal(path, expectedPath);
});
Tinytest.add('Common - Router - path - handle multiple slashes', function (test) {
var pathDef = "/blog///some/hi////";
var expectedPath = "/blog/some/hi";
var path = FlowRouter.path(pathDef);
test.equal(path, expectedPath);
});
Tinytest.add('Common - Router - path - keep the root slash', function (test) {
var pathDef = "/";
var fields = {};
var expectedPath = "/";
var path = FlowRouter.path(pathDef, fields);
test.equal(path, expectedPath);
});
Loaded 100 of 112 files, more files were not shown because too many files have changed in this diff. Show more