From 4815bc043bd72df6b0a3996e439a77665ddebc0b Mon Sep 17 00:00:00 2001 From: 1138-4EB <1138-4EB@users.noreply.github.com> Date: Wed, 18 Apr 2018 18:06:32 +0200 Subject: [PATCH] rename File Manager to File Browser --- .github/ISSUE_TEMPLATE.md | 48 ++++++------ README.md | 150 +++++++++++++++++++------------------- doc.go | 8 +- filebrowser.go | 16 ++-- http/auth.go | 2 +- 5 files changed, 112 insertions(+), 112 deletions(-) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index f361c61a..fa3941b1 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,24 +1,24 @@ -### Instructions (remove before submitting): - -1. Are you asking for help with using Caddy or File Manager? Please use our forum instead: https://forum.caddyserver.com. -2. If you are filing a bug report, please answer the following questions. -3. If your issue is not a bug report, you do not need to use this template. -4. If not using with Caddy, ignore questions 1 and 2. - -### 1. Have you downloaded File Manager from caddyserver.com? If yes, when have you done that? If no, and you are running a custom build, which is the revision of File Manager's repository? - -### 2. What is your entire Caddyfile? -```text -(Put Caddyfile here) -``` - -### 3. What are you trying to do? - - -### 4. What did you expect to see? - - -### 5. What did you see instead (give full error messages and/or log)? - - -### 6. How can someone who is starting from scratch reproduce this behaviour as minimally as possible? +### Instructions (remove before submitting): + +1. Are you asking for help with using Caddy or File Browser? Please use our forum instead: https://forum.caddyserver.com. +2. If you are filing a bug report, please answer the following questions. +3. If your issue is not a bug report, you do not need to use this template. +4. If not using with Caddy, ignore questions 1 and 2. + +### 1. Have you downloaded File Browser from caddyserver.com? If yes, when have you done that? If no, and you are running a custom build, which is the revision of File Browser's repository? + +### 2. What is your entire Caddyfile? +```text +(Put Caddyfile here) +``` + +### 3. What are you trying to do? + + +### 4. What did you expect to see? + + +### 5. What did you see instead (give full error messages and/or log)? + + +### 6. How can someone who is starting from scratch reproduce this behaviour as minimally as possible? diff --git a/README.md b/README.md index 43ae2290..53c7fc62 100644 --- a/README.md +++ b/README.md @@ -1,75 +1,75 @@ -![Preview](https://user-images.githubusercontent.com/5447088/28537288-39be4288-70a2-11e7-8ce9-0813d59f46b7.gif) - -# filebrowser - -[![CircleCI](https://img.shields.io/circleci/project/github/filebrowser/filebrowser.svg?style=flat-square)](https://circleci.com/gh/filebrowser/filebrowser) -[![Go Report Card](https://goreportcard.com/badge/github.com/filebrowser/filebrowser?style=flat-square)](https://goreportcard.com/report/github.com/filebrowser/filebrowser) -[![Documentation](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square)](http://godoc.org/github.com/filebrowser/filebrowser) -[![Version](https://img.shields.io/github/release/filebrowser/filebrowser.svg?style=flat-square)](https://github.com/filebrowser/filebrowser/releases/latest) - -filebrowser provides a file managing interface within a specified directory and it can be used to upload, delete, preview, rename and edit your files. It allows the creation of multiple users and each user can have its own directory. It can be used as a standalone app or as a middleware. - -# Table of contents - -+ [Getting started](#getting-started) -+ [Features](#features) - - [Users](#users) - - [Search](#search) -+ [Contributing](#contributing) -+ [Donate](#donate) - -# Getting started - -You can find the Getting Started guide on the [documentation](https://filebrowser.github.io/quick-start/). - -# Features - -Easy login system. - -![Login Page](https://user-images.githubusercontent.com/5447088/28432382-975493dc-6d7f-11e7-9190-23f8037159dc.jpg) - -Listings of your files, available in two styles: mosaic and list. You can delete, move, rename, upload and create new files, as well as directories. Single files can be downloaded directly, and multiple files as *.zip*, *.tar*, *.tar.gz*, *.tar.bz2* or *.tar.xz*. - -![Mosaic Listing](https://user-images.githubusercontent.com/5447088/28432384-9771bb4c-6d7f-11e7-8564-3a9bd6a3ce3a.jpg) - -File Manager editor is powered by [Codemirror](https://codemirror.net/) and if you're working with markdown files with metadata, both parts will be separated from each other so you can focus on the content. - -![Markdown Editor](https://user-images.githubusercontent.com/5447088/28432383-9756fdac-6d7f-11e7-8e58-fec49470d15f.jpg) - -On the settings page, a regular user can set its own custom CSS to personalize the experience and change its password. For admins, they can manage the permissions of each user, set commands which can be executed when certain events are triggered (such as before saving and after saving) and change plugin's settings. - -![Settings](https://user-images.githubusercontent.com/5447088/28432385-9776ec66-6d7f-11e7-90a5-891bacd4d02f.jpg) - -We also allow the users to search in the directories and execute commands if allowed. - -## Users - -We support multiple users and each user can have its own scope and custom stylesheet. The administrator is able to choose which permissions should be given to the users, as well as the commands they can execute. Each user also have a set of rules, in which he can be prevented or allowed to access some directories (regular expressions included!). - -![Users](https://user-images.githubusercontent.com/5447088/28432386-977f388a-6d7f-11e7-9006-87d16f05f1f8.jpg) - -## Search - -File Browser allows you to search through your files and it has some options. By default, your search will be something like this: - -``` -this are keywords -``` - -If you search for that it will look at every file that contains "this", "are" or "keywords" on their name. If you want to search for an exact term, you should surround your search by double quotes: - -``` -"this is the name" -``` - -That will search for any file that contains "this is the name" on its name. It won't search for each separated term this time. - -By default, every search will be case sensitive. Although, you can make a case insensitive search by adding `case:insensitive` to the search terms, like this: - -``` -this are keywords case:insensitive -``` - -# Contributing - -The contributing guidelines can be found [here](https://github.com/filebrowser/community). +![Preview](https://user-images.githubusercontent.com/5447088/28537288-39be4288-70a2-11e7-8ce9-0813d59f46b7.gif) + +# filebrowser + +[![CircleCI](https://img.shields.io/circleci/project/github/filebrowser/filebrowser.svg?style=flat-square)](https://circleci.com/gh/filebrowser/filebrowser) +[![Go Report Card](https://goreportcard.com/badge/github.com/filebrowser/filebrowser?style=flat-square)](https://goreportcard.com/report/github.com/filebrowser/filebrowser) +[![Documentation](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square)](http://godoc.org/github.com/filebrowser/filebrowser) +[![Version](https://img.shields.io/github/release/filebrowser/filebrowser.svg?style=flat-square)](https://github.com/filebrowser/filebrowser/releases/latest) + +filebrowser provides a file managing interface within a specified directory and it can be used to upload, delete, preview, rename and edit your files. It allows the creation of multiple users and each user can have its own directory. It can be used as a standalone app or as a middleware. + +# Table of contents + ++ [Getting started](#getting-started) ++ [Features](#features) + - [Users](#users) + - [Search](#search) ++ [Contributing](#contributing) ++ [Donate](#donate) + +# Getting started + +You can find the Getting Started guide on the [documentation](https://filebrowser.github.io/quick-start/). + +# Features + +Easy login system. + +![Login Page](https://user-images.githubusercontent.com/5447088/28432382-975493dc-6d7f-11e7-9190-23f8037159dc.jpg) + +Listings of your files, available in two styles: mosaic and list. You can delete, move, rename, upload and create new files, as well as directories. Single files can be downloaded directly, and multiple files as *.zip*, *.tar*, *.tar.gz*, *.tar.bz2* or *.tar.xz*. + +![Mosaic Listing](https://user-images.githubusercontent.com/5447088/28432384-9771bb4c-6d7f-11e7-8564-3a9bd6a3ce3a.jpg) + +File Browser editor is powered by [Codemirror](https://codemirror.net/) and if you're working with markdown files with metadata, both parts will be separated from each other so you can focus on the content. + +![Markdown Editor](https://user-images.githubusercontent.com/5447088/28432383-9756fdac-6d7f-11e7-8e58-fec49470d15f.jpg) + +On the settings page, a regular user can set its own custom CSS to personalize the experience and change its password. For admins, they can manage the permissions of each user, set commands which can be executed when certain events are triggered (such as before saving and after saving) and change plugin's settings. + +![Settings](https://user-images.githubusercontent.com/5447088/28432385-9776ec66-6d7f-11e7-90a5-891bacd4d02f.jpg) + +We also allow the users to search in the directories and execute commands if allowed. + +## Users + +We support multiple users and each user can have its own scope and custom stylesheet. The administrator is able to choose which permissions should be given to the users, as well as the commands they can execute. Each user also have a set of rules, in which he can be prevented or allowed to access some directories (regular expressions included!). + +![Users](https://user-images.githubusercontent.com/5447088/28432386-977f388a-6d7f-11e7-9006-87d16f05f1f8.jpg) + +## Search + +File Browser allows you to search through your files and it has some options. By default, your search will be something like this: + +``` +this are keywords +``` + +If you search for that it will look at every file that contains "this", "are" or "keywords" on their name. If you want to search for an exact term, you should surround your search by double quotes: + +``` +"this is the name" +``` + +That will search for any file that contains "this is the name" on its name. It won't search for each separated term this time. + +By default, every search will be case sensitive. Although, you can make a case insensitive search by adding `case:insensitive` to the search terms, like this: + +``` +this are keywords case:insensitive +``` + +# Contributing + +The contributing guidelines can be found [here](https://github.com/filebrowser/community). diff --git a/doc.go b/doc.go index d4371a1d..0930a602 100644 --- a/doc.go +++ b/doc.go @@ -1,7 +1,7 @@ /* Package filebrowser provides a web interface to access your files wherever you are. To use this package as a middleware for your app, -you'll need to import both File Manager and File Manager HTTP packages. +you'll need to import both File Browser and File Browser HTTP packages. import ( fm "github.com/filebrowser/filebrowser" @@ -49,11 +49,11 @@ functions: m.SetPrefixURL("/") The Prefix URL is a part of the path that is already stripped from the -r.URL.Path variable before the request arrives to File Manager's handler. +r.URL.Path variable before the request arrives to File Browser's handler. This is a function that will rarely be used. You can see one example on Caddy filemanager plugin. -The Base URL is the URL path where you want File Manager to be available in. If +The Base URL is the URL path where you want File Browser to be available in. If you want to be available at the root path, you should call: m.SetBaseURL("/") @@ -62,7 +62,7 @@ But if you want to access it at '/admin', you would call: m.SetBaseURL("/admin") -Now, that you already have a File Manager instance created, you just need to +Now, that you already have a File Browser instance created, you just need to add it to your handlers using m.ServeHTTP which is compatible to http.Handler. We also have a m.ServeWithErrorsHTTP that returns the status code and an error. diff --git a/filebrowser.go b/filebrowser.go index 2bd4d66f..1b23e24a 100644 --- a/filebrowser.go +++ b/filebrowser.go @@ -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...) } diff --git a/http/auth.go b/http/auth.go index a24c9676..0219d3df 100644 --- a/http/auth.go +++ b/http/auth.go @@ -125,7 +125,7 @@ func printToken(c *fm.Context, w http.ResponseWriter) (int, error) { u, jwt.StandardClaims{ ExpiresAt: time.Now().Add(time.Hour * 24).Unix(), - Issuer: "File Manager", + Issuer: "File Browser", }, }