1866 Commits

Author SHA1 Message Date
a897282400 Added some type checks before assigning to session['blender_id_oauth_token']
There were some sporadic TypeErrors where the session var was set to a
tuple instead of a string; this is a way to figure out where that happens.
2017-10-17 12:16:20 +02:00
cfbb05530a Taken unrelated code out of try-body.
The try-body should only contain code that can actually raise the caught
exception.
2017-10-17 12:14:12 +02:00
72f440f509 Fix AttributeError
Exceptions aren't guaranteed to have a 'message' attribute. It does have
'args', but str(ex) is probably more useful as it's likely to include
the exception type.
2017-10-17 11:32:25 +02:00
9c3667b51f Include HTTP method in bugsnag report 2017-10-17 11:32:25 +02:00
6ffbd52a36 Comments: Simpler login message
No point in having a disabled input, since we're leaving
the page to login anyway
2017-10-15 05:56:43 +02:00
49feaa8281 Don't use hard-coded white background for notifications flyout.
Use $color-background instead
2017-10-15 05:55:12 +02:00
72507d7bb2 Minor style tweaks to comments 2017-10-15 05:52:49 +02:00
3bcf4eaebd Icons
New: pi-social-youtube, pi-social-reddit, pi-moon, pi-off
Replaced: pi-spin, pi-comment, pi-download
Removed: pi-log-in, pi-log-out, pi-circle-notch
2017-10-14 03:15:12 +02:00
d637e322f7 Replace hardcoded colors with variables and more sane colors.
Makes it possible to theme the comments by replacing color variables.
2017-10-14 03:06:08 +02:00
43cb7a5f65 File Upload: Clear notifications before success/error
So we don't end up with both file-upload and success at the same time
when uploading files that go up fast.
2017-10-11 23:08:20 +02:00
7fd7fcc16c Minor style tweaks for responsiveness 2017-10-08 23:41:18 +02:00
e01197a5d5 Comments: minor tweaks to strings 2017-10-07 00:07:24 +02:00
be4ce024f4 Introducing public and private extension_props for users
- public: they will be visible to the world (for example as result of the User.find() query)
- private: visible only to their user
2017-10-06 00:13:22 +02:00
98527c72f4 Support for extra_template_args in node view
This allows for wrapping the view function in another function which will provide additional args. Originally implemented in order to allow Dillo post view to provide the Project object to the view_embed template.
2017-10-05 23:46:24 +02:00
053e681d00 Create MongoDB index on tokens.token_hashed 2017-10-05 19:40:41 +02:00
6d8870ba25 Blog: Check if blog_archive_prev/next exist before showing link
Also minor cleanup of the classes and excessive indenting.
2017-10-05 17:32:55 +02:00
01dab4188c Style tweaks to blog archive 2017-10-05 17:32:55 +02:00
eca5f48d41 Fix project_blog_archive pagination
Was missing the 'page' argument.

Fixed by Dr. Sybren
2017-10-05 17:32:55 +02:00
73b50556be Added blog archive.
May still need some style tweaking.
2017-10-05 17:32:55 +02:00
e724c9c2ad Blog: Simplified looping over blog posts. 2017-10-05 17:32:55 +02:00
f42334453c Deduplicated code for image expansion into the page overlay
It now also supports WEBP links, and is compatible with Google Cloud
Storage (which adds ?blablabla to links).
2017-10-05 17:32:55 +02:00
2603c4f44f Deduplicated blog templates by using macros. 2017-10-05 17:32:55 +02:00
bd93625119 Use super() call instead of copy-pasting the contents of the parent block 2017-10-05 17:32:55 +02:00
8fe6b472e4 Notifications: Fix and documentation
Fixed notification-toggle not working because we were accessing
the selectors before they were available in the DOM.

Now use the ID selector directly, re-use when possible.

Also added comments describing obscure variables.
2017-10-05 15:29:30 +02:00
68c7a88fed Use the nifty new DocumentTitleAPI to update notification count
and page titles when browsing assets.

This removes the need for updateTitle()
2017-10-05 15:29:30 +02:00
f9e10976b8 Added a little DocumentTitleAPI object for easier updating of the title. 2017-10-05 15:29:30 +02:00
f17453ba10 Added 'operations hash_auth_tokens' CLI command. 2017-10-05 13:04:44 +02:00
c57aefd48b Hash authentication tokens before storing in the database. 2017-10-05 12:57:16 +02:00
Pablo Vazquez
389413ab8a Notifications: Define selectors once and re-use
Plus some comments and simplifying the switch/adding of icons
by just adding a css class that controls it.

No functional changes
2017-10-04 00:39:00 +02:00
a2ffb8a342 Minor padding tweaks and color for blog title links 2017-10-03 12:53:41 +02:00
6f0a03ce60 Set page title on edit_embed 2017-10-03 12:52:50 +02:00
Pablo Vazquez
053848607d Don't add padding on bottom of node-details-description mixin 2017-10-03 01:26:41 +02:00
Pablo Vazquez
94a0868ba5 Comments: Style cancel button 2017-10-03 01:26:25 +02:00
Pablo Vazquez
c6d8a4c46f Comments: Send text should be inside a span 2017-10-03 01:26:06 +02:00
58a34d6cdb Typo (one bracket too much) 2017-10-02 19:49:33 +02:00
b0c7997128 Notifications: Don't update titles directly, fire an event instead 2017-10-02 19:49:20 +02:00
1bf2a87726 Use a the updateTitle() function to update page titles 2017-10-02 19:48:37 +02:00
d3cd6a884e Use toastr notifications instead of statusBarSet() 2017-10-02 19:31:52 +02:00
Pablo Vazquez
9870979c54 Comments: Style tweak linked comment
Move "Linked Comment" to the bottom, add padding, no borders.
2017-10-02 01:54:13 +02:00
Pablo Vazquez
bb067f77c3 Fix styling for login/local 2017-10-02 00:41:04 +02:00
Pablo Vazquez
da7be50c61 Comments: Cleanup and convert more IDs to classes when possible
No functional changes.
2017-09-30 23:21:54 +02:00
Pablo Vazquez
e4c5743852 Comments: trigger comments-loaded event on comments load.
Useful when apps want to know or do something with the comments,
like Dillo to parse emojis for example.
2017-09-30 23:18:09 +02:00
e9233ff7c0 Introducing embed_project
By specifying the 'embed_project' argument, the node's Project will be fetched and embedded in the document. This is useful in specific cases, where a project property needs to be accessed when rendering the view_embed template.
2017-09-30 22:13:10 +02:00
2d01cd8761 Simplified posts_view a bit
Removed some redundancy, avoided rendering attachments for posts that'll
never be shown, and made the flow a bit clearer.
2017-09-29 10:45:29 +02:00
45a44d08eb Don't manually construct JSON as strings, just use dicts. The modernity! 2017-09-29 10:45:29 +02:00
ddc52b969e Make it possible for node types to have a 'custom view'
This 'custom view' means that the URL to view the node (as returned by
url_for_node(…)) cannot be loaded via XHR and embedded in the project
viewer, but should rather be used as the actual browser URL instead.

Currently only blogs use this.
2017-09-29 10:45:29 +02:00
8ad2ee8729 Registered 'node finder' for blog nodes. 2017-09-28 17:47:41 +02:00
d160999535 Removed unused import 2017-09-28 17:46:34 +02:00
e4fff8df81 Added missing project_container variable. 2017-09-28 17:43:48 +02:00
923cbe62d1 Gulp: indented package.json with tabs
This is what Atom does automatically, and also what we have in Flamenco
and Attract.
2017-09-28 15:32:06 +02:00