diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..b4fd470 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,28 @@ +_archive +.DS_* +.env.* +.htaccess +.htaccess* +.idea +.out.* +.rsync-ignore +*.local +*.log +*.spec.* +bg.jpg +build +data +dist +dist_electron +docker +internal +legacy +logs +node_modules +npm-debug.log +package-lock.json +pnpm-lock.yaml +tmp +video +www +yarn-error.log \ No newline at end of file diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..09c2e42 --- /dev/null +++ b/.eslintrc @@ -0,0 +1,3 @@ +{ + "extends": "@antfu" +} diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index a194558..93b7b1c 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,4 +1,4 @@ -name: "CodeQL" +name: 'CodeQL' on: push: @@ -7,7 +7,7 @@ on: # The branches below must be a subset of the branches above branches: [master] schedule: - - cron: "0 0 * * 6" + - cron: '0 0 * * 6' jobs: analyse: diff --git a/.gitignore b/.gitignore index 07dcec8..d22ba29 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ -.env.* .DS_* +.env.* .htaccess .htaccess* .idea @@ -7,18 +7,11 @@ .rsync-ignore *.local *.log -app/public/faces -bg.jpg -bower_components dist dist_electron docker internal legacy -legacy/app/public/faces -legacy/ios/Briefing/Briefing.xcodeproj/project.xcworkspace/xcuserdata/dirk.xcuserdatad/UserInterfaceState.xcuserstate -legacy/ios/Briefing/Briefing.xcodeproj/xcuserdata/dirk.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist -legacy/ios/Briefing/Briefing.xcodeproj/xcuserdata/dirk.xcuserdatad/xcschemes/xcschememanagement.plist logs node_modules npm-debug.log diff --git a/.prettierrc b/.prettierrc index cc4e915..5149b1b 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,4 +1,5 @@ { "trailingComma": "es5", - "semi": false + "semi": false, + "singleQuote": true } diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..cb0d092 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "prettier.enable": false, + "editor.formatOnSave": false, + "editor.codeActionsOnSave": { + "source.fixAll.eslint": true + } +} diff --git a/docker-compose.development.yml b/docker-compose.development.yml index b905109..127c2e3 100644 --- a/docker-compose.development.yml +++ b/docker-compose.development.yml @@ -1,6 +1,6 @@ # Please read https://github.com/holtwick/briefing/blob/master/docs/docker.md for proper use of Docker -version: "3" +version: '3' services: briefing: diff --git a/docker-compose.yml b/docker-compose.yml index dcf1be0..59d1396 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,6 @@ # Please read https://github.com/holtwick/briefing/blob/master/docs/docker.md for proper use of Docker -version: "3" +version: '3' services: briefing: @@ -10,7 +10,6 @@ services: - ./data:/app/data ports: - 8080:8080 - # networks: # default: # external: diff --git a/docker-package.json b/docker-package.json index e8d9982..992e845 100644 --- a/docker-package.json +++ b/docker-package.json @@ -15,4 +15,4 @@ "engines": { "node": ">=16.0.0" } -} \ No newline at end of file +} diff --git a/docs/coturn.md b/docs/coturn.md index e06676e..741b9de 100644 --- a/docs/coturn.md +++ b/docs/coturn.md @@ -40,7 +40,7 @@ proc-group=turnserver Docker might be an alternative, but I didn't try by myself: -- https://hub.docker.com/r/instrumentisto/coturn +- https://hub.docker.com/r/coturn/coturn - https://gabrieltanner.org/blog/turn-server --- diff --git a/docs/development.md b/docs/development.md index da14a70..674bb24 100644 --- a/docs/development.md +++ b/docs/development.md @@ -18,7 +18,7 @@ Most customization can be done by setting env variables, see [.env](../.env) for Enable logging by entering the following in the browsers console: ```js -localStorage.zeed = "*" +localStorage.zeed = '*' ``` ## Technology stack diff --git a/docs/examples/docker-compose.briefing-proxy.yml b/docs/examples/docker-compose.briefing-proxy.yml index ba75d11..350c0b2 100644 --- a/docs/examples/docker-compose.briefing-proxy.yml +++ b/docs/examples/docker-compose.briefing-proxy.yml @@ -1,4 +1,4 @@ -version: "3" +version: '3' services: briefing: diff --git a/docs/examples/docker-compose.nginx-proxy.yml b/docs/examples/docker-compose.nginx-proxy.yml index 3666525..49b8e19 100644 --- a/docs/examples/docker-compose.nginx-proxy.yml +++ b/docs/examples/docker-compose.nginx-proxy.yml @@ -16,4 +16,3 @@ networks: default: external: name: proxy - diff --git a/index.html b/index.html index 4fa007d..f83d550 100644 --- a/index.html +++ b/index.html @@ -1,55 +1,74 @@ + + + + + - - - - - + Briefing - Secure direct video conferencing - Briefing - Secure direct video conferencing + - + + + + - - - - + + + + + + + + + + + - - - - - - - - - - - + - + + + - - - - - - -
- - - - \ No newline at end of file + + +
+ + + diff --git a/package.json b/package.json index 92f5436..1fdc195 100644 --- a/package.json +++ b/package.json @@ -25,14 +25,16 @@ "check": "vue-tsc --noEmit", "clean": "rm -rf dist www", "format": "prettier --write .", + "lint": "eslint .", + "lint:fix": "eslint . --fix", "preview": "vite preview", "reset": "rm -rf node_modules pnpm-lock.yaml dist dist_www www", "serve": "cross-env ZEED=* LEVEL=i node dist/main.cjs", "start": "cross-env ZEED=* LEVEL=a zerva src/zerva/index.ts", "test": "cross-env ZEED=* LEVEL=i vitest -r src --globals", + "upload:dockerhub": "nr build:docker && cd docker && docker buildx build --platform linux/arm64,linux/amd64,linux/s390x,linux/arm/v7,linux/arm/v6 -t holtwick/briefing:$npm_package_version -t holtwick/briefing:latest --push .", "upload:production": "nr build && rsync -rvz --exclude-from=.rsyncignore * docker-dev:briefing", - "upload:stage": "cross-env MODE=stage nr build:basis && rsync -rvz --exclude-from=.rsyncignore * docker-pro:briefing", - "upload:dockerhub": "nr build:docker && cd docker && docker buildx build --platform linux/arm64,linux/amd64,linux/s390x,linux/arm/v7,linux/arm/v6 -t holtwick/briefing:$npm_package_version -t holtwick/briefing:latest --push ." + "upload:stage": "cross-env MODE=stage nr build:basis && rsync -rvz --exclude-from=.rsyncignore * docker-pro:briefing" }, "dependencies": { "@sentry/browser": "^7.14.0", @@ -46,12 +48,14 @@ "zeed": "^0.8.31" }, "devDependencies": { + "@antfu/eslint-config": "^0.27.0", "@antfu/ni": "^0.18.2", "@types/node": "^18.7.23", "@vitejs/plugin-vue2": "^2.0.0", "@zerva/bin": "^0.14.2", "@zerva/vite": "^0.14.2", "cross-env": "^7.0.3", + "eslint": "^8.24.0", "prettier": "^2.7.1", "sass": "^1.55.0", "tsc": "^2.0.4", diff --git a/public/service-worker.js b/public/service-worker.js index b7eaa58..ccecad3 100644 --- a/public/service-worker.js +++ b/public/service-worker.js @@ -1,21 +1,21 @@ -console.info("Unregister previous service workers") +console.info('Unregister previous service workers') try { - self.addEventListener("install", () => { + self.addEventListener('install', () => { // Skip over the "waiting" lifecycle state, to ensure that our // new service worker is activated immediately, even if there's // another tab open controlled by our older service worker code. self.skipWaiting() }) - self.addEventListener("activate", () => { + self.addEventListener('activate', () => { // Optional: Get a list of all the current open windows/tabs under // our service worker's control, and force them to reload. // This can "unbreak" any open windows/tabs as soon as the new // service worker activates, rather than users having to manually reload. self.clients .matchAll({ - type: "window", + type: 'window', }) .then((windowClients) => { windowClients.forEach((windowClient) => { @@ -24,7 +24,7 @@ try { }) }) - self.addEventListener("activate", function (e) { + self.addEventListener('activate', function (e) { self.registration .unregister() .then(function () { @@ -35,7 +35,7 @@ try { }) }) } catch (err) { - console.error("Activate failed", err) + console.error('Activate failed', err) } try { @@ -43,7 +43,7 @@ try { for (let name of names) caches.delete(name) }) } catch (err) { - console.error("Cache delete failed", err) + console.error('Cache delete failed', err) } try { @@ -53,5 +53,5 @@ try { } }) } catch (err) { - console.error("Unregistering failed", err) + console.error('Unregistering failed', err) } diff --git a/scripts/app.js b/scripts/app.js index d4d0a5d..56217d4 100644 --- a/scripts/app.js +++ b/scripts/app.js @@ -1,3 +1,3 @@ // Some services prefer to start with app.js -import "./dist/main.cjs" +import './dist/main.cjs' diff --git a/src/app.vue b/src/app.vue index b0a7aa1..191f3aa 100644 --- a/src/app.vue +++ b/src/app.vue @@ -6,16 +6,16 @@ diff --git a/src/components/app-embed.vue b/src/components/app-embed.vue index 47a22d4..040e5c8 100644 --- a/src/components/app-embed.vue +++ b/src/components/app-embed.vue @@ -80,14 +80,14 @@ diff --git a/src/ui/sea-modal.scss b/src/ui/sea-modal.scss index 2d306cf..72d0fb7 100644 --- a/src/ui/sea-modal.scss +++ b/src/ui/sea-modal.scss @@ -1,6 +1,6 @@ // Copyright (c) 2020-2022 Dirk Holtwick. All rights reserved. https://holtwick.de/copyright -@import "../css/variables"; +@import '../css/variables'; $modalOverlayBackground: var(--overlay-color, rgba(black, 0.75)); $modalSepColor: var(--separator-color, $gray-color-light); diff --git a/src/ui/sea-modal.vue b/src/ui/sea-modal.vue index c3a99f0..9c92b72 100644 --- a/src/ui/sea-modal.vue +++ b/src/ui/sea-modal.vue @@ -51,27 +51,27 @@