diff --git a/src/components/HelloWorld.vue b/src/components/HelloWorld.vue index 4f78f98..415ebb9 100644 --- a/src/components/HelloWorld.vue +++ b/src/components/HelloWorld.vue @@ -49,6 +49,9 @@ + +

To input an alternate id, use the full search form.

+
@@ -71,9 +74,7 @@ const router = useRouter(); const targetId = ref(''); const navigateToTarget = () => { - if (targetId.value) { - router.push(`/target/${targetId.value}`); - } + router.push(`/target/${targetId.value}`); }; diff --git a/src/views/Search.vue b/src/views/Search.vue index 6f902a1..886e1fc 100644 --- a/src/views/Search.vue +++ b/src/views/Search.vue @@ -40,9 +40,18 @@ - + + + + + - +

mdi-help-circle-outlineProgram Caveat

- +
@@ -145,11 +164,15 @@ let radiusRules = [ (value: number) => !isNaN(value) || 'Value must be a number.', ] +let altidRules = [ + (value: string) => (!!value ? /^[a-zA-Z0-9-+]+$/.test(value) : true) || 'Only alphanumeric characters and hyphens are allowed.', +] // parameters let loading = ref(false) let coordsDisabled = ref(false) let idDisabled = ref(false) +let searchType = ref('sdssid') // create initial state of formData let initFormData = { @@ -158,6 +181,7 @@ let initFormData = { dec: '', radius: '0.1', id: '', + altid: '', units: 'degree', release: store.release, carton: '', @@ -178,7 +202,7 @@ watch(formData, async () => { // update id/coords disabled states idDisabled.value = !!formData.value.coords.trim() - coordsDisabled.value = !!formData.value.id.trim() + coordsDisabled.value = !!formData.value.id.trim() || !!formData.value.altid.trim() const formValid = await form.value.validate(); // validate the form valid.value = formValid.valid; // update the valid state diff --git a/vite.config.ts.timestamp-1729616849795-71a83969c8603.mjs b/vite.config.ts.timestamp-1729616849795-71a83969c8603.mjs new file mode 100644 index 0000000..2e95c5f --- /dev/null +++ b/vite.config.ts.timestamp-1729616849795-71a83969c8603.mjs @@ -0,0 +1,44 @@ +// vite.config.ts +import vue from "file:///workspaces/zora/node_modules/@vitejs/plugin-vue/dist/index.mjs"; +import vuetify, { transformAssetUrls } from "file:///workspaces/zora/node_modules/vite-plugin-vuetify/dist/index.mjs"; +import { defineConfig } from "file:///workspaces/zora/node_modules/vite/dist/node/index.js"; +import { fileURLToPath, URL } from "node:url"; +var __vite_injected_original_import_meta_url = "file:///workspaces/zora/vite.config.ts"; +var vite_config_default = defineConfig({ + plugins: [ + vue({ + template: { transformAssetUrls } + }), + // https://github.com/vuetifyjs/vuetify-loader/tree/next/packages/vite-plugin + vuetify({ + autoImport: true, + styles: { + configFile: "src/styles/settings.scss" + } + }) + ], + define: { "process.env": {} }, + resolve: { + alias: { + "@": fileURLToPath(new URL("./src", __vite_injected_original_import_meta_url)) + }, + extensions: [ + ".js", + ".json", + ".jsx", + ".mjs", + ".ts", + ".tsx", + ".vue" + ] + }, + base: process.env.BASE_URL || "/", + server: { + port: 3e3, + host: "0.0.0.0" + } +}); +export { + vite_config_default as default +}; +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCIvd29ya3NwYWNlcy96b3JhXCI7Y29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2ZpbGVuYW1lID0gXCIvd29ya3NwYWNlcy96b3JhL3ZpdGUuY29uZmlnLnRzXCI7Y29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2ltcG9ydF9tZXRhX3VybCA9IFwiZmlsZTovLy93b3Jrc3BhY2VzL3pvcmEvdml0ZS5jb25maWcudHNcIjsvLyBQbHVnaW5zXG5pbXBvcnQgdnVlIGZyb20gJ0B2aXRlanMvcGx1Z2luLXZ1ZSdcbmltcG9ydCB2dWV0aWZ5LCB7IHRyYW5zZm9ybUFzc2V0VXJscyB9IGZyb20gJ3ZpdGUtcGx1Z2luLXZ1ZXRpZnknXG5cbi8vIFV0aWxpdGllc1xuaW1wb3J0IHsgZGVmaW5lQ29uZmlnIH0gZnJvbSAndml0ZSdcbmltcG9ydCB7IGZpbG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