Commit Graph

1211 Commits

Author SHA1 Message Date
Daniel Valentine
412122d7d9
v0.27.1 2023-01-12 01:57:03 -07:00
potatoesAreGod
eb9ef9f6d9
added leaving reddit dialog (#643) 2023-01-12 01:46:56 -07:00
Matthew Esposito
27091db53b
Create rust-tests.yml (#690)
This will run tests on every push and PR to master.
2023-01-12 01:43:08 -07:00
Spenser Black
2a54043afc
Simplify listener definition (#681)
This simplifies the logic to build the listener by using more clap
features instead of manually accessing the PORT environment variable.
This also removes unnecessary `unwrap_or` calls that set defaults that
are already set by clap.
2023-01-12 01:41:59 -07:00
dependabot[bot]
e238a7b168
Bump tokio from 1.23.0 to 1.23.1 (#691)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.23.0 to 1.23.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.23.0...tokio-1.23.1)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-12 01:39:23 -07:00
Matthew E
1e554acd20
Merge pull request #687 from jojosch/fix-cfg-test
Fix tests
2023-01-04 16:03:48 -05:00
Johannes Schleifenbaum
dff91da877
config: fix SFW test 2023-01-04 11:12:19 +01:00
Matthew E
f6bb53e388
Mark search query as safe in askama template (#686) 2023-01-03 20:55:17 -08:00
Matthew E
709292339a
Merge pull request #674 from spenserblack/codespace 2023-01-03 20:12:36 -05:00
Matthew E
799e5b882b
Merge pull request #667 from erdnaxe/scrollbar_theme 2023-01-03 19:34:40 -05:00
Daniel Valentine
0ff92cbfe3
v0.27.0 2023-01-03 11:21:27 -07:00
Daniel Valentine
e9891236cd
Remove unnecessary SFW-only disclosure in settings in SFW-only mode. 2023-01-03 11:20:55 -07:00
Matthew E
e2c48c3438
Add hide_awards config option (fixes #442) 2023-01-03 11:16:22 -07:00
Daniel Valentine
9a7b3b29f5
Merge remote-tracking branch 'origin/master' into hide_awards 2023-01-03 11:12:27 -07:00
Daniel Valentine
10add895fb
Merge pull request #683 from Tokarak/master 2023-01-03 09:28:13 -07:00
Tokarak
050eaedf15 Remove unused dep "async-recursion"
Found using cargo-udeps. Checked.
2023-01-03 14:56:17 +00:00
Matthew E
5b06a3fc64
Add config system to read from file (#664)
Co-authored-by: Daniel Valentine <daniel@vielle.ws>
2023-01-03 02:55:22 -07:00
Daniel Valentine
4817f51bc0
v0.26.0 2023-01-03 02:40:44 -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
Daniel Valentine
c15f305be0
v0.25.3 2023-01-01 23:54:35 -07:00
Matthew E
222d216854
Merge pull request #673 from spenserblack/code-in-new-tab 2023-01-01 23:08:15 -05:00
Matthew Esposito
6a785baa2c Add hide_awards config 2023-01-01 21:39:38 -05:00
Matthew E
6d8aaba8bb
Merge pull request #676 from ellieeet123/master 2023-01-01 19:23:30 -05:00
elliot
6cf3748642
Fix for #675
/:id route now accepts 7 character post IDs.
2023-01-01 17:06:58 -06:00
tirz
9c938c6210
build: enable LTO, set codegen-unit to 1 and strip the binary (#467)
Co-authored-by: Spike <19519553+spikecodes@users.noreply.github.com>
2023-01-01 14:33:31 -07:00
Spenser Black
b1182e7cf5
Create devcontainer.json 2023-01-01 14:52:33 -05:00
Spenser Black
a49d399f72
Link to libreddit/libreddit and open in new tab
This sets the target of the "code" link to `_blank`, so that it will
open in a new tab in browsers. Because the GitHub page is a different
context from libreddit, and accessing the repository doesn't imply that
the user is finished browsing libreddit, this seemed reasonable. This
also changes the link from `spikecodes/libreddit` to
`libreddit/libreddit`.
2023-01-01 13:43:33 -05:00
Rupert Angermeier
9178b50b73
fix a11y and HTML issues on settings page (#662)
- connect labels with corresponding form controls
- use fieldsets to group form sections
- don't nest details/summary element into label
2023-01-01 01:56:09 -07:00
Daniel Valentine
b5d04f1a50
v0.25.2 2022-12-31 21:34:15 -07: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
Alexandre Iooss
1fa9f27619 Theme browser scrollbar
Hint current color-scheme to the browser. This enables chromium-based
browsers to change the scrollbar color according to the current theme.
2022-12-26 22:57:04 +01:00
Daniel Valentine
37d1939dc0
Fix #658.
Dimensions for embedded video in post are explicitly set only when defined by Reddit.

c/o: NKIPSC <15067635+NKIPSC@users.noreply.github.com>
2022-12-13 21:15:28 -07:00
Daniel Valentine
08a20b89a6
Merge branch 'cache-determine-compressor' 2022-12-10 18:35:38 -07:00
Daniel Valentine
5d518cfc18
Cache result of server::determine_compressor. 2022-12-04 17:56:02 -07:00
spikecodes
7e752b3d81
Fix Docker credential secrets 2022-12-04 11:07:18 -08:00
spikecodes
87729d0daa
Use new libreddit org for GitLab and Docker links 2022-12-04 11:05:19 -08:00
spikecodes
dc06ae3b29
Automatically-update Docker Repo description 2022-12-04 11:01:28 -08:00
spikecodes
225380b7d9
Fix workflow to push to new Libreddit Docker repo 2022-12-04 10:57:19 -08:00
Daniel Valentine
7391a5bc7a
v0.25.0 2022-12-03 01:18:23 -07:00
Daniel Valentine
3ff5aff32f
Merge branch 'list-post-duplicates' 2022-12-03 01:11:45 -07:00
Daniel Valentine
e579b97442
List post duplicates (resolves #574). 2022-12-03 01:08:36 -07:00
Daniel Valentine
8fa8a449cf
Sign release (resolves #651). 2022-12-01 16:42:04 -07:00
Daniel Valentine
473a498bea Update CREDITS file. 2022-11-30 21:08:51 -07:00
laazyCmd
92f5286667 Make the column size in posts consistent.
Signed-off-by: Daniel Valentine <Daniel-Valentine@users.noreply.github.com>
2022-11-30 21:06:21 -07:00
Daniel Valentine
0a6bf6bbee Update CREDITS file. 2022-11-27 15:57:31 -07:00
Macic
618b074ad5
Fix embeds (#648) 2022-11-27 11:42:34 -07:00
Daniel Valentine
d86cebf975 Request CSS with explicit version.
base.html will now request with a query parameter `v=` whose value is
the current version of Libreddit. This will cause the browser to request
the stylesheet for a specific version of Libreddit, bypassing the cache.
A new version of Libreddit will cause the browser to fetch a new
stylesheet.

Resolves #622. Credit is due to GitHub user @chloekek for offering this
solution in the following post:
        https://github.com/libreddit/libreddit/issues/622#issuecomment-1315961742
2022-11-23 14:43:36 -07:00
Daniel Valentine
ab39b62533 Dockerfile.arm: Add git to builder. 2022-11-22 15:42:10 -07:00
Daniel Valentine
5aee695bae Dockerfile.arm: Force cargo to use git binary.
Hopefully resolves #641.
2022-11-22 15:38:17 -07:00