Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
arildm committed Feb 12, 2024
2 parents ca45fb9 + 85738f1 commit 952458f
Show file tree
Hide file tree
Showing 110 changed files with 3,508 additions and 2,203 deletions.
12 changes: 12 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
env: {
node: true,
"vue/setup-compiler-macros": true,
},
extends: [
"eslint:recommended",
"plugin:vue/vue3-recommended",
"@vue/eslint-config-typescript",
"prettier",
],
};
11 changes: 0 additions & 11 deletions .eslintrc.js

This file was deleted.

5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ jobs:
node-version: [18.x, 20.x]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: yarn install
- run: yarn lint
- run: yarn test
- run: yarn build
21 changes: 20 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,30 @@ As this project is a user-facing application, the places in the semantic version

## [Unreleased]

## [1.3.0] (2024-02-12)

### Added

- Converted code to TypeScript [#113](https://github.com/spraakbanken/mink-frontend/issues/113)
- Lint check in CI workflow script

### Changed

- Renamed one-word components, for linting

### Fixed

- Status panel is empty for new corpus, until page is reloaded [#151](https://github.com/spraakbanken/mink-frontend/issues/151)
- Word wrapping in log output in status panel [#139](https://github.com/spraakbanken/mink-frontend/issues/139)
- Upgraded dependencies

## [1.2.0] (2024-01-17)

### Added

- Option to enable named entity recognition
- Check if admin mode is enabled on load
- Build check in CI workflow script

### Changed

Expand Down Expand Up @@ -123,7 +141,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.2.0...HEAD
[unreleased]: https://github.com/spraakbanken/mink-frontend/compare/v1.3.0...HEAD
[1.3.0]: https://github.com/spraakbanken/mink-frontend/compare/v1.2.0...v1.3.0
[1.2.0]: https://github.com/spraakbanken/mink-frontend/compare/v1.1.0...v1.2.0
[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
Expand Down
14 changes: 14 additions & 0 deletions env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/// <reference types="vite/client" />

interface ImportMetaEnv {
readonly VITE_BACKEND_URL: string;
readonly VITE_AUTH_URL: string;
readonly VITE_KORP_URL: string;
readonly VITE_STRIX_URL: string;
readonly VITE_MATOMO_URL: string;
readonly VITE_MATOMO_ID?: number;
}

interface ImportMeta {
readonly env: ImportMetaEnv;
}
1 change: 1 addition & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare module "vue-matomo";
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand All @@ -9,6 +9,6 @@

<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
9 changes: 0 additions & 9 deletions jsconfig.json

This file was deleted.

36 changes: 22 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
{
"name": "mink-frontend",
"version": "1.2.0",
"version": "1.3.0",
"license": "MIT",
"scripts": {
"dev": "vite",
"build": "vite build",
"build": "yarn typecheck && vite build",
"serve": "vite preview",
"typecheck": "vue-tsc --noEmit",
"lint": "eslint --ext .js,.vue --ignore-path .gitignore --fix src",
"format": "prettier . --write '!.yarn' --ignore-path .gitignore",
"format": "prettier . --write --ignore-path .gitignore",
"test": "vitest",
"coverage": "vitest run --coverage"
},
"engines": {
"node": ">=18.0.0"
},
"type": "module",
"dependencies": {
"@formkit/vue": "^1.0.0-beta.14",
"@fortawesome/fontawesome-svg-core": "^6.1.1",
Expand All @@ -22,29 +24,35 @@
"@fortawesome/vue-fontawesome": "^3.0.1",
"@modyfi/vite-plugin-yaml": "^1.0.4",
"@vitejs/plugin-vue": "^5",
"@vueuse/core": "^9.6.0",
"@vue/tsconfig": "^0.5.1",
"@vueuse/core": "^10.7.2",
"autoprefixer": "^10.4.7",
"axios": "^0.21.4",
"axios": "^1",
"eslint": "^8.15.0",
"filesize": "^10.0.6",
"js-yaml": "^4.1.0",
"lodash": "^4.17.21",
"pinia": "^2.0.28",
"rollup-plugin-visualizer": "^5.6.0",
"tailwindcss": "^3.1.4",
"vite": "^4.0.5",
"vite-plugin-rewrite-all": "1.0.1 || ^1.0.3",
"typescript": "^5.3.3",
"vite": "^5",
"vue": "^3.4",
"vue-i18n": "9",
"vue-matomo": "^4.2.0",
"vue-router": "4"
"vue-router": "4",
"vue-tsc": "^1.8.27"
},
"devDependencies": {
"@testing-library/vue": "^6.6.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-vue": "^8.0",
"happy-dom": "^7.7.0",
"prettier": "^2.4.0",
"vitest": "^0.25.3"
"@testing-library/vue": "^8.0.1",
"@types/js-yaml": "^4.0.9",
"@types/lodash": "^4.14.202",
"@types/node": "^20.10.6",
"@vue/eslint-config-typescript": "^12.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-vue": "^9.0",
"happy-dom": "^12.10.3",
"prettier": "^3.2.4",
"vitest": "^1.2.2"
}
}
2 changes: 1 addition & 1 deletion postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
Expand Down
44 changes: 21 additions & 23 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -1,31 +1,15 @@
<template>
<AppHeader :large="isHome" />
<Breadcrumb />
<MessageToasts />

<div class="container py-2">
<router-view />
</div>

<div
class="container py-20 flex justify-center items-center text-sm opacity-70"
>
{{ $t("contact") }}: [email protected]
</div>
</template>

<script setup>
<script setup lang="ts">
import { computed } from "vue";
import { useRoute } from "vue-router";
import { useTitle } from "@vueuse/core";
import { api } from "@/api/api";
import api from "@/api/api";
import * as util from "@/util";
import { useAuth } from "@/auth/auth.composable";
import useLocale from "@/i18n/locale.composable";
import { useCorpusStore } from "@/store/corpus.store";
import MessageToasts from "@/message/MessageToasts.vue";
import usePageTitle from "@/page/title.composable";
import Breadcrumb from "@/page/Breadcrumb.vue";
import BreadcrumbBar from "@/page/BreadcrumbBar.vue";
import AppHeader from "./page/AppHeader.vue";
const { refreshJwt } = useAuth();
Expand All @@ -43,10 +27,24 @@ const isHome = computed(() => route.path == "/");
refreshJwt();
if (import.meta.env.DEV) {
window.api = api;
window.corpusStore = corpusStore;
window.util = util;
(window as any).api = api;
(window as any).corpusStore = corpusStore;
(window as any).util = util;
}
</script>

<style scoped></style>
<template>
<AppHeader :large="isHome" />
<BreadcrumbBar />
<MessageToasts />

<div class="container py-2">
<router-view />
</div>

<div
class="container py-20 flex justify-center items-center text-sm opacity-70"
>
{{ $t("contact") }}: [email protected]
</div>
</template>
Loading

0 comments on commit 952458f

Please sign in to comment.