diff --git a/GuessNN-webapp/.gitignore b/GuessNN-webapp/.gitignore index 38adffa..ba181ee 100644 --- a/GuessNN-webapp/.gitignore +++ b/GuessNN-webapp/.gitignore @@ -26,3 +26,7 @@ coverage *.njsproj *.sln *.sw? + +# Puzzle-related data +public/entities.json +public/concepts.json diff --git a/GuessNN-webapp/src/Concept.ts b/GuessNN-webapp/src/Concept.ts new file mode 100644 index 0000000..28b55b5 --- /dev/null +++ b/GuessNN-webapp/src/Concept.ts @@ -0,0 +1,5 @@ +export class Concept { + elements: Array = [] + extensionalDistance = 0 + properSize = 0 +} diff --git a/GuessNN-webapp/src/NamedEntity.ts b/GuessNN-webapp/src/NamedEntity.ts new file mode 100644 index 0000000..362ce04 --- /dev/null +++ b/GuessNN-webapp/src/NamedEntity.ts @@ -0,0 +1,5 @@ +export class NamedEntity { + name = ""; + type = ""; + uri = ""; +} diff --git a/GuessNN-webapp/src/Utils.ts b/GuessNN-webapp/src/Utils.ts new file mode 100644 index 0000000..0b6e5bd --- /dev/null +++ b/GuessNN-webapp/src/Utils.ts @@ -0,0 +1,8 @@ +export function fetchJSON(url: string): Promise { + return fetch(url) + .then((response) => { + if (!response.ok) + throw new Error(`Error fetching ${url}: ${response.status} - ${response.statusText}`); + return response.json(); + }); +} diff --git a/GuessNN-webapp/src/assets/test.json b/GuessNN-webapp/src/assets/test.json deleted file mode 100644 index a3b8172..0000000 --- a/GuessNN-webapp/src/assets/test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "test": "hello" -} diff --git a/GuessNN-webapp/src/components/MainComponent.vue b/GuessNN-webapp/src/components/MainComponent.vue index 76393d3..5e532da 100644 --- a/GuessNN-webapp/src/components/MainComponent.vue +++ b/GuessNN-webapp/src/components/MainComponent.vue @@ -1,29 +1,106 @@ - +