commit
acb9a5e888
|
@ -41,7 +41,7 @@ export default {
|
|||
const runtimeConfig = useRuntimeConfig();
|
||||
|
||||
return {
|
||||
designerAPI: runtimeConfig.public.designerAPI
|
||||
designerApiUrl: runtimeConfig.public.designerApiUrl
|
||||
};
|
||||
},
|
||||
provide() {
|
||||
|
@ -63,7 +63,7 @@ export default {
|
|||
};
|
||||
},
|
||||
async mounted() {
|
||||
const { data, error } = await $fetch(this.designerAPI + '/license/restore', {
|
||||
const { data, error } = await $fetch(this.designerApiUrl + '/license/restore', {
|
||||
credentials: 'include'
|
||||
});
|
||||
|
||||
|
@ -90,7 +90,7 @@ export default {
|
|||
this.$toast.add({ severity: 'error', summary: 'Not Available', detail: 'A license is required for download.', life: 3000 });
|
||||
} else {
|
||||
try {
|
||||
const response = await $fetch(this.designerAPI + '/theme/download/' + theme.t_key, {
|
||||
const response = await $fetch(this.designerApiUrl + '/theme/download/' + theme.t_key, {
|
||||
responseType: 'blob',
|
||||
credentials: 'include',
|
||||
headers: {
|
||||
|
@ -120,7 +120,7 @@ export default {
|
|||
}
|
||||
},
|
||||
async saveTheme(theme) {
|
||||
const { error } = await $fetch(this.designerAPI + '/theme/update', {
|
||||
const { error } = await $fetch(this.designerApiUrl + '/theme/update', {
|
||||
method: 'PATCH',
|
||||
credentials: 'include',
|
||||
headers: {
|
||||
|
@ -230,12 +230,12 @@ export default {
|
|||
this.refreshACTokens();
|
||||
},
|
||||
getCookie(name) {
|
||||
var cookieArr = document.cookie.split(";");
|
||||
var cookieArr = document.cookie.split(';');
|
||||
|
||||
for(var i = 0; i < cookieArr.length; i++) {
|
||||
var cookiePair = cookieArr[i].split("=");
|
||||
for (var i = 0; i < cookieArr.length; i++) {
|
||||
var cookiePair = cookieArr[i].split('=');
|
||||
|
||||
if(name == cookiePair[0].trim()) {
|
||||
if (name == cookiePair[0].trim()) {
|
||||
return decodeURIComponent(cookiePair[1]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ export default {
|
|||
const runtimeConfig = useRuntimeConfig();
|
||||
|
||||
return {
|
||||
designerAPI: runtimeConfig.public.designerAPI
|
||||
designerApiUrl: runtimeConfig.public.designerApiUrl
|
||||
};
|
||||
},
|
||||
inject: ['designerService'],
|
||||
|
@ -108,7 +108,7 @@ export default {
|
|||
}
|
||||
|
||||
if (this.$appState.designer.verified) {
|
||||
const { data, error } = await $fetch(this.designerAPI + '/theme/create', {
|
||||
const { data, error } = await $fetch(this.designerApiUrl + '/theme/create', {
|
||||
method: 'POST',
|
||||
credentials: 'include',
|
||||
headers: {
|
||||
|
@ -137,7 +137,7 @@ export default {
|
|||
async createThemeFromFigma() {
|
||||
if (this.figmaData) {
|
||||
if (this.$appState.designer.verified) {
|
||||
const { data, error } = await $fetch(this.designerAPI + '/theme/figma', {
|
||||
const { data, error } = await $fetch(this.designerApiUrl + '/theme/figma', {
|
||||
method: 'POST',
|
||||
credentials: 'include',
|
||||
headers: {
|
||||
|
|
|
@ -80,7 +80,7 @@ export default {
|
|||
const runtimeConfig = useRuntimeConfig();
|
||||
|
||||
return {
|
||||
designerAPI: runtimeConfig.public.designerAPI
|
||||
designerApiUrl: runtimeConfig.public.designerApiUrl
|
||||
};
|
||||
},
|
||||
inject: ['designerService'],
|
||||
|
@ -137,7 +137,7 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
async activate() {
|
||||
const { data, error } = await $fetch(this.designerAPI + '/license/signin/' + this.licenseKey, {
|
||||
const { data, error } = await $fetch(this.designerApiUrl + '/license/signin/' + this.licenseKey, {
|
||||
credentials: 'include',
|
||||
query: {
|
||||
passkey: this.otp
|
||||
|
@ -162,7 +162,7 @@ export default {
|
|||
}
|
||||
},
|
||||
async signOut() {
|
||||
const { data } = await $fetch(this.designerAPI + '/license/signout/', {
|
||||
const { data } = await $fetch(this.designerApiUrl + '/license/signout/', {
|
||||
credentials: 'include'
|
||||
});
|
||||
|
||||
|
@ -200,7 +200,7 @@ export default {
|
|||
},
|
||||
async loadThemes() {
|
||||
this.loading = true;
|
||||
const { data, error } = await $fetch(this.designerAPI + '/theme/list/', {
|
||||
const { data, error } = await $fetch(this.designerApiUrl + '/theme/list/', {
|
||||
credentials: 'include',
|
||||
headers: {
|
||||
'X-CSRF-Token': this.$appState.designer.csrfToken
|
||||
|
@ -216,7 +216,7 @@ export default {
|
|||
this.loading = false;
|
||||
},
|
||||
async loadTheme(theme) {
|
||||
const { data, error } = await $fetch(this.designerAPI + '/theme/load/' + theme.t_key, {
|
||||
const { data, error } = await $fetch(this.designerApiUrl + '/theme/load/' + theme.t_key, {
|
||||
credentials: 'include',
|
||||
headers: {
|
||||
'X-CSRF-Token': this.$appState.designer.csrfToken
|
||||
|
@ -231,7 +231,7 @@ export default {
|
|||
}
|
||||
},
|
||||
async renameTheme(theme) {
|
||||
const { error } = await $fetch(this.designerAPI + '/theme/rename/' + theme.t_key, {
|
||||
const { error } = await $fetch(this.designerApiUrl + '/theme/rename/' + theme.t_key, {
|
||||
method: 'PATCH',
|
||||
credentials: 'include',
|
||||
headers: {
|
||||
|
@ -247,7 +247,7 @@ export default {
|
|||
}
|
||||
},
|
||||
async deleteTheme(theme) {
|
||||
const { error } = await $fetch(this.designerAPI + '/theme/delete/' + theme.t_key, {
|
||||
const { error } = await $fetch(this.designerApiUrl + '/theme/delete/' + theme.t_key, {
|
||||
method: 'DELETE',
|
||||
credentials: 'include',
|
||||
headers: {
|
||||
|
@ -262,7 +262,7 @@ export default {
|
|||
}
|
||||
},
|
||||
async duplicateTheme(theme) {
|
||||
const { error } = await $fetch(this.designerAPI + '/theme/duplicate/' + theme.t_key, {
|
||||
const { error } = await $fetch(this.designerApiUrl + '/theme/duplicate/' + theme.t_key, {
|
||||
method: 'POST',
|
||||
credentials: 'include',
|
||||
headers: {
|
||||
|
|
|
@ -55,7 +55,7 @@ export default {
|
|||
const runtimeConfig = useRuntimeConfig();
|
||||
|
||||
return {
|
||||
designerAPI: runtimeConfig.public.designerAPI
|
||||
designerApiUrl: runtimeConfig.public.designerApiUrl
|
||||
};
|
||||
},
|
||||
inject: ['designerService'],
|
||||
|
@ -104,7 +104,7 @@ export default {
|
|||
this.designerService.saveTheme(this.$appState.designer.theme);
|
||||
},
|
||||
async preview() {
|
||||
const { data, error } = await $fetch(this.designerAPI + '/theme/migrate/preview/' + this.$appState.designer.theme.key, {
|
||||
const { data, error } = await $fetch(this.designerApiUrl + '/theme/migrate/preview/' + this.$appState.designer.theme.key, {
|
||||
method: 'PATCH',
|
||||
credentials: 'include',
|
||||
headers: {
|
||||
|
@ -137,7 +137,7 @@ export default {
|
|||
});
|
||||
},
|
||||
async migrate() {
|
||||
const { data, error } = await $fetch(this.designerAPI + '/theme/migrate/execute/' + this.$appState.designer.theme.key, {
|
||||
const { data, error } = await $fetch(this.designerApiUrl + '/theme/migrate/execute/' + this.$appState.designer.theme.key, {
|
||||
method: 'PATCH',
|
||||
credentials: 'include',
|
||||
headers: {
|
||||
|
|
|
@ -94,7 +94,7 @@ export default defineNuxtConfig({
|
|||
public: {
|
||||
contextPath: baseUrl,
|
||||
DEV_ENV: PROCESS_ENV.DEV_ENV,
|
||||
designerApi: ''
|
||||
designerApiUrl: ''
|
||||
}
|
||||
},
|
||||
css: ['primeicons/primeicons.css', '@/assets/styles/flags.css', '@docsearch/css/dist/style.css', '@/assets/styles/tailwind/main.css', '@/assets/styles/layout/layout.scss']
|
||||
|
|
Loading…
Reference in New Issue