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

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.
This commit is contained in:
Harvey Tindall 2020-10-23 14:39:04 +01:00
parent 29775e2e75
commit 8089187b3e
Signed by: hrfee
GPG Key ID: BBC65952848FB1A2
8 changed files with 45 additions and 23 deletions

View File

@ -55,9 +55,9 @@ docker create \
```
#### Build from source
A Dockerfile is provided that creates an image built from source, but it's only suitable for those who will run jfa-go in docker.
If you're using docker, a Dockerfile is provided that builds from source.
Full build instructions can be found [here](https://github.com/hrfee/jfa-go/wiki/Build).
Otherwise, full build instructions can be found [here](https://github.com/hrfee/jfa-go/wiki/Build).
#### Usage
Simply run `jfa-go` to start the application. A setup wizard will start on `localhost:8056` (or your own specified address). Upon completion, refresh the page.

View File

@ -47,7 +47,9 @@ func (app *appContext) loadConfig() error {
// if key.MustString("") == "" && key.Name() != "custom_css" {
// key.SetValue(filepath.Join(app.data_path, (key.Name() + ".json")))
// }
key.SetValue(key.MustString(filepath.Join(app.data_path, (key.Name() + ".json"))))
if key.Name() != "html_templates" {
key.SetValue(key.MustString(filepath.Join(app.data_path, (key.Name() + ".json"))))
}
}
for _, key := range []string{"user_configuration", "user_displayprefs", "user_profiles", "ombi_template"} {
// if app.config.Section("files").Key(key).MustString("") == "" {

View File

@ -159,7 +159,7 @@
"requires_restart": true,
"type": "bool",
"value": false,
"description": "Use Bootstrap 5 (currently in alpha). This also removes the need for jQuery, so the page should load faster."
"description": "Use the Bootstrap 5 Alpha. Looks better and removes the need for jQuery, so the page should load faster."
}
},
"password_validation": {
@ -501,7 +501,7 @@
"ombi": {
"meta": {
"name": "Ombi Integration",
"description": "Connect to Ombi to automatically create a new user's account. You'll need to create an Ombi user template."
"description": "Connect to Ombi to automatically create both Ombi and Jellyfin accounts for new users. You'll need to create a user template for this to work. Once enabled, refresh to see an option in settings for this."
},
"enabled": {
"name": "Enabled",
@ -590,28 +590,28 @@
"description": "Location of stored Ombi user template."
},
"user_template": {
"name": "User Template",
"name": "User Template (Deprecated)",
"required": false,
"requires_restart": true,
"type": "text",
"value": "",
"description": "Deprecated. Location of stored user policy template (json)."
"description": "Deprecated in favor of User Profiles. Location of stored user policy template (json)."
},
"user_configuration": {
"name": "userConfiguration",
"name": "userConfiguration (Deprecated in favor of User Profiles.",
"required": false,
"requires_restart": true,
"type": "text",
"value": "",
"description": "Deprecated. Location of stored user configuration template (used for setting homescreen layout) (json)"
"description": "Deprecated in favor of User Profiles. Location of stored user configuration template (used for setting homescreen layout) (json)"
},
"user_displayprefs": {
"name": "displayPreferences",
"name": "displayPreferences (Deprecated in favor of User Profiles.",
"required": false,
"requires_restart": true,
"type": "text",
"value": "",
"description": "Deprecated. Location of stored displayPreferences template (also used for homescreen layout) (json)"
"description": "Deprecated in favor of User Profiles. Location of stored displayPreferences template (also used for homescreen layout) (json)"
},
"user_profiles": {
"name": "User Profiles",

View File

@ -93,8 +93,10 @@
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="usersTitle">Users</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<button type="button" class="{{ if .bs5 }}btn-{{ end }}close" data-dismiss="modal" aria-label="Close">
{{ if not .bs5 }}
<span aria-hidden="true">&times;</span>
{{ end }}
</button>
</div>
<div class="modal-body">
@ -112,8 +114,10 @@
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="defaultsTitle"></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<button type="button" class="{{ if .bs5 }}btn-{{ end }}close" data-dismiss="modal" aria-label="Close">
{{ if not .bs5 }}
<span aria-hidden="true">&times;</span>
{{ end }}
</button>
</div>
<div class="modal-body">
@ -156,8 +160,10 @@
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="ombiTitle">Ombi user defaults</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<button type="button" class="{{ if .bs5 }}btn-{{ end }}close" data-dismiss="modal" aria-label="Close">
{{ if not .bs5 }}
<span aria-hidden="true">&times;</span>
{{ end }}
</button>
</div>
<div class="modal-body">
@ -206,15 +212,17 @@
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">About</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<button type="button" class="{{ if .bs5 }}btn-{{ end }}close" data-dismiss="modal" aria-label="Close">
{{ if not .bs5 }}
<span aria-hidden="true">&times;</span>
{{ end }}
</button>
</div>
<div class="modal-body">
<img src="banner.svg" alt="jfa-go banner">
<p><a href="https://github.com/hrfee/jfa-go"><i class="fa fa-github"></i> jfa-go</a></p>
<p>Version <i>{{ .version }}</i></p>
<p>Commit <i>{{ .commit }}</i></p>
<p>Version <i class="text-monospace">{{ .version }}</i></p>
<p>Commit <i class="text-monospace">{{ .commit }}</i></p>
<p><a href="https://github.com/hrfee/jfa-go/blob/main/LICENSE">Available under the MIT License.</a></p>
</div>
</div>
@ -225,8 +233,10 @@
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteModalTitle"></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<button type="button" class="{{ if .bs5 }}btn-{{ end }}close" data-dismiss="modal" aria-label="Close">
{{ if not .bs5 }}
<span aria-hidden="true">&times;</span>
{{ end }}
</button>
</div>
<div class="modal-body">
@ -251,8 +261,10 @@
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Create a user</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<button type="button" class="{{ if .bs5 }}btn-{{ end }}close" data-dismiss="modal" aria-label="Close">
{{ if not .bs5 }}
<span aria-hidden="true">&times;</span>
{{ end }}
</button>
</div>
<div class="modal-body">

6
package-lock.json generated
View File

@ -205,9 +205,9 @@
"integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24="
},
"bootstrap": {
"version": "5.0.0-alpha1",
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.0.0-alpha1.tgz",
"integrity": "sha512-iwKneP2pLXl8lN0YpnOuOARiNPTzmh/4cw+Un86u4OqrMLuQpyMC7nO07hvivvcg0B/ektJPjuPnS1s+YmRK9A=="
"version": "5.0.0-alpha2",
"resolved": "https://registry.npm.taobao.org/bootstrap/download/bootstrap-5.0.0-alpha2.tgz",
"integrity": "sha1-43zlg271fGkdfiNp9zgbhy0hX4M="
},
"bootstrap4": {
"version": "npm:bootstrap@4.5.0",

View File

@ -19,7 +19,7 @@
"dependencies": {
"@types/jquery": "^3.5.3",
"autoprefixer": "^9.8.5",
"bootstrap": "^5.0.0-alpha1",
"bootstrap": "^5.0.0-alpha2",
"bootstrap4": "npm:bootstrap@^4.5.0",
"clean-css-cli": "^4.3.0",
"esbuild": "^0.7.8",

View File

@ -120,3 +120,7 @@ body.modal-open {
.unfocused {
display: none;
}
.text-monospace {
font-family: monospace;
}

View File

@ -142,4 +142,8 @@ $list-group-action-active-bg: $jf-blue-focus;
background-color: $jf-blue-hover;
}
.btn-close {
filter: invert(80%);
}
@import "../base.scss";