* Begin adding support for timeline
* fix some bugs with parser
* fmt
* add error reporting for parser
* add tests for timeline query parser
* add rejection tests for parse
* begin adding support for lists
also run migration before compiling, so schema.rs is up to date
* add sqlite migration
* end adding lists
still miss tests and query integration
* cargo fmt
* try to add some tests
* Add some constraint to db, and fix list test
and refactor other tests to use begin_transaction
* add more tests for lists
* add support for lists in query executor
* add keywords for including/excluding boosts and likes
* cargo fmt
* add function to list lists used by query
will make it easier to warn users when creating timeline with unknown lists
* add lang support
* add timeline creation error message when using unexisting lists
* Update .po files
* WIP: interface for timelines
* don't use diesel for migrations
not sure how it passed the ci on the other branch
* add some tests for timeline
add an int representing the order of timelines (first one will be on
top, second just under...)
use first() instead of limit(1).get().into_iter().nth(0)
remove migrations from build artifacts as they are now compiled in
* cargo fmt
* remove timeline order
* fix tests
* add tests for timeline creation failure
* cargo fmt
* add tests for timelines
* add test for matching direct lists and keywords
* add test for language filtering
* Add a more complex test for Timeline::matches, and fix TQ::matches for TQ::Or
* Make the main crate compile + FMT
* Use the new timeline system
- Replace the old "feed" system with timelines
- Display all timelines someone can access on their home page (either their personal ones, or instance timelines)
- Remove functions that were used to get user/local/federated feed
- Add new posts to timelines
- Create a default timeline called "My feed" for everyone, and "Local feed"/"Federated feed" with timelines
@fdb-hiroshima I don't know if that's how you pictured it? If you imagined it differently I can of course make changes.
I hope I didn't forgot anything…
* Cargo fmt
* Try to fix the migration
* Fix tests
* Fix the test (for real this time ?)
* Fix the tests ? + fmt
* Use Kind::Like and Kind::Reshare when needed
* Forgot to run cargo fmt once again
* revert translations
* fix reviewed stuff
* reduce code duplication by macros
* cargo fmt
* Make a distinction between moderators and admins
And rework the user list in the moderation interface, to be able to run the same action on many users,
and to have a huge list of actions whithout loosing space.
* Make user's role an enum + make it impossible for a moderator to escalate privileges
With the help of diesel-derive-enum (maybe it could be used in other places too?)
Also, moderators are still able to grant or revoke moderation rights to other people, but maybe only admins should be able to do it?
* Cargo fmt
* copy/pasting is bad
* Remove diesel-derive-enum and use an integer instead
It was not compatible with both Postgres and SQlite, because for one it generated a schema
with the "User_role" type, but for the other it was "Text"…
* Reset translations
* Use an enum to avoid magic numbers + fix the tests
* Reset translations
* Fix down.sql
* Replace the input! macro with an Input builder
* Use a BTreeMap instead of an HashMap
Followinf @fdb-hiroshima's advice
* Rename Input::to_html to Input::html
To make clippy happy
* Wrap error messages in red paragraphs
* Theming
- Custom CSS for blogs
- Custom themes for instance
- New dark theme
- UI to choose your instance theme
- Option to disable blog themes if you prefer to only have the instance theme
- UI to choose a blog theme
* Start to update the theme
- Ligther colors
- No more border radius
- Buttons are now always colored
- Start to redesign the post page (according to the Figma mockups)
* Fix build script: it now recompiles everytime a scss file changed
* Make sure the article illustrations are not too big
* Make articles wider (70 characters)
* Better contrast between gray shades
* Various improvements
* Better mobile style
* New style for the footer
* Improve comment style
* Better responsiveness again
* Limit the size of the article cover
* Last details?
- Improve buttons on the media page
- Improve lists
* Pin the stdweb version that we use
It changed because I removed Cargo.lock to handle a merge conflict
I could have updated cargo web too, but it mean I should have re-built
the CI docker image and it was taking forever.
* Better contrast for links in the header of the article
* Add a basic privacy policy
* Remove "also"
* Fix a few issues
- Don't watch static/css in build.rs
- Another shade of white
- Remove useless margin rule for error messages
* Update some UI strings for more natural English
* Correct message text
* Correct message text
* Update the strings everywhere
Because they are also used as base messages for other languages
We add clippy as our build — also rectifying the missing `plume-cli` build!
In the next step we follow clippy's advise and fix some of the "simple" mistakes in our code, such as style or map usage.
Finally, we refactor some hard bits that need extraction of new types, or refactoring of function call-types, especially those that thread thru macros, and, of course functions with ~15 parameters should probably be rethought.
* Count items in database as much as possible
* Fix the tests
* Remove two useless queries
* Run pragma directive before each sqlite connection
* Pragma for tests too
* Remove debug messages
Use uri! to generate links instead of hardcoded urls
Fix#110
Fix invalid links needing to be POST forms
Translate login message for boost and like directly from template
Put js for search in its own file
All the template are now compiled at compile-time with the `ructe` crate.
I preferred to use it instead of askama because it allows more complex Rust expressions, where askama only supports a small subset of expressions and doesn't allow them everywhere (for instance, `{{ macro!() | filter }}` would result in a parsing error).
The diff is quite huge, but there is normally no changes in functionality.
Fixes#161 and unblocks #110 and #273
GET routes are not protected against CSRF. This commit changes the needed URLs to
POST and replace simple links with forms.
Thanks @fdb-hiroshima for noticing it!