Commit Graph

86 Commits

Author SHA1 Message Date
d17d097b12 Fix parts of CI (#304)
* Run cargo fmt, hide clippy::cmp_owned errors

* Bump deps

* Fix failing test

* Update src/client.rs

---------

Co-authored-by: Matthew Esposito <matt@matthew.science>
2024-10-31 22:50:50 -04:00
1838fdaea4 Replace askama with rinja (#276) 2024-10-02 17:43:13 -04:00
374238abc3 Add RSS feeds (fix #57) (#90)
* Add RSS feeds

* feat(rss): feature-ify rss

* feat(rss): config-ify rss

* fix(rss): update info page

* feat(rss): conditionally add RSS feeds to user and sub pages

* feat(rss): implement URLs for RSS
2024-07-21 14:09:34 -04:00
9f9ae45f6e Add many Clippy's, fix many Clippy's 2024-01-19 20:16:17 -05:00
6d97f4c8dd Change Tokio tests - fix GHA runner (again) 2023-12-30 21:33:27 -05:00
d86b77ab56 Reset test threads to 1 (should fix test issues in GHA) 2023-12-29 20:33:43 -05:00
9f41af6eee Improve spoofing - match headers more closely, pull in real versions/builds 2023-12-28 15:37:02 -05:00
b0f985c687 Libreddit -> Redlib 2023-12-26 18:25:52 -05:00
0ca0eefaa4 Add tests to check fetching sub/user/oauth 2023-06-06 15:28:36 -04:00
a0726c5903 Change the bypass message and format code
The bypass message now indicates that the bypass is only temporary.
2023-03-23 11:09:33 -07:00
e046144bf3 Allow bypassing nsfw gate for posts
On instances that are not sfw-only, the nsfw gate for posts can now be
bypassed.
2023-03-22 23:18:35 -07:00
9a7b3b29f5 Merge remote-tracking branch 'origin/master' into hide_awards 2023-01-03 11:12:27 -07:00
c83a4e0cc8 Landing page for NSFW content, SFW-only mode (#656)
Co-authored-by: Matt <matt@matthew.science>
Co-authored-by: Spike <19519553+spikecodes@users.noreply.github.com>
2023-01-03 02:39:45 -07:00
6a785baa2c Add hide_awards config 2023-01-01 21:39:38 -05:00
ab30b8bbec Bugfix: 'all posts are hidden because NSFW' when no posts where found (#666)
* Fix 'all_posts_hidden_nsfw' when there are no posts.

If a search query yielded no results and the user set nsfw posts to be
hidden, libreddit would show 'All posts are hidden because they are NSFW.
Enable "Show NSFW posts" in settings to view'. This is fixed by
verifying tnat posts.len > 0 before setting 'all_posts_hidden_nsfw' to
true.

* Add a message when no posts were found.

* Delete 2
2022-12-31 19:11:59 -07:00
e579b97442 List post duplicates (resolves #574). 2022-12-03 01:08:36 -07:00
465d9b7ba7 Implement 'posts hidden because of NSFW'. (Resolves #159) (#619) 2022-11-07 20:54:49 -07:00
322aa97a18 Fix HTML encoding in templating (#404) 2022-05-21 05:28:31 +00:00
428dc58e3c Update to v0.22.8 2022-05-20 19:20:44 -07:00
70ff150ab4 Add user listing buttons (#400)
* Add user listing buttons

* Update to v0.22

Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>
2022-03-13 19:06:27 +00:00
f1b3749cf0 Fix #378 — formatting of dates/times 2021-12-29 12:48:57 -08:00
0708fdfb37 Cover more Reddit domains with libreddit link rewrites 2021-12-29 11:38:35 -08:00
888e7b302d Filter subreddits and users (#317)
* Initial work on filtering subreddits and users

* Fix doubly-prefixed subreddit name in search alt text (e.g. r/r/pics)

* Don't set post title to "Comment" if empty - this could throw off actual posts with the title "Comment"

* Filter search results

* Fix filtering to differentiate between "this subject itself is filtered" vs "all posts on this current page have been filtered"

* Remove unnecessary check

* Clean up

* Cargo format

* Collapse comments from filtered users

Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>
2021-11-26 04:02:04 +00:00
2486347b14 Fix follows not being case-sensitive (#316) 2021-11-15 00:45:18 +00:00
4defb58f2a Optimizations and commenting 2021-05-20 12:24:06 -07:00
8bb247af3b Added support for quarantined subreddits (#219)
* Added support for quarantined subreddits

* Added confirmation wall for quarantined subreddits

* Added quarantine walls to other routes and fixed case issue

* Correct obsolete use of cookie()

* Refactor param() and quarantine()

Co-authored-by: Spike <19519553+spikecodes@users.noreply.github.com>
2021-05-16 15:53:39 +00:00
928907086c HLS video playback (#182)
* HLS video playback

Signed-off-by: Adrian Lebioda <adrianlebioda@gmail.com>

* Add LibreJS compliance

* Locally host hls.js

* Notification about HLS under videos that support it

Signed-off-by: Adrian Lebioda <adrianlebioda@gmail.com>

* Use .contains() instead of .find() == None

* Make list of preferences constant

* Change headers_keys from Vector into Array

* Fix incorrect detecting of # in paths

* Remove trailing-slash-appending if statement

* Change HLS notification styling

Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>
2021-05-10 01:25:52 +00:00
66ac72beab Fix clippy errors 2021-03-26 20:00:47 -07:00
a81502dde1 Fix wiki routing 2021-03-17 21:40:55 -07:00
b14b4ff551 Rewrite server and client using Hyper 2021-03-17 15:30:33 -07:00
4173362ce1 Fix #148 2021-03-11 20:15:26 -08:00
1c36549134 Fix #146 2021-03-09 07:22:17 -08:00
bf783c2f3a Optimize type casting 2021-03-08 18:49:06 -08:00
a3ec44149c Categorize utilities 2021-02-24 21:29:23 -08:00
dd67b52199 Fix #126 2021-02-20 18:36:30 -08:00
9cfab348eb Filter by flair. Closes #124 2021-02-20 13:59:16 -08:00
ebbdd7185f Move from Actix Web to Tide (#99)
* Initial commit

* Port posts

* Pinpoint Tide Bug

* Revert testing

* Add basic sub support

* Unwrap nested routes

* Front page & sync templates

* Port remaining functions

* Log request errors

* Clean main and settings

* Handle /w/ requests

* Create template() util

* Reduce caching time to 30s

* Fix subscription redirects

* Handle frontpage sorting
2021-02-09 17:38:52 +00:00
077c222a4e Experiment with caching 2021-01-23 10:48:33 +01:00
078d6fe25b Request about pages before posts 2021-01-15 15:05:55 -08:00
dbe617d7eb Switch to awc 2021-01-14 09:53:54 -08:00
0bf5576427 Categorize routes and refactor error handlers 2021-01-13 19:53:52 -08:00
740641cb4e Move nested_val() to user.rs 2021-01-13 15:55:10 -08:00
541c741bde Parse GIFs correctly 2021-01-11 17:47:14 -08:00
91746908a1 Switch to ureq 2021-01-11 10:33:48 -08:00
fac56d7f87 Markdown spoilers and post footers on videos 2021-01-08 21:57:36 -08:00
ef1ad17234 Unknown path error handling 2021-01-08 21:11:20 -08:00
b8cdc605a2 Front page config and settings note 2021-01-08 20:55:40 -08:00
b13874d0db Add "hide nsfw" option 2021-01-08 17:35:04 -08:00
7e96bb3d80 Optimize use of Result<> 2021-01-06 21:27:24 -08:00
da5c4603d9 Switch from chrono to time-rs 2021-01-05 20:01:21 -08:00