* Redirect to the code of conduct in the docs
To centralize it, and because the version in the docs is more up-to-date
* Remove obsolete issue template
* Rework README
* add enum containing all successful route returns
This enum derives `Responder`, so it can be used as route result.
We also implement `From`, so it can be converted
* disable clippy warning about this enum
There's no use trying to chase this warning.
The next warning will be about `Redirect`, which itself is 360 byte,
according to @fdb-hiroshima (thanks for the research!)
So, if anything, we can try to get Rocket to work on that!
* refactor routes/posts to only use one level of Result
* admin settings error is not an ErrorPage, so dont use Result<>
* refactor: use early return to remove indent of main logic
This diff is absolutely atrocious.
but the resulting readability is worth it
* refactor routes/post for early returns & RespondOrRedirect
* refactor routes/session for early returns & use RespondOrRedirect
* refactor routes/user -- add another field to enum
* refactor routes/blogs for early returns & RespondOrRedirect
* refactor routes/blogs for early returns & RespondOrRedirect
This is a final refactor of `pub fn update()` for readability.
We're removing at least one indentation level.
* add shrinkwraprs and implement Id thru it
This also means we can automatically convert Id to String without using
.into()!
* cleanup with the help of clippy!
* cleanup with the help of cargo fmt!
* remove extra block
* Shrinkwrap Page, ContentLen and RemoteForm
* translations
* 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
[Security] Bump ammonia from 2.0.0 to 2.1.1
Bump bcrypt from 0.2.2 to 0.4.0
Bump clap from 2.32.0 to 2.33.0
Bump colored from 1.7.0 to 1.8.0
Bump ctrlc from 3.1.1 to 3.1.2
Bump diesel from 1.4.1 to 1.4.2
Bump dotenv from 0.13.0 to 0.14.0
Bump hyper from 0.12.25 to 0.12.28
Bump openssl from 0.10.19 to 0.10.22
Bump proc-macro2 from 0.4.27 to 0.4.30
Bump reqwest from 0.9.11 to 0.9.16
Bump rpassword from 2.1.0 to 3.0.2
Bump serde_derive from 1.0.80 to 1.0.82
Bump serde_derive from 1.0.89 to 1.0.91
Bump serde from 1.0.89 to 1.0.91
Bump serde_qs from 0.4.5 to 0.4.6
Bump stdweb from 0.4.14 to 0.4.17
Bump syn from 0.11.11 to 0.15.27
Bump whatlang from 0.7.0 to 0.7.1
* rewrite circleci config with better syntax
and try using grcov for coverage
* attempt to use less memory and to rerun if memory lack
* actually remove use of kcov
* use the right var
* try looping
* run test serialized
* use feature where we should and make macro path independant
* cargo fmt and remove some '"'
* add zip to dependancies
* reduce number of used thread after first failure
* push translations to crowdin on commit to master
* don't cache result of coverage
* Add a way to display flash messages
* Make the flash messages look nice
* Add actual feedback messages
* cargo fmt
* Move flash messages to PlumeRocket
And add trait to convert PlumeRocket to BaseContext
* Remove useless lifetime
* import migrations via macro
* panic on database not to the latest migration
* add subcommand to plm
* create migration that run tantivy index creation
* remove diesel_cli from places it was
* use our migration system for tests
* create table __diesel_schema_migrations if needed
Add support for remote interaction ([this thing](https://eldritch.cafe/users/Barmaid/remote_follow) in mastodon)
- [x] create the endpoint dispatching remote interactions to local pages
- [x] add this endpoint to web-finger
- [x] propose remote interaction when following and not connected
- [x] propose remote interaction when liking/sharing and not connected
- [x] propose remote interaction when commenting and not connected
- [x] fetch posts/comments we don't know but remote interaction was requested for ?
* Big refactoring of the Inbox
We now have a type that routes an activity through the registered handlers
until one of them matches.
Each Actor/Activity/Object combination is represented by an implementation of AsObject
These combinations are then registered on the Inbox type, which will try to deserialize
the incoming activity in the requested types.
Advantages:
- nicer syntax: the final API is clearer and more idiomatic
- more generic: only two traits (`AsActor` and `AsObject`) instead of one for each kind of activity
- it is easier to see which activities we handle and which one we don't
* Small fixes
- Avoid panics
- Don't search for AP ID infinitely
- Code style issues
* Fix tests
* Introduce a new trait: FromId
It should be implemented for any AP object.
It allows to look for an object in database using its AP ID, or to dereference it if it was not present in database
Also moves the inbox code to plume-models to test it (and write a basic test for each activity type we handle)
* Use if let instead of match
* Don't require PlumeRocket::intl for tests
* Return early and remove a forgotten dbg!
* Add more tests to try to understand where the issues come from
* Also add a test for comment federation
* Don't check creation_date is the same for blogs
* Make user and blog federation more tolerant to errors/missing fields
* Make clippy happy
* Use the correct Accept header when dereferencing
* Fix follow approval with Mastodon
* Add spaces to characters that should not be in usernames
And validate blog names too
* Smarter dereferencing: only do it once for each actor/object
* Forgot some files
* Cargo fmt
* Delete plume_test
* Delete plume_tests
* Update get_id docs + Remove useless : Sized
* Appease cargo fmt
* Remove dbg! + Use as_ref instead of clone when possible + Use and_then instead of map when possible
* Remove .po~
* send unfollow to local instance
* read cover from update activity
* Make sure "cc" and "to" are never empty
and fix a typo in a constant name
* Cargo fmt
For devices that have a screen size so small they have to use the `max-width` property in CSS, the standard of a screen-size that has to be used here is `phones 600px and smaller`, not `900px`, which would have to use the `min-width` property instead, that would mean a widescreen size, because `min-width` means `a screen size of 900px, or more`, including desktops.
- Make it possible to insert new paragraphs in the article body
- Make it impossible to copy formatted HTML (to make media insertion from markdown code work correctly)
TODO:
- [x] make it possible to escape draft mode
- [x] display errors from the server
- [x] button to go back to the "normal" editor
- [x] Avoid publishing placeholders