Move API_ORIGIN into constants.js
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
<script setup>
|
||||
|
||||
const API_ORIGIN = import.meta.env.VITE_API_ORIGIN || window.location.origin;
|
||||
|
||||
import { useI18n } from 'vue-i18n';
|
||||
const i18n = useI18n();
|
||||
const t = i18n.t;
|
||||
@@ -21,7 +19,7 @@ import Security from '../components/app/Security.vue';
|
||||
import Uninstall from '../components/app/Uninstall.vue';
|
||||
import Updates from '../components/app/Updates.vue';
|
||||
import AppsModel from '../models/AppsModel.js';
|
||||
import { APP_TYPES, ISTATES, RSTATES, HSTATES } from '../constants.js';
|
||||
import { API_ORIGIN, APP_TYPES, ISTATES, RSTATES, HSTATES } from '../constants.js';
|
||||
|
||||
const appsModel = AppsModel.create();
|
||||
const installationStateLabel = AppsModel.installationStateLabel;
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
<script setup>
|
||||
|
||||
const API_ORIGIN = import.meta.env.VITE_API_ORIGIN || window.location.origin;
|
||||
|
||||
import { ref, computed, useTemplateRef, onMounted, onUnmounted } from 'vue';
|
||||
import { Button, ButtonGroup, Dropdown, Icon, TableView, TextInput } from 'pankow';
|
||||
import { APP_TYPES, HSTATES, ISTATES, RSTATES } from '../constants.js';
|
||||
import { API_ORIGIN, APP_TYPES, HSTATES, ISTATES, RSTATES } from '../constants.js';
|
||||
import AppsModel from '../models/AppsModel.js';
|
||||
import ApplinksModel from '../models/ApplinksModel.js';
|
||||
import DomainsModel from '../models/DomainsModel.js';
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
<script setup>
|
||||
|
||||
const API_ORIGIN = import.meta.env.VITE_API_ORIGIN || window.location.origin;
|
||||
|
||||
import { ref, onMounted, useTemplateRef } from 'vue';
|
||||
import { Button, FormGroup, TextInput } from 'pankow';
|
||||
import { API_ORIGIN } from '../constants.js';
|
||||
import Section from '../components/Section.vue';
|
||||
import BrandingModel from '../models/BrandingModel.js';
|
||||
import DashboardModel from '../models/DashboardModel.js';
|
||||
|
||||
@@ -5,12 +5,11 @@ const i18n = useI18n();
|
||||
const t = i18n.t;
|
||||
|
||||
import { computed, ref, onMounted, watch } from 'vue';
|
||||
import { fetcher, Button, Switch } from 'pankow';
|
||||
import { fetcher, Switch } from 'pankow';
|
||||
import { marked } from 'marked';
|
||||
|
||||
import Section from '../components/Section.vue';
|
||||
import { API_ORIGIN } from '../constants.js';
|
||||
|
||||
const API_ORIGIN = import.meta.env.VITE_API_ORIGIN ? import.meta.env.VITE_API_ORIGIN : window.location.origin;
|
||||
const accessToken = localStorage.token;
|
||||
|
||||
const ready = ref(false);
|
||||
|
||||
Reference in New Issue
Block a user