commit
acb9a5e888
|
@ -41,7 +41,7 @@ export default {
|
||||||
const runtimeConfig = useRuntimeConfig();
|
const runtimeConfig = useRuntimeConfig();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
designerAPI: runtimeConfig.public.designerAPI
|
designerApiUrl: runtimeConfig.public.designerApiUrl
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
provide() {
|
provide() {
|
||||||
|
@ -63,7 +63,7 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
const { data, error } = await $fetch(this.designerAPI + '/license/restore', {
|
const { data, error } = await $fetch(this.designerApiUrl + '/license/restore', {
|
||||||
credentials: 'include'
|
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 });
|
this.$toast.add({ severity: 'error', summary: 'Not Available', detail: 'A license is required for download.', life: 3000 });
|
||||||
} else {
|
} else {
|
||||||
try {
|
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',
|
responseType: 'blob',
|
||||||
credentials: 'include',
|
credentials: 'include',
|
||||||
headers: {
|
headers: {
|
||||||
|
@ -120,7 +120,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async saveTheme(theme) {
|
async saveTheme(theme) {
|
||||||
const { error } = await $fetch(this.designerAPI + '/theme/update', {
|
const { error } = await $fetch(this.designerApiUrl + '/theme/update', {
|
||||||
method: 'PATCH',
|
method: 'PATCH',
|
||||||
credentials: 'include',
|
credentials: 'include',
|
||||||
headers: {
|
headers: {
|
||||||
|
@ -230,12 +230,12 @@ export default {
|
||||||
this.refreshACTokens();
|
this.refreshACTokens();
|
||||||
},
|
},
|
||||||
getCookie(name) {
|
getCookie(name) {
|
||||||
var cookieArr = document.cookie.split(";");
|
var cookieArr = document.cookie.split(';');
|
||||||
|
|
||||||
for(var i = 0; i < cookieArr.length; i++) {
|
for (var i = 0; i < cookieArr.length; i++) {
|
||||||
var cookiePair = cookieArr[i].split("=");
|
var cookiePair = cookieArr[i].split('=');
|
||||||
|
|
||||||
if(name == cookiePair[0].trim()) {
|
if (name == cookiePair[0].trim()) {
|
||||||
return decodeURIComponent(cookiePair[1]);
|
return decodeURIComponent(cookiePair[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,7 +79,7 @@ export default {
|
||||||
const runtimeConfig = useRuntimeConfig();
|
const runtimeConfig = useRuntimeConfig();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
designerAPI: runtimeConfig.public.designerAPI
|
designerApiUrl: runtimeConfig.public.designerApiUrl
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
inject: ['designerService'],
|
inject: ['designerService'],
|
||||||
|
@ -108,7 +108,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.$appState.designer.verified) {
|
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',
|
method: 'POST',
|
||||||
credentials: 'include',
|
credentials: 'include',
|
||||||
headers: {
|
headers: {
|
||||||
|
@ -137,7 +137,7 @@ export default {
|
||||||
async createThemeFromFigma() {
|
async createThemeFromFigma() {
|
||||||
if (this.figmaData) {
|
if (this.figmaData) {
|
||||||
if (this.$appState.designer.verified) {
|
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',
|
method: 'POST',
|
||||||
credentials: 'include',
|
credentials: 'include',
|
||||||
headers: {
|
headers: {
|
||||||
|
|
|
@ -80,7 +80,7 @@ export default {
|
||||||
const runtimeConfig = useRuntimeConfig();
|
const runtimeConfig = useRuntimeConfig();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
designerAPI: runtimeConfig.public.designerAPI
|
designerApiUrl: runtimeConfig.public.designerApiUrl
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
inject: ['designerService'],
|
inject: ['designerService'],
|
||||||
|
@ -137,7 +137,7 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async activate() {
|
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',
|
credentials: 'include',
|
||||||
query: {
|
query: {
|
||||||
passkey: this.otp
|
passkey: this.otp
|
||||||
|
@ -162,7 +162,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async signOut() {
|
async signOut() {
|
||||||
const { data } = await $fetch(this.designerAPI + '/license/signout/', {
|
const { data } = await $fetch(this.designerApiUrl + '/license/signout/', {
|
||||||
credentials: 'include'
|
credentials: 'include'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -200,7 +200,7 @@ export default {
|
||||||
},
|
},
|
||||||
async loadThemes() {
|
async loadThemes() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
const { data, error } = await $fetch(this.designerAPI + '/theme/list/', {
|
const { data, error } = await $fetch(this.designerApiUrl + '/theme/list/', {
|
||||||
credentials: 'include',
|
credentials: 'include',
|
||||||
headers: {
|
headers: {
|
||||||
'X-CSRF-Token': this.$appState.designer.csrfToken
|
'X-CSRF-Token': this.$appState.designer.csrfToken
|
||||||
|
@ -216,7 +216,7 @@ export default {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
},
|
},
|
||||||
async loadTheme(theme) {
|
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',
|
credentials: 'include',
|
||||||
headers: {
|
headers: {
|
||||||
'X-CSRF-Token': this.$appState.designer.csrfToken
|
'X-CSRF-Token': this.$appState.designer.csrfToken
|
||||||
|
@ -231,7 +231,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async renameTheme(theme) {
|
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',
|
method: 'PATCH',
|
||||||
credentials: 'include',
|
credentials: 'include',
|
||||||
headers: {
|
headers: {
|
||||||
|
@ -247,7 +247,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async deleteTheme(theme) {
|
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',
|
method: 'DELETE',
|
||||||
credentials: 'include',
|
credentials: 'include',
|
||||||
headers: {
|
headers: {
|
||||||
|
@ -262,7 +262,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async duplicateTheme(theme) {
|
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',
|
method: 'POST',
|
||||||
credentials: 'include',
|
credentials: 'include',
|
||||||
headers: {
|
headers: {
|
||||||
|
|
|
@ -55,7 +55,7 @@ export default {
|
||||||
const runtimeConfig = useRuntimeConfig();
|
const runtimeConfig = useRuntimeConfig();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
designerAPI: runtimeConfig.public.designerAPI
|
designerApiUrl: runtimeConfig.public.designerApiUrl
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
inject: ['designerService'],
|
inject: ['designerService'],
|
||||||
|
@ -104,7 +104,7 @@ export default {
|
||||||
this.designerService.saveTheme(this.$appState.designer.theme);
|
this.designerService.saveTheme(this.$appState.designer.theme);
|
||||||
},
|
},
|
||||||
async preview() {
|
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',
|
method: 'PATCH',
|
||||||
credentials: 'include',
|
credentials: 'include',
|
||||||
headers: {
|
headers: {
|
||||||
|
@ -137,7 +137,7 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
async migrate() {
|
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',
|
method: 'PATCH',
|
||||||
credentials: 'include',
|
credentials: 'include',
|
||||||
headers: {
|
headers: {
|
||||||
|
|
|
@ -94,7 +94,7 @@ export default defineNuxtConfig({
|
||||||
public: {
|
public: {
|
||||||
contextPath: baseUrl,
|
contextPath: baseUrl,
|
||||||
DEV_ENV: PROCESS_ENV.DEV_ENV,
|
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']
|
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