1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-12-22 17:10:10 +00:00
Commit Graph

1821 Commits

Author SHA1 Message Date
eefd350754
Merge pull request #361 from hrfee/dependabot/npm_and_yarn/site/word-wrap-1.2.5
build(deps): bump word-wrap from 1.2.3 to 1.2.5 in /site
2024-08-26 18:59:48 +00:00
dependabot[bot]
e901ba6bb5
build(deps): bump word-wrap from 1.2.3 to 1.2.5 in /site
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.5.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.5)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-26 18:58:53 +00:00
37545e1e36
Merge pull request #297 from hrfee/dependabot/npm_and_yarn/postcss-8.4.31
build(deps): bump postcss from 8.4.24 to 8.4.31
2024-08-26 18:57:51 +00: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
a4c60c71ea
update go.mods
tried to lower required version, most subpackages worked, however some
other dependency means the main package requires 1.22.
2024-08-26 17:26:04 +01:00
9e9f46d97b
build: remove compile_mjml script, no python!
if I had taken a second to actually read the documentation, i'd have
    realized the mjml command can process a bunch of files at once.
    On my machine, cuts time down from ~800ms to ~500ms.
While there are still some scripts using python, none are needed to
build the software anymore, so no python build deps!
2024-08-26 17:01:34 +01:00
f063b970b4
config: migrate to new yaml format
config-base.yaml is almost identical to json version, except there's no "order" field, as
"sections" and "settings" fields are now lists themselves and so Go can
parse the correct order. As such, removed enumerate_config.py. Also,
rewrote scripts/generate_ini.py in Go as scripts/ini/. Config structure
in Go form is now in common/config.go, and is used by jfa-go and the ini
script. app.configBase is now untouched once read from config-base.yaml,
and instead copied to and patched in app.patchedConfig. Patching occurs
at program start and config modification, so GetConfig is now just a
couple of lines. Discord role patching still occurs in GetConfig, as the
available roles can change regularly. Also added new "Disabled" field to
sections, to avoid the nightmare of deleting from an array.
2024-08-26 15:43:28 +01:00
711b817cff
auth: add note for self about secure cookies 2024-08-24 15:25:08 +01:00
fcdd4e4518
revert stringResponse change
should have been a separate commit with other changes.
2024-08-24 15:16:50 +01:00
6c30a1ff40
form/admin: don't allow "+" in username/email
Jellyfin doesn't like this.
2024-08-24 15:04:18 +01:00
a7aa3fd53e
settings: de-dupe settings
all DOM elements now based off DOMSetting, which encompasses most
functionality. Extending classes (i forgot the terminology) pretty much just pass a
custom "input" element, "hider" element (the one to unfocus). DOMList
and DOMSelect remain slightly more complicated, but are much cleaner
now. Some CSS stuff has been adjusted too.
2024-08-24 13:09:22 +01:00
32161139b2
settings: dependencies of dependencies
`settings-set-${section}-${name}` is now broadcast when a setting's
value is actually changed, while `settings-${section}-${name}` is
broadcast then or if the setting is hidden, i.e. by its parent (i.e.
some "enabled" bool). This allows chains of dependencies to be resolved
visually. When a setting is hidden, the value sent is "false", and when
a setting is shown again, the actual value of it is sent.
2024-08-23 18:50:50 +01:00
7c808b56f7
api: adjust a couple of URIs
adjusted some things, likke changing /newUser to /user/invite.
2024-08-21 20:35:08 +01:00
2057823b7a
setup: flex-ify, light/dark, keep page position on reload
got rid of a bunch of m[l/r/x/y]-x tailwind classes and used more
flex-[row/col] gap-2's. UI should be more consistent in general, and
with the admin UI.

The page you were on is actually read from the URL on reload, however
does not keep settings (implemented just for ease of UI editing,
really).

