filemanager: make footer render the custom branding
This commit is contained in:
@@ -105,7 +105,9 @@
|
||||
@finished="onUploadFinished"
|
||||
:tr="$t"
|
||||
/>
|
||||
<BottomBar />
|
||||
<BottomBar>
|
||||
<div v-html="footerContent" class="bottom-bar-content"></div>
|
||||
</BottomBar>
|
||||
</template>
|
||||
</MainLayout>
|
||||
</template>
|
||||
@@ -113,6 +115,7 @@
|
||||
<script>
|
||||
|
||||
import superagent from 'superagent';
|
||||
import { marked } from 'marked';
|
||||
|
||||
import Button from 'primevue/button';
|
||||
import Dialog from 'primevue/dialog';
|
||||
@@ -164,6 +167,7 @@ export default {
|
||||
extractInProgress: false,
|
||||
pasteInProgress: false,
|
||||
deleteInProgress: false,
|
||||
footerContent: '',
|
||||
activeItem: null,
|
||||
activeDirectoryItem: {},
|
||||
items: [],
|
||||
@@ -493,6 +497,13 @@ export default {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const result = await superagent.get(`${this.apiOrigin}/api/v1/config`).query({ access_token: this.accessToken });
|
||||
this.footerContent = marked.parse(result.body.footer);
|
||||
} catch (e) {
|
||||
console.error('Failed to fetch Cloudron config.', e);
|
||||
}
|
||||
|
||||
window.document.title = `File Manager - ${this.title}`;
|
||||
|
||||
this.cwd = sanitize('/' + (cwd ? cwd.join('/') : '/'));
|
||||
@@ -554,3 +565,11 @@ export default {
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<style>
|
||||
|
||||
.bottom-bar-content > p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user