Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb2eb4a4

Browse files
committed
Auth functionality added.
1 parent5c59d35 commitb2eb4a4

26 files changed

+123
-10
lines changed

‎package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name":"laravel-frontend-file-manager",
3-
"version":"3.0.44",
3+
"version":"3.0.52",
44
"description":"File manager for Laravel",
55
"keywords": [
66
"laravel",

‎src/FileManager.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ export default {
9494
this.responseInterceptor();
9595
9696
// initialize app settings
97+
// Mohammad Ashrafuddin Ferdousi : 1
98+
// Mohammad Ashrafuddin Ferdousi : 2
9799
this.$store.dispatch('fm/initializeApp');
98100
},
99101
destroyed() {

‎src/components/blocks/NavbarBlock.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,9 @@ export default {
252252
/**
253253
* Refresh file manager
254254
*/
255+
// Mohammad Ashrafuddin Ferdousi : 2
255256
refreshAll() {
257+
// Mohammad Ashrafuddin Ferdousi : 2
256258
this.$store.dispatch('fm/refreshAll');
257259
},
258260
@@ -294,7 +296,9 @@ export default {
294296
/**
295297
* Paste
296298
*/
299+
// Mohammad Ashrafuddin Ferdousi : 17
297300
paste() {
301+
// Mohammad Ashrafuddin Ferdousi : 17
298302
this.$store.dispatch('fm/paste');
299303
},
300304

‎src/components/blocks/mixins/contextMenuActions.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,10 @@ export default {
6464
/**
6565
* Select file
6666
*/
67+
// Mohammad Ashrafuddin Ferdousi : 5
6768
selectAction(){
6869
// file callback
70+
// Mohammad Ashrafuddin Ferdousi : 5
6971
this.$store
7072
.dispatch('fm/url',{
7173
disk:this.selectedDisk,
@@ -81,13 +83,15 @@ export default {
8183
/**
8284
* Download file
8385
*/
86+
// Mohammad Ashrafuddin Ferdousi : 10
8487
downloadAction(){
8588
consttempLink=document.createElement('a');
8689
tempLink.style.display='none';
8790
tempLink.setAttribute('download',this.selectedItems[0].basename);
8891

8992
// download file with authorization
9093
if(this.$store.getters['fm/settings/authHeader']){
94+
// Mohammad Ashrafuddin Ferdousi : 10
9195
HTTP.download(this.selectedDisk,this.selectedItems[0].path).then((response)=>{
9296
tempLink.href=window.URL.createObjectURL(newBlob([response.data]));
9397
document.body.appendChild(tempLink);
@@ -134,8 +138,10 @@ export default {
134138
/**
135139
* Paste copied or cut items
136140
*/
141+
// Mohammad Ashrafuddin Ferdousi : 17
137142
pasteAction(){
138143
// paste items in the selected folder
144+
// Mohammad Ashrafuddin Ferdousi : 17
139145
this.$store.dispatch('fm/paste');
140146
},
141147

‎src/components/manager/DiskList.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,12 @@ export default {
4343
* Select disk
4444
*@paramdisk
4545
*/
46+
// Mohammad Ashrafuddin Ferdousi : 3
47+
// Mohammad Ashrafuddin Ferdousi : 2
4648
selectDisk(disk) {
4749
if (this.selectedDisk!== disk) {
50+
// Mohammad Ashrafuddin Ferdousi : 2
51+
// Mohammad Ashrafuddin Ferdousi : 3
4852
this.$store.dispatch('fm/selectDisk', {
4953
disk,
5054
manager:this.manager,

‎src/components/manager/Thumbnail.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,12 @@ export default {
6666
/**
6767
* Load image
6868
*/
69+
// Mohammad Ashrafuddin Ferdousi : 8
6970
loadImage() {
7071
// if authorization required
7172
if (this.auth) {
72-
GET.thumbnail(this.disk,this.file.path).then((response)=> {
73+
// Mohammad Ashrafuddin Ferdousi : 8
74+
GET.thumbnail(this.disk,`${this.file.path}&token=${window.localStorage.getItem('_token')}`).then((response)=> {
7375
// FIXED: Mohammad Ashrafuddin Ferdousi
7476
constmimeType=response.data.headers['Content-Type'].toLowerCase();
7577
//const imgBase64 = Buffer.from(response.data, 'binary').toString('base64');
@@ -78,7 +80,7 @@ export default {
7880
}else {
7981
this.src=`${this.$store.getters['fm/settings/baseUrl']}thumbnails?disk=${
8082
this.disk
81-
}&path=${encodeURIComponent(this.file.path)}&v=${this.file.timestamp}`;
83+
}&path=${encodeURIComponent(this.file.path)}&v=${this.file.timestamp}&token=${window.localStorage.getItem('_token')}`;
8284
}
8385
},
8486
},

‎src/components/manager/mixins/manager.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,12 @@ export default {
146146
*@param path
147147
*@param extension
148148
*/
149+
// Mohammad Ashrafuddin Ferdousi : 7
150+
// Mohammad Ashrafuddin Ferdousi : 5
149151
selectAction(path,extension){
150152
// if is set fileCallback
151153
if(this.$store.state.fm.fileCallback){
154+
// Mohammad Ashrafuddin Ferdousi : 5
152155
this.$store
153156
.dispatch('fm/url',{
154157
disk:this.selectedDisk,
@@ -195,6 +198,7 @@ export default {
195198
});
196199
}elseif(extension.toLowerCase()==='pdf'){
197200
// show pdf document
201+
// Mohammad Ashrafuddin Ferdousi : 7
198202
this.$store.dispatch('fm/openPDF',{
199203
disk:this.selectedDisk,
200204
path,

‎src/components/modals/additions/CropperModule.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ export default {
234234
/**
235235
* Save cropped image
236236
*/
237+
// Mohammad Ashrafuddin Ferdousi : 12
237238
cropSave() {
238239
this.cropper.getCroppedCanvas().toBlob(
239240
(blob)=> {
@@ -245,6 +246,7 @@ export default {
245246
// new image
246247
formData.append('file', blob,this.selectedItem.basename);
247248
249+
// Mohammad Ashrafuddin Ferdousi : 12
248250
this.$store.dispatch('fm/updateFile', formData).then((response)=> {
249251
// if file updated successfully
250252
if (response.data.result.status==='success') {

‎src/components/modals/views/AudioPlayerModal.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ export default {
131131
{
132132
src:`${this.$store.getters['fm/settings/baseUrl']}stream-file?disk=${
133133
this.selectedDisk
134-
}&path=${encodeURIComponent(this.audioFiles[index].path)}`,
134+
}&path=${encodeURIComponent(this.audioFiles[index].path)}&token=${window.localStorage.getItem('_token')}`,
135135
type:`audio/${this.audioFiles[index].extension}`,
136136
},
137137
],

‎src/components/modals/views/DeleteModal.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,14 @@ export default {
4141
/**
4242
* Delete selected directories and files
4343
*/
44+
// Mohammad Ashrafuddin Ferdousi : 15
4445
deleteItems() {
4546
// create items list for delete
4647
constitems=this.selectedItems.map((item)=> ({
4748
path:item.path,
4849
type:item.type,
4950
}));
50-
51+
// Mohammad Ashrafuddin Ferdousi : 15
5152
this.$store.dispatch('fm/delete', items).then(()=> {
5253
this.hideModal();
5354
});

‎src/components/modals/views/NewFileModal.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ export default {
7070
/**
7171
* Create new file
7272
*/
73+
// Mohammad Ashrafuddin Ferdousi : 11
7374
addFile() {
75+
// Mohammad Ashrafuddin Ferdousi : 11
7476
this.$store.dispatch('fm/createFile',this.fileName).then((response)=> {
7577
if (response.data.result.status==='success') {
7678
this.hideModal();

‎src/components/modals/views/NewFolderModal.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ export default {
7272
/**
7373
* Create new directory
7474
*/
75+
// Mohammad Ashrafuddin Ferdousi : 13
7576
addFolder() {
77+
// Mohammad Ashrafuddin Ferdousi : 13
7678
this.$store.dispatch('fm/createDirectory',this.directoryName).then((response)=> {
7779
if (response.data.result.status==='success') {
7880
this.hideModal();

‎src/components/modals/views/PreviewModal.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,12 @@ export default {
127127
/**
128128
* Load image
129129
*/
130+
// Mohammad Ashrafuddin Ferdousi : 9
130131
loadImage() {
131132
// if authorization required
132133
if (this.auth) {
133-
GET.preview(this.selectedDisk,this.selectedItem.path).then((response)=> {
134+
// Mohammad Ashrafuddin Ferdousi : 9
135+
GET.preview(this.selectedDisk,`${this.selectedItem.path}&token=${window.localStorage.getItem('_token')}`).then((response)=> {
134136
// FIXED: Mohammad Ashrafuddin Ferdousi
135137
constmimeType=response.data.headers['Content-Type'].toLowerCase();
136138
// const imgBase64 = Buffer.from(response.data, 'binary').toString('base64');
@@ -140,7 +142,7 @@ export default {
140142
}else {
141143
this.imgSrc=`${this.$store.getters['fm/settings/baseUrl']}preview?disk=${
142144
this.selectedDisk
143-
}&path=${encodeURIComponent(this.selectedItem.path)}&v=${this.selectedItem.timestamp}`;
145+
}&path=${encodeURIComponent(this.selectedItem.path)}&v=${this.selectedItem.timestamp}&token=${window.localStorage.getItem('_token')}`;
144146
}
145147
},
146148
},

‎src/components/modals/views/PropertiesModal.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,9 @@ export default {
123123
/**
124124
* Get URL
125125
*/
126+
// Mohammad Ashrafuddin Ferdousi : 5
126127
getUrl() {
128+
// Mohammad Ashrafuddin Ferdousi : 5
127129
this.$store
128130
.dispatch('fm/url', {
129131
disk:this.selectedDisk,

‎src/components/modals/views/RenameModal.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,11 @@ export default {
9595
/**
9696
* Rename item
9797
*/
98+
// Mohammad Ashrafuddin Ferdousi : 16
9899
rename() {
99100
// create new name with path
100101
constnewName=this.selectedItem.dirname?`${this.selectedItem.dirname}/${this.name}`:this.name;
101-
102+
// Mohammad Ashrafuddin Ferdousi : 16
102103
this.$store
103104
.dispatch('fm/rename', {
104105
type:this.selectedItem.type,

‎src/components/modals/views/TextEditModal.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export default {
6363
},
6464
mounted() {
6565
// get file for edit
66+
// Mohammad Ashrafuddin Ferdousi : 6
6667
this.$store
6768
.dispatch('fm/getFile', {
6869
disk:this.selectedDisk,
@@ -123,6 +124,7 @@ export default {
123124
/**
124125
* Update file
125126
*/
127+
// Mohammad Ashrafuddin Ferdousi : 12
126128
updateFile() {
127129
constformData=newFormData();
128130
// add disk name
@@ -132,6 +134,7 @@ export default {
132134
// add updated file
133135
formData.append('file',newBlob([this.editedCode]),this.selectedItem.basename);
134136
137+
// Mohammad Ashrafuddin Ferdousi : 12
135138
this.$store.dispatch('fm/updateFile', formData).then((response)=> {
136139
if (response.data.result.status==='success') {
137140
this.hideModal();

‎src/components/modals/views/UnzipModal.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ export default {
105105
/**
106106
* Unpack selected archive
107107
*/
108+
// Mohammad Ashrafuddin Ferdousi : 19
108109
unpackArchive() {
110+
// Mohammad Ashrafuddin Ferdousi : 19
109111
this.$store.dispatch('fm/unzip',this.createFolder?this.directoryName:null).then(()=> {
110112
this.hideModal();
111113
});

‎src/components/modals/views/UploadModal.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,12 @@ export default {
164164
/**
165165
* Upload new files
166166
*/
167+
// Mohammad Ashrafuddin Ferdousi : 14
167168
uploadFiles() {
168169
// if files exists
169170
if (this.countFiles) {
170171
// upload files
172+
// Mohammad Ashrafuddin Ferdousi : 14
171173
this.$store
172174
.dispatch('fm/upload', {
173175
files:this.newFiles,

‎src/components/modals/views/VideoPlayerModal.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default {
3636
{
3737
src:`${this.$store.getters['fm/settings/baseUrl']}stream-file?disk=${
3838
this.selectedDisk
39-
}&path=${encodeURIComponent(this.videoFile.path)}`,
39+
}&path=${encodeURIComponent(this.videoFile.path)}&token=${window.localStorage.getItem('_token')}`,
4040
type:`audio/${this.videoFile.extension}`,
4141
},
4242
],

‎src/components/modals/views/ZipModal.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ export default {
7979
/**
8080
* Create new archive
8181
*/
82+
// Mohammad Ashrafuddin Ferdousi : 18
8283
createArchive() {
84+
// Mohammad Ashrafuddin Ferdousi : 18
8385
this.$store.dispatch('fm/zip',`${this.archiveName}.zip`).then(()=> {
8486
// close modal window
8587
this.hideModal();

‎src/components/tree/TreeBranch.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,14 @@ export default {
6767
*@parampath
6868
*@paramshowState
6969
*/
70+
// Mohammad Ashrafuddin Ferdousi : 2
7071
showSubdirectories(path,showState) {
7172
if (showState) {
7273
// hide
7374
this.$store.dispatch('fm/tree/hideSubdirectories', path);
7475
}else {
7576
// show
77+
// Mohammad Ashrafuddin Ferdousi : 2
7678
this.$store.dispatch('fm/tree/showSubdirectories', path);
7779
}
7880
},

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp