Skip to content

Commit 6b1581c

Browse files
committed
Lock to test
1 parent dd3152f commit 6b1581c

4 files changed

Lines changed: 34 additions & 23 deletions

File tree

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/dist/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<link rel="icon" type="image/png" href="/cve-user-registry-client/assets/cve-icon-D-wZSSK5.png" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<title>Data Registry</title>
8-
<script type="module" crossorigin src="/cve-user-registry-client/assets/index-fvgWMYN7.js"></script>
8+
<script type="module" crossorigin src="/cve-user-registry-client/assets/index-DHRCT3gL.js"></script>
99
<link rel="stylesheet" crossorigin href="/cve-user-registry-client/assets/index-BWUMa-Xs.css">
1010
</head>
1111
<body>

app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"dev": "vite",
88
"build": "vite build",
99
"preview": "vite preview",
10-
"predeploy": "npm run build",
10+
"predeploy": "cross-env VITE_AVAILABLE_INSTANCES=test npm run build",
1111
"seed-test-data": "node ./test_data/generate.js"
1212
},
1313
"dependencies": {

app/src/views/LoginView.vue

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
item-title="label"
4949
item-value="key"
5050
v-model="instanceName"
51+
:disabled="environments.length <= 1"
5152
/>
5253
<i>
5354
By logging in, you are agreeing to our
@@ -87,18 +88,28 @@ import { useAuthStore } from "../stores/loginAuth";
8788
import PrivacyPolicy from "../components/PrivacyPolicy.vue";
8889
import config from "../config";
8990
91+
const router = useRouter();
92+
const auth = useAuthStore();
93+
94+
const availableInstances = import.meta.env.VITE_AVAILABLE_INSTANCES?.split(',');
95+
const environments = Object.keys(config.environments)
96+
.filter((key) => {
97+
if (availableInstances?.length) {
98+
return availableInstances.includes(key);
99+
}
100+
return true;
101+
})
102+
.map((key) => ({
103+
key,
104+
...config.environments[key],
105+
}));
106+
90107
const userName = ref("");
91108
const tokenString = ref("");
92109
const org = ref("");
93-
const instanceName = ref(null);
94-
const router = useRouter();
95-
const auth = useAuthStore();
110+
const instanceName = ref(availableInstances?.length > 1 ? null : environments[0]);
96111
const authError = ref(false);
97112
const showPrivacy = ref(false);
98-
const environments = Object.keys(config.environments).map((key) => ({
99-
key,
100-
...config.environments[key],
101-
}));
102113
103114
const submit = async () => {
104115
const success = await auth.login(

0 commit comments

Comments
 (0)