Commit Graph

63 Commits (5885cb5b098905af09a71bdef0bd01c163e8fd53)

Author SHA1 Message Date
KITAITI Makoto ac7a05b09a
Make blocklist deletion possible (#750) 4 years ago
Ana Gelez 5f8d6b8e0e Rust 2018! (#726) 4 years ago
fdb-hiroshima 3663bffe5c Update compiler (#725)
* update compiler to recent nightly

* cargo fmt

* fix clippy

but ructe code is still complaining

* update circleci and rocket_csrf

* fix last clippy problems

* cargo fmt

* fix build issue

was caused be improper handling of recursive template (comment) by old ructe, which is fixed on newer version
4 years ago
Violet Myers f3c05dae62 Email blocklisting (#718)
* Interface complete for the email blacklisting

* Everything seems to work

* Neutralize language

* fix clippy warnings

* Add missing spaces

* Added matching test

* Correct primary key datatype for postgresql

* Address review comments

* Add placeholder when empty. Fix missing 'i'
4 years ago
fdb-hiroshima 006b44f580 Add support for generic timeline (#525)
* 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
5 years ago
Ana Gelez 309e1200d0 Make a distinction between moderators and admins (#619)
* 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
5 years ago
Ana Gelez 8ab690001d Replace the input! macro with an Input builder (#646)
* 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
5 years ago
Ana Gelez a6c84daa1a
Theming (#624)
* 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
5 years ago
Baptiste Gelez ad3a8b92d1
Theme update (#553)
* 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
5 years ago
Baptiste Gelez b572a1bd74
Fix #504 (#532)
- Add the `spaced` class to some article cards, to make them wider even on desktop
- Fix the CSS to always have a small margin for cards on mobile
5 years ago
Marek Ľach 38701c8a40 Corrected grammar pointed out by translators (#514)
The user 'UniqueActive' pointed these issues out on Crowdin.

Thank you!
5 years ago
Marek Ľach 723d2c4600 Grammar corrections followup to #510 (#512)
A very small commit, but let's do all the string corrections while I am already at it :-)

Wraps up #510
5 years ago
Hugh a674df3a77 Some corrections to English UI text (#506)
* 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
5 years ago
Jean Lucas e93b8f4444 Change "Welcome on" to "Welcome to" (#501)
"Welcome on [noun]" is not grammatically correct as an introduction in
English. Let's fix that.
5 years ago
Igor Galić 732f514da7 Refactor with the help of Clippy (#462)
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.
5 years ago
Baptiste Gelez fe6e69d7c4
Add a fqn field to blogs and users (#457)
Fixes #319
5 years ago
Baptiste Gelez e28371bbe4
Add a page listing people someone follows (#444)
Nothing exceptional, the layout is the same as the followers page.

Fixes #325
5 years ago
Baptiste Gelez 7eef4643c8
Update rocket_i18n and add gettext_macros (#431)
Internationalization now uses proc-macros that generate the .pot file
automatically.
5 years ago
Marek Ľach 3128e6a3b9 Tags grammar and admin string corrections (#397) 6 years ago
Marek Ľach 07ecbde93c Small changes to text strings (#379) 6 years ago
Baptiste Gelez 38302203f4
Count items in database as much as possible (#344)
* 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
6 years ago
Baptiste Gelez b0089e59b7
Remove useless pagination routes (#351)
Rocket 0.4 let us have routes with optional query parameter
6 years ago
fdb-hiroshima e9f2f769be Add microformat tags (#341)
Close #229 
Adding `<div>` might have broken the layout in some places. I've tried to fix it, tell me if I missed it somewhere
6 years ago
Trinity Pointard b4e4b497ee Works on template
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
6 years ago
Baptiste Gelez 70af57c6e1
Use Ructe (#327)
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
6 years ago
Andrew Morgan 7eebfe991b Welcome on -> Welcome to 6 years ago
Bat d8ca1d70b7 Fix CSRF issues
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!
6 years ago
Igor Galić fb074e6344
render SafeString thru |safe
thanks again to @fdb-hiroshima for pointing me in the right direction!
6 years ago
Bat d50f989977 Add forgotten message to POT
And translate it in French
6 years ago
Bat 18a892ee61 Update translations
Make sure everything is translatable
6 years ago
Bat fcdd3d4c1a Don't compress avatars
Fixes #210
6 years ago
Bat e9337259f8 Pad avatars in user list 6 years ago
Bat 1f2bd105b6 Implement user ban 6 years ago
Bat f1d5865a16 Instance (un)block endpoint
And hide the block button for the local instance
6 years ago
Bat c1e0b6c306 Add admin interface to manage interface 6 years ago
Bat b66d4f73ce Reorganize the homepage 6 years ago
Bat 30cfd96e24 Add tabs to the different feeds 6 years ago
Bat 79348e06ff Add a dedicated page for the federated feed 6 years ago
Bat 1496598a45 User feed 6 years ago
Bat babb3a81f5 Local timeline 6 years ago
Bat 7734557a99 Add admin's avatar on about page 6 years ago
Bat 092ad5b795 Instance about page
Fixes #39
6 years ago
Bat ed8982b7fd Add a presentation of Plume and of the instance on the homepage
Fixes #132
6 years ago
Bat 0926a1d3b5 Tell that we support Markdown
Fixes #122
6 years ago
Bat 74ec59e77c Add some configuration options for instance admins 6 years ago
Bat 18125ab398 Paginate the homepage 6 years ago
Bat 0e773de9ff Remove old configuration template 6 years ago
Bat a8b47de28b Explicitely escape user data in translations to avoid XSS 6 years ago
Matthieu a9bdf4d9a9 Merge branch 'master' of https://github.com/Plume-org/Plume 6 years ago
Bat ab841f826d Forgot to make a string translatable on the homepage 6 years ago