diff --git a/README.md b/README.md index 42e8cb5..e330cdb 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ $ node dist/server ``` ``` -$ cd client && npm run serve +$ cd client && npm run dev ``` Then open http://localhost:8080. diff --git a/client/.env.development b/client/.env.development index 4d1d283..5857718 100644 --- a/client/.env.development +++ b/client/.env.development @@ -1,2 +1,2 @@ -VUE_APP_API_URL=http://localhost:3234 -#VUE_APP_API_URL=https://search.joinpeertube.org +VITE_APP_API_URL=http://localhost:3234 +#VITE_APP_API_URL=https://search.joinpeertube.org diff --git a/client/.eslintrc.json b/client/.eslintrc.json new file mode 100644 index 0000000..cefaa25 --- /dev/null +++ b/client/.eslintrc.json @@ -0,0 +1,18 @@ +{ + "root": true, + "parser": "vue-eslint-parser", + "parserOptions": { + "parser": "@typescript-eslint/parser" + }, + "plugins": [ "@typescript-eslint" ], + "extends": [ + "eslint:recommended", + "plugin:@typescript-eslint/recommended", + "plugin:vue/vue3-recommended" + ], + "rules": { + "vue/multi-word-component-names": "off", + "vue/require-default-prop": "off", + "@typescript-eslint/no-explicit-any": "off" + } +} diff --git a/client/.gitignore b/client/.gitignore index 3d48bb8..57db099 100644 --- a/client/.gitignore +++ b/client/.gitignore @@ -1 +1,2 @@ src/locale/**/*~ +dist/ diff --git a/client/.postcssrc b/client/.postcssrc deleted file mode 100644 index ed0149b..0000000 --- a/client/.postcssrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "plugins": { - "autoprefixer": {} - } -} \ No newline at end of file diff --git a/client/public/index.html b/client/index.html similarity index 67% rename from client/public/index.html rename to client/index.html index a96dca3..2144fb4 100644 --- a/client/public/index.html +++ b/client/index.html @@ -6,7 +6,7 @@ - + @@ -15,9 +15,7 @@
- - - + diff --git a/client/package.json b/client/package.json index 8344f2d..29c5a56 100644 --- a/client/package.json +++ b/client/package.json @@ -3,34 +3,32 @@ "version": "0.0.1", "private": true, "scripts": { - "serve": "vue-cli-service serve --mode development", - "build": "vue-cli-service build --mode production", - "lint": "vue-cli-service lint", + "dev": "vite", + "build": "vue-tsc --noEmit && vite build", + "lint": "eslint --ext .js,.vue,.ts --ignore-path .gitignore --fix src", "i18n:update": "git fetch weblate && git merge weblate/master && rm -f src/locale/en_US/LC_MESSAGES/app.po && make clean && make makemessages && make translations" }, "dependencies": {}, "devDependencies": { - "@jshmrtn/vue3-gettext": "^1.5.0", "@sipec/vue3-tags-input": "^3.0.4", "@types/axios": "^0.14.0", - "@types/markdown-it": "^10.0.1", - "@vue/cli-plugin-typescript": "~5.0.0-beta.2", - "@vue/cli-service": "~5.0.0-beta.2", - "@vue/compiler-sfc": "^3.1.0", - "axios": "^0.20.0", - "markdown-it": "^11.0.0", + "@types/markdown-it": "^12.2.3", + "@typescript-eslint/eslint-plugin": "^5.12.1", + "@typescript-eslint/parser": "^5.12.1", + "@vitejs/plugin-vue": "^2.2.2", + "@vue/eslint-config-typescript": "^10.0.0", + "axios": "^0.26.0", + "eslint": "^8.9.0", + "eslint-plugin-vue": "^8.5.0", + "markdown-it": "^12.3.2", "nprogress": "^0.2.0", - "register-service-worker": "^1.0.0", - "sass": "^1.35.1", - "sass-loader": "^12.1.0", - "typescript": "~4.3.4", - "vue": "^3.1.0", - "vue-matomo": "^4.0.1", - "vue-router": "^4.0.0" - }, - "browserslist": [ - "> 1%", - "last 2 versions", - "not dead" - ] + "sass": "^1.49.8", + "typescript": "~4.5.5", + "vite": "^2.8.4", + "vue": "^3.2.31", + "vue-matomo": "^4.1.0", + "vue-router": "^4.0.12", + "vue-tsc": "^0.31.4", + "vue3-gettext": "^2.1.0" + } } diff --git a/client/src/App.vue b/client/src/App.vue index b736a82..919111b 100644 --- a/client/src/App.vue +++ b/client/src/App.vue @@ -1,8 +1,11 @@ @@ -18,7 +21,7 @@ data () { return { - title: process.env.VUE_APP_TITLE + title: import.meta.env.VITE_APP_TITLE } } }) diff --git a/client/src/components/ActorMiniature.vue b/client/src/components/ActorMiniature.vue index 6c09887..5eb1bb6 100644 --- a/client/src/components/ActorMiniature.vue +++ b/client/src/components/ActorMiniature.vue @@ -1,15 +1,63 @@ + + - - diff --git a/client/src/components/ChannelResult.vue b/client/src/components/ChannelResult.vue index e4a1ad2..06538e6 100644 --- a/client/src/components/ChannelResult.vue +++ b/client/src/components/ChannelResult.vue @@ -1,15 +1,33 @@ - - + + diff --git a/client/src/components/Footer.vue b/client/src/components/Footer.vue index d358721..49fbc88 100644 --- a/client/src/components/Footer.vue +++ b/client/src/components/Footer.vue @@ -1,42 +1,107 @@ + + - - diff --git a/client/src/components/Header.vue b/client/src/components/Header.vue index d26cbf7..8cf165d 100644 --- a/client/src/components/Header.vue +++ b/client/src/components/Header.vue @@ -1,29 +1,87 @@ + + - - diff --git a/client/src/components/InterfaceLanguageDropdown.vue b/client/src/components/InterfaceLanguageDropdown.vue index 3a6c786..096824a 100644 --- a/client/src/components/InterfaceLanguageDropdown.vue +++ b/client/src/components/InterfaceLanguageDropdown.vue @@ -1,21 +1,80 @@ + + - - diff --git a/client/src/components/Pagination.vue b/client/src/components/Pagination.vue index 5ca397c..1131d8c 100644 --- a/client/src/components/Pagination.vue +++ b/client/src/components/Pagination.vue @@ -1,29 +1,69 @@