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

small changes, new images and readme updated

This commit is contained in:
Harvey Tindall 2020-09-24 23:57:42 +01:00
parent 64ad8ccf6e
commit e104bd8362
Signed by: hrfee
GPG Key ID: BBC65952848FB1A2
8 changed files with 17 additions and 8 deletions

View File

@ -8,11 +8,11 @@ I chose to rewrite the python [jellyfin-accounts](https://github.com/hrfee/jelly
* 🧑 Invite based account creation: Sends invites to your friends or family, and let them choose their own username and password without relying on you. * 🧑 Invite based account creation: Sends invites to your friends or family, and let them choose their own username and password without relying on you.
* Send invites via a link and/or email * Send invites via a link and/or email
* Granular control over invites: Validity period as well as number of uses can be specified. * Granular control over invites: Validity period as well as number of uses can be specified.
* Account defaults: Configure an example account to your liking, and its permissions, access rights and homescreen layout can be applied to all new users. * Account profiles: Assign settings profiles to invites so new users have your predefined permissions, homescreen layout, etc. applied to their account on creation.
* Password validation: Ensure users choose a strong password. * Password validation: Ensure users choose a strong password.
* 🔗 Ombi Integration: Automatically creates Ombi accounts for new users using their email address and login details, and your own defined set of permissions. * 🔗 Ombi Integration: Automatically creates Ombi accounts for new users using their email address and login details, and your own defined set of permissions.
* Account management: Apply settings to your users individually or en masse, and delete users, optionally sending them an email notification with a reason. * Account management: Apply settings to your users individually or en masse, and delete users, optionally sending them an email notification with a reason.
* 📨 Email storage: Add your existing user's email addresses through the UI, and jfa-go will ask new users for them on account creation. * 📨 Email storage: Add your existing users email addresses through the UI, and jfa-go will ask new users for them on account creation.
* Email addresses can optionally be used instead of usernames * Email addresses can optionally be used instead of usernames
* 🔑 Password resets: When user's forget their passwords and request a change in Jellyfin, jfa-go reads the PIN from the created file and sends it straight to the user via email. * 🔑 Password resets: When user's forget their passwords and request a change in Jellyfin, jfa-go reads the PIN from the created file and sends it straight to the user via email.
* Notifications: Get notified when someone creates an account, or an invite expires. * Notifications: Get notified when someone creates an account, or an invite expires.
@ -76,6 +76,8 @@ Usage of ./jfa-go:
alternate address to host web ui on. alternate address to host web ui on.
-port int -port int
alternate port to host web ui on. alternate port to host web ui on.
-swagger
Enable swagger at /swagger/index.html
``` ```
If you're switching from jellyfin-accounts, copy your existing `~/.jf-accounts` to: If you're switching from jellyfin-accounts, copy your existing `~/.jf-accounts` to:

View File

@ -134,7 +134,10 @@
<label for="newProfileName" class="form-label">Name</label> <label for="newProfileName" class="form-label">Name</label>
<input type="text" class="form-control" id="newProfileName" aria-describedby="Profile Name"> <input type="text" class="form-control" id="newProfileName" aria-describedby="Profile Name">
</div> </div>
<div id="defaultUserRadios"></div> <div id="defaultUserRadiosBox">
<label for="defaultUserRadios" class="form-label">Get settings from</label>
<div id="defaultUserRadios"></div>
</div>
<div class="form-check" style="margin-top: 1rem;"> <div class="form-check" style="margin-top: 1rem;">
<input class="form-check-input" type="checkbox" value="" id="storeDefaultHomescreen" checked> <input class="form-check-input" type="checkbox" value="" id="storeDefaultHomescreen" checked>
<label class="form-check-label" for="storeDefaultHomescreen" id="storeHomescreenLabel"></label> <label class="form-check-label" for="storeDefaultHomescreen" id="storeHomescreenLabel"></label>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 68 KiB

View File

@ -590,8 +590,12 @@ func flagPassed(name string) (found bool) {
// @tag.name Other // @tag.name Other
// @tag.description Things that dont fit elsewhere. // @tag.description Things that dont fit elsewhere.
func main() { func printVersion() {
fmt.Print(aurora.Sprintf(aurora.Magenta("jfa-go version: %s (%s)\n"), aurora.BrightWhite(VERSION), aurora.White(COMMIT))) fmt.Print(aurora.Sprintf(aurora.Magenta("jfa-go version: %s (%s)\n"), aurora.BrightWhite(VERSION), aurora.White(COMMIT)))
}
func main() {
printVersion()
folder := "/tmp" folder := "/tmp"
if PLATFORM == "windows" { if PLATFORM == "windows" {
folder = os.Getenv("TEMP") folder = os.Getenv("TEMP")
@ -631,7 +635,7 @@ func main() {
RESTART = make(chan bool, 1) RESTART = make(chan bool, 1)
start(false, true) start(false, true)
for { for {
fmt.Printf("jfa-go version: %s (%s)\n", VERSION, COMMIT) printVersion()
start(false, false) start(false, false)
} }
} }

View File

@ -263,14 +263,14 @@ function populateRadios(): void {
Focus(document.getElementById('defaultsSourceSection')); Focus(document.getElementById('defaultsSourceSection'));
(<HTMLSelectElement>document.getElementById('defaultsSource')).value = 'profile'; (<HTMLSelectElement>document.getElementById('defaultsSource')).value = 'profile';
Focus(document.getElementById('profileSelectBox')); Focus(document.getElementById('profileSelectBox'));
Unfocus(document.getElementById('defaultUserRadios')); Unfocus(document.getElementById('defaultUserRadiosBox'));
Unfocus(document.getElementById('newProfileBox')); Unfocus(document.getElementById('newProfileBox'));
document.getElementById('storeDefaults').onclick = (): void => storeDefaults(userIDs); document.getElementById('storeDefaults').onclick = (): void => storeDefaults(userIDs);
userDefaultsModal.show(); userDefaultsModal.show();
}; };
(<HTMLSelectElement>document.getElementById('defaultsSource')).addEventListener('change', function (): void { (<HTMLSelectElement>document.getElementById('defaultsSource')).addEventListener('change', function (): void {
const radios = document.getElementById('defaultUserRadios'); const radios = document.getElementById('defaultUserRadiosBox');
const profileBox = document.getElementById('profileSelectBox'); const profileBox = document.getElementById('profileSelectBox');
if (this.value == 'profile') { if (this.value == 'profile') {
Unfocus(radios); Unfocus(radios);

View File

@ -204,7 +204,7 @@ const createProfile = (): void => _get("/users", null, function (): void {
(document.getElementById('storeDefaults') as HTMLButtonElement).onclick = storeProfile; (document.getElementById('storeDefaults') as HTMLButtonElement).onclick = storeProfile;
Focus(document.getElementById('newProfileBox')); Focus(document.getElementById('newProfileBox'));
(document.getElementById('newProfileName') as HTMLInputElement).value = ''; (document.getElementById('newProfileName') as HTMLInputElement).value = '';
Focus(document.getElementById('defaultUserRadios')); Focus(document.getElementById('defaultUserRadiosBox'));
userDefaultsModal.show(); userDefaultsModal.show();
} }
}); });