Commit Graph

1127 Commits (f6d169567c922683be52f48164a2eabd7291107b)
 

Author SHA1 Message Date
KITAITI Makoto 6a3f210dfc
Keep atmarks and hashes in link (#765)
* [REFACTORING]Use DocumentContext during parsing Markdown

* Add test case for hash in link

* Make DocumentContext derive Debug

* Add in_link field in DocumentContext

* Don't make hash words tags in link

* Add test for atmark in link

* Don't make atmark words in link mentions
4 years ago
KITAITI Makoto 73aa301d4a
Fix user subscription URI so that plume::routes:interact accept it (#762) 4 years ago
KITAITI Makoto b3d367b174
Use plural form for 0 in French (#760)
See https://github.com/Plume-org/Plume/issues/745
4 years ago
KITAITI Makoto edaccd1a31
Fixes #757 Allow Unicode hashtags (#758)
* Add test for Persian language hashtags

See https://github.com/Plume-org/Plume/issues/757

* Add regex-syntax with unicode-perl feature to dependencies

* Install regex-syntax

* Allow hashtag to use Unicode word characters

* Run cargo fmt
4 years ago
Floréal Toumikian e1bd2eab75
Updated: Cargo.lock (#753) 4 years ago
KITAITI Makoto ac7a05b09a
Make blocklist deletion possible (#750) 4 years ago
KITAITI Makoto 71e0a35e06
Use LenientForm instead Form for CSRF protected pages (#751) 4 years ago
KITAITI Makoto c217e5e9b3
Move stylesheets for header from _global.sccss to _header.scss (#749) 4 years ago
KITAITI Makoto 8ba0c17db5
Build app and po files before upload pos to Crowdin (#748) 4 years ago
Floréal Toumikian 4e43c676b4
Fixed: #713: Disply likes and boosts on post cards (#744)
This is a basic and simple way to display them. No interaction possible.

Alos, this patch is not optimised. as everytime a partial post_card is
called, `Post::count_likes()` and `Post::count_reshares()` are called
which means quite a few more quesies are sent to database unless diesel
uses some cache mechanisem.

A way to enhance this this would be to keep a count of likes and reshares
are kept in Post model / table.
4 years ago
KITAITI Makoto b834d1c282
Fix #701 Preferable default theme (#746)
* Make it possible to update users.preferred_theme to NULL

* Make preferred them null when 'Default theme' is selected

* Run cargo fmt
4 years ago
Kenneth Steimel 506fe9955d
Fixed #734 , passowrds are now hidden on the remote_interact pages (#741)
* Fixed #734 , passowrds are now hidden on the remote_interact pages

* Update templates/remote_interact_base.rs.html

Co-Authored-By: Floréal Toumikian <floreal+github@nimukaito.net>

Co-authored-by: Floréal Toumikian <floreal+github@nimukaito.net>
4 years ago
KemoNine 02c528cae4
Bump llvm -> 9.0.0 (fixes arm builds) (#737) 4 years ago
Christopher James Halse Rogers 2a58835f92
Snapcraft updates (#731)
* snap: Update rust compiler

* snap: Fix the build.

We now need libclang

* snap: Fix the non-x86 builds.

The goddamned environment variable is SNAPCRAFT_ARCH_TRIPLE*T*

* snap: Mark as stable.

The snap works fine; we don't need to warn people away
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
KemoNine 72464fb428 Add missing dep on clang needed for crate builds (#724) 4 years ago
Wilfried OLLIVIER 23049b638c WIP: Fix RSS issues (#720)
* Add id field to RSS feed

* Add published field to RSS feed
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
Violet Myers e6bdeb7c4b Fix #699 (#719) 4 years ago
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