`missing-colors.js` preprocessor script now applies dark prefixes for
<section>s, but like with cards, does not apply a default ~neutral to
those without, so that <section class=""> looks different to <section
class="~neutral">.

Light/dark selector added to setup too, and the actual mode given to the
browser through CSS `color-scheme` is correct, meaning things like textareas, checkboxes and
controls are now colored according to the theme.
2024-08-21 18:31:54 +01:00
e5f79c60ae
webhooks: add "user created" webhook
Webhooks send a POST to an admin-supplied URL when something happens,
with relevant information sent in JSON. One has been added for creating
users in Settings > Webhooks > User Created.

Lazily, the portion of GetUsers which generates a respUser has been
factored out, and is called to send the JSON payload.

A stripped-down common.Req method has been added, which is used by the
barebones WebhookSender struct.
2024-08-20 21:45:31 +01:00
8307d3da90
proxy: use for updater
don't know how I missed before.
2024-08-20 20:38:18 +01:00
6bad293f74
config: add support for "list" type
"list" is a list of strings, represented in the .ini as repeated entries
for a field, e.g.
url = myurl1
url = myurl2
Shown in the UI as multiple inputs with delete buttons.
2024-08-20 20:19:32 +01:00
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
e71d492495
config: migrate "url_base" dupes to "jfa_url"
URL Base now refers to JUST the subfolder portion, i.e. `/accounts` if
you access jfa-go at `http://jellyf.in/accounts`. General > "jfa_url"/"External
jfa-go URL" now refers to the WHOLE URL you access jfa-go at, i.e.
`http://jellyf.in/accounts`. The settings in "invite emails" and
"password resets" have been removed, and a value chosen from the two
applied to "jfa_url". Migration also makes a config backup. Adds a
"deprecated" flag to config-base, which just tells the UI to not show
it (for now). Also added some warnings related to the URL base /
External URL.
2024-08-12 18:53:46 +01:00
0e7245e6b9
update: distinguish E2EE builds
done in the same way as TrayIcon
2024-08-11 20:00:55 +01:00
59e9d457c2
README: Add e2ee explanation, config note
next to TrayIcon one. New note in config tells you why E2EE might be
missing.
2024-08-11 19:03:05 +01:00
48be756e48
build: e2ee as separate build
Forgot that E2EE adds the libolm dependency, which is fine for the
package manager versions (where it is now marked a a dep) and docker, but not the
best for binary distributions. As a result, Linux versions with and
without E2EE are now distributed, the former now including "MatrixE2EE"
in its filename.
2024-08-11 18:53:00 +01:00
ab3989f233
admin: add build tags to "About"
build tags like e2ee and external are now included in the about page.
2024-08-11 17:55:12 +01:00
d2c7bf06f7
build: correct updater on docker 2024-08-11 17:39:58 +01:00
3f59312dfc
build: copy data into correct location in dockerfile 2024-08-11 17:27:30 +01:00
d62add0195
build: fix nfpm packaging for e2ee 2024-08-11 17:23:38 +01:00
fd32b73132
build: attempt to fix dockerfile 2024-08-11 17:06:06 +01:00
2d7f44eeec
build: use goreleaser within dockerfile
jfa-go-build-docker has also been updated with libolm deps for all
arches, and version.sh now tells goreleaser to do internal or external.
2024-08-11 16:28:21 +01:00
cf5ec3b319
build: fix dockerfile for E2EE 2024-08-10 21:43:16 +01:00
2237286656
build: enable E2EE by default, partially in CI
Makefile enables E2EE by default. Due to the CGO and hence cross
compilers required, only linux amd64/arm64/armhf and windows amd64 is being built with the
feature included. Uses a new jfa-go-build-docker with
arm-linux-gnueabihf-gcc.
2024-08-10 21:11:11 +01:00
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
69569e556a
matrix: working E2EE, on by default
mautrix-go now include a cryptohelper package, which solves all my
issues and just works. the setting is now on by default, however
packages are not yet built with it.
2024-08-10 19:31:54 +01:00
86c7551ff8
proxy: use wherever http.Client is, update mautrix
Added a new common.ConfigurableTransport interface which mediabrowser,
ombi, jellyseer, discord, telegram and matrix (i.e.
ThirdPartService/ContactMethodLinker) now all implement. proxies are
bound to them in main.go, Email is still a special case (but from the
previous commit, mailgun does use the proxy).

