Compare commits

..
5 Commits
Author SHA1 Message Date
Henrique Dias a8863ec90b chore: version 1.9.0
Former-commit-id: 4dd0b080c6e792a117af9e33c43ac81c767e589a [formerly 3f3e6b6933d063cbcd16d2d14312740571ee908b] [formerly dd9b3423fe513c11916676922fae7a965dfa90e3 [formerly b4eda31788]]
Former-commit-id: 0ae3856cb12a0fdc1eea2acaf297145d93c1f2f9 [formerly 8191100298ba99a599de7c32513a5d010c705c7d]
Former-commit-id: 7b7a6565f30b0000eae8dc096f33ee0044bc99c7
2018-07-23 14:53:42 +01:00
Henrique Dias 3ed5a64cef feat: case insensitive search by default #415
Former-commit-id: e39d951ceaac2a3c9b055b8661c17432d746f5d2 [formerly f6a93dfc39e6edec09f19228d9d8d6cb66fbdac4] [formerly 0cecdec65555f37fab1e8773f066928cf821f6b5 [formerly 43d489c194]]
Former-commit-id: 57fd7a80303a6044846a3e11fabe0c9402557052 [formerly 4ffe639c08a784a05d49ff615994bda5f700ec1a]
Former-commit-id: 0db3b23185991ca9f0c0dc7e3f1eff5f4c2f7a77
2018-07-23 10:24:52 +01:00
Torben Woltjen 013c24733e Update .dockerignore to ignore the .git directory (#462)
Former-commit-id: fde994a6670ee97a1172869daa30645a1b6ea5a3 [formerly 6d7b714941b24f2c7aa92b1592d337957b57398b] [formerly b51eaa45ca829c7d0a6fa10f57edfb01fbc3c765 [formerly 3d3191b154]]
Former-commit-id: 8a25b969af8fe457970ab6151968fcef368dbbfc [formerly 9ed0c187ed77d53538bdc80a179d15f09a3d71fe]
Former-commit-id: ba61b6f861baee637bfacef1f8ce9d0a4f0ef915
2018-07-18 07:20:26 +01:00
Henrique Dias d9d6fb656a fix: remove default rules (#455)
Former-commit-id: 61306205aa8bbdbd8248fb2cc1b1f2b8d1c9a47d [formerly 01601ea4acb9479b6b1b8f26acf89bec97876f42] [formerly c619c7135b3aa54367c3a9cb857eb647f6f6657a [formerly ec2e8d1f54]]
Former-commit-id: 51e1335b9720aa2825b55dbedabe5040f2c98e85 [formerly 9bdceac017d39acc8f7fb5abebe23c842c646f48]
Former-commit-id: b003d0e8e6b0410c31d80e60a50ba5fa70232304
2018-07-08 08:29:45 +01:00
Henrique Dias eb72c5d959 chore: set untracked version [ci skip]
Former-commit-id: 34ebd89ab0214e369573f7fd9e830cd5b167aacf [formerly f8c67cb2a5dd1db582b71e1e3a838fd2644cdac8] [formerly 44d8c11057a965cfdbc6cf6e4f32afd6d7ca9c93 [formerly 8e864bfc93]]
Former-commit-id: 8d8d63420a5f135d64906369e98ad24541fab599 [formerly 6ed08fff774a5eb3ef92a81f646984e2504e5a1e]
Former-commit-id: bda207626bcae10499d7db7d68a30bf2ca81d340
2018-06-28 17:39:11 +01:00
6 changed files with 13 additions and 16 deletions

No files matched your search

+1
View File
@@ -1,2 +1,3 @@
testdata/
.github/
.git/
+1 -5
View File
@@ -38,11 +38,7 @@ func Parse(c *caddy.Controller, plugin string) ([]*filebrowser.FileBrowser, erro
Commands: []string{"git", "svn", "hg"},
CSS: "",
ViewMode: "mosaic",
Rules: []*filebrowser.Rule{{
Regex: true,
Allow: false,
Regexp: &filebrowser.Regexp{Raw: "\\/\\..+"},
}},
Rules: []*filebrowser.Rule{},
}
baseURL := "/"
+1 -1
View File
@@ -23,7 +23,7 @@ import (
const (
// Version is the current File Browser version.
Version = "1.8.0"
Version = "1.9.0"
ListViewMode = "list"
MosaicViewMode = "mosaic"
+8 -8
View File
@@ -147,9 +147,9 @@ var (
type condition func(path string) bool
type searchOptions struct {
CaseInsensitive bool
Conditions []condition
Terms []string
CaseSensitive bool
Conditions []condition
Terms []string
}
func extensionCondition(extension string) condition {
@@ -181,9 +181,9 @@ func videoCondition(path string) bool {
func parseSearch(value string) *searchOptions {
opts := &searchOptions{
CaseInsensitive: strings.Contains(value, "case:insensitive"),
Conditions: []condition{},
Terms: []string{},
CaseSensitive: strings.Contains(value, "case:sensitive"),
Conditions: []condition{},
Terms: []string{},
}
// removes the options from the value
@@ -215,7 +215,7 @@ func parseSearch(value string) *searchOptions {
}
// If it's canse insensitive, put everything in lowercase.
if opts.CaseInsensitive {
if !opts.CaseSensitive {
value = strings.ToLower(value)
}
@@ -276,7 +276,7 @@ func search(c *fb.Context, w http.ResponseWriter, r *http.Request) (int, error)
scope = filepath.Clean(scope)
err = filepath.Walk(scope, func(path string, f os.FileInfo, err error) error {
if search.CaseInsensitive {
if !search.CaseSensitive {
path = strings.ToLower(path)
}
+1 -1
View File
@@ -3,6 +3,6 @@
"author": "File Browser contributors",
"private": true,
"dependencies": {
"filebrowser-frontend": "1.5.0"
"filebrowser-frontend": "1.6.0"
}
}
+1 -1
View File
@@ -1 +1 @@
a48cd194336986773da16bd667eb3dbb17ad9b2c
5df38dbe052d7325c543606612fe6f4d9a1cdb98