Replace branding route calling for name and footer in views
This commit is contained in:
@@ -6,12 +6,13 @@ import { Button, PasswordInput, TextInput, fetcher, FormGroup } from '@cloudron/
|
||||
import { API_ORIGIN } from '../constants.js';
|
||||
import PublicPageLayout from '../components/PublicPageLayout.vue';
|
||||
|
||||
const footer = marked.parse(window.cloudron.footer);
|
||||
const cloudronName = window.cloudron.name;
|
||||
|
||||
const ready = ref(false);
|
||||
const busy = ref(false);
|
||||
const error = ref({});
|
||||
const mode = ref('');
|
||||
const footer = ref('');
|
||||
const cloudronName = ref('');
|
||||
const resetToken = ref('');
|
||||
const passwordResetIdentifier = ref('');
|
||||
const newPassword = ref('');
|
||||
@@ -78,14 +79,6 @@ async function onNewPassword() {
|
||||
onMounted(async () => {
|
||||
const search = decodeURIComponent(window.location.search).slice(1).split('&').map(function (item) { return item.indexOf('=') === -1 ? [item, true] : [item.slice(0, item.indexOf('=')), item.slice(item.indexOf('=')+1)]; }).reduce(function (o, k) { o[k[0]] = k[1]; return o; }, {});
|
||||
|
||||
try {
|
||||
const res = await fetcher.get(`${API_ORIGIN}/api/v1/auth/branding`);
|
||||
footer.value = marked.parse(res.body.footer);
|
||||
cloudronName.value = res.body.cloudronName;
|
||||
} catch (error) {
|
||||
console.error('Failed to get branding info.', error);
|
||||
}
|
||||
|
||||
// Init into the correct view
|
||||
if (search.resetToken) {
|
||||
resetToken.value = search.resetToken;
|
||||
|
||||
Reference in New Issue
Block a user