1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-11-14 14:20:11 +00:00
Commit Graph

49 Commits

Author SHA1 Message Date
f72960635d
build: include debug symbols & sourcemaps in unstable builds
should help with debugging.
2023-06-26 23:48:16 +01:00
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
cc4a97db28
userpage: fix card color in light mode 2023-06-21 11:05:38 +01:00
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
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
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
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
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
3e52beef14
update node deps, fix resulting issues 2023-06-12 18:44:10 +01:00
04329bf171
fix issue with light mode colors 2022-12-29 17:32:59 +00:00
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
d3990a6c55
upgrade vulnerable dependency 2022-01-26 14:37:14 +00:00
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
acc8892f26
switch to DOM based variant adding 2021-12-30 23:52:53 +00:00
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
9092f42834
remove vulnerable node deps, cleanup 2021-11-14 14:50:40 +00:00
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
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
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
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
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
c0f316d049
add preview to Announcements 2021-05-03 18:35:27 +01:00
e6e5b0f3cf
respect browser/os dark mode preference 2021-03-10 19:42:40 +00:00
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
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
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
40fc5e9604
Fix email editor when plaintext setting enabled 2021-02-22 16:40:37 +00:00
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
5c87d109a3
use descriptive variable names in email translations
in preparation for an email editor.
2021-02-19 17:50:50 +00:00
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
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
403ad58274
move all scripts to scripts/ 2021-02-17 14:32:03 +00:00
a1a233e74f
fix sed path in Dockerfile 2021-02-17 11:33:41 +00:00
8dd72c95ab
switch image for drone builds 2021-02-17 11:19:51 +00:00
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
ba7370171a
lowercase lang, go mod tidy 2021-02-16 14:31:31 +00:00
ea99966057
refactor, move route loading to router.go 2021-02-12 14:59:16 +00:00
c2e68bdc77
add GOESBUILD option for platform without esbuild on npm 2021-02-11 18:21:21 +00:00
eb370d64df
Merge a17t-redesign, kinda ts-ify setup.js
the web ui has been redesigned with the a17t toolkit, which imo looks a
lot better than bootstrap. This also brought a complete rework of the
web code, which now makes a lot more sense hopefully. the setup page is
still stuck with bootstrap, its not much of a priority but i'll rewrite
it eventually.
2021-01-05 18:16:23 +00:00
ea80d2cb78
upgrade to bs5-alpha3
still works fine, so no code changes needed.
2020-11-15 17:16:57 +00:00
8089187b3e
use bs5 alpha2, config description changes
alpha2's new close buttons are used, also fixed html_templates
settings being automatically filled in with an incorrect value.
2020-10-23 14:39:04 +01:00
301f502052
Rework typescript to use modules
web UI now uses modules, and relies less on bodge to make things work.
Also fixes an issue where invites where "failed to send to xx" appeared
in invite form.
2020-10-22 17:50:40 +01:00
04a4a4ca95
use esbuild to compile and minify ts
tsc is still used for ts-debug.
2020-09-29 20:35:06 +01:00
32b8ed4aa2
rewrite* most web ui code in typescript
i wanted to split up the web ui components into multiple files, and
figured it'd be a good chance to try out typescript. run make typescript
to compile everything in ts/ and put it in data/static/.

This is less of a rewrite and more of a refactoring, most of it still
works the same but bits have been cleaned up too.

Remaining javascript found in setup.js and form.html
2020-09-21 22:06:27 +01:00
73886fc037
rewrite accounts.js in typescript
slight refactor too.
2020-09-20 14:48:17 +01:00
62621dabb9 CLI flags, start setting up goreleaser, add build scripts
Copied and fixed the build scripts from jf-accounts, added them to the
.goreleaser.yml. Also:
data directory now stored in user's config folder
Handle timeouts in jfapi
Maybe more i forgot about.
2020-08-01 21:20:02 +01:00