Commit Graph

49 Commits

Author SHA1 Message Date
Daniel Valentine
9a7b3b29f5
Merge remote-tracking branch 'origin/master' into hide_awards 2023-01-03 11:12:27 -07:00
Daniel Valentine
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
Matthew Esposito
6a785baa2c Add hide_awards config 2023-01-01 21:39:38 -05:00
gmnsii
9e434e7db6
Search - add support for raw reddit links (#663)
* Search - add support for raw reddit links

If a search query starts with 'https://www.reddit.com/' or 'https://old.reddit.com/',
this prefix will be truncated and the query will be processed normally.
For example, a search query 'https://www.reddit.com/r/rust' will redirect to
r/rust.

* Search - support a wider variety of reddit links.

Add once cell dependency for static regex support (avoid compiling the
same regex multiple times).
All search queries are now matched against a regex (provided by @Daniel-Valentine)
that determines if it is a reddit link. If it is, the prefix specifying
the reddit instance will be truncated from the query that will then be
processed normally.
For example, the query 'https://www.reddit.com/r/rust' will be treated
the same way as the query 'r/rust'.
2022-12-31 20:57:42 -07:00
gmnsii
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
Daniel Valentine
e579b97442
List post duplicates (resolves #574). 2022-12-03 01:08:36 -07:00
Daniel Valentine
465d9b7ba7
Implement 'posts hidden because of NSFW'. (Resolves #159) (#619) 2022-11-07 20:54:49 -07:00
Nick Lowery
322aa97a18
Fix HTML encoding in templating (#404) 2022-05-21 05:28:31 +00:00
Andrew Kaufman
9c325c2cbf
Search fixes (#384)
* Default to searching within subreddit

* Redirect to subreddit from search
2022-01-05 14:06:41 -08:00
spikecodes
7aeabfc4bc
Rewrite Reddit post links to Libreddit equivalents 2021-12-26 21:18:20 -08:00
spikecodes
0656756d21
Fix #196 2021-11-29 22:29:41 -08:00
Nick Lowery
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
spikecodes
8e332b0630
Show full subreddit results in search 2021-11-23 22:24:23 -08:00
spikecodes
6a4191f3b5
Fix #272 2021-09-09 17:28:55 -07:00
spikecodes
4defb58f2a
Optimizations and commenting 2021-05-20 12:24:06 -07:00
spikecodes
43ed9756dc
Upgrade to v0.14 2021-05-16 09:11:38 -07:00
curlpipe
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
spikecodes
e4f9bd7b8d
Configure default settings using environment variables 2021-05-15 13:59:42 -07:00
Adrian Lebioda
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
curlpipe
536a766960
WIP: Various subreddit & post fixes (#215)
* Fixed random subreddit issue

* Fixed large subreddit icon rendering

* Formatting fix

* Fix dodgy HTML rendering issues

* Revert "Fix dodgy HTML rendering issues"

This reverts commit 58be5f449b72f271d2b3c046870b652d1e715289.
2021-05-09 15:40:49 +00:00
spikecodes
966e0ce921
Expand truncated numbers on mouseover. Close #156 2021-03-20 15:42:47 -07:00
spikecodes
9b5176f7b9
Sub icons and truncated subscribers in search results 2021-03-18 21:32:54 -07:00
spikecodes
b14b4ff551
Rewrite server and client using Hyper 2021-03-17 15:30:33 -07:00
spikecodes
1c36549134
Fix #146 2021-03-09 07:22:17 -08:00
spikecodes
bf783c2f3a
Optimize type casting 2021-03-08 18:49:06 -08:00
spikecodes
a3ec44149c
Categorize utilities 2021-02-24 21:29:23 -08:00
spikecodes
dd67b52199
Fix #126 2021-02-20 18:36:30 -08:00
spikecodes
9cfab348eb
Filter by flair. Closes #124 2021-02-20 13:59:16 -08:00
Spike
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
spikecodes
1653d4fb4c
Hide NSFW content by default 2021-01-30 21:43:46 -08:00
Robin
b2ad2f636c Resolve merge conflicts 2021-01-23 10:55:11 +01:00
Robin
077c222a4e Experiment with caching 2021-01-23 10:48:33 +01:00
spikecodes
2270b6cf95 Reduce post padding 2021-01-21 21:25:51 -08:00
spikecodes
6641e242af Allow NSFW searching 2021-01-20 18:26:58 -08:00
spikecodes
18684c934b Refactor subreddit searching 2021-01-14 11:45:04 -08:00
robrobinbin
735f79d80b
Merge pull request #2 from spikecodes/master
Merge upstream into code
2021-01-14 19:29:06 +01:00
robrobinbin
a85a4278f6 Add subreddits to search results 2021-01-14 19:22:50 +01:00
spikecodes
0bf5576427 Categorize routes and refactor error handlers 2021-01-13 19:53:52 -08:00
spikecodes
b13874d0db Add "hide nsfw" option 2021-01-08 17:35:04 -08:00
spikecodes
7e96bb3d80 Optimize use of Result<> 2021-01-06 21:27:24 -08:00
spikecodes
aa7b4b2af7 Settings with Layouts 2021-01-05 18:04:49 -08:00
spikecodes
a3384cbaa6 Fix search pages 2021-01-02 22:37:54 -08:00
spikecodes
5ea504e6e8 Restrict Proxy to Reddit Domains 2021-01-02 20:50:23 -08:00
spikecodes
0925a9b334 Add Wiki Pages 2021-01-01 22:21:43 -08:00
spikecodes
2f2ed6169d Optimize use of .unwrap() 2021-01-01 15:28:13 -08:00
spikecodes
59ef30c76d Remove .clone() in favor of borrowing 2021-01-01 12:55:09 -08:00
spikecodes
d43b49e7e4 Optimize Rust code with Clippy 2021-01-01 12:33:57 -08:00
spikecodes
39ba50dada Error Page 2020-12-31 21:03:44 -08:00
spikecodes
a6dc7ee043 Rewrite + Searching 2020-12-31 15:54:13 -08:00