add send shared link via email in edit sharing option

This commit is contained in:
Milos Holba
2021-01-20 18:54:12 +01:00
parent 2263cc9511
commit 98d1926ab3
9 changed files with 272 additions and 208 deletions

View File

@@ -14,6 +14,7 @@ use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Str;
use App\Share;
use Validator;
class ShareController extends Controller
{
@@ -125,8 +126,23 @@ class ShareController extends Controller
return response('Done!', 204);
}
/**
* Send shared link via email to recipients
*
* @param $token
* @param $emails
*/
public function shared_send_via_email (Request $request, $token)
{
// Make validation of array of emails
$validator = Validator::make($request->all(), [
'emails.*' => 'required|email',
]);
// Return error
if ($validator->fails()) abort(400, 'Bad emails input');
// Get shared by token
$share = Share::where('token', $token)
->where('user_id', Auth::id())
->first();

View File

@@ -75,188 +75,43 @@
"/chunks/user-storage.js": "/chunks/user-storage.js?id=5cfec8a8f8a8aef24ef2",
"/chunks/user-subscription.js": "/chunks/user-subscription.js?id=c001bef2d6d5171cb359",
"/chunks/users.js": "/chunks/users.js?id=6e68cb068f69fba3199c",
"/js/main.912c164be340f137b9c5.hot-update.js": "/js/main.912c164be340f137b9c5.hot-update.js",
"/js/main.9671c85b5149f6cb6771.hot-update.js": "/js/main.9671c85b5149f6cb6771.hot-update.js",
"/js/main.a79b5dbc211c547e7526.hot-update.js": "/js/main.a79b5dbc211c547e7526.hot-update.js",
"/js/main.78c0e3e2716d55faa8b0.hot-update.js": "/js/main.78c0e3e2716d55faa8b0.hot-update.js",
"/js/main.2af37ed3f2f26e2b53ff.hot-update.js": "/js/main.2af37ed3f2f26e2b53ff.hot-update.js",
"/js/main.415b10807fe20ba122d2.hot-update.js": "/js/main.415b10807fe20ba122d2.hot-update.js",
"/js/main.07d510f733be739b288a.hot-update.js": "/js/main.07d510f733be739b288a.hot-update.js",
"/js/main.5a91fbfa836f346bf9c1.hot-update.js": "/js/main.5a91fbfa836f346bf9c1.hot-update.js",
"/js/main.f10fb6965ffb064ed72a.hot-update.js": "/js/main.f10fb6965ffb064ed72a.hot-update.js",
"/js/main.20e4f5695d4838c2df54.hot-update.js": "/js/main.20e4f5695d4838c2df54.hot-update.js",
"/js/main.c64ed4caaf4a26b4e4da.hot-update.js": "/js/main.c64ed4caaf4a26b4e4da.hot-update.js",
"/js/main.dca20eb2d81d02a30cab.hot-update.js": "/js/main.dca20eb2d81d02a30cab.hot-update.js",
"/js/main.ea2bcb3694b33826cf4c.hot-update.js": "/js/main.ea2bcb3694b33826cf4c.hot-update.js",
"/js/main.cd5be2c8928b59dc0539.hot-update.js": "/js/main.cd5be2c8928b59dc0539.hot-update.js",
"/js/main.afe9bba51dffddb0f93d.hot-update.js": "/js/main.afe9bba51dffddb0f93d.hot-update.js",
"/js/main.b8acf3a1c6f20521760d.hot-update.js": "/js/main.b8acf3a1c6f20521760d.hot-update.js",
"/js/main.c9cbf0be8ca5e4773a06.hot-update.js": "/js/main.c9cbf0be8ca5e4773a06.hot-update.js",
"/js/main.8272c6d7a6d85af217e4.hot-update.js": "/js/main.8272c6d7a6d85af217e4.hot-update.js",
"/js/main.218751bebcb9fb9e924b.hot-update.js": "/js/main.218751bebcb9fb9e924b.hot-update.js",
"/js/main.90e093327f1fda898ff5.hot-update.js": "/js/main.90e093327f1fda898ff5.hot-update.js",
"/js/main.849d5e81d1a9a5c7833a.hot-update.js": "/js/main.849d5e81d1a9a5c7833a.hot-update.js",
"/js/main.ae422565c4afe0d3f032.hot-update.js": "/js/main.ae422565c4afe0d3f032.hot-update.js",
"/js/main.c0095226b955965def5e.hot-update.js": "/js/main.c0095226b955965def5e.hot-update.js",
"/js/main.714991d74fd2889643be.hot-update.js": "/js/main.714991d74fd2889643be.hot-update.js",
"/js/main.e25a6722bd26bd23519a.hot-update.js": "/js/main.e25a6722bd26bd23519a.hot-update.js",
"/js/main.5a5e31a63dc91cc3ec33.hot-update.js": "/js/main.5a5e31a63dc91cc3ec33.hot-update.js",
"/js/main.8e6b2f95b87ef6e0b58a.hot-update.js": "/js/main.8e6b2f95b87ef6e0b58a.hot-update.js",
"/js/main.a474807be1029b5ad0d5.hot-update.js": "/js/main.a474807be1029b5ad0d5.hot-update.js",
"/js/main.dcb3b04b26ce5ce4c79c.hot-update.js": "/js/main.dcb3b04b26ce5ce4c79c.hot-update.js",
"/js/main.57afc1478d6f476bd12d.hot-update.js": "/js/main.57afc1478d6f476bd12d.hot-update.js",
"/js/main.591cfccd22510a004a31.hot-update.js": "/js/main.591cfccd22510a004a31.hot-update.js",
"/js/main.c25d8d72f98d2f0695c1.hot-update.js": "/js/main.c25d8d72f98d2f0695c1.hot-update.js",
"/js/main.5633cc9bc4d760452708.hot-update.js": "/js/main.5633cc9bc4d760452708.hot-update.js",
"/js/main.b0316632b1b2f458d8b9.hot-update.js": "/js/main.b0316632b1b2f458d8b9.hot-update.js",
"/js/main.eaac7a7dd2274924ddb4.hot-update.js": "/js/main.eaac7a7dd2274924ddb4.hot-update.js",
"/js/main.e84aa7b060748a4d40aa.hot-update.js": "/js/main.e84aa7b060748a4d40aa.hot-update.js",
"/js/main.84ddb654c6ee8261d5c9.hot-update.js": "/js/main.84ddb654c6ee8261d5c9.hot-update.js",
"/js/main.84d9f4c44b5a1173a15d.hot-update.js": "/js/main.84d9f4c44b5a1173a15d.hot-update.js",
"/js/main.25250e0c179dedbd880e.hot-update.js": "/js/main.25250e0c179dedbd880e.hot-update.js",
"/js/main.f1ff1f651a3cd75e3035.hot-update.js": "/js/main.f1ff1f651a3cd75e3035.hot-update.js",
"/js/main.8189c90002396f8fed80.hot-update.js": "/js/main.8189c90002396f8fed80.hot-update.js",
"/js/main.005014c73217edc71442.hot-update.js": "/js/main.005014c73217edc71442.hot-update.js",
"/js/main.d00139c3369c3b7acd03.hot-update.js": "/js/main.d00139c3369c3b7acd03.hot-update.js",
"/js/main.1812ba579bc32a8210f1.hot-update.js": "/js/main.1812ba579bc32a8210f1.hot-update.js",
"/js/main.305d9cbaf88441aea1e2.hot-update.js": "/js/main.305d9cbaf88441aea1e2.hot-update.js",
"/js/main.0987fb17c9c9850288fc.hot-update.js": "/js/main.0987fb17c9c9850288fc.hot-update.js",
"/js/main.28218a5eeab405f2f897.hot-update.js": "/js/main.28218a5eeab405f2f897.hot-update.js",
"/js/main.e2fce650177367845e1a.hot-update.js": "/js/main.e2fce650177367845e1a.hot-update.js",
"/js/main.be347730037e4b729723.hot-update.js": "/js/main.be347730037e4b729723.hot-update.js",
"/js/main.2c46e36389a0da625fc8.hot-update.js": "/js/main.2c46e36389a0da625fc8.hot-update.js",
"/js/main.a83fe050988433375ca7.hot-update.js": "/js/main.a83fe050988433375ca7.hot-update.js",
"/js/main.bfd837c20d48efb7e49b.hot-update.js": "/js/main.bfd837c20d48efb7e49b.hot-update.js",
"/js/main.69c0955d18dd18a67373.hot-update.js": "/js/main.69c0955d18dd18a67373.hot-update.js",
"/js/main.27a8c9cf86e8fddebf9d.hot-update.js": "/js/main.27a8c9cf86e8fddebf9d.hot-update.js",
"/js/main.f4ebbcc377b2710784f3.hot-update.js": "/js/main.f4ebbcc377b2710784f3.hot-update.js",
"/js/main.767b0cddba67058633fd.hot-update.js": "/js/main.767b0cddba67058633fd.hot-update.js",
"/js/main.e179ced1b05859d64e45.hot-update.js": "/js/main.e179ced1b05859d64e45.hot-update.js",
"/js/main.a1d04095bb4760182026.hot-update.js": "/js/main.a1d04095bb4760182026.hot-update.js",
"/js/main.004385b5040410af7457.hot-update.js": "/js/main.004385b5040410af7457.hot-update.js",
"/js/main.51bc6ffe074d66ee6be4.hot-update.js": "/js/main.51bc6ffe074d66ee6be4.hot-update.js",
"/js/main.2b009184c8dfa9aa0856.hot-update.js": "/js/main.2b009184c8dfa9aa0856.hot-update.js",
"/js/main.ac830b78ece960963462.hot-update.js": "/js/main.ac830b78ece960963462.hot-update.js",
"/js/main.802d3d6bdd954460bcd3.hot-update.js": "/js/main.802d3d6bdd954460bcd3.hot-update.js",
"/js/main.54bfeac7c76f3ff28345.hot-update.js": "/js/main.54bfeac7c76f3ff28345.hot-update.js",
"/js/main.49a107d3381afb7cdddf.hot-update.js": "/js/main.49a107d3381afb7cdddf.hot-update.js",
"/js/main.ad1735abce9c664224c2.hot-update.js": "/js/main.ad1735abce9c664224c2.hot-update.js",
"/js/main.55efa4714a0950e39d4d.hot-update.js": "/js/main.55efa4714a0950e39d4d.hot-update.js",
"/js/main.75a3be232e2d5eff383e.hot-update.js": "/js/main.75a3be232e2d5eff383e.hot-update.js",
"/js/main.f073be7af26a78700617.hot-update.js": "/js/main.f073be7af26a78700617.hot-update.js",
"/js/main.b61346ff85b32006eead.hot-update.js": "/js/main.b61346ff85b32006eead.hot-update.js",
"/js/main.7438b1c96773ec7c117b.hot-update.js": "/js/main.7438b1c96773ec7c117b.hot-update.js",
"/js/main.57208a1c38d97296e434.hot-update.js": "/js/main.57208a1c38d97296e434.hot-update.js",
"/js/main.e628f7d3385e2a2ef98c.hot-update.js": "/js/main.e628f7d3385e2a2ef98c.hot-update.js",
"/js/main.1f78bb5045cbf5d5b2ab.hot-update.js": "/js/main.1f78bb5045cbf5d5b2ab.hot-update.js",
"/js/main.bf937e410c43e0490f3e.hot-update.js": "/js/main.bf937e410c43e0490f3e.hot-update.js",
"/js/main.2bdfbc971b8284cdd5dd.hot-update.js": "/js/main.2bdfbc971b8284cdd5dd.hot-update.js",
"/js/main.8ed4ac2e29e423c836d5.hot-update.js": "/js/main.8ed4ac2e29e423c836d5.hot-update.js",
"/js/main.a773c234813f7f59ea21.hot-update.js": "/js/main.a773c234813f7f59ea21.hot-update.js",
"/js/main.02e0714a77eaacfc9b9d.hot-update.js": "/js/main.02e0714a77eaacfc9b9d.hot-update.js",
"/js/main.719983c9ce15e21f9636.hot-update.js": "/js/main.719983c9ce15e21f9636.hot-update.js",
"/js/main.577d806ab2702acb2716.hot-update.js": "/js/main.577d806ab2702acb2716.hot-update.js",
"/js/main.858d81a352f82e9f3f9c.hot-update.js": "/js/main.858d81a352f82e9f3f9c.hot-update.js",
"/js/main.956fac21107cbf3261d8.hot-update.js": "/js/main.956fac21107cbf3261d8.hot-update.js",
"/js/main.90c59f47f12d9bcc22ed.hot-update.js": "/js/main.90c59f47f12d9bcc22ed.hot-update.js",
"/js/main.97d9f0487f71efec0ad8.hot-update.js": "/js/main.97d9f0487f71efec0ad8.hot-update.js",
"/js/main.eab1cb0ddc315d9d8e63.hot-update.js": "/js/main.eab1cb0ddc315d9d8e63.hot-update.js",
"/js/main.0932175d3c0680e5d3ca.hot-update.js": "/js/main.0932175d3c0680e5d3ca.hot-update.js",
"/js/main.52cdb3550871ffcfd27f.hot-update.js": "/js/main.52cdb3550871ffcfd27f.hot-update.js",
"/js/main.774e8e04b1fef4583d8e.hot-update.js": "/js/main.774e8e04b1fef4583d8e.hot-update.js",
"/js/main.3f9b03e8191cb287a85b.hot-update.js": "/js/main.3f9b03e8191cb287a85b.hot-update.js",
"/js/main.edb06e40d8434ab45ad2.hot-update.js": "/js/main.edb06e40d8434ab45ad2.hot-update.js",
"/js/main.69a487849c594ed128f8.hot-update.js": "/js/main.69a487849c594ed128f8.hot-update.js",
"/js/main.7d39c33c8a2cc4d8fc2a.hot-update.js": "/js/main.7d39c33c8a2cc4d8fc2a.hot-update.js",
"/js/main.45032e15888b698e07d3.hot-update.js": "/js/main.45032e15888b698e07d3.hot-update.js",
"/js/main.cbb36294d44ce8b744a8.hot-update.js": "/js/main.cbb36294d44ce8b744a8.hot-update.js",
"/js/main.4636fedf0e3dc4ce6310.hot-update.js": "/js/main.4636fedf0e3dc4ce6310.hot-update.js",
"/js/main.b225f543e8d8f1b943a2.hot-update.js": "/js/main.b225f543e8d8f1b943a2.hot-update.js",
"/js/main.21e1a10ce123d32b958f.hot-update.js": "/js/main.21e1a10ce123d32b958f.hot-update.js",
"/js/main.2c9d52fd3c43b4aa67d2.hot-update.js": "/js/main.2c9d52fd3c43b4aa67d2.hot-update.js",
"/js/main.ff40a67685b7affdbd5c.hot-update.js": "/js/main.ff40a67685b7affdbd5c.hot-update.js",
"/js/main.99d219118819c0350445.hot-update.js": "/js/main.99d219118819c0350445.hot-update.js",
"/js/main.5398ca9f735d3a64e52e.hot-update.js": "/js/main.5398ca9f735d3a64e52e.hot-update.js",
"/js/main.8174386864c5fe4441a6.hot-update.js": "/js/main.8174386864c5fe4441a6.hot-update.js",
"/js/main.feb45fb0981e9f202fd3.hot-update.js": "/js/main.feb45fb0981e9f202fd3.hot-update.js",
"/js/main.da396ceed9e30ceb5af0.hot-update.js": "/js/main.da396ceed9e30ceb5af0.hot-update.js",
"/js/main.aca367f050171142bb5d.hot-update.js": "/js/main.aca367f050171142bb5d.hot-update.js",
"/js/main.503de28b12695a2ea8d9.hot-update.js": "/js/main.503de28b12695a2ea8d9.hot-update.js",
"/js/main.6e845fd0a6fd0fd8a443.hot-update.js": "/js/main.6e845fd0a6fd0fd8a443.hot-update.js",
"/js/main.97035c76865a6dfe77b2.hot-update.js": "/js/main.97035c76865a6dfe77b2.hot-update.js",
"/js/main.699a1b9aff8f5c96c3fc.hot-update.js": "/js/main.699a1b9aff8f5c96c3fc.hot-update.js",
"/js/main.4a7448af897795b38429.hot-update.js": "/js/main.4a7448af897795b38429.hot-update.js",
"/js/main.b8ada50bdbc175d347fc.hot-update.js": "/js/main.b8ada50bdbc175d347fc.hot-update.js",
"/js/main.c9d53ab9c6494efae7d6.hot-update.js": "/js/main.c9d53ab9c6494efae7d6.hot-update.js",
"/js/main.c7088495b53e5da9ff55.hot-update.js": "/js/main.c7088495b53e5da9ff55.hot-update.js",
"/js/main.128801c5d0236a4f0cae.hot-update.js": "/js/main.128801c5d0236a4f0cae.hot-update.js",
"/js/main.0f0f3b2fce38f022eb6c.hot-update.js": "/js/main.0f0f3b2fce38f022eb6c.hot-update.js",
"/js/main.f2bcbc4d47558c951d52.hot-update.js": "/js/main.f2bcbc4d47558c951d52.hot-update.js",
"/js/main.e5f004cb4de1274104d6.hot-update.js": "/js/main.e5f004cb4de1274104d6.hot-update.js",
"/js/main.cb77d294afabeb3d886e.hot-update.js": "/js/main.cb77d294afabeb3d886e.hot-update.js",
"/js/main.fa4af75ec01fa7037aca.hot-update.js": "/js/main.fa4af75ec01fa7037aca.hot-update.js",
"/js/main.f5a4aa64e15d95fe9320.hot-update.js": "/js/main.f5a4aa64e15d95fe9320.hot-update.js",
"/js/main.237749ec1019bbaa0a76.hot-update.js": "/js/main.237749ec1019bbaa0a76.hot-update.js",
"/js/main.220d900c4944f3484a22.hot-update.js": "/js/main.220d900c4944f3484a22.hot-update.js",
"/js/main.512a975480bc9f38dc17.hot-update.js": "/js/main.512a975480bc9f38dc17.hot-update.js",
"/js/main.ee8106ce7b82dbd9444b.hot-update.js": "/js/main.ee8106ce7b82dbd9444b.hot-update.js",
"/js/main.1849c16927ac07b2b1aa.hot-update.js": "/js/main.1849c16927ac07b2b1aa.hot-update.js",
"/js/main.a69cc370f9ed64b6645f.hot-update.js": "/js/main.a69cc370f9ed64b6645f.hot-update.js",
"/js/main.2cdc62a383bb6fcaf6dc.hot-update.js": "/js/main.2cdc62a383bb6fcaf6dc.hot-update.js",
"/js/main.c148ebc9dc3a15bb7dab.hot-update.js": "/js/main.c148ebc9dc3a15bb7dab.hot-update.js",
"/js/main.33a67acf10fb8d19609f.hot-update.js": "/js/main.33a67acf10fb8d19609f.hot-update.js",
"/js/main.92ead65acab63b432b3c.hot-update.js": "/js/main.92ead65acab63b432b3c.hot-update.js",
"/js/main.dbb09a26457c6e7c4ae2.hot-update.js": "/js/main.dbb09a26457c6e7c4ae2.hot-update.js",
"/js/main.58429052d2f27081b8b1.hot-update.js": "/js/main.58429052d2f27081b8b1.hot-update.js",
"/js/main.d5ba0b9ac9cbf4a0cfde.hot-update.js": "/js/main.d5ba0b9ac9cbf4a0cfde.hot-update.js",
"/js/main.38803064b4400b0f1186.hot-update.js": "/js/main.38803064b4400b0f1186.hot-update.js",
"/js/main.452e0833715c3b8eaf0e.hot-update.js": "/js/main.452e0833715c3b8eaf0e.hot-update.js",
"/js/main.1a93799f2189ef8ab673.hot-update.js": "/js/main.1a93799f2189ef8ab673.hot-update.js",
"/js/main.234262f86903f4c09b40.hot-update.js": "/js/main.234262f86903f4c09b40.hot-update.js",
"/js/main.9e96ccc09f4d7ed12bf1.hot-update.js": "/js/main.9e96ccc09f4d7ed12bf1.hot-update.js",
"/chunks/files~chunks/shared-files~chunks/shared-page.1853a6a14cc35b4fd7f2.hot-update.js": "/chunks/files~chunks/shared-files~chunks/shared-page.1853a6a14cc35b4fd7f2.hot-update.js",
"/chunks/files~chunks/shared-files~chunks/shared-page.f927becf243980e7d47a.hot-update.js": "/chunks/files~chunks/shared-files~chunks/shared-page.f927becf243980e7d47a.hot-update.js",
"/chunks/files~chunks/shared-files~chunks/shared-page.015605f98a12c981878f.hot-update.js": "/chunks/files~chunks/shared-files~chunks/shared-page.015605f98a12c981878f.hot-update.js",
"/chunks/files~chunks/shared-files~chunks/shared-page.096b33ed1320fe355326.hot-update.js": "/chunks/files~chunks/shared-files~chunks/shared-page.096b33ed1320fe355326.hot-update.js",
"/chunks/files~chunks/shared-files~chunks/shared-page.1d18c0765854263681f7.hot-update.js": "/chunks/files~chunks/shared-files~chunks/shared-page.1d18c0765854263681f7.hot-update.js",
"/chunks/files~chunks/shared-files~chunks/shared-page.dc7ceb84610a7414585d.hot-update.js": "/chunks/files~chunks/shared-files~chunks/shared-page.dc7ceb84610a7414585d.hot-update.js",
"/chunks/files~chunks/shared-files~chunks/shared-page.82544ceb627118a38316.hot-update.js": "/chunks/files~chunks/shared-files~chunks/shared-page.82544ceb627118a38316.hot-update.js",
"/chunks/files~chunks/shared-files~chunks/shared-page.a8489658e4cb2d2df774.hot-update.js": "/chunks/files~chunks/shared-files~chunks/shared-page.a8489658e4cb2d2df774.hot-update.js",
"/chunks/files~chunks/shared-files~chunks/shared-page.37354c0a3a2eba1ddc06.hot-update.js": "/chunks/files~chunks/shared-files~chunks/shared-page.37354c0a3a2eba1ddc06.hot-update.js",
"/chunks/files~chunks/shared-files~chunks/shared-page.56e21aa6de7136acf329.hot-update.js": "/chunks/files~chunks/shared-files~chunks/shared-page.56e21aa6de7136acf329.hot-update.js",
"/chunks/files~chunks/shared-files~chunks/shared-page.2df22584b77a4c5ac2c1.hot-update.js": "/chunks/files~chunks/shared-files~chunks/shared-page.2df22584b77a4c5ac2c1.hot-update.js",
"/chunks/files~chunks/shared-files~chunks/shared-page.04dde3d822ca54043050.hot-update.js": "/chunks/files~chunks/shared-files~chunks/shared-page.04dde3d822ca54043050.hot-update.js",
"/js/main.b4971c610d768d176128.hot-update.js": "/js/main.b4971c610d768d176128.hot-update.js",
"/js/main.3ae461330f28b135050a.hot-update.js": "/js/main.3ae461330f28b135050a.hot-update.js",
"/js/main.1cf77a9b606fed9199c7.hot-update.js": "/js/main.1cf77a9b606fed9199c7.hot-update.js",
"/js/main.1c7d44093366db984cbc.hot-update.js": "/js/main.1c7d44093366db984cbc.hot-update.js",
"/js/main.98ee95cd8976e64dcd69.hot-update.js": "/js/main.98ee95cd8976e64dcd69.hot-update.js",
"/js/main.d319747e34b6fab5f3e2.hot-update.js": "/js/main.d319747e34b6fab5f3e2.hot-update.js",
"/js/main.c219b93db29a00e9bcb8.hot-update.js": "/js/main.c219b93db29a00e9bcb8.hot-update.js",
"/js/main.59aa3a6855ecc99a6a33.hot-update.js": "/js/main.59aa3a6855ecc99a6a33.hot-update.js",
"/js/main.a28ab59f18073856965b.hot-update.js": "/js/main.a28ab59f18073856965b.hot-update.js",
"/js/main.225416d288d3bb2e058c.hot-update.js": "/js/main.225416d288d3bb2e058c.hot-update.js",
"/js/main.07b05a6574f49b5548a2.hot-update.js": "/js/main.07b05a6574f49b5548a2.hot-update.js",
"/js/main.844ed4455d381379f767.hot-update.js": "/js/main.844ed4455d381379f767.hot-update.js",
"/js/main.617cdfeb91be0c191aff.hot-update.js": "/js/main.617cdfeb91be0c191aff.hot-update.js",
"/js/main.2ffd7e79fd251c4398f4.hot-update.js": "/js/main.2ffd7e79fd251c4398f4.hot-update.js",
"/js/main.462ef45463c553868ace.hot-update.js": "/js/main.462ef45463c553868ace.hot-update.js",
"/js/main.27f9b9ed82672990c6a1.hot-update.js": "/js/main.27f9b9ed82672990c6a1.hot-update.js",
"/js/main.97b39ceced7b7b8d7394.hot-update.js": "/js/main.97b39ceced7b7b8d7394.hot-update.js",
"/js/main.d2ef59129d36f48bfa2f.hot-update.js": "/js/main.d2ef59129d36f48bfa2f.hot-update.js",
"/chunks/files~chunks/shared-files~chunks/shared-page.303b94f7dbf7d66b5875.hot-update.js": "/chunks/files~chunks/shared-files~chunks/shared-page.303b94f7dbf7d66b5875.hot-update.js",
"/chunks/files~chunks/shared-files~chunks/shared-page.e4dba01040bbd6db6593.hot-update.js": "/chunks/files~chunks/shared-files~chunks/shared-page.e4dba01040bbd6db6593.hot-update.js",
"/chunks/files~chunks/shared-files~chunks/shared-page.c0f1a3683e3821551434.hot-update.js": "/chunks/files~chunks/shared-files~chunks/shared-page.c0f1a3683e3821551434.hot-update.js",
"/chunks/files~chunks/shared-files~chunks/shared-page.c215c60b80529c9d1579.hot-update.js": "/chunks/files~chunks/shared-files~chunks/shared-page.c215c60b80529c9d1579.hot-update.js",
"/chunks/files~chunks/shared-files~chunks/shared-page.3df72451eda4ff710fb6.hot-update.js": "/chunks/files~chunks/shared-files~chunks/shared-page.3df72451eda4ff710fb6.hot-update.js",
"/chunks/files~chunks/shared-files~chunks/shared-page.aaa575c34183f5001f38.hot-update.js": "/chunks/files~chunks/shared-files~chunks/shared-page.aaa575c34183f5001f38.hot-update.js",
"/chunks/files~chunks/shared-files~chunks/shared-page.50fe4e0f9c163ccf3bb0.hot-update.js": "/chunks/files~chunks/shared-files~chunks/shared-page.50fe4e0f9c163ccf3bb0.hot-update.js",
"/chunks/files~chunks/shared-files~chunks/shared-page.24f659046318799d5582.hot-update.js": "/chunks/files~chunks/shared-files~chunks/shared-page.24f659046318799d5582.hot-update.js",
"/chunks/files~chunks/shared-files~chunks/shared-page.badb64fc4533bf26e709.hot-update.js": "/chunks/files~chunks/shared-files~chunks/shared-page.badb64fc4533bf26e709.hot-update.js",
"/chunks/files~chunks/shared-files~chunks/shared-page.1cf58302bb6960c975c8.hot-update.js": "/chunks/files~chunks/shared-files~chunks/shared-page.1cf58302bb6960c975c8.hot-update.js",
"/js/main.228377eb2f032e19621d.hot-update.js": "/js/main.228377eb2f032e19621d.hot-update.js",
"/js/main.6a8766e2978e606f4efc.hot-update.js": "/js/main.6a8766e2978e606f4efc.hot-update.js",
"/js/main.223bfd09dd729e8fb76b.hot-update.js": "/js/main.223bfd09dd729e8fb76b.hot-update.js",
"/js/main.3886eb4f871aabeb28e5.hot-update.js": "/js/main.3886eb4f871aabeb28e5.hot-update.js",
"/js/main.4fbe91412aa7cf8565e2.hot-update.js": "/js/main.4fbe91412aa7cf8565e2.hot-update.js"
"/js/main.d83583876987f36df6b8.hot-update.js": "/js/main.d83583876987f36df6b8.hot-update.js",
"/js/main.49802462cdf65df4676c.hot-update.js": "/js/main.49802462cdf65df4676c.hot-update.js",
"/js/main.9c970ec909adce157866.hot-update.js": "/js/main.9c970ec909adce157866.hot-update.js",
"/js/main.5fb8e5212adaa6a7b208.hot-update.js": "/js/main.5fb8e5212adaa6a7b208.hot-update.js",
"/js/main.16650d32da49bbb800ac.hot-update.js": "/js/main.16650d32da49bbb800ac.hot-update.js",
"/js/main.d31d77135031cfc391de.hot-update.js": "/js/main.d31d77135031cfc391de.hot-update.js",
"/js/main.057f5121d85b27756cc6.hot-update.js": "/js/main.057f5121d85b27756cc6.hot-update.js",
"/js/main.d945537113f0848d8a88.hot-update.js": "/js/main.d945537113f0848d8a88.hot-update.js",
"/js/main.584afc298489d3b4d533.hot-update.js": "/js/main.584afc298489d3b4d533.hot-update.js",
"/js/main.7ba5414dc1654e6ded67.hot-update.js": "/js/main.7ba5414dc1654e6ded67.hot-update.js",
"/js/main.86966d0282fee6167620.hot-update.js": "/js/main.86966d0282fee6167620.hot-update.js",
"/js/main.fb559d55100f8d2eca4d.hot-update.js": "/js/main.fb559d55100f8d2eca4d.hot-update.js",
"/js/main.20dab96dfb66dcb8bced.hot-update.js": "/js/main.20dab96dfb66dcb8bced.hot-update.js",
"/js/main.97e744453baf7f5485ce.hot-update.js": "/js/main.97e744453baf7f5485ce.hot-update.js",
"/js/main.1792ac8c502b673e3011.hot-update.js": "/js/main.1792ac8c502b673e3011.hot-update.js",
"/js/main.e085096c539382bd7b2f.hot-update.js": "/js/main.e085096c539382bd7b2f.hot-update.js",
"/js/main.8bf0eec3d3a529852672.hot-update.js": "/js/main.8bf0eec3d3a529852672.hot-update.js",
"/js/main.ee247e2f807d75c5d10d.hot-update.js": "/js/main.ee247e2f807d75c5d10d.hot-update.js",
"/js/main.65fc57a1c1bb1924b483.hot-update.js": "/js/main.65fc57a1c1bb1924b483.hot-update.js",
"/js/main.10a12e697aa8dc8fb094.hot-update.js": "/js/main.10a12e697aa8dc8fb094.hot-update.js",
"/js/main.24df4cc6fc3a1a0b22ab.hot-update.js": "/js/main.24df4cc6fc3a1a0b22ab.hot-update.js",
"/js/main.c87d1e1905f3a3ab37a3.hot-update.js": "/js/main.c87d1e1905f3a3ab37a3.hot-update.js",
"/js/main.3672a53f8b55375d8c8e.hot-update.js": "/js/main.3672a53f8b55375d8c8e.hot-update.js",
"/js/main.8e7ea1713e1f6fa13484.hot-update.js": "/js/main.8e7ea1713e1f6fa13484.hot-update.js",
"/js/main.ec99c43313882992c378.hot-update.js": "/js/main.ec99c43313882992c378.hot-update.js",
"/js/main.4ec54458775fa5ada1fd.hot-update.js": "/js/main.4ec54458775fa5ada1fd.hot-update.js",
"/js/main.e50aea748bc03f82b612.hot-update.js": "/js/main.e50aea748bc03f82b612.hot-update.js",
"/js/main.e7528d831cdad6914026.hot-update.js": "/js/main.e7528d831cdad6914026.hot-update.js",
"/js/main.b9efb30bfaa86ea01c8a.hot-update.js": "/js/main.b9efb30bfaa86ea01c8a.hot-update.js",
"/js/main.28bd654e59013dc0d4be.hot-update.js": "/js/main.28bd654e59013dc0d4be.hot-update.js",
"/js/main.7884305d4592aaeaaf95.hot-update.js": "/js/main.7884305d4592aaeaaf95.hot-update.js",
"/js/main.73c766a268b2f2a0d0e1.hot-update.js": "/js/main.73c766a268b2f2a0d0e1.hot-update.js",
"/js/main.5df5b00fce58de42a3c4.hot-update.js": "/js/main.5df5b00fce58de42a3c4.hot-update.js",
"/js/main.15752cd5687d5cfd275b.hot-update.js": "/js/main.15752cd5687d5cfd275b.hot-update.js",
"/js/main.65cd0241aad9a18c205a.hot-update.js": "/js/main.65cd0241aad9a18c205a.hot-update.js",
"/js/main.a58fbdb65dc26ff29cbc.hot-update.js": "/js/main.a58fbdb65dc26ff29cbc.hot-update.js",
"/js/main.3f752e40b0eb5c9edb86.hot-update.js": "/js/main.3f752e40b0eb5c9edb86.hot-update.js",
"/js/main.3a94369aa0ffee771f8d.hot-update.js": "/js/main.3a94369aa0ffee771f8d.hot-update.js",
"/js/main.b51471b22f71626e4409.hot-update.js": "/js/main.b51471b22f71626e4409.hot-update.js"
}

