diff --git a/config/config.exs b/config/config.exs index 44cac4fe5..1e4aefb4d 100644 --- a/config/config.exs +++ b/config/config.exs @@ -146,6 +146,10 @@ config :mobilizon, :ldap, base: System.get_env("LDAP_BASE") || "dc=example,dc=com", uid: System.get_env("LDAP_UID") || "cn", require_bind_for_search: !(System.get_env("LDAP_REQUIRE_BIND_FOR_SEARCH") == "false"), + # The full CN to filter by `memberOf`, or `false` if disabled + group: false, + # Either the admin UID matching the field in `uid`, + # Either a tuple with the fully qualified DN: {:full, uid=admin,dc=example.com,dc=local} bind_uid: System.get_env("LDAP_BIND_UID"), bind_password: System.get_env("LDAP_BIND_PASSWORD") @@ -158,17 +162,14 @@ config :geolix, } ] -config :auto_linker, - opts: [ - scheme: true, - extra: true, - # TODO: Set to :no_scheme when it works properly - validate_tld: true, - class: false, - strip_prefix: false, - new_window: true, - rel: "noopener noreferrer ugc" - ] +config :mobilizon, Mobilizon.Service.Formatter, + class: false, + rel: "noopener noreferrer ugc", + new_window: true, + truncate: false, + strip_prefix: false, + extra: true, + validate_tld: :no_scheme config :tesla, adapter: Tesla.Adapter.Hackney diff --git a/js/.editorconfig b/js/.editorconfig index c24743d00..446bb3e15 100644 --- a/js/.editorconfig +++ b/js/.editorconfig @@ -4,4 +4,4 @@ indent_size = 2 end_of_line = lf trim_trailing_whitespace = true insert_final_newline = true -max_line_length = 100 +max_line_length = 80 diff --git a/js/.eslintrc.js b/js/.eslintrc.js index ac692e5ee..939c4df9d 100644 --- a/js/.eslintrc.js +++ b/js/.eslintrc.js @@ -38,8 +38,11 @@ module.exports = { "error", { ignoreStrings: true, + ignoreHTMLTextContents: true, + ignoreTemplateLiterals: true, + ignoreComments: true, template: 170, - code: 100, + code: 80, }, ], "prettier/prettier": "error", @@ -48,13 +51,18 @@ module.exports = { "import/prefer-default-export": "off", "import/extensions": "off", "import/no-unresolved": "off", + "no-shadow": "off", + "@typescript-eslint/no-shadow": ["error"], }, ignorePatterns: ["src/typings/*.d.ts", "vue.config.js"], overrides: [ { - files: ["**/__tests__/*.{j,t}s?(x)", "**/tests/unit/**/*.spec.{j,t}s?(x)"], + files: [ + "**/__tests__/*.{j,t}s?(x)", + "**/tests/unit/**/*.spec.{j,t}s?(x)", + ], env: { mocha: true, }, diff --git a/js/get_union_json.ts b/js/get_union_json.ts index dc3899bb8..287cc9982 100644 --- a/js/get_union_json.ts +++ b/js/get_union_json.ts @@ -24,7 +24,9 @@ fetch(`http://localhost:4000/api`, { .then((result) => result.json()) .then((result) => { // here we're filtering out any type information unrelated to unions or interfaces - const filteredData = result.data.__schema.types.filter((type) => type.possibleTypes !== null); + const filteredData = result.data.__schema.types.filter( + (type) => type.possibleTypes !== null + ); result.data.__schema.types = filteredData; fs.writeFile("./fragmentTypes.json", JSON.stringify(result.data), (err) => { if (err) { diff --git a/js/package.json b/js/package.json index cecf08ede..4b6af9d46 100644 --- a/js/package.json +++ b/js/package.json @@ -3,7 +3,6 @@ "version": "1.0.2", "private": true, "scripts": { - "start": "vue-cli-service serve", "serve": "vue-cli-service serve", "build": "vue-cli-service build --modern", "test:unit": "vue-cli-service test:unit", @@ -64,13 +63,13 @@ "@types/vuedraggable": "^2.23.0", "@typescript-eslint/eslint-plugin": "^4.0.1", "@typescript-eslint/parser": "^4.0.1", - "@vue/cli-plugin-babel": "~4.5.8", - "@vue/cli-plugin-e2e-cypress": "~4.5.8", - "@vue/cli-plugin-eslint": "~4.5.8", - "@vue/cli-plugin-pwa": "~4.5.8", - "@vue/cli-plugin-router": "~4.5.8", - "@vue/cli-plugin-typescript": "~4.5.8", - "@vue/cli-service": "~4.5.8", + "@vue/cli-plugin-babel": "~4.5.9", + "@vue/cli-plugin-e2e-cypress": "~4.5.9", + "@vue/cli-plugin-eslint": "~4.5.9", + "@vue/cli-plugin-pwa": "~4.5.9", + "@vue/cli-plugin-router": "~4.5.9", + "@vue/cli-plugin-typescript": "~4.5.9", + "@vue/cli-service": "~4.5.9", "@vue/eslint-config-airbnb": "^5.0.2", "@vue/eslint-config-prettier": "^6.0.0", "@vue/eslint-config-typescript": "^7.0.0", @@ -80,11 +79,11 @@ "eslint-plugin-import": "^2.20.2", "eslint-plugin-prettier": "^3.1.3", "eslint-plugin-vue": "^7.0.0", - "prettier": "2.1.2", - "prettier-eslint": "^11.0.0", + "prettier": "2.2.1", + "prettier-eslint": "^12.0.0", "sass": "^1.29.0", "sass-loader": "^10.0.1", - "typescript": "~4.0.2", + "typescript": "~4.1.2", "vue-cli-plugin-svg": "~0.1.3", "vue-i18n-extract": "^1.0.2", "vue-template-compiler": "^2.6.11", diff --git a/js/public/img/icons/favicon-16x16.png b/js/public/img/icons/favicon-16x16.png index 082323a3c..42b6b3523 100644 Binary files a/js/public/img/icons/favicon-16x16.png and b/js/public/img/icons/favicon-16x16.png differ diff --git a/js/public/img/icons/favicon-32x32.png b/js/public/img/icons/favicon-32x32.png index 04ca2adc1..8813cc5f9 100644 Binary files a/js/public/img/icons/favicon-32x32.png and b/js/public/img/icons/favicon-32x32.png differ diff --git a/js/public/img/mobilizon_default_card.png b/js/public/img/mobilizon_default_card.png old mode 100755 new mode 100644 index d2527783e..8f9ccdf7c Binary files a/js/public/img/mobilizon_default_card.png and b/js/public/img/mobilizon_default_card.png differ diff --git a/js/public/img/mobilizon_logo.png b/js/public/img/mobilizon_logo.png old mode 100755 new mode 100644 index 53b3da3b5..9f09a4f14 Binary files a/js/public/img/mobilizon_logo.png and b/js/public/img/mobilizon_logo.png differ diff --git a/js/src/@types/dom.d.ts b/js/src/@types/dom.d.ts new file mode 100644 index 000000000..59a3a0781 --- /dev/null +++ b/js/src/@types/dom.d.ts @@ -0,0 +1,18 @@ +declare global { + interface GeolocationCoordinates { + readonly accuracy: number; + readonly altitude: number | null; + readonly altitudeAccuracy: number | null; + readonly heading: number | null; + readonly latitude: number; + readonly longitude: number; + readonly speed: number | null; + } + + interface GeolocationPosition { + readonly coords: GeolocationCoordinates; + readonly timestamp: number; + } +} + +export {}; diff --git a/js/src/App.vue b/js/src/App.vue index 0817426e7..a0b85b0f8 100644 --- a/js/src/App.vue +++ b/js/src/App.vue @@ -32,8 +32,16 @@ diff --git a/js/src/components/Footer.vue b/js/src/components/Footer.vue index a84743775..50d4eaf7f 100644 --- a/js/src/components/Footer.vue +++ b/js/src/components/Footer.vue @@ -3,13 +3,31 @@
- {{ `@${group.preferredUsername}@${group.domain}` }} + {{ + `@${group.preferredUsername}@${group.domain}` + }} {{ `@${group.preferredUsername}` }}
diff --git a/js/src/components/Group/GroupMemberCard.vue b/js/src/components/Group/GroupMemberCard.vue index f00689077..eb0bf1b42 100644 --- a/js/src/components/Group/GroupMemberCard.vue +++ b/js/src/components/Group/GroupMemberCard.vue @@ -13,7 +13,9 @@- {{ $t("Your participation still has to be approved by the organisers.") }} +
+ {{ + $t("Your participation still has to be approved by the organisers.") + }}
{{ $t("If you want, you may send a message to the event organizer here.") }}
++ {{ + $t( + "If you want, you may send a message to the event organizer here." + ) + }} +
{{ $t("Check your inbox (and your junk mail folder).") }}
++ {{ $t("Check your inbox (and your junk mail folder).") }} +
{{ $t("You may now close this window.") }}