1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-12-23 01:20:11 +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 #### 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 #### 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. 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,8 +47,10 @@ func (app *appContext) loadConfig() error {
// if key.MustString("") == "" && key.Name() != "custom_css" { // if key.MustString("") == "" && key.Name() != "custom_css" {
// key.SetValue(filepath.Join(app.data_path, (key.Name() + ".json"))) // key.SetValue(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")))) key.SetValue(key.MustString(filepath.Join(app.data_path, (key.Name() + ".json"))))
} }
}
for _, key := range []string{"user_configuration", "user_displayprefs", "user_profiles", "ombi_template"} { for _, key := range []string{"user_configuration", "user_displayprefs", "user_profiles", "ombi_template"} {
// if app.config.Section("files").Key(key).MustString("") == "" { // if app.config.Section("files").Key(key).MustString("") == "" {
// key.SetValue(filepath.Join(app.data_path, (key.Name() + ".json"))) // key.SetValue(filepath.Join(app.data_path, (key.Name() + ".json")))

View File

@ -159,7 +159,7 @@
"requires_restart": true, "requires_restart": true,
"type": "bool", "type": "bool",
"value": false, "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": { "password_validation": {
@ -501,7 +501,7 @@
"ombi": { "ombi": {
"meta": { "meta": {
"name": "Ombi Integration", "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": { "enabled": {
"name": "Enabled", "name": "Enabled",
@ -590,28 +590,28 @@
"description": "Location of stored Ombi user template." "description": "Location of stored Ombi user template."
}, },
"user_template": { "user_template": {
"name": "User Template", "name": "User Template (Deprecated)",
"required": false, "required": false,
"requires_restart": true, "requires_restart": true,
"type": "text", "type": "text",
"value": "", "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": { "user_configuration": {
"name": "userConfiguration", "name": "userConfiguration (Deprecated in favor of User Profiles.",
"required": false, "required": false,
"requires_restart": true, "requires_restart": true,
"type": "text", "type": "text",
"value": "", "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": { "user_displayprefs": {
"name": "displayPreferences", "name": "displayPreferences (Deprecated in favor of User Profiles.",
"required": false, "required": false,
"requires_restart": true, "requires_restart": true,
"type": "text", "type": "text",
"value": "", "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": { "user_profiles": {
"name": "User Profiles", "name": "User Profiles",

View File

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

6
package-lock.json generated
View File

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

View File

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

View File

@ -120,3 +120,7 @@ body.modal-open {
.unfocused { .unfocused {
display: none; 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; background-color: $jf-blue-hover;
} }
.btn-close {
filter: invert(80%);
}
@import "../base.scss"; @import "../base.scss";