diff --git a/CHANGELOG.md b/CHANGELOG.md index 78f1b3f..cbd6f3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,23 @@ As this project is a user-facing application, the places in the semantic version ## [Unreleased] +## [1.1.0] (2024-01-02) + +### Added + +- Link to manual about exports files + +### Changed + +- Rename "Dashboard" to "Library" +- Use new `resource-info` route, drop `check-status` and `list-sources` +- The local storage key is now tagged with a datestamp, and should be changed when the data shape of the state changes + +### Fixed + +- Allow clicking most elements behind a loading spinner +- Home page width on small screen + ## [1.0.5] (2023-11-28) ### Changed @@ -82,7 +99,8 @@ The frontend is now open to the general public! This version allows users to: Code changes up until this point are not documented other than in the git commit log. -[unreleased]: https://github.com/spraakbanken/mink-frontend/compare/v1.0.5...HEAD +[unreleased]: https://github.com/spraakbanken/mink-frontend/compare/v1.1.0...HEAD +[1.1.0]: https://github.com/spraakbanken/mink-frontend/compare/v1.0.5...v1.1.0 [1.0.5]: https://github.com/spraakbanken/mink-frontend/compare/v1.0.4...v1.0.5 [1.0.4]: https://github.com/spraakbanken/mink-frontend/compare/v1.0.3...v1.0.4 [1.0.3]: https://github.com/spraakbanken/mink-frontend/compare/v1.0.2...v1.0.3 diff --git a/package.json b/package.json index 81e01f8..d844460 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mink-frontend", - "version": "1.0.5", + "version": "1.1.0", "license": "MIT", "scripts": { "dev": "vite", diff --git a/src/api/api.js b/src/api/api.js index 6419e4f..6bd1c72 100644 --- a/src/api/api.js +++ b/src/api/api.js @@ -57,13 +57,6 @@ class MinkApi { return response.data; } - async listSources(corpusId) { - const response = await this.axios.get("list-sources", { - params: { corpus_id: corpusId }, - }); - return response.data.contents; - } - async downloadSourceFile(corpusId, filename, binary = false) { const response = await this.axios.get("download-sources", { params: { corpus_id: corpusId, file: filename, zip: false }, @@ -102,22 +95,14 @@ class MinkApi { return response.data; } - /** - * @returns {job_status, message, status} job_status can be: none, syncing_corpus, - * waiting, annotating, done_annotating, syncing_results, done, error, aborted. - */ - async checkStatus(corpusId) { - const response = await this.axios.get("check-status", { + /** @see https://ws.spraakbanken.gu.se/ws/mink/api-doc#tag/Process-Corpus/operation/resourceinfo */ + async resourceInfo(corpusId) { + const response = await this.axios.get("resource-info", { params: { corpus_id: corpusId }, }); return response.data; } - async checkStatusAll() { - const response = await this.axios.get("check-status"); - return response.data.jobs; - } - async runSparv(corpusId) { const response = await this.axios .put("run-sparv", null, { params: { corpus_id: corpusId } }) diff --git a/src/api/backend.composable.js b/src/api/backend.composable.js index 0f5ce73..2b10f0f 100644 --- a/src/api/backend.composable.js +++ b/src/api/backend.composable.js @@ -38,13 +38,6 @@ export default function useMinkBackend() { `corpus/${corpusId}/config` ); - const loadSources = (corpusId) => - spin( - api.listSources(corpusId), - t("source.list.loading"), - `corpus/${corpusId}/sources` - ); - const downloadSource = (corpusId, filename, binary) => spin( api.downloadSourceFile(corpusId, filename, binary), @@ -73,12 +66,13 @@ export default function useMinkBackend() { `corpus/${corpusId}/sources` ); - const loadJob = (corpusId) => - spin(api.checkStatus(corpusId), t("job.loading"), `corpus/${corpusId}/job`); - - /** Load job status data for those corpora that have any job info. */ - const loadJobs = () => - spin(api.checkStatusAll(), t("job.loading"), `corpora`); + /** @see https://ws.spraakbanken.gu.se/ws/mink/api-doc#tag/Process-Corpus/operation/resourceinfo */ + const resourceInfo = (corpusId) => + spin( + api.resourceInfo(corpusId), + t("resource.loading"), + `corpus/${corpusId}/job` + ); const runJob = (corpusId) => spin(api.runSparv(corpusId), t("job.starting"), `corpus/${corpusId}/job`); @@ -134,13 +128,11 @@ export default function useMinkBackend() { deleteCorpus, loadConfig, saveConfig, - loadSources, downloadSource, downloadPlaintext, uploadSources, deleteSource, - loadJob, - loadJobs, + resourceInfo, runJob, installKorp, installStrix, diff --git a/src/corpora/Dashboard.vue b/src/corpora/Library.vue similarity index 88% rename from src/corpora/Dashboard.vue rename to src/corpora/Library.vue index fd1a29c..28b2303 100644 --- a/src/corpora/Dashboard.vue +++ b/src/corpora/Library.vue @@ -1,11 +1,12 @@