updated readme

This commit is contained in:
Graham Steffaniak 2023-09-02 13:02:50 -05:00
parent 0338a7b947
commit f1e05c583a
6 changed files with 15 additions and 15 deletions

View File

@ -5,12 +5,14 @@ All notable changes to this project will be documented in this file. See [standa
# v0.2.0
- Works with new more advanced filebrowser.json
- improved GUI
- more unified coehisive look
- Adjusted header bar look and icon behavior
- The shell is dead.
- If you need to use the shell, exec into the docker container.
- All configuration is done via filebrowser.yml
- If you need to use custom commands, exec into the docker container.
- All configuration is done via `filebrowser.yaml`
- Removed old code to migrate database veresions
- Removed all unused cmd code
# v0.1.4
- various UI fixes

View File

@ -44,7 +44,7 @@ func addConfigFlags(flags *pflag.FlagSet) {
}
//nolint:gocyclo
func getAuthentication() (string, auth.Auther) {
func getAuthentication() auth.Auther {
method := settings.GlobalConfiguration.Auth.Method
var defaultAuther map[string]interface{}
var auther auth.Auther
@ -111,7 +111,7 @@ func getAuthentication() (string, auth.Auther) {
panic(errors.ErrInvalidAuthMethod)
}
return method, auther
return auther
}
func printSettings(ser *settings.Server, set *settings.Settings, auther auth.Auther) {

View File

@ -23,14 +23,12 @@ to the defaults when creating new users and you don't
override the options.`,
Args: cobra.NoArgs,
Run: python(func(cmd *cobra.Command, args []string, d pythonData) {
defaults := settings.UserDefaults{}
flags := cmd.Flags()
getUserDefaults(flags, &defaults, true)
_, auther := getAuthentication()
ser := &settings.GlobalConfiguration.Server
err := d.store.Settings.Save(&settings.GlobalConfiguration)
auther := getAuthentication()
s := settings.GlobalConfiguration
s.Key = generateKey()
err := d.store.Settings.Save(&s)
checkErr(err)
err = d.store.Settings.SaveServer(ser)
err = d.store.Settings.SaveServer(&s.Server)
checkErr(err)
err = d.store.Auth.Save(auther)
checkErr(err)
@ -40,6 +38,6 @@ Congratulations! You've set up your database to use with File Browser.
Now add your first user via 'filebrowser users add' and then you just
need to call the main command to boot up the server.
`)
printSettings(ser, &settings.GlobalConfiguration, auther)
printSettings(&s.Server, &s, auther)
}, pythonConfig{noDB: true}),
}

View File

@ -62,7 +62,7 @@ you want to change. Other options will remain unchanged.`,
getUserDefaults(flags, &set.UserDefaults, false)
// read the defaults
_, auther := getAuthentication()
auther := getAuthentication()
err = d.store.Auth.Save(auther)
checkErr(err)
err = d.store.Settings.Save(set)

View File

@ -11,7 +11,7 @@ var GlobalConfiguration Settings
func init() {
// Open and read the YAML file
yamlFile, err := os.Open("filebrowser.yml")
yamlFile, err := os.Open("filebrowser.yaml")
if err != nil {
log.Fatalf("Error opening YAML file: %v", err)
}