Commit Graph

1107 Commits (8f0fe5aaf948157ebc8cb67b48f6985964f95915)
 

Author SHA1 Message Date
Igor Galić 8c59c822b6 refactor code to use Shrinkwraprs and diesel-derive-newtype (#598)
* 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
5 years ago
Marek Ľach 59023e9602 Prevent comment form submit button distortion on iOS (#592)
Forgot about that one the last time :-)
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
Marek Ľach c67f65e684 Fix occurrences of 'have been' to 'has been' (#578)
* Update comments.rs

* Update medias.rs

* Update posts.rs

* Update user.rs

* Update posts.rs

* Update user.rs
5 years ago
Baptiste Gelez d78b3a05ec
Fix Crowdin upload (#576) 5 years ago
fdb-hiroshima 5579f64dd0
update dependancies (#574)
[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
5 years ago
fdb-hiroshima 773fbfe7c8 cache local instance (#572)
* cache local instance

fix #564

* don't use local instance cache for plm

* use instance cache for plm, but initialize it

* cargo fmt
5 years ago
fdb-hiroshima 5b50f90d2b use openssl instead of sha256sum for build.rs (#568)
* use openssl instead of sha256sum for build.rs

* use a more portable flag for stat
5 years ago
fdb-hiroshima 90f6ef0380
upload artifact of wasm binary (#571)
fix #570
5 years ago
Marek Ľach 33619abdfb Fix certain improper rendering of forms (#560) 5 years ago
fdb-hiroshima c52aac012c
make hashtags work in profile summary (#562)
* make hashtags work in profile summary

fix #541

* cargo fmt
5 years ago
fdb-hiroshima c9070930d2
Improve notification management (#561)
* Don't notify for comment when mentioned

fix #505

* Don't save notification for remote users

fix #472
5 years ago
fdb-hiroshima 918bda14ec
rewrite circleci config (#558)
* 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
5 years ago
fdb-hiroshima 33a0c7dcd3
reduce reqwest timeout to 5s (#557) 5 years ago
Baptiste Gelez 8f1ab3485e
Add some feedback when performing some actions (#552)
* 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
5 years ago
fdb-hiroshima 18ae6e26b3 remove the new index lock tantivy uses (#556) 5 years ago
fdb-hiroshima 49bb8cb0bc
import migrations and don't require diesel_cli for admins (#555)
* 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
5 years ago
Baptiste Gelez ec57f1e687
Remove Canapi (#540)
* Remove Canapi

It added more complexity than it helped.

* Fail if there are many blog, but none was specified

* cargo fmt
5 years ago
Baptiste Gelez 787eb7f399
Federate user deletion (#551)
* Federate user deletion

- When someone deletes their account
- When a local user is banned

Fixes #509

* cargo fmt
5 years ago
Marek Ľach 85aa0883c8 Update follow_remote.rs.html grammar (#548)
* Update follow_remote.rs.html

* Update follow_remote.rs.html
5 years ago
Marek Ľach ff92ac0763 Make comments in styleshhets a bit clearer (#545)
* Update _variables.scss

* Make comments in stylesheets a bit more clear
5 years ago
fdb-hiroshima a20d2df50a
Upload artifacts to pull request deploy environment (#539) 5 years ago
Baptiste Gelez 29e11f552f
Remove r (#535)
I don't know why it was here 🤷‍♀️
5 years ago
Baptiste Gelez 3ad1f6968c
Version bump: 0.3.0 (alpha 2) (#529) 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
fdb-hiroshima 6acb962e72
strip binary before packing (#533)
reduce by 35-40% size of binaries and archive
5 years ago
fdb-hiroshima 6bb4f8514f remove test after running it, and bump cache version (#531)
fix #523
5 years ago
Baptiste Gelez 68dd8602b2
New Crowdin translations (#479)
Enjoy!
5 years ago
fdb-hiroshima 4d4f2ba6ed increase default character limit (#530)
fix #524
5 years ago
fdb-hiroshima 3d82265b85 try to build release plume&plm on ci (#528)
ref Plume-org/docs#27
I should archive the artifacts before uploading
5 years ago
fdb-hiroshima 0d708e1639 Add support for remote interact (#519)
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 ?
5 years ago
Baptiste Gelez 12efe721cc
Big refactoring of the Inbox (#443)
* 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
5 years ago
fdb-hiroshima c19c094e0c
add diverse links and meta to head (#522) 5 years ago
Marek Ľach de296b633f Standard smallest screen is 600px (#520)
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.
5 years ago
Baptiste Gelez d7de09ab81 Fix Atom feed link on user page (#518) 5 years ago
Baptiste Gelez 7645fdbf35
Fix tabs on user page (#516)
The "Articles" tab was always selected.
5 years ago
Baptiste Gelez 1bc2684af1
Run cargo fmt on plume-front (#515)
When `editor-improvements` was merged it was not run, because Travis was still used, but now it makes Circle CI fail on master.
5 years ago
fdb-hiroshima 12c2078c89
Hide cw pictures behind a summary/details (#483)
* Hide cw pictures behind a summary/details
* refactor md_to_html a bit and add cw support
* use random id for cw checkbox
5 years ago
fdb-hiroshima eabe73ddc0
Add tests for plume webserver (#513)
* begin setup front-end test environment with selenium
* run migrations before tests
* use https for tests
5 years ago
Baptiste Gelez 1f7ff62c19
Editor improvements (#486)
- 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
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
fdb-hiroshima 26fc2cde5d
use circleci instead of travis (#511)
Upgrade rust-toolchain
Upgrade Tantivy
Warning: tantivy now use a different file format, search index may need to be deleted and recreated to work as intended
try to run compile twice in a row because sometime oomk is evil
5 years ago
Marek Ľach 2d12524cd1 English source strings corrected (#510)
Requires .po/.pot files to be rebuilt

This resolves #508
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
Valentin Brandl c7ee779f51 Delete notifications when deleting comments (#499)
* Implement find_for_comment for notifications

* Delete notifications when deleting a comment

This should tackle #463

* Apply rustfmt

* Implement `find_for_mention` and remove order by from `find_for_comment`

There is no need to order the notifications

* Delete notifications for mentions

* Fix notifications for comments and mentions
5 years ago
Valentin Brandl f0d6b9d1e8 Fix issue with sqlite migrations for comment_seers (#503) 5 years ago
Baptiste Gelez 21cb0ef437 Always use GMT as a timezone for federation (#502)
To prevent a bug with Mastodon
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
Baptiste Gelez bdfad844d7
Edit blogs, and add blog icons and banners (#460)
Also adds a parameter to `md_to_html` to only render inline elements (so that we don't have titles or images in blog descriptions). And moves the delete button for the blog on the edition page.

I still have to update the SQLite migration once others PRs with migrations will be merged.

Also, there will be a problem when you edit a blog while not owning its banner or icon: when validating they will be reset to their default values… I don't see a good solution to this until we have a better way to handle uploads with Rocket (the same is probably happening for articles btw).

And the icon/banner are not federated yet, I don't know if I should add it to this PR or if it can come after?

![image](https://user-images.githubusercontent.com/16254623/53894510-7d853300-4030-11e9-8a2c-f5c0b0c7f512.png)
![image](https://user-images.githubusercontent.com/16254623/53894539-8b3ab880-4030-11e9-8113-685a27be8d7c.png)

Fixes #453
Fixes #454
5 years ago