Commit Graph

1107 Commits (8f0fe5aaf948157ebc8cb67b48f6985964f95915)
 

Author SHA1 Message Date
Violet Myers 458baf5f78 Syntax highlighting (#691)
* Syntax highlighting mostly... Exists.

* Add dependency to dockerfile

* Handle non-existent languages better

* Make the default a bit nicer

* Improve highlighting. Clean up function

* Add dark theme, add the comment scope to the allowed classes

* update build env

* Address review comments

* Use find_syntax_by_token which produces the desired behavior

* Change flat_map into flatten
(commit cargo.lock)
4 years ago
Ana Gelez 597778fd2f release Alpha 4 (#709)
* Update version numbers

* Update translations again

* Translations?

* This time translations should be here
4 years ago
Violet Myers e53574970c Fix issue #705 (#708)
* Fix issue #705

* Add canonical links to blogs too
4 years ago
Marek Ľach 9ede06e7a3 Make the comment syntax consistent across all CSS (#707)
* Update _article.scss

* Update _dark_variables.scss

* Update _forms.scss

* Update _global.scss

* Update _header.scss

* Update _variables.scss
4 years ago
fdb-hiroshima a9441a8804 Fix lettre (#706)
* Use lettre from crates.io instead of git

* fix previous migration

they were failing on some versions of sqlite and postgres
4 years ago
fdb-hiroshima 6c8944315a remove use of rust in migration (#704)
* remove use of rust in migration

rewrite use_timelines_for_feed in pure sql
delete tantivy related migration. It will require reintroducing tantivy
initialisation in docs

fix #702

* Fill timeline from migrations

should fix #692 , but probably require some testing
4 years ago
Wilfried OLLIVIER 3bd2305115 Fix #637 : Markdown footnotes (#700)
* Ensure footnotes classes generated are not filtered

pulldown-cmark add somes classes when footnotes html is generated. This commit ensure they are not filtered by html sanitizer

* Add some footnotes styling
4 years ago
Ana Gelez 7f296b2ef2
Use the "classic" editor by default (#697) 5 years ago
Marek Ľach c66ef5f85d Fix the navigation menu not opening on touch (#690)
* Fix iOS menu issue

* Fix burger menu iOS trigger

* Modify the menu script to work on iOS too

* Update main.rs

* Update main.rs

* Update main.rs
5 years ago
Christopher James Halse Rogers df6f398efc Various snap fixes (#698)
* snap: Store media in the proper directory

* snap/set-environment: Exit successfully when not enabled.

This lets us unconditionally run things under `set-environment` and let it
handle the case where the necessary configuration hasn't yet been set.

* snap: Set the version based on git tags

This will make the version something like `0.3.0-alpha-2-65-g29178aa` at the moment,
as that was the most recent tag, but the commit tagged as `0.4.0` will get *that* as
the version

* snap: Force-install cargo-web

This makes building the *second* time work; otherwise there might be
an existing cargo-web install, and cargo will refuse to overwrite it.
5 years ago
fdb-hiroshima c484ca6afe make search items optional (#693)
* make search items optional

cf https://github.com/Plume-org/Plume/issues/692#issuecomment-550224029

* eindente
5 years ago
Violet White f0846ff546 Make the search index creation during migration respect SEARCH_INDEX (#689)
* Make the search index creation during migration respect SEARCH_INDEX

* Make the search subcommand respect it too
5 years ago
Violet White c0469c69c1 Add autosaving to the editor (#688)
* Add autosaving to the editor

* It saves the subtitle, tags, and license now

* Save the cover too

* Fix broken autosave again

* Use set_value instead of a multitude of setters. Implement debouncing

* Remove unsafe code, remove generic getters when possible
5 years ago
Ana Gelez 865f372d5a
Add a sample .env file (#687)
* Add a sample .env file

As requested in https://github.com/Plume-org/docs/pull/60

* Keep domain names consistent
5 years ago
Violet White 52d860d402 Paginate the outbox responses. Fixes #669 (#681)
* Paginate the outbox responses. Fixes #669

* Address Ana's review

* Make outbox_fetch page through instance outboxes

* Fix infinite loop in fetch_outbox

* Fix off by one
5 years ago
Violet White 866465c603 Add environmental variable to control path of media (#683) 5 years ago
fdb-hiroshima dd6d39135e re-add empty strings in translation (#682) 5 years ago
Violet Myers 028c4fdbc6 Fix that bug :D 5 years ago
Ryo Nakano b4882533f8 Escape href quotation marks (#678) 5 years ago
Ryo Nakano fc9e69d811 Don't split sentences for translations (#677) 5 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
Christopher James Halse Rogers a0e3fe8c94 snap: Fix build for non-Tier-1 Rust platforms (#672) 5 years ago
Christopher James Halse Rogers e54fffccdf
snap: *Another* fix for building (#668) 5 years ago
Christopher James Halse Rogers b36e12b654 snap: Ensure cargo-web doesn't erroneously adopt our workspace. (#667) 5 years ago
Christopher James Halse Rogers b5eecbf2e7 Add Snapcraft metadata and install/maintenance hooks (#666)
* Add Snapcraft metadata and install/maintenance hooks

* Move set-environment script into snap/local

* snap: Remove diesel-cli part.

This *was* necessary as of 0.3.0, but now `plm migrations run` does the job.

* snap: Add an actual description

* snap: Add an 'enabled' config item.

Don't try to run until enabled is set, and automatically run the
migrations when we are enabled
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
fdb-hiroshima 12c80f9981 delete notification on user deletion (#658)
* delete notification on user deletion

fix #651

* use the correct id for deletion

* add regression test

* push helpers too

* revert CI changes
5 years ago
Ana Gelez d4a1bd6de7 Fix logo URL (#664) 5 years ago
fdb-hiroshima d46af6fe5b order media so that latest added are top (#660)
* order media so that latest added are top

partial fix for #621

* also order paginated medias
5 years ago
fdb-hiroshima ddbec3f204 fill entirely user on creation (#657)
fix #635
5 years ago
fdb-hiroshima 83cad55b22 update default license (#659)
fix #595
5 years ago
fdb-hiroshima bf7603d439
don't index drafts (#656) 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
Requiem 935d331e97 Fix issue #642, frontend not in english if the user language does not exist (#648)
* syntax and names

* Solve the issue #642, by searching index of english language code in catalog.
5 years ago
Ana Gelez 28fb50438e
Fix theme caching (#647) 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
fdb-hiroshima fb60236a54
update dependancies (#643)
* Bump activitystreams-derive from 0.1.0 to 0.1.1
* Bump tantivy from 0.9.1 to 0.10.1
* Bump rpassword from 3.0.2 to 4.0.1
* Bump num_cpus from 1.10.0 to 1.10.1
* Bump serde_qs from 0.4.6 to 0.5.0
* Bump stdweb-internal-runtime from 0.1.3 to 0.1.4
* [Security] Bump smallvec from 0.6.9 to 0.6.10
* Bump chrono from 0.4.6 to 0.4.7
* Bump bcrypt from 0.4.0 to 0.5.0
* Bump serde_json from 1.0.39 to 1.0.40
* Bump tokio from 0.1.21 to 0.1.22
* Bump scheduled-thread-pool from 0.2.0 to 0.2.2
* Bump stdweb from 0.4.14 to 0.4.18
* Bump hyper from 0.12.29 to 0.12.33
* Bump reqwest from 0.9.17 to 0.9.19
* Bump url from 1.7.2 to 2.1.0
5 years ago
fdb-hiroshima 4f7c20fc26 Fix some federation issue (#573)
* send scheme as part of webfinger remote follow template

fix tsileo/microblog.pub#49

* bump webfinger to 0.4.1

* cargo fmt

* revert translations

* Use group: prefix for blog webfinger queries
5 years ago
Mostafa Ahangarha 54c6d21fc5 WIP - initial RTL support #575 (#577)
* initial RTL support

* fix dir in template-util

* fix dir in blogs new

* fix dir in blogs details

* fix dir in posts new

* fix dir in posts details

* fix dir in posts remote

* Fix dir in partials

some parts should be recheck carefully in real usage
5 years ago
Wilfried OLLIVIER c031804464 Add clap to plume in order to print help and version (#631)
* Add clap in order to print help and version

Related to https://github.com/Plume-org/Plume/issues/594

* Update after_help text message
5 years ago
fdb-hiroshima 5289fe872a
don't ignore dotenv errors (#630) 5 years ago
Baptiste Gelez 7ea4acc289
Use futures and tokio to send activities (#620)
* Use futures and tokio to send activities

* Reset .po files

* Cargo fmt + small enhancements

- better error messages
- removed a TODO

* Log all messages at the same time when federation succeeds
5 years ago
Baptiste Gelez 6dbc043a7e
Update some documents (#616)
* 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
5 years ago
KemoNine fb1668ede7 Update dependencies which depended on nix -- fixes arm32 builds (#615) 5 years ago
Igor Galić 3d27e283ad
add enum containing all successful route returns (#614)
* 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.
5 years ago
Rob Watson 4b205fa995 Store password reset requests in database (#610)
* Store password reset requests in database

Signed-off-by: Rob Watson <rfwatson@users.noreply.github.com>

* Refactor password reset request expiry handling

* Integrate sqlite

* Fix formatting
5 years ago
KemoNine e7126ae335 Fix arm builds (#612) 5 years ago
Marek Ľach b2312d7f1b Update textarea overflow to scroll (#609)
* Update textarea overflow to scroll

* Update _forms.scss

* Update _forms.scss
5 years ago
Rob Watson bffce041d7 Confirm deletion of blog (#602) 5 years ago
Marek Ľach 037674ae13 Direct follow-up to #578 (#603) 5 years ago