Skip to content

Commit

Permalink
small changes, new images and readme updated
Browse files Browse the repository at this point in the history
  • Loading branch information
hrfee committed Sep 24, 2020
1 parent 64ad8cc commit e104bd8
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 8 deletions.
6 changes: 4 additions & 2 deletions README.md
Expand Up @@ -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.
* Send invites via a link and/or email
* 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.
* 🔗 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.
* 📨 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
* 🔑 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.
Expand Down Expand Up @@ -76,6 +76,8 @@ Usage of ./jfa-go:
alternate address to host web ui on.
-port int
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:
Expand Down
5 changes: 4 additions & 1 deletion data/templates/admin.html
Expand Up @@ -134,7 +134,10 @@ <h5 class="modal-title" id="defaultsTitle"></h5>
<label for="newProfileName" class="form-label">Name</label>
<input type="text" class="form-control" id="newProfileName" aria-describedby="Profile Name">
</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;">
<input class="form-check-input" type="checkbox" value="" id="storeDefaultHomescreen" checked>
<label class="form-check-label" for="storeDefaultHomescreen" id="storeHomescreenLabel"></label>
Expand Down
Binary file modified images/accounts.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/demo.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/invites.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions main.go
Expand Up @@ -590,8 +590,12 @@ func flagPassed(name string) (found bool) {
// @tag.name Other
// @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)))
}

func main() {
printVersion()
folder := "/tmp"
if PLATFORM == "windows" {
folder = os.Getenv("TEMP")
Expand Down Expand Up @@ -631,7 +635,7 @@ func main() {
RESTART = make(chan bool, 1)
start(false, true)
for {
fmt.Printf("jfa-go version: %s (%s)\n", VERSION, COMMIT)
printVersion()
start(false, false)
}
}
Expand Down
4 changes: 2 additions & 2 deletions ts/accounts.ts
Expand Up @@ -263,14 +263,14 @@ function populateRadios(): void {
Focus(document.getElementById('defaultsSourceSection'));
(<HTMLSelectElement>document.getElementById('defaultsSource')).value = 'profile';
Focus(document.getElementById('profileSelectBox'));
Unfocus(document.getElementById('defaultUserRadios'));
Unfocus(document.getElementById('defaultUserRadiosBox'));
Unfocus(document.getElementById('newProfileBox'));
document.getElementById('storeDefaults').onclick = (): void => storeDefaults(userIDs);
userDefaultsModal.show();
};

(<HTMLSelectElement>document.getElementById('defaultsSource')).addEventListener('change', function (): void {
const radios = document.getElementById('defaultUserRadios');
const radios = document.getElementById('defaultUserRadiosBox');
const profileBox = document.getElementById('profileSelectBox');
if (this.value == 'profile') {
Unfocus(radios);
Expand Down
2 changes: 1 addition & 1 deletion ts/settings.ts
Expand Up @@ -204,7 +204,7 @@ const createProfile = (): void => _get("/users", null, function (): void {
(document.getElementById('storeDefaults') as HTMLButtonElement).onclick = storeProfile;
Focus(document.getElementById('newProfileBox'));
(document.getElementById('newProfileName') as HTMLInputElement).value = '';
Focus(document.getElementById('defaultUserRadios'));
Focus(document.getElementById('defaultUserRadiosBox'));
userDefaultsModal.show();
}
});
Expand Down

0 comments on commit e104bd8

Please sign in to comment.