60 Commits

Author SHA1 Message Date
Harvey Tindall
ccf0584db8 build: use tsgo for type checking
I don't use and fancy typescript features, and apparently this version
is very usable at this point. Removes the typescript dependency, which
should have been in dev-deps anyway.
2025-12-09 17:31:23 +00:00
Harvey Tindall
49f2026c47 npm: bump esbuild 2025-12-06 20:25:06 +00:00
Harvey Tindall
51f604d061 ivnites: use actual inviteDTO for DOMInvite
no intermediary parsing step. Also, moved the date -> duration (3mo6d3h
sorta thing) to the web, there's now a ValidTill field with a unix
timestamp. Used the new Temporal api with a polyfill. Bumped api version
(although it still isn't semver).
2025-12-06 14:01:06 +00:00
Harvey Tindall
5fa528fd2d invites: add /invites/send, store more details in new SentTo field
deprecated SendTo string field for SentTo, which holds successful send
addresses, and failures with a reason that isn't plain text. Will soon
add an interface for sending invites after their creation. For #444
(ha).
2025-12-05 12:03:21 +00:00
Harvey Tindall
77d2ad3b6b profiles: add ability to directly edit profile JSON
allows for customizing small things, like changing admin status.
2025-11-28 15:13:46 +00:00
Harvey Tindall
0595224daa meta: update esbuild 2025-07-20 13:50:53 +01:00
Harvey Tindall
4dcec4b9c7 accounts: fix infinite scroll over-loading, use scrollend+polyfill
calculation for number of rows to be drawn was wrong, fixed now. To
compensate for overshooting with fast scrolling, speed is calculated
using previous scrollY in rows/scroll, and used to render more rows.
Also, the "scrollend" event is used to load more at the end of a scroll
always. Since this isn't available on safari/webkit(2gtk), a polyfill
has been added.
2025-05-26 21:52:31 +01:00
dependabot[bot]
19495be6e9 build(deps): bump postcss from 8.4.24 to 8.4.31
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.24 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.24...8.4.31)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-26 18:57:04 +00:00
Harvey Tindall
b2771e6cc5 auth: source cookie hostname from jfa_url
instead of just applying the cookie to the hostname you accessed jfa-go
on, it is applied to the one you set in jfa-go. The result is you'll
have to login twice if you access on localhost:8056 instead
of accounts.jellyf.in.
2024-08-13 20:39:06 +01:00
Harvey Tindall
3a0f61e324 config: add wiki links
main wiki link included with "about" and "user profiles". Sections with
a relevant page have a linked button next to their title when clicked.
Behaviour added by the "wiki_link" field in the "meta" section of a
config "section".
2024-08-10 20:19:38 +01:00
Harvey Tindall
655dc88c62 node: update deps 2023-09-08 18:21:09 +01:00
Harvey Tindall
f72960635d build: include debug symbols & sourcemaps in unstable builds
should help with debugging.
2023-06-26 23:48:16 +01:00
Harvey Tindall
f1b7ef303d Makefile: GOESBUIILD changes
doesn't ever install it if it's already present. Also moved it to
optional dependencies in package.json.
2023-06-23 21:31:33 +01:00
Harvey Tindall
cc4a97db28 userpage: fix card color in light mode 2023-06-21 11:05:38 +01:00
Harvey Tindall
68004e1d34 storage: user set/get methods for contact method access
Get/GetKey/SetKey/DeleteKey methods are used for access to
email/discord/telegram/matrix, everywhere. Mutex added for each, avoids
concurrent read/write issues. Will also make potential transition to
database easier.
2023-06-20 12:19:24 +01:00
Harvey Tindall
d3c5feaf1b userpage: use form langfile, move login strings to common
login-related stuff was moved into common using the langmover script, so
that the user page doesn't have to use the admin language files.
2023-06-17 12:48:28 +01:00
Harvey Tindall
4014e93155 signup: add reCAPTCHA
can be enabled in settings > captcha, requires a site key & secret key
from google. New wiki article explains getting these. currently a little
ugly looking on the page itself, hopefully fixable.
2023-06-15 17:11:27 +01:00
Harvey Tindall
ff62f8821a accounts: filter by date, with =, <, >
Uses "any-date-parser" library to understand more date/time types.
Format is: "<field>:<equals, less than, greater than><date>", where the
part after the colon uses =, <, >. Omitting a symbol is the same as
using "=".
2023-06-13 17:19:24 +01:00
Harvey Tindall
f13c0d78a8 accounts: ability to sort by columns
click on column header in account table to sort by it, click again to
change sort direction. Works for all of them.
2023-06-13 11:07:56 +01:00
Harvey Tindall
3e52beef14 update node deps, fix resulting issues 2023-06-12 18:44:10 +01:00
Harvey Tindall
04329bf171 fix issue with light mode colors 2022-12-29 17:32:59 +00:00
Harvey Tindall
8b52330304 remove unused nightwind dep 2022-03-22 15:09:38 +00:00
James Finch
6440f57467 Fixed Tailwind compiling issues. 2022-01-28 22:33:07 +00:00
James Finch
889d68dc7b Updated Tailwind version. 2022-01-27 16:32:01 +00:00
Harvey Tindall
d3990a6c55 upgrade vulnerable dependency 2022-01-26 14:37:14 +00:00
Harvey Tindall
1ebc648158 fix broken go template if statements
All available DOM parsers for node would move the contents of if
statements outside of them, breaking things like the accounts tab. Fixed
with a regex pre and post process to comment out then uncomment all template usage.

