Commit Graph

292 Commits

Author SHA1 Message Date
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
Diego Magdaleno bd413060c6
Support displaying awards (#168)
* Initial implementation of award parsing

* Posts: Implement awards as part of post

* Posts: remove parse_awards dead code

* Posts: initial implementation of displaying Awards at the post title

* Posts: Proxy static award images

* Client: i.redd.it should take path as argument not ID

* Posts: Just like Reddit make award size 16px

* Templates: limit the awards to 4 awards to increase performance

* Comments: Make awards a property of comments and display them

* Format and correct /img/:id

* Update comment.html

* [Optimization] Awards is not longer async

* [Revert] Posts can now display more than 4 awards again

* [Implementation] Awards not display on the frontpage

* [Implementation] Display count on awards

* Post: Start working on awards css

* Awards: Move the image size to css

* Awards: Start implementing tooltips

* Refactor awards code and tweak CSS indentation

* Unify Awards::new and Awards::parse

* Use native tooltips and brighten awards background

Co-authored-by: Spike <19519553+spikecodes@users.noreply.github.com>
2021-11-25 02:08:27 +00:00
spikecodes 8e332b0630
Show full subreddit results in search 2021-11-23 22:24:23 -08:00
spikecodes 85ae7c1f60
Fix indentation and formatting 2021-11-23 22:23:29 -08:00
spikecodes 4faa9d46d6
Fix HTTPS connector 2021-11-21 22:44:05 -08:00
mikupls 768820cd4c
Render markdown correctly in text post previews by using selftext_html. (#335)
* Render markdown correctly in text post previews by using selftext_html.

I was mistakenly under the impression that we somehow render markdown ourselves, but turns out we just take whatever HTML reddit gives us, and we also need to do this for text previews.

Use CSS to limit the size of the previews instead of truncating in the template.

Fix table CSS.

* Fix post_body padding and trim post_previews

Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>
2021-11-21 23:17:52 +00:00
mikupls 5d9c320a7e
Format post and comment votes with a decimal place, like vanilla reddit does. (#324)
* Format post and comment votes with a decimal place, like vanilla reddit does.

Before this change, a vote count of 1999 was displayed as 1k, which is a pretty big gap. The displayed count also differed from what Reddit does. Now, the behaviour is consistent.

Added some tests for format_num.

* Provide more space for post scores

Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>
2021-11-21 04:07:45 +00:00
mikupls c2053524c7
Add text post previews. (#328)
* Add text post previews.

* Add mask gradient over post preview text

* Increase post title font weight for contrast

Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>
2021-11-20 21:13:50 +00:00
mikupls 731a407466
Collapse (sticky) bot comments by default. (#321)
* Collapse bot comments by default.

Comments are considered bot comments if they are posted by a moderator and are stickied. Some false positives are expected.

* Remove unneeded String conversion

Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>
2021-11-19 05:42:53 +00:00
spikecodes 34ea679519
Update crates and optimize parameters 2021-11-14 18:51:36 -08:00
mikupls 0f7ba3c61d
Add "open in reddit" button to all pages (#304)
* Pass the url parameter to all templates. Add a reddit_link to the navbar, which opens the current url on reddit.

* Add icon for reddit link

Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>
2021-11-15 02:39:33 +00:00
Nick Lowery 2486347b14
Fix follows not being case-sensitive (#316) 2021-11-15 00:45:18 +00:00
spikecodes 1d4ea50a45
Add setting to autoplay videos 2021-10-25 21:27:55 -07:00
dacousb 350b796571
Support Deployment to Heroku (#280)
* Added heroku.yml

* Added app.json

* PORT as env var
2021-09-19 19:03:01 +00:00
spikecodes 6a4191f3b5
Fix #272 2021-09-09 17:28:55 -07:00
spikecodes 982f57efd9
Fix user profiles showing up in search engines 2021-09-06 12:05:03 -07:00
spikecodes 41b3dc5739
More apt error messages for Reddit outages 2021-08-11 20:49:42 -07:00
spikecodes 45a5778571
Escape text-only flairs 2021-07-19 10:20:00 -07:00
accountForIssues be253d40dd
Escape html characters in post flairs (#247)
* Encode HTML characters in flairs

* Encode HTML characters in flairs

* Use esc! macro for HTML escaping

Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>
2021-07-19 17:15:15 +00:00
spikecodes 345f8e7b80
Dampen title color of visited posts. Fixes #222 2021-07-18 14:53:08 -07:00
spikecodes a190890239
Fix Regex matching of Reddit links 2021-07-17 22:24:28 -07:00
spikecodes 56998b8332
Rewrite redd.it links 2021-06-21 22:51:50 -07:00
spikecodes d2002c9027
Disable dysfunctional moderator list feature 2021-06-11 11:03:36 -07:00
spikecodes d27bd782ce
Specify fallback fonts 2021-05-26 20:30:08 -07:00
spikecodes 4defb58f2a
Optimizations and commenting 2021-05-20 12:24:06 -07:00
spikecodes ba42fc066f
Fix two subscription bugs 2021-05-19 20:30:10 -07:00
spikecodes b9af6f47f3
Use Inter font 2021-05-19 16:09:08 -07:00
spikecodes 73732a2a44
Fix subscription clearing when saving settings 2021-05-19 15:59:32 -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 4f09333cd7
Handle three unwraps 2021-05-15 14:51:57 -07: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 58be5f449b.
2021-05-09 15:40:49 +00:00
spikecodes e34329cfee
Upgrade to v0.11.1 2021-05-08 22:09:47 -07:00
imabritishcow 97a0680bd0
Support GIFs in comments (#217)
* Support GIFs in comments

* Fix removing Giphy links so it only removes Giphy links

* Remove removing link to Giphy
2021-05-09 01:22:26 +00:00
spikecodes c1560f4eba
Upgrade to v0.11.0 2021-05-06 12:31:59 -07:00
curlpipe 242ffab0da
Fix bug with subreddit subscription case & RTL languages (#214)
* Fixed subreddit subscription case issues

* Fixed formatting

* Fixed flair RTL language issue (#132)

* Convert display_lookup to Vec

Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>
2021-05-06 19:11:25 +00:00
curlpipe 1211d781d0
Add list of moderators to sidebar (#213)
* Added list of moderators to sidebar & added wiki not found message

* Improved code formatting
2021-05-04 17:30:54 +00:00
spikecodes 3cf787cf98
Fix #195 2021-04-14 21:53:17 -07:00
spikecodes a18db1e2b7
Properly pass preview queries to media proxy 2021-04-08 22:26:03 -07:00
spikecodes b3e4b7bfae
Add user following functionality 2021-04-06 10:23:05 -07:00
spikecodes f0f484288e
Fix server.rs function name 2021-03-31 13:03:44 -07:00
spikecodes c7f9386c01
Fix #169 2021-03-27 13:03:13 -07:00
spikecodes 66ac72beab
Fix clippy errors 2021-03-26 20:00:47 -07:00
spikecodes 6a7f725c12
Default subreddit post sorting. Closes #166 2021-03-25 21:41:58 -07:00
spikecodes 772d20615b
Sidebar about page. Closes #162 2021-03-21 19:28:05 -07:00
spikecodes 0bb1677520
Revert client to HTTP/1.1 2021-03-21 13:56:05 -07:00
spikecodes da4883db29
Upgrade client to HTTP/2 2021-03-21 11:37:03 -07:00
spikecodes 4c66e75f6b
Add HSTS command line flag 2021-03-20 22:10:31 -07:00