Compare commits

...
77 Commits
Author SHA1 Message Date
Henrique Dias 06200775d5 Version 1.4.2
Former-commit-id: 6dab389efe4eed59f8f39d76e60130ccc74a13ea [formerly 8e106da6d1e25e04a26654435bb180793cc87c3d] [formerly cf02028f5fb706a296a8320fa1d54f222d02f78f [formerly 02f6bb81ccf9c39ea7b1174aa79bd9d2881e0245]]
Former-commit-id: b903fc7a2bf4fdad3a8c89a67b34d99fb3273c35 [formerly 6ea119c7468502d2244108600f0389eb05b502a3]
Former-commit-id: 96de8cafcd6c1ce94f05854a9fb2e9aa3d99eafb
2018-01-04 14:05:19 +00:00
Henrique Dias 8a10baa815 Update .goreleaser.yml
Former-commit-id: dce13b52b52d980f11ef90f08b229c99ef74548c [formerly 45b6e868899a14fad61e61b5603da5dbdf1704fc] [formerly 90aabc167231a2d164afee7ab966a465146afe63 [formerly d8f057757e]]
Former-commit-id: 43bae9e293b2e3cf0b8608c344dadff88de47380 [formerly beff2d7f954169e917950549a353f5efa033f906]
Former-commit-id: e77e853b8e818863bff7164b169b411eaa6732fe
2018-01-04 14:04:09 +00:00
Henrique Dias 98c22ece8d [ci skip] auto: setting untracked version
Former-commit-id: 8ddd21218dd4fb6e00cf083a80199d2a4339af2f [formerly 3406ebe12f6112ed751092e5f831c77ce459c6e0] [formerly 143f9d23f5fa5e5545fd63e6f44ae9228e6c093c [formerly 5bd60ce05a]]
Former-commit-id: d7362d24d7d872cb722d462fab45d2a48b37b1d5 [formerly c7c1cfd6d43642315e9a7956211ede7eb0a6b5e3]
Former-commit-id: c42269de8c2b7ecbdacaca0cf383c8a29dfd239b
2018-01-04 13:50:31 +00:00
Henrique Dias 63247f6e8c Version 1.4.2
Former-commit-id: 488d6575d81275f6c5e1c04280a5def6aa700117 [formerly fb198ae1767fc52ed8492657f33f5bd91d4d4283] [formerly b100a438db05a237c2e7a081fbdaed3a5ed6ebae [formerly e7b372f548]]
Former-commit-id: 3c418fc25a996e829e35be8f49eec0c43bf1829d [formerly 6568a1dd89e6a5640a2ad9fde224303813f219d0]
Former-commit-id: a1355be166395d2bc0d0a4a5a7170b36c73df094
2018-01-04 13:50:19 +00:00
Henrique Dias 58dd812008 fix #269
Former-commit-id: a0b8ed91061292e0f155cee9a7865609daacf836 [formerly e6bb9eaa82b5704f3fe29bdec50f6bb4f55304b2] [formerly b443cbf5c6d7946ff3cfa44493449b5f0d75d830 [formerly 02df167434]]
Former-commit-id: c193caff6faaf78a16375960893be9e253869d3c [formerly 6c84d234c9e1db432027bc159dbeeb77e9c35031]
Former-commit-id: a48c3851511472efc47bce07ee2509fdd8a44c4a
2018-01-04 13:49:41 +00:00
Henrique Dias 1575fafec8 [ci skip] auto: setting untracked version
Former-commit-id: c497913d120be4a71f7d2305600e2785190f0e2b [formerly 0126f289afd78bc006e5e0fe383670dbc9df4fd4] [formerly 12899a40ac7b8a94c3930dcdb3101d121c56cbc2 [formerly 9da06a7010]]
Former-commit-id: 866590120ccd5ddc189d36e352c637cabc82f81f [formerly af0b154bf6db52c01e9d0b10f3d6678319727bca]
Former-commit-id: ff3c428b12cc8028b21d8585a9927e826ebdf4cb
2018-01-04 12:41:34 +00:00
Henrique Dias 8c935eb51d Version 1.4.1
Former-commit-id: 77ee0108106777f2de0719eb6ea50bcad12f8635 [formerly 4dc3acf5b7eaaa687ccfced7fc463e2b7e7104ea] [formerly 3ec2bd1fe0b8e364621204b9aa1732cbc7828199 [formerly 44d6730073]]
Former-commit-id: efd15158f953966190c8a8e9310801a89049ea4e [formerly 56a49a89f919d70486b6db126e84e5997bd6d261]
Former-commit-id: 969b87ac24214cb7dfc9429253724c68aa0d46bc
2018-01-04 12:41:23 +00:00
Henrique Dias 7f3a26e1c0 fix: error when user have no commands; close #293
Former-commit-id: 9e1ebf686f12d76a202bf8a3b0b16f14f8eb713d [formerly bfc761cc181d6d8880fd86396e69bf5894806f6c] [formerly 774e09b49a2dff07becff48bf048b3b0bd8353ed [formerly 65d3c0fb9b]]
Former-commit-id: 8ab97c0103cde1a9bcf69c1e9af994241fb9d124 [formerly a25dc7feb0755122c7329e3a3bfa61f74418467b]
Former-commit-id: 92e21139ffe04ab23406352e0a5b6131e8cad084
2018-01-04 12:40:45 +00:00
Henrique Dias fe834aa244 remove file
Former-commit-id: 95f665f00dc03c130afb5fc45e8076a869c30222 [formerly acae04da4a0d58e689b704ff405a749c4fa43c05] [formerly 482666a8335cc216fa706d5175c8a75cbdb073df [formerly 0781b961da]]
Former-commit-id: 57a2f201668aad631fead876207b2d5620e202dc [formerly 9f1344480aa6589652ce34dff2496dc36b9d631c]
Former-commit-id: 2760b12b251f53c4421b80d5d5122520eb92cf40
2017-12-29 17:31:21 +00:00
Henrique Dias 6620a1bf41 [ci skip] auto: setting untracked version
Former-commit-id: 0b2303648bf1c82d04b20f439a76d2ce37cfbc4c [formerly 8aedb0827d0538efa6ec0d88082e3df2e85b6e46] [formerly 91dc35e45674e83e44ecb66e7da2bb1d7634efb4 [formerly d431f5f0e4]]
Former-commit-id: 551cf4271e33f7893ecbd7290074d0d031827a94 [formerly 034d533f73603df46d2c7efccaddd17bb0f37814]
Former-commit-id: 1cf3cbcb484e5128ac9564516992f5fbdaddfc28
2017-12-29 16:46:22 +00:00
Henrique Dias dab08325b7 Version 1.4.0
Former-commit-id: 368d4ecf114fb68ca038e4baf3d840afb2636ba0 [formerly 42d7e7c749edda5dc525f86e775c999b69dd0343] [formerly edb264480cef71783fa0ec799c667710b48c0e76 [formerly 0848d5b135]]
Former-commit-id: db6356cdcaf40265c31e4aa08c88614d2aa1f886 [formerly a52ba320deffe84af53facdba3606b9d032118ea]
Former-commit-id: 6ee806954d2456421fe737541dfee136df93f54e
2017-12-29 16:46:12 +00:00
Henrique Dias ddb4685257 Update .goreleaser.yml
Former-commit-id: 66c518285185e0a94bd1ab865676e3e5f409b76f [formerly 906313ef1a1747ce137bcbe7d54a20244b04ced9] [formerly 4724da443d609b6ef27851c2b79eadb9d7cefa4f [formerly 2fc342a3e9]]
Former-commit-id: 90b7247bd50078d5321c9dc1c51149f88c63989e [formerly ba9587d799234e3cd1c2888841fa6fc12227806c]
Former-commit-id: 9b9383f2cbb64775944dc68d882454d73b406246
2017-12-29 16:45:21 +00:00
Henrique Dias 39dbca3b15 [ci skip] auto: setting untracked version
Former-commit-id: ea04ce9843fafcc33961d3aacd5f31b5f93d1a08 [formerly d97fa13252b9201ea17bb9aa188b7f93b03d3f6a] [formerly c647d2080414bccf957ffb713cf029219780f606 [formerly 2b9cf83feb]]
Former-commit-id: 82f4a48d20d439257a70e49726bc26ddbd259c58 [formerly 8d3787cabd875c3ee84044051e5f97fbf1922585]
Former-commit-id: 45a6d0ca105b6b9591928d69db81c7c7777b62df
2017-12-29 16:35:29 +00:00
Henrique Dias a02bdfc8d5 Version 1.4.0
Former-commit-id: 3a8e072916c7ce76104d67e805c202cb95568c41 [formerly 6c77d93905851193699f1651653de748fc8f0806] [formerly 8563da03483dfdc77cb65736deb60084ae76df40 [formerly d98b58e0f0]]
Former-commit-id: 745caf9deb45ed766f088d7a52aa992191960a40 [formerly d2e6c7c774dc6b58b9406081358730f4dc5c573d]
Former-commit-id: 37ba109c46b21bdff083ee63451cb54bc3243e3e
2017-12-29 16:33:50 +00:00
Henrique Dias f88721cc83 chore: add more build platforms
Former-commit-id: d3442dce2a31d700cc0778229819ee3821bdcc19 [formerly 218c9d7fb7fa28546797c50d03956362829407a2] [formerly 6abbb1b814a037c106526506ee1ca999dae54914 [formerly 3217751cc3]]
Former-commit-id: 4fb0fecd3b19b145369d751f454b5c079163c9f4 [formerly c428f4e11ce84ca60ed7c2d968da9c71c1f23d11]
Former-commit-id: f22d06e1d43a9eb68845aa2490c72b187eba0018
2017-12-29 16:32:32 +00:00
Henrique Dias 95544bfed5 fix default view mode on caddy plugins
Former-commit-id: 41e6e855b611449829b4aaab2381685da8b94bb0 [formerly cfcd8802666a8869a2e2f8229d86fee05e088d4e] [formerly 72b0f44e1bf1ab0b27cf327cfac6977049e2dacf [formerly 258557fb57]]
Former-commit-id: e17e5ed75665cd53ec8a20b2833268de5ffa5e47 [formerly 5b8571fd62e0517f1daa72fbb95d7c99ba120c6b]
Former-commit-id: 39ebfa5155c60f71e9f565de875594c3b07b8bac
2017-12-29 08:55:03 +00:00
Henrique Dias 999ee1c2f5 [ci skip] auto: setting untracked version
Former-commit-id: c555833bd28140ffed26dd56d5d1f03ccdefe8f9 [formerly 19be792ade9e4df3c4cc0765d819be35269803b9] [formerly 190d7e277e3d94b22af59288b0403c1e6055ca58 [formerly dc1f51cfa9]]
Former-commit-id: d270e36617e94f506828700bab84310aa6199750 [formerly c414ab0a208bc6fa5a4236bd269d42c2fab3ca8c]
Former-commit-id: a82ebba0e51012db7689b41f81c6cbcfdac9accb
2017-12-27 16:20:03 +00:00
Henrique Dias a61ade62e5 Version 1.3.12
Former-commit-id: cebe84ae6a9b87fec49fd1b2966f58174f49b616 [formerly d8fc91407b0a3cc7616532f14e5ae9b8af49ca11] [formerly d52eac19847da77e49817878f2930c8f438af49a [formerly cec257787b]]
Former-commit-id: c8913636186c289c615ee29d0b36998484d39023 [formerly 67b4f850b4452112f63f2b10e6ae9f9e8848d26b]
Former-commit-id: 45593be374fb4c925a93c26e7ee1288e53c3abf4
2017-12-27 16:19:51 +00:00
Henrique Dias 08de5efeb4 fix: stream file instead of putting it all in memory (#303)
Former-commit-id: 2dc1092f4111870eda6fd51f06cf6dadcac27c78 [formerly 6b21e8ca91b69a70aa07a60099e6919cf1f29fff] [formerly 5860c903ca50aa9a29f91c98d144e859fa223977 [formerly e6a8e3349e]]
Former-commit-id: f8923f5d3fa5d638170ccd870ed4d38abee42d2e [formerly 1a1b27bb606ea012bb5eb3ee42ab6f1d585e1490]
Former-commit-id: f7a238d6ed3e61b925fa20e7ecca145b1f903dba
2017-12-27 16:18:27 +00:00
Henrique Dias 74f690a71b fix: allow user not to write .md or .markdown when creating file based on archetype #288
Former-commit-id: e2bc376cc78905e9d85596bcb281b1f52647b4fb [formerly d4c44f8625bda57d5659366d2651d8021776c9d2] [formerly 766fc98ad54327498076992a110415750d059bd2 [formerly 390fe1d797]]
Former-commit-id: 6c30496fab170a7a39eacba39827e054089f64ad [formerly 8b3aac4b83339ec9722ddadc3fe225e3753afd94]
Former-commit-id: 85e39aa259af1e628e77d488fbd9c7ea5d207eb7
2017-12-27 16:02:36 +00:00
Henrique Dias 1d4a3005ff fix: hugo full path in URL #288 (#306)
Former-commit-id: 56143acfb6b2817df49998c96f9b70174327c31c [formerly b763216262fd57a06d7f343a96891cc62f5ba358] [formerly 8a09d84e73ce9e3865bcd65a8071f2e5cb48333f [formerly 68c4072bd1]]
Former-commit-id: cbec5adf02b6d83b27c7286546a7a291b2344256 [formerly 94dbfbb4aaf51abcd809f3562a4a8a53945782f5]
Former-commit-id: 3f11f9c8be4f7e9b063789fca73212ca838ce1ad
2017-12-27 16:00:16 +00:00
Henrique Dias 7447a530ee Close #289
Former-commit-id: 6145bac21a69ec5af8b0c9d6f5a343ab66c32c74 [formerly 13a045c4cc6852e88af60b359653032590c8cb48] [formerly 1b279454432546ba44702b792ec83eec00f63a1f [formerly b1c36ec71f]]
Former-commit-id: ef359bdf00c3c64d4877f02de3d8cb505bd6448c [formerly b4f09c805cd6a0f5300a1e608d024ce7af6b60db]
Former-commit-id: 009fb85389f234e1d5f7fc726e1d983fed3b5832
2017-12-06 22:30:49 +00:00
Henrique Dias fa9396f0f4 [ci skip] auto: setting untracked version
Former-commit-id: b508f843299648b61849e33273041df46c2ed31e [formerly 9e153dd2ff31f0bb769e35f70c2bdba656bf449f] [formerly 864e40ed1299bf717242ddc1556d3f3ccbfc2f89 [formerly 6856716adb]]
Former-commit-id: 88b556096518c23d2db8a26c9c448400172d30b7 [formerly 9b9d9539c8ebf8c4ff5a2288ca04ade387a84351]
Former-commit-id: 625b4ab5af200087a85db6e1402c9bc4a0295d83
2017-12-04 16:10:27 +00:00
Henrique Dias 172bbb1828 Version 1.3.11
Former-commit-id: 4a93c06ece303164400a26def8508b415ce8c906 [formerly cb7e56f73da93ce59e63b74de61a384d49335991] [formerly ee5c57615221b3b91660df2146845b413c972975 [formerly 506570530f]]
Former-commit-id: 3b120ed2a0b36e84dc258862663421240866601a [formerly 641b5b688bb500b711cc4b14f4eec48c10c23d6c]
Former-commit-id: 965b1316ab20445fda0d3b64c45229c98496534f
2017-12-04 16:10:15 +00:00
Henrique Dias 410aa5d9da Set correct indentation
Former-commit-id: 0088ec263439da995dd6f42d0e2ad9b0b42c7c98 [formerly c5232aa97864225d432f04d5d83e0215edff18c9] [formerly d038a6f63e089003de83bbb054d76d3953cab33b [formerly 0dac28fbb0]]
Former-commit-id: 44d9d716ddd2eed8fcfa7bcb92f5f46475ab0afc [formerly 9f9d3a6c0bec92f75b6ad6932e6b1eebb9ddefdf]
Former-commit-id: 9e2919024770313c9ed94c1bc9060f2e45871f77
2017-12-04 16:08:24 +00:00
Iñigo 736cef7127 Add Spanish translation (#291)
* Add Spanish

* Add Spanish


Former-commit-id: 52479d923ca4a91d3cd8b627246de8b70c3a5152 [formerly 53bb5278073dd5abdd96d04b9423811ae78637e9] [formerly fe82800194e49c99d278413e79f8c007bf4dfab8 [formerly 78c68ce2f3]]
Former-commit-id: e1314f8d7a5ae78cfbd3727339016d6b322c4aa5 [formerly a0a6d84f266f512c5f9eaa9c92d0f7b57f447367]
Former-commit-id: 6a557d9ab0e82332b201534276e1c032e682714e
2017-12-04 15:49:56 +00:00
Henrique Dias f4ceb7163e Update file.go
Former-commit-id: 713c809c9314b3db947fd33e5fae69bbe0058865 [formerly 4dd6de8cddb93b1553a6d768db426ec3eb1f0b53] [formerly c5033b6ff486b786afd6b75e41ff35c3a8c69e47 [formerly a34422de57]]
Former-commit-id: 1028ebd6474ce1e257ef1f81c9f805c74f64994e [formerly 5f2db5f3060c457ff2af82e0e0be89a25d1cbc4d]
Former-commit-id: 609be343302e0a49190ef6f37ee677116e9baa04
2017-11-30 18:22:16 +00:00
Henrique Dias 7bd4fbc0cb Add Badge and Update Deps
Former-commit-id: 8d3cf568a2f901ec8370a5f7aaaf0aae95425353 [formerly af950ac5e3ddc57c599b62937ed8872bb653f426] [formerly 3b9e1a7c8d9ea35b10eec9a82fad1221830ae5b6 [formerly 1f62c26e81]]
Former-commit-id: 31e0e2de46b44cb85f4423be7064f4d6d9552ef9 [formerly 431ed7d219cfec8b98fbe4423ee66c23e7849b74]
Former-commit-id: a851d7f44f290616d042542edbcadf35f856d73a
2017-11-21 19:17:19 +00:00
Henrique Dias 2ed4658369 Update assets
Former-commit-id: 921770105b3b607f2681112d204130a0655248b9 [formerly cb7d152432980c20f5d5cda743992b6a0684ed0e] [formerly e63e514df0f701934dad6744d79c7b7746c372e8 [formerly ec30606dcc]]
Former-commit-id: 725b6820ac82bfab769306f1fc92acb3f690f366 [formerly 56b2b925d513261885fbdc7cc0d3662f9576d56a]
Former-commit-id: aeaeb164f0c2c7579778ae1bd587806b69868c3c
2017-11-19 11:22:54 +00:00
Henrique Dias 735312982c Update Dependencies
Former-commit-id: 76bedea1c27cf4e87cb9255786de3d73e6abd29e [formerly 8c21d31b2c5a22d96f3a7a9042dcd58077d7dcef] [formerly b335f0ac2e16fdc8042255ef1d0dbb421c4b09d4 [formerly 02b2bb6215]]
Former-commit-id: dbc8cfd8755959d7d7f40976c2641969e08cdb5a [formerly 29b617fd9461a72b0d0ab729a6a1d7247c5ec74e]
Former-commit-id: 23a7b57755f5fea3e0d62450e6466267227fb865
2017-11-19 11:05:05 +00:00
Henrique Dias 4ddb3f5a34 Improve file extension checking performance
Former-commit-id: 30aaff2f0bee9dd9743d4acd6a68aafc90addef9 [formerly 967fc0b47a5fb0d1b5e79a8b926f4fdd61b8477a] [formerly 5eaecd069cd3de9ebb5e3e6d0feb04844fc473c3 [formerly c76c69c256]]
Former-commit-id: 11d0c1ae276859eccb7949d96dedbd0cd3204ffd [formerly 63de350fea7eb0a6d621b029c9c8866866462d31]
Former-commit-id: 422edd1298a7ba86dd958dcc7a513a0a3e6d83a3
2017-11-15 21:03:50 +00:00
Henrique Dias c947228ac4 Whitelist yml and tml extensions
Former-commit-id: aed7606c12fa705954e650ba948d891329d66dff [formerly efd4415075000737c5dc7bb5a38a78605989e05c] [formerly 5656bb7bc09285720f094b3054c70994b51aa658 [formerly 8f5eaee952]]
Former-commit-id: 9d774b10c85ae9456a324030f9b7b0c06e600db4 [formerly 9c7919b5e027d829364fcb658b6b9579caad51a3]
Former-commit-id: 3196b0ea7f550057e411410e083a8c4f8e748240
2017-11-15 20:38:30 +00:00
Henrique Dias 505af7d9d7 Update auth.go
Former-commit-id: e2a955c377393341ac3ccf08d2fba9e3359e72b0 [formerly aaf783e1c2aec83c5e0a4a016f98b9b17ece09c2] [formerly a3be55338e9d4403ae3266cba5ac2451aff507fc [formerly 1f946bd94e]]
Former-commit-id: 53e720dcdc8745aa5de632a5d2676ea1c0648445 [formerly 7069f0e163c34e1890d344066ba570dde674a414]
Former-commit-id: 2aee9f0b0ba181bde240bdcf098f3914c3f512b0
2017-11-15 09:09:09 +00:00
Henrique Dias 2c13ac4ac1 Remove fmt.println from code
Former-commit-id: 6bdb55590fb58a6edc64a3ca946a13ee35f3ad60 [formerly 60939e561228d83df8c588942f6773e5cb508fc6] [formerly 0764f9f8de88d1adbb668c48dfee17c43d59b5f4 [formerly d3eafec864]]
Former-commit-id: c09a0c84177f6f8053269cf6396b64cc17bf257c [formerly fc5b21e08ca0f2ebab30991a4c7f2ee0eb0d6a40]
Former-commit-id: cb8338d463ec7014de5e2cb09009ac872ade06b8
2017-11-15 08:59:23 +00:00
Henrique Dias b5fbab2072 [ci skip] auto: setting untracked version
Former-commit-id: a15ba929646b6a49aad1c0a1f447c8417490bd82 [formerly 2140e8ebdbe698e68fa7cb80c879749af21a67ac] [formerly 8c2f7dc49612073e633affb68f437b8c2241b609 [formerly 927a1aea6c]]
Former-commit-id: a1daf8141f756ad4352bd26697d073c2468b1163 [formerly da39c59b7c0187c61b80fa4fb4867795f2b60b17]
Former-commit-id: 7b1fc0b045cd1e1d59fb49bb9b6db819e670fd94
2017-11-14 07:25:09 +00:00
Henrique Dias 005b184d59 Version 1.3.10
Former-commit-id: f9c2dd8d2b77b8d5e887562032777a108cc75c31 [formerly 659e0be49e23fed2271489b14db6fc51a25b7e0d] [formerly 57d196da7a6f46d3accb40ed471adbed67ebe5bf [formerly 0c657c3019]]
Former-commit-id: 40ae9fb71bcc1989f00c20cf05b54ebf3db3f0ff [formerly a51a873c5262d30736274109f7d779e5cc45e423]
Former-commit-id: 45946d34eca1ae4198ea113bc886d43f12322a65
2017-11-14 07:24:57 +00:00
Henrique Dias 372bd813d9 Merge branch 'master' of https://github.com/hacdias/filemanager
Former-commit-id: 7b068c22b37003acf5dd60806a828ed9f828fc95 [formerly 10918882c8f3150b57a5cd142e7443150caff282] [formerly be0e1f9cd900feead555280dbff11e024055cd7f [formerly b8fdb487d9]]
Former-commit-id: cf6f5b27bb327bfb00d01e249f8db457543407f6 [formerly e5e0ceee98ceadd4061f2443b6c4a53249e838a4]
Former-commit-id: 2187a74e21e29e8cf5b13bcca6724ced2aae47c9
2017-11-14 07:23:08 +00:00
OopsMonk 52599314b0 fix symbolic links issue on Linux. (#281)
Former-commit-id: 84a15d1ff70cbdcb91aaa7a40cb86604f036e349 [formerly 60e5a702fd98686193c5ee7bfb66698453de05ae] [formerly b863bd64cfc4e953c005f71ccc3fd936456b8a5e [formerly d269e239bf]]
Former-commit-id: 24b6c15a5c3a54a866106eff843bea0d7401cf15 [formerly 6b6c3036a90776bb16d93a4b7e864e4f433f5531]
Former-commit-id: 5b7aacabf2ceb1a5303fd303d5132bbdd711362f
2017-11-14 07:21:26 +00:00
Henrique Dias f61e71e44f Update Dockerfile
Former-commit-id: 657785108f5de159eebb842d402ef98d512f96f7 [formerly addc47263d93e2895204151aab13539307533430] [formerly 91081acc00772f9fba15eec3362d94cbf9513145 [formerly 6f39464130]]
Former-commit-id: 54dc3af451a3bb3e1fdd114b88e0dac7c1a8802e [formerly 49d5afc124292884245cacdd951c5f9670cb552a]
Former-commit-id: f331a53412d10708e0ac19db04d94f0b99e63b40
2017-11-11 07:08:12 +00:00
Henrique Dias e5265b6632 Update Dockerfile
Former-commit-id: 2b02497070be694a121f6ae8f7567ee521d2039f [formerly 6c301dfe46f6e1ebb9d92fa5251c23aa6a5c9f64] [formerly befd05696772a79c19330a4d3f0b4651c35802a4 [formerly 44d68a4868]]
Former-commit-id: 9f8661bb18ac3230d4f65fc4c5c8ccf31122daf6 [formerly 683bb4fdbfc8c95f1e69382322a8f1132c3de457]
Former-commit-id: a7af592420975962f5556ba47801f9cd4f009fcc
2017-11-11 07:06:23 +00:00
Henrique Dias 003f361956 Add /tmp folder #274
Former-commit-id: 938bde70202335858fe569949b65c04e7ffc4146 [formerly 37c4c3ac2743f7be8e4a8eec92565e8c3b4303e2] [formerly 74b276e4616904471b27d3478b3a58c2ba09fe42 [formerly 00da35b91d]]
Former-commit-id: 7be322ae95ea19b352cb4799b8927353b69286f5 [formerly c662fbd6eb0dc63624daae038897bcede3f28ed7]
Former-commit-id: c8ef89c3ea2239cdf715ad9f1555c1f28167e4f2
2017-11-10 22:29:15 +00:00
Davor Kapsa cc8369d83e travis: update go version (#276)
Former-commit-id: cb189a867e029cd6dd57e6abcd70f74949e770a7 [formerly 92b3401b09d16673356c16321a1fd2938a8002fe] [formerly 5118e5894f9dec2ae5ae337e300c033f763be0fe [formerly 0be294a502]]
Former-commit-id: 516ccab1cfd5c713eb79a5ab4907e13d1bda98e2 [formerly 586b5951af545993c9ee4bff07625bfc26a3e439]
Former-commit-id: 77e2897c8571704617bd721e46a50a46f6f9acd9
2017-11-09 20:58:34 +00:00
Henrique Dias aeb583a0bc Improve readability.
Former-commit-id: 684d5ef09624509fb041e47539dc0a568d1e8ac8 [formerly 3d0b8b2e61c5a60174a1fd8b06f8d1e8a55120d5] [formerly fc6cb1f278dbaa90d7db1c4c96cb3c1cbff06c5f [formerly ac88aab3eb]]
Former-commit-id: 80493535e416cad297aed47e8a8dd018d2fd2346 [formerly 3522c56e45bc8c0e2c89177f96c7f812f6c9a6ef]
Former-commit-id: 3096eb9e8abeee11f2ea447aeacfa681464a1252
2017-11-04 09:23:55 +00:00
pandarong 41f07c64eb fix npm run build error (#272)
Former-commit-id: bb2a5ea8b5949e11629d344c319e4cb0c5d48f0e [formerly c6b89a2ab4c66a1e9f16116906dead677e03a5ec] [formerly eb2a1b5b8840883ee18af987f6b7cf16a9d70075 [formerly 8703094109]]
Former-commit-id: 4208e88d8263785a5cc5bacd1127ce8460df960a [formerly 7d45d39e5913b04ca12998ce622188f3c4b975f9]
Former-commit-id: 6020a51629bbdd71ddc131c8ab9c6b0db5eb0f56
2017-11-02 21:21:16 +00:00
Henrique Dias 98588a66a7 Remove unused commentary
Former-commit-id: 6c214b9e0e640036cb012e1000c6a7506a48fa5f [formerly ba4b53ecb41176513699bc883be694b1be3d586b] [formerly bf971d7279fcdb0a734f0f515edd02c405ad86bc [formerly 45a6fd563f]]
Former-commit-id: c50f55e67204964a33fd324b4c948b164420e1df [formerly c00391a35a2aa77a4f5ca2aa5325ac763da263be]
Former-commit-id: 4548263d313aae263f97d2786112a65dd7e056c2
2017-11-02 09:57:47 +00:00
Henrique Dias 49f32f876d [ci skip] auto: setting untracked version
Former-commit-id: ab889938f319abc51aa1eab32ba12d4773b82e23 [formerly 56bf07aeec065255b34e9de3024a1116abd90e1d] [formerly 51aa29d909009fca0b83c71e8bf106ae403091b0 [formerly 2ebc7708a7]]
Former-commit-id: 22662250fd4e0e82ab7dda0f201823c68d437398 [formerly 7c4865e1c894d538d0627413454145d33df6b57e]
Former-commit-id: b3313117d95195075241fd082380de05a582f958
2017-10-31 19:20:50 +00:00
Henrique Dias aeb0f37e20 Version 1.3.9
Former-commit-id: 9c7d15644bcab9e3babc8d645615e50d99187871 [formerly f0a0bf08c328b801cc6ed5add830732c99f92047] [formerly 250bc983264deb841b2115a03610b8e6f473f1ca [formerly b903356b94]]
Former-commit-id: 56bb31f4e44ad39a65f1d1eaa0a8e493287fad7f [formerly e120e69e05cc67f377a83f19f4106b7be945780f]
Former-commit-id: 36fb7783992200295b2f9811b97c2312977023a4
2017-10-31 19:20:36 +00:00
Henrique Dias 59a0daa293 Fix ViewMode related bugs:
- The user will no longer lost their 'ViewMode' option after being updated in the settings.
- The console will not output errors due tot he scroll function when Mosaic mode is on.


Former-commit-id: 97aa6abdc8b864dc7a55dbf03a2e58895ea7613f [formerly ff9e6ff0898f32bd106b644b2e9002b5de45281c] [formerly 556cc12bd5ff1d91776c81f48dd1dceb8bb627b4 [formerly 51104c5ee7]]
Former-commit-id: dd63b2b818a7bd4960a7243866d6b2829f4c03a8 [formerly 45855d70eaa9a2b060d3a89cb70388040ea8e6d9]
Former-commit-id: 6e0ebf10d7fe3e2c234abc9c0ffd447cfbdd7455
2017-10-31 18:23:31 +00:00
Henrique Dias c716d126eb [ci skip] auto: setting untracked version
Former-commit-id: 88d8cc322b27fc1165a53779e7226db8fd6f90ab [formerly 7f0e5a193dba73cb133bd4d72cd0d81bdc354736] [formerly da79e8c40409e5b5995749556155cccd8a0325cd [formerly cc5f3ac1dd]]
Former-commit-id: 47f0176b53e3a5b2eb402eba29a07f51b7d0c7a7 [formerly c1d2d78eb8827f3386080b0309e6cef66bfed9b1]
Former-commit-id: 64c1ec091ce58eb6b38b0281b7a728b2ca07fe1a
2017-10-30 16:24:48 +00:00
Henrique Dias 5dc210c000 Version 1.3.8
Former-commit-id: f69ca91fc441142e07dfe8dd5cb92c419a1cd44a [formerly 679e456d16586b10e00c5aceb1cea75eb62e10dc] [formerly 50f4889e1eb2797c0c899af48acb1305fa33b671 [formerly 1e700ef167]]
Former-commit-id: ba0df3d330275d2fa1a5e02c608051f3f1422124 [formerly 77d49e18d479776cf670eb008878364fd4c7292a]
Former-commit-id: 2bfe39e4b6371996559557eeb00a15a895e4321a
2017-10-30 16:24:27 +00:00
Henrique Dias 3bb3fdb956 GOFMT
Former-commit-id: bbc11e551ed79fc41af61d67bfb9a882dfc8e655 [formerly 4ef42ee3251bdf613b7e24b50692629fbf8965ed] [formerly 10abcd7f0e34753069a80a683df94084f03fdb4b [formerly 1d4cbd622c]]
Former-commit-id: 7ac0c18ad61cd491f22b906e1efd87892d729cb2 [formerly b45c7e312058490ae90c8162e6cc1264613a9126]
Former-commit-id: 1c7e8ebd2f1b1dc5bd25df9f30a77c9b73ccad4d
2017-10-30 15:47:59 +00:00
Henrique Dias b96a4a63c0 whitelist .htaccess to be edited; close #258
Former-commit-id: 1114b97a9b0cf236d96ce283bbf8d482cc85170f [formerly 6419fbd11f28ce1dc5ebdfcde0d34adabd016052] [formerly c1135ecdb720db11f4e1182c5456c484f5f58ed1 [formerly 72ee240ce3]]
Former-commit-id: 09fc62ffc432b822ea495b19bc5daafbd3ed8912 [formerly c1eb12242b30a1d90299427c387e0b2a25ce0f24]
Former-commit-id: e097526998a0d9c6382bd9d97af3bf161e8fcd0c
2017-10-30 15:36:40 +00:00
Henrique Dias 3d54b2bd90 fix #260
Former-commit-id: 0d8742754bb756ad3a83599850dae5f477282430 [formerly 5cb7d75b695d8400fc2af87edd551d6450e7365f] [formerly a6a814c40a5ff4f195c4ab470d4fccc92bd8c1c8 [formerly 99c8c92c6c]]
Former-commit-id: 45eba5ff05f8e64fbf33d9d670e19a0cf4880656 [formerly 88dc856045b9d51596f36ce387b1c4f3e85a7d3c]
Former-commit-id: 1eadaef460060da8ae71df3c66f242c844992725
2017-10-30 15:24:06 +00:00
Henrique Dias 95d43a344c [ci skip] auto: setting untracked version
Former-commit-id: 4f9b713ad6cd1f90e7569c9eb083b2740b2f6a60 [formerly ffa130fe00c78b2431ceb16bf1e18345a98826a3] [formerly 5aecd62f16317a53810677fc49a40af297d6bd91 [formerly f4f7147717]]
Former-commit-id: cd5e3739e28213efeaa59cb1fe68b25b35068d46 [formerly 10edbd82feb4d35296c1edf1ab977860b7504470]
Former-commit-id: 4067d711f14eb26232204a89a6263b989ee0494f
2017-10-29 13:33:42 +00:00
Henrique Dias 1077d5cd6b Version 1.3.7
Former-commit-id: c76a13cb8d0bf0a360c63c18cbfac378f8888425 [formerly e58788aa3de9e8fb54894a72bdd567c3846bf943] [formerly 77cd4f2feb8ef317cfeeff84d85ffb7eff4d899f [formerly 3cddb26572]]
Former-commit-id: af62db2d663287f662990539be428ae84f1974cf [formerly eaae8679ea0b9daeeba5cd29dd981d60d66e6c1e]
Former-commit-id: 886b61f0af26b85625cf7092ce5e7d4c5e44ed59
2017-10-29 13:33:31 +00:00
Henrique Dias 57cc174b3d [ci skip] auto: setting untracked version
Former-commit-id: ed15673452af4cd3ccf1a1f316efd6a733e6bd43 [formerly 0a9637c464bbae4c5c351f7e6f65dd24197a9968] [formerly e7388628831533d4476ba69c8d0cfac3ae18be14 [formerly 08bfeea103]]
Former-commit-id: 412e1b3bfcdef0037292b7ab3f5a5eeb4e9523f3 [formerly 2ca352a5af95eedadc91ea207833bdb670f1481a]
Former-commit-id: b359f15e105d55a9761aa9bf43c331bad113d561
2017-10-29 13:32:10 +00:00
Henrique Dias cf61baa273 Version 1.3.4
Former-commit-id: 6d70d81a1967f171a41cecbdad8664fc65d1111a [formerly e273e78de0030dcb2eec730a00f248f1e8dbd9f7] [formerly 37b0ede2385e153153a854112ffab1065bcdd44d [formerly f89b86939e]]
Former-commit-id: 84fc2f9742c2e0011254ee762faf6f087986c6fa [formerly f22c175e96173bf25aa08067533937041152fdb3]
Former-commit-id: 32981c2a1211608d2d5c059264aa5eb434099400
2017-10-29 13:32:02 +00:00
Henrique Dias 2d5cd2d1d3 Fix Travis
Former-commit-id: 435a3bebf2ac1bbae2f1ed94d596956227141358 [formerly 46e69c9783cb07a9ca6b7bd428a1ab54cff2005b] [formerly 36ed5ea293a4d39d161bffed5b18a1d7f1a0d5c1 [formerly 3434090a7c]]
Former-commit-id: d5bc8f96b631af8d440438c1a089e710ae09a47a [formerly f447c0c7031af05129bf7c45b6c87168a365738d]
Former-commit-id: 627ac93b54b236e20d552486d125cef813eaf9e5
2017-10-29 13:12:54 +00:00
Henrique Dias 9472aad877 Fix #262 #266
Former-commit-id: 0acca700ed0a2ced8bf6b5b019aa6ff4774b8ea8 [formerly 0ff934dd107e56f4b7349f1363dfb1b6cbbc7916] [formerly f8b60e60087d754b46ca4dad49a151bec299febd [formerly ae1702c4e2]]
Former-commit-id: 824abe0c6cb5d32c061e8efd4a7f1d3354b3dbfe [formerly 655809d5c670c9de352c473de1fe08303a4c5506]
Former-commit-id: 6ca6f383602241b8a50c13cce5b066cd5f2cf990
2017-10-29 13:07:48 +00:00
Henrique Dias dd0f3ef144 [ci skip] auto: setting untracked version
Former-commit-id: 7abc56816c4aee81b91bccce14251ed71b02ac0e [formerly 5d1acb37bf487778cb740299a0f25846f49f0ad4] [formerly b97420d631839e9a7a74961403113986d493638f [formerly 26e1e44d60]]
Former-commit-id: c196dfa47127e87efcec64c4cda2e7013e5cdc4d [formerly 5647ffd57b1e049a3e11f6ec37fd2344abfc591a]
Former-commit-id: 3cc55fc8d38f553f0405972dd39da2b0bbb52740
2017-10-15 08:28:41 +01:00
Henrique Dias 44e492160b Version 1.3.6
Former-commit-id: 28c72f8ee9f7cf548dd5f2c2cc564b31ba13ada8 [formerly cd087b92826cb418d4d17ac26a8cfeb408a54919] [formerly bf241b663bdcfc00737f5bb429ef4a669c1a6c2b [formerly 3e9c3ed912]]
Former-commit-id: 2b74d089de06c4fa5d4933e0c11ff8b1afcd2f46 [formerly 9ac185e1ea76c1beec895f6c51109fd137547e60]
Former-commit-id: a27b4e08dc726769b4731abb5865d2e908387774
2017-10-15 08:28:28 +01:00
Henrique Dias 0137b03887 Fix Portuguese language reference and DRY
Former-commit-id: 3954a92011b3c1699236b32373688ce80f720179 [formerly 67bca685bac4e893f836b21f85f4369444f3e708] [formerly 9817c40128b6660be30ea48b5317d07d21b84ca0 [formerly 77df2034f5]]
Former-commit-id: 2681c1f068e8094f0f9593a4c21fc6f84d8a6353 [formerly 26986c2af1193a31e3abec64b829cb29aa97011c]
Former-commit-id: c2813afc8de2e22ff9f3de0f55fbb26b3b954619
2017-10-15 08:26:22 +01:00
Equim 92c9b134c3 i18n: auto detect locale from browser (#253)
* i18n: detect locale from browser

* fix regex for locale matching

* remove debug code


Former-commit-id: 17e550af54ff213d5e2b60f83b374cd962052b5b [formerly 62fb089a7a45092b3818135dd68fac218067ef67] [formerly 733c463d2332307dafd40da5e77c6c9558239283 [formerly 4b84492a11]]
Former-commit-id: 2e117c9e060ac5cd9f80a0de2a4582eef74df6b8 [formerly 5fb6fc086bb2ebeb49a578042240a26a7879a4b8]
Former-commit-id: 7692a4fbb2889acbd7c6ee09ccd01a234998616a
2017-10-15 08:12:40 +01:00
Geno 1737702c7c typo in logging (#255)
Former-commit-id: fd0b7d6887e14b77ab97b323f4e8d1bb51ecda23 [formerly fb4fab794ca27e8f77e0dec71483cec51e4a8fce] [formerly df9da803a4301a8b1e5ed93f1f3fd121b8a3bf49 [formerly b93aed98b1]]
Former-commit-id: d17f1d4be63659781b4254b9ec36737d2f794008 [formerly 27cc8277db82e0ae123d2b1ffe95bed297c6095d]
Former-commit-id: 8137dd86f6f3caef4636416f6370bd686773df3a
2017-10-15 08:06:53 +01:00
Equim ece52ecf7c Don't expose error (#254)
* share: remove share link when it has been moved

* http: don't expose error


Former-commit-id: c7f1d28117c770006132c75e5950d73aa9d87a12 [formerly f29a0260622644a79ff401263ba4efb143dea23a] [formerly fdd741679f09c72a121076e0a62a0d2a6eafefe4 [formerly 538b99ee77]]
Former-commit-id: 5ec9b62254b0cbc233673e7e196a5a4ece53a3f4 [formerly d26d45418267d11a1a211ba90a8b68b5b9fad714]
Former-commit-id: 57333d74cbac7088c6c527a4fe757af427dedea8
2017-10-14 10:07:01 +01:00
Henrique Dias a7d6a72718 Build Assets
Former-commit-id: aa40a922e2dbd104bed161fd6564343c64f2fb34 [formerly 16a73ea595678b00ab9690338015746a8f5e5f02] [formerly cf4ef0a6fe12d211a1e905047a3a2cdba12e9c84 [formerly 7f7d536c5e]]
Former-commit-id: cb509a9c9961b4c8d2c6f8f67b37f30b2732eef8 [formerly f7465805945f0c08312c31bb067e3d9546d883bd]
Former-commit-id: cab59e68c27cd7c180a8964889c759efbbff7616
2017-10-09 08:28:49 +01:00
Henrique Dias 3fa9286238 ViewMode constants; default view modes
Former-commit-id: d51ad4b2671c76c3a493daf93fd4fb94a76826ed [formerly 576cfa8ebe9c66c9dbc1c8f79ab8ba7fecbe8845] [formerly 0969e87e3c070763d6e58f1d09f815b772814e4d [formerly 8633e9677b]]
Former-commit-id: 4dad4cf6bb3858122cd4d4c6a574e691788ef9ae [formerly 0b356f24a005c8886bd2165884e363f277456d8f]
Former-commit-id: cadb7589dad74e9bdb47bf3664f98ac672940fe5
2017-10-09 08:26:05 +01:00
Henrique Dias ad5ff4cfe0 Close #248
Former-commit-id: af79c3515a4a6a6d5b72da1193b888b7cd03b286 [formerly bb0e1f8e966e238feacf3013eccf9b5e711f7061] [formerly 0f38f0df6f964f88310fde0e59f6b3a79b9c103c [formerly 90c2de44c3]]
Former-commit-id: ac03a781bce6530b0512b014c38e8d8c77d8ec01 [formerly 5469e2322432fd1991229f909e69d70966fe8f9e]
Former-commit-id: d17517418e68671237ad845df93b62840038d8d7
2017-10-09 08:14:17 +01:00
Henrique Dias 9aee1ebd2a [ci skip] auto: setting untracked version
Former-commit-id: 89e071320621710d9f24bf4dde8827f159c64d31 [formerly 6d44fe3f3e56b82762bacce64c1682262d4d1a90] [formerly 8e0f92b3205067d4644bf2febdc160d84696a37a [formerly 769bdad12a]]
Former-commit-id: 9e00c24fdca0e1ebe71aceb84624ea0b9fb85afa [formerly a04f2e37805000e19c7dcdb7daafe2396cb8269e]
Former-commit-id: 827a695fce5d7731e58052dbbf4f5bd0e3d6f5c7
2017-10-08 23:48:24 +01:00
Henrique Dias f8ed1b41d6 Version 1.3.5
Former-commit-id: e064282645a50d6eeeb293577da260c586d4bb45 [formerly 2a9ac206ab79a8f115ed25a3afb595663f18fcb4] [formerly 2ea943c96653266a9533d9e95776955821706ea4 [formerly dd59e3c62b]]
Former-commit-id: 4ec9b9738ee48943830b9045ae40e7c305010bf3 [formerly 7748b70d5109e788ad146b466b3430a822037570]
Former-commit-id: 0981b89cb1d7bc0da43d47ff8900eb1c67301982
2017-10-08 23:47:56 +01:00
Equim bb9b0dfd2b i18n: Fix typo (#250)
Former-commit-id: c27f105374233923e7691327f7e6f6b9a52077ce [formerly c34be33394c74229a1029edf21d9c83d5c9dd2a9] [formerly 3f5bd5a8457310d034b7fe761beb915caf35ae65 [formerly f0609757f7]]
Former-commit-id: 82d69494e5c421a245ceff0df033529ef488e419 [formerly 910438160faa1e853c91252845443514a066b3f9]
Former-commit-id: 01874c63eb13dc39471c3c2cd06a9b2e99394f46
2017-10-08 23:42:51 +01:00
Henrique Dias cc2ce884fc [ci skip] auto: setting untracked version
Former-commit-id: d68d28c1e0000f0308b1e84a912f00b8a91f7fbf [formerly 15e0131f25aa82b8bb340e2d58d09c35a4a91754] [formerly 282b0c8d07c82de35fb87927c9da29182efaceff [formerly 9d27c38097]]
Former-commit-id: 9cc06bb0c230f2acac72fc6b4d00e4d8446a5f88 [formerly 5634a96f7b01d6f08a6a46f24dab7a3f03668fd6]
Former-commit-id: c9629add111d645e386461016771ebd1b14b98b5
2017-09-11 09:49:54 +01:00
Henrique Dias e7e7679002 Version 1.3.4
Former-commit-id: f7727c37ed227e062a34de8b67a5bdeb95caab27 [formerly 9202314bd4a0a0288e3b95c179aaeaaf38997f7f] [formerly c57ba427c5e85f4aff34ccc5476d2c374c93a6d4 [formerly d41715c0c2]]
Former-commit-id: 7aa4c2ee81fa7dd451fef64198335f7a6ee78173 [formerly 4d1553375b1a3c86e9f8de45ef658ff8fe64aba4]
Former-commit-id: 85340361dc98b2ce775d1c41291ff3af165f99ee
2017-09-11 09:49:42 +01:00
Henrique Dias 9a829fd594 fix #241
Former-commit-id: 8578bf0b790ea4b8b5c5da4876fbccd2ead42d3c [formerly b67d35502fb0c9a3c57226b812dd2b869c5fcae1] [formerly 506eb279c974a86b232be57f87a11ec283b3b742 [formerly f658394dd7]]
Former-commit-id: e9565ce6a4ef229943f132fb6e05c5ec853447ed [formerly d0b2c24f6df2a74c403ded829cfd0746659e7d5f]
Former-commit-id: 2f4afe92081915821dd5b2fe745faf1492bdcabf
2017-09-11 09:46:17 +01:00
Henrique Dias 624d61930c Add ReCaptcha to main
Former-commit-id: 06bc7079f6d939e5531a3d9600052f979adac86d [formerly e6d8fa4418ccfa8f0163530647099432a936d4ee] [formerly dbd0cfc3770972afdf7aae8121d3af50681d55eb [formerly 879ad7b518]]
Former-commit-id: e6706456ba300c501ae66664596b5709e45d87df [formerly 98238eb61781a545ee4bac512a4f02257f4cf165]
Former-commit-id: 30bfb2b201ecbbd1ac2cf58cbadbe82daea793cb
2017-09-11 09:23:59 +01:00
Henrique Dias ee30e7711f implement recaptcha on login
Former-commit-id: d7495b6fff4a99a8d155a3be87b15535a74a1305 [formerly 5b3a544447cca0d1cdcb6c87ca94f450a5493506] [formerly b4de1a4f5d4dd295c98366ede2b87bf2cb7918f9 [formerly 002f8066c7]]
Former-commit-id: c0e5d38111a99f8e3e71fb5db86e19b7ba44ec48 [formerly 1b5e454263ba64ced95c6d4b51f5f32e66f74758]
Former-commit-id: cfb17a53fc86d0071fba91503502444f5f10a0c7
2017-09-11 09:00:59 +01:00
Henrique Dias 6e5116aa27 [ci skip] auto: setting untracked version
Former-commit-id: 4f0cecd21f2f1fec680773c6242d6ab9687384f3 [formerly 1dec18820a98ad1ffc39eddff12167b4d1564254] [formerly ffdde8ede3a4d934d492224a046b654518cffbe9 [formerly a61329843c]]
Former-commit-id: 865c60a764807ea8d6781ac4bc95a4c8ddd9ef56 [formerly c9799373cf5e9637c78faffb94117c355a3a4f8c]
Former-commit-id: 070a498ca4c9d6da545c9b10d60e0f84e7e56889
2017-09-10 10:14:35 +01:00
45 changed files with 723 additions and 9362 deletions

No files matched your search

+4
View File
@@ -6,3 +6,7 @@ node_modules/
npm-debug.log* npm-debug.log*
yarn-debug.log* yarn-debug.log*
yarn-error.log* yarn-error.log*
.idea
.vscode
package-lock.json
yarn.lock
+8
View File
@@ -8,11 +8,17 @@ build:
- freebsd - freebsd
- netbsd - netbsd
- openbsd - openbsd
- dragonfly
- solaris
goarch: goarch:
- amd64 - amd64
- 386 - 386
- arm - arm
- arm64 - arm64
- mips
- mips64
- mipsle
- mips64le
ignore: ignore:
- goos: openbsd - goos: openbsd
goarch: arm goarch: arm
@@ -20,6 +26,8 @@ build:
- goos: freebsd - goos: freebsd
goarch: arm goarch: arm
goarm: 6 goarm: 6
- goos: linux
goarch: arm64
archive: archive:
name_template: "{{.Os}}-{{.Arch}}-{{ .ProjectName }}" name_template: "{{.Os}}-{{.Arch}}-{{ .ProjectName }}"
+2 -2
View File
@@ -1,6 +1,6 @@
language: go language: go
go: 1.8.3 go: 1.x
env: env:
- "PATH=/home/travis/gopath/bin:$PATH" - "PATH=/home/travis/gopath/bin:$PATH"
@@ -15,7 +15,7 @@ install:
- go get github.com/tsenart/deadcode - go get github.com/tsenart/deadcode
script: script:
- gometalinter --disable-all -E vet -E gofmt -E misspell -E ineffassign -E goimports -E deadcode --exclude="rice-box.go" --tests ./... - gometalinter --disable-all -E gofmt -E misspell -E ineffassign -E goimports -E deadcode --exclude="rice-box.go" --tests ./...
- go test ./... -timeout 30s - go test ./... -timeout 30s
after_success: after_success:
+1 -1
View File
@@ -2,7 +2,7 @@
If you want to contribute or want to build the code from source, you will need to have the most recent version of Go and, if you want to change the static assets (JS, CSS, ...), Node.js installed on your computer. To start developing, you just need to do the following: If you want to contribute or want to build the code from source, you will need to have the most recent version of Go and, if you want to change the static assets (JS, CSS, ...), Node.js installed on your computer. To start developing, you just need to do the following:
1. `go get github.com/hacdias/filemanager` 1. `go get github.com/hacdias/filemanager/cmd/filemanager`
2. `cd $GOPATH/src/github.com/hacdias/filemanager` 2. `cd $GOPATH/src/github.com/hacdias/filemanager`
3. `npm install` 3. `npm install`
4. `npm run dev` - regenerates the static assets automatically 4. `npm run dev` - regenerates the static assets automatically
+1
View File
@@ -13,6 +13,7 @@ RUN mv filemanager /go/bin/filemanager
FROM scratch FROM scratch
COPY --from=0 /go/bin/filemanager /filemanager COPY --from=0 /go/bin/filemanager /filemanager
VOLUME /tmp
VOLUME /srv VOLUME /srv
EXPOSE 80 EXPOSE 80
+1
View File
@@ -5,6 +5,7 @@
[![Build](https://img.shields.io/travis/hacdias/filemanager.svg?style=flat-square)](https://travis-ci.org/hacdias/filemanager) [![Build](https://img.shields.io/travis/hacdias/filemanager.svg?style=flat-square)](https://travis-ci.org/hacdias/filemanager)
[![Go Report Card](https://goreportcard.com/badge/github.com/hacdias/filemanager?style=flat-square)](https://goreportcard.com/report/hacdias/filemanager) [![Go Report Card](https://goreportcard.com/badge/github.com/hacdias/filemanager?style=flat-square)](https://goreportcard.com/report/hacdias/filemanager)
[![Documentation](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square)](http://godoc.org/github.com/hacdias/filemanager) [![Documentation](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square)](http://godoc.org/github.com/hacdias/filemanager)
[![Version](https://img.shields.io/github/release/hacdias/filemanager.svg?style=flat-square)](https://github.com/hacdias/filemanager/releases/latest)
filemanager 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. filemanager 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.
+5
View File
@@ -8,6 +8,7 @@
<meta name="staticgen" content="{{ .StaticGen }}"> <meta name="staticgen" content="{{ .StaticGen }}">
<meta name="noauth" content="{{ .NoAuth }}"> <meta name="noauth" content="{{ .NoAuth }}">
<meta name="version" content="{{ .Version }}"> <meta name="version" content="{{ .Version }}">
<meta name="recaptcha" content="{{ .ReCaptchaKey }}">
<title>File Manager</title> <title>File Manager</title>
<link rel="icon" type="image/png" sizes="32x32" href="{{ .BaseURL }}/static/img/icons/favicon-32x32.png"> <link rel="icon" type="image/png" sizes="32x32" href="{{ .BaseURL }}/static/img/icons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="{{ .BaseURL }}/static/img/icons/favicon-16x16.png"> <link rel="icon" type="image/png" sizes="16x16" href="{{ .BaseURL }}/static/img/icons/favicon-16x16.png">
@@ -27,6 +28,10 @@
<script>CSS = "{{ .CSS }}"</script> <script>CSS = "{{ .CSS }}"</script>
{{ if .ReCaptcha -}}
<script src='https://www.google.com/recaptcha/api.js?render=explicit'></script>
{{ end }}
<% for (var chunk of webpack.chunks) { <% for (var chunk of webpack.chunks) {
for (var file of chunk.files) { for (var file of chunk.files) {
if (file.match(/\.(js|css)$/)) { %> if (file.match(/\.(js|css)$/)) { %>
+34 -8
View File
@@ -1,22 +1,48 @@
<template> <template>
<router-view @update:css="updateCSS" @clean:css="cleanCSS"></router-view> <router-view :dependencies="loaded" @update:css="updateCSS" @clean:css="cleanCSS"></router-view>
</template> </template>
<script> <script>
import { mapState } from 'vuex'
export default { export default {
name: 'app', name: 'app',
computed: mapState(['recaptcha']),
data () {
return {
loaded: false
}
},
mounted () { mounted () {
// Remove loading animation. if (this.recaptcha.length === 0) {
let loading = document.getElementById('loading') this.unload()
loading.classList.add('done') return
}
setTimeout(function () { let check = () => {
loading.parentNode.removeChild(loading) if (typeof window.grecaptcha === 'undefined') {
}, 200) setTimeout(check, 100)
return
}
this.updateCSS() this.unload()
}
check()
}, },
methods: { methods: {
unload () {
this.loaded = true
// Remove loading animation.
let loading = document.getElementById('loading')
loading.classList.add('done')
setTimeout(function () {
loading.parentNode.removeChild(loading)
}, 200)
this.updateCSS()
},
updateCSS (global = false) { updateCSS (global = false) {
let css = this.$store.state.css let css = this.$store.state.css
+1
View File
@@ -6,6 +6,7 @@
<option value="ja">{{ $t('languages.ja') }}</option> <option value="ja">{{ $t('languages.ja') }}</option>
<option value="zh-cn">{{ $t('languages.zhCN') }}</option> <option value="zh-cn">{{ $t('languages.zhCN') }}</option>
<option value="zh-tw">{{ $t('languages.zhTW') }}</option> <option value="zh-tw">{{ $t('languages.zhTW') }}</option>
<option value="es">{{ $t('languages.es') }}</option>
</select> </select>
</template> </template>
+4
View File
@@ -196,6 +196,10 @@ export default {
}) })
}, },
paste (event) { paste (event) {
if (event.target.tagName.toLowerCase() === 'input') {
return
}
event.preventDefault() event.preventDefault()
let items = [] let items = []
+15 -3
View File
@@ -119,9 +119,21 @@ export default {
} }
if (event.shiftKey && this.selected.length === 1) { if (event.shiftKey && this.selected.length === 1) {
let fi = (this.index > this.selected[0]) ? this.selected[0] : this.index let fi = 0
let la = (this.index > this.selected[0]) ? this.index : this.selected[0] let la = 0
for (; fi <= la; fi++) this.addSelected(fi)
if (this.index > this.selected[0]) {
fi = this.selected[0] + 1
la = this.index
} else {
fi = this.index
la = this.selected[0] - 1
}
for (; fi <= la; fi++) {
this.addSelected(fi)
}
return return
} }
+1
View File
@@ -16,6 +16,7 @@
:title="$t('buttons.cancel')">{{ $t('buttons.cancel') }}</button> :title="$t('buttons.cancel')">{{ $t('buttons.cancel') }}</button>
<button class="flat" <button class="flat"
@click="copy" @click="copy"
:disabled="$route.path === dest"
:aria-label="$t('buttons.copy')" :aria-label="$t('buttons.copy')"
:title="$t('buttons.copy')">{{ $t('buttons.copy') }}</button> :title="$t('buttons.copy')">{{ $t('buttons.copy') }}</button>
</div> </div>
+1
View File
@@ -15,6 +15,7 @@
:title="$t('buttons.cancel')">{{ $t('buttons.cancel') }}</button> :title="$t('buttons.cancel')">{{ $t('buttons.cancel') }}</button>
<button class="flat" <button class="flat"
@click="move" @click="move"
:disabled="$route.path === dest"
:aria-label="$t('buttons.move')" :aria-label="$t('buttons.move')"
:title="$t('buttons.move')">{{ $t('buttons.move') }}</button> :title="$t('buttons.move')">{{ $t('buttons.move') }}</button>
</div> </div>
@@ -48,6 +48,10 @@ export default {
new (url, type) { new (url, type) {
url = removePrefix(url) url = removePrefix(url)
if (!url.endsWith('.md') && !url.endsWith('.markdown')) {
url += '.markdown'
}
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let request = new window.XMLHttpRequest() let request = new window.XMLHttpRequest()
request.open('POST', `${this.$store.state.baseURL}/api/resource${url}`, true) request.open('POST', `${this.$store.state.baseURL}/api/resource${url}`, true)
+5
View File
@@ -112,6 +112,11 @@ button.flat.cancel {
color: #ccc; color: #ccc;
} }
button.flat[disabled] {
color: #ccc;
cursor: not-allowed;
}
.mobile-only { .mobile-only {
display: none !important; display: none !important;
} }
+8
View File
@@ -29,6 +29,14 @@
width: 90%; width: 90%;
} }
#login.recaptcha form {
min-width: 304px;
}
#login #recaptcha {
margin: .5em 0 0;
}
#login input { #login input {
width: 100%; width: 100%;
width: 100%; width: 100%;
+1
View File
@@ -192,6 +192,7 @@ languages:
ja: 日本語 ja: 日本語
zhCN: 中文 (简体) zhCN: 中文 (简体)
zhTW: 中文 (繁體) zhTW: 中文 (繁體)
es: Español
time: time:
unit: Time Unit unit: Time Unit
seconds: Seconds seconds: Seconds
+202
View File
@@ -0,0 +1,202 @@
permanent: Permanente
buttons:
cancel: Cancelar
close: Cerrar
copy: Copiar
copyFile: Copiar archivo
copyToClipboard: Copiar al portapapeles
create: Crear
delete: Borrar
download: Descargar
info: Info
more: Más
move: Mover
moveFile: Mover archivo
new: Nuevo
next: Siguiente
ok: OK
replace: Reemplazar
previous: Anterior
rename: Renombrar
reportIssue: Reportar problema
save: Guardar
search: Buscar
select: Seleccionar
share: Compartir
publish: Publicar
selectMultiple: Selección múltiple
schedule: Programar
switchView: Cambiar vista
toggleSidebar: Mostrar/Ocultar menú
update: Actualizar
upload: Subir
permalink: Link permanente
success:
linkCopied: ¡Link copiado!
errors:
forbidden: No eres bienvenido aquí.
internal: La verdad es que algo ha ido mal.
notFound: No se puede acceder a este lugar.
files:
folders: Carpetas
files: Archivos
body: Cuerpo
clear: Limpiar
closePreview: Cerrar vista previa
home: Inicio
lastModified: Última modificación
loading: Cargando...
lonely: Uno se siente muy sólo aquí...
metadata: Metadatos
multipleSelectionEnabled: Selección múltiple activada
name: Nombre
size: Tamaño
sortByName: Ordenar por nombre
sortBySize: Ordenar por tamaño
sortByLastModified: Ordenar por última modificación
help:
click: seleccionar archivo o carpeta
ctrl:
click: seleccionar múltiples archivos o carpetas
f: abre la búsqueda
s: guarda un archivo o lo descarga a la carpeta en la que estás
del: elimina los items seleccionados
doubleClick: abre un archivo o carpeta
esc: limpia la selección y/o cierra la ventana
f1: esta información
f2: renombrar archivo
help: Ayuda
login:
password: Contraseña
submit: Iniciar sesión
username: Usuario
wrongCredentials: Usuario y/o contraseña incorrectos
prompts:
copy: Copiar
copyMessage: 'Elige el lugar donde quieres copiar tus archivos:'
currentlyNavigating: 'Actualmente estás en:'
deleteMessageMultiple: ¿Estás seguro que quieres eliminar {count} archivo(s)?
deleteMessageSingle: ¿Estás seguro que quieres eliminar este archivo/carpeta?
deleteTitle: Borrar archivos
displayName: 'Nombre:'
download: Descargar archivos
downloadMessage: Elige el formato de descarga.
error: Algo ha fallado
fileInfo: Información del archivo
filesSelected: "{count} archivos seleccionados."
lastModified: Última modificación
move: Mover
moveMessage: 'Elige una nueva casa para tus archivo(s)/carpeta(s):'
newDir: Nueva carpeta
newDirMessage: Escribe el nombre de la nueva carpeta.
newFile: Nuevo archivo
newFileMessage: Escribe el nombre del nuevo archivo.
numberDirs: Número de carpetas
numberFiles: Número de archivos
replace: Reemplazar
replaceMessage: >
Uno de los archivos ue intentas subir está creando conflicto por su nombre.
¿Quieres cambiar el nombre del ya existente?
rename: Renombrar
renameMessage: Escribe el nuevo nombre para
show: Mostrar
size: Tamaño
schedule: Programar
scheduleMessage: Elige una hora y fecha para programar la publicación de este post.
newArchetype: Crea un nuevo post basado en un arquetipo. Tu archivo será creado en la carpeta de contenido.
settings:
admin: Admin
administrator: Administrador
allowCommands: Ejecutar comandos
allowEdit: Editar, renombrar y borrar archivos o carpetas
allowNew: Crear nuevos archivos y carpetas
allowPublish: Publicar nuevos posts y páginas
avoidChanges: "(dejar en blanco para evitar cambios)"
changePassword: Cambiar contraseña
commands: Comandos
commandsHelp: >
Aquí puedes crear comandos que serán ejecutados en los eventos. Debes
escribir un comando por linea. Si el evento está relacionado con archivos, como
por ejemplo, antes y después de guardar, la variable de entorno "FILE" estará
disponible en la ruta del archivo.
commandsUpdated: ¡Comandos actualizados!
customStylesheet: Modificar hoja de estilos
examples: Ejemplos
globalSettings: Ajustes globales
language: Idioma
lockPassword: Evitar que el usuario cambie la contraseña
newPassword: Tu nueva contraseña
newPasswordConfirm: Confirma tu contraseña
newUser: Nuevo usuario
password: Contraseña
passwordUpdated: ¡Contraseña actualizada!
permissions: Permisos
permissionsHelp: >
Puedes nombrar al usuario como administrador o elegir los permisos
individualmente. Si seleccionas "Administrador", todas las otras opciones
serán activadas automáticamente. La administración de usuarios es un privilegio de administrador.
profileSettings: Ajustes del perfil
ruleExample1: >
previene el acceso a una extensión de archivo (Como .git) en
cada carpeta.
ruleExample2: bloquea el acceso al archivo llamado Caddyfile en la carpeta raíz.
rules: Reglas
rulesHelp1: >
Aquí puedes definir un conjunto de reglas de permisos para este usuario
específico. Los archivos bloqueados no se mostrarán en las listas y no serán accesibles
por el usuario. Puedes utilizar regex y rutas relativas a la raíz del usuario.
rulesHelp2: >
Cada regla va en una línea diferente, y debe comenzar con la palabra clave
{0} or {1}. Entonces, debes escribir {2} si estás usando una expresión regular (REGEX) y
luego la expresión o la ruta.
scope: Raíz
settingsUpdated: ¡Ajustes actualizados!
user: Usuario
userCommands: Comandos
userCommandsHelp: >
Una lista separada por espacios con los comandos permitidos para este usuario.
Ejemplo:
userCreated: ¡Usuario creado!
userDeleted: ¡Usuario eliminado!
userManagement: Administración de usuarios
username: Usuario
users: Usuarios
userUpdated: ¡Usuario actualizado!
sidebar:
help: Ayuda
logout: Cerrar sesión
myFiles: Mis archivos
newFile: Nuevo archivo
newFolder: Nueva carpeta
settings: Ajustes
siteSettings: Ajustes del sitio
hugoNew: Nuevo Hugo
preview: Vista previa
search:
images: Images
music: Música
pdf: PDF
pressToExecute: Presiona enter para ejecutar.
pressToSearch: Presiona enter para buscar.
search: Buscar...
searchOrCommand: Buscar o ejecutar un comando...
searchOrSupportedCommand: 'Buscar o ejecutar uno de los comandos soportados:'
type: Escribe y presiona enter para buscar.
types: Tipos
video: Vídeo
writeToSearch: Escribe aquí para buscar
languages:
en: English
fr: Français
pt: Português
es: Español
ja: 日本語
zhCN: 中文 (简体)
zhTW: 中文 (繁體)
time:
unit: Unidad
seconds: Segundos
minutes: Minutos
hours: Horas
days: Días
+1
View File
@@ -185,6 +185,7 @@ languages:
ja: 日本語 ja: 日本語
zhCN: 中文 (简体) zhCN: 中文 (简体)
zhTW: 中文 (繁體) zhTW: 中文 (繁體)
es: Español
time: time:
unit: Unité de temps unit: Unité de temps
seconds: Secondes seconds: Secondes
+38 -2
View File
@@ -6,11 +6,46 @@ import pt from './pt.yaml'
import ja from './ja.yaml' import ja from './ja.yaml'
import zhCN from './zh-cn.yaml' import zhCN from './zh-cn.yaml'
import zhTW from './zh-tw.yaml' import zhTW from './zh-tw.yaml'
import es from './es.yaml'
Vue.use(VueI18n) Vue.use(VueI18n)
export function detectLocale () {
let locale = (navigator.language || navigator.browserLangugae).toLowerCase()
switch (true) {
case /^en.*/i.test(locale):
locale = 'en'
break
case /^fr.*/i.test(locale):
locale = 'fr'
break
case /^pt.*/i.test(locale):
locale = 'pt'
break
case /^ja.*/i.test(locale):
locale = 'ja'
break
case /^zh-CN/i.test(locale):
locale = 'zh-cn'
break
case /^zh-TW/i.test(locale):
locale = 'zh-tw'
break
case /^zh.*/i.test(locale):
locale = 'zh-cn'
break
case /^es.*/i.test(locale):
locale = 'es'
break
default:
locale = 'en'
}
return locale
}
const i18n = new VueI18n({ const i18n = new VueI18n({
locale: 'en', locale: detectLocale(),
fallbackLocale: 'en', fallbackLocale: 'en',
messages: { messages: {
'en': en, 'en': en,
@@ -18,7 +53,8 @@ const i18n = new VueI18n({
'pt': pt, 'pt': pt,
'ja': ja, 'ja': ja,
'zh-cn': zhCN, 'zh-cn': zhCN,
'zh-tw': zhTW 'zh-tw': zhTW,
'es': es
} }
}) })
+2 -1
View File
@@ -124,7 +124,7 @@ settings:
examples: 例 examples: 例
globalSettings: グローバル設定 globalSettings: グローバル設定
language: 言語 language: 言語
lockPassowrd: 新しいパスワードを変更に禁止 lockPassword: 新しいパスワードを変更に禁止
newPassword: 新しいパスワード newPassword: 新しいパスワード
newPasswordConfirm: 新しいパスワードを確認します newPasswordConfirm: 新しいパスワードを確認します
newUser: 新しいユーザー newUser: 新しいユーザー
@@ -192,6 +192,7 @@ languages:
ja: 日本語 ja: 日本語
zhCN: 中文 (简体) zhCN: 中文 (简体)
zhTW: 中文 (繁體) zhTW: 中文 (繁體)
es: Español
time: time:
unit: 時間単位 unit: 時間単位
seconds: 秒 seconds: 秒
+1
View File
@@ -73,6 +73,7 @@ languages:
ja: 日本語 ja: 日本語
zhCN: 中文 (简体) zhCN: 中文 (简体)
zhTW: 中文 (繁體) zhTW: 中文 (繁體)
es: Español
login: login:
password: Palavra-passe password: Palavra-passe
submit: Login submit: Login
+2 -1
View File
@@ -123,7 +123,7 @@ settings:
examples: 例子 examples: 例子
globalSettings: 全局设置 globalSettings: 全局设置
language: 语言 language: 语言
lockPassowrd: 禁止用户修改密码 lockPassword: 禁止用户修改密码
newPassword: 您的新密码 newPassword: 您的新密码
newPasswordConfirm: 重输一遍新密码 newPasswordConfirm: 重输一遍新密码
newUser: 新建用户 newUser: 新建用户
@@ -190,6 +190,7 @@ languages:
ja: 日本語 ja: 日本語
zhCN: 中文 (简体) zhCN: 中文 (简体)
zhTW: 中文 (繁體) zhTW: 中文 (繁體)
es: Español
time: time:
unit: 时间单位 unit: 时间单位
seconds: 秒 seconds: 秒
+1
View File
@@ -190,6 +190,7 @@ languages:
ja: 日本語 ja: 日本語
zhCN: 中文 (简体) zhCN: 中文 (简体)
zhTW: 中文 (繁體) zhTW: 中文 (繁體)
es: Español
time: time:
unit: 時間單位 unit: 時間單位
seconds: 秒 seconds: 秒
+1 -1
View File
@@ -31,7 +31,7 @@ Vue.prototype.$showError = function (error) {
type: 'error', type: 'error',
timeout: null, timeout: null,
buttons: [ buttons: [
Noty.button(i18n.t('buttons.reportIssue'), 'cancel', function () { Noty.button(i18n.t('buttons.reportIssue'), '', function () {
window.open('https://github.com/hacdias/filemanager/issues/new') window.open('https://github.com/hacdias/filemanager/issues/new')
}), }),
Noty.button(i18n.t('buttons.close'), '', function () { Noty.button(i18n.t('buttons.close'), '', function () {
+17 -17
View File
@@ -3,15 +3,15 @@ import Router from 'vue-router'
import Login from '@/views/Login' import Login from '@/views/Login'
import Layout from '@/views/Layout' import Layout from '@/views/Layout'
import Files from '@/views/Files' import Files from '@/views/Files'
import Users from '@/views/Settings/Users' import Users from '@/views/settings/Users'
import User from '@/views/Settings/User' import User from '@/views/settings/User'
import Settings from '@/views/Settings' import Settings from '@/views/Settings'
import GlobalSettings from '@/views/settings/Global' import GlobalSettings from '@/views/settings/Global'
import ProfileSettings from '@/views/settings/Profile' import ProfileSettings from '@/views/settings/Profile'
import Error403 from '@/views/errors/403' import Error403 from '@/views/errors/403'
import Error404 from '@/views/errors/404' import Error404 from '@/views/errors/404'
import Error500 from '@/views/errors/500' import Error500 from '@/views/errors/500'
import auth from '@/utils/auth.js' import auth from '@/utils/auth'
import store from '@/store' import store from '@/store'
Vue.use(Router) Vue.use(Router)
@@ -51,14 +51,13 @@ const router = new Router({
path: '/settings', path: '/settings',
name: 'Settings', name: 'Settings',
component: Settings, component: Settings,
redirect: {
path: '/settings/profile'
},
meta: {
disableOnNoAuth: true
},
children: [ children: [
{
path: '/settings',
name: 'Settings',
redirect: {
path: '/settings/profile'
}
},
{ {
path: '/settings/profile', path: '/settings/profile',
name: 'Profile Settings', name: 'Profile Settings',
@@ -131,16 +130,17 @@ router.beforeEach((to, from, next) => {
auth.loggedIn() auth.loggedIn()
.then(() => { .then(() => {
if (to.matched.some(record => record.meta.requiresAdmin)) { if (to.matched.some(record => record.meta.requiresAdmin)) {
if (store.state.user.admin) { if (!store.state.user.admin) {
next() next({ path: '/403' })
return return
} }
}
next({ if (to.matched.some(record => record.meta.disableOnNoAuth)) {
path: '/403' if (store.state.noAuth) {
}) next({ path: '/403' })
return
return }
} }
next() next()
+1
View File
@@ -17,6 +17,7 @@ const state = {
window.CSS = null window.CSS = null
return css return css
})(), })(),
recaptcha: document.querySelector('meta[name="recaptcha"]').getAttribute('content'),
staticGen: document.querySelector('meta[name="staticgen"]').getAttribute('content'), staticGen: document.querySelector('meta[name="staticgen"]').getAttribute('content'),
baseURL: document.querySelector('meta[name="base"]').getAttribute('content'), baseURL: document.querySelector('meta[name="base"]').getAttribute('content'),
noAuth: (document.querySelector('meta[name="noauth"]').getAttribute('content') === 'true'), noAuth: (document.querySelector('meta[name="noauth"]').getAttribute('content') === 'true'),
+9 -3
View File
@@ -1,4 +1,4 @@
import i18n from '@/i18n' import * as i18n from '@/i18n'
import moment from 'moment' import moment from 'moment'
const mutations = { const mutations = {
@@ -27,8 +27,14 @@ const mutations = {
setLoading: (state, value) => { state.loading = value }, setLoading: (state, value) => { state.loading = value },
setReload: (state, value) => { state.reload = value }, setReload: (state, value) => { state.reload = value },
setUser: (state, value) => { setUser: (state, value) => {
moment.locale(value.locale) let locale = value.locale
i18n.locale = value.locale
if (locale === '') {
locale = i18n.detectLocale()
}
moment.locale(locale)
i18n.default.locale = locale
state.user = value state.user = value
}, },
setCSS: (state, value) => (state.css = value), setCSS: (state, value) => (state.css = value),
+8 -3
View File
@@ -1,13 +1,18 @@
import cookie from './cookie' import cookie from './cookie'
import store from '@/store' import store from '@/store'
import router from '@/router' import router from '@/router'
import { Base64 } from 'js-base64'
function parseToken (token) { function parseToken (token) {
let path = store.state.baseURL let path = store.state.baseURL
if (path === '') path = '/' if (path === '') path = '/'
document.cookie = `auth=${token}; max-age=86400; path=${path}` document.cookie = `auth=${token}; max-age=86400; path=${path}`
let res = token.split('.') let res = token.split('.')
let user = JSON.parse(window.atob(res[1])) let user = JSON.parse(Base64.decode(res[1]))
if (!user.commands) {
user.commands = []
}
store.commit('setJWT', token) store.commit('setJWT', token)
store.commit('setUser', user) store.commit('setUser', user)
} }
@@ -31,8 +36,8 @@ function loggedIn () {
}) })
} }
function login (user, password) { function login (user, password, captcha) {
let data = {username: user, password: password} let data = {username: user, password: password, recaptcha: captcha}
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let request = new window.XMLHttpRequest() let request = new window.XMLHttpRequest()
request.open('POST', `${store.state.baseURL}/api/auth/get`, true) request.open('POST', `${store.state.baseURL}/api/auth/get`, true)
+1 -1
View File
@@ -210,7 +210,7 @@ export default {
} }
}, },
scroll (event) { scroll (event) {
if (this.req.kind !== 'listing' || this.$store.state.req.display === 'mosaic') return if (this.req.kind !== 'listing' || this.$store.state.user.viewMode === 'mosaic') return
let top = 112 - window.scrollY let top = 112 - window.scrollY
+32 -3
View File
@@ -1,11 +1,12 @@
<template> <template>
<div id="login"> <div id="login" :class="{ recaptcha: recaptcha.length > 0 }">
<form @submit="submit"> <form @submit="submit">
<img src="../assets/logo.svg" alt="File Manager"> <img src="../assets/logo.svg" alt="File Manager">
<h1>File Manager</h1> <h1>File Manager</h1>
<div v-if="wrong" class="wrong">{{ $t("login.wrongCredentials") }}</div> <div v-if="wrong" class="wrong">{{ $t("login.wrongCredentials") }}</div>
<input type="text" v-model="username" :placeholder="$t('login.username')"> <input type="text" v-model="username" :placeholder="$t('login.username')">
<input type="password" v-model="password" :placeholder="$t('login.password')"> <input type="password" v-model="password" :placeholder="$t('login.password')">
<div v-if="recaptcha.length" id="recaptcha"></div>
<input type="submit" :value="$t('login.submit')"> <input type="submit" :value="$t('login.submit')">
</form> </form>
</div> </div>
@@ -13,9 +14,12 @@
<script> <script>
import auth from '@/utils/auth' import auth from '@/utils/auth'
import { mapState } from 'vuex'
export default { export default {
name: 'login', name: 'login',
props: ['dependencies'],
computed: mapState(['recaptcha']),
data: function () { data: function () {
return { return {
wrong: false, wrong: false,
@@ -23,8 +27,23 @@ export default {
password: '' password: ''
} }
}, },
mounted () {
if (this.dependencies) this.setup()
},
watch: {
dependencies: function (val) {
if (val) this.setup()
}
},
methods: { methods: {
submit: function (event) { setup () {
if (this.recaptcha.length === 0) return
window.grecaptcha.render('recaptcha', {
sitekey: this.recaptcha
})
},
submit (event) {
event.preventDefault() event.preventDefault()
event.stopPropagation() event.stopPropagation()
@@ -33,7 +52,17 @@ export default {
redirect = '/files/' redirect = '/files/'
} }
auth.login(this.username, this.password) let captcha = ''
if (this.recaptcha.length > 0) {
captcha = window.grecaptcha.getResponse()
if (captcha === '') {
this.wrong = true
return
}
}
auth.login(this.username, this.password, captcha)
.then(() => { this.$router.push({ path: redirect }) }) .then(() => { this.$router.push({ path: redirect }) })
.catch(() => { this.wrong = true }) .catch(() => { this.wrong = true })
} }
+1 -2
View File
@@ -1,6 +1,6 @@
<template> <template>
<div class="dashboard"> <div class="dashboard">
<form class="card" @submit.prevent="saveStaticGen"> <form class="card" v-if="staticGen.length" @submit.prevent="saveStaticGen">
<div class="card-title"> <div class="card-title">
<h2>{{ capitalize($store.state.staticGen) }}</h2> <h2>{{ capitalize($store.state.staticGen) }}</h2>
</div> </div>
@@ -80,7 +80,6 @@ export default {
created () { created () {
getSettings() getSettings()
.then(settings => { .then(settings => {
console.log(settings)
if (this.$store.state.staticGen.length > 0) { if (this.$store.state.staticGen.length > 0) {
this.parseStaticGen(settings.staticGen) this.parseStaticGen(settings.staticGen)
} }
+35 -21
View File
@@ -7,10 +7,21 @@
</div> </div>
<div class="card-content"> <div class="card-content">
<p>
<label for="username">{{ $t('settings.username') }}</label>
<input type="text" v-model="username" id="username">
</p>
<p>
<label for="password">{{ $t('settings.password') }}</label>
<input type="password" :placeholder="passwordPlaceholder" v-model="password" id="password">
</p>
<p>
<label for="scope">{{ $t('settings.scope') }}</label>
<input type="text" v-model="filesystem" id="scope">
</p>
<p><label for="username">{{ $t('settings.username') }}</label><input type="text" v-model="username" id="username"></p>
<p><label for="password">{{ $t('settings.password') }}</label><input type="password" :placeholder="passwordPlaceholder" v-model="password" id="password"></p>
<p><label for="scope">{{ $t('settings.scope') }}</label><input type="text" v-model="filesystem" id="scope"></p>
<p> <p>
<label for="locale">{{ $t('settings.language') }}</label> <label for="locale">{{ $t('settings.language') }}</label>
<languages id="locale" :selected.sync="locale"></languages> <languages id="locale" :selected.sync="locale"></languages>
@@ -91,6 +102,7 @@ export default {
components: { Languages }, components: { Languages },
data: () => { data: () => {
return { return {
originalUser: null,
id: 0, id: 0,
admin: false, admin: false,
allowNew: false, allowNew: false,
@@ -141,6 +153,7 @@ export default {
} }
getUser(user).then(user => { getUser(user).then(user => {
this.originalUser = user
this.id = user.ID this.id = user.ID
this.admin = user.admin this.admin = user.admin
this.allowCommands = user.allowCommands this.allowCommands = user.allowCommands
@@ -150,11 +163,14 @@ export default {
this.lockPassword = user.lockPassword this.lockPassword = user.lockPassword
this.filesystem = user.filesystem this.filesystem = user.filesystem
this.username = user.username this.username = user.username
this.commands = user.commands.join(' ')
this.css = user.css this.css = user.css
this.permissions = user.permissions this.permissions = user.permissions
this.locale = user.locale this.locale = user.locale
if (user.commands) {
this.commands = user.commands.join(' ')
}
for (let rule of user.rules) { for (let rule of user.rules) {
if (rule.allow) { if (rule.allow) {
this.rules += 'allow ' this.rules += 'allow '
@@ -242,23 +258,21 @@ export default {
}) })
}, },
parseForm () { parseForm () {
let user = { let user = this.originalUser
ID: this.id, user.username = this.username
username: this.username, user.password = this.password
password: this.password, user.lockPassword = this.lockPassword
lockPassword: this.lockPassword, user.filesystem = this.filesystem
filesystem: this.filesystem, user.admin = this.admin
admin: this.admin, user.allowCommands = this.allowCommands
allowCommands: this.allowCommands, user.allowNew = this.allowNew
allowNew: this.allowNew, user.allowEdit = this.allowEdit
allowEdit: this.allowEdit, user.allowPublish = this.allowPublish
allowPublish: this.allowPublish, user.permissions = this.permissions
permissions: this.permissions, user.css = this.css
css: this.css, user.locale = this.locale
locale: this.locale, user.commands = this.commands.split(' ')
commands: this.commands.split(' '), user.rules = []
rules: []
}
let rules = this.rules.split('\n') let rules = this.rules.split('\n')
+23 -6
View File
@@ -37,6 +37,7 @@ func Parse(c *caddy.Controller, plugin string) ([]*filemanager.FileManager, erro
AllowPublish: true, AllowPublish: true,
Commands: []string{"git", "svn", "hg"}, Commands: []string{"git", "svn", "hg"},
CSS: "", CSS: "",
ViewMode: "mosaic",
Rules: []*filemanager.Rule{{ Rules: []*filemanager.Rule{{
Regex: true, Regex: true,
Allow: false, Allow: false,
@@ -48,6 +49,8 @@ func Parse(c *caddy.Controller, plugin string) ([]*filemanager.FileManager, erro
scope := "." scope := "."
database := "" database := ""
noAuth := false noAuth := false
reCaptchaKey := ""
reCaptchaSecret := ""
if plugin != "" { if plugin != "" {
baseURL = "/admin" baseURL = "/admin"
@@ -152,9 +155,21 @@ func Parse(c *caddy.Controller, plugin string) ([]*filemanager.FileManager, erro
} }
u.ViewMode = c.Val() u.ViewMode = c.Val()
if u.ViewMode != "mosaic" && u.ViewMode != "list" { if u.ViewMode != filemanager.MosaicViewMode && u.ViewMode != filemanager.ListViewMode {
return nil, c.ArgErr() return nil, c.ArgErr()
} }
case "recaptcha_key":
if !c.NextArg() {
return nil, c.ArgErr()
}
reCaptchaKey = c.Val()
case "recaptcha_secret":
if !c.NextArg() {
return nil, c.ArgErr()
}
reCaptchaSecret = c.Val()
case "no_auth": case "no_auth":
if !c.NextArg() { if !c.NextArg() {
noAuth = true noAuth = true
@@ -193,7 +208,7 @@ func Parse(c *caddy.Controller, plugin string) ([]*filemanager.FileManager, erro
sha := hex.EncodeToString(hasher.Sum(nil)) sha := hex.EncodeToString(hasher.Sum(nil))
database = filepath.Join(path, sha+".db") database = filepath.Join(path, sha+".db")
fmt.Println("[WARNING] A database is going to be created for your File Manager instace at " + database + fmt.Println("[WARNING] A database is going to be created for your File Manager instance at " + database +
". It is highly recommended that you set the 'database' option to '" + sha + ".db'\n") ". It is highly recommended that you set the 'database' option to '" + sha + ".db'\n")
} }
@@ -213,10 +228,12 @@ func Parse(c *caddy.Controller, plugin string) ([]*filemanager.FileManager, erro
} }
m := &filemanager.FileManager{ m := &filemanager.FileManager{
NoAuth: noAuth, NoAuth: noAuth,
BaseURL: "", BaseURL: "",
PrefixURL: "", PrefixURL: "",
DefaultUser: u, ReCaptchaKey: reCaptchaKey,
ReCaptchaSecret: reCaptchaSecret,
DefaultUser: u,
Store: &filemanager.Store{ Store: &filemanager.Store{
Config: bolt.ConfigStore{DB: db}, Config: bolt.ConfigStore{DB: db},
Users: bolt.UsersStore{DB: db}, Users: bolt.UsersStore{DB: db},
+35 -25
View File
@@ -12,7 +12,7 @@ import (
"github.com/asdine/storm" "github.com/asdine/storm"
lumberjack "gopkg.in/natefinch/lumberjack.v2" "gopkg.in/natefinch/lumberjack.v2"
"github.com/hacdias/filemanager" "github.com/hacdias/filemanager"
"github.com/hacdias/filemanager/bolt" "github.com/hacdias/filemanager/bolt"
@@ -24,24 +24,26 @@ import (
) )
var ( var (
addr string addr string
config string config string
database string database string
scope string scope string
commands string commands string
logfile string logfile string
staticg string staticg string
locale string locale string
baseurl string baseurl string
prefixurl string prefixurl string
viewMode string viewMode string
port int recaptchakey string
noAuth bool recaptchasecret string
allowCommands bool port int
allowEdit bool noAuth bool
allowNew bool allowCommands bool
allowPublish bool allowEdit bool
showVer bool allowNew bool
allowPublish bool
showVer bool
) )
func init() { func init() {
@@ -55,12 +57,14 @@ func init() {
flag.StringVar(&commands, "commands", "git svn hg", "Default commands option for new users") flag.StringVar(&commands, "commands", "git svn hg", "Default commands option for new users")
flag.StringVar(&prefixurl, "prefixurl", "", "Prefix URL") flag.StringVar(&prefixurl, "prefixurl", "", "Prefix URL")
flag.StringVar(&viewMode, "view-mode", "mosaic", "Default view mode for new users") flag.StringVar(&viewMode, "view-mode", "mosaic", "Default view mode for new users")
flag.StringVar(&recaptchakey, "recaptcha-key", "", "ReCaptcha site key")
flag.StringVar(&recaptchasecret, "recaptcha-secret", "", "ReCaptcha secret")
flag.BoolVar(&allowCommands, "allow-commands", true, "Default allow commands option for new users") flag.BoolVar(&allowCommands, "allow-commands", true, "Default allow commands option for new users")
flag.BoolVar(&allowEdit, "allow-edit", true, "Default allow edit option for new users") flag.BoolVar(&allowEdit, "allow-edit", true, "Default allow edit option for new users")
flag.BoolVar(&allowPublish, "allow-publish", true, "Default allow publish option for new users") flag.BoolVar(&allowPublish, "allow-publish", true, "Default allow publish option for new users")
flag.BoolVar(&allowNew, "allow-new", true, "Default allow new option for new users") flag.BoolVar(&allowNew, "allow-new", true, "Default allow new option for new users")
flag.BoolVar(&noAuth, "no-auth", false, "Disables authentication") flag.BoolVar(&noAuth, "no-auth", false, "Disables authentication")
flag.StringVar(&locale, "locale", "en", "Default locale for new users") flag.StringVar(&locale, "locale", "", "Default locale for new users, set it empty to enable auto detect from browser")
flag.StringVar(&staticg, "staticgen", "", "Static Generator you want to enable") flag.StringVar(&staticg, "staticgen", "", "Static Generator you want to enable")
flag.BoolVarP(&showVer, "version", "v", false, "Show version") flag.BoolVarP(&showVer, "version", "v", false, "Show version")
} }
@@ -77,11 +81,13 @@ func setupViper() {
viper.SetDefault("AllowNew", true) viper.SetDefault("AllowNew", true)
viper.SetDefault("AllowPublish", true) viper.SetDefault("AllowPublish", true)
viper.SetDefault("StaticGen", "") viper.SetDefault("StaticGen", "")
viper.SetDefault("Locale", "en") viper.SetDefault("Locale", "")
viper.SetDefault("NoAuth", false) viper.SetDefault("NoAuth", false)
viper.SetDefault("BaseURL", "") viper.SetDefault("BaseURL", "")
viper.SetDefault("PrefixURL", "") viper.SetDefault("PrefixURL", "")
viper.SetDefault("ViewMode", "mosaic") viper.SetDefault("ViewMode", filemanager.MosaicViewMode)
viper.SetDefault("ReCaptchaKey", "")
viper.SetDefault("ReCaptchaSecret", "")
viper.BindPFlag("Port", flag.Lookup("port")) viper.BindPFlag("Port", flag.Lookup("port"))
viper.BindPFlag("Address", flag.Lookup("address")) viper.BindPFlag("Address", flag.Lookup("address"))
@@ -99,6 +105,8 @@ func setupViper() {
viper.BindPFlag("BaseURL", flag.Lookup("baseurl")) viper.BindPFlag("BaseURL", flag.Lookup("baseurl"))
viper.BindPFlag("PrefixURL", flag.Lookup("prefixurl")) viper.BindPFlag("PrefixURL", flag.Lookup("prefixurl"))
viper.BindPFlag("ViewMode", flag.Lookup("view-mode")) viper.BindPFlag("ViewMode", flag.Lookup("view-mode"))
viper.BindPFlag("ReCaptchaKey", flag.Lookup("recaptcha-key"))
viper.BindPFlag("ReCaptchaSecret", flag.Lookup("recaptcha-secret"))
viper.SetConfigName("filemanager") viper.SetConfigName("filemanager")
viper.AddConfigPath(".") viper.AddConfigPath(".")
@@ -179,9 +187,11 @@ func handler() http.Handler {
} }
fm := &filemanager.FileManager{ fm := &filemanager.FileManager{
NoAuth: viper.GetBool("NoAuth"), NoAuth: viper.GetBool("NoAuth"),
BaseURL: viper.GetString("BaseURL"), BaseURL: viper.GetString("BaseURL"),
PrefixURL: viper.GetString("PrefixURL"), PrefixURL: viper.GetString("PrefixURL"),
ReCaptchaKey: viper.GetString("ReCaptchaKey"),
ReCaptchaSecret: viper.GetString("ReCaptchaSecret"),
DefaultUser: &filemanager.User{ DefaultUser: &filemanager.User{
AllowCommands: viper.GetBool("AllowCommands"), AllowCommands: viper.GetBool("AllowCommands"),
AllowEdit: viper.GetBool("AllowEdit"), AllowEdit: viper.GetBool("AllowEdit"),
+45 -22
View File
@@ -133,6 +133,16 @@ func (i *File) GetListing(u *User, r *http.Request) error {
continue continue
} }
if strings.HasPrefix(f.Mode().String(), "L") {
// It's a symbolic link
// The FileInfo from Readdir treats symbolic link as a file only.
info, err := os.Stat(f.Name())
if err != nil {
return err
}
f = info
}
if f.IsDir() { if f.IsDir() {
name += "/" name += "/"
dirCount++ dirCount++
@@ -187,7 +197,6 @@ func (i *File) GetEditor() error {
// If there is an error, just ignore it and return nil. // If there is an error, just ignore it and return nil.
// This way, the file can be served for editing. // This way, the file can be served for editing.
if err != nil { if err != nil {
return nil return nil
} }
@@ -251,15 +260,12 @@ func (i *File) GetFileType(checkContent bool) error {
// If the type isn't text (and is blob for example), it will check some // If the type isn't text (and is blob for example), it will check some
// common types that are mistaken not to be text. // common types that are mistaken not to be text.
for _, extension := range textExtensions { if isInTextExtensions(i.Name) {
if strings.HasSuffix(i.Name, extension) { i.Type = "text"
i.Type = "text" } else {
goto End i.Type = "blob"
}
} }
i.Type = "blob"
End: End:
// If the file type is text, save its content. // If the file type is text, save its content.
if i.Type == "text" { if i.Type == "text" {
@@ -405,21 +411,38 @@ func (l byModified) Less(i, j int) bool {
return iModified.Sub(jModified) < 0 return iModified.Sub(jModified) < 0
} }
var textExtensions = [...]string{ // textExtensions is the sorted list of text extensions which
".md", ".markdown", ".mdown", ".mmark", // can be edited.
".asciidoc", ".adoc", ".ad", var textExtensions = []string{
".rst", ".ad", ".ada", ".adoc", ".asciidoc",
".json", ".toml", ".yaml", ".csv", ".xml", ".rss", ".conf", ".ini", ".bas", ".bash", ".bat",
".tex", ".sty", ".c", ".cc", ".cmd", ".conf", ".cpp", ".cr", ".cs", ".css", ".csv",
".css", ".sass", ".scss", ".d",
".js", ".f", ".f90",
".html", ".h", ".hh", ".hpp", ".htaccess", ".html",
".txt", ".rtf", ".ini",
".sh", ".bash", ".ps1", ".bat", ".cmd", ".java", ".js", ".json",
".php", ".pl", ".py", ".markdown", ".md", ".mdown", ".mmark",
".nim",
".php", ".pl", ".ps1", ".py",
".rss", ".rst", ".rtf",
".sass", ".scss", ".sh", ".sty",
".tex", ".tml", ".toml", ".txt",
".vala", ".vapi",
".xml",
".yaml", ".yml",
"Caddyfile", "Caddyfile",
".c", ".cc", ".h", ".hh", ".cpp", ".hpp", ".f90", }
".f", ".bas", ".d", ".ada", ".nim", ".cr", ".java", ".cs", ".vala", ".vapi",
// isInTextExtensions checks if a file can be edited by its extensions.
func isInTextExtensions(name string) bool {
search := filepath.Ext(name)
if search == "" {
search = name
}
i := sort.SearchStrings(textExtensions, search)
return i < len(textExtensions) && textExtensions[i] == search
} }
// hasRune checks if the file has the frontmatter rune // hasRune checks if the file has the frontmatter rune
+16 -7
View File
@@ -15,14 +15,19 @@ import (
"golang.org/x/crypto/bcrypt" "golang.org/x/crypto/bcrypt"
rice "github.com/GeertJohan/go.rice" "github.com/GeertJohan/go.rice"
"github.com/hacdias/fileutils" "github.com/hacdias/fileutils"
"github.com/mholt/caddy" "github.com/mholt/caddy"
"github.com/robfig/cron" "github.com/robfig/cron"
) )
// Version is the current File Manager version. const (
const Version = "1.3.3" // Version is the current File Manager version.
Version = "1.4.2"
ListViewMode = "list"
MosaicViewMode = "mosaic"
)
var ( var (
ErrExist = errors.New("the resource already exists") ErrExist = errors.New("the resource already exists")
@@ -33,7 +38,7 @@ var (
ErrEmptyScope = errors.New("scope is empty") ErrEmptyScope = errors.New("scope is empty")
ErrWrongDataType = errors.New("wrong data type") ErrWrongDataType = errors.New("wrong data type")
ErrInvalidUpdateField = errors.New("invalid field to update") ErrInvalidUpdateField = errors.New("invalid field to update")
ErrInvalidOption = errors.New("Invalid option") ErrInvalidOption = errors.New("invalid option")
) )
// FileManager is a file manager instance. It should be creating using the // FileManager is a file manager instance. It should be creating using the
@@ -66,6 +71,10 @@ type FileManager struct {
// there will only exist one user, called "admin". // there will only exist one user, called "admin".
NoAuth bool NoAuth bool
// ReCaptcha Site key and secret.
ReCaptchaKey string
ReCaptchaSecret string
// StaticGen is the static websit generator handler. // StaticGen is the static websit generator handler.
StaticGen StaticGen StaticGen StaticGen
@@ -203,8 +212,8 @@ func (m *FileManager) Setup() error {
// TODO: remove this after 1.5 // TODO: remove this after 1.5
for _, user := range users { for _, user := range users {
if user.ViewMode != "list" && user.ViewMode != "mosaic" { if user.ViewMode != ListViewMode && user.ViewMode != MosaicViewMode {
user.ViewMode = "list" user.ViewMode = ListViewMode
m.Store.Users.Update(user, "ViewMode") m.Store.Users.Update(user, "ViewMode")
} }
} }
@@ -352,7 +361,7 @@ var DefaultUser = User{
Rules: []*Rule{}, Rules: []*Rule{},
CSS: "", CSS: "",
Admin: true, Admin: true,
Locale: "en", Locale: "",
Scope: ".", Scope: ".",
FileSystem: fileutils.Dir("."), FileSystem: fileutils.Dir("."),
ViewMode: "mosaic", ViewMode: "mosaic",
+57 -3
View File
@@ -3,15 +3,56 @@ package http
import ( import (
"encoding/json" "encoding/json"
"net/http" "net/http"
"net/url"
"strings" "strings"
"time" "time"
jwt "github.com/dgrijalva/jwt-go" "github.com/dgrijalva/jwt-go"
"github.com/dgrijalva/jwt-go/request" "github.com/dgrijalva/jwt-go/request"
fm "github.com/hacdias/filemanager" fm "github.com/hacdias/filemanager"
) )
// authHandler proccesses the authentication for the user. const reCaptchaAPI = "https://www.google.com/recaptcha/api/siteverify"
type cred struct {
Password string `json:"password"`
Username string `json:"username"`
ReCaptcha string `json:"recaptcha"`
}
// reCaptcha checks the reCaptcha code.
func reCaptcha(secret string, response string) (bool, error) {
body := url.Values{}
body.Set("secret", secret)
body.Add("response", response)
client := &http.Client{}
resp, err := client.Post(reCaptchaAPI, "application/x-www-form-urlencoded", strings.NewReader(body.Encode()))
if err != nil {
return false, err
}
if resp.StatusCode != http.StatusOK {
return false, nil
}
var data struct {
Success bool `json:"success"`
ChallengeTS time.Time `json:"challenge_ts"`
Hostname string `json:"hostname"`
ErrorCodes interface{} `json:"error-codes"`
}
err = json.NewDecoder(resp.Body).Decode(&data)
if err != nil {
return false, err
}
return data.Success, nil
}
// authHandler processes the authentication for the user.
func authHandler(c *fm.Context, w http.ResponseWriter, r *http.Request) (int, error) { func authHandler(c *fm.Context, w http.ResponseWriter, r *http.Request) (int, error) {
// NoAuth instances shouldn't call this method. // NoAuth instances shouldn't call this method.
if c.NoAuth { if c.NoAuth {
@@ -19,7 +60,7 @@ func authHandler(c *fm.Context, w http.ResponseWriter, r *http.Request) (int, er
} }
// Receive the credentials from the request and unmarshal them. // Receive the credentials from the request and unmarshal them.
var cred fm.User var cred cred
if r.Body == nil { if r.Body == nil {
return http.StatusForbidden, nil return http.StatusForbidden, nil
} }
@@ -29,6 +70,18 @@ func authHandler(c *fm.Context, w http.ResponseWriter, r *http.Request) (int, er
return http.StatusForbidden, nil return http.StatusForbidden, nil
} }
// If ReCaptcha is enabled, check the code.
if len(c.ReCaptchaSecret) > 0 {
ok, err := reCaptcha(c.ReCaptchaSecret, cred.ReCaptcha)
if err != nil {
return http.StatusForbidden, err
}
if !ok {
return http.StatusForbidden, nil
}
}
// Checks if the user exists. // Checks if the user exists.
u, err := c.Store.Users.GetByUsername(cred.Username, c.NewFS) u, err := c.Store.Users.GetByUsername(cred.Username, c.NewFS)
if err != nil { if err != nil {
@@ -124,6 +177,7 @@ func validateAuth(c *fm.Context, r *http.Request) (bool, *fm.User) {
keyFunc := func(token *jwt.Token) (interface{}, error) { keyFunc := func(token *jwt.Token) (interface{}, error) {
return c.Key, nil return c.Key, nil
} }
var claims claims var claims claims
token, err := request.ParseFromRequestWithClaims(r, token, err := request.ParseFromRequestWithClaims(r,
extractor{}, extractor{},
+24 -10
View File
@@ -17,21 +17,13 @@ import (
// downloadHandler creates an archive in one of the supported formats (zip, tar, // downloadHandler creates an archive in one of the supported formats (zip, tar,
// tar.gz or tar.bz2) and sends it to be downloaded. // tar.gz or tar.bz2) and sends it to be downloaded.
func downloadHandler(c *fm.Context, w http.ResponseWriter, r *http.Request) (int, error) { func downloadHandler(c *fm.Context, w http.ResponseWriter, r *http.Request) (int, error) {
query := r.URL.Query().Get("format")
// If the file isn't a directory, serve it using http.ServeFile. We display it // If the file isn't a directory, serve it using http.ServeFile. We display it
// inline if it is requested. // inline if it is requested.
if !c.File.IsDir { if !c.File.IsDir {
if r.URL.Query().Get("inline") == "true" { return downloadFileHandler(c, w, r)
w.Header().Set("Content-Disposition", "inline")
} else {
w.Header().Set("Content-Disposition", "attachment; filename=\""+c.File.Name+"\"")
}
http.ServeFile(w, r, c.File.Path)
return 0, nil
} }
query := r.URL.Query().Get("format")
files := []string{} files := []string{}
names := strings.Split(r.URL.Query().Get("files"), ",") names := strings.Split(r.URL.Query().Get("files"), ",")
@@ -111,3 +103,25 @@ func downloadHandler(c *fm.Context, w http.ResponseWriter, r *http.Request) (int
_, err = io.Copy(w, file) _, err = io.Copy(w, file)
return 0, err return 0, err
} }
func downloadFileHandler(c *fm.Context, w http.ResponseWriter, r *http.Request) (int, error) {
if r.URL.Query().Get("inline") == "true" {
w.Header().Set("Content-Disposition", "inline")
} else {
w.Header().Set("Content-Disposition", `attachment; filename="`+c.File.Name+`"`)
}
file, err := os.Open(c.File.Path)
defer file.Close()
if err != nil {
return http.StatusInternalServerError, err
}
_, err = io.Copy(w, file)
if err != nil {
return http.StatusInternalServerError, err
}
return 0, nil
}
+11 -10
View File
@@ -25,16 +25,13 @@ func Handler(m *fm.FileManager) http.Handler {
if code >= 400 { if code >= 400 {
w.WriteHeader(code) w.WriteHeader(code)
if err == nil { txt := http.StatusText(code)
txt := http.StatusText(code) log.Printf("%v: %v %v\n", r.URL.Path, code, txt)
log.Printf("%v: %v %v\n", r.URL.Path, code, txt) w.Write([]byte(txt + "\n"))
w.Write([]byte(txt))
}
} }
if err != nil { if err != nil {
log.Print(err) log.Print(err)
w.Write([]byte(err.Error()))
} }
}) })
} }
@@ -226,10 +223,13 @@ func renderFile(c *fm.Context, w http.ResponseWriter, file string) (int, error)
w.Header().Set("Content-Type", contentType+"; charset=utf-8") w.Header().Set("Content-Type", contentType+"; charset=utf-8")
data := map[string]interface{}{ data := map[string]interface{}{
"BaseURL": c.RootURL(), "BaseURL": c.RootURL(),
"NoAuth": c.NoAuth, "NoAuth": c.NoAuth,
"Version": fm.Version, "Version": fm.Version,
"CSS": template.CSS(c.CSS), "CSS": template.CSS(c.CSS),
"ReCaptcha": c.ReCaptchaKey != "" && c.ReCaptchaSecret != "",
"ReCaptchaKey": c.ReCaptchaKey,
"ReCaptchaSecret": c.ReCaptchaSecret,
} }
if c.StaticGen != nil { if c.StaticGen != nil {
@@ -267,6 +267,7 @@ func sharePage(c *fm.Context, w http.ResponseWriter, r *http.Request) (int, erro
info, err := os.Stat(s.Path) info, err := os.Stat(s.Path)
if err != nil { if err != nil {
c.Store.Share.Delete(s.Hash)
return ErrorToHTTP(err, false), err return ErrorToHTTP(err, false), err
} }
+13
View File
@@ -160,6 +160,11 @@ func usersPostHandler(c *fm.Context, w http.ResponseWriter, r *http.Request) (in
u.Rules = []*fm.Rule{} u.Rules = []*fm.Rule{}
} }
// If the view mode is empty, initialize with the default one.
if u.ViewMode == "" {
u.ViewMode = c.DefaultUser.ViewMode
}
// Initialize commands if not initialized. // Initialize commands if not initialized.
if u.Commands == nil { if u.Commands == nil {
u.Commands = []string{} u.Commands = []string{}
@@ -182,6 +187,7 @@ func usersPostHandler(c *fm.Context, w http.ResponseWriter, r *http.Request) (in
} }
u.Password = pw u.Password = pw
u.ViewMode = fm.MosaicViewMode
// Saves the user to the database. // Saves the user to the database.
err = c.Store.Users.Save(u) err = c.Store.Users.Save(u)
@@ -268,6 +274,13 @@ func usersPutHandler(c *fm.Context, w http.ResponseWriter, r *http.Request) (int
return http.StatusBadRequest, err return http.StatusBadRequest, err
} }
// If we're updating the default user. Only for NoAuth
// implementations. Used to change the viewMode.
if id == 0 && c.NoAuth {
c.DefaultUser.ViewMode = u.ViewMode
return http.StatusOK, nil
}
// Updates the CSS and locale. // Updates the CSS and locale.
if which == "partial" { if which == "partial" {
c.User.CSS = u.CSS c.User.CSS = u.CSS
-9161
View File
File diff suppressed because it is too large. Load diff
+48 -47
View File
@@ -10,62 +10,63 @@
}, },
"dependencies": { "dependencies": {
"clipboard": "^1.7.1", "clipboard": "^1.7.1",
"codemirror": "^5.27.4", "codemirror": "^5.31.0",
"filesize": "^3.5.10", "filesize": "^3.5.11",
"moment": "^2.18.1", "js-base64": "^2.4.0",
"moment": "^2.19.2",
"normalize.css": "^7.0.0", "normalize.css": "^7.0.0",
"noty": "^3.1.2", "noty": "^3.1.3",
"vue": "^2.3.3", "vue": "^2.5.8",
"vue-i18n": "^7.1.0", "vue-i18n": "^7.3.2",
"vue-router": "^2.7.0", "vue-router": "^3.0.1",
"vuex": "^2.3.1" "vuex": "^3.0.1"
}, },
"devDependencies": { "devDependencies": {
"autoprefixer": "^7.1.2", "autoprefixer": "^7.1.6",
"babel-core": "^6.22.1", "babel-core": "^6.26.0",
"babel-eslint": "^7.1.1", "babel-eslint": "^8.0.2",
"babel-loader": "^7.1.1", "babel-loader": "^7.1.2",
"babel-plugin-transform-runtime": "^6.22.0", "babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.3.2", "babel-preset-env": "^1.6.1",
"babel-preset-stage-2": "^6.22.0", "babel-preset-stage-2": "^6.24.1",
"babel-register": "^6.22.0", "babel-register": "^6.26.0",
"chalk": "^2.0.1", "chalk": "^2.3.0",
"connect-history-api-fallback": "^1.3.0", "connect-history-api-fallback": "^1.5.0",
"copy-webpack-plugin": "^4.0.1", "copy-webpack-plugin": "^4.2.1",
"css-loader": "^0.28.0", "css-loader": "^0.28.7",
"eslint": "^4.3.0", "eslint": "^4.11.0",
"eslint-config-standard": "^10.2.1", "eslint-config-standard": "^10.2.1",
"eslint-friendly-formatter": "^3.0.0", "eslint-friendly-formatter": "^3.0.0",
"eslint-loader": "^1.7.1", "eslint-loader": "^1.9.0",
"eslint-plugin-html": "^3.1.1", "eslint-plugin-html": "^4.0.0",
"eslint-plugin-import": "^2.7.0", "eslint-plugin-import": "^2.8.0",
"eslint-plugin-node": "^5.1.1", "eslint-plugin-node": "^5.2.1",
"eslint-plugin-promise": "^3.4.0", "eslint-plugin-promise": "^3.6.0",
"eslint-plugin-standard": "^3.0.1", "eslint-plugin-standard": "^3.0.1",
"eventsource-polyfill": "^0.9.6", "eventsource-polyfill": "^0.9.6",
"express": "^4.14.1", "express": "^4.16.2",
"extract-text-webpack-plugin": "^3.0.0", "extract-text-webpack-plugin": "^3.0.2",
"file-loader": "^0.11.1", "file-loader": "^1.1.5",
"friendly-errors-webpack-plugin": "^1.1.3", "friendly-errors-webpack-plugin": "^1.6.1",
"html-webpack-plugin": "^2.28.0", "html-webpack-plugin": "^2.30.1",
"http-proxy-middleware": "^0.17.3", "http-proxy-middleware": "^0.17.4",
"opn": "^5.1.0", "opn": "^5.1.0",
"optimize-css-assets-webpack-plugin": "^3.0.0", "optimize-css-assets-webpack-plugin": "^3.2.0",
"ora": "^1.2.0", "ora": "^1.3.0",
"rimraf": "^2.6.0", "rimraf": "^2.6.2",
"semver": "^5.3.0", "semver": "^5.4.1",
"shelljs": "^0.7.6", "shelljs": "^0.7.8",
"sw-precache-webpack-plugin": "^0.11.4", "sw-precache-webpack-plugin": "^0.11.4",
"uglify-js": "^3.0.23", "uglify-js": "^3.1.10",
"url-loader": "^0.5.8", "url-loader": "^0.6.2",
"vue-loader": "^13.0.2", "vue-loader": "^13.5.0",
"vue-style-loader": "^3.0.1", "vue-style-loader": "^3.0.3",
"vue-template-compiler": "^2.3.3", "vue-template-compiler": "^2.5.8",
"webpack": "^3.4.1", "webpack": "^3.8.1",
"webpack-bundle-analyzer": "^2.2.1", "webpack-bundle-analyzer": "^2.9.1",
"webpack-dev-middleware": "^1.10.0", "webpack-dev-middleware": "^1.12.0",
"webpack-hot-middleware": "^2.18.0", "webpack-hot-middleware": "^2.20.0",
"webpack-merge": "^4.1.0", "webpack-merge": "^4.1.1",
"yml-loader": "^2.1.0" "yml-loader": "^2.1.0"
}, },
"engines": { "engines": {
+1 -1
View File
@@ -1 +1 @@
89727842b30edb4a9e4c273b3b51ee170714e472 6e37237fbee662acdaf51c879107db450ea135ed
+2 -1
View File
@@ -84,7 +84,8 @@ func (h Hugo) Hook(c *fm.Context, w http.ResponseWriter, r *http.Request) (int,
return http.StatusForbidden, nil return http.StatusForbidden, nil
} }
filename := filepath.Join(c.User.Scope, r.URL.Path) filename := filepath.Clean(r.URL.Path)
filename = strings.TrimPrefix(filename, string(filepath.Separator))
archetype := r.Header.Get("archetype") archetype := r.Header.Get("archetype")
ext := filepath.Ext(filename) ext := filepath.Ext(filename)