diff --git a/src/App.vue b/src/App.vue
index 23f9d68..21251ac 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -21,8 +21,8 @@ body {
padding: 0;
}
-h1, h2 {
+h1,
+h2 {
color: #1b335f;
}
-
diff --git a/src/components/CSVReference.vue b/src/components/CSVReference.vue
index 1ce39a1..2ba0035 100644
--- a/src/components/CSVReference.vue
+++ b/src/components/CSVReference.vue
@@ -83,4 +83,4 @@ export default defineComponent({
#panels {
background-color: rgb(var(--v-theme-secondary));
}
-
\ No newline at end of file
+
diff --git a/src/components/GeoconnexBackground.vue b/src/components/GeoconnexBackground.vue
index f8b9b45..dc1544c 100644
--- a/src/components/GeoconnexBackground.vue
+++ b/src/components/GeoconnexBackground.vue
@@ -1,5 +1,5 @@
- Geoconnex Background Info
+ Geoconnex Background Info
The geoconnex.us project provides technical infrastructure
@@ -41,10 +41,8 @@
\ No newline at end of file
+
diff --git a/src/components/MetadataGenerator.vue b/src/components/MetadataGenerator.vue
index 159156f..0f6ccb0 100644
--- a/src/components/MetadataGenerator.vue
+++ b/src/components/MetadataGenerator.vue
@@ -3,47 +3,91 @@ import { fetchAllNamespaces } from '@/lib/helpers'
-
- A namespace is a short name or alias for your organization. It will be created upon
- submission if it does not already exist. If the namespace already exists, your new
- CSV file will be added to the existing namespace
+ A namespace is a short name or alias for your organization. It will be created upon submission
+ if it does not already exist. If the namespace already exists, your new CSV file will be added
+ to the existing namespace
-
-
+
+ v-model="readmeAlreadyUploaded"
+ >
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
{{ error }}
-
diff --git a/src/components/PageFooter.vue b/src/components/PageFooter.vue
index 2f7a599..f1de613 100644
--- a/src/components/PageFooter.vue
+++ b/src/components/PageFooter.vue
@@ -2,16 +2,25 @@
-
diff --git a/src/components/PageHeader.vue b/src/components/PageHeader.vue
index 14cc560..2b13b32 100644
--- a/src/components/PageHeader.vue
+++ b/src/components/PageHeader.vue
@@ -2,7 +2,12 @@
-
-
-
diff --git a/src/components/UploadForm.vue b/src/components/UploadForm.vue
index 591278f..0333485 100644
--- a/src/components/UploadForm.vue
+++ b/src/components/UploadForm.vue
@@ -4,19 +4,21 @@ import URLCheckSummary from '@/components/URLCheckSummary.vue'
import CSVReference from '@/components/CSVReference.vue'
import GeoconnexBackground from '@/components/GeoconnexBackground.vue'
import MetadataGenerator from '@/components/MetadataGenerator.vue'
-
-
+
@@ -24,30 +26,54 @@ import MetadataGenerator from '@/components/MetadataGenerator.vue'
Upload your CSV Mapping
-
- Geoconnex will use your CSV to map your data resources Geoconnex ids. It will use the target URL you supply to access each feature for the purpose of constructing the Geoconnex knowledge graph.
-
+
+ Geoconnex will use your CSV to map your data resources Geoconnex ids. It will use the
+ target URL you supply to access each feature for the purpose of constructing the
+ Geoconnex knowledge graph.
+
-
-
-
-
-
+
+
+
-
+
-
+
-
-
+
Ignore warning and override
@@ -56,14 +82,17 @@ import MetadataGenerator from '@/components/MetadataGenerator.vue'
Add Metadata for your CSV Contribution
-
Submit your Data Mapping
- Your data will be submitted to the Geoconnex URI registry on GitHub. Once submitted, you will be able to view the request to add your data to Geoconnex.
+ Your data will be submitted to the
+ Geoconnex URI registry
+ on GitHub. Once submitted, you will be able to view the request to add your data to
+ Geoconnex.
@@ -76,12 +105,25 @@ import MetadataGenerator from '@/components/MetadataGenerator.vue'
-
+
-
+
@@ -122,13 +164,18 @@ export default defineComponent({
},
computed: {
hideNext() {
- return this.checkError.type === 'Issues Checking CSV' || this.progress.running || this.blockNext
- },
+ return (
+ this.checkError.type === 'Issues Checking CSV' || this.progress.running || this.blockNext
+ )
+ }
},
methods: {
async checkCSV() {
- this.progress = { running: true, action: 'Validating your CSV data. This may take a minute...' }
+ this.progress = {
+ running: true,
+ action: 'Validating your CSV data. This may take a minute...'
+ }
if (!this.csv) {
return
@@ -158,7 +205,6 @@ export default defineComponent({
},
async valid() {
-
if (!this.csv) {
return false
}
@@ -167,22 +213,19 @@ export default defineComponent({
running: true,
action: 'Validating your CSV data. This may take a minute...'
}
-
},
overrideError() {
this.checkError = { type: undefined, text: '' }
this.crawlErrors = []
},
- setMetadata(metadata: { readme: File | null, namespace: string, blockNext?: boolean }) {
+ setMetadata(metadata: { readme: File | null; namespace: string; blockNext?: boolean }) {
const { readme, namespace, blockNext } = metadata
this.namespace = namespace
this.readme = readme
this.blockNext = blockNext || false
},
-
async submitForm() {
-
// reset stored form state at the start of the submission before validating
this.result = ''
this.progress = { running: false, action: '' }
diff --git a/src/lib/helpers.test.ts b/src/lib/helpers.test.ts
index c1a4ce0..1821c25 100644
--- a/src/lib/helpers.test.ts
+++ b/src/lib/helpers.test.ts
@@ -9,7 +9,7 @@ const path = require('path')
test('Get namespaces', async () => {
const namespaces = await fetchAllNamespaces()
expect(namespaces.includes('epa')).toBe(true)
- expect(namespaces.includes("usbr")).toBe(true)
+ expect(namespaces.includes('usbr')).toBe(true)
})
function getTestFile(fileName: string) {
diff --git a/src/lib/helpers.ts b/src/lib/helpers.ts
index e1338b2..19a40a1 100644
--- a/src/lib/helpers.ts
+++ b/src/lib/helpers.ts
@@ -1,20 +1,25 @@
import Papa from 'papaparse'
-import { CSVError, type MarkdownSection, type ValidationReport, type namespaceResult } from './types'
+import {
+ CSVError,
+ type MarkdownSection,
+ type ValidationReport,
+ type namespaceResult
+} from './types'
export async function fetchAllNamespaces(): Promise {
- const api = "https://api.github.com/repos/internetofwater/geoconnex.us/contents/namespaces?ref=master"
+ const api =
+ 'https://api.github.com/repos/internetofwater/geoconnex.us/contents/namespaces?ref=master'
const response = await fetch(api)
if (!response.ok) {
throw new Error(`HTTP error! Status: ${response.status}`)
}
-
const data: namespaceResult[] = await response.json()
const namespaces = []
for (const namespace of data) {
- if (namespace.type === "dir") {
+ if (namespace.type === 'dir') {
namespaces.push(namespace.name)
}
}
@@ -22,7 +27,6 @@ export async function fetchAllNamespaces(): Promise {
return namespaces
}
-
export async function fetchMarkdownContent(url: string): Promise {
const response = await fetch(url)
diff --git a/src/lib/types.ts b/src/lib/types.ts
index 0801745..c8e60e3 100644
--- a/src/lib/types.ts
+++ b/src/lib/types.ts
@@ -37,5 +37,5 @@ export type namespaceResult = {
html_url: string
git_url: string
download_url: string
- type: "dir" | "file"
+ type: 'dir' | 'file'
}
diff --git a/src/main.ts b/src/main.ts
index 51bd810..5fbde29 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -9,27 +9,27 @@ import * as directives from 'vuetify/directives'
import App from './App.vue'
import colors from 'vuetify/util/colors'
-const buttonColor = "#00A087"
+const buttonColor = '#00A087'
const customLightTheme: ThemeDefinition = {
dark: false,
colors: {
primary: colors.grey.lighten4, // lightest grey
- secondary: "#e5e9f0", // light grey
+ secondary: '#e5e9f0', // light grey
accent: buttonColor, // turquoise
- header: "#1b335f" // dark blue for geoconnex
- },
+ header: '#1b335f' // dark blue for geoconnex
+ }
}
const customDarkTheme: ThemeDefinition = {
dark: true,
colors: {
- primary: "#3b4252",
- background: "#434c5e",
+ primary: '#3b4252',
+ background: '#434c5e',
surface: colors.grey.darken3,
secondary: colors.grey.darken2,
accent: buttonColor
- },
+ }
}
const vuetify = createVuetify({
@@ -39,7 +39,7 @@ const vuetify = createVuetify({
defaultTheme: 'light',
themes: {
dark: customDarkTheme,
- light: customLightTheme,
+ light: customLightTheme
}
}
})