Rename manager to browser (#406)

* rename File Manager to File Browser

* rename fm to fb


Former-commit-id: 82cd461b7efa992114a6cb6a3bb7fbae53558f42 [formerly 18b0295100462d2c798177086ddc3f615c50ca71] [formerly 5927828ac67268438cc6de00fcaf9140a8620794 [formerly 7643b0c4e3]]
Former-commit-id: 3661e0339db83f5e4e3afa9bcb1015401afb611d [formerly 50eb65db9848c8db82115913fb58399fc371d990]
Former-commit-id: 03e42a5b429a3f0a83c88799e086a4c51c5e031d
This commit is contained in:
1138-4EB
2018-04-23 23:42:52 +02:00
committed by Henrique Dias
parent 5a8c28fa6d
commit e278dbba65
16 changed files with 225 additions and 225 deletions

View File

@@ -22,7 +22,7 @@ import (
)
const (
// Version is the current File Manager version.
// Version is the current File Browser version.
Version = "(untracked)"
ListViewMode = "list"
@@ -58,7 +58,7 @@ type FileBrowser struct {
Store *Store
// PrefixURL is a part of the URL that is already trimmed from the request URL before it
// arrives to our handlers. It may be useful when using File Manager as a middleware
// arrives to our handlers. It may be useful when using File Browser as a middleware
// such as in caddy-filemanager plugin. It is only useful in certain situations.
PrefixURL string
@@ -115,9 +115,9 @@ type FSBuilder func(scope string) FileSystem
// Setup loads the configuration from the database and configures
// the Assets and the Cron job. It must always be run after
// creating a File Manager object.
// creating a File Browser object.
func (m *FileBrowser) Setup() error {
// Creates a new File Manager instance with the Users
// Creates a new File Browser instance with the Users
// map and Assets box.
m.Assets = rice.MustFindBox("./node_modules/filebrowser-frontend/dist")
m.Cron = cron.New()
@@ -221,7 +221,7 @@ func (m *FileBrowser) Setup() error {
}
// RootURL returns the actual URL where
// File Manager interface can be accessed.
// File Browser interface can be accessed.
func (m FileBrowser) RootURL() string {
return m.PrefixURL + m.BaseURL
}
@@ -235,7 +235,7 @@ func (m *FileBrowser) SetPrefixURL(url string) {
m.PrefixURL = strings.TrimSuffix(url, "/")
}
// SetBaseURL updates the baseURL of a File Manager
// SetBaseURL updates the baseURL of a File Browser
// object.
func (m *FileBrowser) SetBaseURL(url string) {
url = strings.TrimPrefix(url, "/")
@@ -244,7 +244,7 @@ func (m *FileBrowser) SetBaseURL(url string) {
m.BaseURL = strings.TrimSuffix(url, "/")
}
// Attach attaches a static generator to the current File Manager.
// Attach attaches a static generator to the current File Browser.
func (m *FileBrowser) Attach(s StaticGen) error {
if reflect.TypeOf(s).Kind() != reflect.Ptr {
return errors.New("data should be a pointer to interface, not interface")
@@ -290,7 +290,7 @@ func (m FileBrowser) ShareCleaner() {
func (m FileBrowser) Runner(event string, path string, destination string, user *User) error {
commands := []string{}
// Get the commands from the File Manager instance itself.
// Get the commands from the File Browser instance itself.
if val, ok := m.Commands[event]; ok {
commands = append(commands, val...)
}