View File

@@ -1,22 +1,29 @@
<template>
<div class="inline-wrapper icon-append copy-input" :class="size" @click="copyUrl">
<input ref="sel" :value="value" id="link-input" type="text" class="input-text" readonly>
<div class="icon">
<link-icon v-if="! isCopiedLink" size="14"></link-icon>
<check-icon v-if="isCopiedLink" size="14"></check-icon>
<div :class="[shareViaEmail ? 'multi-icon' : 'icon' ]">
<div>
<link-icon v-if="! isCopiedLink" size="14"></link-icon>
<check-icon v-if="isCopiedLink" size="14"></check-icon>
</div>
<div @click.stop.prevent="menuForEmail" v-if="! isCopiedLink && shareViaEmail">
<send-icon size="14"></send-icon>
</div>
</div>
</div>
</template>
<script>
import { LinkIcon, CheckIcon } from 'vue-feather-icons'
import { LinkIcon, CheckIcon,SendIcon } from 'vue-feather-icons'
import {events} from '@/bus'
export default {
name: 'CopyInput',
props: ['size', 'value'],
props: ['size', 'value', 'shareViaEmail'],
components: {
CheckIcon,
LinkIcon,
SendIcon,
},
data() {
return {
@@ -24,6 +31,9 @@
}
},
methods: {
menuForEmail(){
events.$emit('openSendToRecipientsMenu')
},
copyUrl() {
// Get input value
@@ -52,6 +62,46 @@
@import "@assets/vue-file-manager/_inapp-forms.scss";
@import "@assets/vue-file-manager/_forms.scss";
.multi-icon {
display: flex;
align-items: center;
background: $light_background;
border-bottom-right-radius: 8px ;
border-top-right-radius: 8px ;
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.12);
line,
path,
polygon {
stroke: $text !important;
}
& > * {
padding: 9px 10px;
display: flex;
align-items: center;
border-left: 1px solid $dark_background;
&:hover {
background: $text;
line,
polyline,
path,
polygon {
stroke: white !important;
}
}
&:last-child {
border-bottom-right-radius: 8px ;
border-top-right-radius: 8px ;
}
}
}
// Single page
.copy-input {
@@ -86,6 +136,33 @@
@media (prefers-color-scheme: dark) {
.multi-icon {
background: $dark_mode_foreground;
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.12);
line,
path,
polygon {
stroke: $dark_mode_text_primary !important;
}
& > * {
border-left: 1px solid $dark_mode_background;
&:hover {
background: rgba($theme, 0.1);
line,
polyline,
path,
polygon {
stroke: $theme !important;
}
}
}
}
.copy-input {
input {
color: $dark_mode_text_primary;

View File

@@ -1,6 +1,6 @@
<template>
<div class="wrapper">
<label class="input-label">{{$t('shared_form.recipients_label')}}</label>
<label class="input-label">{{ label }}:</label>
<div class="input-wrapper" :class="{'is-error' : isError}" @click="$refs.input.focus()">
<div class="email-list" v-for="(email, index) in emails" :key="index">
<span>
@@ -27,7 +27,7 @@
export default {
name: "EmailsInput",
components: {XIcon},
props: ["isError"],
props: ["isError", 'label'],
computed: {
placeHolder() {
if(! this.emails.length)

View File

@@ -28,7 +28,7 @@
<!-- Share via Email -->
<TableOption :title="$t('shared_form.share_by_email')" icon="email">
<ValidationProvider tag="div" mode="passive" name="Email" rules="required" v-slot="{ errors }">
<EmailsInput rules="required" v-model="shareOptions.emails" :isError="errors[0]" />
<EmailsInput rules="required" v-model="shareOptions.emails" :label="$t('shared_form.recipients_label')" :isError="errors[0]" />
</ValidationProvider>
</TableOption>

View File

@@ -9,14 +9,28 @@
<!--Item Thumbnail-->
<ThumbnailItem class="item-thumbnail" :item="pickedItem" info="metadata"/>
<!--Form to set sharing-->
<ValidationObserver ref="shareForm" v-slot="{ invalid }" tag="form" class="form-wrapper">
<!-- Infobox for successfull sended email -->
<div v-if="sendToRecipientsMenu && isEmailSended" class="info-box">
<InfoBox >
{{$t('shared_form.email_successfully_send_message')}}
</InfoBox>
</div>
<!--Share link-->
<div class="input-wrapper">
<div v-if="! sendToRecipientsMenu || (sendToRecipientsMenu && isEmailSended)" class="input-wrapper copy-input">
<label class="input-label">{{ $t('shared_form.label_shared_url') }}:</label>
<CopyInput size="small" :value="pickedItem.shared.link" />
</div>
<CopyInput size="small" :value="pickedItem.shared.link" :share-via-email="sendToRecipientsMenu ? false : true" />
</div>
<ValidationObserver v-if="sendToRecipientsMenu && !isEmailSended" v-slot="{ invalid }" ref="shareEmail" tag="form" class="form-wrapper">
<ValidationProvider tag="div" mode="passive" name="Email" rules="required" v-slot="{ errors }">
<EmailsInput rules="required" v-model="emails" :label="$t('shared_form.label_send_to_recipients')" :isError="errors[0]" />
</ValidationProvider>
</ValidationObserver>
<!--Form to set sharing-->
<ValidationObserver v-if="! sendToRecipientsMenu" ref="shareForm" v-slot="{ invalid }" tag="form" class="form-wrapper">
<!--Permision Select-->
<ValidationProvider v-if="isFolder" tag="div" mode="passive" class="input-wrapper" name="Permission" rules="required" v-slot="{ errors }">
@@ -58,7 +72,7 @@
<!--Actions-->
<PopupActions>
<ButtonBase
<ButtonBase v-if="! sendToRecipientsMenu || (sendToRecipientsMenu && !isEmailSended)"
class="popup-button"
@click.native="destroySharing"
:button-style="destroyButtonStyle"
@@ -72,7 +86,7 @@
button-style="theme"
:loading="isLoading"
:disabled="isLoading"
>{{ $t('popup_share_edit.save') }}
>{{ secondButtonText }}
</ButtonBase>
</PopupActions>
</PopupWrapper>
@@ -87,10 +101,12 @@
import PopupHeader from '@/components/Others/Popup/PopupHeader'
import SwitchInput from '@/components/Others/Forms/SwitchInput'
import SelectInput from '@/components/Others/Forms/SelectInput'
import EmailsInput from '@/components/Others/Forms/EmailsInput'
import ThumbnailItem from '@/components/Others/ThumbnailItem'
import ActionButton from '@/components/Others/ActionButton'
import CopyInput from '@/components/Others/Forms/CopyInput'
import ButtonBase from '@/components/FilesView/ButtonBase'
import InfoBox from '@/components/Others/Forms/InfoBox'
import {required} from 'vee-validate/dist/rules'
import {mapGetters} from 'vuex'
import {events} from '@/bus'
@@ -109,10 +125,12 @@
PopupContent,
PopupHeader,
SelectInput,
EmailsInput,
SwitchInput,
ButtonBase,
CopyInput,
required,
InfoBox,
},
computed: {
...mapGetters([
@@ -125,10 +143,26 @@
return this.pickedItem && this.pickedItem.type === 'folder'
},
destroyButtonText() {
return this.isConfirmedDestroy ? this.$t('popup_share_edit.confirm') : this.$t('popup_share_edit.stop')
if(! this.sendToRecipientsMenu)
return this.isConfirmedDestroy ? this.$t('popup_share_edit.confirm') : this.$t('popup_share_edit.stop')
if(this.sendToRecipientsMenu)
return this.$t('popup_share_edit.go_back')
},
destroyButtonStyle() {
return this.isConfirmedDestroy ? 'danger-solid' : 'secondary'
if(! this.sendToRecipientsMenu)
return this.isConfirmedDestroy ? 'danger-solid' : 'secondary'
if(this.sendToRecipientsMenu)
return 'secondary'
},
secondButtonText(){
if(! this.sendToRecipientsMenu)
return this.$t('popup_share_edit.save')
if(this.sendToRecipientsMenu)
return this.isEmailSended ? this.$t('shared_form.button_done') : this.$t('popup_share_edit.send_to_recipients')
},
isSharedLocation() {
return this.currentFolder && this.currentFolder.location === 'shared'
@@ -139,11 +173,14 @@
},
data() {
return {
sendToRecipientsMenu: false,
isConfirmedDestroy: false,
canChangePassword: false,
shareOptions: undefined,
pickedItem: undefined,
emails:undefined,
isMoreOptions: false,
isEmailSended:false,
isDeleting: false,
isLoading: false,
}
@@ -158,8 +195,39 @@
changePassword() {
this.canChangePassword = false
},
async sendViaEmail() {
// Validate email field
const isValid = await this.$refs.shareEmail.validate();
if (!isValid) return;
this.isLoading = true
axios.
post(`/api/share/${this.shareOptions.token}/send-email`, {
emails: this.emails
})
.catch(() => {
this.$isSomethingWrong()
})
.finally(() => {
this.isEmailSended = true
// End loading
this.isLoading = false
})
},
async destroySharing() {
if(this.sendToRecipientsMenu) {
this.sendToRecipientsMenu = false
return
}
// Set confirm button
if (! this.isConfirmedDestroy) {
@@ -188,6 +256,18 @@
},
async updateShareOptions() {
// If is open send share via email
if(this.sendToRecipientsMenu && !this.isEmailSended) {
this.sendViaEmail()
return
}
// Is is open send share via email and email was already sended
if(this.sendToRecipientsMenu && this.isEmailSended){
events.$emit('popup:close')
return
}
// If shared was generated, then close popup
if (this.isGeneratedShared) {
@@ -231,6 +311,16 @@
},
mounted() {
this.sendToRecipientsMenu = false
events.$on('emailsInputValues', (emails) => {
this.emails = emails
})
events.$on('openSendToRecipientsMenu', () => {
this.sendToRecipientsMenu = true
})
// Show popup
events.$on('popup:open', args => {
@@ -259,6 +349,8 @@
// Restore data
setTimeout(() => {
this.sendToRecipientsMenu = false
this.isEmailSended = false
this.isConfirmedDestroy = false
this.canChangePassword = false
this.pickedItem = undefined
@@ -273,11 +365,26 @@
@import "@assets/vue-file-manager/_inapp-forms.scss";
@import '@assets/vue-file-manager/_forms';
.info-box {
padding: 0px 20px;
/deep/.info-box {
@include font-size(14);
font-weight: 700;
height: 40px;
display: flex;
align-items: center;
}
}
.input-wrapper {
&.password {
margin-top: -10px;
}
&.copy-input {
padding: 0px 20px;
}
}
.change-password {

View File

@@ -598,7 +598,9 @@
"confirm": "确认",
"save": "保存更改",
"stop": "停止风险",
"title": "更新分享设定"
"title": "更新分享设定",
"go_back": "Go Back",
"send_to_recipients": "Send to Recipients"
},
"popup_signup_error": {
"message": "Please check your database connection if everything works correctly.",
@@ -691,6 +693,7 @@
"label_permission": "权限",
"label_shared_url": "分享链接",
"label_share_vie_email": "Get your link",
"label_send_to_recipients": "Send to Recipients",
"label_expiration": "Link Expiration",
"expiration_hour": "{value}h.",
"expiration_day": "{value}d.",
@@ -698,7 +701,7 @@
"email_successfully_send_message": "Your item was successfully sended to recipients emails.",
"share_by_link": "Share by Link",
"share_by_email": "Share by Email",
"recipients_label": "Recipients:",
"recipients_label": "Recipients",
"email_placeholder": "Type your emails"
},
"sidebar": {

View File

@@ -608,7 +608,9 @@
"confirm": "Confirm",
"save": "Save Changes",
"stop": "Stop Sharing",
"title": "Update sharing options"
"title": "Update sharing options",
"go_back": "Go Back",
"send_to_recipients": "Send to Recipients"
},
"popup_signup_error": {
"message": "Please check your database connection if everything works correctly.",
@@ -702,6 +704,7 @@
"label_permission": "Permission",
"label_shared_url": "Share url",
"label_share_vie_email": "Get your link",
"label_send_to_recipients": "Send to Recipients",
"label_expiration": "Link Expiration",
"expiration_hour": "{value}h.",
"expiration_day": "{value}d.",
@@ -709,7 +712,7 @@
"email_successfully_send_message": "Your item was successfully sended to recipients emails.",
"share_by_link": "Share by Link",
"share_by_email": "Share by Email",
"recipients_label": "Recipients:",
"recipients_label": "Recipients",
"email_placeholder": "Type your emails"
},
"sidebar": {

View File

@@ -600,7 +600,9 @@
"confirm": "Potvrdiť",
"save": "Uložiť zmeny",
"stop": "Zastaviť zdieľanie",
"title": "Upraviť nastavenia zdieľania"
"title": "Upraviť nastavenia zdieľania",
"go_back": "Spať",
"send_to_recipients": "Odoslať príjemcom"
},
"popup_signup_error": {
"message": "Prosím skontrolujte databázove spojenie, či všetko funguje správne.",
@@ -693,6 +695,7 @@
"label_permission": "Oprávnenie",
"label_shared_url": "Zdieľací odkaz",
"label_share_vie_email": "Získajte odkaz",
"label_send_to_recipients": "Odoslať príjemcom",
"label_expiration": "Expirácia Linku",
"expiration_hour": "{value}h.",
"expiration_day": "{value}d.",
@@ -700,7 +703,7 @@
"email_successfully_send_message": "Vaša položka bola úspešne odoslaná na e-maily príjemcov.",
"share_by_link": "Zdieľať odkazom",
"share_by_email": "Zdieľať e-mailom",
"recipients_label": "Príjemcovia:",
"recipients_label": "Príjemcovia",
"email_placeholder": "Zadajte e-mailové adresy"
},
"sidebar": {