builds now depend on perl for some regex, this can likely be changed in
future though.
2022-01-08 00:07:23 +00:00
Harvey Tindall
acc8892f26 switch to DOM based variant adding 2021-12-30 23:52:53 +00:00
Harvey Tindall
18ae03554f tailwind: upgrade a17t, somewhat functional dark mode
instead of adding dark: variants to each element, a preprocessor script
adds them. still needs to be implemented to typescript.
2021-12-30 00:49:43 +00:00
Harvey Tindall
9092f42834 remove vulnerable node deps, cleanup 2021-11-14 14:50:40 +00:00
Harvey Tindall
fbe3553b25 fix missing last log line
Sometimes calls to app.err.Fatalf would fail to print the error to the
console, and fail to show "A crash report has been saves to...". Both of
these should be fixed now.
2021-09-18 13:43:11 +01:00
Harvey Tindall
0ea5c7fdc0 remove inline-css-cli build dep
unnecessary (inline-source-cli already includes its functionality) and a
dependency of it had a high-severity CVE (wouldn't have affected anyone,
but w/e).
2021-06-11 23:39:38 +01:00
Harvey Tindall
b538922c05 Show log on log.Fatal calls, provide "sanitized" version, fix goreleaser
Sanitization means change anything in double quotes to "CENSORED". A
notice is included telling the user to check for themselves as well.
2021-06-11 23:28:21 +01:00
Harvey Tindall
f0f4e8118e Generate crash report txt and webpage
The last 100 lines of logs are now cached, and when a crash occurs, they
are saved to a file in the temp directory ("/tmp" on *nix), and pretty
HTML version is also created and opened in the browser.
* Currently only handles panics, will be included in more places soon
* Copy button and button to generate a GH issue will be added
2021-06-11 21:56:53 +01:00
Harvey Tindall
555d5abf59 bump browserslist version 2021-05-31 18:53:21 +01:00
dependabot[bot]
ca7fb540ee Bump lodash from 4.17.20 to 4.17.21
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.20...4.17.21)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-11 21:24:34 +00:00
Harvey Tindall
c0f316d049 add preview to Announcements 2021-05-03 18:35:27 +01:00
Harvey Tindall
e6e5b0f3cf respect browser/os dark mode preference 2021-03-10 19:42:40 +00:00
Harvey Tindall
30bef15855 Trim commit before comparing in IsNew()
Fixes the current version appearing as an update. Also fixed error
handling when no update is available, which obviously hadn't previously
been experienced.
2021-03-09 15:52:15 +00:00
Harvey Tindall
92332206f0 add basic update functionality
If enabled, jfa-go pings buildrone (hosted at builds.hrfee.pw) every 30
min for new updates. If there is one, it gets information (and if
applicable, a binary) from the appropriate source (buildrone, github, or
dockerhub) and displays it on the admin page. You can switch update
channels between stable and unstable. For binary releases, updates are
downloaded automatically and installed when the user presses update.

Since this obviously introduces some "phone-home" functionality into
jfa-go, I just want to say IPs are not and will not be logged by
buildrone, although I may later introduce functionality to give a rough
idea of the number of users (again, no IPs stored). The whole thing can
also be turned off in settings.
2021-03-07 15:23:44 +00:00
Harvey Tindall
2934832a98 implement frontend for user expiry/duration
this will add an optional validity period to users, where their account
will be disabled (or deleted) a specified amount of time after they
created it.
2021-02-28 00:44:28 +00:00
Harvey Tindall
40fc5e9604 Fix email editor when plaintext setting enabled 2021-02-22 16:40:37 +00:00
Harvey Tindall
52d9cda61a Move email rendering to browser
the email preview no longer has a delay after each change. This also
avoids a race condition in which the email currently being edited could
be actually sent.
2021-02-22 00:43:36 +00:00
Harvey Tindall
5c87d109a3 use descriptive variable names in email translations
in preparation for an email editor.
2021-02-19 17:50:50 +00:00
Harvey Tindall
fa433c88a8 add announcement emails
After selecting users in the accounts tab, you can press 'Announce',
then write a subject and message (with markdown), and an email will be
sent to each selected user.
2021-02-18 14:58:53 +00:00
Harvey Tindall
adbb5b9d38 Fix filepath separator and external files on windows
For some reason, '/' is used instead of '\' on windows when loading
lang. FSJoin will now use whatever already exists in the path.
app.GetPath now creates a DirFS from the containing directory instead of
app.systemFS, which fixes loading on windows.
2021-02-18 12:58:30 +00:00
Harvey Tindall
403ad58274 move all scripts to scripts/ 2021-02-17 14:32:03 +00:00
Harvey Tindall
a1a233e74f fix sed path in Dockerfile 2021-02-17 11:33:41 +00:00
Harvey Tindall
8dd72c95ab switch image for drone builds 2021-02-17 11:19:51 +00:00
Harvey Tindall
f794322392 Merge branch 'go1.16'
merge go1.16 changes

This includes embedded files for releases (no extra 'data' directory!)
and support for a custom language file directory, allowing one to
customize the text accross the app.
2021-02-17 11:15:21 +00:00
Harvey Tindall
ba7370171a lowercase lang, go mod tidy 2021-02-16 14:31:31 +00:00