leeseohyeon

.

{
<<<<<<< HEAD
"accessKeyId": "ASIAZQ5XTMMF3ZUR2BUN",
"secretAccessKey": "eWtyyVMNd0bRvfEWHr2/8QS9Pz7kx8CfE+s1e9kZ",
"sessionToken": "FwoGZXIvYXdzELP//////////wEaDNHd6noZfvBmcxG92CLDAeuqzY82tmA4/ZQ0KRZhj/qwO15RUafkJfnFkRcRVd1BFkLDMkUAM79KYlfEwFyav9yPbz1fPg8nh3QYWcdFRrr02jFSPs2aFuzVYDWhSjY8t7ulft7ug7C4SmARQ7WAvJ8gON8PNFy0SmMyfl+dXomcBrKx8miw+vgsbtbnVIoBal6vaARMi60DDBNR9gOTi/ocWWhQdeoMIKfnnrhywJ+b8REcJdaUC4gYBmowFLa8hlDu9LzZFlocEe22Hs8bEm/0HCjWgv/2BTItyAqTUVvzyHPGtxvoOA5f8fB30ZbU7ISzRcIVpPOGgTTDJXAXE7gZmDSQX2+U",
=======
"accessKeyId": "ASIAXZL2SWFEZSIHHRDT",
"secretAccessKey": "cdcXCezNz9OhFowZxE2KSftDmT3xSYAtiLJl1dFk",
"sessionToken": "FwoGZXIvYXdzEJf//////////wEaDG1NOyJj0/Xdzqu+uyLDAa8vgymCVldXPpET+AOsq5CXhMzhMEDmWogIaq6lWJVy8sdnK9tOXY/u9vz8p6cTm7xWb0YiX6TKDhlfFZX6ynv0Xw/p/qvbn4lPsoT8K9PpdDOWJUMA8qX/5RrKNO4OAolUkw+EMjQbK38u+g3HEVP8mo+DiGLrBGj+0Ar0xhGiU/Lg5qKRdp+tEYIn0ypDNu/2q13apRiMH7n+OVFzilil10g1qq8NLaW98QvVC4xRIgkjAMcRqA9yPdVrhc9yFyqjrCjA+vj2BTIt8CDkFsEAFqJR3W0YPDbsu2YdTq3SKgpOsxNXGsEFMaEhFxodp5/Qsk7tfMsO",
>>>>>>> 65298bebf7d1e88ec40f530f921db5c35185068f
"region": "us-east-1"
}
......
......@@ -88,14 +88,7 @@ function accessedList(curData) {
});
}
function modifyFile(fileData){
return axios.post(`/api/file/modify/${fileName}`, {
params: {
user_id: fileData.id,
cur: fileData.cur,
name: fileData.rename,
content: fileData.content
},
});
return axios.post(`/api/file/modify/${fileData.name}`,fileData);
}
......
......@@ -75,7 +75,7 @@
</v-dialog>
<v-divider inset></v-divider>
<v-subheader inset>Files</v-subheader>
<v-list-item v-for="item in this.$store.getters.fileL" :key="item.title" @click.stop="dialog_file = true; file_detail(item)">
<v-list-item v-for="item in this.$store.getters.fileL" :key="item.title" @dblclick.stop="dialog_file = true; file_detail(item)">
<v-list-item-avatar>
<v-icon> mdi-file</v-icon>
</v-list-item-avatar>
......@@ -90,9 +90,11 @@
>
<v-card>
<v-card-title class="headline">
<v-text-field v-model="current_filename" v-text="current_filename"></v-text-field>
<v-text-field v-model="current_filename" ></v-text-field>
</v-card-title>
<v-card-text v-model="current_filedata" v-text="current_filedata"></v-card-text>
<v-card-text>
<v-text-field v-model="current_filedata" ></v-text-field>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn
......@@ -233,14 +235,13 @@ export default {
};
console.log(curData);
const response = await folder(curData);
const file_response = await file(curData);
this.$store.commit('setFolder', response.data.folders);
this.$store.commit('setCur', response.data.cur);
this.$store.commit('setParent', response.data.parentPath);
this.folders = this.$store.getters.folderL;
const file_response = await file(curData);
this.$store.commit('setFile', file_response.data.files);
this.folders = this.$store.getters.folderL;
console.log(this.$store.getters.fileL);
this.files = this.$store.getters.fileL;
} catch (error) {
console.log('에러');
......@@ -291,6 +292,10 @@ export default {
this.$store.commit('setCur', response.data.cur);
this.$store.commit('setParent', response.data.parentPath);
this.folders = this.$store.getters.folderL;
const file_response = await file(curData);
this.$store.commit('setFile', file_response.data.files);
this.folders = this.$store.getters.folderL;
this.files = this.$store.getters.fileL;
} catch (error) {
console.log('에러');
console.log(error.response.data);
......@@ -308,6 +313,10 @@ export default {
this.$store.commit('setCur', response.data.cur);
this.$store.commit('setParent', response.data.parentPath);
this.folders = this.$store.getters.folderL;
const file_response = await file(curData);
this.$store.commit('setFile', file_response.data.files);
this.folders = this.$store.getters.folderL;
this.files = this.$store.getters.fileL;
} catch (error) {
console.log('에러');
console.log(error.response.data);
......@@ -378,8 +387,6 @@ export default {
async delete_file(itemName) {
try {
var itemlist = this.$store.getters.fileL;
console.log(itemlist);
console.log(itemName);
const currentData = {
fileName: null,
user_id: null,
......@@ -387,7 +394,6 @@ export default {
};
for (var i = 0; i < itemlist.length; i++) {
console.log(itemlist[i].file_name);
if (itemlist[i].file_name == itemName) {
currentData.fileName = itemlist[i].file_name;
currentData.user_id = itemlist[i].user_id;
......@@ -397,13 +403,10 @@ export default {
id: currentData.user_id,
cur: currentData.cur,
};
console.log(currentData);
const response = await deleteFile(currentData);
setTimeout(function() {}, 500);
const filelist = await file(filelistData);
console.log(filelist.data.files);
this.$store.commit('setFile', filelist.data.files);
console.log(this.$store.getters.fileL);
this.files = this.$store.getters.fileL;
} catch (error) {
console.log('에러');
......@@ -425,6 +428,7 @@ export default {
}
},
async file_detail(fileData){
console.log(fileData);
try{
const currentData = {
id: fileData.user_id,
......@@ -432,9 +436,10 @@ export default {
fileName: fileData.file_name
}
const detailData = await detailFile(currentData)
console.log(detailData)
this.current_filename = detailData.file_name;
this.current_filedata = detailFile.content;
this.current_filename = detailData.data.file_name;
this.current_filedata = detailData.data.content;
console.log(this.current_filename);
console.log(this.current_filedata);
}catch(error){
console.log('에러');
console.log(error);
......
......@@ -5,7 +5,9 @@
<template v-slot:default>
<thead>
<tr>
<th class="text-left">File ID</th>
<th class="text-left">Name</th>
<th class="text-left">Dir</th>
<th class="text-left">Date</th>
</tr>
</thead>
......
......@@ -24,7 +24,6 @@
<v-layout column>
<v-flex>
<v-toolbar flat>
<v-toolbar-title>빠른 액세스</v-toolbar-title>
<v-spacer></v-spacer>
</v-toolbar>
<v-container>
......