feat(editor): Update design-system and editor dependencies (no-changelog) (#5188)
This commit is contained in:
@@ -5,14 +5,12 @@ import { defineStore } from 'pinia';
|
||||
import Vue from 'vue';
|
||||
import { useNodeTypesStore } from './nodeTypes';
|
||||
|
||||
const { VUE_APP_URL_BASE_API, VUE_APP_ENDPOINT_REST } = import.meta.env;
|
||||
|
||||
export const useRootStore = defineStore(STORES.ROOT, {
|
||||
state: (): RootState => ({
|
||||
// @ts-ignore
|
||||
baseUrl: import.meta.env.VUE_APP_URL_BASE_API
|
||||
? import.meta.env.VUE_APP_URL_BASE_API
|
||||
: window.BASE_PATH === '/%BASE_PATH%/'
|
||||
? '/'
|
||||
: window.BASE_PATH,
|
||||
baseUrl:
|
||||
VUE_APP_URL_BASE_API ?? window.BASE_PATH === '/{{BASE_PATH}}/' ? '/' : window.BASE_PATH,
|
||||
defaultLocale: 'en',
|
||||
endpointWebhook: 'webhook',
|
||||
endpointWebhookTest: 'webhook-test',
|
||||
@@ -44,16 +42,16 @@ export const useRootStore = defineStore(STORES.ROOT, {
|
||||
|
||||
getRestUrl(): string {
|
||||
let endpoint = 'rest';
|
||||
if (import.meta.env.VUE_APP_ENDPOINT_REST) {
|
||||
endpoint = import.meta.env.VUE_APP_ENDPOINT_REST;
|
||||
if (VUE_APP_ENDPOINT_REST) {
|
||||
endpoint = VUE_APP_ENDPOINT_REST;
|
||||
}
|
||||
return `${this.baseUrl}${endpoint}`;
|
||||
},
|
||||
|
||||
getRestApiContext(): IRestApiContext {
|
||||
let endpoint = 'rest';
|
||||
if (import.meta.env.VUE_APP_ENDPOINT_REST) {
|
||||
endpoint = import.meta.env.VUE_APP_ENDPOINT_REST;
|
||||
if (VUE_APP_ENDPOINT_REST) {
|
||||
endpoint = VUE_APP_ENDPOINT_REST;
|
||||
}
|
||||
return {
|
||||
baseUrl: `${this.baseUrl}${endpoint}`,
|
||||
|
||||
Reference in New Issue
Block a user