-
-
Notifications
You must be signed in to change notification settings - Fork 222
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #462 from uasoft-indonesia/bugfix/v2/filemanager
update media manager
- Loading branch information
Showing
7 changed files
with
150 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
<template> | ||
<div> | ||
<badaso-breadcrumb-row> | ||
<template slot="action"> </template> | ||
</badaso-breadcrumb-row> | ||
<vs-row v-if="$helper.isAllowed('browse_file_manager')"> | ||
<vs-col vs-lg="12"> | ||
<vs-card> | ||
<div slot="header"> | ||
<h3>{{ $t("fileManager.title") }}</h3> | ||
</div> | ||
<iframe | ||
v-if="isShow" | ||
:src="urlIframe" | ||
class="file-manager__iframe" | ||
/> | ||
<div v-else> | ||
{{ message }} | ||
</div> | ||
</vs-card> | ||
</vs-col> | ||
</vs-row> | ||
<vs-row v-else> | ||
<vs-col vs-lg="12"> | ||
<vs-card> | ||
<vs-row> | ||
<vs-col vs-lg="12"> | ||
<h3>{{ $t("fileManager.warning.notAllowedToBrowse") }}</h3> | ||
</vs-col> | ||
</vs-row> | ||
</vs-card> | ||
</vs-col> | ||
</vs-row> | ||
</div> | ||
</template> | ||
<script> | ||
export default { | ||
name: "ImageManagerBrowse", | ||
components: {}, | ||
data() { | ||
return { | ||
statusCode: null, | ||
message: null, | ||
isShow: true, | ||
urlIframe: null, | ||
}; | ||
}, | ||
async created() { | ||
await this.requestCheckPageIFrame(); | ||
}, | ||
methods: { | ||
async requestCheckPageIFrame() { | ||
this.$openLoader(); | ||
this.$resource | ||
.get(this.urlFileManager) | ||
.then((result) => { | ||
this.urlIframe = this.urlFileManager; | ||
this.isShow = true; | ||
}) | ||
.catch((error) => { | ||
let { message } = error; | ||
this.$vs.notify({ | ||
title: this.$t("alert.danger"), | ||
text: message, | ||
color: "danger", | ||
}); | ||
this.isShow = false; | ||
}) | ||
.finally(() => { | ||
this.$closeLoader(); | ||
}); | ||
}, | ||
}, | ||
computed: { | ||
urlFileManager() { | ||
let host = window.location.origin; | ||
let token = localStorage.getItem("token"); | ||
let url = `${host}/filemanager?type=Images&token=${token}`; | ||
return url; | ||
}, | ||
}, | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters