tangled
alpha
login
or
join now
oppi.li
/
lurker
16
fork
atom
selfhostable, read-only reddit client
16
fork
atom
overview
issues
1
pulls
pipelines
rename to lurker
oppi.li
1 year ago
f11e488e
2dcddd94
+33
-22
8 changed files
expand all
collapse all
unified
split
flake.nix
readme.txt
src
db.js
mixins
head.pug
public
styles.css
views
index.pug
login.pug
register.pug
+15
-15
flake.nix
···
20
20
overlays.default = final: prev: {
21
21
node_modules = with final;
22
22
stdenv.mkDerivation {
23
23
-
pname = "readit-node-modules";
23
23
+
pname = "lurker-node-modules";
24
24
version = "0.0.1";
25
25
impureEnvVars =
26
26
lib.fetchers.proxyImpureEnvVars
···
42
42
outputHashAlgo = "sha256";
43
43
outputHashMode = "recursive";
44
44
};
45
45
-
readit = with final;
45
45
+
lurker = with final;
46
46
stdenv.mkDerivation {
47
47
-
pname = "readit";
47
47
+
pname = "lurker";
48
48
version = "0.0.1";
49
49
src = ./.;
50
50
nativeBuildInputs = [makeBinaryWrapper];
···
84
84
});
85
85
86
86
packages = forAllSystems (system: {
87
87
-
inherit (nixpkgsFor."${system}") readit node_modules;
87
87
+
inherit (nixpkgsFor."${system}") lurker node_modules;
88
88
});
89
89
90
90
-
defaultPackage = forAllSystems (system: nixpkgsFor."${system}".readit);
90
90
+
defaultPackage = forAllSystems (system: nixpkgsFor."${system}".lurker);
91
91
92
92
apps = forAllSystems (system: let
93
93
pkgs = nixpkgsFor.${system};
94
94
in {
95
95
default = {
96
96
type = "app";
97
97
-
program = "${pkgs.readit}/bin/readit";
97
97
+
program = "${pkgs.lurker}/bin/lurker";
98
98
};
99
99
});
100
100
···
108
108
}:
109
109
with lib; {
110
110
options = {
111
111
-
services.readit = {
111
111
+
services.lurker = {
112
112
enable = mkOption {
113
113
type = types.bool;
114
114
default = false;
115
115
-
description = "Enable readit";
115
115
+
description = "Enable lurker";
116
116
};
117
117
port = mkOption {
118
118
type = types.int;
119
119
default = 3000;
120
120
-
description = "Port to run readit on";
120
120
+
description = "Port to run lurker on";
121
121
};
122
122
};
123
123
};
124
124
125
125
-
config = mkIf config.services.readit.enable {
125
125
+
config = mkIf config.services.lurker.enable {
126
126
nixpkgs.overlays = [self.overlays.default];
127
127
-
systemd.services.readit = {
128
128
-
description = "readit service";
127
127
+
systemd.services.lurker = {
128
128
+
description = "lurker service";
129
129
wantedBy = ["multi-user.target"];
130
130
131
131
serviceConfig = {
132
132
-
ListenStream = "0.0.0.0:${toString config.services.readit.port}";
133
133
-
ExecStart = "${pkgs.readit}/bin/readit";
132
132
+
ListenStream = "0.0.0.0:${toString config.services.lurker.port}";
133
133
+
ExecStart = "${pkgs.lurker}/bin/lurker";
134
134
Restart = "always";
135
135
};
136
136
137
137
# If the binary needs specific environment variables, set them here
138
138
environment = {
139
139
-
READIT_PORT = "${toString config.services.readit.port}";
139
139
+
LURKER_PORT = "${toString config.services.lurker.port}";
140
140
};
141
141
};
142
142
};
+3
-3
readme.txt
···
1
1
-
nix build .#readit
1
1
+
nix build .#lurker
2
2
3
3
todo:
4
4
- [ ] support crossposts
5
5
-
- [ ] fix gallery thumbnails
5
5
+
- [x] fix gallery thumbnails
6
6
- [x] pass query params into templates, add into pagination
7
7
- [ ] subscription manager: reorder, mass add
8
8
- [x] styles for info-containers
9
9
- [ ] open in reddit/reply in reddit link
10
10
-
- [ ] placeholder for unresolvable thumbnails
10
10
+
- [x] placeholder for unresolvable thumbnails
11
11
- [x] expand/collapse comments
12
12
- [x] fix title rendering in views/comments.pug
13
13
- [x] fix spacing between comments
+1
-1
src/db.js
···
1
1
const { Database } = require("bun:sqlite");
2
2
-
const db = new Database("readit.db", {
2
2
+
const db = new Database("lurker.db", {
3
3
strict: true,
4
4
});
5
5
+1
-1
src/mixins/head.pug
···
2
2
head
3
3
meta(name="viewport" content="width=device-width, initial-scale=1.0")
4
4
meta(charset='UTF-8')
5
5
-
title #{`${title} · readit `}
5
5
+
title #{`${title} · lurker `}
6
6
link(rel="stylesheet", href="/styles.css")
7
7
link(rel="preconnect" href="https://rsms.me/")
8
8
link(rel="stylesheet" href="https://rsms.me/inter/inter.css")
+5
src/public/styles.css
···
525
525
color: var(--error-text-color);
526
526
}
527
527
528
528
+
.register-message {
529
529
+
margin-bottom: 1rem;
530
530
+
flex-flow: row wrap;
531
531
+
}
532
532
+
528
533
.invite-table {
529
534
width: 100%;
530
535
padding: 10px 0;
+2
-2
src/views/index.pug
···
14
14
div.sub-title
15
15
h1
16
16
if isMulti
17
17
-
a(href=`/`) readit
17
17
+
a(href=`/`) lurker
18
18
else
19
19
a(href=`/r/${subreddit}`)
20
20
| r/#{subreddit}
···
30
30
div.about
31
31
| consider donating to
32
32
a(href="https://donate.stripe.com/dR62bTaZH1295Da4gg") oppiliappan
33
33
-
|, author of readit
33
33
+
|, author of lurker
34
34
hr
35
35
details
36
36
summary.sorting sorting by #{query.sort + (query.t?' '+query.t:'')}
+3
src/views/login.pug
···
9
9
if message
10
10
div.register-error-message
11
11
| #{message}
12
12
+
else
13
13
+
div.register-message
14
14
+
| lurker is a read-only reddit client
12
15
- var url = redirect ? `/login?redirect=${redirect}` : '/login'
13
16
form(action=url method="post")
14
17
div.input-text
+3
src/views/register.pug
···
10
10
if message
11
11
div.register-error-message
12
12
| #{message}
13
13
+
else
14
14
+
div.register-message
15
15
+
| lurker is a read-only reddit client
13
16
form(action=`${action}` method="post")
14
17
div.input-text
15
18
label(for="username") username