Compare commits

...

546 Commits

Author SHA1 Message Date
Oleg Lobanov
7f2d221083 chore(release): 2.18.0 2021-10-31 17:18:01 +01:00
Oleg Lobanov
74b7cd8e81 fix: security issue in command runner (closes #1621) 2021-10-31 17:13:16 +01:00
niubility000
6cb51b4eb4 Add files via upload (#1615) 2021-10-24 13:35:29 +04:00
niubility000
f09bf3e1d0 fix: fix sidebar navigation on mobile devices (#1618) 2021-10-19 20:37:12 +04:00
niubility000
6f345be3e4 fix: search box is misaligned when the browser preferred font size is other than 16px (#1613) 2021-10-19 20:34:17 +04:00
niubility000
ddd4ffa4ca fix: set correct editor height regardless of preferred font size (#1614) 2021-10-19 20:32:25 +04:00
niubility000
deabc80fd7 fix: back button behaviour in preview (#1573) 2021-10-12 13:09:05 +02:00
niubility000
b6a51bed51 fix: zoom pics when dlclick at first time (#1561) 2021-09-23 10:21:17 +02:00
lilihx
0426629a59 feat: add ability to select file modified time format (#1536) 2021-09-11 14:12:51 +02:00
Ryan Qian
0358e42d2c feat: add manifest theme color param (#1542) 2021-09-10 17:08:15 +02:00
Filip Hanes
3768e3345f chore: add slovak translation (#1534) 2021-09-03 12:03:50 +02:00
ahmetlutfu
16e434be66 chore: add turkish translation (#1524) 2021-08-31 11:49:33 +02:00
Oleg Lobanov
bf303c536a chore(release): 2.17.2 2021-08-27 12:40:51 +02:00
Andrew Kennedy
43a460993c fix: bug with inlineLink not creating url properly (#1515) 2021-08-26 12:43:37 +02:00
Oleg Lobanov
7f0673ee70 chore(release): 2.17.1 2021-08-23 10:03:31 +02:00
Oleg Lobanov
4c3099a086 fix: internal server error if --disable-preview-resize flag is set (closes #1510) 2021-08-23 10:03:11 +02:00
Oleg Lobanov
f0bc9167b1 chore(release): 2.17.0 2021-08-21 16:51:34 +02:00
Ramires Viana
23d646c456 fix: escape quote on index template
fixes #1501
2021-08-20 14:43:06 +02:00
Ramires Viana
76add9e527 feat: open file option on preview 2021-08-20 14:43:06 +02:00
Ramires Viana
c63cc5a2d2 fix: file caching directive 2021-08-20 14:43:06 +02:00
Andrew Kennedy
25c8788390 fix: 401 error in share view open file button (#1495) 2021-08-19 14:35:24 +02:00
Oleg Lobanov
aa52b07bb1 chore(release): 2.16.1 2021-08-04 11:44:29 +02:00
Oleg Lobanov
76b466f649 fix: check symlink target type (closes #1488) 2021-08-04 11:44:02 +02:00
Oleg Lobanov
8ecc2da947 chore(release): 2.16.0 2021-07-26 13:03:53 +02:00
Oleg Lobanov
8650d2ffe7 fix: failure on broken symlink deletion 2021-07-26 13:02:11 +02:00
Oleg Lobanov
34d7d2c8c4 chore: upgrade golangci-lint 2021-07-26 12:00:05 +02:00
Oleg Lobanov
201329abce chore: add Content-Security-Policy header 2021-07-26 11:08:39 +02:00
Oleg Lobanov
f2b5dd3787 chore: don't break folder download if any file processing causes an error 2021-07-26 10:41:56 +02:00
Oleg Lobanov
5072bbb2cb fix: break resource create/update handlers on error (closes #1464) 2021-07-24 15:33:54 +02:00
Oleg Lobanov
6b19ab6613 fix: don't remove files on unsuccessful updates (closes #1456) 2021-07-24 15:32:24 +02:00
Oleg Lobanov
730be5ef6b Create SECURITY.md 2021-07-03 16:56:27 +02:00
laggardkernel
46ee595389 fix: short commit sha and typo fix in Makefile (#1411) 2021-05-25 11:29:38 +02:00
Oleg Lobanov
dee465ab86 Merge pull request #1373 from ramiresviana/fixes-9
Some fixes
2021-05-03 23:29:12 +02:00
Ramires Viana
209f9fa77f fix: omit file content 2021-04-23 12:04:02 +00:00
Ramires Viana
ba8c09f454 feat: show more button on share 2021-04-23 11:59:34 +00:00
Ramires Viana
16a34defc0 feat: file name on page title 2021-04-23 11:59:04 +00:00
Ramires Viana
7d1e03075d feat: mod time title on file info 2021-04-23 11:57:56 +00:00
Ramires Viana
1c25f6ee69 feat: open file option on share 2021-04-23 11:55:56 +00:00
Ramires Viana
aa172b8bb5 feat: gzip encoding for static js files 2021-04-22 12:48:45 +00:00
Ramires Viana
4711e7bcd5 chore: set public path on the fly 2021-04-20 19:51:10 +00:00
Ramires Viana
8a47aee137 chore: split preview creation logic 2021-04-19 13:16:48 +00:00
Ramires Viana
190cb99a79 feat: browser cache directives 2021-04-19 12:49:40 +00:00
Ramires Viana
603203848a feat: display error messages on settings 2021-04-16 15:07:05 +00:00
Ramires Viana
5e6f14b5dc feat: message for connection error 2021-04-16 14:01:10 +00:00
Ramires Viana
976eb5583d feat: loading spinner on views navigation 2021-04-16 12:47:50 +00:00
Ramires Viana
b92152693f chore: split action on resource patch handler 2021-04-16 12:04:06 +00:00
Ramires Viana
7ec24d9d77 feat: support for IE11 browser 2021-04-15 12:28:19 +00:00
Ramires Viana
20ebbf6611 fix: copying files with special characters 2021-04-15 11:50:30 +00:00
Ramires Viana
ba7e71a7c3 fix: inconsistent double click on listing item 2021-04-14 15:29:06 +00:00
Ramires Viana
8973c4598f fix: delete image cache when moving 2021-04-14 15:20:38 +00:00
Ramires Viana
18889ad725 fix: no items displayed on file listing 2021-04-14 11:51:33 +00:00
Oleg Lobanov
73ccbe912f chore(release): 2.15.0 2021-04-06 13:57:29 +02:00
Oleg Lobanov
84e3a98303 Merge pull request #1353 from ramiresviana/fixes-8
Some fixes
2021-03-30 09:43:27 +02:00
adrium
7dd5b34d42 feat: add EXIF thumbnail support for JPEG files (#1234) 2021-03-29 11:40:00 +02:00
Alexis Lefebvre
4470d0a704 chore: update issue templates (#1355) 2021-03-28 12:52:03 +02:00
Ramires Viana
a76e01d2b7 feat: dynamic autoplay on previewer 2021-03-26 17:31:27 +00:00
Ramires Viana
2697093ac1 fix: empty archive name on directory download 2021-03-26 14:45:18 +00:00
Ramires Viana
59f9964e80 fix: check modify permission on file overwrite 2021-03-26 13:30:14 +00:00
Ramires Viana
1516d9932b fix: buttons without permission on header 2021-03-26 12:45:17 +00:00
Ramires Viana
fcb115f42d fix: mouse wheel zoom on previewer 2021-03-25 19:37:54 +00:00
Ramires Viana
e410272e6b feat: dynamic zoom limit on previewer 2021-03-25 19:36:53 +00:00
Ramires Viana
87f1881b42 fix: list item interactions on share 2021-03-25 15:47:49 +00:00
Ramires Viana
c0d85f3d85 fix: image quality switch on previewer 2021-03-25 14:24:46 +00:00
Ramires Viana
98d79b8ed9 fix: missing bold variation for Roboto font 2021-03-24 19:06:56 +00:00
Ramires Viana
fe80730bb1 fix: no header button animations on file listing 2021-03-24 19:05:15 +00:00
Ramires Viana
6c8ee96e6a feat: dynamic item count on file listing 2021-03-24 17:50:16 +00:00
Ramires Viana
b521dec8f9 fix: hidden editor header on Safari 2021-03-24 12:23:05 +00:00
Ramires Viana
e9baf0c4b6 fix: empty text file on editor 2021-03-23 18:18:02 +00:00
Ramires Viana
e1a6f593e1 fix: error causes panic on upload 2021-03-23 13:13:46 +00:00
Oleg Lobanov
4b068b3058 chore(release): 2.14.1 2021-03-21 14:24:33 +01:00
Oleg Lobanov
da54bd6c21 fix: display public routes with header proxy auth 2021-03-21 14:24:23 +01:00
Oleg Lobanov
0d179eca4d chore(release): 2.14.0 2021-03-21 13:19:53 +01:00
Oleg Lobanov
dacd511d24 chore: run npm update 2021-03-21 13:05:22 +01:00
Oleg Lobanov
c44b37c50c chore: add prettier frontent linter 2021-03-21 12:51:58 +01:00
Oleg Lobanov
a721dc1f31 feat: add health check handler 2021-03-21 12:30:48 +01:00
Oleg Lobanov
d2e6d23741 Merge pull request #1339 from ramiresviana/fixes-7
Some fixes
2021-03-19 17:32:41 +01:00
Ramires Viana
5f4a0317ab fix: hide dotfile error on share 2021-03-18 18:24:24 +00:00
Ramires Viana
22f4be8f54 fix: qr code url on share 2021-03-18 13:10:10 +00:00
Ramires Viana
eeadc532fe fix: text file detection on editor 2021-03-17 18:06:56 +00:00
Ramires Viana
93a35ad251 fix: prefix handling on http router 2021-03-17 17:54:25 +00:00
Oleg Lobanov
99787287bb Merge pull request #1331 from ramiresviana/tweaks-2
Some development tweaks
2021-03-15 16:56:20 +01:00
Ramires Viana
bdd523190e chore: frontend DirFS for development 2021-03-15 14:06:21 +00:00
Ramires Viana
4c1dd5c097 chore: automatic output name on build 2021-03-15 14:00:23 +00:00
Oleg Lobanov
e1f658633d chore(release): 2.13.0 2021-03-14 20:02:02 +01:00
Oleg Lobanov
9c79105c02 chore: prevent deleting .gitignore from dist folder 2021-03-14 19:59:55 +01:00
Jürgen Hötzel
6d5ceae8b4 fix: wait for async command exit (#1326)
This prevents the accumulation of zombie processes when using
async (&) event commands. Also log async command failures.
2021-03-14 19:32:14 +01:00
Oleg Lobanov
381f09087a Merge pull request #1321 from ramiresviana/fixes-6 2021-03-14 14:19:50 +01:00
Ramires Viana
426b38bb33 fix: root path name on archive 2021-03-12 15:52:52 +00:00
Ramires Viana
488d98045e fix: download current dir on file listing 2021-03-12 15:28:49 +00:00
Ramires Viana
7955e0720b fix: encoded file path on share 2021-03-12 15:15:56 +00:00
Ramires Viana
e017a19985 fix: full file path on share 2021-03-12 12:14:58 +00:00
Ramires Viana
f8df76f526 fix: header dropdown icon color on previewer 2021-03-11 16:01:54 +00:00
Ramires Viana
11ebaec5f0 fix: modified time on info prompt 2021-03-11 15:20:37 +00:00
Ramires Viana
326b35a7ac fix: item dragging on file listing 2021-03-11 12:09:12 +00:00
Ramires Viana
5bf15548d0 fix: check rules on http resource handlers 2021-03-10 17:38:11 +00:00
Ramires Viana
6a734c0139 fix: stuck icon on header button 2021-03-10 15:32:10 +00:00
Ramires Viana
81b6f4d6f6 fix: update image cache when replacing 2021-03-10 15:14:01 +00:00
Ramires Viana
0b92d94570 chore: split POST method on resource http handler 2021-03-10 13:32:11 +00:00
Oleg Lobanov
fc5506179a refactor: migrate from rice to embed.FS 2021-03-09 19:09:32 +01:00
Oleg Lobanov
0fe34ad224 Merge pull request #1307 from ramiresviana/tweaks-1
Frontend code quality changes
2021-03-09 18:26:46 +01:00
Ramires Viana
54f35701a2 fix: archive contains parent path on Windows 2021-03-09 15:54:54 +00:00
FrzMtrsprt
a809404ce1 chore: update zh-cn.json (#1311) 2021-03-08 10:24:16 +01:00
Po Chen
fb32e44b47 chore: update zh-cn.json (#1309) 2021-03-07 15:41:05 +01:00
Oleg Lobanov
e9c0369062 chore(release): 2.12.1 2021-03-07 15:25:34 +01:00
Oleg Lobanov
7358b3fe31 fix: add missing default config into the docker image 2021-03-07 15:23:12 +01:00
Ramires Viana
2a1f759e9e chore: remove prompts events 2021-03-04 14:40:18 +00:00
Oleg Lobanov
2fccb8c367 chore(release): 2.12.0 2021-03-04 13:12:19 +01:00
Oleg Lobanov
e039d95192 chore: fix major docker tag name 2021-03-04 13:12:03 +01:00
Oleg Lobanov
0f96031d6f Merge pull request #1305 from filebrowser/github_actions 2021-03-04 11:39:30 +01:00
Oleg Lobanov
6214fc84fa chore: add github action badge 2021-03-04 11:35:52 +01:00
Oleg Lobanov
47578e02e3 ci: migrate to github actions 2021-03-04 11:35:52 +01:00
Oleg Lobanov
35a4379b67 chore: go mod tidy 2021-03-04 00:57:35 +01:00
Oleg Lobanov
23f84642e6 build: use make for building the project (#1304) 2021-03-04 00:10:08 +01:00
Ramires Viana
edb9e85efd chore: share view logic responsability 2021-03-03 17:46:37 +00:00
Oleg Lobanov
2d2c598fa6 feat: add homebrew tap 2021-03-03 16:25:03 +01:00
Oleg Lobanov
cf4836dc75 feat: build multi-arch docker images 2021-03-03 13:46:22 +01:00
Ramires Viana
d8306559fd chore: breadcrumbs component 2021-03-03 12:25:59 +00:00
WeidiDeng
e8c9d1c539 feat: added tiff files preview support (#1222) 2021-03-02 12:14:32 +01:00
Alvaro Aleman
d8f415f8ab feat: allow to password protect shares (#1252)
This changes allows to password protect shares. It works by:
* Allowing to optionally pass a password when creating a share
* If set, the password + salt that is configured via a new flag will be
  hashed via bcrypt and the hash stored together with the rest of the
  share
* Additionally, a random 96 byte long token gets generated and stored
  as part of the share
* When the backend retrieves an unauthenticated request for a share that
  has authentication configured, it will return a http 401
* The frontend detects this and will show a login prompt
* The actual download links are protected via an url arg that contains
  the previously generated token. This allows us to avoid buffering the
  download in the browser and allows pasting the link without breaking
  it
2021-03-02 12:00:18 +01:00
Ramires Viana
7b6579ac8a chore: files view dynamic component 2021-03-01 16:12:17 +00:00
Ramires Viana
057307181e chore: removed header buttons components 2021-03-01 13:41:35 +00:00
Ramires Viana
4fb832c042 feat: increased header button counter size 2021-03-01 12:57:39 +00:00
Ramires Viana
e503cb69f2 chore: files pages logic responsability 2021-02-26 15:10:21 +00:00
Ramires Viana
95811e99bc chore: header bar component 2021-02-25 18:37:07 +00:00
Ramires Viana
62fff5ca60 feat: larger previewer content 2021-02-22 16:01:13 +00:00
Ramires Viana
5b28aa0848 feat: improved settings navbar 2021-02-19 16:01:43 +00:00
Ramires Viana
db5aad8eb6 feat: dual pane settings view 2021-02-19 13:15:46 +00:00
Alvaro Aleman
977ec33918 chore: close preview on esc key press (#1288) 2021-02-16 17:15:04 +01:00
Ramires Viana
1819377897 feat: improved sharing prompt 2021-02-16 15:39:11 +00:00
niubility000
f1b7bd59f6 fix: double click to zoom pics in phone's browser (#1274)
fixed this : https://github.com/filebrowser/filebrowser/issues/1266
2021-02-08 09:54:40 +01:00
WeidiDeng
f3afd5cb79 fix: environmental variables not expanded in command (#1241) 2021-01-19 17:02:46 +01:00
Oleg Lobanov
e6a5bf116e chore: remove empty string from locales (closes #1245) 2021-01-19 16:56:06 +01:00
Oleg Lobanov
21b5a76fa7 chore: refactor search function 2021-01-12 19:14:23 +01:00
WeidiDeng
b6263eb607 chore: search by type with empty file name (#1228) 2021-01-12 18:08:23 +01:00
WeidiDeng
c8257e848e chore: move single click to user profile page (#1236)
Single clicks applies to FileList component.
2021-01-12 00:15:26 +01:00
叫我彭一凡
05bb7c8553 fix: fetch resource api once when sorting (closes #1172) (#1202) 2021-01-12 00:00:40 +01:00
WeidiDeng
b600b11415 feat: share management delete confirm (#1212) 2021-01-11 23:54:16 +01:00
Oleg Lobanov
019ce80fc5 fix: don't allow to remove root user 2021-01-11 22:33:36 +01:00
Adam Dobrawy
8cea2f75b3 chore: fix url to documentation in templates (#1231) 2021-01-07 11:48:53 +01:00
WeidiDeng
6914063853 feat: allow disabling file detections by reading header (#1175) 2021-01-07 11:30:17 +01:00
Oleg Lobanov
43e0d4a856 chore: fix translation files indent 2020-12-31 12:31:26 +01:00
Oleg Lobanov
066d8e8d6c chore: add ru translation 2020-12-31 12:26:49 +01:00
Oleg Lobanov
948e05c083 chore(release): 2.11.0 2020-12-28 17:37:19 +01:00
WeidiDeng
fb5b28d9cb feat: download shared subdirectory (#1184)
Co-authored-by: Oleg Lobanov <oleg@lobanov.me>
2020-12-28 17:35:29 +01:00
WeidiDeng
677bce376b feat: add sharing management (#1178) (closes #1000) 2020-12-24 19:02:28 +01:00
Alexis Lefebvre
8faa96f5e6 chore: fix typo costumize -> costumize (#1194) 2020-12-24 18:24:15 +01:00
WeidiDeng
f62806f6c9 fix: check user input to prevent permission elevation (#1196) (closes #1195) 2020-12-24 18:22:48 +01:00
Oleg Lobanov
58835b7e53 fix: move files between different volumes (closes #1177) 2020-12-24 17:50:27 +01:00
WeidiDeng
7a5298a755 fix: delete extra remove prefix (#1186)
Fix file actions within /files dir
2020-12-16 16:08:56 +01:00
WeidiDeng
bc4a6462ce chore: use command key to select multiple files on mac (#1183) 2020-12-12 14:09:50 +01:00
WeidiDeng
ac3673e111 fix: recaptcha race condition (#1176) 2020-12-08 11:26:29 +01:00
Oleg Lobanov
c746c1931d chore(release): 2.10.0 2020-11-24 12:00:10 +01:00
Oleg Lobanov
586d198d47 fix: fix hanging when reading a named pipe file (closes #1155) 2020-11-24 11:37:31 +01:00
Matt Doyle
9515ceeb42 feat: automatically jump to the next photo when deleting while previewing (#1143) 2020-11-23 19:08:14 +01:00
Julien Loir
e8b4e9af46 feat: add single click mode (#1139) 2020-11-23 19:06:37 +01:00
Tiger Nie
10e399b3c3 feat: add hide dotfiles param (#1148) 2020-11-20 11:51:28 +01:00
Oleg Lobanov
dcbc3286e2 Merge pull request #1133 from ramiresviana/fixes-5
Some fixes and shared view improvements
2020-11-04 17:58:18 +01:00
xufanglu
b185f9b56e chore: fix typo in config_init.go (#1131) 2020-11-04 17:47:36 +01:00
Ramires Viana
7096b3dab9 fix: empty folder in archive 2020-11-04 15:56:27 +00:00
Ramires Viana
36cacdf598 feat: shared item information 2020-11-04 15:56:27 +00:00
Ramires Viana
4e48ffc14d fix: previewer title overflow 2020-11-04 15:56:27 +00:00
Ramires Viana
e119bc55ea feat: shared folder file listing 2020-11-04 15:56:05 +00:00
Ramires Viana
1ce3068a99 fix: resource rename action invalid path 2020-11-03 12:30:56 +00:00
Liubomyr Piadyk
d562d1a60d chore: fix readme typo (#1128)
Commander runner -> Command runner
At other places it's referenced as Command runner.
2020-10-29 17:29:29 +01:00
Oleg Lobanov
9f858398ab chore(release): 2.9.0 2020-10-21 16:52:29 +02:00
Aiden McClelland
0ac80e8387 feat: support WKWebview custom protocol (#1113) 2020-10-21 16:41:09 +02:00
Hissy
0dca0b92d1 chore: update zh-cn and zh-tw (#1121) 2020-10-21 16:39:41 +02:00
Oleg Lobanov
c9b36ba32e Merge pull request #1124 from ramiresviana/fixes-4 2020-10-21 16:37:39 +02:00
Ramires Viana
f2c4e78381 fix: allow start from Windows explorer 2020-10-19 13:41:40 +00:00
Ramires Viana
05bff54b71 fix: preview case sensitive file extension 2020-10-19 13:25:09 +00:00
Ramires Viana
2bd163d92a fix: search missing path slash 2020-10-19 13:14:36 +00:00
Ramires Viana
5e27ba5c8c fix: file upload missing path slash 2020-10-19 13:11:26 +00:00
Oleg Lobanov
5aaeb3b76d chore(release): 2.8.0 2020-10-05 09:53:09 +02:00
Daniel Pham
36fb9f562a fix: fix empty command name (#1106) 2020-10-05 09:52:27 +02:00
Xabi
ad99bf1801 fix: fix panic when accessing nonexistent .js file in static path (#1105) 2020-10-02 15:09:03 +02:00
Oleg Lobanov
4c2a094255 Merge pull request #1100 from ramiresviana/fixes-3 2020-10-01 16:53:35 +02:00
Keagan McClelland
97693cc611 feat: add disable exec flag (#1090) 2020-10-01 16:45:24 +02:00
Ramires Viana
c6d4fcd08f fix: empty commands setting 2020-09-29 14:05:03 +00:00
Ramires Viana
dd7b9ddd85 fix: preview key shortcut conflict 2020-09-29 14:04:55 +00:00
Ramires Viana
26d62e4117 fix: search results absolute url 2020-09-29 14:04:43 +00:00
Ramires Viana
babd7783af fix: file upload path encoding 2020-09-29 14:04:03 +00:00
Oleg Lobanov
1529e796df chore(release): 2.7.0 2020-09-11 19:21:08 +02:00
Oleg Lobanov
d4b904b92b chore: pass docker password via stdin 2020-09-11 18:57:14 +02:00
Oleg Lobanov
12d4177823 build: bump go version to 1.15.2 (#1081) 2020-09-11 18:07:01 +02:00
Oleg Lobanov
8142b32f38 feat: put selected files in the root of the archive (closes #1065) 2020-09-11 16:54:22 +02:00
Oleg Lobanov
c5abbb4e1c chore: fix lint errors 2020-09-11 16:02:16 +02:00
Oleg Lobanov
65ac73414f feat: add --socket-perm flag to control unix socket file permissions (closes #1060) 2020-09-11 15:59:06 +02:00
Oleg Lobanov
ede4213c8e chore: fix french translation (closes #1071) 2020-09-11 15:16:58 +02:00
Agneev Mukherjee
b60d291490 chore: fix URLs for assets (#1074) 2020-09-05 15:23:42 +02:00
Oleg Lobanov
b9ede79888 Merge pull request #1066 from ramiresviana/preview-mobile-dropdown 2020-08-25 16:33:57 +02:00
Ramires Viana
3d2cb838d1 feat: preview size button 2020-08-25 14:14:15 +00:00
Ramires Viana
778734419d feat: preview mobile dropdown 2020-08-18 12:47:23 +00:00
Oleg Lobanov
be8683f556 chore(release): 2.6.2 2020-08-05 11:55:16 +02:00
Davide Maggio
c3450f4614 chore: return text/plain header in auth response (#1051) 2020-08-05 10:48:03 +02:00
Oleg Lobanov
5881bc9ab0 chore: fix preview of files with non-latin names (closes #1056) 2020-08-05 10:40:03 +02:00
Oleg Lobanov
a2fb499a20 chore(release): 2.6.1 2020-07-28 13:40:19 +02:00
Oleg Lobanov
411a928fea chore: fix lint errors 2020-07-28 13:40:06 +02:00
Oleg Lobanov
f5d02cdde9 fix: delete cached previews when deleting file 2020-07-28 11:59:55 +02:00
Oleg Lobanov
c9340af8d0 fix: escape special characters in preview url (closes #1002) 2020-07-28 11:59:32 +02:00
Oleg Lobanov
a722bcc13f chore(release): 2.6.0 2020-07-27 19:52:48 +02:00
Oleg Lobanov
77fe3cfc60 ci: fix go version on release step 2020-07-27 19:51:09 +02:00
Oleg Lobanov
470f93cefc Merge pull request #1044 from filebrowser/fix_img_resize 2020-07-27 19:39:08 +02:00
Oleg Lobanov
92fde4dd12 build: set limit for vuejs build threads 2020-07-27 19:35:02 +02:00
Oleg Lobanov
95bc92955f feat: cache resized images 2020-07-27 19:26:45 +02:00
Oleg Lobanov
f2f914221c chore: bump go to 1.14.6 2020-07-27 19:26:45 +02:00
Oleg Lobanov
c2d8038c63 chore: add testing step to ci 2020-07-27 19:26:44 +02:00
Oleg Lobanov
cb8ac5ebf1 chore: add resize tests 2020-07-27 19:26:44 +02:00
Oleg Lobanov
aa78e3ab1f feat: add param to disable img resizing 2020-07-27 19:26:44 +02:00
Oleg Lobanov
bc00165094 feat: add lazy load of image thumbnails 2020-07-27 19:26:44 +02:00
Oleg Lobanov
94ef59602f feat: limit image resize workers 2020-07-27 19:26:44 +02:00
Oleg Lobanov
14e2f84ceb Merge pull request #1042 from ramiresviana/fixes-2 2020-07-23 15:03:10 +02:00
Ramires Viana
f228fa5540 fix: conflict handling on upload button 2020-07-23 12:02:09 +00:00
Ramires Viana
f2d2c1cbf8 fix: drop feedback 2020-07-23 12:02:09 +00:00
Ramires Viana
d9be370e24 fix: missing error message 2020-07-23 12:02:09 +00:00
Ramires Viana
727c63b98e fix: parent verification on copy 2020-07-23 12:02:02 +00:00
Ramires Viana
34dfb49b71 fix: path separator inconsistency on rename 2020-07-20 17:45:45 +00:00
Henrique Dias
0b0a704d44 chore: remove hacdias/fileutils dep (#1037) 2020-07-18 20:10:22 +02:00
Oleg Lobanov
2d99d0bf13 chore(release): 2.5.0 2020-07-17 18:12:00 +02:00
Oleg Lobanov
1790df2090 Merge pull request #1026 from ramiresviana/fixes 2020-07-17 17:41:17 +02:00
Ramires Viana
10570ade44 fix: reset clipboard after pasting cutted files 2020-07-17 14:11:23 +00:00
Ramires Viana
43526d9d1a feat: duplicate files in the same directory 2020-07-17 14:11:23 +00:00
Ramires Viana
2636f876ab feat: rename option on replace prompt 2020-07-17 14:11:15 +00:00
Ramires Viana
eed9da1471 feat: file copy, move and paste conflict checking 2020-07-17 12:37:52 +00:00
Ramires Viana
9a2ebbabe2 fix: blinking previewer 2020-07-17 12:37:52 +00:00
Ramires Viana
716396a726 feat: add previewer title and loading indicator 2020-07-17 12:32:21 +00:00
Ramires Viana
0727496601 fix: remove incomplete uploaded files 2020-07-14 00:21:15 +00:00
Ramires Viana
194030fcfc fix: prompt before closing window 2020-07-14 00:12:41 +00:00
Ramires Viana
b3b644527d fix: dark theme colors 2020-07-14 00:12:33 +00:00
Ramires Viana
7e5beeff46 fix: directory conflict checking 2020-07-13 14:20:56 +00:00
Oleg Lobanov
a47b69bcec Merge pull request #1021 from ramiresviana/upload-queue 2020-07-13 11:20:59 +02:00
Ramires Viana
6ec6a23861 feat: upload queue 2020-07-10 00:01:37 +00:00
Ramires Viana
c9cc0d3d5d refactor: upload vuex module 2020-07-10 00:01:37 +00:00
Ramires Viana
28d2b35718 refactor: upload utils 2020-07-10 00:01:37 +00:00
Ramires Viana
b4f131be50 refactor: uploading counters vuex state 2020-07-10 00:01:37 +00:00
Oleg Lobanov
d0b359561f chore(release): 2.4.0 2020-07-07 16:53:51 +02:00
Fabian Fritzsche
453636dfe2 fix: add preview bypass for .gif files (#1012) 2020-07-07 16:47:11 +02:00
Oleg Lobanov
b1605aa6d3 Merge pull request #1014 from ramiresviana/full-screen-editor 2020-07-06 17:06:12 +02:00
Oleg Lobanov
23503b80a4 Merge pull request #1015 from ramiresviana/prompt-key-shortcut-conflict 2020-07-06 17:03:05 +02:00
Ramires Viana
0d69fbd9a3 fix: prompt key shortcut conflict 2020-07-04 14:19:03 +00:00
Ramires Viana
0d665e528f feat: full screen editor 2020-07-04 03:11:51 +00:00
Oleg Lobanov
de0b8bb7b2 chore(release): 2.3.0 2020-06-26 12:14:44 +02:00
Thomas Queste
84da110085 fix: typo in image_templates (apline -> alpine) (#1005) 2020-06-25 09:37:55 +02:00
monkeyWie
6b0d49b1fc feat: add image thumbnails support (#980)
* set max image preview size to 1080x1080px
2020-06-25 09:37:13 +02:00
Oleg Lobanov
4c20772e11 chore(release): 2.2.0 2020-06-22 19:12:12 +02:00
Oleg Lobanov
68f8348dde fix: apply all fs user rulles 2020-06-22 18:46:22 +02:00
Oleg Lobanov
5023e77296 Merge pull request #995 from ramiresviana/key-shortcuts 2020-06-22 13:48:56 +02:00
Ramires Viana
95316cbe8c feat: add key shortcuts
- 'Ctrl + a' selects all files in listing.
- 'Enter' to confirm a prompt.
2020-06-21 21:54:23 +00:00
Ramires Viana
cd454bae51 feat: upload progress based on total size (#993) 2020-06-19 09:46:33 +02:00
Oleg Lobanov
241201657c fix: add a workaround to fix window freezing when viewing a large file #992 2020-06-18 19:21:02 +02:00
Hampton
9eefaddd9b chore: fix documentation links on README (#987) 2020-06-18 17:54:37 +02:00
Oleg Lobanov
d6d47bbd6b Merge pull request #991 from ramiresviana/small-fixes 2020-06-18 09:59:27 +02:00
Ramires Viana
82c883f95e fix: save event hook
fix filebrowser/filebrowser#696
2020-06-17 22:57:13 +00:00
Ramires Viana
dd40b0d9b9 fix: frontend token validation
fix filebrowser/filebrowser#638
2020-06-17 22:57:07 +00:00
Ramires Viana
963837ef1d fix: multiple selection count
- Only add files to selected list that arent on it.
- Only shift key select when there are selected files.
2020-06-17 22:56:55 +00:00
Oleg Lobanov
66863b72f7 feat: add alpine and debian docker images 2020-06-16 23:18:22 +02:00
Ramires Viana
89773447a5 feat: add folder upload (#981)
* feat: folder upload
fix filebrowser/filebrowser#741

* fix: apply gofmt formater

* feat: upload button prompt

* feat: empty folder upload
2020-06-16 21:56:44 +02:00
Oleg Lobanov
6d899a6335 chore: version v2.1.2 2020-06-06 17:49:14 +02:00
Oleg Lobanov
28672c0114 fix(security): check user permission to rename files 2020-06-06 17:45:51 +02:00
Oleg Lobanov
b8300b7121 chore: add dist folder to gitignore 2020-06-02 10:50:14 +02:00
Oleg Lobanov
584ef4d4bd chore: version v2.1.1 2020-06-01 02:53:15 +02:00
Oleg Lobanov
e8295a944a fix(build): fix openbsd build
bump golang.org/x deps:
* golang.org/x/crypto
* golang.org/x/net
* golang.org/x/sys
2020-06-01 02:52:26 +02:00
Oleg Lobanov
f8f5698ad0 build(docker): add arm 5 docker image for raspberry pi 2020-06-01 02:14:11 +02:00
Oleg Lobanov
700f32718e refactor: add more go linters (#970) 2020-06-01 01:12:36 +02:00
Oleg Lobanov
54d92a2708 chore: bump go to 1.14.3 (#969) 2020-05-31 23:17:32 +02:00
Oleg Lobanov
ba47e3b2fe fix: fix static assets url generation (#965) 2020-05-31 22:26:10 +02:00
Oleg Lobanov
6e5405eeed Update README.md 2020-05-27 14:23:12 +02:00
Henrique Dias
45326e664f Update README.md 2020-04-16 13:25:03 +01:00
Henrique Dias
6ce44f7092 chore: version v2.1.0 2020-01-09 18:05:20 +00:00
Henrique Dias
b320419088 tidy 2020-01-09 18:03:18 +00:00
Henrique Dias
ca183a4fb8 Update README.md 2020-01-09 17:49:25 +00:00
Henrique Dias
895bb755cd Disable the logout method for authentication methods other than… (#934)
Disable the logout method for authentication methods other than 'json' (currently 'proxy' and 'none'.) Resolves #870.
2020-01-09 17:27:56 +00:00
Henrique Dias
a9e715dc50 Merge branch 'master' into remove-logout-button 2020-01-09 17:27:49 +00:00
Henrique Dias
7cb046c542 Merge pull request #938 from filebrowser/dependabot/go_modules/github.com/spf13/viper-1.6.1
chore(deps): bump github.com/spf13/viper from 1.5.0 to 1.6.1
2020-01-09 17:27:18 +00:00
dependabot-preview[bot]
cd03faf0fc chore(deps): bump vue-i18n from 8.15.1 to 8.15.3 in /frontend
Bumps [vue-i18n](https://github.com/kazupon/vue-i18n) from 8.15.1 to 8.15.3.
- [Release notes](https://github.com/kazupon/vue-i18n/releases)
- [Changelog](https://github.com/kazupon/vue-i18n/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/kazupon/vue-i18n/compare/v8.15.1...v8.15.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-09 17:27:09 +00:00
dependabot-preview[bot]
87ba03b224 chore(deps-dev): bump @vue/cli-service from 4.0.5 to 4.1.2 in /frontend
Bumps [@vue/cli-service](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-service) from 4.0.5 to 4.1.2.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v4.1.2/packages/@vue/cli-service)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-09 17:26:58 +00:00
dependabot-preview[bot]
6458f91e1c chore(deps-dev): bump @vue/cli-plugin-babel in /frontend
Bumps [@vue/cli-plugin-babel](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-babel) from 4.1.1 to 4.1.2.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v4.1.2/packages/@vue/cli-plugin-babel)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-09 17:26:49 +00:00
dependabot-preview[bot]
312ebbbcc0 chore(deps-dev): bump eslint-plugin-vue from 6.0.1 to 6.1.2 in /frontend
Bumps [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) from 6.0.1 to 6.1.2.
- [Release notes](https://github.com/vuejs/eslint-plugin-vue/releases)
- [Commits](https://github.com/vuejs/eslint-plugin-vue/compare/v6.0.1...v6.1.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-09 17:26:42 +00:00
freedomlang
060a7ad80c refactor: Load Editor as need to reduce bundle size 2020-01-09 17:26:17 +00:00
freedomlang
ae893abc5f refactor: Remove useless react data and destory ace editor 2020-01-09 17:26:17 +00:00
freedomlang
12d6415f7f refactor: Freeze property to improve performance 2020-01-09 17:26:17 +00:00
freedomlang
897ac75281 refactor: Use v-for for language option 2020-01-09 17:26:17 +00:00
Hadrien Dorio
cec551c3de fix(docker): Add mime.types file
Uses the package mailcap from alpine as a source for /etc/mime.types
which is required by golang.org/pkg/mime on unix systems.
2020-01-09 17:26:06 +00:00
Alexey Larkov
cb98c913d4 Allow request manifest through reverse proxy with authentication 2020-01-09 17:25:30 +00:00
Ramires Viana
55a9d945cc Add dark theme 2020-01-09 17:24:59 +00:00
Ramires Viana
cc7ec4f0c5 Fix multiple selection 2020-01-09 17:24:30 +00:00
dependabot-preview[bot]
265b81a52b chore(deps): bump github.com/spf13/viper from 1.5.0 to 1.6.1
Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.5.0 to 1.6.1.
- [Release notes](https://github.com/spf13/viper/releases)
- [Commits](https://github.com/spf13/viper/compare/v1.5.0...v1.6.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-09 11:14:41 +00:00
Ovidiu Predescu
b42b09ccbe Disable the logout method for authentication methods other than 'json' (currently 'proxy' and 'none'.) 2019-12-03 17:31:11 -08:00
dependabot-preview[bot]
118071ba4b chore(deps-dev): bump @vue/cli-plugin-babel from 4.0.5 to 4.1.1… (#929)
Bumps [@vue/cli-plugin-babel](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-babel) from 4.0.5 to 4.1.1.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v4.1.1/packages/@vue/cli-plugin-babel)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-02 15:52:26 +00:00
dependabot-preview[bot]
73b85eced4 chore(deps-dev): bump eslint from 6.6.0 to 6.7.2 in /frontend (#932)
Bumps [eslint](https://github.com/eslint/eslint) from 6.6.0 to 6.7.2.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v6.6.0...v6.7.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-02 15:52:20 +00:00
Henrique Dias
997a0a433f fix: disable eslint on one line
License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
2019-12-02 15:48:55 +00:00
dependabot-preview[bot]
0d7e344ca3 chore(deps-dev): bump @vue/cli-plugin-eslint from 4.0.5 to 4.1.1… (#927)
Bumps [@vue/cli-plugin-eslint](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-eslint) from 4.0.5 to 4.1.1.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v4.1.1/packages/@vue/cli-plugin-eslint)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-02 15:36:38 +00:00
dependabot-preview[bot]
1884d50c3b chore(deps): bump vue-i18n from 8.15.0 to 8.15.1 in /frontend (#925)
Bumps [vue-i18n](https://github.com/kazupon/vue-i18n) from 8.15.0 to 8.15.1.
- [Release notes](https://github.com/kazupon/vue-i18n/releases)
- [Changelog](https://github.com/kazupon/vue-i18n/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/kazupon/vue-i18n/compare/v8.15.0...v8.15.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-02 15:36:30 +00:00
dependabot-preview[bot]
f5fad7a01d chore(deps): bump gopkg.in/yaml.v2 from 2.2.5 to 2.2.7 (#921)
Bumps [gopkg.in/yaml.v2](https://github.com/go-yaml/yaml) from 2.2.5 to 2.2.7.
- [Release notes](https://github.com/go-yaml/yaml/releases)
- [Commits](https://github.com/go-yaml/yaml/compare/v2.2.5...v2.2.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-02 15:36:22 +00:00
dependabot-preview[bot]
5c2ed2b2f9 chore(deps-dev): bump eslint-plugin-vue from 6.0.0 to 6.0.1 in /… (#916)
Bumps [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) from 6.0.0 to 6.0.1.
- [Release notes](https://github.com/vuejs/eslint-plugin-vue/releases)
- [Commits](https://github.com/vuejs/eslint-plugin-vue/compare/v6.0.0...v6.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-02 15:36:13 +00:00
dependabot-preview[bot]
05475eb4fc chore(deps): bump vuex from 3.1.1 to 3.1.2 in /frontend (#914)
Bumps [vuex](https://github.com/vuejs/vuex) from 3.1.1 to 3.1.2.
- [Release notes](https://github.com/vuejs/vuex/releases)
- [Commits](https://github.com/vuejs/vuex/compare/v3.1.1...v3.1.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-02 15:36:01 +00:00
dependabot-preview[bot]
9e6cc302c0 chore(deps): bump qrcode.vue from 1.6.3 to 1.7.0 in /frontend (#913)
Bumps [qrcode.vue](https://github.com/scopewu/qrcode.vue) from 1.6.3 to 1.7.0.
- [Release notes](https://github.com/scopewu/qrcode.vue/releases)
- [Changelog](https://github.com/scopewu/qrcode.vue/blob/master/CHANGELOG.md)
- [Commits](https://github.com/scopewu/qrcode.vue/compare/v1.6.3...v1.7.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-02 15:35:53 +00:00
Henrique Dias
d422421cf9 Merge pull request #918 from spacebat/real-ip
Determine the real IP address of the client for logging
2019-12-02 15:31:56 +00:00
freedomlang
23a3ef069e refactor: Optimize prompts component 2019-12-02 15:31:06 +00:00
blackywkl
2a81ea90db feat: add animation for disable multiple selection and break word for filename in info panel (#922) 2019-12-02 15:30:18 +00:00
A Kirkpatrick
5fb7207d65 Determine the real IP address of the client for logging
When running behind a reverse proxy such as nginx, the remote IP as
logged is always that of the proxy. Figuring out the correct address
in this context is a little tricky, hence the following module is
used:

https://github.com/tomasen/realip
2019-11-17 14:14:15 +10:30
Henrique Dias
d79d864825 chore(deps-dev): bump eslint from 5.16.0 to 6.6.0 in /frontend (#915)
chore(deps-dev): bump eslint from 5.16.0 to 6.6.0 in /frontend
2019-11-12 07:50:15 +00:00
dependabot-preview[bot]
d249b8b202 chore(deps-dev): bump eslint from 5.16.0 to 6.6.0 in /frontend
Bumps [eslint](https://github.com/eslint/eslint) from 5.16.0 to 6.6.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v5.16.0...v6.6.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-11 12:23:46 +00:00
Henrique Dias
e9bd68f3b0 docs: make warning more visivble 2019-11-10 09:13:32 +00:00
Henrique Dias
506e088236 chore(deps): bump github.com/spf13/viper from 1.4.0 to 1.5.0 (#908)
Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.4.0 to 1.5.0.
- [Release notes](https://github.com/spf13/viper/releases)
- [Commits](https://github.com/spf13/viper/compare/v1.4.0...v1.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-10 09:08:05 +00:00
dependabot-preview[bot]
c906d296be chore(deps): bump gopkg.in/yaml.v2 from 2.2.4 to 2.2.5 (#910)
Bumps [gopkg.in/yaml.v2](https://github.com/go-yaml/yaml) from 2.2.4 to 2.2.5.
- [Release notes](https://github.com/go-yaml/yaml/releases)
- [Commits](https://github.com/go-yaml/yaml/compare/v2.2.4...v2.2.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-10 09:07:55 +00:00
dependabot-preview[bot]
3b7f6ccf8e chore(deps-dev): bump eslint-plugin-vue from 5.2.3 to 6.0.0 in /… (#911)
Bumps [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) from 5.2.3 to 6.0.0.
- [Release notes](https://github.com/vuejs/eslint-plugin-vue/releases)
- [Commits](https://github.com/vuejs/eslint-plugin-vue/compare/v5.2.3...v6.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-10 09:07:41 +00:00
dependabot-preview[bot]
f1a7d2f8d0 chore(deps): bump github.com/spf13/viper from 1.4.0 to 1.5.0
Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.4.0 to 1.5.0.
- [Release notes](https://github.com/spf13/viper/releases)
- [Commits](https://github.com/spf13/viper/compare/v1.4.0...v1.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-04 14:01:17 +00:00
Henrique Dias
fb13ded8e8 chore: version v2.0.16 2019-11-04 07:27:38 +00:00
dependabot-preview[bot]
85e4ff67e4 chore(deps): bump github.com/pelletier/go-toml from 1.5.0 to 1.6… (#904)
Bumps [github.com/pelletier/go-toml](https://github.com/pelletier/go-toml) from 1.5.0 to 1.6.0.
- [Release notes](https://github.com/pelletier/go-toml/releases)
- [Commits](https://github.com/pelletier/go-toml/compare/v1.5.0...v1.6.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-04 07:26:19 +00:00
Nate Dalliard
6250efa208 add wrap to the editor (#906) 2019-11-04 07:23:48 +00:00
dependabot-preview[bot]
f1e1a27408 chore(deps-dev): bump @vue/cli-plugin-eslint in /frontend (#900)
Bumps [@vue/cli-plugin-eslint](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-eslint) from 4.0.4 to 4.0.5.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v4.0.5/packages/@vue/cli-plugin-eslint)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-24 12:11:16 +01:00
Miroslav Šedivý
076358ab79 fix: delete keyup only if no active prompt (#896) 2019-10-24 12:10:34 +01:00
dependabot-preview[bot]
d1efc14bb9 chore(deps): bump ace-builds from 1.4.6 to 1.4.7 in /frontend (#894)
Bumps [ace-builds](https://github.com/ajaxorg/ace-builds) from 1.4.6 to 1.4.7.
- [Release notes](https://github.com/ajaxorg/ace-builds/releases)
- [Changelog](https://github.com/ajaxorg/ace-builds/blob/master/ChangeLog.txt)
- [Commits](https://github.com/ajaxorg/ace-builds/compare/v1.4.6...v1.4.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-24 12:07:56 +01:00
dependabot-preview[bot]
508b7b326f chore(deps-dev): bump @vue/cli-service from 4.0.4 to 4.0.5 in /frontend (#899)
Bumps [@vue/cli-service](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-service) from 4.0.4 to 4.0.5.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v4.0.5/packages/@vue/cli-service)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-24 12:07:35 +01:00
dependabot-preview[bot]
d1284972a3 chore(deps-dev): bump @vue/cli-plugin-babel in /frontend (#898)
Bumps [@vue/cli-plugin-babel](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-babel) from 4.0.4 to 4.0.5.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v4.0.5/packages/@vue/cli-plugin-babel)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-24 12:07:21 +01:00
dependabot-preview[bot]
cdba1d0c52 chore(deps-dev): bump @vue/cli-plugin-eslint from 4.0.3 to 4.0.4… (#890)
Bumps [@vue/cli-plugin-eslint](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-eslint) from 4.0.3 to 4.0.4.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v4.0.4/packages/@vue/cli-plugin-eslint)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-21 09:21:23 +01:00
Henrique Dias
ec28375208 chore: version v2.0.15 2019-10-18 15:54:07 +01:00
dependabot-preview[bot]
01068a9217 chore(deps-dev): bump @vue/cli-service from 4.0.3 to 4.0.4 in /f… (#891)
Bumps [@vue/cli-service](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-service) from 4.0.3 to 4.0.4.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v4.0.4/packages/@vue/cli-service)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-18 13:33:11 +01:00
dependabot-preview[bot]
7f01753bc5 chore(deps-dev): bump @vue/cli-plugin-babel from 4.0.3 to 4.0.4… (#892)
Bumps [@vue/cli-plugin-babel](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-babel) from 4.0.3 to 4.0.4.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v4.0.4/packages/@vue/cli-plugin-babel)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-18 13:33:03 +01:00
DanielV
0e223a056e feat: generate manifest.json dynamically (#889) 2019-10-18 09:00:13 +01:00
dependabot-preview[bot]
9d08f9bed1 chore(deps-dev): bump @vue/cli-plugin-eslint from 3.11.0 to 4.0.… (#887)
Bumps [@vue/cli-plugin-eslint](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-eslint) from 3.11.0 to 4.0.3.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v4.0.3/packages/@vue/cli-plugin-eslint)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-18 00:30:15 +01:00
dependabot-preview[bot]
2cabeb8f68 chore(deps): bump vue-i18n from 8.14.1 to 8.15.0 in /frontend (#881)
Bumps [vue-i18n](https://github.com/kazupon/vue-i18n) from 8.14.1 to 8.15.0.
- [Release notes](https://github.com/kazupon/vue-i18n/releases)
- [Changelog](https://github.com/kazupon/vue-i18n/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/kazupon/vue-i18n/compare/v8.14.1...v8.15.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-18 00:28:01 +01:00
dependabot-preview[bot]
7aaebab348 chore(deps-dev): bump @vue/cli-service from 3.12.0 to 4.0.3 in /… (#886)
Bumps [@vue/cli-service](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-service) from 3.12.0 to 4.0.3.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v4.0.3/packages/@vue/cli-service)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-18 00:27:54 +01:00
dependabot-preview[bot]
928cdfe2ae chore(deps-dev): bump @vue/cli-plugin-babel from 3.11.0 to 4.0.3… (#888)
Bumps [@vue/cli-plugin-babel](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-babel) from 3.11.0 to 4.0.3.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v4.0.3/packages/@vue/cli-plugin-babel)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-18 00:27:35 +01:00
Henrique Dias
edb7b4dc17 chore: version v2.0.14 2019-10-13 08:10:11 +01:00
DanielV
85ee63af43 [Frontend] Fix invalid start_url in manifest file. (#879)
As far as I know the invalid start_url format breaks only the "Add to Home Screen" functionality, so it's a really minor change, fixing a nice functionality.
2019-10-11 12:02:06 +01:00
dependabot-preview[bot]
74b23a0bc5 chore(deps-dev): bump @vue/cli-service from 3.11.0 to 3.12.0 in… (#876)
Bumps [@vue/cli-service](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-service) from 3.11.0 to 3.12.0.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/v3.12.0/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v3.12.0/packages/@vue/cli-service)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-11 12:01:29 +01:00
Henrique Dias
be6c0bb850 chore: version v2.0.13 2019-10-09 22:23:57 +01:00
Paddy Xu
ddb670ae1e fix #758: reCAPTCHA should use secret for verification (instead… (#875) 2019-10-09 22:22:08 +01:00
dependabot-preview[bot]
4752758cf7 chore(deps): bump github.com/pelletier/go-toml from 1.4.0 to 1.5… (#871)
Bumps [github.com/pelletier/go-toml](https://github.com/pelletier/go-toml) from 1.4.0 to 1.5.0.
- [Release notes](https://github.com/pelletier/go-toml/releases)
- [Commits](https://github.com/pelletier/go-toml/compare/v1.4.0...v1.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-08 07:47:42 +01:00
dependabot-preview[bot]
bd8aab4cba chore(deps): bump gopkg.in/yaml.v2 from 2.2.3 to 2.2.4 (#868)
Bumps [gopkg.in/yaml.v2](https://github.com/go-yaml/yaml) from 2.2.3 to 2.2.4.
- [Release notes](https://github.com/go-yaml/yaml/releases)
- [Commits](https://github.com/go-yaml/yaml/compare/v2.2.3...v2.2.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-03 13:00:04 +01:00
dependabot-preview[bot]
c61ede4153 chore(deps): bump gopkg.in/yaml.v2 from 2.2.2 to 2.2.3 (#867)
Bumps [gopkg.in/yaml.v2](https://github.com/go-yaml/yaml) from 2.2.2 to 2.2.3.
- [Release notes](https://github.com/go-yaml/yaml/releases)
- [Commits](https://github.com/go-yaml/yaml/compare/v2.2.2...v2.2.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-30 23:16:24 +01:00
dependabot-preview[bot]
efd46d6bd3 chore(deps): [security] bump mixin-deep from 1.3.1 to 1.3.2 in /frontend (#852)
Bumps [mixin-deep](https://github.com/jonschlinkert/mixin-deep) from 1.3.1 to 1.3.2. **This update includes a security fix.**
- [Release notes](https://github.com/jonschlinkert/mixin-deep/releases)
- [Commits](https://github.com/jonschlinkert/mixin-deep/compare/1.3.1...1.3.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-20 10:17:25 +01:00
dependabot-preview[bot]
f2a8abb264 chore(deps): bump qrcode.vue from 1.6.2 to 1.6.3 in /frontend (#860)
Bumps [qrcode.vue](https://github.com/scopewu/qrcode.vue) from 1.6.2 to 1.6.3.
- [Release notes](https://github.com/scopewu/qrcode.vue/releases)
- [Changelog](https://github.com/scopewu/qrcode.vue/blob/master/CHANGELOG.md)
- [Commits](https://github.com/scopewu/qrcode.vue/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-20 10:17:11 +01:00
dependabot-preview[bot]
978aadc9b1 chore(deps): bump github.com/spf13/pflag from 1.0.3 to 1.0.5 (#863)
Bumps [github.com/spf13/pflag](https://github.com/spf13/pflag) from 1.0.3 to 1.0.5.
- [Release notes](https://github.com/spf13/pflag/releases)
- [Commits](https://github.com/spf13/pflag/compare/v1.0.3...v1.0.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-20 10:16:56 +01:00
dependabot-preview[bot]
0626f07270 chore(deps): bump vue-router from 3.1.2 to 3.1.3 in /frontend (#853)
Bumps [vue-router](https://github.com/vuejs/vue-router) from 3.1.2 to 3.1.3.
- [Release notes](https://github.com/vuejs/vue-router/releases)
- [Changelog](https://github.com/vuejs/vue-router/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-router/compare/v3.1.2...v3.1.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-12 15:20:31 +02:00
dependabot-preview[bot]
0afc8c9e5c chore(deps): bump ace-builds from 1.4.5 to 1.4.6 in /frontend (#857)
Bumps [ace-builds](https://github.com/ajaxorg/ace-builds) from 1.4.5 to 1.4.6.
- [Release notes](https://github.com/ajaxorg/ace-builds/releases)
- [Changelog](https://github.com/ajaxorg/ace-builds/blob/master/ChangeLog.txt)
- [Commits](https://github.com/ajaxorg/ace-builds/compare/v1.4.5...v1.4.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-12 15:17:57 +02:00
dependabot-preview[bot]
28480c6acd chore(deps): bump vue-i18n from 8.14.0 to 8.14.1 in /frontend (#858)
Bumps [vue-i18n](https://github.com/kazupon/vue-i18n) from 8.14.0 to 8.14.1.
- [Release notes](https://github.com/kazupon/vue-i18n/releases)
- [Changelog](https://github.com/kazupon/vue-i18n/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/kazupon/vue-i18n/compare/v8.14.0...v8.14.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-12 15:17:50 +02:00
dependabot-preview[bot]
826cdddca7 chore(deps): bump github.com/gorilla/websocket from 1.4.0 to 1.4… (#848)
Bumps [github.com/gorilla/websocket](https://github.com/gorilla/websocket) from 1.4.0 to 1.4.1.
- [Release notes](https://github.com/gorilla/websocket/releases)
- [Commits](https://github.com/gorilla/websocket/compare/v1.4.0...v1.4.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-29 10:10:26 +02:00
dependabot-preview[bot]
ec92ad9f47 chore(deps): [security] bump eslint-utils from 1.3.1 to 1.4.2 in… (#849)
Bumps [eslint-utils](https://github.com/mysticatea/eslint-utils) from 1.3.1 to 1.4.2. **This update includes a security fix.**
- [Release notes](https://github.com/mysticatea/eslint-utils/releases)
- [Commits](https://github.com/mysticatea/eslint-utils/compare/v1.3.1...v1.4.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-29 10:10:20 +02:00
dependabot-preview[bot]
ce97b9b9fd chore(deps-dev): bump babel-eslint from 10.0.2 to 10.0.3 in /fro… (#847)
Bumps [babel-eslint](https://github.com/babel/babel-eslint) from 10.0.2 to 10.0.3.
- [Release notes](https://github.com/babel/babel-eslint/releases)
- [Commits](https://github.com/babel/babel-eslint/compare/v10.0.2...v10.0.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-29 10:10:08 +02:00
dependabot-preview[bot]
bbd93e111d chore(deps-dev): bump @vue/cli-service from 3.10.0 to 3.11.0 in… (#841)
Bumps [@vue/cli-service](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-service) from 3.10.0 to 3.11.0.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v3.11.0/packages/@vue/cli-service)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-24 09:18:29 +02:00
dependabot-preview[bot]
f7c7d50e54 chore(deps-dev): bump @vue/cli-plugin-babel from 3.10.0 to 3.11.… (#842)
Bumps [@vue/cli-plugin-babel](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-babel) from 3.10.0 to 3.11.0.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v3.11.0/packages/@vue/cli-plugin-babel)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-24 09:18:20 +02:00
dependabot-preview[bot]
854d8bb705 chore(deps-dev): bump @vue/cli-plugin-eslint from 3.10.0 to 3.11… (#843)
Bumps [@vue/cli-plugin-eslint](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-eslint) from 3.10.0 to 3.11.0.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v3.11.0/packages/@vue/cli-plugin-eslint)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-22 22:30:02 +02:00
dependabot-preview[bot]
7c0f261a97 chore(deps): bump github.com/caddyserver/caddy from 1.0.2 to 1.0… (#837)
Bumps [github.com/caddyserver/caddy](https://github.com/caddyserver/caddy) from 1.0.2 to 1.0.3.
- [Release notes](https://github.com/caddyserver/caddy/releases)
- [Commits](https://github.com/caddyserver/caddy/compare/v1.0.2...v1.0.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-15 14:50:36 +02:00
dependabot-preview[bot]
7b9861b2c6 chore(deps): bump github.com/caddyserver/caddy from 1.0.1 to 1.0… (#836)
Bumps [github.com/caddyserver/caddy](https://github.com/caddyserver/caddy) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/caddyserver/caddy/releases)
- [Commits](https://github.com/caddyserver/caddy/compare/v1.0.1...v1.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-14 16:03:10 +02:00
dependabot-preview[bot]
3a8fcbf4bc chore(deps): bump vue-i18n from 8.13.0 to 8.14.0 in /frontend (#835)
Bumps [vue-i18n](https://github.com/kazupon/vue-i18n) from 8.13.0 to 8.14.0.
- [Release notes](https://github.com/kazupon/vue-i18n/releases)
- [Changelog](https://github.com/kazupon/vue-i18n/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/kazupon/vue-i18n/compare/v8.13.0...v8.14.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-12 22:06:27 +01:00
dependabot-preview[bot]
83d9247df6 chore(deps): bump vue-i18n from 8.12.0 to 8.13.0 in /frontend (#833)
Bumps [vue-i18n](https://github.com/kazupon/vue-i18n) from 8.12.0 to 8.13.0.
- [Release notes](https://github.com/kazupon/vue-i18n/releases)
- [Changelog](https://github.com/kazupon/vue-i18n/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/kazupon/vue-i18n/compare/v8.12.0...v8.13.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-09 14:17:35 +01:00
dependabot-preview[bot]
d32286a13d chore(deps): bump vue-router from 3.1.1 to 3.1.2 in /frontend (#834)
Bumps [vue-router](https://github.com/vuejs/vue-router) from 3.1.1 to 3.1.2.
- [Release notes](https://github.com/vuejs/vue-router/releases)
- [Changelog](https://github.com/vuejs/vue-router/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-router/compare/v3.1.1...v3.1.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-09 13:56:55 +01:00
dependabot-preview[bot]
621936f461 chore(deps): bump vue-router from 3.1.0 to 3.1.1 in /frontend (#832)
Bumps [vue-router](https://github.com/vuejs/vue-router) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/vuejs/vue-router/releases)
- [Changelog](https://github.com/vuejs/vue-router/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-router/compare/v3.1.0...v3.1.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-08 16:19:53 +01:00
Henrique Dias
802e715fae docs: update info --> sarn 2019-08-07 10:47:32 +01:00
dependabot-preview[bot]
adcafff384 chore(deps): bump vue-router from 3.0.7 to 3.1.0 in /frontend (#830)
Bumps [vue-router](https://github.com/vuejs/vue-router) from 3.0.7 to 3.1.0.
- [Release notes](https://github.com/vuejs/vue-router/releases)
- [Changelog](https://github.com/vuejs/vue-router/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-router/compare/v3.0.7...v3.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-07 10:23:27 +01:00
dependabot-preview[bot]
a5ce1cf1e1 chore(deps-dev): bump @vue/cli-plugin-eslint from 3.9.2 to 3.10.… (#829)
Bumps [@vue/cli-plugin-eslint](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-eslint) from 3.9.2 to 3.10.0.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v3.10.0/packages/@vue/cli-plugin-eslint)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-06 08:23:11 +01:00
dependabot-preview[bot]
87d18a3089 chore(deps-dev): bump @vue/cli-service from 3.9.3 to 3.10.0 in /… (#828)
Bumps [@vue/cli-service](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-service) from 3.9.3 to 3.10.0.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v3.10.0/packages/@vue/cli-service)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-05 15:10:17 +01:00
dependabot-preview[bot]
e7fc0e97d6 chore(deps-dev): bump @vue/cli-plugin-babel from 3.9.2 to 3.10.0… (#827)
Bumps [@vue/cli-plugin-babel](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-babel) from 3.9.2 to 3.10.0.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v3.10.0/packages/@vue/cli-plugin-babel)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-05 15:10:08 +01:00
Maikaze
34bdb8fcfc feat(image preview): zoom with touch and mouse events (#821)
* Enhancements for zoom and drag in Image Preview

* Add MouseWheel Event to ExtendedImage Component
2019-08-02 12:30:20 +01:00
dependabot-preview[bot]
13b04f7672 chore(deps-dev): bump @vue/cli-service from 3.9.2 to 3.9.3 in /f… (#818)
Bumps [@vue/cli-service](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-service) from 3.9.2 to 3.9.3.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/v3.9.3/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v3.9.3/packages/@vue/cli-service)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-19 08:32:31 +02:00
dependabot-preview[bot]
76b9b2fa37 chore(deps): [security] bump lodash from 4.17.11 to 4.17.14 in /… (#816)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.11 to 4.17.14. **This update includes security fixes.**
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.11...4.17.14)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-13 14:30:00 +00:00
dependabot-preview[bot]
896d7cfbed chore(deps): [security] bump lodash.defaultsdeep from 4.6.0 to 4… (#815)
Bumps [lodash.defaultsdeep](https://github.com/lodash/lodash) from 4.6.0 to 4.6.1. **This update includes security fixes.**
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.6.0...4.6.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-13 14:29:49 +00:00
dependabot-preview[bot]
0fb1b0840f chore(deps): bump vue-i18n from 8.11.2 to 8.12.0 in /frontend (#812)
Bumps [vue-i18n](https://github.com/kazupon/vue-i18n) from 8.11.2 to 8.12.0.
- [Release notes](https://github.com/kazupon/vue-i18n/releases)
- [Changelog](https://github.com/kazupon/vue-i18n/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/kazupon/vue-i18n/compare/v8.11.2...v8.12.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-09 14:21:26 +01:00
dependabot-preview[bot]
1c0250075b chore(deps-dev): bump @vue/cli-plugin-babel from 3.9.0 to 3.9.2… (#809)
Bumps [@vue/cli-plugin-babel](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-babel) from 3.9.0 to 3.9.2.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v3.9.2/packages/@vue/cli-plugin-babel)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-08 13:23:04 +01:00
dependabot-preview[bot]
cf2af817b9 chore(deps-dev): bump @vue/cli-service from 3.9.0 to 3.9.2 in /f… (#810)
Bumps [@vue/cli-service](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-service) from 3.9.0 to 3.9.2.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v3.9.2/packages/@vue/cli-service)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-08 13:22:54 +01:00
dependabot-preview[bot]
ec24f79204 chore(deps-dev): bump @vue/cli-plugin-eslint from 3.9.1 to 3.9.2… (#811)
Bumps [@vue/cli-plugin-eslint](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-eslint) from 3.9.1 to 3.9.2.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v3.9.2/packages/@vue/cli-plugin-eslint)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-08 13:19:36 +01:00
ttys3
be902be453 fix: prevent maliciously constructed parameters like /api/public/dl/XZzCDnK2_not_exists_hash_name cause panic (#791) 2019-07-05 12:15:57 +01:00
ttys3
888e08792e fix(file upload): safe encode filename with encodeRFC5987ValueChars 2019-07-05 12:13:14 +01:00
dependabot-preview[bot]
adc6ef22d9 chore(deps-dev): bump @vue/cli-plugin-eslint from 3.9.0 to 3.9.1… (#805)
Bumps [@vue/cli-plugin-eslint](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-eslint) from 3.9.0 to 3.9.1.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/v3.9.1/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v3.9.1/packages/@vue/cli-plugin-eslint)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-04 17:18:31 +01:00
dependabot-preview[bot]
0318d39112 chore(deps): bump vue-router from 3.0.6 to 3.0.7 in /frontend (#806)
Bumps [vue-router](https://github.com/vuejs/vue-router) from 3.0.6 to 3.0.7.
- [Release notes](https://github.com/vuejs/vue-router/releases)
- [Changelog](https://github.com/vuejs/vue-router/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-router/compare/v3.0.6...v3.0.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-04 17:18:18 +01:00
Henrique Dias
abcfa0a05b chore: update caddy path (#803) 2019-07-03 18:41:36 +01:00
dependabot-preview[bot]
a4b5c99ebb chore(deps-dev): bump @vue/cli-plugin-eslint from 3.8.0 to 3.9.0… (#801)
Bumps [@vue/cli-plugin-eslint](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-eslint) from 3.8.0 to 3.9.0.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/v3.9.0/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v3.9.0/packages/@vue/cli-plugin-eslint)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-03 13:32:10 +01:00
dependabot-preview[bot]
546e61a403 chore(deps-dev): bump @vue/cli-service from 3.8.4 to 3.9.0 in /f… (#799)
Bumps [@vue/cli-service](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-service) from 3.8.4 to 3.9.0.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/v3.9.0/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v3.9.0/packages/@vue/cli-service)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-03 13:25:19 +01:00
Henrique Dias
dcb68bd7a8 chore(deps-dev): bump @vue/cli-plugin-babel from 3.8.0 to 3.9.0… (#800)
chore(deps-dev): bump @vue/cli-plugin-babel from 3.8.0 to 3.9.0 in /frontend
2019-07-03 13:24:32 +01:00
dependabot-preview[bot]
d411720234 chore(deps-dev): bump @vue/cli-plugin-babel in /frontend
Bumps [@vue/cli-plugin-babel](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-babel) from 3.8.0 to 3.9.0.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/v3.9.0/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v3.9.0/packages/@vue/cli-plugin-babel)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-03 11:54:02 +00:00
Henrique Dias
1ae887d77c chore(deps-dev): bump eslint-plugin-vue from 5.2.2 to 5.2.3 in /frontend (#794)
Bumps [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) from 5.2.2 to 5.2.3.
- [Release notes](https://github.com/vuejs/eslint-plugin-vue/releases)
- [Commits](https://github.com/vuejs/eslint-plugin-vue/compare/v5.2.2...v5.2.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-01 15:22:03 +01:00
dependabot-preview[bot]
30465a771e chore(deps): bump github.com/gorilla/mux from 1.7.2 to 1.7.3 (#797)
Bumps [github.com/gorilla/mux](https://github.com/gorilla/mux) from 1.7.2 to 1.7.3.
- [Release notes](https://github.com/gorilla/mux/releases)
- [Commits](https://github.com/gorilla/mux/compare/v1.7.2...v1.7.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-01 15:21:49 +01:00
dependabot-preview[bot]
f004b48b99 chore(deps-dev): bump eslint-plugin-vue from 5.2.2 to 5.2.3 in /frontend
Bumps [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) from 5.2.2 to 5.2.3.
- [Release notes](https://github.com/vuejs/eslint-plugin-vue/releases)
- [Commits](https://github.com/vuejs/eslint-plugin-vue/compare/v5.2.2...v5.2.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-24 12:31:56 +00:00
ttys3
fc5e2247f6 http/auth.go: new user signup: support auto user dir creation (#788) 2019-06-21 11:43:21 +01:00
dependabot-preview[bot]
5956647bd0 chore(deps-dev): bump babel-eslint from 10.0.1 to 10.0.2 in /frontend (#784)
Bumps [babel-eslint](https://github.com/babel/babel-eslint) from 10.0.1 to 10.0.2.
- [Release notes](https://github.com/babel/babel-eslint/releases)
- [Commits](https://github.com/babel/babel-eslint/compare/v10.0.1...v10.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-19 11:52:59 +01:00
dependabot-preview[bot]
87eaf3ce5c chore(deps-dev): bump @vue/cli-service from 3.8.3 to 3.8.4 in /frontend (#785)
Bumps [@vue/cli-service](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-service) from 3.8.3 to 3.8.4.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v3.8.4/packages/@vue/cli-service)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-19 11:25:22 +01:00
dependabot-preview[bot]
73eba60210 chore(deps): bump ace-builds from 1.4.4 to 1.4.5 in /frontend (#786)
Bumps [ace-builds](https://github.com/ajaxorg/ace-builds) from 1.4.4 to 1.4.5.
- [Release notes](https://github.com/ajaxorg/ace-builds/releases)
- [Changelog](https://github.com/ajaxorg/ace-builds/blob/master/ChangeLog.txt)
- [Commits](https://github.com/ajaxorg/ace-builds/compare/v1.4.4...v1.4.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-19 11:25:16 +01:00
dependabot-preview[bot]
4597ceb3a6 chore(deps-dev): bump @vue/cli-service from 3.8.0 to 3.8.3 in /frontend (#780)
Bumps [@vue/cli-service](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-service) from 3.8.0 to 3.8.3.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v3.8.3/packages/@vue/cli-service)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-13 20:09:57 +01:00
dependabot-preview[bot]
c0c25344c8 chore(deps): bump github.com/spf13/cobra from 0.0.4 to 0.0.5 (#775)
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 0.0.4 to 0.0.5.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Commits](https://github.com/spf13/cobra/compare/v0.0.4...0.0.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-10 21:57:51 +01:00
dependabot-preview[bot]
5efb36103f chore(deps): bump go.etcd.io/bbolt from 1.3.2 to 1.3.3 (#776)
Bumps [go.etcd.io/bbolt](https://github.com/etcd-io/bbolt) from 1.3.2 to 1.3.3.
- [Release notes](https://github.com/etcd-io/bbolt/releases)
- [Commits](https://github.com/etcd-io/bbolt/compare/v1.3.2...v1.3.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-10 21:57:36 +01:00
Henrique Dias
c0575a68ee feat: add more languages (#773)
adds Icelandic (is), Romanian (ro), Dutch (nl-be) and Swedish (sv-se)
2019-06-09 13:31:57 +01:00
dom3k
ffd8a3a637 fix: use ParseFromRequest instead of ParseFromRequestWithClaims (#771)
ParseFromRequestWithClaims is DEPRECATED
2019-06-06 12:22:04 +01:00
dependabot-preview[bot]
425ec275e9 chore(deps-dev): bump @vue/cli-plugin-eslint from 3.7.0 to 3.8.0 in /frontend (#765)
Bumps [@vue/cli-plugin-eslint](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-eslint) from 3.7.0 to 3.8.0.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v3.8.0/packages/@vue/cli-plugin-eslint)
2019-05-28 09:08:33 +01:00
dependabot-preview[bot]
3b9f336634 chore(deps-dev): bump @vue/cli-plugin-babel from 3.7.0 to 3.8.0 in /frontend (#766)
Bumps [@vue/cli-plugin-babel](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-babel) from 3.7.0 to 3.8.0.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v3.8.0/packages/@vue/cli-plugin-babel)
2019-05-28 08:37:29 +01:00
dependabot-preview[bot]
f792c31046 chore(deps): bump github.com/spf13/viper from 1.3.2 to 1.4.0 (#764)
Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.3.2 to 1.4.0.
- [Release notes](https://github.com/spf13/viper/releases)
- [Commits](https://github.com/spf13/viper/compare/v1.3.2...v1.4.0)
2019-05-28 08:37:10 +01:00
dependabot-preview[bot]
55a54ff89e chore(deps-dev): bump @vue/cli-service from 3.7.0 to 3.8.0 in /frontend (#767)
Bumps [@vue/cli-service](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-service) from 3.7.0 to 3.8.0.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v3.8.0/packages/@vue/cli-service)
2019-05-28 08:36:53 +01:00
Henrique Dias
78a40c9b14 chore(deps): bump github.com/gorilla/mux from 1.7.1 to 1.7.2 (#756)
chore(deps): bump github.com/gorilla/mux from 1.7.1 to 1.7.2
2019-05-21 11:58:00 +01:00
Henrique Dias
17f32d16cc Merge pull request #757 from filebrowser/dependabot/go_modules/github.com/spf13/cobra-0.0.4
chore(deps): bump github.com/spf13/cobra from 0.0.3 to 0.0.4
2019-05-21 11:57:50 +01:00
dependabot[bot]
d57a0f2ae1 chore(deps): bump github.com/spf13/cobra from 0.0.3 to 0.0.4
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 0.0.3 to 0.0.4.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Commits](https://github.com/spf13/cobra/compare/v0.0.3...v0.0.4)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-21 10:55:14 +00:00
dependabot[bot]
d6fdfef243 chore(deps): bump github.com/gorilla/mux from 1.7.1 to 1.7.2
Bumps [github.com/gorilla/mux](https://github.com/gorilla/mux) from 1.7.1 to 1.7.2.
- [Release notes](https://github.com/gorilla/mux/releases)
- [Commits](https://github.com/gorilla/mux/compare/v1.7.1...v1.7.2)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-21 10:54:38 +00:00
Henrique Dias
62d28dc89e chore(deps): bump qrcode.vue from 1.6.1 to 1.6.2 in /frontend (#740)
chore(deps): bump qrcode.vue from 1.6.1 to 1.6.2 in /frontend
2019-05-21 11:46:49 +01:00
dependabot[bot]
57c65156f7 chore(deps): bump qrcode.vue from 1.6.1 to 1.6.2 in /frontend
Bumps [qrcode.vue](https://github.com/scopewu/qrcode.vue) from 1.6.1 to 1.6.2.
- [Release notes](https://github.com/scopewu/qrcode.vue/releases)
- [Commits](https://github.com/scopewu/qrcode.vue/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-21 10:42:32 +00:00
Henrique Dias
6e54dff40d chore: merge frontend with filebrowser repos (#739)
chore: merge frontend with filebrowser repos
2019-05-21 11:38:38 +01:00
Henrique Dias
0e722c8df1 chore: do not fetch submodule 2019-05-21 11:19:03 +01:00
Henrique Dias
f05479865c chore: tx main repo, merge gitignores and circle 2019-05-21 11:17:25 +01:00
Henrique Dias
4e4055e7a8 chore: add frontend 2019-05-21 11:14:32 +01:00
Henrique Dias
7414ca10b3 chore: move files to frontend 2019-05-21 11:13:59 +01:00
Henrique Dias
1e17dfa6cb chore: remove frontend submodule 2019-05-21 11:11:32 +01:00
Henrique Dias
64d6d9e93b chore: version v2.0.12 2019-05-21 10:59:36 +01:00
Henrique Dias
68902312cc fix: cannot find frontend 2019-05-21 10:59:05 +01:00
Henrique Dias
a52b50b706 chore: version v2.0.11 2019-05-21 08:50:13 +01:00
Henrique Dias
2527bdbfe1 Check if keys exist in map. Fixes: #736 (#737)
Check if keys exist in map. Fixes: #736
2019-05-21 08:46:50 +01:00
cnone
473aaf13be Check if keys exist in map. Fixes: #736 2019-05-21 01:57:01 +03:00
Henrique Dias
0844b597f8 feat: update languages 2019-05-20 22:07:06 +01:00
Henrique Dias
d45d7f92fb feat: update languages 2019-05-20 22:06:56 +01:00
Henrique Dias
b3a822b4e8 fix: address 2019-05-20 22:05:22 +01:00
Henrique Dias
788fadbd5e fix: remove docker-latest 2019-05-20 22:01:30 +01:00
Henrique Dias
bb0d048235 Merge pull request #150 from alexandrestein/master
Update download names file for weak clients
2019-05-14 09:05:47 +01:00
Alexandre Stein
b991c65d8b Update download names file for weak clients 2019-05-13 16:43:40 +02:00
Henrique Dias
633579e738 feat: update docs links 2019-05-12 10:58:27 +01:00
Henrique Dias
ead7fb4233 chore: circle ci (#149) 2019-05-11 22:59:50 +01:00
dependabot[bot]
31b70a7736 chore(deps-dev): bump @vue/cli-plugin-eslint from 3.6.0 to 3.7.0 (#145) 2019-05-11 18:38:13 +01:00
dependabot[bot]
bbeadee98e chore(deps): bump vue-i18n from 8.11.1 to 8.11.2 (#147) 2019-05-11 18:37:59 +01:00
dependabot[bot]
df42e352f7 chore(deps): bump vuex from 3.1.0 to 3.1.1 (#148)
Bumps [vuex](https://github.com/vuejs/vuex) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/vuejs/vuex/releases)
- [Commits](https://github.com/vuejs/vuex/compare/v3.1.0...v3.1.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-09 13:28:36 +01:00
dependabot[bot]
1f985fe72f chore(deps-dev): bump @vue/cli-service from 3.6.0 to 3.7.0 (#144) 2019-04-29 13:43:18 +01:00
dependabot[bot]
575296d7fc chore(deps-dev): bump @vue/cli-plugin-babel from 3.6.0 to 3.7.0 (#146)
Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-29 13:43:06 +01:00
dependabot[bot]
b93dc9f200 chore(deps): bump vue-i18n from 8.10.0 to 8.11.1 (#143)
Bumps [vue-i18n](https://github.com/kazupon/vue-i18n) from 8.10.0 to 8.11.1.
- [Release notes](https://github.com/kazupon/vue-i18n/releases)
- [Changelog](https://github.com/kazupon/vue-i18n/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/kazupon/vue-i18n/compare/v8.10.0...v8.11.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-26 13:33:05 +01:00
dependabot[bot]
6255f737ba chore(deps): bump ace-builds from 1.4.3 to 1.4.4 (#142)
Bumps [ace-builds](https://github.com/ajaxorg/ace-builds) from 1.4.3 to 1.4.4.
- [Release notes](https://github.com/ajaxorg/ace-builds/releases)
- [Changelog](https://github.com/ajaxorg/ace-builds/blob/master/ChangeLog.txt)
- [Commits](https://github.com/ajaxorg/ace-builds/compare/v1.4.3...v1.4.4)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-25 14:16:00 +01:00
Henrique Dias
3ed2144a0e Merge pull request #102 from ttys3/feature-per-user-auto-dir-creation
feature: global settings: add createUserDir option checkbox.
2019-04-20 13:45:31 +01:00
dependabot[bot]
a437761d03 chore(deps-dev): bump @vue/cli-service from 3.5.3 to 3.6.0 (#137) 2019-04-17 14:44:26 +01:00
dependabot[bot]
b432e1bf46 chore(deps-dev): bump @vue/cli-plugin-babel from 3.5.5 to 3.6.0 (#140) 2019-04-17 14:44:17 +01:00
dependabot[bot]
8dd59e3e67 chore(deps): bump vue-router from 3.0.5 to 3.0.6 (#141) 2019-04-17 14:44:04 +01:00
dependabot[bot]
fd5543407a chore(deps-dev): bump @vue/cli-plugin-eslint from 3.5.1 to 3.6.0 (#139) 2019-04-15 13:15:57 +01:00
dependabot[bot]
48d012ff92 chore(deps): bump vue-router from 3.0.3 to 3.0.5 (#138) 2019-04-15 13:15:44 +01:00
dependabot[bot]
2c4eae5ca2 chore(deps): bump vue-router from 3.0.2 to 3.0.3 (#135) 2019-04-09 15:01:13 +01:00
dependabot[bot]
629646122f chore(deps-dev): bump @vue/cli-plugin-babel from 3.5.3 to 3.5.5 (#133) 2019-04-02 08:40:52 +01:00
dependabot[bot]
d4f284f1a3 chore(deps-dev): bump eslint from 5.15.3 to 5.16.0 (#134) 2019-04-02 08:40:44 +01:00
dependabot[bot]
ff3b5b39a5 chore(deps): bump vue-i18n from 8.9.0 to 8.10.0 (#132) 2019-03-29 12:20:17 +00:00
dependabot[bot]
9667980f2d chore(deps-dev): bump @vue/cli-plugin-babel from 3.5.1 to 3.5.3 (#130) 2019-03-28 14:49:20 +00:00
dependabot[bot]
188a34f835 chore(deps-dev): bump @vue/cli-service from 3.5.2 to 3.5.3 (#131) 2019-03-28 14:49:11 +00:00
dependabot[bot]
f9cd5f11d9 chore(deps-dev): bump @vue/cli-service from 3.5.1 to 3.5.2 (#128) 2019-03-27 11:37:52 +00:00
dependabot[bot]
adedf0178b chore(deps): bump vue and vue-template-compiler (#127) 2019-03-20 21:22:13 +00:00
Jack Klika
4e15b82896 add basic QR functionality (#126) 2019-03-20 16:51:23 +01:00
dependabot[bot]
ed0ea34161 chore(deps-dev): bump eslint from 5.15.2 to 5.15.3 (#125) 2019-03-19 20:45:31 +00:00
dependabot[bot]
e2ffd36073 chore(deps-dev): bump eslint from 5.15.1 to 5.15.2 (#124) 2019-03-18 11:24:05 +00:00
dependabot[bot]
6bd2a1852f chore(deps): bump vue and vue-template-compiler (#123) 2019-03-14 11:44:36 +00:00
dependabot[bot]
371236e364 chore(deps-dev): bump @vue/cli-plugin-eslint from 3.5.0 to 3.5.1 (#122) 2019-03-12 11:27:18 +00:00
dependabot[bot]
6cbdc9d7c5 chore(deps-dev): bump @vue/cli-service from 3.4.1 to 3.5.1 (#121) 2019-03-12 11:20:09 +00:00
dependabot[bot]
a94125f3f2 chore(deps-dev): bump @vue/cli-plugin-babel from 3.4.1 to 3.5.1 (#120) 2019-03-12 11:19:52 +00:00
dependabot[bot]
2f5f5d75a7 chore(deps-dev): bump @vue/cli-plugin-eslint from 3.4.1 to 3.5.0 (#118) 2019-03-08 17:52:06 +00:00
dependabot[bot]
02f2284f3b chore(deps): bump vue-i18n from 8.8.2 to 8.9.0 (#116) 2019-03-08 17:51:54 +00:00
dependabot[bot]
2b1305a315 chore(deps-dev): bump eslint from 5.15.0 to 5.15.1 (#114) 2019-03-05 14:45:51 +00:00
dependabot[bot]
ec78f67abd chore(deps): bump vue and vue-template-compiler (#112) 2019-03-04 13:37:54 +00:00
dependabot[bot]
25c04af500 chore(deps-dev): bump eslint from 5.14.1 to 5.15.0 (#113) 2019-03-04 13:37:46 +00:00
dependabot[bot]
c0391d866e chore(deps): bump ace-builds from 1.4.2 to 1.4.3 (#111) 2019-02-22 11:22:34 +00:00
dependabot[bot]
dcb97be587 chore(deps): bump vue and vue-template-compiler (#110) 2019-02-22 11:22:22 +00:00
dependabot[bot]
c6eb98aef2 chore(deps-dev): bump eslint from 5.14.0 to 5.14.1 (#105)
Bumps [eslint](https://github.com/eslint/eslint) from 5.14.0 to 5.14.1.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v5.14.0...v5.14.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-02-22 11:22:11 +00:00
dependabot[bot]
1c6e15c064 chore(deps-dev): bump @vue/cli-plugin-eslint from 3.4.0 to 3.4.1 (#108) 2019-02-22 11:22:00 +00:00
dependabot[bot]
711a3a30b0 chore(deps-dev): bump @vue/cli-service from 3.4.0 to 3.4.1 (#107) 2019-02-20 11:34:58 +00:00
dependabot[bot]
e203ca14f4 chore(deps-dev): bump @vue/cli-plugin-babel from 3.4.0 to 3.4.1 (#109) 2019-02-20 11:34:49 +00:00
dependabot[bot]
0f1b69b625 chore(deps-dev): bump eslint-plugin-vue from 5.2.1 to 5.2.2 (#106) 2019-02-19 18:40:56 +00:00
荒野無燈
176eaad70b global settings: add createUserDir option checkbox. 2019-02-19 03:23:14 +08:00
dependabot[bot]
486dfe4e63 chore(deps-dev): bump eslint from 5.13.0 to 5.14.0 (#103) 2019-02-18 18:15:49 +00:00
dependabot[bot]
81cf4bab99 chore(deps): bump vue-i18n from 8.8.1 to 8.8.2 (#104) 2019-02-18 18:15:40 +00:00
Henrique Dias
9c3f563f83 fix: login page for no auth/proyx
License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
2019-02-15 12:56:08 +00:00
dependabot[bot]
6b42781c21 chore(deps): bump vue-i18n from 8.8.0 to 8.8.1 (#99) 2019-02-15 13:09:46 +01:00
dependabot[bot]
891a0d1bd0 chore(deps-dev): bump eslint-plugin-vue from 5.1.0 to 5.2.1 (#101) 2019-02-14 13:24:08 +00:00
dependabot[bot]
3b9063dc63 chore(deps): bump vue and vue-template-compiler (#100) 2019-02-12 16:08:43 +00:00
dependabot[bot]
2bfdffb9c4 chore(deps): bump vue and vue-template-compiler (#98) 2019-02-12 08:16:46 +00:00
dependabot[bot]
9f8685bf10 chore(deps): bump vue and vue-template-compiler (#96) 2019-02-08 08:42:49 +00:00
dependabot[bot]
b58bc414bf chore(deps): bump vue and vue-template-compiler (#95) 2019-02-06 19:27:56 +00:00
dependabot[bot]
0b81723118 chore(deps-dev): bump eslint from 5.12.1 to 5.13.0 (#94) 2019-02-04 21:38:32 +01:00
dependabot[bot]
66418ec064 chore(deps-dev): bump @vue/cli-plugin-eslint from 3.3.0 to 3.4.0 (#91) 2019-02-01 13:38:03 +01:00
dependabot[bot]
d87640a4f1 chore(deps-dev): bump @vue/cli-plugin-babel from 3.3.0 to 3.4.0 (#90) 2019-02-01 13:35:32 +01:00
dependabot[bot]
e5580ac0c4 chore(deps-dev): bump @vue/cli-service from 3.3.1 to 3.4.0 (#92) 2019-02-01 13:35:21 +01:00
dependabot[bot]
b92c800e00 chore(deps): bump vue-i18n from 8.7.0 to 8.8.0 (#88) 2019-01-30 12:16:54 +00:00
Henrique Dias
e370fbe500 fix: enable external auth by using a different header (#87)
License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
2019-01-29 09:05:45 +00:00
Henrique Dias
89d4d828b9 fix: upgrade to publicPath (#86)
License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
2019-01-26 15:49:23 +00:00
Alexandre Stein
d004015f03 feat: send message to user if file upload isn't completed and they try to close the tab 2019-01-26 11:27:58 +00:00
Po Chen
ba5b5fbfe3 fix: version number 2019-01-26 11:21:10 +00:00
Henrique Dias
dd29a87107 fix: correctly encode URIs (#85)
* fix: correctly encode URIs

License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>

* fix: encode uri component on copy, move and rename

License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
2019-01-26 10:46:48 +00:00
Henrique Dias
b394540f53 fix: only show size when is file or selection
License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
2019-01-23 14:48:50 +00:00
dependabot[bot]
3ed5f8c0bd chore(deps-dev): bump @vue/cli-service from 3.3.0 to 3.3.1 (#82)
Bumps [@vue/cli-service](https://github.com/vuejs/vue-cli) from 3.3.0 to 3.3.1.
<details>
<summary>Commits</summary>

- See full diff in [compare view](https://github.com/vuejs/vue-cli/commits)
</details>
<br />

[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=@vue/cli-service&package-manager=npm_and_yarn&previous-version=3.3.0&new-version=3.3.1)](https://dependabot.com/compatibility-score.html?dependency-name=@vue/cli-service&package-manager=npm_and_yarn&previous-version=3.3.0&new-version=3.3.1)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

Finally, you can contact us by mentioning @dependabot.

</details>
2019-01-22 17:33:41 +00:00
dependabot[bot]
5d5cef2a87 chore(deps): bump moment from 2.23.0 to 2.24.0 (#83)
Bumps [moment](https://github.com/moment/moment) from 2.23.0 to 2.24.0.
<details>
<summary>Changelog</summary>

*Sourced from [moment's changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md).*

> ### 2.24.0 [See full changelog](https://gist.github.com/marwahaha/12366fe45bee328f33acf125d4cd540e)
> 
> * Release Jan 21, 2019
> 
> * [#4338](https://github-redirect.dependabot.com/moment/moment/pull/4338) [bugfix] Fix startOf/endOf DST issues while boosting performance
> * [#4553](https://github-redirect.dependabot.com/moment/moment/pull/4553) [feature] Add localeSort param to Locale weekday methods
> * [#4887](https://github-redirect.dependabot.com/moment/moment/pull/4887) [bugfix] Make Duration#as work with quarters
> * 3 new locales (it-ch, ga, en-SG)
> * Lots of locale improvements
</details>
<details>
<summary>Commits</summary>

- [`96d0d67`](96d0d6791a) Build 2.24.0
- [`f57faac`](f57faac11c) Bump version to 2.24.0
- [`7eb0ea8`](7eb0ea815e) Update changelog for 2.24.0
- [`38a19a7`](38a19a7c5b) [locale] fo: Fixed relativeTimes for m and M ([#4609](https://github-redirect.dependabot.com/moment/moment/issues/4609)) ([#4682](https://github-redirect.dependabot.com/moment/moment/issues/4682))
- [`01ae8ca`](01ae8ca220) [misc] Remove unused variable defaults ([#4959](https://github-redirect.dependabot.com/moment/moment/issues/4959))
- [`24e55df`](24e55dfe72) [locale] Extend cs locale with name of the months in genitive ([#4771](https://github-redirect.dependabot.com/moment/moment/issues/4771))
- [`3b80f6a`](3b80f6aab2) [feature] Add localeSort param to Locale weekday methods ([#4553](https://github-redirect.dependabot.com/moment/moment/issues/4553))
- [`bb484bc`](bb484bc7b8) [locale] (es-us) long date is D [de] MMMM [de] YYYY ([#4954](https://github-redirect.dependabot.com/moment/moment/issues/4954))
- [`ba125e7`](ba125e7070) [bugfix] (TypeScript) allow update of a single relativeTime handler
- [`91550f8`](91550f810c) [locale] Capitalization of pt month names ([#4557](https://github-redirect.dependabot.com/moment/moment/issues/4557))
- Additional commits viewable in [compare view](https://github.com/moment/moment/compare/2.23.0...2.24.0)
</details>
<br />

[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=moment&package-manager=npm_and_yarn&previous-version=2.23.0&new-version=2.24.0)](https://dependabot.com/compatibility-score.html?dependency-name=moment&package-manager=npm_and_yarn&previous-version=2.23.0&new-version=2.24.0)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

Finally, you can contact us by mentioning @dependabot.

</details>
2019-01-22 17:33:32 +00:00
dependabot[bot]
9264e344d7 chore(deps): bump js-base64 from 2.5.0 to 2.5.1 (#79)
Bumps [js-base64](https://github.com/dankogai/js-base64) from 2.5.0 to 2.5.1.
- [Release notes](https://github.com/dankogai/js-base64/releases)
- [Commits](https://github.com/dankogai/js-base64/compare/2.5.0...2.5.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-21 14:55:54 +00:00
dependabot[bot]
0a46ac3e1b chore(deps-dev): bump eslint from 5.12.0 to 5.12.1 (#80)
Bumps [eslint](https://github.com/eslint/eslint) from 5.12.0 to 5.12.1.
<details>
<summary>Release notes</summary>

*Sourced from [eslint's releases](https://github.com/eslint/eslint/releases).*

> ## v5.12.1
> * [`eb5c401`](eb5c4014f1) Chore: use meta.messages in some rules (2/4) (refs [#9870](https://github-redirect.dependabot.com/eslint/eslint/issues/9870)) ([#10773](https://github-redirect.dependabot.com/eslint/eslint/issues/10773)) (薛定谔的猫)
> * [`aa56247`](aa56247746) Fix: avoid loading core rules dynamically from FS in Linter ([#11278](https://github-redirect.dependabot.com/eslint/eslint/issues/11278)) (Peter Metz)
> * [`04450bb`](04450bb7ed) Docs: clarify process for adding committers ([#11272](https://github-redirect.dependabot.com/eslint/eslint/issues/11272)) (Kai Cataldo)
> * [`3ffcf26`](3ffcf26c1c) Docs: add [**g-plane**](https://github.com/g-plane) as committer ([#11277](https://github-redirect.dependabot.com/eslint/eslint/issues/11277)) (Kai Cataldo)
> * [`c403445`](c40344566e) Fix: warn constant on RHS of || in no-constant-condition (fixes [#11181](https://github-redirect.dependabot.com/eslint/eslint/issues/11181)) ([#11253](https://github-redirect.dependabot.com/eslint/eslint/issues/11253)) (Merlin Mason)
> * [`9194f45`](9194f45ac7) Fix: Manage severity of 1 with TAP reporter (fixes [#11110](https://github-redirect.dependabot.com/eslint/eslint/issues/11110)) ([#11221](https://github-redirect.dependabot.com/eslint/eslint/issues/11221)) (Gabriel Cousin)
> * [`000f495`](000f4952ae) Docs: fix example for sort-imports ignoreDeclarationSort ([#11242](https://github-redirect.dependabot.com/eslint/eslint/issues/11242)) (Remco Haszing)
> * [`7c0bf2c`](7c0bf2ca92) Docs: Add `npx` usage to Getting Started guide ([#11249](https://github-redirect.dependabot.com/eslint/eslint/issues/11249)) (eyal0803)
> * [`da9174e`](da9174e079) Docs: fixes typo peerDepencies ([#11252](https://github-redirect.dependabot.com/eslint/eslint/issues/11252)) (Christian Kühl)
> * [`9c31625`](9c31625f19) Docs: Improve custom formatter docs ([#11258](https://github-redirect.dependabot.com/eslint/eslint/issues/11258)) (Nicholas C. Zakas)
</details>
<details>
<summary>Changelog</summary>

*Sourced from [eslint's changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md).*

> v5.12.1 - January 18, 2019
> 
> * [`eb5c401`](eb5c4014f1) Chore: use meta.messages in some rules (2/4) (refs [#9870](https://github-redirect.dependabot.com/eslint/eslint/issues/9870)) ([#10773](https://github-redirect.dependabot.com/eslint/eslint/issues/10773)) (薛定谔的猫)
> * [`aa56247`](aa56247746) Fix: avoid loading core rules dynamically from FS in Linter ([#11278](https://github-redirect.dependabot.com/eslint/eslint/issues/11278)) (Peter Metz)
> * [`04450bb`](04450bb7ed) Docs: clarify process for adding committers ([#11272](https://github-redirect.dependabot.com/eslint/eslint/issues/11272)) (Kai Cataldo)
> * [`3ffcf26`](3ffcf26c1c) Docs: add [**g-plane**](https://github.com/g-plane) as committer ([#11277](https://github-redirect.dependabot.com/eslint/eslint/issues/11277)) (Kai Cataldo)
> * [`c403445`](c40344566e) Fix: warn constant on RHS of || in no-constant-condition (fixes [#11181](https://github-redirect.dependabot.com/eslint/eslint/issues/11181)) ([#11253](https://github-redirect.dependabot.com/eslint/eslint/issues/11253)) (Merlin Mason)
> * [`9194f45`](9194f45ac7) Fix: Manage severity of 1 with TAP reporter (fixes [#11110](https://github-redirect.dependabot.com/eslint/eslint/issues/11110)) ([#11221](https://github-redirect.dependabot.com/eslint/eslint/issues/11221)) (Gabriel Cousin)
> * [`000f495`](000f4952ae) Docs: fix example for sort-imports ignoreDeclarationSort ([#11242](https://github-redirect.dependabot.com/eslint/eslint/issues/11242)) (Remco Haszing)
> * [`7c0bf2c`](7c0bf2ca92) Docs: Add `npx` usage to Getting Started guide ([#11249](https://github-redirect.dependabot.com/eslint/eslint/issues/11249)) (eyal0803)
> * [`da9174e`](da9174e079) Docs: fixes typo peerDepencies ([#11252](https://github-redirect.dependabot.com/eslint/eslint/issues/11252)) (Christian Kühl)
> * [`9c31625`](9c31625f19) Docs: Improve custom formatter docs ([#11258](https://github-redirect.dependabot.com/eslint/eslint/issues/11258)) (Nicholas C. Zakas)
</details>
<details>
<summary>Commits</summary>

- [`faf3c4e`](faf3c4eda0) 5.12.1
- [`1010c98`](1010c98b81) Build: changelog update for 5.12.1
- [`eb5c401`](eb5c4014f1) Chore: use meta.messages in some rules (2/4) (refs [#9870](https://github-redirect.dependabot.com/eslint/eslint/issues/9870)) ([#10773](https://github-redirect.dependabot.com/eslint/eslint/issues/10773))
- [`aa56247`](aa56247746) Fix: avoid loading core rules dynamically from FS in Linter ([#11278](https://github-redirect.dependabot.com/eslint/eslint/issues/11278))
- [`04450bb`](04450bb7ed) Docs: clarify process for adding committers ([#11272](https://github-redirect.dependabot.com/eslint/eslint/issues/11272))
- [`3ffcf26`](3ffcf26c1c) Docs: add [**g-plane**](https://github.com/g-plane) as committer ([#11277](https://github-redirect.dependabot.com/eslint/eslint/issues/11277))
- [`c403445`](c40344566e) Fix: warn constant on RHS of || in no-constant-condition (fixes [#11181](https://github-redirect.dependabot.com/eslint/eslint/issues/11181)) ([#11253](https://github-redirect.dependabot.com/eslint/eslint/issues/11253))
- [`9194f45`](9194f45ac7) Fix: Manage severity of 1 with TAP reporter (fixes [#11110](https://github-redirect.dependabot.com/eslint/eslint/issues/11110)) ([#11221](https://github-redirect.dependabot.com/eslint/eslint/issues/11221))
- [`000f495`](000f4952ae) Docs: fix example for sort-imports ignoreDeclarationSort ([#11242](https://github-redirect.dependabot.com/eslint/eslint/issues/11242))
- [`7c0bf2c`](7c0bf2ca92) Docs: Add `npx` usage to Getting Started guide ([#11249](https://github-redirect.dependabot.com/eslint/eslint/issues/11249))
- Additional commits viewable in [compare view](https://github.com/eslint/eslint/compare/v5.12.0...v5.12.1)
</details>
<br />

[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=eslint&package-manager=npm_and_yarn&previous-version=5.12.0&new-version=5.12.1)](https://dependabot.com/compatibility-score.html?dependency-name=eslint&package-manager=npm_and_yarn&previous-version=5.12.0&new-version=5.12.1)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

Finally, you can contact us by mentioning @dependabot.

</details>
2019-01-21 14:55:46 +00:00
Henrique Dias
a438fc746f feat: update translations (#76)
License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
2019-01-19 08:37:32 +00:00
Henrique Dias
0c8ffaf73e Merge pull request #75 from filebrowser/dependabot/npm_and_yarn/vuex-3.1.0
chore(deps): bump vuex from 3.0.1 to 3.1.0
2019-01-18 14:11:00 +00:00
dependabot[bot]
6c1bbb3248 chore(deps): bump vuex from 3.0.1 to 3.1.0
Bumps [vuex](https://github.com/vuejs/vuex) from 3.0.1 to 3.1.0.
- [Release notes](https://github.com/vuejs/vuex/releases)
- [Commits](https://github.com/vuejs/vuex/compare/v3.0.1...v3.1.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-18 11:26:12 +00:00
Henrique Dias
e663c60a89 update i18n for zh-cn and zh-tw (#74) 2019-01-17 15:54:01 +00:00
freedomlang
e1e8979e0b update language file for zh-tw 2019-01-16 22:51:28 +08:00
freedomlang
de53b24536 update i18n for simplified chinese 2019-01-16 22:51:15 +08:00
dependabot[bot]
bc518a0e82 chore(deps): bump vue and vue-template-compiler (#72)
Bumps [vue](https://github.com/vuejs/vue) and [vue-template-compiler](https://github.com/vuejs/vue). These dependencies needed to be updated together.

Updates `vue` from 2.5.21 to 2.5.22
- [Release notes](https://github.com/vuejs/vue/releases)
- [Commits](https://github.com/vuejs/vue/compare/v2.5.21...v2.5.22)

Updates `vue-template-compiler` from 2.5.21 to 2.5.22
- [Release notes](https://github.com/vuejs/vue/releases)
- [Commits](https://github.com/vuejs/vue/compare/v2.5.21...v2.5.22)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-14 12:52:21 +00:00
dependabot[bot]
2ed87febcb chore(deps-dev): bump @vue/cli-plugin-babel from 3.2.2 to 3.3.0 (#70) 2019-01-08 14:16:24 +00:00
dependabot[bot]
ee169b3a46 chore(deps-dev): bump @vue/cli-service from 3.2.3 to 3.3.0 (#69)
Bumps [@vue/cli-service](https://github.com/vuejs/vue-cli) from 3.2.3 to 3.3.0.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/compare/v3.2.3...vue-cli-version-marker@3.3.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-08 14:05:23 +00:00
dependabot[bot]
90d690c187 chore(deps-dev): bump @vue/cli-plugin-eslint from 3.2.2 to 3.3.0 (#68)
Bumps [@vue/cli-plugin-eslint](https://github.com/vuejs/vue-cli) from 3.2.2 to 3.3.0.
<details>
<summary>Changelog</summary>

*Sourced from [@vue/cli-plugin-eslint's changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md).*

> # [3.3.0](https://github.com/vuejs/vue-cli/compare/v3.2.3...v3.3.0) (2019-01-08)
> 
> ## babel-preset-app
> 
> #### Features
> 
> * replace babel-plugin-transform-vue-jsx with [[**vue**](https://github.com/vue)](https://github.com/vue)/babel-preset-jsx ([#3218](https://github-redirect.dependabot.com/vuejs/vue-cli/issues/3218)) ([f15dcf7](https://github.com/vuejs/vue-cli/commit/f15dcf7))
> 
> ## cli-service
> 
> #### Bug Fixes
> 
> * **cli-service:** fix copy plugin's ignore pattern (fix [#3119](https://github-redirect.dependabot.com/vuejs/vue-cli/issues/3119)) ([#3130](https://github-redirect.dependabot.com/vuejs/vue-cli/issues/3130)) ([8b4471e](https://github.com/vuejs/vue-cli/commit/8b4471e))
> * fix loaderOptions.postcss detection ([#3201](https://github-redirect.dependabot.com/vuejs/vue-cli/issues/3201)) ([d5b5e3b](https://github.com/vuejs/vue-cli/commit/d5b5e3b)), closes [#3194](https://github-redirect.dependabot.com/vuejs/vue-cli/issues/3194)
> 
> ## cli-ui
> 
> #### Bug Fixes
> 
> * typo in welcome tips ([#3246](https://github-redirect.dependabot.com/vuejs/vue-cli/issues/3246)) [ci skip] ([4070507](https://github.com/vuejs/vue-cli/commit/4070507))
> 
> ## docs
> 
> #### Features
> 
> * deprecate confusing `baseUrl` option, use `publicPath` instead. ([#3143](https://github-redirect.dependabot.com/vuejs/vue-cli/issues/3143)) ([e7af0d8](https://github.com/vuejs/vue-cli/commit/e7af0d8))
> 
> 
> 
> # [3.2.3](https://github.com/vuejs/vue-cli/compare/v3.2.2...v3.2.3) (2019-01-03)
> 
> ## cli-plugin-e2e-cypress
> 
> #### Bug Fixes
> 
> * make cypress config file compatible with eslint-config-airbnb rules ([0fc972e](https://github.com/vuejs/vue-cli/commit/0fc972e))
> 
> ## cli-plugin-unit-jest
> 
> #### Bug Fixes
> 
> * fix typo in jest config ([4feaacf](https://github.com/vuejs/vue-cli/commit/4feaacf))
> 
> ## cli-service
> 
> #### Bug Fixes
> 
> * fix a regression that `pages` doesn't allow entry-only string format ([a7fa191](https://github.com/vuejs/vue-cli/commit/a7fa191)), closes [#3233](https://github-redirect.dependabot.com/vuejs/vue-cli/issues/3233)
</details>
<details>
<summary>Commits</summary>

- [`04203aa`](04203aa4ee) chore: vue-cli-version-marker@3.3.0
- [`8975f06`](8975f0670d) chore: 3.3.0 changelog [ci skip]
- [`5937a67`](5937a67a48) v3.3.0
- [`bcdf6d0`](bcdf6d0938) chore: pre release sync
- [`d5b5e3b`](d5b5e3bfde) fix: fix loaderOptions.postcss detection ([#3201](https://github-redirect.dependabot.com/vuejs/vue-cli/issues/3201))
- [`f15dcf7`](f15dcf7f48) feat: replace babel-plugin-transform-vue-jsx with @vue/babel-preset-jsx ([#3218](https://github-redirect.dependabot.com/vuejs/vue-cli/issues/3218))
- [`e7af0d8`](e7af0d8fa3) feat: deprecate confusing `baseUrl` option, use `publicPath` instead. ([#3143](https://github-redirect.dependabot.com/vuejs/vue-cli/issues/3143))
- [`8b4471e`](8b4471e78c) fix(cli-service): fix copy plugin's ignore pattern (fix [#3119](https://github-redirect.dependabot.com/vuejs/vue-cli/issues/3119)) ([#3130](https://github-redirect.dependabot.com/vuejs/vue-cli/issues/3130))
- [`4070507`](4070507de6) fix: typo in welcome tips ([#3246](https://github-redirect.dependabot.com/vuejs/vue-cli/issues/3246)) [ci skip]
- [`d88f2fa`](d88f2faf64) chore: vue-cli-version-marker@3.2.3
- Additional commits viewable in [compare view](https://github.com/vuejs/vue-cli/compare/vue-cli-version-marker@3.2.2...vue-cli-version-marker@3.3.0)
</details>
<br />

[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=@vue/cli-plugin-eslint&package-manager=npm_and_yarn&previous-version=3.2.2&new-version=3.3.0)](https://dependabot.com/compatibility-score.html?dependency-name=@vue/cli-plugin-eslint&package-manager=npm_and_yarn&previous-version=3.2.2&new-version=3.3.0)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

**Note:** This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.

You can always request more updates by clicking `Bump now` in your [Dependabot dashboard](https://app.dependabot.com).

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

Finally, you can contact us by mentioning @dependabot.

</details>
2019-01-08 12:57:44 +00:00
Henrique Dias
0e7d4ef110 fix: drop to itself (close #33
)
License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
2019-01-06 12:01:23 +00:00
Henrique Dias
7a6397af22 feat: show search progressively
License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
2019-01-06 10:06:08 +00:00
Henrique Dias
ac512612e7 fix: fixed header
License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
2019-01-06 09:49:41 +00:00
Henrique Dias
95fc3dfdfb feat: update i18n
License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
2019-01-05 16:24:09 +00:00
Henrique Dias
39be89780e feat: code cleanup, new features and v2.0
We're merging this to continue https://github.com/filebrowser/filebrowser/pull/575 and setup translations auto-updating.
2019-01-05 16:12:09 +00:00
Mike Lei
2642333928 fix misleading prompt in zh-cn (#47) 2018-12-24 18:33:08 +01:00
helloray
7e1d745435 Fix/fast change directory (#43)
* fix:fast changing directory issue

* fix baseURL is not included
2018-12-05 11:25:26 +00:00
Rene Kaufmann
218e638f88 fix: lowercase BaseURL [filebrowser/filebrowser#522] (#40) 2018-11-19 17:15:25 +00:00
Henrique Dias
cad2a989c1 fix: arabic filename 2018-11-11 22:16:36 +00:00
Mohammed Essam Helewa
f844aeb2b4 feat: arabic support
I tried my best without looking to the plugin. I could refine this translation in future after going deep with this package :)
2018-11-11 16:20:42 +00:00
Marcos Gabriel
7847763a31 correction of some terms in pt_BR (#32) 2018-10-24 01:30:49 +02:00
Im, Juno
3f49bc382e feature(i18n): add Korean translation (#34) 2018-10-08 23:42:21 +01:00
1138-4EB
3ae9e518a3 fix: lowercase BaseURL (filebrowser/filebrowser#522) 2018-08-24 00:20:20 +01:00
1138-4EB
1e5ced6737 fix: remove spaces before command output (#31) 2018-08-21 12:48:37 +01:00
Henrique Dias
fa67652ba4 fix: multiple selection enabled always visible (#30)
Although I couldn't reproduce #29, this fixes #29. It now truly hides the box while multiple selection isn't activated.

License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
2018-08-20 09:03:47 +01:00
Dawid 'DeyV' Polak
62106cc0a4 fixes: displaced search text (closes #20) 2018-08-16 21:36:00 +01:00
Henrique Dias
99740e3eab docs: add freenode badge 2018-08-08 09:15:16 +01:00
Henrique Dias
c12adbb594 chore: add travis (#27) 2018-08-07 13:44:35 +01:00
Hugo Massing
157b2da133 feat(inputs): add better autofocus (#26)
fix issue #25
2018-08-06 12:20:20 +01:00
1138-4EB
208f21728f update 'Report issue' URL [filebrowser/filebrowser#477] (#22) 2018-08-02 12:12:53 +01:00
Hugo Massing
0377080da6 feat(rename): add default value for renaming file (#23) 2018-07-31 21:45:36 +01:00
1138-4EB
f5c48c9679 Use v-for to create boxes in Search.vue (#21)
`:key="k"` is required because of vuejs/vetur#261.
2018-07-29 20:07:49 +01:00
Dawid 'DeyV' Polak
99ef1308ea fix: typos and new words in polish translation (#19) 2018-07-29 07:52:57 +01:00
VLEFF
9f075c16c5 feat: handle subtitles for video streaming (#18) 2018-07-26 10:47:01 +01:00
Henrique Dias
2f17f19425 feat: infinite scrolling (#17)
Related to: https://github.com/filebrowser/filebrowser/issues/155
2018-07-23 14:48:55 +01:00
Dawid 'DeyV' Polak
06f00e9664 feat: polish translation (#16) 2018-07-12 09:41:52 +01:00
Andrea
c681174adf feat: add italian language (#15) 2018-07-01 21:40:23 +01:00
Henrique Dias
4a12ce1888 chore: bump version to 1.5.0 2018-06-28 11:54:36 +01:00
Henrique Dias
4e39f2387a fix: add pt-br to languages list 2018-06-28 11:42:55 +01:00
DeAlexPesh
e354098b96 feat: add Russian translation (#14) 2018-06-28 09:57:06 +01:00
Conrado Quilles Gomes
9086720c3c feat: add Brazillian Portuguese translation 2018-06-27 17:37:13 +01:00
Beat
2bb9171e32 Fix - Use of index as key in a v-for directive to prevent duplicate key errors (#10) 2018-06-27 08:48:16 +01:00
1138-4EB
294efef38c update icon/favicon (#9)
Related to filebrowser/filebrowser#417, filebrowser/filebrowser#433 and filebrowser/filebrowser#436.

I used https://realfavicongenerator.net to generate multiple favicon files of the new design by @timonss in different formats. These are the previews:

![android](https://user-images.githubusercontent.com/6628437/41185230-25aa4292-6b7e-11e8-9bb4-714c443eeefb.png) ![ios](https://user-images.githubusercontent.com/6628437/41185232-2733a9be-6b7e-11e8-97f6-ae8915f21980.png)
![safari](https://user-images.githubusercontent.com/6628437/41185235-28bed84e-6b7e-11e8-9b45-95a227bebbe4.png) ![win](https://user-images.githubusercontent.com/6628437/41185237-2a379904-6b7e-11e8-918d-ea600d8704a4.png)
2018-06-26 17:12:12 +01:00
Henrique Dias
4f1d25fba7 chore: bump version 1.4.0 2018-05-20 13:02:09 +01:00
Henrique Dias
d3e363a4d5 fix: material in TTF and EOT (#8)
Fixes https://github.com/filebrowser/filebrowser/issues/404.
2018-05-20 12:44:06 +01:00
Henrique Dias
a10f286f0f chore: update version 2018-04-23 20:22:43 +01:00
1138-4EB
390c53097f fix filebrowser/filebrowser#312, use prefix $ for commands (#7) 2018-04-23 20:21:36 +01:00
Henrique Dias
4c30b2c665 chore: update dependencies (#6) 2018-04-01 11:49:59 +01:00
Henrique Dias
325e6e0904 chore: bump version to 1.2.0 2018-03-10 13:19:52 +00:00
Equim
56ec440272 i18n: zh: minor fix 2018-02-28 13:51:52 +08:00
Henrique Dias
0af5e07eed chore: bump version to 1.1.0 2018-02-27 17:09:18 +00:00
Equim
8a764ceb67 feat: varied recaptcha host 2018-02-27 17:08:14 +00:00
Equim
fe829aa850 build: also uglify service worker 2018-02-25 01:29:45 +08:00
Henrique Dias
2ca22656d6 chore: bump version to 1.0.4 2018-02-24 08:42:08 +00:00
Henrique Dias
cb7fa99fd3 fix: select last item on mobile 2018-02-24 08:40:46 +00:00
Henrique Dias
441639a8d5 chore: bump version 2018-02-03 00:13:08 +01:00
Sebastian
a78e1d504b feat: add German translation´ 2018-02-02 23:11:19 +00:00
Henrique Dias
02f6b0ec61 chore: bump version 2018-02-01 15:30:34 +00:00
Henrique Dias
8c60cc7084 fix: notification style 2018-02-01 15:30:19 +00:00
Henrique Dias
a7e4596e97 chore: bump version 2018-02-01 14:57:55 +00:00
Henrique Dias
97d53ceb2e Merge branch 'master' of https://github.com/filebrowser/vue 2018-02-01 14:54:19 +00:00
Henrique Dias
a49fb20885 chore: add npmignore 2018-02-01 14:52:51 +00:00
Henrique Dias
2d5e97e140 docs: fix npm badge 2018-02-01 14:51:07 +00:00
Henrique Dias
ebdf5a0601 docs: update readme 2018-02-01 14:50:48 +00:00
Henrique Dias
9ca02c90ed chore: fix ci 2018-02-01 14:46:05 +00:00
Henrique Dias
0595638228 chore: add circle 2018-02-01 14:43:54 +00:00
Henrique Dias
1f4d0cc3cd docs: update 2018-02-01 12:40:20 +00:00
Henrique Dias
e6c0d1c28a initial commit 2018-02-01 12:17:04 +00:00
254 changed files with 47408 additions and 942 deletions

View File

@@ -1,108 +0,0 @@
version: 2
jobs:
lint:
docker:
- image: golangci/golangci-lint:v1.16
steps:
- checkout
- run: golangci-lint run -v -D errcheck
build-node:
docker:
- image: circleci/node
steps:
- checkout
- run:
name: "Pull Submodules"
command: |
git submodule init
git submodule update --remote
- run:
name: "Build"
command: ./wizard.sh -a
- run:
name: "Cleanup"
command: rm -rf frontend/node_modules
- persist_to_workspace:
root: .
paths:
- '*'
build-go:
docker:
- image: circleci/golang:1.12
steps:
- attach_workspace:
at: '~/project'
- run:
name: "Compile"
command: GOOS=linux GOARCH=amd64 ./wizard.sh -c
- run:
name: "Cleanup"
command: |
rm -rf frontend/build
git checkout -- go.sum # TODO: why is it being changed?
- persist_to_workspace:
root: .
paths:
- '*'
docker-latest:
docker:
- image: docker
steps:
- attach_workspace:
at: '~/project'
- setup_remote_docker
- run: docker build -t filebrowser/filebrowser .
- run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- run: docker push filebrowser/filebrowser
- run: docker logout
- persist_to_workspace:
root: .
paths:
- '*'
release:
docker:
- image: circleci/golang:1.12
steps:
- attach_workspace:
at: '~/project'
- setup_remote_docker
- run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- run: curl -sL https://git.io/goreleaser | bash
- run: docker logout
workflows:
version: 2
build-workflow:
jobs:
- lint:
filters:
tags:
only: /.*/
- build-node:
filters:
tags:
only: /.*/
- build-go:
filters:
tags:
only: /.*/
requires:
- build-node
- lint
- release:
context: deploy
requires:
- build-go
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
- docker-latest:
context: deploy
requires:
- build-go
filters:
branches:
only: master
tags:
ignore: /.*/

View File

@@ -5,4 +5,4 @@
"log": "stdout", "log": "stdout",
"database": "/database.db", "database": "/database.db",
"root": "/srv" "root": "/srv"
} }

View File

@@ -1,3 +1,3 @@
testdata/ *
.github/ !.docker.json
**.git !filebrowser

5
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1,5 @@
# These owners will be the default owners for everything in the repo.
# Unless a later match takes precedence, @o1egl will be requested for
# review when someone opens a pull request.
* @o1egl

View File

@@ -4,19 +4,19 @@ about: Create a report to help us improve
--- ---
**Description** **Description**
A clear and concise description of what the issue is about. What are you trying to do? <!-- A clear and concise description of what the issue is about. What are you trying to do? -->
**Expected behaviour** **Expected behaviour**
What did you expect to happen? <!-- What did you expect to happen? -->
**What is happening instead?** **What is happening instead?**
Please, give full error messages and/or log. <!-- Please, give full error messages and/or log. -->
**Additional context** **Additional context**
Add any other context about the problem here. If applicable, add screenshots to help explain your problem. <!-- Add any other context about the problem here. If applicable, add screenshots to help explain your problem. -->
**How to reproduce?** **How to reproduce?**
Tell us how to reproduce this issue. How can someone who is starting from scratch reproduce this behaviour as minimally as possible? <!-- Tell us how to reproduce this issue. How can someone who is starting from scratch reproduce this behaviour as minimally as possible? -->
**Files** **Files**
A list of relevant files for this issue. Large files can be uploaded one-by-one or in a tarball/zipfile. <!-- A list of relevant files for this issue. Large files can be uploaded one-by-one or in a tarball/zipfile. -->

View File

@@ -4,13 +4,13 @@ about: Suggest an idea for this project
--- ---
**Is your feature request related to a problem? Please describe.** **Is your feature request related to a problem? Please describe.**
Add a clear and concise description of what the problem is. E.g. *I'm always frustrated when [...]* <!-- Add a clear and concise description of what the problem is. E.g. *I'm always frustrated when [...]* -->
**Describe the solution you'd like** **Describe the solution you'd like**
Add a clear and concise description of what you want to happen. <!-- Add a clear and concise description of what you want to happen. -->
**Describe alternatives you've considered** **Describe alternatives you've considered**
Add a clear and concise description of any alternative solutions or features you've considered. <!-- Add a clear and concise description of any alternative solutions or features you've considered. -->
**Additional context** **Additional context**
Add any other context or screenshots about the feature request here. <!-- Add any other context or screenshots about the feature request here. -->

View File

@@ -1,6 +1,8 @@
**Description** **Description**
<!--
Please explain the changes you made here. Please explain the changes you made here.
If the feature changes current behaviour, explain why your solution is better. If the feature changes current behaviour, explain why your solution is better.
-->
:rotating_light: Before submitting your PR, please read [community](https://github.com/filebrowser/community), and indicate which issues (in any of the repos) are either fixed or closed by this PR. See [GitHub Help: Closing issues using keywords](https://help.github.com/articles/closing-issues-via-commit-messages/). :rotating_light: Before submitting your PR, please read [community](https://github.com/filebrowser/community), and indicate which issues (in any of the repos) are either fixed or closed by this PR. See [GitHub Help: Closing issues using keywords](https://help.github.com/articles/closing-issues-via-commit-messages/).
@@ -11,6 +13,8 @@ If the feature changes current behaviour, explain why your solution is better.
- [ ] AVOID breaking the continuous integration build. - [ ] AVOID breaking the continuous integration build.
**Further comments** **Further comments**
<!--
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did, what alternatives you considered, etc. If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did, what alternatives you considered, etc.
:heart: Thank you! :heart: Thank you!
-->

66
.github/workflows/main.yaml vendored Normal file
View File

@@ -0,0 +1,66 @@
name: main
on:
push:
branches:
- 'master'
tags:
- 'v*'
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.16
- uses: actions/setup-node@v2
with:
node-version: '14'
- run: npm i -g commitlint
- run: make lint
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.16
- uses: actions/setup-node@v2
with:
node-version: '14'
- run: make test
release:
runs-on: ubuntu-latest
needs: [lint, test]
if: startsWith(github.event.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-go@v2
with:
go-version: 1.16
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build fronetend
run: make build-frontend
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}

24
.gitignore vendored
View File

@@ -5,3 +5,27 @@ _old
rice-box.go rice-box.go
.idea/ .idea/
filebrowser filebrowser
filebrowser.exe
.DS_Store
node_modules
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*
bin/
build/

3
.gitmodules vendored
View File

@@ -1,3 +0,0 @@
[submodule "frontend"]
path = frontend
url = https://github.com/filebrowser/frontend

120
.golangci.yml Normal file
View File

@@ -0,0 +1,120 @@
linters-settings:
dupl:
threshold: 100
exhaustive:
default-signifies-exhaustive: false
funlen:
lines: 100
statements: 50
gci:
local-prefixes: github.com/filebrowser/filebrowser
goconst:
min-len: 2
min-occurrences: 2
gocritic:
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style
disabled-checks:
- dupImport # https://github.com/go-critic/go-critic/issues/845
- ifElseChain
- octalLiteral
- whyNoLint
- wrapperFunc
gocyclo:
min-complexity: 15
goimports:
local-prefixes: github.com/filebrowser/filebrowser
gomnd:
settings:
mnd:
# don't include the "operation" and "assign"
checks: argument,case,condition,return
govet:
check-shadowing: true
lll:
line-length: 140
maligned:
suggest-new: true
misspell:
locale: US
nolintlint:
allow-leading-space: true # don't require machine-readable nolint directives (i.e. with no leading space)
allow-unused: false # report any unused nolint directives
require-explanation: false # don't require an explanation for nolint directives
require-specific: false # don't require nolint directives to be specific about which linter is being skipped
linters:
# please, do not use `enable-all`: it's deprecated and will be removed soon.
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
disable-all: true
enable:
- bodyclose
- deadcode
- depguard
- dogsled
- dupl
- errcheck
- exportloopref
- exhaustive
- funlen
- gochecknoinits
- goconst
- gocritic
- gocyclo
- goimports
- gomnd
- goprintffuncname
- gosec
- gosimple
- govet
- ineffassign
- lll
- misspell
- nakedret
- nolintlint
- rowserrcheck
- staticcheck
- structcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused
- varcheck
- whitespace
- prealloc
issues:
exclude-rules:
- path: cmd/.*.go
linters:
- gochecknoinits
- path: .*_test.go
linters:
- lll
- gochecknoinits
- gocyclo
- funlen
- dupl
- scopelint
- text: "Auther"
linters:
- misspell
- text: "strconv.Parse"
linters:
- gomnd
run:
skip-dirs:
- frontend/
skip-files:
- http/rice-box.go
# golangci.com configuration
# https://github.com/golangci/golangci/wiki/Configuration
service:
golangci-lint-version: 1.27.x # use the fixed version to not introduce new linters unexpectedly

View File

@@ -3,10 +3,6 @@ project_name: filebrowser
env: env:
- GO111MODULE=on - GO111MODULE=on
before:
hooks:
- go mod download
build: build:
env: env:
- CGO_ENABLED=0 - CGO_ENABLED=0
@@ -19,10 +15,6 @@ build:
- linux - linux
- windows - windows
- freebsd - freebsd
- netbsd
- openbsd
- dragonfly
- solaris
goarch: goarch:
- amd64 - amd64
- 386 - 386
@@ -35,14 +27,8 @@ build:
ignore: ignore:
- goos: darwin - goos: darwin
goarch: 386 goarch: 386
- goos: openbsd
goarch: arm
- goos: freebsd - goos: freebsd
goarch: arm goarch: arm
- goos: netbsd
goarch: arm
- goos: solaris
goarch: arm
archives: archives:
- -
@@ -54,12 +40,107 @@ archives:
dockers: dockers:
- -
dockerfile: Dockerfile
use_buildx: true
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- "--platform=linux/amd64"
goos: linux goos: linux
goarch: amd64 goarch: amd64
goarm: ''
image_templates: image_templates:
- "filebrowser/filebrowser:latest" - "filebrowser/filebrowser:{{ .Tag }}-amd64"
- "filebrowser/filebrowser:{{ .Tag }}" - "filebrowser/filebrowser:v{{ .Major }}-amd64"
- "filebrowser/filebrowser:v{{ .Major }}"
extra_files: extra_files:
- .docker.json - .docker.json
-
dockerfile: Dockerfile
use_buildx: true
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- "--platform=linux/arm64"
goos: linux
goarch: arm64
image_templates:
- "filebrowser/filebrowser:{{ .Tag }}-arm64"
- "filebrowser/filebrowser:v{{ .Major }}-arm64"
extra_files:
- .docker.json
-
dockerfile: Dockerfile
use_buildx: true
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- "--platform=linux/arm/v6"
goos: linux
goarch: arm
goarm: '6'
image_templates:
- "filebrowser/filebrowser:{{ .Tag }}-armv6"
- "filebrowser/filebrowser:v{{ .Major }}-armv6"
extra_files:
- .docker.json
-
dockerfile: Dockerfile
use_buildx: true
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- "--platform=linux/arm/v7"
goos: linux
goarch: arm
goarm: '7'
image_templates:
- "filebrowser/filebrowser:{{ .Tag }}-armv7"
- "filebrowser/filebrowser:v{{ .Major }}-armv7"
extra_files:
- .docker.json
docker_manifests:
- name_template: "filebrowser/filebrowser:latest"
image_templates:
- "filebrowser/filebrowser:{{ .Tag }}-amd64"
- "filebrowser/filebrowser:{{ .Tag }}-arm64"
- "filebrowser/filebrowser:{{ .Tag }}-armv6"
- "filebrowser/filebrowser:{{ .Tag }}-armv7"
- name_template: "filebrowser/filebrowser:{{ .Tag }}"
image_templates:
- "filebrowser/filebrowser:{{ .Tag }}-amd64"
- "filebrowser/filebrowser:{{ .Tag }}-arm64"
- "filebrowser/filebrowser:{{ .Tag }}-armv6"
- "filebrowser/filebrowser:{{ .Tag }}-armv7"
- name_template: "filebrowser/filebrowser:v{{ .Major }}"
image_templates:
- "filebrowser/filebrowser:v{{ .Major }}-amd64"
- "filebrowser/filebrowser:v{{ .Major }}-arm64"
- "filebrowser/filebrowser:v{{ .Major }}-armv6"
- "filebrowser/filebrowser:v{{ .Major }}-armv7"
brews:
- name: filebrowser
tap:
owner: filebrowser
name: homebrew-tap
folder: Formula
homepage: https://filebrowser.org
commit_author:
name: FileBrowser Robot
email: robot@filebrowser.org
description: File Browser is a create-your-own-cloud-kind of software where you can install it on a server, direct it to a path and then access your files through a nice web interface
license: "MIT"

10
.tx/config Normal file
View File

@@ -0,0 +1,10 @@
[main]
host = https://www.transifex.com
lang_map = pt_BR: pt-br, zh_CN: zh-cn, zh_HK: zh-hk, zh_TW: zh-tw, nl_BE: nl-be, sv_SE: sv-se
[file-browser.file-browser]
file_filter = frontend/src/i18n/<lang>.json
minimum_perc = 50
source_file = frontend/src/i18n/en.json
source_lang = en
type = KEYVALUEJSON

14
.versionrc Normal file
View File

@@ -0,0 +1,14 @@
{
"types": [
{ "type": "feat", "section": "Features" },
{ "type": "fix", "section": "Bug Fixes" },
{ "type": "perf", "section": "Performance improvements" },
{ "type": "revert", "section": "Reverts" },
{ "type": "refactor", "section": "Refactorings" },
{ "type": "build", "section": "Build" },
{ "type": "ci", "hidden": true },
{ "type": "test", "hidden": true },
{ "type": "chore", "hidden": true },
{ "type": "docs", "hidden": true }
]
}

367
CHANGELOG.md Normal file
View File

@@ -0,0 +1,367 @@
# Changelog
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [2.18.0](https://github.com/filebrowser/filebrowser/compare/v2.17.2...v2.18.0) (2021-10-31)
### Features
* add ability to select file modified time format ([#1536](https://github.com/filebrowser/filebrowser/issues/1536)) ([0426629](https://github.com/filebrowser/filebrowser/commit/0426629a59c712849570d3e29956948ae7725a4a))
* add manifest theme color param ([#1542](https://github.com/filebrowser/filebrowser/issues/1542)) ([0358e42](https://github.com/filebrowser/filebrowser/commit/0358e42d2c206732fffa77714f5a66f4fe50a69d))
### Bug Fixes
* back button behaviour in preview ([#1573](https://github.com/filebrowser/filebrowser/issues/1573)) ([deabc80](https://github.com/filebrowser/filebrowser/commit/deabc80fd7670983039dfcd29531b45002ca5d9e))
* fix sidebar navigation on mobile devices ([#1618](https://github.com/filebrowser/filebrowser/issues/1618)) ([f09bf3e](https://github.com/filebrowser/filebrowser/commit/f09bf3e1d076b27d29ba8a91cf448a99993bc444))
* search box is misaligned when the browser preferred font size is other than 16px ([#1613](https://github.com/filebrowser/filebrowser/issues/1613)) ([6f345be](https://github.com/filebrowser/filebrowser/commit/6f345be3e47ba57ecc1eb9a62587ab949078c125))
* security issue in command runner (closes [#1621](https://github.com/filebrowser/filebrowser/issues/1621)) ([74b7cd8](https://github.com/filebrowser/filebrowser/commit/74b7cd8e81840537a8206317344f118093153e8d))
* set correct editor height regardless of preferred font size ([#1614](https://github.com/filebrowser/filebrowser/issues/1614)) ([ddd4ffa](https://github.com/filebrowser/filebrowser/commit/ddd4ffa4caa6b292a3a644ecd897aba1237c7503))
* zoom pics when dlclick at first time ([#1561](https://github.com/filebrowser/filebrowser/issues/1561)) ([b6a51be](https://github.com/filebrowser/filebrowser/commit/b6a51bed516814944f8aa41440652242d57824c5))
### [2.17.2](https://github.com/filebrowser/filebrowser/compare/v2.17.1...v2.17.2) (2021-08-27)
### Bug Fixes
* bug with inlineLink not creating url properly ([#1515](https://github.com/filebrowser/filebrowser/issues/1515)) ([43a4609](https://github.com/filebrowser/filebrowser/commit/43a460993c3f0d158b876db4b20caa7963e9f361))
### [2.17.1](https://github.com/filebrowser/filebrowser/compare/v2.17.0...v2.17.1) (2021-08-23)
### Bug Fixes
* internal server error if --disable-preview-resize flag is set (closes [#1510](https://github.com/filebrowser/filebrowser/issues/1510)) ([4c3099a](https://github.com/filebrowser/filebrowser/commit/4c3099a086c206dcb3bc70ee8c8da02eee61c30b))
## [2.17.0](https://github.com/filebrowser/filebrowser/compare/v2.16.1...v2.17.0) (2021-08-21)
### Features
* open file option on preview ([76add9e](https://github.com/filebrowser/filebrowser/commit/76add9e5274b0373c6b983e3b20e387a14ea6c9e))
### Bug Fixes
* 401 error in share view open file button ([#1495](https://github.com/filebrowser/filebrowser/issues/1495)) ([25c8788](https://github.com/filebrowser/filebrowser/commit/25c87883908babde073390a2e2320a8e5880a87c))
* escape quote on index template ([23d646c](https://github.com/filebrowser/filebrowser/commit/23d646c456876d06cf48e71c1e57b69de99511f0)), closes [#1501](https://github.com/filebrowser/filebrowser/issues/1501)
* file caching directive ([c63cc5a](https://github.com/filebrowser/filebrowser/commit/c63cc5a2d25909cc4e2f2e7235f276ec66c32bf2))
### [2.16.1](https://github.com/filebrowser/filebrowser/compare/v2.16.0...v2.16.1) (2021-08-04)
### Bug Fixes
* check symlink target type (closes [#1488](https://github.com/filebrowser/filebrowser/issues/1488)) ([76b466f](https://github.com/filebrowser/filebrowser/commit/76b466f6492e74cf13e66a33e7e5f597ac92b240))
## [2.16.0](https://github.com/filebrowser/filebrowser/compare/v2.15.0...v2.16.0) (2021-07-26)
### Features
* browser cache directives ([190cb99](https://github.com/filebrowser/filebrowser/commit/190cb99a79a0d438eca2da13539f8c6449ad73ac))
* display error messages on settings ([6032038](https://github.com/filebrowser/filebrowser/commit/603203848a8b2221158088b6d849609db4c0c46c))
* file name on page title ([16a34de](https://github.com/filebrowser/filebrowser/commit/16a34defc02554a77c6ac47b9e17e69d098a09fe))
* gzip encoding for static js files ([aa172b8](https://github.com/filebrowser/filebrowser/commit/aa172b8bb5f17d5f5cb9666bfb5ee650d8091fb5))
* loading spinner on views navigation ([976eb55](https://github.com/filebrowser/filebrowser/commit/976eb5583dae474125fd7ddec5dc19b6c291f98f))
* message for connection error ([5e6f14b](https://github.com/filebrowser/filebrowser/commit/5e6f14b5dcb9c5efdf526f1346e09c2d0b2f6974))
* mod time title on file info ([7d1e030](https://github.com/filebrowser/filebrowser/commit/7d1e03075d2c27148f60813defa0f68403d1d3c2))
* open file option on share ([1c25f6e](https://github.com/filebrowser/filebrowser/commit/1c25f6ee69bd71eed82af7020006d0e27537a967))
* show more button on share ([ba8c09f](https://github.com/filebrowser/filebrowser/commit/ba8c09f454feeadf4a1e97547a34151a81b389d5))
* support for IE11 browser ([7ec24d9](https://github.com/filebrowser/filebrowser/commit/7ec24d9d7794fa37825f64ca2d1575f568fb1362))
### Bug Fixes
* break resource create/update handlers on error (closes [#1464](https://github.com/filebrowser/filebrowser/issues/1464)) ([5072bbb](https://github.com/filebrowser/filebrowser/commit/5072bbb2cbf5b29d041629faa8367f15e4d145a2))
* copying files with special characters ([20ebbf6](https://github.com/filebrowser/filebrowser/commit/20ebbf6611b734371426fb1b9cb5e388be90bf7e))
* delete image cache when moving ([8973c45](https://github.com/filebrowser/filebrowser/commit/8973c4598ff817647f1f1ad6ee36480054cd2776))
* don't remove files on unsuccessful updates (closes [#1456](https://github.com/filebrowser/filebrowser/issues/1456)) ([6b19ab6](https://github.com/filebrowser/filebrowser/commit/6b19ab6613b12be7f075299cd98f4b41d43827c7))
* failure on broken symlink deletion ([8650d2f](https://github.com/filebrowser/filebrowser/commit/8650d2ffe7a29cbafa800efcecbf6a61598a9f0c))
* inconsistent double click on listing item ([ba7e71a](https://github.com/filebrowser/filebrowser/commit/ba7e71a7c3b0cc71012e5adf94b1c642e554972e))
* no items displayed on file listing ([18889ad](https://github.com/filebrowser/filebrowser/commit/18889ad725f7f7e5a7e3f7abcf156487556dbeaf))
* omit file content ([209f9fa](https://github.com/filebrowser/filebrowser/commit/209f9fa77f751054512355f2b74b9b7258465d0b))
* short commit sha and typo fix in Makefile ([#1411](https://github.com/filebrowser/filebrowser/issues/1411)) ([46ee595](https://github.com/filebrowser/filebrowser/commit/46ee59538914dc2859f0da6b32e2d062d0a01b10))
## [2.15.0](https://github.com/filebrowser/filebrowser/compare/v2.14.1...v2.15.0) (2021-04-06)
### Features
* add EXIF thumbnail support for JPEG files ([#1234](https://github.com/filebrowser/filebrowser/issues/1234)) ([7dd5b34](https://github.com/filebrowser/filebrowser/commit/7dd5b34d425dfbc2782152310483cbecf85c800a))
* dynamic autoplay on previewer ([a76e01d](https://github.com/filebrowser/filebrowser/commit/a76e01d2b78a785f3665a8b3532c7cc566bfabce))
* dynamic item count on file listing ([6c8ee96](https://github.com/filebrowser/filebrowser/commit/6c8ee96e6a21fae5d4608bdc7a5c5a161d7dafd3))
* dynamic zoom limit on previewer ([e410272](https://github.com/filebrowser/filebrowser/commit/e410272e6be6a0b660efe8d4eee6c6e9dd834cc5))
### Bug Fixes
* buttons without permission on header ([1516d99](https://github.com/filebrowser/filebrowser/commit/1516d9932bf9926ac8b4cb3e738a5f51e80d5b1d))
* check modify permission on file overwrite ([59f9964](https://github.com/filebrowser/filebrowser/commit/59f9964e80c8233775f27be33a4c16a31bfe848a))
* empty archive name on directory download ([2697093](https://github.com/filebrowser/filebrowser/commit/2697093ac151f74eea3022951d128acfe04d1dcf))
* empty text file on editor ([e9baf0c](https://github.com/filebrowser/filebrowser/commit/e9baf0c4b688fab291cdc842ec464c7a7a816499))
* error causes panic on upload ([e1a6f59](https://github.com/filebrowser/filebrowser/commit/e1a6f593e1824e7fa4345a61dff5b1bb8cd22d05))
* hidden editor header on Safari ([b521dec](https://github.com/filebrowser/filebrowser/commit/b521dec8f9b14dd92248c429e902ebc639046389))
* image quality switch on previewer ([c0d85f3](https://github.com/filebrowser/filebrowser/commit/c0d85f3d85926c8790757bf142140d19455ae8ca))
* list item interactions on share ([87f1881](https://github.com/filebrowser/filebrowser/commit/87f1881b429877a740ea84a8e783ad4103248289))
* missing bold variation for Roboto font ([98d79b8](https://github.com/filebrowser/filebrowser/commit/98d79b8ed955df5691a306d709b4ab60d91da408))
* mouse wheel zoom on previewer ([fcb115f](https://github.com/filebrowser/filebrowser/commit/fcb115f42d33db2be7a4d428ec53d65d6050320b))
* no header button animations on file listing ([fe80730](https://github.com/filebrowser/filebrowser/commit/fe80730bb135b38e4d9de470c75cbe10b1aec201))
### [2.14.1](https://github.com/filebrowser/filebrowser/compare/v2.14.0...v2.14.1) (2021-03-21)
### Bug Fixes
* display public routes with header proxy auth ([da54bd6](https://github.com/filebrowser/filebrowser/commit/da54bd6c214d7ee39b71d710ddfe6dd25fc4e5d6))
## [2.14.0](https://github.com/filebrowser/filebrowser/compare/v2.13.0...v2.14.0) (2021-03-21)
### Features
* add health check handler ([a721dc1](https://github.com/filebrowser/filebrowser/commit/a721dc1f314732e60d331a1a7da97d06e0e8b613))
### Bug Fixes
* hide dotfile error on share ([5f4a031](https://github.com/filebrowser/filebrowser/commit/5f4a0317ab5685fe4a558df74e604c12e04a1c10))
* prefix handling on http router ([93a35ad](https://github.com/filebrowser/filebrowser/commit/93a35ad2516accdcb9735db509550979d01de2c3))
* qr code url on share ([22f4be8](https://github.com/filebrowser/filebrowser/commit/22f4be8f54162b7cf494177705ffb8b09117bd01))
* text file detection on editor ([eeadc53](https://github.com/filebrowser/filebrowser/commit/eeadc532fe6057969b3c1a4726f236851b154cfa))
## [2.13.0](https://github.com/filebrowser/filebrowser/compare/v2.12.1...v2.13.0) (2021-03-14)
### Features
* dual pane settings view ([db5aad8](https://github.com/filebrowser/filebrowser/commit/db5aad8eb679cfe1b1ace5142cf342951217f0f7))
* improved settings navbar ([5b28aa0](https://github.com/filebrowser/filebrowser/commit/5b28aa0848710b9d3ee02a2aa912856395f48bd2))
* improved sharing prompt ([1819377](https://github.com/filebrowser/filebrowser/commit/18193778971e27d18b5a35df8c2d0e2953b48111))
* increased header button counter size ([4fb832c](https://github.com/filebrowser/filebrowser/commit/4fb832c0422107e16f22b7aa928224f36de4978f))
* larger previewer content ([62fff5c](https://github.com/filebrowser/filebrowser/commit/62fff5ca60da1f887c1f95fa4808d3753596dab2))
### Bug Fixes
* archive contains parent path on Windows ([54f3570](https://github.com/filebrowser/filebrowser/commit/54f35701a2bd5cb7ec0628ca9789047072c073db))
* check rules on http resource handlers ([5bf1554](https://github.com/filebrowser/filebrowser/commit/5bf15548d0ad147acfad5000277531be2671f7ce))
* download current dir on file listing ([488d980](https://github.com/filebrowser/filebrowser/commit/488d98045e7476ed11e53c13d9498a9db3165bbc))
* encoded file path on share ([7955e07](https://github.com/filebrowser/filebrowser/commit/7955e0720baef3710106c7e69bbbf078d5489220))
* full file path on share ([e017a19](https://github.com/filebrowser/filebrowser/commit/e017a199850e19dd51b960ba59402c215fd8f1af))
* header dropdown icon color on previewer ([f8df76f](https://github.com/filebrowser/filebrowser/commit/f8df76f52684f10722ce123fec2c90e321ddf103))
* item dragging on file listing ([326b35a](https://github.com/filebrowser/filebrowser/commit/326b35a7ac7871afcdf892ca150349665b7f6379))
* modified time on info prompt ([11ebaec](https://github.com/filebrowser/filebrowser/commit/11ebaec5f0671ec02ebe55d4a73a514bce3a6713))
* root path name on archive ([426b38b](https://github.com/filebrowser/filebrowser/commit/426b38bb3362d2d477d0d8aa27d880664d537431))
* stuck icon on header button ([6a734c0](https://github.com/filebrowser/filebrowser/commit/6a734c01391b437c2842f5d97fb63f29a0017510))
* update image cache when replacing ([81b6f4d](https://github.com/filebrowser/filebrowser/commit/81b6f4d6f6a01886583016f61f4f1951a59f244d))
* wait for async command exit ([#1326](https://github.com/filebrowser/filebrowser/issues/1326)) ([6d5ceae](https://github.com/filebrowser/filebrowser/commit/6d5ceae8b454edd749b3b65c88aacc0a31ce9215))
### Refactorings
* migrate from rice to embed.FS ([fc55061](https://github.com/filebrowser/filebrowser/commit/fc5506179a64e9e2f57f7b6d6cce4b95f5ebc235))
### [2.12.1](https://github.com/filebrowser/filebrowser/compare/v2.12.0...v2.12.1) (2021-03-07)
### Bug Fixes
* add missing default config into the docker image ([7358b3f](https://github.com/filebrowser/filebrowser/commit/7358b3fe3178c20007b4b5ef5c03705badd538c4))
## [2.12.0](https://github.com/filebrowser/filebrowser/compare/v2.11.0...v2.12.0) (2021-03-04)
### Features
* add homebrew tap ([2d2c598](https://github.com/filebrowser/filebrowser/commit/2d2c598fa6bd1ecaf39c542182890c8dd9b1cad0))
* added tiff files preview support ([#1222](https://github.com/filebrowser/filebrowser/issues/1222)) ([e8c9d1c](https://github.com/filebrowser/filebrowser/commit/e8c9d1c53989b4b52f6fba2a8ac41ae612c03a7c))
* allow disabling file detections by reading header ([#1175](https://github.com/filebrowser/filebrowser/issues/1175)) ([6914063](https://github.com/filebrowser/filebrowser/commit/6914063853a8a3f3cecfa4b21f223820c2a0b7df))
* allow to password protect shares ([#1252](https://github.com/filebrowser/filebrowser/issues/1252)) ([d8f415f](https://github.com/filebrowser/filebrowser/commit/d8f415f8abd0c4301803bd968c54429dd3fe4b59))
* build multi-arch docker images ([cf4836d](https://github.com/filebrowser/filebrowser/commit/cf4836dc757ef79ad615179bb7a6c7bbd3b09c2c))
* share management delete confirm ([#1212](https://github.com/filebrowser/filebrowser/issues/1212)) ([b600b11](https://github.com/filebrowser/filebrowser/commit/b600b11415fd1fb90ff2f5136be95a9c737ae1cb))
### Bug Fixes
* don't allow to remove root user ([019ce80](https://github.com/filebrowser/filebrowser/commit/019ce80fc529a0437984fdc3d1ab6916f34dd594))
* double click to zoom pics in phone's browser ([#1274](https://github.com/filebrowser/filebrowser/issues/1274)) ([f1b7bd5](https://github.com/filebrowser/filebrowser/commit/f1b7bd59f67e719b7bfd203b0d7ec016fd21ab49))
* environmental variables not expanded in command ([#1241](https://github.com/filebrowser/filebrowser/issues/1241)) ([f3afd5c](https://github.com/filebrowser/filebrowser/commit/f3afd5cb79d6ad8b9cc8d54cb8fc2344b7c07d3d))
* fetch resource api once when sorting (closes [#1172](https://github.com/filebrowser/filebrowser/issues/1172)) ([#1202](https://github.com/filebrowser/filebrowser/issues/1202)) ([05bb7c8](https://github.com/filebrowser/filebrowser/commit/05bb7c85531349f3e9d1d8a523bb1243587b2ebc))
### Build
* use make for building the project ([#1304](https://github.com/filebrowser/filebrowser/issues/1304)) ([23f8464](https://github.com/filebrowser/filebrowser/commit/23f84642e6c1e07f89f98d2c1bb6fc9da36cc71c))
## [2.11.0](https://github.com/filebrowser/filebrowser/compare/v2.10.0...v2.11.0) (2020-12-28)
### Features
* add sharing management ([#1178](https://github.com/filebrowser/filebrowser/issues/1178)) (closes [#1000](https://github.com/filebrowser/filebrowser/issues/1000)) ([677bce3](https://github.com/filebrowser/filebrowser/commit/677bce376b024d9ff38f34e74243034fe5a1ec3c))
* download shared subdirectory ([#1184](https://github.com/filebrowser/filebrowser/issues/1184)) ([fb5b28d](https://github.com/filebrowser/filebrowser/commit/fb5b28d9cbdee10d38fcd719b9fd832121be58ef))
### Bug Fixes
* check user input to prevent permission elevation ([#1196](https://github.com/filebrowser/filebrowser/issues/1196)) (closes [#1195](https://github.com/filebrowser/filebrowser/issues/1195)) ([f62806f](https://github.com/filebrowser/filebrowser/commit/f62806f6c9e9c7f392d1b747d65b8fe40b313e89))
* delete extra remove prefix ([#1186](https://github.com/filebrowser/filebrowser/issues/1186)) ([7a5298a](https://github.com/filebrowser/filebrowser/commit/7a5298a7556f7dcc52f59b8ea76d040d3ddc3d12))
* move files between different volumes (closes [#1177](https://github.com/filebrowser/filebrowser/issues/1177)) ([58835b7](https://github.com/filebrowser/filebrowser/commit/58835b7e535cc96e1c8a5d85821c1545743ca757))
* recaptcha race condition ([#1176](https://github.com/filebrowser/filebrowser/issues/1176)) ([ac3673e](https://github.com/filebrowser/filebrowser/commit/ac3673e111afac6616af9650ca07028b6c27e6cd))
## [2.10.0](https://github.com/filebrowser/filebrowser/compare/v2.9.0...v2.10.0) (2020-11-24)
### Features
* add hide dotfiles param ([#1148](https://github.com/filebrowser/filebrowser/issues/1148)) ([10e399b](https://github.com/filebrowser/filebrowser/commit/10e399b3c3dbdcfb4465a9d4138e1da6bae0873d))
* add single click mode ([#1139](https://github.com/filebrowser/filebrowser/issues/1139)) ([e8b4e9a](https://github.com/filebrowser/filebrowser/commit/e8b4e9af46d6e99dbeb965dd9727d9ed017d52a2))
* automatically jump to the next photo when deleting while previewing ([#1143](https://github.com/filebrowser/filebrowser/issues/1143)) ([9515cee](https://github.com/filebrowser/filebrowser/commit/9515ceeb42e5ef5267400220a2082dec775e843d))
* shared folder file listing ([e119bc5](https://github.com/filebrowser/filebrowser/commit/e119bc55ea82cefcbcc0571650107dfd5d73f570))
* shared item information ([36cacdf](https://github.com/filebrowser/filebrowser/commit/36cacdf598e4e09f064c8ace0ca7a6c24b23028e))
### Bug Fixes
* empty folder in archive ([7096b3d](https://github.com/filebrowser/filebrowser/commit/7096b3dab92441981c9964e4a6175af0a255d2be))
* fix hanging when reading a named pipe file (closes [#1155](https://github.com/filebrowser/filebrowser/issues/1155)) ([586d198](https://github.com/filebrowser/filebrowser/commit/586d198d47b525eeccc6fe587573a3ad83adb4f6))
* previewer title overflow ([4e48ffc](https://github.com/filebrowser/filebrowser/commit/4e48ffc14d09dabeea12dc495144277db62b5b7d))
* resource rename action invalid path ([1ce3068](https://github.com/filebrowser/filebrowser/commit/1ce3068a99c80c153fd41359255d173bce6e79e8))
## [2.9.0](https://github.com/filebrowser/filebrowser/compare/v2.8.0...v2.9.0) (2020-10-21)
### Features
* support WKWebview custom protocol ([#1113](https://github.com/filebrowser/filebrowser/issues/1113)) ([0ac80e8](https://github.com/filebrowser/filebrowser/commit/0ac80e8387a69924284259bde448af2813d84ed1))
### Bug Fixes
* allow start from Windows explorer ([f2c4e78](https://github.com/filebrowser/filebrowser/commit/f2c4e78381610879eda5316d38a999c89df6c14a))
* file upload missing path slash ([5e27ba5](https://github.com/filebrowser/filebrowser/commit/5e27ba5c8c1be603c6ae7fec8de48e3532dea1f7))
* preview case sensitive file extension ([05bff54](https://github.com/filebrowser/filebrowser/commit/05bff54b71543fd232f1089c40504d0cbfd106be))
* search missing path slash ([2bd163d](https://github.com/filebrowser/filebrowser/commit/2bd163d92a856d65c8d4615e37898470c1edf2f4))
## [2.8.0](https://github.com/filebrowser/filebrowser/compare/v2.7.0...v2.8.0) (2020-10-05)
### Features
* add disable exec flag ([#1090](https://github.com/filebrowser/filebrowser/issues/1090)) ([97693cc](https://github.com/filebrowser/filebrowser/commit/97693cc6117ce1c956baede91de5dd48b904e175))
### Bug Fixes
* empty commands setting ([c6d4fcd](https://github.com/filebrowser/filebrowser/commit/c6d4fcd08f5f1531c2cef514dc86019e23e7289f))
* file upload path encoding ([babd778](https://github.com/filebrowser/filebrowser/commit/babd7783afe85b790e1c558375d7b5013b2d366f))
* fix empty command name ([#1106](https://github.com/filebrowser/filebrowser/issues/1106)) ([36fb9f5](https://github.com/filebrowser/filebrowser/commit/36fb9f562a2c005ca4390fdebde0b4690201dff9))
* fix panic when accessing nonexistent .js file in static path ([#1105](https://github.com/filebrowser/filebrowser/issues/1105)) ([ad99bf1](https://github.com/filebrowser/filebrowser/commit/ad99bf180197e0e6d82231a86457585de16366a8))
* preview key shortcut conflict ([dd7b9dd](https://github.com/filebrowser/filebrowser/commit/dd7b9ddd8546361060ef99e838a691b2fc6c495a))
* search results absolute url ([26d62e4](https://github.com/filebrowser/filebrowser/commit/26d62e411716a5eb9a5a703e47484cfb3fbf3bd0))
## [2.7.0](https://github.com/filebrowser/filebrowser/compare/v2.6.2...v2.7.0) (2020-09-11)
### Features
* add --socket-perm flag to control unix socket file permissions (closes [#1060](https://github.com/filebrowser/filebrowser/issues/1060)) ([65ac734](https://github.com/filebrowser/filebrowser/commit/65ac73414fadc4686c94803a93ff319e8f7ce9d1))
* preview mobile dropdown ([7787344](https://github.com/filebrowser/filebrowser/commit/778734419de314d4cb64d07109bbab73f8e2e42a))
* preview size button ([3d2cb83](https://github.com/filebrowser/filebrowser/commit/3d2cb838d111ee61047599f49e76de80c821f341))
* put selected files in the root of the archive (closes [#1065](https://github.com/filebrowser/filebrowser/issues/1065)) ([8142b32](https://github.com/filebrowser/filebrowser/commit/8142b32f3865eccd3331328e0d087f805d186ed5))
### [2.6.2](https://github.com/filebrowser/filebrowser/compare/v2.6.1...v2.6.2) (2020-08-05)
### [2.6.1](https://github.com/filebrowser/filebrowser/compare/v2.6.0...v2.6.1) (2020-07-28)
### Bug Fixes
* delete cached previews when deleting file ([f5d02cd](https://github.com/filebrowser/filebrowser/commit/f5d02cdde97923b963878abf5a300393b9feb348))
* escape special characters in preview url (closes [#1002](https://github.com/filebrowser/filebrowser/issues/1002)) ([c9340af](https://github.com/filebrowser/filebrowser/commit/c9340af8d045671ad3338c5d2d887c335ab92de4))
## [2.6.0](https://github.com/filebrowser/filebrowser/compare/v2.5.0...v2.6.0) (2020-07-27)
### Features
* add lazy load of image thumbnails ([bc00165](https://github.com/filebrowser/filebrowser/commit/bc001650944ae963b12b5b2538a68de7cd0d8f82))
* add param to disable img resizing ([aa78e3a](https://github.com/filebrowser/filebrowser/commit/aa78e3ab1fcae6f618e811ba4e315a7a209f9df2))
* cache resized images ([95bc929](https://github.com/filebrowser/filebrowser/commit/95bc92955f391ece22c40d9592f2a3e6e26907b9))
* limit image resize workers ([94ef596](https://github.com/filebrowser/filebrowser/commit/94ef59602fb50fc21b1164feda90a3b9aeb5e972))
### Bug Fixes
* conflict handling on upload button ([f228fa5](https://github.com/filebrowser/filebrowser/commit/f228fa55408824618e9f0879da67c86d22b0d324))
* drop feedback ([f2d2c1c](https://github.com/filebrowser/filebrowser/commit/f2d2c1cbf85fba3edffb7b079f121ed3f0bc1e02))
* missing error message ([d9be370](https://github.com/filebrowser/filebrowser/commit/d9be370e2474b8070fa58db920c9481270cc4a48))
* parent verification on copy ([727c63b](https://github.com/filebrowser/filebrowser/commit/727c63b98e2964d0960d25914c296570f6c79478))
* path separator inconsistency on rename ([34dfb49](https://github.com/filebrowser/filebrowser/commit/34dfb49b719c948e709a4639b4af2c5cb73b3887))
## [2.5.0](https://github.com/filebrowser/filebrowser/compare/v2.4.0...v2.5.0) (2020-07-17)
### Features
* add previewer title and loading indicator ([716396a](https://github.com/filebrowser/filebrowser/commit/716396a726329f0ba42fc34167dd07497c5bf47c))
* duplicate files in the same directory ([43526d9](https://github.com/filebrowser/filebrowser/commit/43526d9d1a8c837245e3f5059e0b4737583eeaeb))
* file copy, move and paste conflict checking ([eed9da1](https://github.com/filebrowser/filebrowser/commit/eed9da1471723ed3fbe6c00b1d6362b1c5fd8b04))
* rename option on replace prompt ([2636f87](https://github.com/filebrowser/filebrowser/commit/2636f876ab8f88eea6d9548de524ca2339eb0843))
* upload queue ([6ec6a23](https://github.com/filebrowser/filebrowser/commit/6ec6a2386173410f5cab9941dbf1bacb6b70ddd2))
### Bug Fixes
* blinking previewer ([9a2ebba](https://github.com/filebrowser/filebrowser/commit/9a2ebbabe2e9f0c292701d33f36f9b7a457b1164))
* dark theme colors ([b3b6445](https://github.com/filebrowser/filebrowser/commit/b3b644527d5673e16e61d404ff58a3c7bd6b6637))
* directory conflict checking ([7e5beef](https://github.com/filebrowser/filebrowser/commit/7e5beeff464e75ab185c430cd96e7cc67209ccc1))
* prompt before closing window ([194030f](https://github.com/filebrowser/filebrowser/commit/194030fcfcf54a2cf5e2f8ececcbb4754474d8f8))
* remove incomplete uploaded files ([0727496](https://github.com/filebrowser/filebrowser/commit/0727496601a9918c8131c56f62419bfac7ac589a))
* reset clipboard after pasting cutted files ([10570ad](https://github.com/filebrowser/filebrowser/commit/10570ade442b573ebe00af08369e28b1b0688df6))
## [2.4.0](https://github.com/filebrowser/filebrowser/compare/v2.3.0...v2.4.0) (2020-07-07)
### Features
* full screen editor ([0d665e5](https://github.com/filebrowser/filebrowser/commit/0d665e528f880ceda0976ceed66070ac34de7969))
### Bug Fixes
* add preview bypass for .gif files ([#1012](https://github.com/filebrowser/filebrowser/issues/1012)) ([453636d](https://github.com/filebrowser/filebrowser/commit/453636dfe2bbf177c74617862eb763485d4774bf))
* prompt key shortcut conflict ([0d69fbd](https://github.com/filebrowser/filebrowser/commit/0d69fbd9a342aa2695859021df0c423e3ae4a4fa))
## [2.3.0](https://github.com/filebrowser/filebrowser/compare/v2.2.0...v2.3.0) (2020-06-26)
### Features
* add image thumbnails support ([#980](https://github.com/filebrowser/filebrowser/issues/980)) ([6b0d49b](https://github.com/filebrowser/filebrowser/commit/6b0d49b1fc8bdce89576ba91cc0b8ec594fcd625))
### Bug Fixes
* typo in image_templates (apline -> alpine) ([#1005](https://github.com/filebrowser/filebrowser/issues/1005)) ([84da110](https://github.com/filebrowser/filebrowser/commit/84da11008516a371fc0446d97863dc14d337aa25))
## [2.2.0](https://github.com/filebrowser/filebrowser/compare/v2.1.2...v2.2.0) (2020-06-22)
### Features
* add alpine and debian docker images ([66863b7](https://github.com/filebrowser/filebrowser/commit/66863b72f7664e6cb9417f7da542a92fa77ca635))
* add folder upload ([#981](https://github.com/filebrowser/filebrowser/issues/981)) ([8977344](https://github.com/filebrowser/filebrowser/commit/89773447a56675b298394149d7a05c5df4039f14)), closes [filebrowser/filebrowser#741](https://github.com/filebrowser/filebrowser/issues/741)
* add key shortcuts ([95316cb](https://github.com/filebrowser/filebrowser/commit/95316cbe8c8ac3dbb28310bc11ec347c0caf699b))
* upload progress based on total size ([#993](https://github.com/filebrowser/filebrowser/issues/993)) ([cd454ba](https://github.com/filebrowser/filebrowser/commit/cd454bae51f40b1249e6fa6133c2949970eb3018))
### Bug Fixes
* add a workaround to fix window freezing when viewing a large file [#992](https://github.com/filebrowser/filebrowser/issues/992) ([2412016](https://github.com/filebrowser/filebrowser/commit/241201657c2bf01806d02a297eb846b26102a479))
* apply all fs user rulles ([68f8348](https://github.com/filebrowser/filebrowser/commit/68f8348ddeecba570a361e7aba4546052cc3e356))
* frontend token validation ([dd40b0d](https://github.com/filebrowser/filebrowser/commit/dd40b0d9b9cc6268a611306ac4684a1af852b79d)), closes [filebrowser/filebrowser#638](https://github.com/filebrowser/filebrowser/issues/638)
* multiple selection count ([963837e](https://github.com/filebrowser/filebrowser/commit/963837ef1dc6e2e84fcf924606ce388ac30f3891))
* save event hook ([82c883f](https://github.com/filebrowser/filebrowser/commit/82c883f95eead9eebe215e230f74773c945f864a)), closes [filebrowser/filebrowser#696](https://github.com/filebrowser/filebrowser/issues/696)

View File

@@ -1,8 +1,10 @@
FROM alpine:latest as certs FROM alpine:latest
RUN apk --update add ca-certificates RUN apk --update add ca-certificates \
mailcap \
curl
FROM scratch HEALTHCHECK --start-period=2s --interval=5s --timeout=3s \
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt CMD curl -f http://localhost/health || exit 1
VOLUME /srv VOLUME /srv
EXPOSE 80 EXPOSE 80
@@ -10,4 +12,4 @@ EXPOSE 80
COPY .docker.json /.filebrowser.json COPY .docker.json /.filebrowser.json
COPY filebrowser /filebrowser COPY filebrowser /filebrowser
ENTRYPOINT [ "/filebrowser" ] ENTRYPOINT [ "/filebrowser" ]

94
Makefile Normal file
View File

@@ -0,0 +1,94 @@
SHELL := /bin/bash
BASE_PATH := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
VERSION ?= $(shell git describe --tags --always --match=v* 2> /dev/null || \
cat $(CURDIR)/.version 2> /dev/null || echo v0)
VERSION_HASH = $(shell git rev-parse HEAD)
BIN = $(BASE_PATH)/bin
PATH := $(BIN):$(PATH)
export PATH
# printing
V = 0
Q = $(if $(filter 1,$V),,@)
M = $(shell printf "\033[34;1m▶\033[0m")
GO = GOGC=off go
# go module
MODULE = $(shell env GO111MODULE=on $(GO) list -m)
DATE ?= $(shell date +%FT%T%z)
VERSION ?= $(shell git describe --tags --always --match=v* 2> /dev/null || \
cat $(CURDIR)/.version 2> /dev/null || echo v0)
VERSION_HASH = $(shell git rev-parse --short HEAD)
BRANCH = $(shell git rev-parse --abbrev-ref HEAD)
LDFLAGS += -X "$(MODULE)/version.Version=$(VERSION)" -X "$(MODULE)/version.CommitSHA=$(VERSION_HASH)"
# tools
$(BIN):
@mkdir -p $@
$(BIN)/%: | $(BIN) ; $(info $(M) installing $(PACKAGE))
$Q env GOBIN=$(BIN) $(GO) install $(PACKAGE)
GOLANGCI_LINT = $(BIN)/golangci-lint
$(BIN)/golangci-lint: PACKAGE=github.com/golangci/golangci-lint/cmd/golangci-lint@v1.41.1
GOIMPORTS = $(BIN)/goimports
$(BIN)/goimports: PACKAGE=golang.org/x/tools/cmd/goimports@v0.1.5
## build: Build
.PHONY: build
build: | build-frontend build-backend ; $(info $(M) building)
## build-frontend: Build frontend
.PHONY: build-frontend
build-frontend: | ; $(info $(M) building frontend)
$Q cd frontend && npm ci && npm run build
## build-backend: Build backend
.PHONY: build-backend
build-backend: | ; $(info $(M) building backend)
$Q $(GO) build -ldflags '$(LDFLAGS)' -o .
## test: Run all tests
.PHONY: test
test: | test-frontend test-backend ; $(info $(M) running tests)
## test-frontend: Run frontend tests
.PHONY: test-frontend
test-frontend: | ; $(info $(M) running frontend tests)
## test-backend: Run backend tests
.PHONY: test-backend
test-backend: | ; $(info $(M) running backend tests)
$Q $(GO) test -v ./...
## lint: Lint
.PHONY: lint
lint: lint-frontend lint-backend lint-commits | ; $(info $(M) running all linters)
## lint-frontend: Lint frontend
.PHONY: lint-frontend
lint-frontend: | ; $(info $(M) running frontend linters)
$Q cd frontend && npm ci && npm run lint
## lint-backend: Lint backend
.PHONY: lint-backend
lint-backend: | $(GOLANGCI_LINT) ; $(info $(M) running backend linters)
$Q $(GOLANGCI_LINT) run
## lint-commits: Lint commits
.PHONY: lint-commits
lint-commits: | ; $(info $(M) running commitlint)
$Q ./scripts/commitlint.sh
## bump-version: Bump app version
.PHONY: bump-version
bump-version: | ; $(info $(M) creating a new release)
$Q ./scripts/bump_version.sh
## help: Show this help
.PHONY: help
help:
@sed -n 's/^## //p' $(MAKEFILE_LIST) | column -t -s ':' | sed -e 's/^/ /' | sort

View File

@@ -4,28 +4,30 @@
![Preview](https://user-images.githubusercontent.com/5447088/50716739-ebd26700-107a-11e9-9817-14230c53efd2.gif) ![Preview](https://user-images.githubusercontent.com/5447088/50716739-ebd26700-107a-11e9-9817-14230c53efd2.gif)
[![Travis](https://img.shields.io/travis/com/filebrowser/filebrowser.svg?style=flat-square)](https://travis-ci.com/filebrowser/filebrowser) [![Build](https://github.com/filebrowser/filebrowser/actions/workflows/main.yaml/badge.svg)](https://github.com/filebrowser/filebrowser/actions/workflows/main.yaml)
[![Go Report Card](https://goreportcard.com/badge/github.com/filebrowser/filebrowser?style=flat-square)](https://goreportcard.com/report/github.com/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) [![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) [![Version](https://img.shields.io/github/release/filebrowser/filebrowser.svg?style=flat-square)](https://github.com/filebrowser/filebrowser/releases/latest)
[![Chat IRC](https://img.shields.io/badge/freenode-%23filebrowser-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23filebrowser) [![Chat IRC](https://img.shields.io/badge/freenode-%23filebrowser-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23filebrowser)
> INFO: **This project is not under active development ATM. A small group of developers keeps the project alive, but due to lack of time, we can't continue adding new features or doing deep changes. Please read [#532](https://github.com/filebrowser/filebrowser/issues/532) for more info!**
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. 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.
## Features ## Features
Please refer to our docs at [filebrowser.xyz/features](https://filebrowser.xyz/features) Please refer to our docs at [https://filebrowser.org/features](https://filebrowser.org/features)
## Install ## Install
Please refer to our docs at [filebrowser.xyz](https://filebrowser.xyz/). For installation instructions please refer to our docs at [https://filebrowser.org/installation](https://filebrowser.org/installation).
## Usage ## Configuration
Please refer to our docs at [filebrowser.xyz/usage](https://filebrowser.xyz/usage). [Authentication Method](https://filebrowser.org/configuration/authentication-method) - You can change the way the user authenticates with the filebrowser server
[Command Runner](https://filebrowser.org/configuration/command-runner) - The command runner is a feature that enables you to execute any shell command you want before or after a certain event.
[Custom Branding](https://filebrowser.org/configuration/custom-branding) - You can customize your File Browser installation by change its name to any other you want, by adding a global custom style sheet and by using your own logotype if you want.
## Contributing ## Contributing
Please refer to our docs at [filebrowser.xyz/contributing](https://filebrowser.xyz/contributing). If you're interested in contributing to this project, our docs are best places to start [https://filebrowser.org/contributing](https://filebrowser.org/contributing).

26
SECURITY.md Normal file
View File

@@ -0,0 +1,26 @@
# Security Policy
## Supported Versions
Use this section to tell people about which versions of your project are
currently being supported with security updates.
| Version | Supported |
| ------- | ------------------ |
| 2.x | :white_check_mark: |
| < 2.0 | :x: |
## Reporting a Vulnerability
Vulnerabilities should be reported to filebrowser@googlegroups.com - which is a private, maintainer-only group. Maintainers will attempt to respond to/confirm reports within 2-3 days, but if you believe your report to be "critical" to user safety and security, please note as such in the subject. We have tens of thousands of users using our software, and take security vulnerabilities seriously.
When reporting an issue, where possible, please provide at least:
* The commit version the issue was identified at
* A proof of concept (plaintext; no binaries)
* Steps to reproduce
* Your recommended remediation(s), if any.
The FileBrowser team is a volunteer-only effort, and may reach back out for clarification.
> Note: Please do not open public issues for security issues, as GitHub does not provide facility for private issues, and deleting the issue makes it hard to triage/respond back to the reporter.

View File

@@ -9,7 +9,7 @@ import (
// Auther is the authentication interface. // Auther is the authentication interface.
type Auther interface { type Auther interface {
// Auth is called to authenticate a request. // Auth is called to authenticate a request.
Auth(r *http.Request, s *users.Storage, root string) (*users.User, error) Auth(r *http.Request, s users.Store, root string) (*users.User, error)
// LoginPage indicates if this auther needs a login page. // LoginPage indicates if this auther needs a login page.
LoginPage() bool LoginPage() bool
} }

View File

@@ -20,13 +20,13 @@ type jsonCred struct {
ReCaptcha string `json:"recaptcha"` ReCaptcha string `json:"recaptcha"`
} }
// JSONAuth is a json implementaion of an Auther. // JSONAuth is a json implementation of an Auther.
type JSONAuth struct { type JSONAuth struct {
ReCaptcha *ReCaptcha `json:"recaptcha" yaml:"recaptcha"` ReCaptcha *ReCaptcha `json:"recaptcha" yaml:"recaptcha"`
} }
// Auth authenticates the user via a json in content body. // Auth authenticates the user via a json in content body.
func (a JSONAuth) Auth(r *http.Request, sto *users.Storage, root string) (*users.User, error) { func (a JSONAuth) Auth(r *http.Request, sto users.Store, root string) (*users.User, error) {
var cred jsonCred var cred jsonCred
if r.Body == nil { if r.Body == nil {
@@ -40,7 +40,7 @@ func (a JSONAuth) Auth(r *http.Request, sto *users.Storage, root string) (*users
// If ReCaptcha is enabled, check the code. // If ReCaptcha is enabled, check the code.
if a.ReCaptcha != nil && len(a.ReCaptcha.Secret) > 0 { if a.ReCaptcha != nil && len(a.ReCaptcha.Secret) > 0 {
ok, err := a.ReCaptcha.Ok(cred.ReCaptcha) ok, err := a.ReCaptcha.Ok(cred.ReCaptcha) //nolint:govet
if err != nil { if err != nil {
return nil, err return nil, err
@@ -66,7 +66,7 @@ func (a JSONAuth) LoginPage() bool {
const reCaptchaAPI = "/recaptcha/api/siteverify" const reCaptchaAPI = "/recaptcha/api/siteverify"
// ReCaptcha identifies a recaptcha conenction. // ReCaptcha identifies a recaptcha connection.
type ReCaptcha struct { type ReCaptcha struct {
Host string `json:"host"` Host string `json:"host"`
Key string `json:"key"` Key string `json:"key"`
@@ -76,7 +76,7 @@ type ReCaptcha struct {
// Ok checks if a reCaptcha responde is correct. // Ok checks if a reCaptcha responde is correct.
func (r *ReCaptcha) Ok(response string) (bool, error) { func (r *ReCaptcha) Ok(response string) (bool, error) {
body := url.Values{} body := url.Values{}
body.Set("secret", r.Key) body.Set("secret", r.Secret)
body.Add("response", response) body.Add("response", response)
client := &http.Client{} client := &http.Client{}
@@ -89,6 +89,7 @@ func (r *ReCaptcha) Ok(response string) (bool, error) {
if err != nil { if err != nil {
return false, err return false, err
} }
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK { if resp.StatusCode != http.StatusOK {
return false, nil return false, nil

View File

@@ -14,7 +14,7 @@ const MethodNoAuth settings.AuthMethod = "noauth"
type NoAuth struct{} type NoAuth struct{}
// Auth uses authenticates user 1. // Auth uses authenticates user 1.
func (a NoAuth) Auth(r *http.Request, sto *users.Storage, root string) (*users.User, error) { func (a NoAuth) Auth(r *http.Request, sto users.Store, root string) (*users.User, error) {
return sto.Get(root, uint(1)) return sto.Get(root, uint(1))
} }

View File

@@ -18,7 +18,7 @@ type ProxyAuth struct {
} }
// Auth authenticates the user via an HTTP header. // Auth authenticates the user via an HTTP header.
func (a ProxyAuth) Auth(r *http.Request, sto *users.Storage, root string) (*users.User, error) { func (a ProxyAuth) Auth(r *http.Request, sto users.Store, root string) (*users.User, error) {
username := r.Header.Get(a.Header) username := r.Header.Get(a.Header)
user, err := sto.Get(root, username) user, err := sto.Get(root, username)
if err == errors.ErrNotExist { if err == errors.ErrNotExist {

View File

@@ -18,8 +18,8 @@ type Storage struct {
} }
// NewStorage creates a auth storage from a backend. // NewStorage creates a auth storage from a backend.
func NewStorage(back StorageBackend, users *users.Storage) *Storage { func NewStorage(back StorageBackend, userStore *users.Storage) *Storage {
return &Storage{back: back, users: users} return &Storage{back: back, users: userStore}
} }
// Get wraps a StorageBackend.Get. // Get wraps a StorageBackend.Get.

View File

@@ -14,7 +14,7 @@ var cmdsAddCmd = &cobra.Command{
Use: "add <event> <command>", Use: "add <event> <command>",
Short: "Add a command to run on a specific event", Short: "Add a command to run on a specific event",
Long: `Add a command to run on a specific event.`, Long: `Add a command to run on a specific event.`,
Args: cobra.MinimumNArgs(2), Args: cobra.MinimumNArgs(2), //nolint:gomnd
Run: python(func(cmd *cobra.Command, args []string, d pythonData) { Run: python(func(cmd *cobra.Command, args []string, d pythonData) {
s, err := d.store.Settings.Get() s, err := d.store.Settings.Get()
checkErr(err) checkErr(err)

View File

@@ -23,7 +23,7 @@ You can also specify an optional parameter (index_end) so
you can remove all commands from 'index' to 'index_end', you can remove all commands from 'index' to 'index_end',
including 'index_end'.`, including 'index_end'.`,
Args: func(cmd *cobra.Command, args []string) error { Args: func(cmd *cobra.Command, args []string) error {
if err := cobra.RangeArgs(2, 3)(cmd, args); err != nil { if err := cobra.RangeArgs(2, 3)(cmd, args); err != nil { //nolint:gomnd
return err return err
} }
@@ -43,7 +43,7 @@ including 'index_end'.`,
i, err := strconv.Atoi(args[1]) i, err := strconv.Atoi(args[1])
checkErr(err) checkErr(err)
f := i f := i
if len(args) == 3 { if len(args) == 3 { //nolint:gomnd
f, err = strconv.Atoi(args[2]) f, err = strconv.Atoi(args[2])
checkErr(err) checkErr(err)
} }

View File

@@ -8,11 +8,12 @@ import (
"strings" "strings"
"text/tabwriter" "text/tabwriter"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"github.com/filebrowser/filebrowser/v2/auth" "github.com/filebrowser/filebrowser/v2/auth"
"github.com/filebrowser/filebrowser/v2/errors" "github.com/filebrowser/filebrowser/v2/errors"
"github.com/filebrowser/filebrowser/v2/settings" "github.com/filebrowser/filebrowser/v2/settings"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
) )
func init() { func init() {
@@ -40,10 +41,12 @@ func addConfigFlags(flags *pflag.FlagSet) {
flags.String("recaptcha.secret", "", "ReCaptcha secret") flags.String("recaptcha.secret", "", "ReCaptcha secret")
flags.String("branding.name", "", "replace 'File Browser' by this name") flags.String("branding.name", "", "replace 'File Browser' by this name")
flags.String("branding.color", "", "set the theme color")
flags.String("branding.files", "", "path to directory with images and custom styles") flags.String("branding.files", "", "path to directory with images and custom styles")
flags.Bool("branding.disableExternal", false, "disable external links such as GitHub links") flags.Bool("branding.disableExternal", false, "disable external links such as GitHub links")
} }
//nolint:gocyclo
func getAuthentication(flags *pflag.FlagSet, defaults ...interface{}) (settings.AuthMethod, auth.Auther) { func getAuthentication(flags *pflag.FlagSet, defaults ...interface{}) (settings.AuthMethod, auth.Auther) {
method := settings.AuthMethod(mustGetString(flags, "auth.method")) method := settings.AuthMethod(mustGetString(flags, "auth.method"))
@@ -53,11 +56,12 @@ func getAuthentication(flags *pflag.FlagSet, defaults ...interface{}) (settings.
for _, arg := range defaults { for _, arg := range defaults {
switch def := arg.(type) { switch def := arg.(type) {
case *settings.Settings: case *settings.Settings:
method = settings.AuthMethod(def.AuthMethod) method = def.AuthMethod
case auth.Auther: case auth.Auther:
ms, err := json.Marshal(def) ms, err := json.Marshal(def)
checkErr(err) checkErr(err)
json.Unmarshal(ms, &defaultAuther) err = json.Unmarshal(ms, &defaultAuther)
checkErr(err)
} }
} }
} }
@@ -89,25 +93,24 @@ func getAuthentication(flags *pflag.FlagSet, defaults ...interface{}) (settings.
secret := mustGetString(flags, "recaptcha.secret") secret := mustGetString(flags, "recaptcha.secret")
if key == "" { if key == "" {
kmap := defaultAuther["recaptcha"].(map[string]interface{}) if kmap, ok := defaultAuther["recaptcha"].(map[string]interface{}); ok {
key = kmap["key"].(string) key = kmap["key"].(string)
}
} }
if secret == "" { if secret == "" {
smap := defaultAuther["recaptcha"].(map[string]interface{}) if smap, ok := defaultAuther["recaptcha"].(map[string]interface{}); ok {
secret = smap["secret"].(string) secret = smap["secret"].(string)
}
} }
if key == "" || secret == "" { if key != "" && secret != "" {
checkErr(nerrors.New("you must set the flag 'recaptcha.key' and 'recaptcha.secret' for method 'json'")) jsonAuth.ReCaptcha = &auth.ReCaptcha{
Host: host,
Key: key,
Secret: secret,
}
} }
jsonAuth.ReCaptcha = &auth.ReCaptcha{
Host: host,
Key: key,
Secret: secret,
}
auther = jsonAuth auther = jsonAuth
} }
@@ -119,7 +122,7 @@ func getAuthentication(flags *pflag.FlagSet, defaults ...interface{}) (settings.
} }
func printSettings(ser *settings.Server, set *settings.Settings, auther auth.Auther) { func printSettings(ser *settings.Server, set *settings.Settings, auther auth.Auther) {
w := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0) w := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0) //nolint:gomnd
fmt.Fprintf(w, "Sign up:\t%t\n", set.Signup) fmt.Fprintf(w, "Sign up:\t%t\n", set.Signup)
fmt.Fprintf(w, "Create User Dir:\t%t\n", set.CreateUserDir) fmt.Fprintf(w, "Create User Dir:\t%t\n", set.CreateUserDir)
@@ -129,6 +132,7 @@ func printSettings(ser *settings.Server, set *settings.Settings, auther auth.Aut
fmt.Fprintf(w, "\tName:\t%s\n", set.Branding.Name) fmt.Fprintf(w, "\tName:\t%s\n", set.Branding.Name)
fmt.Fprintf(w, "\tFiles override:\t%s\n", set.Branding.Files) fmt.Fprintf(w, "\tFiles override:\t%s\n", set.Branding.Files)
fmt.Fprintf(w, "\tDisable external links:\t%t\n", set.Branding.DisableExternal) fmt.Fprintf(w, "\tDisable external links:\t%t\n", set.Branding.DisableExternal)
fmt.Fprintf(w, "\tColor:\t%s\n", set.Branding.Color)
fmt.Fprintln(w, "\nServer:") fmt.Fprintln(w, "\nServer:")
fmt.Fprintf(w, "\tLog:\t%s\n", ser.Log) fmt.Fprintf(w, "\tLog:\t%s\n", ser.Log)
fmt.Fprintf(w, "\tPort:\t%s\n", ser.Port) fmt.Fprintf(w, "\tPort:\t%s\n", ser.Port)
@@ -138,10 +142,12 @@ func printSettings(ser *settings.Server, set *settings.Settings, auther auth.Aut
fmt.Fprintf(w, "\tAddress:\t%s\n", ser.Address) fmt.Fprintf(w, "\tAddress:\t%s\n", ser.Address)
fmt.Fprintf(w, "\tTLS Cert:\t%s\n", ser.TLSCert) fmt.Fprintf(w, "\tTLS Cert:\t%s\n", ser.TLSCert)
fmt.Fprintf(w, "\tTLS Key:\t%s\n", ser.TLSKey) fmt.Fprintf(w, "\tTLS Key:\t%s\n", ser.TLSKey)
fmt.Fprintf(w, "\tExec Enabled:\t%t\n", ser.EnableExec)
fmt.Fprintln(w, "\nDefaults:") fmt.Fprintln(w, "\nDefaults:")
fmt.Fprintf(w, "\tScope:\t%s\n", set.Defaults.Scope) fmt.Fprintf(w, "\tScope:\t%s\n", set.Defaults.Scope)
fmt.Fprintf(w, "\tLocale:\t%s\n", set.Defaults.Locale) fmt.Fprintf(w, "\tLocale:\t%s\n", set.Defaults.Locale)
fmt.Fprintf(w, "\tView mode:\t%s\n", set.Defaults.ViewMode) fmt.Fprintf(w, "\tView mode:\t%s\n", set.Defaults.ViewMode)
fmt.Fprintf(w, "\tSingle Click:\t%t\n", set.Defaults.SingleClick)
fmt.Fprintf(w, "\tCommands:\t%s\n", strings.Join(set.Defaults.Commands, " ")) fmt.Fprintf(w, "\tCommands:\t%s\n", strings.Join(set.Defaults.Commands, " "))
fmt.Fprintf(w, "\tSorting:\n") fmt.Fprintf(w, "\tSorting:\n")
fmt.Fprintf(w, "\t\tBy:\t%s\n", set.Defaults.Sorting.By) fmt.Fprintf(w, "\t\tBy:\t%s\n", set.Defaults.Sorting.By)

View File

@@ -6,9 +6,10 @@ import (
"path/filepath" "path/filepath"
"reflect" "reflect"
"github.com/spf13/cobra"
"github.com/filebrowser/filebrowser/v2/auth" "github.com/filebrowser/filebrowser/v2/auth"
"github.com/filebrowser/filebrowser/v2/settings" "github.com/filebrowser/filebrowser/v2/settings"
"github.com/spf13/cobra"
) )
func init() { func init() {
@@ -55,7 +56,7 @@ The path must be for a json or yaml file.`,
checkErr(err) checkErr(err)
var rawAuther interface{} var rawAuther interface{}
if filepath.Ext(args[0]) != ".json" { if filepath.Ext(args[0]) != ".json" { //nolint:goconst
rawAuther = cleanUpInterfaceMap(file.Auther.(map[interface{}]interface{})) rawAuther = cleanUpInterfaceMap(file.Auther.(map[interface{}]interface{}))
} else { } else {
rawAuther = file.Auther rawAuther = file.Auther

View File

@@ -2,10 +2,10 @@ package cmd
import ( import (
"fmt" "fmt"
"strings"
"github.com/spf13/cobra"
"github.com/filebrowser/filebrowser/v2/settings" "github.com/filebrowser/filebrowser/v2/settings"
"github.com/spf13/cobra"
) )
func init() { func init() {
@@ -31,7 +31,7 @@ override the options.`,
s := &settings.Settings{ s := &settings.Settings{
Key: generateKey(), Key: generateKey(),
Signup: mustGetBool(flags, "signup"), Signup: mustGetBool(flags, "signup"),
Shell: strings.Split(strings.TrimSpace(mustGetString(flags, "shell")), " "), Shell: convertCmdStrToCmdArray(mustGetString(flags, "shell")),
AuthMethod: authMethod, AuthMethod: authMethod,
Defaults: defaults, Defaults: defaults,
Branding: settings.Branding{ Branding: settings.Branding{
@@ -61,7 +61,7 @@ override the options.`,
fmt.Printf(` fmt.Printf(`
Congratulations! You've set up your database to use with File Browser. Congratulations! You've set up your database to use with File Browser.
Now add your first user via 'filebrowser users new' and then you just Now add your first user via 'filebrowser users add' and then you just
need to call the main command to boot up the server. need to call the main command to boot up the server.
`) `)
printSettings(ser, s, auther) printSettings(ser, s, auther)

View File

@@ -1,8 +1,6 @@
package cmd package cmd
import ( import (
"strings"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"github.com/spf13/pflag" "github.com/spf13/pflag"
) )
@@ -50,9 +48,11 @@ you want to change. Other options will remain unchanged.`,
case "auth.method": case "auth.method":
hasAuth = true hasAuth = true
case "shell": case "shell":
set.Shell = strings.Split(strings.TrimSpace(mustGetString(flags, flag.Name)), " ") set.Shell = convertCmdStrToCmdArray(mustGetString(flags, flag.Name))
case "branding.name": case "branding.name":
set.Branding.Name = mustGetString(flags, flag.Name) set.Branding.Name = mustGetString(flags, flag.Name)
case "branding.color":
set.Branding.Color = mustGetString(flags, flag.Name)
case "branding.disableExternal": case "branding.disableExternal":
set.Branding.DisableExternal = mustGetBool(flags, flag.Name) set.Branding.DisableExternal = mustGetBool(flags, flag.Name)
case "branding.files": case "branding.files":

View File

@@ -88,7 +88,7 @@ func generateMarkdown(cmd *cobra.Command, w io.Writer) {
short := cmd.Short short := cmd.Short
long := cmd.Long long := cmd.Long
if len(long) == 0 { if long == "" {
long = short long = short
} }
@@ -106,21 +106,21 @@ func generateMarkdown(cmd *cobra.Command, w io.Writer) {
buf.WriteString(fmt.Sprintf("```\n%s\n```\n\n", cmd.Example)) buf.WriteString(fmt.Sprintf("```\n%s\n```\n\n", cmd.Example))
} }
printOptions(buf, cmd, name) printOptions(buf, cmd)
_, err := buf.WriteTo(w) _, err := buf.WriteTo(w)
checkErr(err) checkErr(err)
} }
func generateFlagsTable(fs *pflag.FlagSet, buf io.StringWriter) { func generateFlagsTable(fs *pflag.FlagSet, buf io.StringWriter) {
buf.WriteString("| Name | Shorthand | Usage |\n") _, _ = buf.WriteString("| Name | Shorthand | Usage |\n")
buf.WriteString("|------|-----------|-------|\n") _, _ = buf.WriteString("|------|-----------|-------|\n")
fs.VisitAll(func(f *pflag.Flag) { fs.VisitAll(func(f *pflag.Flag) {
buf.WriteString("|" + f.Name + "|" + f.Shorthand + "|" + f.Usage + "|\n") _, _ = buf.WriteString("|" + f.Name + "|" + f.Shorthand + "|" + f.Usage + "|\n")
}) })
} }
func printOptions(buf *bytes.Buffer, cmd *cobra.Command, name string) { func printOptions(buf *bytes.Buffer, cmd *cobra.Command) {
flags := cmd.NonInheritedFlags() flags := cmd.NonInheritedFlags()
flags.SetOutput(buf) flags.SetOutput(buf)
if flags.HasAvailableFlags() { if flags.HasAvailableFlags() {

View File

@@ -3,8 +3,9 @@ package cmd
import ( import (
"fmt" "fmt"
"github.com/filebrowser/filebrowser/v2/users"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"github.com/filebrowser/filebrowser/v2/users"
) )
func init() { func init() {

View File

@@ -3,6 +3,7 @@ package cmd
import ( import (
"crypto/tls" "crypto/tls"
"errors" "errors"
"io/fs"
"io/ioutil" "io/ioutil"
"log" "log"
"net" "net"
@@ -13,16 +14,21 @@ import (
"strings" "strings"
"syscall" "syscall"
"github.com/filebrowser/filebrowser/v2/auth"
fbhttp "github.com/filebrowser/filebrowser/v2/http"
"github.com/filebrowser/filebrowser/v2/settings"
"github.com/filebrowser/filebrowser/v2/storage"
"github.com/filebrowser/filebrowser/v2/users"
homedir "github.com/mitchellh/go-homedir" homedir "github.com/mitchellh/go-homedir"
"github.com/spf13/afero"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"github.com/spf13/pflag" "github.com/spf13/pflag"
v "github.com/spf13/viper" v "github.com/spf13/viper"
lumberjack "gopkg.in/natefinch/lumberjack.v2" lumberjack "gopkg.in/natefinch/lumberjack.v2"
"github.com/filebrowser/filebrowser/v2/auth"
"github.com/filebrowser/filebrowser/v2/diskcache"
"github.com/filebrowser/filebrowser/v2/frontend"
fbhttp "github.com/filebrowser/filebrowser/v2/http"
"github.com/filebrowser/filebrowser/v2/img"
"github.com/filebrowser/filebrowser/v2/settings"
"github.com/filebrowser/filebrowser/v2/storage"
"github.com/filebrowser/filebrowser/v2/users"
) )
var ( var (
@@ -31,6 +37,7 @@ var (
func init() { func init() {
cobra.OnInitialize(initConfig) cobra.OnInitialize(initConfig)
cobra.MousetrapHelpText = ""
rootCmd.SetVersionTemplate("File Browser version {{printf \"%s\" .Version}}\n") rootCmd.SetVersionTemplate("File Browser version {{printf \"%s\" .Version}}\n")
@@ -54,7 +61,14 @@ func addServerFlags(flags *pflag.FlagSet) {
flags.StringP("key", "k", "", "tls key") flags.StringP("key", "k", "", "tls key")
flags.StringP("root", "r", ".", "root to prepend to relative paths") flags.StringP("root", "r", ".", "root to prepend to relative paths")
flags.String("socket", "", "socket to listen to (cannot be used with address, port, cert nor key flags)") flags.String("socket", "", "socket to listen to (cannot be used with address, port, cert nor key flags)")
flags.Uint32("socket-perm", 0666, "unix socket file permissions") //nolint:gomnd
flags.StringP("baseurl", "b", "", "base url") flags.StringP("baseurl", "b", "", "base url")
flags.String("cache-dir", "", "file cache directory (disabled if empty)")
flags.Int("img-processors", 4, "image processors count") //nolint:gomnd
flags.Bool("disable-thumbnails", false, "disable image thumbnails")
flags.Bool("disable-preview-resize", false, "disable resize of image previews")
flags.Bool("disable-exec", false, "disables Command Runner feature")
flags.Bool("disable-type-detection-by-header", false, "disables type detection by reading file headers")
} }
var rootCmd = &cobra.Command{ var rootCmd = &cobra.Command{
@@ -102,6 +116,24 @@ user created with the credentials from options "username" and "password".`,
quickSetup(cmd.Flags(), d) quickSetup(cmd.Flags(), d)
} }
// build img service
workersCount, err := cmd.Flags().GetInt("img-processors")
checkErr(err)
if workersCount < 1 {
log.Fatal("Image resize workers count could not be < 1")
}
imgSvc := img.New(workersCount)
var fileCache diskcache.Interface = diskcache.NewNoOp()
cacheDir, err := cmd.Flags().GetString("cache-dir")
checkErr(err)
if cacheDir != "" {
if err := os.MkdirAll(cacheDir, 0700); err != nil { //nolint:govet,gomnd
log.Fatalf("can't make directory %s: %s", cacheDir, err)
}
fileCache = diskcache.New(afero.NewOsFs(), cacheDir)
}
server := getRunParams(cmd.Flags(), d.store) server := getRunParams(cmd.Flags(), d.store)
setupLog(server.Log) setupLog(server.Log)
@@ -113,15 +145,23 @@ user created with the credentials from options "username" and "password".`,
var listener net.Listener var listener net.Listener
if server.Socket != "" { switch {
case server.Socket != "":
listener, err = net.Listen("unix", server.Socket) listener, err = net.Listen("unix", server.Socket)
checkErr(err) checkErr(err)
} else if server.TLSKey != "" && server.TLSCert != "" { socketPerm, err := cmd.Flags().GetUint32("socket-perm") //nolint:govet
cer, err := tls.LoadX509KeyPair(server.TLSCert, server.TLSKey)
checkErr(err) checkErr(err)
listener, err = tls.Listen("tcp", adr, &tls.Config{Certificates: []tls.Certificate{cer}}) err = os.Chmod(server.Socket, os.FileMode(socketPerm))
checkErr(err) checkErr(err)
} else { case server.TLSKey != "" && server.TLSCert != "":
cer, err := tls.LoadX509KeyPair(server.TLSCert, server.TLSKey) //nolint:govet
checkErr(err)
listener, err = tls.Listen("tcp", adr, &tls.Config{
MinVersion: tls.VersionTLS12,
Certificates: []tls.Certificate{cer}},
)
checkErr(err)
default:
listener, err = net.Listen("tcp", adr) listener, err = net.Listen("tcp", adr)
checkErr(err) checkErr(err)
} }
@@ -130,7 +170,12 @@ user created with the credentials from options "username" and "password".`,
signal.Notify(sigc, os.Interrupt, syscall.SIGTERM) signal.Notify(sigc, os.Interrupt, syscall.SIGTERM)
go cleanupHandler(listener, sigc) go cleanupHandler(listener, sigc)
handler, err := fbhttp.NewHandler(d.store, server) assetsFs, err := fs.Sub(frontend.Assets(), "dist")
if err != nil {
panic(err)
}
handler, err := fbhttp.NewHandler(imgSvc, fileCache, d.store, server, assetsFs)
checkErr(err) checkErr(err)
defer listener.Close() defer listener.Close()
@@ -142,13 +187,14 @@ user created with the credentials from options "username" and "password".`,
}, pythonConfig{allowNoDB: true}), }, pythonConfig{allowNoDB: true}),
} }
func cleanupHandler(listener net.Listener, c chan os.Signal) { func cleanupHandler(listener net.Listener, c chan os.Signal) { //nolint:interfacer
sig := <-c sig := <-c
log.Printf("Caught signal %s: shutting down.", sig) log.Printf("Caught signal %s: shutting down.", sig)
listener.Close() listener.Close()
os.Exit(0) os.Exit(0)
} }
//nolint:gocyclo
func getRunParams(flags *pflag.FlagSet, st *storage.Storage) *settings.Server { func getRunParams(flags *pflag.FlagSet, st *storage.Storage) *settings.Server {
server, err := st.Settings.GetServer() server, err := st.Settings.GetServer()
checkErr(err) checkErr(err)
@@ -194,7 +240,7 @@ func getRunParams(flags *pflag.FlagSet, st *storage.Storage) *settings.Server {
} }
if isAddrSet && isSocketSet { if isAddrSet && isSocketSet {
checkErr(errors.New("--socket flag cannot be used with --adress, --port, --key nor --cert")) checkErr(errors.New("--socket flag cannot be used with --address, --port, --key nor --cert"))
} }
// Do not use saved Socket if address was manually set. // Do not use saved Socket if address was manually set.
@@ -202,6 +248,18 @@ func getRunParams(flags *pflag.FlagSet, st *storage.Storage) *settings.Server {
server.Socket = "" server.Socket = ""
} }
_, disableThumbnails := getParamB(flags, "disable-thumbnails")
server.EnableThumbnails = !disableThumbnails
_, disablePreviewResize := getParamB(flags, "disable-preview-resize")
server.ResizePreview = !disablePreviewResize
_, disableTypeDetectionByHeader := getParamB(flags, "disable-type-detection-by-header")
server.TypeDetectionByHeader = !disableTypeDetectionByHeader
_, disableExec := getParamB(flags, "disable-exec")
server.EnableExec = !disableExec
return server return server
} }
@@ -258,8 +316,9 @@ func quickSetup(flags *pflag.FlagSet, d pythonData) {
Signup: false, Signup: false,
CreateUserDir: false, CreateUserDir: false,
Defaults: settings.UserDefaults{ Defaults: settings.UserDefaults{
Scope: ".", Scope: ".",
Locale: "en", Locale: "en",
SingleClick: false,
Perm: users.Permissions{ Perm: users.Permissions{
Admin: false, Admin: false,
Execute: true, Execute: true,
@@ -348,5 +407,4 @@ func initConfig() {
} else { } else {
cfgFile = "Using config file: " + v.ConfigFileUsed() cfgFile = "Using config file: " + v.ConfigFileUsed()
} }
} }

View File

@@ -3,15 +3,16 @@ package cmd
import ( import (
"strconv" "strconv"
"github.com/spf13/cobra"
"github.com/filebrowser/filebrowser/v2/settings" "github.com/filebrowser/filebrowser/v2/settings"
"github.com/filebrowser/filebrowser/v2/users" "github.com/filebrowser/filebrowser/v2/users"
"github.com/spf13/cobra"
) )
func init() { func init() {
rulesCmd.AddCommand(rulesRmCommand) rulesCmd.AddCommand(rulesRmCommand)
rulesRmCommand.Flags().Uint("index", 0, "index of rule to remove") rulesRmCommand.Flags().Uint("index", 0, "index of rule to remove")
rulesRmCommand.MarkFlagRequired("index") _ = rulesRmCommand.MarkFlagRequired("index")
} }
var rulesRmCommand = &cobra.Command{ var rulesRmCommand = &cobra.Command{
@@ -27,7 +28,7 @@ You can also specify an optional parameter (index_end) so
you can remove all commands from 'index' to 'index_end', you can remove all commands from 'index' to 'index_end',
including 'index_end'.`, including 'index_end'.`,
Args: func(cmd *cobra.Command, args []string) error { Args: func(cmd *cobra.Command, args []string) error {
if err := cobra.RangeArgs(1, 2)(cmd, args); err != nil { if err := cobra.RangeArgs(1, 2)(cmd, args); err != nil { //nolint:gomnd
return err return err
} }
@@ -43,7 +44,7 @@ including 'index_end'.`,
i, err := strconv.Atoi(args[0]) i, err := strconv.Atoi(args[0])
checkErr(err) checkErr(err)
f := i f := i
if len(args) == 2 { if len(args) == 2 { //nolint:gomnd
f, err = strconv.Atoi(args[1]) f, err = strconv.Atoi(args[1])
checkErr(err) checkErr(err)
} }

View File

@@ -3,12 +3,13 @@ package cmd
import ( import (
"fmt" "fmt"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"github.com/filebrowser/filebrowser/v2/rules" "github.com/filebrowser/filebrowser/v2/rules"
"github.com/filebrowser/filebrowser/v2/settings" "github.com/filebrowser/filebrowser/v2/settings"
"github.com/filebrowser/filebrowser/v2/storage" "github.com/filebrowser/filebrowser/v2/storage"
"github.com/filebrowser/filebrowser/v2/users" "github.com/filebrowser/filebrowser/v2/users"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
) )
func init() { func init() {
@@ -18,8 +19,8 @@ func init() {
} }
var rulesCmd = &cobra.Command{ var rulesCmd = &cobra.Command{
Use: "rules", Use: "rules",
Short: "Rules management utility", Short: "Rules management utility",
Long: `On each subcommand you'll have available at least two flags: Long: `On each subcommand you'll have available at least two flags:
"username" and "id". You must either set only one of them "username" and "id". You must either set only one of them
or none. If you set one of them, the command will apply to or none. If you set one of them, the command will apply to
@@ -28,14 +29,14 @@ rules.`,
Args: cobra.NoArgs, Args: cobra.NoArgs,
} }
func runRules(st *storage.Storage, cmd *cobra.Command, users func(*users.User), global func(*settings.Settings)) { func runRules(st *storage.Storage, cmd *cobra.Command, usersFn func(*users.User), globalFn func(*settings.Settings)) {
id := getUserIdentifier(cmd.Flags()) id := getUserIdentifier(cmd.Flags())
if id != nil { if id != nil {
user, err := st.Users.Get("", id) user, err := st.Users.Get("", id)
checkErr(err) checkErr(err)
if users != nil { if usersFn != nil {
users(user) usersFn(user)
} }
printRules(user.Rules, id) printRules(user.Rules, id)
@@ -45,8 +46,8 @@ func runRules(st *storage.Storage, cmd *cobra.Command, users func(*users.User),
s, err := st.Settings.Get() s, err := st.Settings.Get()
checkErr(err) checkErr(err)
if global != nil { if globalFn != nil {
global(s) globalFn(s)
} }
printRules(s.Rules, id) printRules(s.Rules, id)
@@ -65,14 +66,14 @@ func getUserIdentifier(flags *pflag.FlagSet) interface{} {
return nil return nil
} }
func printRules(rules []rules.Rule, id interface{}) { func printRules(rulez []rules.Rule, id interface{}) {
if id == nil { if id == nil {
fmt.Printf("Global Rules:\n\n") fmt.Printf("Global Rules:\n\n")
} else { } else {
fmt.Printf("Rules for user %v:\n\n", id) fmt.Printf("Rules for user %v:\n\n", id)
} }
for id, rule := range rules { for id, rule := range rulez {
fmt.Printf("(%d) ", id) fmt.Printf("(%d) ", id)
if rule.Regex { if rule.Regex {
if rule.Allow { if rule.Allow {

View File

@@ -3,10 +3,11 @@ package cmd
import ( import (
"regexp" "regexp"
"github.com/spf13/cobra"
"github.com/filebrowser/filebrowser/v2/rules" "github.com/filebrowser/filebrowser/v2/rules"
"github.com/filebrowser/filebrowser/v2/settings" "github.com/filebrowser/filebrowser/v2/settings"
"github.com/filebrowser/filebrowser/v2/users" "github.com/filebrowser/filebrowser/v2/users"
"github.com/spf13/cobra"
) )
func init() { func init() {

View File

@@ -1,8 +1,9 @@
package cmd package cmd
import ( import (
"github.com/filebrowser/filebrowser/v2/storage/bolt/importer"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"github.com/filebrowser/filebrowser/v2/storage/bolt/importer"
) )
func init() { func init() {
@@ -10,7 +11,7 @@ func init() {
upgradeCmd.Flags().String("old.database", "", "") upgradeCmd.Flags().String("old.database", "", "")
upgradeCmd.Flags().String("old.config", "", "") upgradeCmd.Flags().String("old.config", "", "")
upgradeCmd.MarkFlagRequired("old.database") _ = upgradeCmd.MarkFlagRequired("old.database")
} }
var upgradeCmd = &cobra.Command{ var upgradeCmd = &cobra.Command{

View File

@@ -7,10 +7,11 @@ import (
"strconv" "strconv"
"text/tabwriter" "text/tabwriter"
"github.com/filebrowser/filebrowser/v2/settings"
"github.com/filebrowser/filebrowser/v2/users"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"github.com/spf13/pflag" "github.com/spf13/pflag"
"github.com/filebrowser/filebrowser/v2/settings"
"github.com/filebrowser/filebrowser/v2/users"
) )
func init() { func init() {
@@ -24,38 +25,39 @@ var usersCmd = &cobra.Command{
Args: cobra.NoArgs, Args: cobra.NoArgs,
} }
func printUsers(users []*users.User) { func printUsers(usrs []*users.User) {
w := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0) w := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0) //nolint:gomnd
fmt.Fprintln(w, "ID\tUsername\tScope\tLocale\tV. Mode\tAdmin\tExecute\tCreate\tRename\tModify\tDelete\tShare\tDownload\tPwd Lock") fmt.Fprintln(w, "ID\tUsername\tScope\tLocale\tV. Mode\tS.Click\tAdmin\tExecute\tCreate\tRename\tModify\tDelete\tShare\tDownload\tPwd Lock")
for _, user := range users { for _, u := range usrs {
fmt.Fprintf(w, "%d\t%s\t%s\t%s\t%s\t%t\t%t\t%t\t%t\t%t\t%t\t%t\t%t\t%t\t\n", fmt.Fprintf(w, "%d\t%s\t%s\t%s\t%s\t%t\t%t\t%t\t%t\t%t\t%t\t%t\t%t\t%t\t%t\t\n",
user.ID, u.ID,
user.Username, u.Username,
user.Scope, u.Scope,
user.Locale, u.Locale,
user.ViewMode, u.ViewMode,
user.Perm.Admin, u.SingleClick,
user.Perm.Execute, u.Perm.Admin,
user.Perm.Create, u.Perm.Execute,
user.Perm.Rename, u.Perm.Create,
user.Perm.Modify, u.Perm.Rename,
user.Perm.Delete, u.Perm.Modify,
user.Perm.Share, u.Perm.Delete,
user.Perm.Download, u.Perm.Share,
user.LockPassword, u.Perm.Download,
u.LockPassword,
) )
} }
w.Flush() w.Flush()
} }
func parseUsernameOrID(arg string) (string, uint) { func parseUsernameOrID(arg string) (username string, id uint) {
id, err := strconv.ParseUint(arg, 10, 0) id64, err := strconv.ParseUint(arg, 10, 64) //nolint:gomnd
if err != nil { if err != nil {
return arg, 0 return arg, 0
} }
return "", uint(id) return "", uint(id64)
} }
func addUserFlags(flags *pflag.FlagSet) { func addUserFlags(flags *pflag.FlagSet) {
@@ -74,6 +76,7 @@ func addUserFlags(flags *pflag.FlagSet) {
flags.String("scope", ".", "scope for users") flags.String("scope", ".", "scope for users")
flags.String("locale", "en", "locale for users") flags.String("locale", "en", "locale for users")
flags.String("viewMode", string(users.ListViewMode), "view mode for users") flags.String("viewMode", string(users.ListViewMode), "view mode for users")
flags.Bool("singleClick", false, "use single clicks only")
} }
func getViewMode(flags *pflag.FlagSet) users.ViewMode { func getViewMode(flags *pflag.FlagSet) users.ViewMode {
@@ -84,6 +87,7 @@ func getViewMode(flags *pflag.FlagSet) users.ViewMode {
return viewMode return viewMode
} }
//nolint:gocyclo
func getUserDefaults(flags *pflag.FlagSet, defaults *settings.UserDefaults, all bool) { func getUserDefaults(flags *pflag.FlagSet, defaults *settings.UserDefaults, all bool) {
visit := func(flag *pflag.Flag) { visit := func(flag *pflag.Flag) {
switch flag.Name { switch flag.Name {
@@ -93,6 +97,8 @@ func getUserDefaults(flags *pflag.FlagSet, defaults *settings.UserDefaults, all
defaults.Locale = mustGetString(flags, flag.Name) defaults.Locale = mustGetString(flags, flag.Name)
case "viewMode": case "viewMode":
defaults.ViewMode = getViewMode(flags) defaults.ViewMode = getViewMode(flags)
case "singleClick":
defaults.SingleClick = mustGetBool(flags, flag.Name)
case "perm.admin": case "perm.admin":
defaults.Perm.Admin = mustGetBool(flags, flag.Name) defaults.Perm.Admin = mustGetBool(flags, flag.Name)
case "perm.execute": case "perm.execute":

View File

@@ -1,8 +1,9 @@
package cmd package cmd
import ( import (
"github.com/filebrowser/filebrowser/v2/users"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"github.com/filebrowser/filebrowser/v2/users"
) )
func init() { func init() {
@@ -14,7 +15,7 @@ var usersAddCmd = &cobra.Command{
Use: "add <username> <password>", Use: "add <username> <password>",
Short: "Create a new user", Short: "Create a new user",
Long: `Create a new user and add it to the database.`, Long: `Create a new user and add it to the database.`,
Args: cobra.ExactArgs(2), Args: cobra.ExactArgs(2), //nolint:gomnd
Run: python(func(cmd *cobra.Command, args []string, d pythonData) { Run: python(func(cmd *cobra.Command, args []string, d pythonData) {
s, err := d.store.Settings.Get() s, err := d.store.Settings.Get()
checkErr(err) checkErr(err)
@@ -33,9 +34,9 @@ var usersAddCmd = &cobra.Command{
servSettings, err := d.store.Settings.GetServer() servSettings, err := d.store.Settings.GetServer()
checkErr(err) checkErr(err)
//since getUserDefaults() polluted s.Defaults.Scope // since getUserDefaults() polluted s.Defaults.Scope
//which makes the Scope not the one saved in the db // which makes the Scope not the one saved in the db
//we need the right s.Defaults.Scope here // we need the right s.Defaults.Scope here
s2, err := d.store.Settings.Get() s2, err := d.store.Settings.Get()
checkErr(err) checkErr(err)

View File

@@ -1,8 +1,9 @@
package cmd package cmd
import ( import (
"github.com/filebrowser/filebrowser/v2/users"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"github.com/filebrowser/filebrowser/v2/users"
) )
func init() { func init() {

View File

@@ -2,11 +2,13 @@ package cmd
import ( import (
"errors" "errors"
"fmt"
"os" "os"
"strconv" "strconv"
"github.com/filebrowser/filebrowser/v2/users"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"github.com/filebrowser/filebrowser/v2/users"
) )
func init() { func init() {
@@ -65,8 +67,7 @@ list or set it to 0.`,
// with the new username. If there is, print an error and cancel the // with the new username. If there is, print an error and cancel the
// operation // operation
if user.Username != onDB.Username { if user.Username != onDB.Username {
conflictuous, err := d.store.Users.Get("", user.Username) if conflictuous, err := d.store.Users.Get("", user.Username); err == nil { //nolint:govet
if err == nil {
checkErr(usernameConflictError(user.Username, conflictuous.ID, user.ID)) checkErr(usernameConflictError(user.Username, conflictuous.ID, user.ID))
} }
} }
@@ -82,6 +83,7 @@ list or set it to 0.`,
}, pythonConfig{}), }, pythonConfig{}),
} }
func usernameConflictError(username string, original, new uint) error { func usernameConflictError(username string, originalID, newID uint) error {
return errors.New("can't import user with ID " + strconv.Itoa(int(new)) + " and username \"" + username + "\" because the username is already registred with the user " + strconv.Itoa(int(original))) return fmt.Errorf(`can't import user with ID %d and username "%s" because the username is already registred with the user %d`,
newID, username, originalID)
} }

View File

@@ -1,9 +1,10 @@
package cmd package cmd
import ( import (
"github.com/spf13/cobra"
"github.com/filebrowser/filebrowser/v2/settings" "github.com/filebrowser/filebrowser/v2/settings"
"github.com/filebrowser/filebrowser/v2/users" "github.com/filebrowser/filebrowser/v2/users"
"github.com/spf13/cobra"
) )
func init() { func init() {
@@ -40,17 +41,19 @@ options you want to change.`,
checkErr(err) checkErr(err)
defaults := settings.UserDefaults{ defaults := settings.UserDefaults{
Scope: user.Scope, Scope: user.Scope,
Locale: user.Locale, Locale: user.Locale,
ViewMode: user.ViewMode, ViewMode: user.ViewMode,
Perm: user.Perm, SingleClick: user.SingleClick,
Sorting: user.Sorting, Perm: user.Perm,
Commands: user.Commands, Sorting: user.Sorting,
Commands: user.Commands,
} }
getUserDefaults(flags, &defaults, false) getUserDefaults(flags, &defaults, false)
user.Scope = defaults.Scope user.Scope = defaults.Scope
user.Locale = defaults.Locale user.Locale = defaults.Locale
user.ViewMode = defaults.ViewMode user.ViewMode = defaults.ViewMode
user.SingleClick = defaults.SingleClick
user.Perm = defaults.Perm user.Perm = defaults.Perm
user.Commands = defaults.Commands user.Commands = defaults.Commands
user.Sorting = defaults.Sorting user.Sorting = defaults.Sorting

View File

@@ -7,14 +7,16 @@ import (
"log" "log"
"os" "os"
"path/filepath" "path/filepath"
"strings"
"github.com/asdine/storm" "github.com/asdine/storm"
"github.com/filebrowser/filebrowser/v2/settings"
"github.com/filebrowser/filebrowser/v2/storage"
"github.com/filebrowser/filebrowser/v2/storage/bolt"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"github.com/spf13/pflag" "github.com/spf13/pflag"
yaml "gopkg.in/yaml.v2" yaml "gopkg.in/yaml.v2"
"github.com/filebrowser/filebrowser/v2/settings"
"github.com/filebrowser/filebrowser/v2/storage"
"github.com/filebrowser/filebrowser/v2/storage/bolt"
) )
func checkErr(err error) { func checkErr(err error) {
@@ -70,7 +72,9 @@ func dbExists(path string) (bool, error) {
d := filepath.Dir(path) d := filepath.Dir(path)
_, err = os.Stat(d) _, err = os.Stat(d)
if os.IsNotExist(err) { if os.IsNotExist(err) {
os.MkdirAll(d, 0700) if err := os.MkdirAll(d, 0700); err != nil { //nolint:govet,gomnd
return false, err
}
return false, nil return false, nil
} }
} }
@@ -113,7 +117,7 @@ func marshal(filename string, data interface{}) error {
encoder := json.NewEncoder(fd) encoder := json.NewEncoder(fd)
encoder.SetIndent("", " ") encoder.SetIndent("", " ")
return encoder.Encode(data) return encoder.Encode(data)
case ".yml", ".yaml": case ".yml", ".yaml": //nolint:goconst
encoder := yaml.NewEncoder(fd) encoder := yaml.NewEncoder(fd)
return encoder.Encode(data) return encoder.Encode(data)
default: default:
@@ -175,3 +179,15 @@ func cleanUpMapValue(v interface{}) interface{} {
return v return v
} }
} }
// convertCmdStrToCmdArray checks if cmd string is blank (whitespace included)
// then returns empty string array, else returns the splitted word array of cmd.
// This is to ensure the result will never be []string{""}
func convertCmdStrToCmdArray(cmd string) []string {
var cmdArray []string
trimmedCmdStr := strings.TrimSpace(cmd)
if trimmedCmdStr != "" {
cmdArray = strings.Split(trimmedCmdStr, " ")
}
return cmdArray
}

View File

@@ -3,8 +3,9 @@ package cmd
import ( import (
"fmt" "fmt"
"github.com/filebrowser/filebrowser/v2/version"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"github.com/filebrowser/filebrowser/v2/version"
) )
func init() { func init() {

34
commitlint.config.js Normal file
View File

@@ -0,0 +1,34 @@
module.exports = {
rules: {
'body-leading-blank': [1, 'always'],
'body-max-line-length': [2, 'always', 100],
'footer-leading-blank': [1, 'always'],
'footer-max-line-length': [2, 'always', 100],
'header-max-length': [2, 'always', 100],
'scope-case': [2, 'always', 'lower-case'],
'subject-case': [
2,
'never',
['sentence-case', 'start-case', 'pascal-case', 'upper-case'],
],
'subject-full-stop': [2, 'never', '.'],
'type-case': [2, 'always', 'lower-case'],
'type-empty': [2, 'never'],
'type-enum': [
2,
'always',
[
'feat',
'fix',
'perf',
'revert',
'refactor',
'build',
'ci',
'test',
'chore',
'docs',
],
],
},
};

11
diskcache/cache.go Normal file
View File

@@ -0,0 +1,11 @@
package diskcache
import (
"context"
)
type Interface interface {
Store(ctx context.Context, key string, value []byte) error
Load(ctx context.Context, key string) (value []byte, exist bool, err error)
Delete(ctx context.Context, key string) error
}

110
diskcache/file_cache.go Normal file
View File

@@ -0,0 +1,110 @@
package diskcache
import (
"context"
"crypto/sha1" //nolint:gosec
"encoding/hex"
"errors"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"sync"
"github.com/spf13/afero"
)
type FileCache struct {
fs afero.Fs
// granular locks
scopedLocks struct {
sync.Mutex
sync.Once
locks map[string]sync.Locker
}
}
func New(fs afero.Fs, root string) *FileCache {
return &FileCache{
fs: afero.NewBasePathFs(fs, root),
}
}
func (f *FileCache) Store(ctx context.Context, key string, value []byte) error {
mu := f.getScopedLocks(key)
mu.Lock()
defer mu.Unlock()
fileName := f.getFileName(key)
if err := f.fs.MkdirAll(filepath.Dir(fileName), 0700); err != nil { //nolint:gomnd
return err
}
if err := afero.WriteFile(f.fs, fileName, value, 0700); err != nil { //nolint:gomnd
return err
}
return nil
}
func (f *FileCache) Load(ctx context.Context, key string) (value []byte, exist bool, err error) {
r, ok, err := f.open(key)
if err != nil || !ok {
return nil, ok, err
}
defer r.Close()
value, err = ioutil.ReadAll(r)
if err != nil {
return nil, false, err
}
return value, true, nil
}
func (f *FileCache) Delete(ctx context.Context, key string) error {
mu := f.getScopedLocks(key)
mu.Lock()
defer mu.Unlock()
fileName := f.getFileName(key)
if err := f.fs.Remove(fileName); err != nil && !errors.Is(err, os.ErrNotExist) {
return err
}
return nil
}
func (f *FileCache) open(key string) (afero.File, bool, error) {
fileName := f.getFileName(key)
file, err := f.fs.Open(fileName)
if err != nil {
if errors.Is(err, os.ErrNotExist) {
return nil, false, nil
}
return nil, false, err
}
return file, true, nil
}
// getScopedLocks pull lock from the map if found or create a new one
func (f *FileCache) getScopedLocks(key string) (lock sync.Locker) {
f.scopedLocks.Do(func() { f.scopedLocks.locks = map[string]sync.Locker{} })
f.scopedLocks.Lock()
lock, ok := f.scopedLocks.locks[key]
if !ok {
lock = &sync.Mutex{}
f.scopedLocks.locks[key] = lock
}
f.scopedLocks.Unlock()
return lock
}
func (f *FileCache) getFileName(key string) string {
hasher := sha1.New() //nolint:gosec
_, _ = hasher.Write([]byte(key))
hash := hex.EncodeToString(hasher.Sum(nil))
return fmt.Sprintf("%s/%s/%s", hash[:1], hash[1:3], hash)
}

View File

@@ -0,0 +1,55 @@
package diskcache
import (
"context"
"path/filepath"
"testing"
"github.com/spf13/afero"
"github.com/stretchr/testify/require"
)
func TestFileCache(t *testing.T) {
ctx := context.Background()
const (
key = "key"
value = "some text"
newValue = "new text"
cacheRoot = "/cache"
cachedFilePath = "a/62/a62f2225bf70bfaccbc7f1ef2a397836717377de"
)
fs := afero.NewMemMapFs()
cache := New(fs, "/cache")
// store new key
err := cache.Store(ctx, key, []byte(value))
require.NoError(t, err)
checkValue(t, ctx, fs, filepath.Join(cacheRoot, cachedFilePath), cache, key, value)
// update existing key
err = cache.Store(ctx, key, []byte(newValue))
require.NoError(t, err)
checkValue(t, ctx, fs, filepath.Join(cacheRoot, cachedFilePath), cache, key, newValue)
// delete key
err = cache.Delete(ctx, key)
require.NoError(t, err)
exists, err := afero.Exists(fs, filepath.Join(cacheRoot, cachedFilePath))
require.NoError(t, err)
require.False(t, exists)
}
func checkValue(t *testing.T, ctx context.Context, fs afero.Fs, fileFullPath string, cache *FileCache, key, wantValue string) { //nolint:golint
t.Helper()
// check actual file content
b, err := afero.ReadFile(fs, fileFullPath)
require.NoError(t, err)
require.Equal(t, wantValue, string(b))
// check cache content
b, ok, err := cache.Load(ctx, key)
require.NoError(t, err)
require.True(t, ok)
require.Equal(t, wantValue, string(b))
}

24
diskcache/noop_cache.go Normal file
View File

@@ -0,0 +1,24 @@
package diskcache
import (
"context"
)
type NoOp struct {
}
func NewNoOp() *NoOp {
return &NoOp{}
}
func (n *NoOp) Store(ctx context.Context, key string, value []byte) error {
return nil
}
func (n *NoOp) Load(ctx context.Context, key string) (value []byte, exist bool, err error) {
return nil, false, nil
}
func (n *NoOp) Delete(ctx context.Context, key string) error {
return nil
}

View File

@@ -3,15 +3,19 @@ package errors
import "errors" import "errors"
var ( var (
ErrEmptyKey = errors.New("empty key") ErrEmptyKey = errors.New("empty key")
ErrExist = errors.New("the resource already exists") ErrExist = errors.New("the resource already exists")
ErrNotExist = errors.New("the resource does not exist") ErrNotExist = errors.New("the resource does not exist")
ErrEmptyPassword = errors.New("password is empty") ErrEmptyPassword = errors.New("password is empty")
ErrEmptyUsername = errors.New("username is empty") ErrEmptyUsername = errors.New("username is empty")
ErrEmptyRequest = errors.New("empty request") ErrEmptyRequest = errors.New("empty request")
ErrScopeIsRelative = errors.New("scope is a relative path") ErrScopeIsRelative = errors.New("scope is a relative path")
ErrInvalidDataType = errors.New("invalid data type") ErrInvalidDataType = errors.New("invalid data type")
ErrIsDirectory = errors.New("file is directory") ErrIsDirectory = errors.New("file is directory")
ErrInvalidOption = errors.New("invalid option") ErrInvalidOption = errors.New("invalid option")
ErrInvalidAuthMethod = errors.New("invalid auth method") ErrInvalidAuthMethod = errors.New("invalid auth method")
ErrPermissionDenied = errors.New("permission denied")
ErrInvalidRequestParams = errors.New("invalid request params")
ErrSourceIsParent = errors.New("source is parent")
ErrRootUserDeletion = errors.New("user with id 1 can't be deleted")
) )

View File

@@ -1,8 +1,8 @@
package files package files
import ( import (
"crypto/md5" "crypto/md5" //nolint:gosec
"crypto/sha1" "crypto/sha1" //nolint:gosec
"crypto/sha256" "crypto/sha256"
"crypto/sha512" "crypto/sha512"
"encoding/hex" "encoding/hex"
@@ -17,9 +17,10 @@ import (
"strings" "strings"
"time" "time"
"github.com/spf13/afero"
"github.com/filebrowser/filebrowser/v2/errors" "github.com/filebrowser/filebrowser/v2/errors"
"github.com/filebrowser/filebrowser/v2/rules" "github.com/filebrowser/filebrowser/v2/rules"
"github.com/spf13/afero"
) )
// FileInfo describes a file. // FileInfo describes a file.
@@ -33,19 +34,24 @@ type FileInfo struct {
ModTime time.Time `json:"modified"` ModTime time.Time `json:"modified"`
Mode os.FileMode `json:"mode"` Mode os.FileMode `json:"mode"`
IsDir bool `json:"isDir"` IsDir bool `json:"isDir"`
IsSymlink bool `json:"isSymlink"`
Type string `json:"type"` Type string `json:"type"`
Subtitles []string `json:"subtitles,omitempty"` Subtitles []string `json:"subtitles,omitempty"`
Content string `json:"content,omitempty"` Content string `json:"content,omitempty"`
Checksums map[string]string `json:"checksums,omitempty"` Checksums map[string]string `json:"checksums,omitempty"`
Token string `json:"token,omitempty"`
} }
// FileOptions are the options when getting a file info. // FileOptions are the options when getting a file info.
type FileOptions struct { type FileOptions struct {
Fs afero.Fs Fs afero.Fs
Path string Path string
Modify bool Modify bool
Expand bool Expand bool
Checker rules.Checker ReadHeader bool
Token string
Checker rules.Checker
Content bool
} }
// NewFileInfo creates a File object from a path and a given user. This File // NewFileInfo creates a File object from a path and a given user. This File
@@ -56,12 +62,73 @@ func NewFileInfo(opts FileOptions) (*FileInfo, error) {
return nil, os.ErrPermission return nil, os.ErrPermission
} }
info, err := opts.Fs.Stat(opts.Path) file, err := stat(opts)
if err != nil { if err != nil {
return nil, err return nil, err
} }
file := &FileInfo{ if opts.Expand {
if file.IsDir {
if err := file.readListing(opts.Checker, opts.ReadHeader); err != nil { //nolint:govet
return nil, err
}
return file, nil
}
err = file.detectType(opts.Modify, opts.Content, true)
if err != nil {
return nil, err
}
}
return file, err
}
func stat(opts FileOptions) (*FileInfo, error) {
var file *FileInfo
if lstaterFs, ok := opts.Fs.(afero.Lstater); ok {
info, _, err := lstaterFs.LstatIfPossible(opts.Path)
if err != nil {
return nil, err
}
file = &FileInfo{
Fs: opts.Fs,
Path: opts.Path,
Name: info.Name(),
ModTime: info.ModTime(),
Mode: info.Mode(),
IsDir: info.IsDir(),
IsSymlink: IsSymlink(info.Mode()),
Size: info.Size(),
Extension: filepath.Ext(info.Name()),
Token: opts.Token,
}
}
// regular file
if file != nil && !file.IsSymlink {
return file, nil
}
// fs doesn't support afero.Lstater interface or the file is a symlink
info, err := opts.Fs.Stat(opts.Path)
if err != nil {
// can't follow symlink
if file != nil && file.IsSymlink {
return file, nil
}
return nil, err
}
// set correct file size in case of symlink
if file != nil && file.IsSymlink {
file.Size = info.Size()
file.IsDir = info.IsDir()
return file, nil
}
file = &FileInfo{
Fs: opts.Fs, Fs: opts.Fs,
Path: opts.Path, Path: opts.Path,
Name: info.Name(), Name: info.Name(),
@@ -70,20 +137,10 @@ func NewFileInfo(opts FileOptions) (*FileInfo, error) {
IsDir: info.IsDir(), IsDir: info.IsDir(),
Size: info.Size(), Size: info.Size(),
Extension: filepath.Ext(info.Name()), Extension: filepath.Ext(info.Name()),
Token: opts.Token,
} }
if opts.Expand { return file, nil
if file.IsDir {
return file, file.readListing(opts.Checker)
}
err = file.detectType(opts.Modify, true)
if err != nil {
return nil, err
}
}
return file, err
} }
// Checksum checksums a given File for a given User, using a specific // Checksum checksums a given File for a given User, using a specific
@@ -105,6 +162,7 @@ func (i *FileInfo) Checksum(algo string) error {
var h hash.Hash var h hash.Hash
//nolint:gosec
switch algo { switch algo {
case "md5": case "md5":
h = md5.New() h = md5.New()
@@ -127,30 +185,27 @@ func (i *FileInfo) Checksum(algo string) error {
return nil return nil
} }
func (i *FileInfo) detectType(modify, saveContent bool) error { //nolint:goconst
//TODO: use constants
func (i *FileInfo) detectType(modify, saveContent, readHeader bool) error {
if IsNamedPipe(i.Mode) {
i.Type = "blob"
return nil
}
// failing to detect the type should not return error. // failing to detect the type should not return error.
// imagine the situation where a file in a dir with thousands // imagine the situation where a file in a dir with thousands
// of files couldn't be opened: we'd have immediately // of files couldn't be opened: we'd have immediately
// a 500 even though it doesn't matter. So we just log it. // a 500 even though it doesn't matter. So we just log it.
reader, err := i.Fs.Open(i.Path)
if err != nil {
log.Print(err)
i.Type = "blob"
return nil
}
defer reader.Close()
buffer := make([]byte, 512)
n, err := reader.Read(buffer)
if err != nil && err != io.EOF {
log.Print(err)
i.Type = "blob"
return nil
}
mimetype := mime.TypeByExtension(i.Extension) mimetype := mime.TypeByExtension(i.Extension)
if mimetype == "" {
mimetype = http.DetectContentType(buffer[:n]) var buffer []byte
if readHeader {
buffer = i.readFirstBytes()
if mimetype == "" {
mimetype = http.DetectContentType(buffer)
}
} }
switch { switch {
@@ -164,10 +219,7 @@ func (i *FileInfo) detectType(modify, saveContent bool) error {
case strings.HasPrefix(mimetype, "image"): case strings.HasPrefix(mimetype, "image"):
i.Type = "image" i.Type = "image"
return nil return nil
case isBinary(buffer[:n], n) || i.Size > 10*1024*1024: // 10 MB case (strings.HasPrefix(mimetype, "text") || !isBinary(buffer)) && i.Size <= 10*1024*1024: // 10 MB
i.Type = "blob"
return nil
default:
i.Type = "text" i.Type = "text"
if !modify { if !modify {
@@ -183,11 +235,34 @@ func (i *FileInfo) detectType(modify, saveContent bool) error {
i.Content = string(content) i.Content = string(content)
} }
return nil
default:
i.Type = "blob"
} }
return nil return nil
} }
func (i *FileInfo) readFirstBytes() []byte {
reader, err := i.Fs.Open(i.Path)
if err != nil {
log.Print(err)
i.Type = "blob"
return nil
}
defer reader.Close()
buffer := make([]byte, 512) //nolint:gomnd
n, err := reader.Read(buffer)
if err != nil && err != io.EOF {
log.Print(err)
i.Type = "blob"
return nil
}
return buffer[:n]
}
func (i *FileInfo) detectSubtitles() { func (i *FileInfo) detectSubtitles() {
if i.Type != "video" { if i.Type != "video" {
return return
@@ -198,13 +273,13 @@ func (i *FileInfo) detectSubtitles() {
// TODO: detect multiple languages. Base.Lang.vtt // TODO: detect multiple languages. Base.Lang.vtt
path := strings.TrimSuffix(i.Path, ext) + ".vtt" fPath := strings.TrimSuffix(i.Path, ext) + ".vtt"
if _, err := i.Fs.Stat(path); err == nil { if _, err := i.Fs.Stat(fPath); err == nil {
i.Subtitles = append(i.Subtitles, path) i.Subtitles = append(i.Subtitles, fPath)
} }
} }
func (i *FileInfo) readListing(checker rules.Checker) error { func (i *FileInfo) readListing(checker rules.Checker, readHeader bool) error {
afs := &afero.Afero{Fs: i.Fs} afs := &afero.Afero{Fs: i.Fs}
dir, err := afs.ReadDir(i.Path) dir, err := afs.ReadDir(i.Path)
if err != nil { if err != nil {
@@ -219,16 +294,18 @@ func (i *FileInfo) readListing(checker rules.Checker) error {
for _, f := range dir { for _, f := range dir {
name := f.Name() name := f.Name()
path := path.Join(i.Path, name) fPath := path.Join(i.Path, name)
if !checker.Check(path) { if !checker.Check(fPath) {
continue continue
} }
if strings.HasPrefix(f.Mode().String(), "L") { isSymlink := false
if IsSymlink(f.Mode()) {
isSymlink = true
// It's a symbolic link. We try to follow it. If it doesn't work, // It's a symbolic link. We try to follow it. If it doesn't work,
// we stay with the link information instead if the target's. // we stay with the link information instead of the target's.
info, err := i.Fs.Stat(path) info, err := i.Fs.Stat(fPath)
if err == nil { if err == nil {
f = info f = info
} }
@@ -241,8 +318,9 @@ func (i *FileInfo) readListing(checker rules.Checker) error {
ModTime: f.ModTime(), ModTime: f.ModTime(),
Mode: f.Mode(), Mode: f.Mode(),
IsDir: f.IsDir(), IsDir: f.IsDir(),
IsSymlink: isSymlink,
Extension: filepath.Ext(name), Extension: filepath.Ext(name),
Path: path, Path: fPath,
} }
if file.IsDir { if file.IsDir {
@@ -250,7 +328,7 @@ func (i *FileInfo) readListing(checker rules.Checker) error {
} else { } else {
listing.NumFiles++ listing.NumFiles++
err := file.detectType(true, false) err := file.detectType(true, false, readHeader)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -16,8 +16,10 @@ type Listing struct {
} }
// ApplySort applies the sort order using .Order and .Sort // ApplySort applies the sort order using .Order and .Sort
//nolint:goconst
func (l Listing) ApplySort() { func (l Listing) ApplySort() {
// Check '.Order' to know how to sort // Check '.Order' to know how to sort
// TODO: use enum
if !l.Sorting.Asc { if !l.Sorting.Asc {
switch l.Sorting.By { switch l.Sorting.By {
case "name": case "name":
@@ -62,11 +64,11 @@ func (l byName) Swap(i, j int) {
// Treat upper and lower case equally // Treat upper and lower case equally
func (l byName) Less(i, j int) bool { func (l byName) Less(i, j int) bool {
if l.Items[i].IsDir && !l.Items[j].IsDir { if l.Items[i].IsDir && !l.Items[j].IsDir {
return true return l.Sorting.Asc
} }
if !l.Items[i].IsDir && l.Items[j].IsDir { if !l.Items[i].IsDir && l.Items[j].IsDir {
return false return !l.Sorting.Asc
} }
return natural.Less(strings.ToLower(l.Items[j].Name), strings.ToLower(l.Items[i].Name)) return natural.Less(strings.ToLower(l.Items[j].Name), strings.ToLower(l.Items[i].Name))

View File

@@ -1,46 +1,59 @@
package files package files
import ( import (
"os"
"unicode/utf8" "unicode/utf8"
) )
func isBinary(content []byte, n int) bool { func isBinary(content []byte) bool {
maybeStr := string(content) maybeStr := string(content)
runeCnt := utf8.RuneCount(content) runeCnt := utf8.RuneCount(content)
runeIndex := 0 runeIndex := 0
gotRuneErrCnt := 0 gotRuneErrCnt := 0
firstRuneErrIndex := -1 firstRuneErrIndex := -1
for _, b := range maybeStr { const (
// 8 and below are control chars (e.g. backspace, null, eof, etc) // 8 and below are control chars (e.g. backspace, null, eof, etc)
if b <= 8 { maxControlCharsCode = 8
// 0xFFFD(65533) is the "error" Rune or "Unicode replacement character"
// see https://golang.org/pkg/unicode/utf8/#pkg-constants
unicodeReplacementChar = 0xFFFD
)
for _, b := range maybeStr {
if b <= maxControlCharsCode {
return true return true
} }
// 0xFFFD(65533) is the "error" Rune or "Unicode replacement character" if b == unicodeReplacementChar {
// see https://golang.org/pkg/unicode/utf8/#pkg-constants // if it is not the last (utf8.UTFMax - x) rune
if b == 0xFFFD {
//if it is not the last (utf8.UTFMax - x) rune
if runeCnt > utf8.UTFMax && runeIndex < runeCnt-utf8.UTFMax { if runeCnt > utf8.UTFMax && runeIndex < runeCnt-utf8.UTFMax {
return true return true
} else { }
//else it is the last (utf8.UTFMax - x) rune // else it is the last (utf8.UTFMax - x) rune
//there maybe Vxxx, VVxx, VVVx, thus, we may got max 3 0xFFFD rune (asume V is the byte we got) // there maybe Vxxx, VVxx, VVVx, thus, we may got max 3 0xFFFD rune (assume V is the byte we got)
//for Chinese, it can only be Vxx, VVx, we may got max 2 0xFFFD rune // for Chinese, it can only be Vxx, VVx, we may got max 2 0xFFFD rune
gotRuneErrCnt++ gotRuneErrCnt++
//mark the first time // mark the first time
if firstRuneErrIndex == -1 { if firstRuneErrIndex == -1 {
firstRuneErrIndex = runeIndex firstRuneErrIndex = runeIndex
}
} }
} }
runeIndex++ runeIndex++
} }
//if last (utf8.UTFMax - x ) rune has the "error" Rune, but not all // if last (utf8.UTFMax - x ) rune has the "error" Rune, but not all
if firstRuneErrIndex != -1 && gotRuneErrCnt != runeCnt-firstRuneErrIndex { if firstRuneErrIndex != -1 && gotRuneErrCnt != runeCnt-firstRuneErrIndex {
return true return true
} }
return false return false
} }
func IsNamedPipe(mode os.FileMode) bool {
return mode&os.ModeNamedPipe != 0
}
func IsSymlink(mode os.FileMode) bool {
return mode&os.ModeSymlink != 0
}

View File

@@ -9,7 +9,7 @@ import (
// CopyDir copies a directory from source to dest and all // CopyDir copies a directory from source to dest and all
// of its sub-directories. It doesn't stop if it finds an error // of its sub-directories. It doesn't stop if it finds an error
// during the copy. Returns an error if any. // during the copy. Returns an error if any.
func CopyDir(fs afero.Fs, source string, dest string) error { func CopyDir(fs afero.Fs, source, dest string) error {
// Get properties of source. // Get properties of source.
srcinfo, err := fs.Stat(source) srcinfo, err := fs.Stat(source)
if err != nil { if err != nil {

View File

@@ -2,14 +2,35 @@ package fileutils
import ( import (
"io" "io"
"os"
"path"
"path/filepath" "path/filepath"
"github.com/spf13/afero" "github.com/spf13/afero"
) )
// MoveFile moves file from src to dst.
// By default the rename filesystem system call is used. If src and dst point to different volumes
// the file copy is used as a fallback
func MoveFile(fs afero.Fs, src, dst string) error {
if fs.Rename(src, dst) == nil {
return nil
}
// fallback
err := CopyFile(fs, src, dst)
if err != nil {
_ = fs.Remove(dst)
return err
}
if err := fs.Remove(src); err != nil {
return err
}
return nil
}
// CopyFile copies a file from source to dest and returns // CopyFile copies a file from source to dest and returns
// an error if any. // an error if any.
func CopyFile(fs afero.Fs, source string, dest string) error { func CopyFile(fs afero.Fs, source, dest string) error {
// Open the source file. // Open the source file.
src, err := fs.Open(source) src, err := fs.Open(source)
if err != nil { if err != nil {
@@ -19,13 +40,13 @@ func CopyFile(fs afero.Fs, source string, dest string) error {
// Makes the directory needed to create the dst // Makes the directory needed to create the dst
// file. // file.
err = fs.MkdirAll(filepath.Dir(dest), 0666) err = fs.MkdirAll(filepath.Dir(dest), 0666) //nolint:gomnd
if err != nil { if err != nil {
return err return err
} }
// Create the destination file. // Create the destination file.
dst, err := fs.Create(dest) dst, err := fs.OpenFile(dest, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0775) //nolint:gomnd
if err != nil { if err != nil {
return err return err
} }
@@ -37,15 +58,71 @@ func CopyFile(fs afero.Fs, source string, dest string) error {
return err return err
} }
// Copy the mode if the user can't // Copy the mode
// open the file.
info, err := fs.Stat(source) info, err := fs.Stat(source)
if err != nil { if err != nil {
err = fs.Chmod(dest, info.Mode()) return err
if err != nil { }
return err err = fs.Chmod(dest, info.Mode())
} if err != nil {
return err
} }
return nil return nil
} }
// CommonPrefix returns common directory path of provided files
func CommonPrefix(sep byte, paths ...string) string {
// Handle special cases.
switch len(paths) {
case 0:
return ""
case 1:
return path.Clean(paths[0])
}
// Note, we treat string as []byte, not []rune as is often
// done in Go. (And sep as byte, not rune). This is because
// most/all supported OS' treat paths as string of non-zero
// bytes. A filename may be displayed as a sequence of Unicode
// runes (typically encoded as UTF-8) but paths are
// not required to be valid UTF-8 or in any normalized form
// (e.g. "é" (U+00C9) and "é" (U+0065,U+0301) are different
// file names.
c := []byte(path.Clean(paths[0]))
// We add a trailing sep to handle the case where the
// common prefix directory is included in the path list
// (e.g. /home/user1, /home/user1/foo, /home/user1/bar).
// path.Clean will have cleaned off trailing / separators with
// the exception of the root directory, "/" (in which case we
// make it "//", but this will get fixed up to "/" bellow).
c = append(c, sep)
// Ignore the first path since it's already in c
for _, v := range paths[1:] {
// Clean up each path before testing it
v = path.Clean(v) + string(sep)
// Find the first non-common byte and truncate c
if len(v) < len(c) {
c = c[:len(v)]
}
for i := 0; i < len(c); i++ {
if v[i] != c[i] {
c = c[:i]
break
}
}
}
// Remove trailing non-separator characters and the final separator
for i := len(c) - 1; i >= 0; i-- {
if c[i] == sep {
c = c[:i]
break
}
}
return string(c)
}

46
fileutils/file_test.go Normal file
View File

@@ -0,0 +1,46 @@
package fileutils
import "testing"
func TestCommonPrefix(t *testing.T) {
testCases := map[string]struct {
paths []string
want string
}{
"same lvl": {
paths: []string{
"/home/user/file1",
"/home/user/file2",
},
want: "/home/user",
},
"sub folder": {
paths: []string{
"/home/user/folder",
"/home/user/folder/file",
},
want: "/home/user/folder",
},
"relative path": {
paths: []string{
"/home/user/folder",
"/home/user/folder/../folder2",
},
want: "/home/user",
},
"no common path": {
paths: []string{
"/home/user/folder",
"/etc/file",
},
want: "",
},
}
for name, tt := range testCases {
t.Run(name, func(t *testing.T) {
if got := CommonPrefix('/', tt.paths...); got != tt.want {
t.Errorf("CommonPrefix() = %v, want %v", got, tt.want)
}
})
}
}

Submodule frontend deleted from bb0d048235

12
frontend/assets.go Normal file
View File

@@ -0,0 +1,12 @@
// +build !dev
package frontend
import "embed"
//go:embed dist/*
var assets embed.FS
func Assets() embed.FS {
return assets
}

14
frontend/assets_dev.go Normal file
View File

@@ -0,0 +1,14 @@
// +build dev
package frontend
import (
"io/fs"
"os"
)
var assets fs.FS = os.DirFS("frontend")
func Assets() fs.FS {
return assets
}

3
frontend/babel.config.js Normal file
View File

@@ -0,0 +1,3 @@
module.exports = {
presets: ["@vue/app"],
};

4
frontend/dist/.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore

27899
frontend/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

72
frontend/package.json Normal file
View File

@@ -0,0 +1,72 @@
{
"name": "filebrowser-frontend",
"version": "2.0.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "find ./dist -maxdepth 1 -mindepth 1 ! -name '.gitignore' -exec rm -r {} + && vue-cli-service build --no-clean",
"lint": "npx vue-cli-service lint --no-fix",
"fix": "npx vue-cli-service lint",
"watch": "find ./dist -maxdepth 1 -mindepth 1 ! -name '.gitignore' -exec rm -r {} + && vue-cli-service build --watch --no-clean"
},
"dependencies": {
"ace-builds": "^1.4.7",
"clipboard": "^2.0.4",
"core-js": "^3.9.1",
"css-vars-ponyfill": "^2.4.3",
"js-base64": "^2.5.1",
"lodash.clonedeep": "^4.5.0",
"lodash.throttle": "^4.1.1",
"material-design-icons": "^3.0.1",
"moment": "^2.24.0",
"normalize.css": "^8.0.1",
"noty": "^3.2.0-beta",
"qrcode.vue": "^1.7.0",
"utif": "^3.1.0",
"vue": "^2.6.10",
"vue-i18n": "^8.15.3",
"vue-lazyload": "^1.3.3",
"vue-router": "^3.1.3",
"vuex": "^3.1.2",
"vuex-router-sync": "^5.0.0",
"whatwg-fetch": "^3.6.2"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.1.2",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-service": "^4.1.2",
"@vue/eslint-config-prettier": "^6.0.0",
"babel-eslint": "^10.1.0",
"compression-webpack-plugin": "^6.0.3",
"eslint": "^6.7.2",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-vue": "^6.2.2",
"prettier": "^2.2.1",
"vue-template-compiler": "^2.6.10"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended",
"@vue/prettier"
],
"rules": {},
"parserOptions": {
"parser": "babel-eslint"
}
},
"postcss": {
"plugins": {
"autoprefixer": {}
}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie < 11"
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="/mstile-150x150.png"/>
<TileColor>#455a64</TileColor>
</tile>
</msapplication>
</browserconfig>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 843 B

After

Width:  |  Height:  |  Size: 843 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

@@ -0,0 +1,42 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="700.000000pt" height="700.000000pt" viewBox="0 0 700.000000 700.000000"
preserveAspectRatio="xMidYMid meet">
<metadata>
Created by potrace 1.11, written by Peter Selinger 2001-2013
</metadata>
<g transform="translate(0.000000,700.000000) scale(0.100000,-0.100000)"
fill="#000000" stroke="none">
<path d="M3245 6989 c-522 -39 -1042 -197 -1480 -449 -849 -488 -1459 -1308
-1673 -2250 -177 -776 -89 -1582 250 -2301 368 -778 1052 -1418 1857 -1739
903 -359 1927 -325 2812 92 778 368 1418 1052 1739 1857 359 903 325 1927 -92
2812 -296 627 -806 1175 -1423 1529 -587 338 -1308 500 -1990 449z m555 -580
c519 -51 1018 -245 1446 -565 788 -588 1229 -1526 1174 -2496 -16 -277 -58
-500 -145 -763 -144 -440 -378 -819 -710 -1150 -452 -452 -1005 -730 -1655
-832 -91 -14 -175 -18 -405 -18 -304 0 -369 6 -595 51 -1105 223 -1999 1092
-2259 2197 -52 221 -73 412 -73 667 0 397 64 732 204 1080 304 752 886 1334
1638 1638 431 174 895 238 1380 191z"/>
<path d="M2670 5215 c0 -13 -44 -15 -335 -15 -352 0 -383 -3 -399 -45 -3 -9
-6 -758 -6 -1663 0 -1168 -3 -1643 -11 -1632 -8 11 -9 8 -4 -15 3 -16 17 -41
31 -55 l24 -25 1530 0 1530 0 24 25 c14 14 26 36 27 50 1 14 1 711 1 1550 l-2
1526 -228 142 -229 142 -136 0 -137 0 0 -600 0 -600 -705 0 -705 0 0 615 0
615 -135 0 c-113 0 -135 -2 -135 -15z m-264 -190 c57 -29 89 -71 103 -137 35
-154 -98 -282 -258 -247 -55 12 -122 62 -148 113 -36 69 -12 186 49 243 62 58
170 70 254 28z m2316 -1702 c17 -15 18 -49 18 -670 l0 -653 -1245 0 -1245 0 0
654 c0 582 2 656 16 670 14 14 139 16 1226 16 1113 0 1213 -1 1230 -17z
m-2602 -1363 c40 -40 13 -100 -43 -100 -60 0 -88 59 -47 100 11 11 31 20 45
20 14 0 34 -9 45 -20z m2840 0 c41 -41 11 -100 -52 -100 -35 0 -58 24 -58 60
0 54 71 79 110 40z"/>
<path d="M2431 3091 c-7 -13 -7 -23 2 -35 11 -15 97 -16 1067 -14 l1055 3 0
30 0 30 -1057 3 c-1023 2 -1058 1 -1067 -17z"/>
<path d="M2436 2675 c-19 -19 -11 -41 17 -49 41 -11 2067 -7 2088 4 23 13 25
46 3 54 -9 3 -483 6 -1054 6 -919 0 -1040 -2 -1054 -15z"/>
<path d="M2447 2273 c-14 -4 -17 -13 -15 -36 l3 -32 1049 -3 c767 -1 1052 1
1062 9 20 16 17 47 -5 59 -20 10 -2055 13 -2094 3z"/>
<path d="M3822 5027 c-21 -23 -22 -30 -22 -293 0 -258 1 -271 20 -292 27 -29
56 -35 140 -30 56 3 75 8 93 26 22 22 22 26 22 298 l0 276 -24 19 c-19 16 -40
19 -115 19 -84 0 -95 -2 -114 -23z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -0,0 +1,147 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xml:space="preserve"
width="560"
height="560"
version="1.1"
style="clip-rule:evenodd;fill-rule:evenodd;image-rendering:optimizeQuality;shape-rendering:geometricPrecision;text-rendering:geometricPrecision"
viewBox="0 0 560 560"
id="svg44"
sodipodi:docname="icon_raw.svg"
inkscape:version="0.92.3 (2405546, 2018-03-11)"
inkscape:export-filename="/home/umarcor/filebrowser/logo/icon_raw.svg.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"><metadata
id="metadata48"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1366"
inkscape:window-height="711"
id="namedview46"
showgrid="false"
inkscape:zoom="0.33714286"
inkscape:cx="-172.33051"
inkscape:cy="280"
inkscape:window-x="0"
inkscape:window-y="20"
inkscape:window-maximized="1"
inkscape:current-layer="svg44" />
<defs
id="defs4">
<style
type="text/css"
id="style2">
<![CDATA[
.fil1 {fill:#FEFEFE}
.fil6 {fill:#006498}
.fil7 {fill:#0EA5EB}
.fil8 {fill:#2979FF}
.fil3 {fill:#2BBCFF}
.fil0 {fill:#455A64}
.fil4 {fill:#53C6FC}
.fil5 {fill:#BDEAFF}
.fil2 {fill:#332C2B;fill-opacity:0.149020}
]]>
</style>
</defs>
<g
id="g85"
transform="translate(-70,-70)"><path
class="fil1"
d="M 350,71 C 504,71 629,196 629,350 629,504 504,629 350,629 196,629 71,504 71,350 71,196 196,71 350,71 Z"
id="path9"
inkscape:connector-curvature="0"
style="fill:#fefefe" /><path
class="fil2"
d="M 475,236 593,387 C 596,503 444,639 301,585 L 225,486 339,330 c 0,0 138,-95 136,-94 z"
id="path11"
inkscape:connector-curvature="0"
style="fill:#332c2b;fill-opacity:0.14902003" /><path
class="fil3"
d="m 231,211 h 208 l 38,24 v 246 c 0,5 -3,8 -8,8 H 231 c -5,0 -8,-3 -8,-8 V 219 c 0,-5 3,-8 8,-8 z"
id="path13"
inkscape:connector-curvature="0"
style="fill:#2bbcff" /><path
class="fil4"
d="m 231,211 h 208 l 38,24 v 2 L 440,214 H 231 c -4,0 -7,3 -7,7 v 263 c -1,-1 -1,-2 -1,-3 V 219 c 0,-5 3,-8 8,-8 z"
id="path15"
inkscape:connector-curvature="0"
style="fill:#53c6fc" /><polygon
class="fil5"
points="305,212 418,212 418,310 305,310 "
id="polygon17"
style="fill:#bdeaff" /><path
class="fil5"
d="m 255,363 h 189 c 3,0 5,2 5,4 V 483 H 250 V 367 c 0,-2 2,-4 5,-4 z"
id="path19"
inkscape:connector-curvature="0"
style="fill:#bdeaff" /><polygon
class="fil6"
points="250,470 449,470 449,483 250,483 "
id="polygon21"
style="fill:#006498" /><path
class="fil6"
d="m 380,226 h 10 c 3,0 6,2 6,5 v 40 c 0,3 -3,6 -6,6 h -10 c -3,0 -6,-3 -6,-6 v -40 c 0,-3 3,-5 6,-5 z"
id="path23"
inkscape:connector-curvature="0"
style="fill:#006498" /><path
class="fil1"
d="m 254,226 c 10,0 17,7 17,17 0,9 -7,16 -17,16 -9,0 -17,-7 -17,-16 0,-10 8,-17 17,-17 z"
id="path25"
inkscape:connector-curvature="0"
style="fill:#fefefe" /><path
class="fil6"
d="m 267,448 h 165 c 2,0 3,1 3,3 v 0 c 0,1 -1,3 -3,3 H 267 c -2,0 -3,-2 -3,-3 v 0 c 0,-2 1,-3 3,-3 z"
id="path27"
inkscape:connector-curvature="0"
style="fill:#006498" /><path
class="fil6"
d="m 267,415 h 165 c 2,0 3,1 3,3 v 0 c 0,1 -1,2 -3,2 H 267 c -2,0 -3,-1 -3,-2 v 0 c 0,-2 1,-3 3,-3 z"
id="path29"
inkscape:connector-curvature="0"
style="fill:#006498" /><path
class="fil6"
d="m 267,381 h 165 c 2,0 3,2 3,3 v 0 c 0,2 -1,3 -3,3 H 267 c -2,0 -3,-1 -3,-3 v 0 c 0,-1 1,-3 3,-3 z"
id="path31"
inkscape:connector-curvature="0"
style="fill:#006498" /><path
class="fil1"
d="m 236,472 c 3,0 5,2 5,5 0,2 -2,4 -5,4 -3,0 -5,-2 -5,-4 0,-3 2,-5 5,-5 z"
id="path33"
inkscape:connector-curvature="0"
style="fill:#fefefe" /><path
class="fil1"
d="m 463,472 c 3,0 5,2 5,5 0,2 -2,4 -5,4 -3,0 -5,-2 -5,-4 0,-3 2,-5 5,-5 z"
id="path35"
inkscape:connector-curvature="0"
style="fill:#fefefe" /><polygon
class="fil6"
points="305,212 284,212 284,310 305,310 "
id="polygon37"
style="fill:#006498" /><path
class="fil7"
d="m 477,479 v 2 c 0,5 -3,8 -8,8 H 231 c -5,0 -8,-3 -8,-8 v -2 c 0,4 3,8 8,8 h 238 c 5,0 8,-4 8,-8 z"
id="path39"
inkscape:connector-curvature="0"
style="fill:#0ea5eb" /><path
class="fil8"
d="M 350,70 C 505,70 630,195 630,350 630,505 505,630 350,630 195,630 70,505 70,350 70,195 195,70 350,70 Z m 0,46 C 479,116 584,221 584,350 584,479 479,584 350,584 221,584 116,479 116,350 116,221 221,116 350,116 Z"
id="path41"
inkscape:connector-curvature="0"
style="fill:#2979ff" /></g>
</svg>

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

144
frontend/public/index.html Normal file
View File

@@ -0,0 +1,144 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
[{[ if .ReCaptcha -]}]
<script src="[{[ .ReCaptchaHost ]}]/recaptcha/api.js?render=explicit"></script>
[{[ end ]}]
<title>[{[ if .Name -]}][{[ .Name ]}][{[ else ]}]File Browser[{[ end ]}]</title>
<link rel="icon" type="image/png" sizes="32x32" href="[{[ .StaticURL ]}]/img/icons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="[{[ .StaticURL ]}]/img/icons/favicon-16x16.png">
<!-- Add to home screen for Android and modern mobile browsers -->
<link rel="manifest" id="manifestPlaceholder" crossorigin="use-credentials">
<meta name="theme-color" content="[{[ if .Color -]}][{[ .Color ]}][{[ else ]}]#2979ff[{[ end ]}]">
<!-- Add to home screen for Safari on iOS/iPadOS -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="assets">
<link rel="apple-touch-icon" href="[{[ .StaticURL ]}]/img/icons/apple-touch-icon.png">
<!-- Add to home screen for Windows -->
<meta name="msapplication-TileImage" content="[{[ .StaticURL ]}]/img/icons/mstile-144x144.png">
<meta name="msapplication-TileColor" content="[{[ if .Color -]}][{[ .Color ]}][{[ else ]}]#2979ff[{[ end ]}]">
<!-- Inject Some Variables and generate the manifest json -->
<script>
window.FileBrowser = JSON.parse('[{[ .Json ]}]');
var fullStaticURL = window.location.origin + window.FileBrowser.StaticURL;
var dynamicManifest = {
"name": window.FileBrowser.Name || 'File Browser',
"short_name": window.FileBrowser.Name || 'File Browser',
"icons": [
{
"src": fullStaticURL + "/img/icons/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": fullStaticURL + "/img/icons/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"start_url": window.location.origin + window.FileBrowser.BaseURL,
"display": "standalone",
"background_color": "#ffffff",
"theme_color": window.FileBrowser.Color || "#455a64"
}
const stringManifest = JSON.stringify(dynamicManifest);
const blob = new Blob([stringManifest], {type: 'application/json'});
const manifestURL = URL.createObjectURL(blob);
document.querySelector('#manifestPlaceholder').setAttribute('href', manifestURL);
</script>
<style>
#loading {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #fff;
z-index: 9999;
transition: .1s ease opacity;
-webkit-transition: .1s ease opacity;
}
#loading.done {
opacity: 0;
}
#loading .spinner {
width: 70px;
text-align: center;
position: fixed;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
#loading .spinner > div {
width: 18px;
height: 18px;
background-color: #333;
border-radius: 100%;
display: inline-block;
-webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;
animation: sk-bouncedelay 1.4s infinite ease-in-out both;
}
#loading .spinner .bounce1 {
-webkit-animation-delay: -0.32s;
animation-delay: -0.32s;
}
#loading .spinner .bounce2 {
-webkit-animation-delay: -0.16s;
animation-delay: -0.16s;
}
@-webkit-keyframes sk-bouncedelay {
0%, 80%, 100% { -webkit-transform: scale(0) }
40% { -webkit-transform: scale(1.0) }
}
@keyframes sk-bouncedelay {
0%, 80%, 100% {
-webkit-transform: scale(0);
transform: scale(0);
} 40% {
-webkit-transform: scale(1.0);
transform: scale(1.0);
}
}
</style>
</head>
<body>
<div id="app"></div>
<div id="loading">
<div class="spinner">
<div class="bounce1"></div>
<div class="bounce2"></div>
<div class="bounce3"></div>
</div>
</div>
[{[ if .Theme -]}]
<link rel="stylesheet" href="[{[ .StaticURL ]}]/themes/[{[ .Theme ]}].css" />
[{[ end ]}]
[{[ if .CSS -]}]
<link rel="stylesheet" href="[{[ .StaticURL ]}]/custom.css" />
[{[ end ]}]
</body>
</html>

View File

@@ -0,0 +1,20 @@
{
"name": "File Browser",
"short_name": "File Browser",
"icons": [
{
"src": "./img/icons/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "./static/img/icons/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"start_url": "/",
"display": "standalone",
"background_color": "#ffffff",
"theme_color": "#455a64"
}

View File

@@ -0,0 +1,211 @@
:root {
--background: #141D24;
--surfacePrimary: #20292F;
--surfaceSecondary: #3A4147;
--divider: rgba(255, 255, 255, 0.12);
--icon: #ffffff;
--textPrimary: rgba(255, 255, 255, 0.87);
--textSecondary: rgba(255, 255, 255, 0.6);
}
body {
background: var(--background);
color: var(--textPrimary);
}
#loading {
background: var(--background);
}
#loading .spinner div, main .spinner div {
background: var(--icon);
}
#login {
background: var(--background);
}
header {
background: var(--surfacePrimary);
}
#search #input {
background: var(--surfaceSecondary);
border-color: var(--surfacePrimary);
}
#search #input input::placeholder {
color: var(--textSecondary);
}
#search.active #input {
background: var(--surfacePrimary);
}
#search.active input {
color: var(--textPrimary);
}
#search #result {
background: var(--background);
color: var(--textPrimary);
}
#search .boxes {
background: var(--surfaceSecondary);
}
#search .boxes h3 {
color: var(--textPrimary);
}
.action {
color: var(--textPrimary) !important;
}
.action:hover {
background-color: rgba(255, 255, 255, .1);
}
.action i {
color: var(--icon) !important;
}
.action .counter {
border-color: var(--surfacePrimary);
}
nav > div {
border-color: var(--divider);
}
.breadcrumbs {
border-color: var(--divider);
color: var(--textPrimary) !important;
}
.breadcrumbs span {
color: var(--textPrimary) !important;
}
.breadcrumbs a:hover {
background-color: rgba(255, 255, 255, .1);
}
#listing .item {
background: var(--surfacePrimary);
color: var(--textPrimary);
border-color: var(--divider) !important;
}
#listing .item i {
color: var(--icon);
}
#listing .item .modified {
color: var(--textSecondary);
}
#listing h2,
#listing.list .header span {
color: var(--textPrimary) !important;
}
#listing.list .header span {
color: var(--textPrimary);
}
#listing.list .header i {
color: var(--icon);
}
#listing.list .item.header {
background: var(--background);
}
.message {
color: var(--textPrimary);
}
.card {
background: var(--surfacePrimary);
color: var(--textPrimary);
}
.button--flat:hover {
background: var(--surfaceSecondary);
}
.dashboard #nav ul li {
color: var(--textSecondary);
}
.dashboard #nav ul li:hover {
background: var(--surfaceSecondary);
}
.card h3,
.dashboard #nav,
.dashboard p label {
color: var(--textPrimary);
}
.card#share input,
.card#share select,
.input {
background: var(--surfaceSecondary);
color: var(--textPrimary);
border: 1px solid rgba(255, 255, 255, 0.05);
}
.input:hover,
.input:focus {
border-color: rgba(255, 255, 255, 0.15);
}
.input--red {
background: #73302D;
}
.input--green {
background: #147A41;
}
.dashboard #nav .wrapper,
.collapsible {
border-color: var(--divider);
}
.collapsible > label * {
color: var(--textPrimary);
}
table th {
color: var(--textSecondary);
}
.file-list li:hover {
background: var(--surfaceSecondary);
}
.file-list li:before {
color: var(--textSecondary);
}
.file-list li[aria-selected=true]:before {
color: var(--icon);
}
.shell {
background: var(--surfacePrimary);
color: var(--textPrimary);
}
.shell__result {
border-top: 1px solid var(--divider);
}
#editor-container {
background: var(--background);
}
#editor-container .bar {
background: var(--surfacePrimary);
}
@media (max-width: 736px) {
#file-selection {
background: var(--surfaceSecondary) !important;
}
#file-selection span {
color: var(--textPrimary) !important;
}
nav {
background: var(--surfaceSecondary) !important;
}
#dropdown {
background: var(--surfaceSecondary) !important;
}
}
.share__box {
background: var(--surfacePrimary) !important;
color: var(--textPrimary);
}
.share__box__element {
border-top-color: var(--divider);
}

26
frontend/src/App.vue Normal file
View File

@@ -0,0 +1,26 @@
<template>
<div>
<router-view></router-view>
</div>
</template>
<script>
// eslint-disable-next-line no-undef
__webpack_public_path__ = window.FileBrowser.StaticURL + "/";
export default {
name: "app",
mounted() {
const loading = document.getElementById("loading");
loading.classList.add("done");
setTimeout(function () {
loading.parentNode.removeChild(loading);
}, 200);
},
};
</script>
<style>
@import "./css/styles.css";
</style>

View File

@@ -0,0 +1,16 @@
import { removePrefix } from "./utils";
import { baseURL } from "@/utils/constants";
import store from "@/store";
const ssl = window.location.protocol === "https:";
const protocol = ssl ? "wss:" : "ws:";
export default function command(url, command, onmessage, onclose) {
url = removePrefix(url);
url = `${protocol}//${window.location.host}${baseURL}/api/command${url}?auth=${store.state.jwt}`;
let conn = new window.WebSocket(url);
conn.onopen = () => conn.send(command);
conn.onmessage = onmessage;
conn.onclose = onclose;
}

156
frontend/src/api/files.js Normal file
View File

@@ -0,0 +1,156 @@
import { fetchURL, removePrefix } from "./utils";
import { baseURL } from "@/utils/constants";
import store from "@/store";
export async function fetch(url) {
url = removePrefix(url);
const res = await fetchURL(`/api/resources${url}`, {});
if (res.status === 200) {
let data = await res.json();
data.url = `/files${url}`;
if (data.isDir) {
if (!data.url.endsWith("/")) data.url += "/";
data.items = data.items.map((item, index) => {
item.index = index;
item.url = `${data.url}${encodeURIComponent(item.name)}`;
if (item.isDir) {
item.url += "/";
}
return item;
});
}
return data;
} else {
throw new Error(res.status);
}
}
async function resourceAction(url, method, content) {
url = removePrefix(url);
let opts = { method };
if (content) {
opts.body = content;
}
const res = await fetchURL(`/api/resources${url}`, opts);
if (res.status !== 200) {
throw new Error(await res.text());
} else {
return res;
}
}
export async function remove(url) {
return resourceAction(url, "DELETE");
}
export async function put(url, content = "") {
return resourceAction(url, "PUT", content);
}
export function download(format, ...files) {
let url = `${baseURL}/api/raw`;
if (files.length === 1) {
url += removePrefix(files[0]) + "?";
} else {
let arg = "";
for (let file of files) {
arg += removePrefix(file) + ",";
}
arg = arg.substring(0, arg.length - 1);
arg = encodeURIComponent(arg);
url += `/?files=${arg}&`;
}
if (format) {
url += `algo=${format}&`;
}
if (store.state.jwt) {
url += `auth=${store.state.jwt}&`;
}
window.open(url);
}
export async function post(url, content = "", overwrite = false, onupload) {
url = removePrefix(url);
let bufferContent;
if (
content instanceof Blob &&
!["http:", "https:"].includes(window.location.protocol)
) {
bufferContent = await new Response(content).arrayBuffer();
}
return new Promise((resolve, reject) => {
let request = new XMLHttpRequest();
request.open(
"POST",
`${baseURL}/api/resources${url}?override=${overwrite}`,
true
);
request.setRequestHeader("X-Auth", store.state.jwt);
if (typeof onupload === "function") {
request.upload.onprogress = onupload;
}
request.onload = () => {
if (request.status === 200) {
resolve(request.responseText);
} else if (request.status === 409) {
reject(request.status);
} else {
reject(request.responseText);
}
};
request.onerror = (error) => {
reject(error);
};
request.send(bufferContent || content);
});
}
function moveCopy(items, copy = false, overwrite = false, rename = false) {
let promises = [];
for (let item of items) {
const from = item.from;
const to = encodeURIComponent(removePrefix(item.to));
const url = `${from}?action=${
copy ? "copy" : "rename"
}&destination=${to}&override=${overwrite}&rename=${rename}`;
promises.push(resourceAction(url, "PATCH"));
}
return Promise.all(promises);
}
export function move(items, overwrite = false, rename = false) {
return moveCopy(items, false, overwrite, rename);
}
export function copy(items, overwrite = false, rename = false) {
return moveCopy(items, true, overwrite, rename);
}
export async function checksum(url, algo) {
const data = await resourceAction(`${url}?checksum=${algo}`, "GET");
return (await data.json()).checksums[algo];
}

View File

@@ -0,0 +1,9 @@
import * as files from "./files";
import * as share from "./share";
import * as users from "./users";
import * as settings from "./settings";
import * as pub from "./pub";
import search from "./search";
import commands from "./commands";
export { files, share, users, settings, pub, commands, search };

61
frontend/src/api/pub.js Normal file
View File

@@ -0,0 +1,61 @@
import { fetchURL, removePrefix } from "./utils";
import { baseURL } from "@/utils/constants";
export async function fetch(url, password = "") {
url = removePrefix(url);
const res = await fetchURL(`/api/public/share${url}`, {
headers: { "X-SHARE-PASSWORD": password },
});
if (res.status === 200) {
let data = await res.json();
data.url = `/share${url}`;
if (data.isDir) {
if (!data.url.endsWith("/")) data.url += "/";
data.items = data.items.map((item, index) => {
item.index = index;
item.url = `${data.url}${encodeURIComponent(item.name)}`;
if (item.isDir) {
item.url += "/";
}
return item;
});
}
return data;
} else {
throw new Error(res.status);
}
}
export function download(format, hash, token, ...files) {
let url = `${baseURL}/api/public/dl/${hash}`;
if (files.length === 1) {
url += encodeURIComponent(files[0]) + "?";
} else {
let arg = "";
for (let file of files) {
arg += encodeURIComponent(file) + ",";
}
arg = arg.substring(0, arg.length - 1);
arg = encodeURIComponent(arg);
url += `/?files=${arg}&`;
}
if (format) {
url += `algo=${format}&`;
}
if (token) {
url += `token=${token}&`;
}
window.open(url);
}

View File

@@ -0,0 +1,31 @@
import { fetchURL, removePrefix } from "./utils";
import url from "../utils/url";
export default async function search(base, query) {
base = removePrefix(base);
query = encodeURIComponent(query);
if (!base.endsWith("/")) {
base += "/";
}
let res = await fetchURL(`/api/search${base}?query=${query}`, {});
if (res.status === 200) {
let data = await res.json();
data = data.map((item) => {
item.url = `/files${base}` + url.encodePath(item.path);
if (item.dir) {
item.url += "/";
}
return item;
});
return data;
} else {
throw Error(res.status);
}
}

View File

@@ -0,0 +1,16 @@
import { fetchURL, fetchJSON } from "./utils";
export function get() {
return fetchJSON(`/api/settings`, {});
}
export async function update(settings) {
const res = await fetchURL(`/api/settings`, {
method: "PUT",
body: JSON.stringify(settings),
});
if (res.status !== 200) {
throw new Error(res.status);
}
}

36
frontend/src/api/share.js Normal file
View File

@@ -0,0 +1,36 @@
import { fetchURL, fetchJSON, removePrefix } from "./utils";
export async function list() {
return fetchJSON("/api/shares");
}
export async function get(url) {
url = removePrefix(url);
return fetchJSON(`/api/share${url}`);
}
export async function remove(hash) {
const res = await fetchURL(`/api/share/${hash}`, {
method: "DELETE",
});
if (res.status !== 200) {
throw new Error(res.status);
}
}
export async function create(url, password = "", expires = "", unit = "hours") {
url = removePrefix(url);
url = `/api/share${url}`;
if (expires !== "") {
url += `?expires=${expires}&unit=${unit}`;
}
let body = "{}";
if (password != "" || expires !== "" || unit !== "hours") {
body = JSON.stringify({ password: password, expires: expires, unit: unit });
}
return fetchJSON(url, {
method: "POST",
body: body,
});
}

51
frontend/src/api/users.js Normal file
View File

@@ -0,0 +1,51 @@
import { fetchURL, fetchJSON } from "./utils";
export async function getAll() {
return fetchJSON(`/api/users`, {});
}
export async function get(id) {
return fetchJSON(`/api/users/${id}`, {});
}
export async function create(user) {
const res = await fetchURL(`/api/users`, {
method: "POST",
body: JSON.stringify({
what: "user",
which: [],
data: user,
}),
});
if (res.status === 201) {
return res.headers.get("Location");
} else {
throw new Error(res.status);
}
}
export async function update(user, which = ["all"]) {
const res = await fetchURL(`/api/users/${user.id}`, {
method: "PUT",
body: JSON.stringify({
what: "user",
which: which,
data: user,
}),
});
if (res.status !== 200) {
throw new Error(res.status);
}
}
export async function remove(id) {
const res = await fetchURL(`/api/users/${id}`, {
method: "DELETE",
});
if (res.status !== 200) {
throw new Error(res.status);
}
}

47
frontend/src/api/utils.js Normal file
View File

@@ -0,0 +1,47 @@
import store from "@/store";
import { renew } from "@/utils/auth";
import { baseURL } from "@/utils/constants";
export async function fetchURL(url, opts) {
opts = opts || {};
opts.headers = opts.headers || {};
let { headers, ...rest } = opts;
let res;
try {
res = await fetch(`${baseURL}${url}`, {
headers: {
"X-Auth": store.state.jwt,
...headers,
},
...rest,
});
} catch (error) {
return { status: 0 };
}
if (res.headers.get("X-Renew-Token") === "true") {
await renew(store.state.jwt);
}
return res;
}
export async function fetchJSON(url, opts) {
const res = await fetchURL(url, opts);
if (res.status === 200) {
return res.json();
} else {
throw new Error(res.status);
}
}
export function removePrefix(url) {
url = url.split("/").splice(2).join("/");
if (url === "") url = "/";
if (url[0] !== "/") url = "/" + url;
return url;
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More