mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-19 23:03:45 +02:00
Push the user into the newly created directory once made
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
<a href="#" class="block btn btn-primary btn-sm">New File</a>
|
||||
</div>
|
||||
</div>
|
||||
<CreateFolderModal v-on:close="listDirectory"/>
|
||||
<CreateFolderModal v-on:created="directoryCreated"/>
|
||||
<RenameModal/>
|
||||
</div>
|
||||
</template>
|
||||
@@ -56,6 +56,7 @@
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import {mapState} from "vuex";
|
||||
import { join } from 'path';
|
||||
import {map} from 'lodash';
|
||||
import getDirectoryContents from "@/api/server/getDirectoryContents";
|
||||
import FileRow from "@/components/server/components/filemanager/FileRow.vue";
|
||||
@@ -183,6 +184,10 @@
|
||||
fileRowDeleted: function (file: DirectoryContentObject) {
|
||||
this.files = this.files.filter(data => data !== file);
|
||||
},
|
||||
|
||||
directoryCreated: function (directory: string) {
|
||||
this.$router.push({ name: 'server-files', params: { path: join(this.currentDirectory, directory) }});
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user