mautrix/go has been updated, and context.TODO()s stuck everywhere since
I still don't really comprehend why I should use them (FIXME literally).
2024-08-09 21:42:16 +01:00
a52dd26ec6
email: use proxy for mailgun, too
adds proxy transport to the http.Client in the mailgun api client.
2024-08-09 21:11:18 +01:00
6308db495a
build: push redoc after build 2024-08-06 21:06:06 +01:00
ef7132bf3d
build: de-dupe goreleaser
I don't really know why I duplicated the build process in
.goreleaser.yaml, when I could have just called the Makefile.
2024-08-06 20:47:54 +01:00
790accc007
build: Update dockerfile for new Makefile
added a "precompile" step which takes the place of the "configuration
email swager..." stuff.
2024-08-06 20:34:28 +01:00
2310130e6b
api clients: return data, error, no status
jellyseerr already did this, but it's been standardised a little more.

Mediabrowser uses it's own genericErr function and error types due to
being a separate package, while jellyseerr and ombi now share errors
defined in common/.
2024-08-06 14:48:31 +01:00
284312713c
web: css adjustments
tailwind classes define what "page-container" previously did, with some
changes. Logout button moved to top of screen.
2024-08-05 21:18:32 +01:00
b40211a6e0
settings: add loader, improve css a bit
Loader appears on about/user profiles area. These two are now shown next
to each other.
on small screens, the sidebar list of sections is displayed without a
card around it, and the top left/right corner buttons on all pages are
correctly aligned with the content.
2024-08-05 20:23:10 +01:00
ce6a5772b1
build: rewrite Makefile properly (incremental builds)
Probably still a little rough around the edges, but supports the actual
use case of GMake, which I believe are called incremental builds. Builds
will only occur when the code is changed, and only the necessary bits
are re-compiled.
2024-08-05 18:46:21 +01:00
86c37fb423
expiry: add option to delete after n days
Much like activities, you can have an expired account disabled, then
deleted after n days (unless the admin intervenes and re-enables the
account).

For #341.
2024-08-05 14:09:02 +01:00
3c3297c8e7
userpage: bump mediabrowser version
so that usernames are compared un-case-sensitively in UserByName. For #354.
2024-08-05 12:37:42 +01:00
a9dc601751
web: fix intermittent "coudln't connect" on page load
was caused by language selector loader, simply added a
"noConnectionError" param to the _get/_post... methods which is enabled
for it.
2024-08-04 21:57:17 +01:00
51e3c37694
build: DBEUG=on disables minification 2024-08-04 21:57:07 +01:00
62e27c394d
build: include latest banner automatically
now copied from images/ into static/ on build.
2024-08-04 21:04:20 +01:00
8f3c723b07
systemd: get executable path properly
was just evaluating os.Args[0], which incorrectly points to your current
directory if jfa-go was in your PATH (i.e. you ran `jfa-go` not
`/usr/bin/jfa-go`). Uses Go's os.Executable() now. Fixes #352.
2024-08-04 20:53:09 +01:00
3c28537498
lang: rename ckb.json
hopefully correct.
2024-08-04 19:07:39 +01:00
b0e94a4ef6
merge lang 2024-08-04 19:03:53 +01:00
baeb89b694
setup: add jellyseer, reference wiki for PWR
add jellyseerr section along with ombi, and add a warning about ombi.
A link to the PWR wiki page is given to explain the different methods.
2024-08-04 19:03:00 +01:00