diff --git a/api/graphql/generated.go b/api/graphql/generated.go index c90bc6b..03d8520 100644 --- a/api/graphql/generated.go +++ b/api/graphql/generated.go @@ -1842,8 +1842,8 @@ type User { } enum LanguageTranslation { - en, - da + English, + Danish } type UserPreferences { @@ -1899,8 +1899,8 @@ type MediaDownload { } enum MediaType { - photo - video + Photo + Video } type Media { diff --git a/api/graphql/models/generated.go b/api/graphql/models/generated.go index c2bfc5f..bea87e0 100644 --- a/api/graphql/models/generated.go +++ b/api/graphql/models/generated.go @@ -71,18 +71,18 @@ type TimelineGroup struct { type LanguageTranslation string const ( - LanguageTranslationEn LanguageTranslation = "en" - LanguageTranslationDa LanguageTranslation = "da" + LanguageTranslationEnglish LanguageTranslation = "English" + LanguageTranslationDanish LanguageTranslation = "Danish" ) var AllLanguageTranslation = []LanguageTranslation{ - LanguageTranslationEn, - LanguageTranslationDa, + LanguageTranslationEnglish, + LanguageTranslationDanish, } func (e LanguageTranslation) IsValid() bool { switch e { - case LanguageTranslationEn, LanguageTranslationDa: + case LanguageTranslationEnglish, LanguageTranslationDanish: return true } return false @@ -112,8 +112,8 @@ func (e LanguageTranslation) MarshalGQL(w io.Writer) { type MediaType string const ( - MediaTypePhoto MediaType = "photo" - MediaTypeVideo MediaType = "video" + MediaTypePhoto MediaType = "Photo" + MediaTypeVideo MediaType = "Video" ) var AllMediaType = []MediaType{ diff --git a/api/graphql/schema.graphql b/api/graphql/schema.graphql index c6cd5b4..bf81823 100644 --- a/api/graphql/schema.graphql +++ b/api/graphql/schema.graphql @@ -222,8 +222,8 @@ type User { } enum LanguageTranslation { - en, - da + English, + Danish } type UserPreferences { @@ -279,8 +279,8 @@ type MediaDownload { } enum MediaType { - photo - video + Photo + Video } type Media { diff --git a/ui/.eslintrc.js b/ui/.eslintrc.js index 602967f..e5314a2 100644 --- a/ui/.eslintrc.js +++ b/ui/.eslintrc.js @@ -3,6 +3,7 @@ module.exports = { browser: true, es6: true, }, + ignorePatterns: ['**/*.ts', '**/*.tsx'], extends: ['eslint:recommended', 'plugin:react/recommended'], globals: { Atomics: 'readonly', diff --git a/ui/__generated__/globalTypes.ts b/ui/__generated__/globalTypes.ts new file mode 100644 index 0000000..2045400 --- /dev/null +++ b/ui/__generated__/globalTypes.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +//============================================================== +// START Enums and Input Objects +//============================================================== + +export enum LanguageTranslation { + Danish = "Danish", + English = "English", +} + +export enum MediaType { + Photo = "Photo", + Video = "Video", +} + +export enum NotificationType { + Close = "Close", + Message = "Message", + Progress = "Progress", +} + +export enum OrderDirection { + ASC = "ASC", + DESC = "DESC", +} + +//============================================================== +// END Enums and Input Objects +//============================================================== diff --git a/ui/apollo.config.js b/ui/apollo.config.js new file mode 100644 index 0000000..6b72722 --- /dev/null +++ b/ui/apollo.config.js @@ -0,0 +1,8 @@ +module.exports = { + client: { + service: { + name: 'photoview', + localSchemaFile: '../api/graphql/schema.graphql', + }, + }, +} diff --git a/ui/build.mjs b/ui/build.mjs index f6605ad..3cab176 100644 --- a/ui/build.mjs +++ b/ui/build.mjs @@ -20,7 +20,7 @@ const defineEnv = ENVIRONMENT_VARIABLES.reduce((acc, key) => { }, {}) const esbuildOptions = { - entryPoints: ['src/index.js'], + entryPoints: ['src/index.tsx'], plugins: [ babel({ filter: /photoview\/ui\/src\/.*\.js$/, diff --git a/ui/extractedTranslations/da/translation.json b/ui/extractedTranslations/da/translation.json index 2eec906..2c3f540 100644 --- a/ui/extractedTranslations/da/translation.json +++ b/ui/extractedTranslations/da/translation.json @@ -1,12 +1,12 @@ { "album_filter": { - "only_favorites": "Vis kun favoritter", - "sort_by": "Sorter efter", + "only_favorites": null, + "sort_by": null, "sorting_options": { - "date_imported": "Dato for importering", - "date_shot": "Dato", - "title": "Titel", - "type": "Type" + "date_imported": null, + "date_shot": null, + "title": null, + "type": null } }, "albums_page": { @@ -14,33 +14,33 @@ }, "general": { "action": { - "add": "Tilføj", - "cancel": "Annuller", - "delete": "Slet", - "remove": "Fjern", - "save": "Gem" + "add": null, + "cancel": null, + "delete": null, + "remove": null, + "save": null }, "loading": { - "album": "Loader album", + "album": null, "default": "Loader...", - "media": "Loader medier", + "media": null, "page": "Loader side", "paginate": { "faces": "Loader flere personer", "media": "Loader flere medier" }, - "shares": "Loader delinger...", + "shares": null, "timeline": "Loader tidslinje" } }, "header": { "search": { - "loading": "Loader resultater...", - "no_results": "Fandt ingen resultater", - "placeholder": "Søg", + "loading": null, + "no_results": null, + "placeholder": null, "result_type": { - "albums": "Albums", - "photos": "Billeder" + "albums": null, + "photos": null } } }, @@ -74,24 +74,24 @@ }, "settings": { "concurrent_workers": { - "description": "Det maksimale antal medier som må skannes samtidig", - "title": "Samtidige scanner-arbejdere" + "description": null, + "title": null }, "logout": null, "periodic_scanner": { - "checkbox_label": "Aktiver periodiske scanner", + "checkbox_label": null, "field": { - "description": "Hvor ofte scanneren bør udføre automatiske scanninger af alle brugere", - "label": "Periodiske scanningsintervaller" + "description": null, + "label": null }, "interval_unit": { - "days": "Dage", - "hour": "Timer", - "minutes": "Minutter", - "months": "Måneder", - "seconds": "Sekunder" + "days": null, + "hour": null, + "minutes": null, + "months": null, + "seconds": null }, - "title": "Periodisk scanner" + "title": null }, "scanner": { "description": "Vil scanne alle brugere for nye eller opdaterede medier", @@ -106,21 +106,21 @@ }, "users": { "add_user": { - "submit": "Tilføj bruger" + "submit": null }, "confirm_delete_user": { - "action": "Slet {user}", - "description": "<0>Er du sikker på at du vil slette <1>?

Denne handling kan ikke fortrydes

", - "title": "Slet bruger" + "action": null, + "description": null, + "title": null }, "password_reset": { - "description": "Ændre adgangskode for <1>", + "description": null, "form": { - "label": "Ny adgangskode", - "placeholder": "adgangskode", - "submit": "Ændre adgangskode" + "label": null, + "placeholder": null, + "submit": null }, - "title": "Ændre adgangskode" + "title": null }, "table": { "column_names": { @@ -132,10 +132,10 @@ "new_user": "Ny bruger", "row": { "action": { - "change_password": "Ændre adgangskode", - "delete": "Slet", - "edit": "Rediger", - "scan": "Scan" + "change_password": null, + "delete": null, + "edit": null, + "scan": null } } }, @@ -153,72 +153,72 @@ }, "sidebar": { "album": { - "title": "Album indstillinger" + "title": null }, "download": { "filesize": { - "byte": "{{count}} Byte", - "byte_plural": "{{count}} Bytes", - "giga_byte": "{{count}} GB", - "kilo_byte": "{{count}} KB", - "mega_byte": "{{count}} MB", - "tera_byte": "{{count}} TB" + "byte": null, + "byte_plural": null, + "giga_byte": null, + "kilo_byte": null, + "mega_byte": null, + "tera_byte": null }, "table_columns": { - "dimensions": "Dimension", - "file_size": "Størrelse", - "file_type": "Type", - "name": "Navn" + "dimensions": null, + "file_size": null, + "file_type": null, + "name": null }, - "title": "Download" + "title": null }, "media": { "exif": { "exposure_program": { - "action_program": "Actionprogram", - "aperture_priority": "Blændeprioritet", - "bulb": "Bulb", - "creative_program": "Kreativ program", - "landscape_mode": "Landskabsmode", - "manual": "Manuel", - "normal_program": "Normal program", - "not_defined": "Ikke defineret", - "portrait_mode": "Portræt mode", - "shutter_priority": "Lukkerprioritet" + "action_program": null, + "aperture_priority": null, + "bulb": null, + "creative_program": null, + "landscape_mode": null, + "manual": null, + "normal_program": null, + "not_defined": null, + "portrait_mode": null, + "shutter_priority": null }, "flash": { - "auto": "Auto", - "did_not_fire": "Blitz affyrede ikke", - "fired": "Affyrede", - "no_flash": "Ingen blitz", - "no_flash_function": "Ingen blitz-funktion", - "off": "Slukket", - "on": "Tændt", - "red_eye_reduction": "Røde øjne reduktion", - "return_detected": "Retur registreret", - "return_not_detected": "Retur ikke registreret" + "auto": null, + "did_not_fire": null, + "fired": null, + "no_flash": null, + "no_flash_function": null, + "off": null, + "on": null, + "red_eye_reduction": null, + "return_detected": null, + "return_not_detected": null }, "name": { - "aperture": "Blænde", - "camera": "Kamera", - "date_shot": "Dato", - "exposure": "Lukketid", - "exposure_program": "Lukketid program", - "flash": "Blitz", - "focal_length": "Fokallængde", - "iso": "ISO", - "lens": "Lense", - "maker": "Mærke" + "aperture": null, + "camera": null, + "date_shot": null, + "exposure": null, + "exposure_program": null, + "flash": null, + "focal_length": null, + "iso": null, + "lens": null, + "maker": null } } }, "sharing": { - "add_share": "Tilføj deling", - "copy_link": "Kopier link", - "no_shares_found": "Ingen delinger fundet", - "public_link": "Offentligt link", - "table_header": "Offentlige delinger", - "title": "Indstillinger for deling" + "add_share": null, + "copy_link": null, + "no_shares_found": null, + "public_link": null, + "table_header": null, + "title": null } }, "sidemenu": { diff --git a/ui/extractedTranslations/en/translation.json b/ui/extractedTranslations/en/translation.json index c48252c..d5f801c 100644 --- a/ui/extractedTranslations/en/translation.json +++ b/ui/extractedTranslations/en/translation.json @@ -158,7 +158,7 @@ "download": { "filesize": { "byte": "{{count}} Byte", - "byte_plural": "{{count}} Bytes", + "byte_plural": null, "giga_byte": "{{count}} GB", "kilo_byte": "{{count}} KB", "mega_byte": "{{count}} MB", diff --git a/ui/package-lock.json b/ui/package-lock.json index 67884c0..ef8a704 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -9,11 +9,11 @@ "version": "0.0.1", "license": "GPL-3.0", "dependencies": { - "@apollo/client": "^3.3.13", - "@babel/core": "^7.13.14", + "@apollo/client": "^3.3.14", + "@babel/core": "^7.13.15", "@babel/plugin-transform-modules-commonjs": "^7.13.8", - "@babel/plugin-transform-runtime": "^7.13.10", - "@babel/preset-env": "^7.13.12", + "@babel/plugin-transform-runtime": "^7.13.15", + "@babel/preset-env": "^7.13.15", "@babel/preset-react": "^7.13.13", "babel-eslint": "^10.1.0", "babel-jest": "^26.6.3", @@ -27,14 +27,13 @@ "dotenv": "^8.2.0", "esbuild": "^0.8.52", "esbuild-plugin-babel": "^0.2.3", - "eslint": "^7.23.0", - "eslint-plugin-jest": "^24.3.3", - "eslint-plugin-jest-dom": "^3.7.0", - "eslint-plugin-react": "^7.23.1", + "eslint": "^7.24.0", + "eslint-plugin-jest": "^24.3.5", + "eslint-plugin-jest-dom": "^3.8.0", + "eslint-plugin-react": "^7.23.2", "eslint-plugin-react-hooks": "^4.2.0", "fs-extra": "^9.1.0", - "graphql": "^15.5.0", - "i18next": "^20.1.0", + "i18next": "^20.2.1", "mapbox-gl": "^2.2.0", "prop-types": "^15.7.2", "react": "^17.0.2", @@ -49,6 +48,7 @@ "semantic-ui-react": "^2.0.3", "styled-components": "^5.2.3", "subscriptions-transport-ws": "^0.9.18", + "typescript": "^4.2.4", "url-join": "^4.0.1", "workbox-build": "^6.1.2" }, @@ -56,6 +56,10 @@ "@testing-library/jest-dom": "^5.11.10", "@testing-library/react": "^11.2.6", "@types/react": "^17.0.3", + "@types/react-dom": "^17.0.3", + "@types/react-helmet": "^6.1.1", + "@types/react-router-dom": "^5.1.7", + "@types/styled-components": "^5.1.9", "husky": "^6.0.0", "jest": "^26.6.3", "lint-staged": "^10.5.4", @@ -63,9 +67,9 @@ } }, "node_modules/@apollo/client": { - "version": "3.3.13", - "resolved": "https://registry.npmjs.org/@apollo/client/-/client-3.3.13.tgz", - "integrity": "sha512-usiVmXiOq0J/GpyIOIhlF8ItHpiPJObC7zoxLYPoOYj3G3OB0hCIcUKs3aTJ3ATW7u8QxvYgRaJg72NN7E1WOg==", + "version": "3.3.14", + "resolved": "https://registry.npmjs.org/@apollo/client/-/client-3.3.14.tgz", + "integrity": "sha512-z7YwMvF9grmpWUG+26e3gPcBAOA/r/Ci5gwK7JVm3bGYG9kKqG8MF6sMXEbuwTsFseE4duSp0icJ6tdzxJhhlA==", "dependencies": { "@graphql-typed-document-node/core": "^3.0.0", "@types/zen-observable": "^0.8.0", @@ -112,23 +116,23 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.13.12.tgz", - "integrity": "sha512-3eJJ841uKxeV8dcN/2yGEUy+RfgQspPEgQat85umsE1rotuquQ2AbIub4S6j7c50a2d+4myc+zSlnXeIHrOnhQ==" + "version": "7.13.15", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.13.15.tgz", + "integrity": "sha512-ltnibHKR1VnrU4ymHyQ/CXtNXI6yZC0oJThyW78Hft8XndANwi+9H+UIklBDraIjFEJzw8wmcM427oDd9KS5wA==" }, "node_modules/@babel/core": { - "version": "7.13.14", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.13.14.tgz", - "integrity": "sha512-wZso/vyF4ki0l0znlgM4inxbdrUvCb+cVz8grxDq+6C9k6qbqoIJteQOKicaKjCipU3ISV+XedCqpL2RJJVehA==", + "version": "7.13.15", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.13.15.tgz", + "integrity": "sha512-6GXmNYeNjS2Uz+uls5jalOemgIhnTMeaXo+yBUA72kC2uX/8VW6XyhVIo2L8/q0goKQA3EVKx0KOQpVKSeWadQ==", "dependencies": { "@babel/code-frame": "^7.12.13", "@babel/generator": "^7.13.9", "@babel/helper-compilation-targets": "^7.13.13", "@babel/helper-module-transforms": "^7.13.14", "@babel/helpers": "^7.13.10", - "@babel/parser": "^7.13.13", + "@babel/parser": "^7.13.15", "@babel/template": "^7.12.13", - "@babel/traverse": "^7.13.13", + "@babel/traverse": "^7.13.15", "@babel/types": "^7.13.14", "convert-source-map": "^1.7.0", "debug": "^4.1.0", @@ -252,9 +256,9 @@ } }, "node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.1.5.tgz", - "integrity": "sha512-nXuzCSwlJ/WKr8qxzW816gwyT6VZgiJG17zR40fou70yfAcqjoNyTLl/DQ+FExw5Hx5KNqshmN8Ldl/r2N7cTg==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.2.0.tgz", + "integrity": "sha512-JT8tHuFjKBo8NnaUbblz7mIu1nnvUDiHVjXXkulZULyidvo/7P6TY7+YqpV37IfF+KUFxmlK04elKtGKXaiVgw==", "dependencies": { "@babel/helper-compilation-targets": "^7.13.0", "@babel/helper-module-imports": "^7.12.13", @@ -443,9 +447,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.13.13", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.13.tgz", - "integrity": "sha512-OhsyMrqygfk5v8HmWwOzlYjJrtLaFhF34MrfG/Z73DgYCI6ojNUTUp2TYbtnjo8PegeJp12eamsNettCQjKjVw==", + "version": "7.13.15", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.15.tgz", + "integrity": "sha512-b9COtcAlVEQljy/9fbcMHpG+UIW9ReF+gpaxDHTlZd0c6/UU9ng8zdySAW9sRTzpvcdCHn6bUcbuYUgGzLAWVQ==", "bin": { "parser": "bin/babel-parser.js" }, @@ -467,9 +471,9 @@ } }, "node_modules/@babel/plugin-proposal-async-generator-functions": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.13.8.tgz", - "integrity": "sha512-rPBnhj+WgoSmgq+4gQUtXx/vOcU+UYtjy1AA/aeD61Hwj410fwYyqfUcRP3lR8ucgliVJL/G7sXcNUecC75IXA==", + "version": "7.13.15", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.13.15.tgz", + "integrity": "sha512-VapibkWzFeoa6ubXy/NgV5U2U4MVnUlvnx6wo1XhlsaTrLYWE0UFpDQsVrmn22q5CzeloqJ8gEMHSKxuee6ZdA==", "dependencies": { "@babel/helper-plugin-utils": "^7.13.0", "@babel/helper-remap-async-to-generator": "^7.13.0", @@ -1087,9 +1091,9 @@ } }, "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.12.13.tgz", - "integrity": "sha512-lxb2ZAvSLyJ2PEe47hoGWPmW22v7CtSl9jW8mingV4H2sEX/JOcrAj2nPuGWi56ERUm2bUpjKzONAuT6HCn2EA==", + "version": "7.13.15", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.13.15.tgz", + "integrity": "sha512-Bk9cOLSz8DiurcMETZ8E2YtIVJbFCPGW28DJWUakmyVWtQSm6Wsf0p4B4BfEr/eL2Nkhe/CICiUiMOCi1TPhuQ==", "dependencies": { "regenerator-transform": "^0.14.2" }, @@ -1109,15 +1113,15 @@ } }, "node_modules/@babel/plugin-transform-runtime": { - "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.13.10.tgz", - "integrity": "sha512-Y5k8ipgfvz5d/76tx7JYbKQTcgFSU6VgJ3kKQv4zGTKr+a9T/KBvfRvGtSFgKDQGt/DBykQixV0vNWKIdzWErA==", + "version": "7.13.15", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.13.15.tgz", + "integrity": "sha512-d+ezl76gx6Jal08XngJUkXM4lFXK/5Ikl9Mh4HKDxSfGJXmZ9xG64XT2oivBzfxb/eQ62VfvoMkaCZUKJMVrBA==", "dependencies": { - "@babel/helper-module-imports": "^7.12.13", + "@babel/helper-module-imports": "^7.13.12", "@babel/helper-plugin-utils": "^7.13.0", - "babel-plugin-polyfill-corejs2": "^0.1.4", - "babel-plugin-polyfill-corejs3": "^0.1.3", - "babel-plugin-polyfill-regenerator": "^0.1.2", + "babel-plugin-polyfill-corejs2": "^0.2.0", + "babel-plugin-polyfill-corejs3": "^0.2.0", + "babel-plugin-polyfill-regenerator": "^0.2.0", "semver": "^6.3.0" }, "peerDependencies": { @@ -1212,16 +1216,16 @@ } }, "node_modules/@babel/preset-env": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.13.12.tgz", - "integrity": "sha512-JzElc6jk3Ko6zuZgBtjOd01pf9yYDEIH8BcqVuYIuOkzOwDesoa/Nz4gIo4lBG6K861KTV9TvIgmFuT6ytOaAA==", + "version": "7.13.15", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.13.15.tgz", + "integrity": "sha512-D4JAPMXcxk69PKe81jRJ21/fP/uYdcTZ3hJDF5QX2HSI9bBxxYw/dumdR6dGumhjxlprHPE4XWoPaqzZUVy2MA==", "dependencies": { - "@babel/compat-data": "^7.13.12", - "@babel/helper-compilation-targets": "^7.13.10", + "@babel/compat-data": "^7.13.15", + "@babel/helper-compilation-targets": "^7.13.13", "@babel/helper-plugin-utils": "^7.13.0", "@babel/helper-validator-option": "^7.12.17", "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.13.12", - "@babel/plugin-proposal-async-generator-functions": "^7.13.8", + "@babel/plugin-proposal-async-generator-functions": "^7.13.15", "@babel/plugin-proposal-class-properties": "^7.13.0", "@babel/plugin-proposal-dynamic-import": "^7.13.8", "@babel/plugin-proposal-export-namespace-from": "^7.12.13", @@ -1269,7 +1273,7 @@ "@babel/plugin-transform-object-super": "^7.12.13", "@babel/plugin-transform-parameters": "^7.13.0", "@babel/plugin-transform-property-literals": "^7.12.13", - "@babel/plugin-transform-regenerator": "^7.12.13", + "@babel/plugin-transform-regenerator": "^7.13.15", "@babel/plugin-transform-reserved-words": "^7.12.13", "@babel/plugin-transform-shorthand-properties": "^7.12.13", "@babel/plugin-transform-spread": "^7.13.0", @@ -1279,10 +1283,10 @@ "@babel/plugin-transform-unicode-escapes": "^7.12.13", "@babel/plugin-transform-unicode-regex": "^7.12.13", "@babel/preset-modules": "^0.1.4", - "@babel/types": "^7.13.12", - "babel-plugin-polyfill-corejs2": "^0.1.4", - "babel-plugin-polyfill-corejs3": "^0.1.3", - "babel-plugin-polyfill-regenerator": "^0.1.2", + "@babel/types": "^7.13.14", + "babel-plugin-polyfill-corejs2": "^0.2.0", + "babel-plugin-polyfill-corejs3": "^0.2.0", + "babel-plugin-polyfill-regenerator": "^0.2.0", "core-js-compat": "^3.9.0", "semver": "^6.3.0" }, @@ -1362,16 +1366,16 @@ } }, "node_modules/@babel/traverse": { - "version": "7.13.13", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.13.13.tgz", - "integrity": "sha512-CblEcwmXKR6eP43oQGG++0QMTtCjAsa3frUuzHoiIJWpaIIi8dwMyEFUJoXRLxagGqCK+jALRwIO+o3R9p/uUg==", + "version": "7.13.15", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.13.15.tgz", + "integrity": "sha512-/mpZMNvj6bce59Qzl09fHEs8Bt8NnpEDQYleHUPZQ3wXUMvXi+HJPLars68oAbmp839fGoOkv2pSL2z9ajCIaQ==", "dependencies": { "@babel/code-frame": "^7.12.13", "@babel/generator": "^7.13.9", "@babel/helper-function-name": "^7.12.13", "@babel/helper-split-export-declaration": "^7.12.13", - "@babel/parser": "^7.13.13", - "@babel/types": "^7.13.13", + "@babel/parser": "^7.13.15", + "@babel/types": "^7.13.14", "debug": "^4.1.0", "globals": "^11.1.0" } @@ -2708,6 +2712,22 @@ "@types/node": "*" } }, + "node_modules/@types/history": { + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/@types/history/-/history-4.7.8.tgz", + "integrity": "sha512-S78QIYirQcUoo6UJZx9CSP0O2ix9IaeAXwQi26Rhr/+mg7qqPy8TzaxHSUut7eGjL8WmLccT7/MXf304WjqHcA==", + "dev": true + }, + "node_modules/@types/hoist-non-react-statics": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz", + "integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==", + "dev": true, + "dependencies": { + "@types/react": "*", + "hoist-non-react-statics": "^3.3.0" + } + }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz", @@ -2783,6 +2803,45 @@ "csstype": "^3.0.2" } }, + "node_modules/@types/react-dom": { + "version": "17.0.3", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.3.tgz", + "integrity": "sha512-4NnJbCeWE+8YBzupn/YrJxZ8VnjcJq5iR1laqQ1vkpQgBiA7bwk0Rp24fxsdNinzJY2U+HHS4dJJDPdoMjdJ7w==", + "dev": true, + "dependencies": { + "@types/react": "*" + } + }, + "node_modules/@types/react-helmet": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/@types/react-helmet/-/react-helmet-6.1.1.tgz", + "integrity": "sha512-VmSCMz6jp/06DABoY60vQa++h1YFt0PfAI23llxBJHbowqFgLUL0dhS1AQeVPNqYfRp9LAfokrfWACTNeobOrg==", + "dev": true, + "dependencies": { + "@types/react": "*" + } + }, + "node_modules/@types/react-router": { + "version": "5.1.13", + "resolved": "https://registry.npmjs.org/@types/react-router/-/react-router-5.1.13.tgz", + "integrity": "sha512-ZIuaO9Yrln54X6elg8q2Ivp6iK6p4syPsefEYAhRDAoqNh48C8VYUmB9RkXjKSQAJSJV0mbIFCX7I4vZDcHrjg==", + "dev": true, + "dependencies": { + "@types/history": "*", + "@types/react": "*" + } + }, + "node_modules/@types/react-router-dom": { + "version": "5.1.7", + "resolved": "https://registry.npmjs.org/@types/react-router-dom/-/react-router-dom-5.1.7.tgz", + "integrity": "sha512-D5mHD6TbdV/DNHYsnwBTv+y73ei+mMjrkGrla86HthE4/PVvL1J94Bu3qABU+COXzpL23T1EZapVVpwHuBXiUg==", + "dev": true, + "dependencies": { + "@types/history": "*", + "@types/react": "*", + "@types/react-router": "*" + } + }, "node_modules/@types/resolve": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", @@ -2803,6 +2862,17 @@ "integrity": "sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw==", "dev": true }, + "node_modules/@types/styled-components": { + "version": "5.1.9", + "resolved": "https://registry.npmjs.org/@types/styled-components/-/styled-components-5.1.9.tgz", + "integrity": "sha512-kbEG6YlwK8rucITpKEr6pA4Ho9KSQHUUOzZ9lY3va1mtcjvS3D0wDciFyHEiNHKLL/npZCKDQJqm0x44sPO9oA==", + "dev": true, + "dependencies": { + "@types/hoist-non-react-statics": "*", + "@types/react": "*", + "csstype": "^3.0.2" + } + }, "node_modules/@types/testing-library__jest-dom": { "version": "5.9.5", "resolved": "https://registry.npmjs.org/@types/testing-library__jest-dom/-/testing-library__jest-dom-5.9.5.tgz", @@ -3477,12 +3547,12 @@ } }, "node_modules/babel-plugin-polyfill-corejs2": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.1.10.tgz", - "integrity": "sha512-DO95wD4g0A8KRaHKi0D51NdGXzvpqVLnLu5BTvDlpqUEpTmeEtypgC1xqesORaWmiUOQI14UHKlzNd9iZ2G3ZA==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.2.0.tgz", + "integrity": "sha512-9bNwiR0dS881c5SHnzCmmGlMkJLl0OUZvxrxHo9w/iNoRuqaPjqlvBf4HrovXtQs/au5yKkpcdgfT1cC5PAZwg==", "dependencies": { - "@babel/compat-data": "^7.13.0", - "@babel/helper-define-polyfill-provider": "^0.1.5", + "@babel/compat-data": "^7.13.11", + "@babel/helper-define-polyfill-provider": "^0.2.0", "semver": "^6.1.1" }, "peerDependencies": { @@ -3498,23 +3568,23 @@ } }, "node_modules/babel-plugin-polyfill-corejs3": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.1.7.tgz", - "integrity": "sha512-u+gbS9bbPhZWEeyy1oR/YaaSpod/KDT07arZHb80aTpl8H5ZBq+uN1nN9/xtX7jQyfLdPfoqI4Rue/MQSWJquw==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.2.0.tgz", + "integrity": "sha512-zZyi7p3BCUyzNxLx8KV61zTINkkV65zVkDAFNZmrTCRVhjo1jAS+YLvDJ9Jgd/w2tsAviCwFHReYfxO3Iql8Yg==", "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.1.5", - "core-js-compat": "^3.8.1" + "@babel/helper-define-polyfill-provider": "^0.2.0", + "core-js-compat": "^3.9.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "node_modules/babel-plugin-polyfill-regenerator": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.1.6.tgz", - "integrity": "sha512-OUrYG9iKPKz8NxswXbRAdSwF0GhRdIEMTloQATJi4bDuFqrXaXcCUT/VGNrr8pBcjMh1RxZ7Xt9cytVJTJfvMg==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.2.0.tgz", + "integrity": "sha512-J7vKbCuD2Xi/eEHxquHN14bXAW9CXtecwuLrOIDJtcZzTaPzV1VdEfoUf9AzcRBMolKUQKM9/GVojeh0hFiqMg==", "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.1.5" + "@babel/helper-define-polyfill-provider": "^0.2.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" @@ -4433,9 +4503,9 @@ } }, "node_modules/core-js-compat": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.10.0.tgz", - "integrity": "sha512-9yVewub2MXNYyGvuLnMHcN1k9RkvB7/ofktpeKTIaASyB88YYqGzUnu0ywMMhJrDHOMiTjSHWGzR+i7Wb9Z1kQ==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.10.1.tgz", + "integrity": "sha512-ZHQTdTPkqvw2CeHiZC970NNJcnwzT6YIueDMASKt+p3WbZsLXOcoD392SkcWhkC0wBBHhlfhqGKKsNCQUozYtg==", "dependencies": { "browserslist": "^4.16.3", "semver": "7.0.0" @@ -5051,9 +5121,9 @@ } }, "node_modules/eslint": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.23.0.tgz", - "integrity": "sha512-kqvNVbdkjzpFy0XOszNwjkKzZ+6TcwCQ/h+ozlcIWwaimBBuhlQ4nN6kbiM2L+OjDcznkTJxzYfRFH92sx4a0Q==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.24.0.tgz", + "integrity": "sha512-k9gaHeHiFmGCDQ2rEfvULlSLruz6tgfA8DEn+rY9/oYPFFTlz55mM/Q/Rij1b2Y42jwZiK3lXvNTw6w6TXzcKQ==", "dependencies": { "@babel/code-frame": "7.12.11", "@eslint/eslintrc": "^0.4.0", @@ -5104,9 +5174,9 @@ } }, "node_modules/eslint-plugin-jest": { - "version": "24.3.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-24.3.3.tgz", - "integrity": "sha512-IQ9tLHyKEyBw1BM3IE13WxOXQm03h/7dy1KFknUVkoY2N2+Hw7lb/3YFz/4jwcrxXt2+KhA/GoiK7jt8aK19ww==", + "version": "24.3.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-24.3.5.tgz", + "integrity": "sha512-XG4rtxYDuJykuqhsOqokYIR84/C8pRihRtEpVskYLbIIKGwPNW2ySxdctuVzETZE+MbF/e7wmsnbNVpzM0rDug==", "dependencies": { "@typescript-eslint/experimental-utils": "^4.0.1" }, @@ -5124,9 +5194,9 @@ } }, "node_modules/eslint-plugin-jest-dom": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest-dom/-/eslint-plugin-jest-dom-3.7.0.tgz", - "integrity": "sha512-pLbKIV/upcORNROKgO6Yca13HGTkXvgcI7qaqJSZ8mvGMqaDvQSEh+RoabjeLByMzJBmAzNx1AAT2dUYOAVidw==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest-dom/-/eslint-plugin-jest-dom-3.8.0.tgz", + "integrity": "sha512-TsBK1RSG8mXCJaOce+gcNLU8ORl5yx111/HnsTTL70qwfb1AtbcqGtpz2OvfI/Q23baMtWDVy4L1KHgJk0B1XQ==", "dependencies": { "@babel/runtime": "^7.9.6", "@testing-library/dom": "^7.28.1", @@ -5142,9 +5212,9 @@ } }, "node_modules/eslint-plugin-react": { - "version": "7.23.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.23.1.tgz", - "integrity": "sha512-MvFGhZjI8Z4HusajmSw0ougGrq3Gs4vT/0WgwksZgf5RrLrRa2oYAw56okU4tZJl8+j7IYNuTM+2RnFEuTSdRQ==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.23.2.tgz", + "integrity": "sha512-AfjgFQB+nYszudkxRkTFu0UR1zEQig0ArVMPloKhxwlwkzaw/fBiH0QWcBBhZONlXqQC51+nfqFrkn4EzHcGBw==", "dependencies": { "array-includes": "^3.1.3", "array.prototype.flatmap": "^1.2.4", @@ -6330,6 +6400,7 @@ "version": "15.5.0", "resolved": "https://registry.npmjs.org/graphql/-/graphql-15.5.0.tgz", "integrity": "sha512-OmaM7y0kaK31NKG31q4YbD2beNYa6jBBKtMFT6gLYJljHLJr42IqJ8KX08u3Li/0ifzTU5HjmoOOrwa5BRLeDA==", + "peer": true, "engines": { "node": ">= 10.x" } @@ -6605,9 +6676,9 @@ } }, "node_modules/i18next": { - "version": "20.1.0", - "resolved": "https://registry.npmjs.org/i18next/-/i18next-20.1.0.tgz", - "integrity": "sha512-sV+ZwTM4Ik4d6wKdwNS/ocKmvXi6DFA/YHMgdQX3i4L5993jnbo1/j1pK/c4+zBOjexer4dt+c5JHsFj4CUoXQ==", + "version": "20.2.1", + "resolved": "https://registry.npmjs.org/i18next/-/i18next-20.2.1.tgz", + "integrity": "sha512-JLruWDEQ3T6tKT6P7u+DsNtToMHUwUcQIYOMRcnNBdUhSfKkoIDUKdVDKgGtmqr//LrirxjADUdr3d5Gwbow6g==", "dependencies": { "@babel/runtime": "^7.12.0" } @@ -13169,6 +13240,18 @@ "is-typedarray": "^1.0.0" } }, + "node_modules/typescript": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.4.tgz", + "integrity": "sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "node_modules/ua-parser-js": { "version": "0.7.24", "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.24.tgz", @@ -13866,9 +13949,9 @@ }, "dependencies": { "@apollo/client": { - "version": "3.3.13", - "resolved": "https://registry.npmjs.org/@apollo/client/-/client-3.3.13.tgz", - "integrity": "sha512-usiVmXiOq0J/GpyIOIhlF8ItHpiPJObC7zoxLYPoOYj3G3OB0hCIcUKs3aTJ3ATW7u8QxvYgRaJg72NN7E1WOg==", + "version": "3.3.14", + "resolved": "https://registry.npmjs.org/@apollo/client/-/client-3.3.14.tgz", + "integrity": "sha512-z7YwMvF9grmpWUG+26e3gPcBAOA/r/Ci5gwK7JVm3bGYG9kKqG8MF6sMXEbuwTsFseE4duSp0icJ6tdzxJhhlA==", "requires": { "@graphql-typed-document-node/core": "^3.0.0", "@types/zen-observable": "^0.8.0", @@ -13901,23 +13984,23 @@ } }, "@babel/compat-data": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.13.12.tgz", - "integrity": "sha512-3eJJ841uKxeV8dcN/2yGEUy+RfgQspPEgQat85umsE1rotuquQ2AbIub4S6j7c50a2d+4myc+zSlnXeIHrOnhQ==" + "version": "7.13.15", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.13.15.tgz", + "integrity": "sha512-ltnibHKR1VnrU4ymHyQ/CXtNXI6yZC0oJThyW78Hft8XndANwi+9H+UIklBDraIjFEJzw8wmcM427oDd9KS5wA==" }, "@babel/core": { - "version": "7.13.14", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.13.14.tgz", - "integrity": "sha512-wZso/vyF4ki0l0znlgM4inxbdrUvCb+cVz8grxDq+6C9k6qbqoIJteQOKicaKjCipU3ISV+XedCqpL2RJJVehA==", + "version": "7.13.15", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.13.15.tgz", + "integrity": "sha512-6GXmNYeNjS2Uz+uls5jalOemgIhnTMeaXo+yBUA72kC2uX/8VW6XyhVIo2L8/q0goKQA3EVKx0KOQpVKSeWadQ==", "requires": { "@babel/code-frame": "^7.12.13", "@babel/generator": "^7.13.9", "@babel/helper-compilation-targets": "^7.13.13", "@babel/helper-module-transforms": "^7.13.14", "@babel/helpers": "^7.13.10", - "@babel/parser": "^7.13.13", + "@babel/parser": "^7.13.15", "@babel/template": "^7.12.13", - "@babel/traverse": "^7.13.13", + "@babel/traverse": "^7.13.15", "@babel/types": "^7.13.14", "convert-source-map": "^1.7.0", "debug": "^4.1.0", @@ -14017,9 +14100,9 @@ } }, "@babel/helper-define-polyfill-provider": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.1.5.tgz", - "integrity": "sha512-nXuzCSwlJ/WKr8qxzW816gwyT6VZgiJG17zR40fou70yfAcqjoNyTLl/DQ+FExw5Hx5KNqshmN8Ldl/r2N7cTg==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.2.0.tgz", + "integrity": "sha512-JT8tHuFjKBo8NnaUbblz7mIu1nnvUDiHVjXXkulZULyidvo/7P6TY7+YqpV37IfF+KUFxmlK04elKtGKXaiVgw==", "requires": { "@babel/helper-compilation-targets": "^7.13.0", "@babel/helper-module-imports": "^7.12.13", @@ -14204,9 +14287,9 @@ } }, "@babel/parser": { - "version": "7.13.13", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.13.tgz", - "integrity": "sha512-OhsyMrqygfk5v8HmWwOzlYjJrtLaFhF34MrfG/Z73DgYCI6ojNUTUp2TYbtnjo8PegeJp12eamsNettCQjKjVw==" + "version": "7.13.15", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.15.tgz", + "integrity": "sha512-b9COtcAlVEQljy/9fbcMHpG+UIW9ReF+gpaxDHTlZd0c6/UU9ng8zdySAW9sRTzpvcdCHn6bUcbuYUgGzLAWVQ==" }, "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { "version": "7.13.12", @@ -14219,9 +14302,9 @@ } }, "@babel/plugin-proposal-async-generator-functions": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.13.8.tgz", - "integrity": "sha512-rPBnhj+WgoSmgq+4gQUtXx/vOcU+UYtjy1AA/aeD61Hwj410fwYyqfUcRP3lR8ucgliVJL/G7sXcNUecC75IXA==", + "version": "7.13.15", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.13.15.tgz", + "integrity": "sha512-VapibkWzFeoa6ubXy/NgV5U2U4MVnUlvnx6wo1XhlsaTrLYWE0UFpDQsVrmn22q5CzeloqJ8gEMHSKxuee6ZdA==", "requires": { "@babel/helper-plugin-utils": "^7.13.0", "@babel/helper-remap-async-to-generator": "^7.13.0", @@ -14704,9 +14787,9 @@ } }, "@babel/plugin-transform-regenerator": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.12.13.tgz", - "integrity": "sha512-lxb2ZAvSLyJ2PEe47hoGWPmW22v7CtSl9jW8mingV4H2sEX/JOcrAj2nPuGWi56ERUm2bUpjKzONAuT6HCn2EA==", + "version": "7.13.15", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.13.15.tgz", + "integrity": "sha512-Bk9cOLSz8DiurcMETZ8E2YtIVJbFCPGW28DJWUakmyVWtQSm6Wsf0p4B4BfEr/eL2Nkhe/CICiUiMOCi1TPhuQ==", "requires": { "regenerator-transform": "^0.14.2" } @@ -14720,15 +14803,15 @@ } }, "@babel/plugin-transform-runtime": { - "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.13.10.tgz", - "integrity": "sha512-Y5k8ipgfvz5d/76tx7JYbKQTcgFSU6VgJ3kKQv4zGTKr+a9T/KBvfRvGtSFgKDQGt/DBykQixV0vNWKIdzWErA==", + "version": "7.13.15", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.13.15.tgz", + "integrity": "sha512-d+ezl76gx6Jal08XngJUkXM4lFXK/5Ikl9Mh4HKDxSfGJXmZ9xG64XT2oivBzfxb/eQ62VfvoMkaCZUKJMVrBA==", "requires": { - "@babel/helper-module-imports": "^7.12.13", + "@babel/helper-module-imports": "^7.13.12", "@babel/helper-plugin-utils": "^7.13.0", - "babel-plugin-polyfill-corejs2": "^0.1.4", - "babel-plugin-polyfill-corejs3": "^0.1.3", - "babel-plugin-polyfill-regenerator": "^0.1.2", + "babel-plugin-polyfill-corejs2": "^0.2.0", + "babel-plugin-polyfill-corejs3": "^0.2.0", + "babel-plugin-polyfill-regenerator": "^0.2.0", "semver": "^6.3.0" }, "dependencies": { @@ -14798,16 +14881,16 @@ } }, "@babel/preset-env": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.13.12.tgz", - "integrity": "sha512-JzElc6jk3Ko6zuZgBtjOd01pf9yYDEIH8BcqVuYIuOkzOwDesoa/Nz4gIo4lBG6K861KTV9TvIgmFuT6ytOaAA==", + "version": "7.13.15", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.13.15.tgz", + "integrity": "sha512-D4JAPMXcxk69PKe81jRJ21/fP/uYdcTZ3hJDF5QX2HSI9bBxxYw/dumdR6dGumhjxlprHPE4XWoPaqzZUVy2MA==", "requires": { - "@babel/compat-data": "^7.13.12", - "@babel/helper-compilation-targets": "^7.13.10", + "@babel/compat-data": "^7.13.15", + "@babel/helper-compilation-targets": "^7.13.13", "@babel/helper-plugin-utils": "^7.13.0", "@babel/helper-validator-option": "^7.12.17", "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.13.12", - "@babel/plugin-proposal-async-generator-functions": "^7.13.8", + "@babel/plugin-proposal-async-generator-functions": "^7.13.15", "@babel/plugin-proposal-class-properties": "^7.13.0", "@babel/plugin-proposal-dynamic-import": "^7.13.8", "@babel/plugin-proposal-export-namespace-from": "^7.12.13", @@ -14855,7 +14938,7 @@ "@babel/plugin-transform-object-super": "^7.12.13", "@babel/plugin-transform-parameters": "^7.13.0", "@babel/plugin-transform-property-literals": "^7.12.13", - "@babel/plugin-transform-regenerator": "^7.12.13", + "@babel/plugin-transform-regenerator": "^7.13.15", "@babel/plugin-transform-reserved-words": "^7.12.13", "@babel/plugin-transform-shorthand-properties": "^7.12.13", "@babel/plugin-transform-spread": "^7.13.0", @@ -14865,10 +14948,10 @@ "@babel/plugin-transform-unicode-escapes": "^7.12.13", "@babel/plugin-transform-unicode-regex": "^7.12.13", "@babel/preset-modules": "^0.1.4", - "@babel/types": "^7.13.12", - "babel-plugin-polyfill-corejs2": "^0.1.4", - "babel-plugin-polyfill-corejs3": "^0.1.3", - "babel-plugin-polyfill-regenerator": "^0.1.2", + "@babel/types": "^7.13.14", + "babel-plugin-polyfill-corejs2": "^0.2.0", + "babel-plugin-polyfill-corejs3": "^0.2.0", + "babel-plugin-polyfill-regenerator": "^0.2.0", "core-js-compat": "^3.9.0", "semver": "^6.3.0" }, @@ -14943,16 +15026,16 @@ } }, "@babel/traverse": { - "version": "7.13.13", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.13.13.tgz", - "integrity": "sha512-CblEcwmXKR6eP43oQGG++0QMTtCjAsa3frUuzHoiIJWpaIIi8dwMyEFUJoXRLxagGqCK+jALRwIO+o3R9p/uUg==", + "version": "7.13.15", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.13.15.tgz", + "integrity": "sha512-/mpZMNvj6bce59Qzl09fHEs8Bt8NnpEDQYleHUPZQ3wXUMvXi+HJPLars68oAbmp839fGoOkv2pSL2z9ajCIaQ==", "requires": { "@babel/code-frame": "^7.12.13", "@babel/generator": "^7.13.9", "@babel/helper-function-name": "^7.12.13", "@babel/helper-split-export-declaration": "^7.12.13", - "@babel/parser": "^7.13.13", - "@babel/types": "^7.13.13", + "@babel/parser": "^7.13.15", + "@babel/types": "^7.13.14", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -16045,6 +16128,22 @@ "@types/node": "*" } }, + "@types/history": { + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/@types/history/-/history-4.7.8.tgz", + "integrity": "sha512-S78QIYirQcUoo6UJZx9CSP0O2ix9IaeAXwQi26Rhr/+mg7qqPy8TzaxHSUut7eGjL8WmLccT7/MXf304WjqHcA==", + "dev": true + }, + "@types/hoist-non-react-statics": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz", + "integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==", + "dev": true, + "requires": { + "@types/react": "*", + "hoist-non-react-statics": "^3.3.0" + } + }, "@types/istanbul-lib-coverage": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz", @@ -16120,6 +16219,45 @@ "csstype": "^3.0.2" } }, + "@types/react-dom": { + "version": "17.0.3", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.3.tgz", + "integrity": "sha512-4NnJbCeWE+8YBzupn/YrJxZ8VnjcJq5iR1laqQ1vkpQgBiA7bwk0Rp24fxsdNinzJY2U+HHS4dJJDPdoMjdJ7w==", + "dev": true, + "requires": { + "@types/react": "*" + } + }, + "@types/react-helmet": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/@types/react-helmet/-/react-helmet-6.1.1.tgz", + "integrity": "sha512-VmSCMz6jp/06DABoY60vQa++h1YFt0PfAI23llxBJHbowqFgLUL0dhS1AQeVPNqYfRp9LAfokrfWACTNeobOrg==", + "dev": true, + "requires": { + "@types/react": "*" + } + }, + "@types/react-router": { + "version": "5.1.13", + "resolved": "https://registry.npmjs.org/@types/react-router/-/react-router-5.1.13.tgz", + "integrity": "sha512-ZIuaO9Yrln54X6elg8q2Ivp6iK6p4syPsefEYAhRDAoqNh48C8VYUmB9RkXjKSQAJSJV0mbIFCX7I4vZDcHrjg==", + "dev": true, + "requires": { + "@types/history": "*", + "@types/react": "*" + } + }, + "@types/react-router-dom": { + "version": "5.1.7", + "resolved": "https://registry.npmjs.org/@types/react-router-dom/-/react-router-dom-5.1.7.tgz", + "integrity": "sha512-D5mHD6TbdV/DNHYsnwBTv+y73ei+mMjrkGrla86HthE4/PVvL1J94Bu3qABU+COXzpL23T1EZapVVpwHuBXiUg==", + "dev": true, + "requires": { + "@types/history": "*", + "@types/react": "*", + "@types/react-router": "*" + } + }, "@types/resolve": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", @@ -16140,6 +16278,17 @@ "integrity": "sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw==", "dev": true }, + "@types/styled-components": { + "version": "5.1.9", + "resolved": "https://registry.npmjs.org/@types/styled-components/-/styled-components-5.1.9.tgz", + "integrity": "sha512-kbEG6YlwK8rucITpKEr6pA4Ho9KSQHUUOzZ9lY3va1mtcjvS3D0wDciFyHEiNHKLL/npZCKDQJqm0x44sPO9oA==", + "dev": true, + "requires": { + "@types/hoist-non-react-statics": "*", + "@types/react": "*", + "csstype": "^3.0.2" + } + }, "@types/testing-library__jest-dom": { "version": "5.9.5", "resolved": "https://registry.npmjs.org/@types/testing-library__jest-dom/-/testing-library__jest-dom-5.9.5.tgz", @@ -16682,12 +16831,12 @@ } }, "babel-plugin-polyfill-corejs2": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.1.10.tgz", - "integrity": "sha512-DO95wD4g0A8KRaHKi0D51NdGXzvpqVLnLu5BTvDlpqUEpTmeEtypgC1xqesORaWmiUOQI14UHKlzNd9iZ2G3ZA==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.2.0.tgz", + "integrity": "sha512-9bNwiR0dS881c5SHnzCmmGlMkJLl0OUZvxrxHo9w/iNoRuqaPjqlvBf4HrovXtQs/au5yKkpcdgfT1cC5PAZwg==", "requires": { - "@babel/compat-data": "^7.13.0", - "@babel/helper-define-polyfill-provider": "^0.1.5", + "@babel/compat-data": "^7.13.11", + "@babel/helper-define-polyfill-provider": "^0.2.0", "semver": "^6.1.1" }, "dependencies": { @@ -16699,20 +16848,20 @@ } }, "babel-plugin-polyfill-corejs3": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.1.7.tgz", - "integrity": "sha512-u+gbS9bbPhZWEeyy1oR/YaaSpod/KDT07arZHb80aTpl8H5ZBq+uN1nN9/xtX7jQyfLdPfoqI4Rue/MQSWJquw==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.2.0.tgz", + "integrity": "sha512-zZyi7p3BCUyzNxLx8KV61zTINkkV65zVkDAFNZmrTCRVhjo1jAS+YLvDJ9Jgd/w2tsAviCwFHReYfxO3Iql8Yg==", "requires": { - "@babel/helper-define-polyfill-provider": "^0.1.5", - "core-js-compat": "^3.8.1" + "@babel/helper-define-polyfill-provider": "^0.2.0", + "core-js-compat": "^3.9.1" } }, "babel-plugin-polyfill-regenerator": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.1.6.tgz", - "integrity": "sha512-OUrYG9iKPKz8NxswXbRAdSwF0GhRdIEMTloQATJi4bDuFqrXaXcCUT/VGNrr8pBcjMh1RxZ7Xt9cytVJTJfvMg==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.2.0.tgz", + "integrity": "sha512-J7vKbCuD2Xi/eEHxquHN14bXAW9CXtecwuLrOIDJtcZzTaPzV1VdEfoUf9AzcRBMolKUQKM9/GVojeh0hFiqMg==", "requires": { - "@babel/helper-define-polyfill-provider": "^0.1.5" + "@babel/helper-define-polyfill-provider": "^0.2.0" } }, "babel-plugin-styled-components": { @@ -17466,9 +17615,9 @@ } }, "core-js-compat": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.10.0.tgz", - "integrity": "sha512-9yVewub2MXNYyGvuLnMHcN1k9RkvB7/ofktpeKTIaASyB88YYqGzUnu0ywMMhJrDHOMiTjSHWGzR+i7Wb9Z1kQ==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.10.1.tgz", + "integrity": "sha512-ZHQTdTPkqvw2CeHiZC970NNJcnwzT6YIueDMASKt+p3WbZsLXOcoD392SkcWhkC0wBBHhlfhqGKKsNCQUozYtg==", "requires": { "browserslist": "^4.16.3", "semver": "7.0.0" @@ -17965,9 +18114,9 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "eslint": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.23.0.tgz", - "integrity": "sha512-kqvNVbdkjzpFy0XOszNwjkKzZ+6TcwCQ/h+ozlcIWwaimBBuhlQ4nN6kbiM2L+OjDcznkTJxzYfRFH92sx4a0Q==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.24.0.tgz", + "integrity": "sha512-k9gaHeHiFmGCDQ2rEfvULlSLruz6tgfA8DEn+rY9/oYPFFTlz55mM/Q/Rij1b2Y42jwZiK3lXvNTw6w6TXzcKQ==", "requires": { "@babel/code-frame": "7.12.11", "@eslint/eslintrc": "^0.4.0", @@ -18148,17 +18297,17 @@ } }, "eslint-plugin-jest": { - "version": "24.3.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-24.3.3.tgz", - "integrity": "sha512-IQ9tLHyKEyBw1BM3IE13WxOXQm03h/7dy1KFknUVkoY2N2+Hw7lb/3YFz/4jwcrxXt2+KhA/GoiK7jt8aK19ww==", + "version": "24.3.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-24.3.5.tgz", + "integrity": "sha512-XG4rtxYDuJykuqhsOqokYIR84/C8pRihRtEpVskYLbIIKGwPNW2ySxdctuVzETZE+MbF/e7wmsnbNVpzM0rDug==", "requires": { "@typescript-eslint/experimental-utils": "^4.0.1" } }, "eslint-plugin-jest-dom": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest-dom/-/eslint-plugin-jest-dom-3.7.0.tgz", - "integrity": "sha512-pLbKIV/upcORNROKgO6Yca13HGTkXvgcI7qaqJSZ8mvGMqaDvQSEh+RoabjeLByMzJBmAzNx1AAT2dUYOAVidw==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest-dom/-/eslint-plugin-jest-dom-3.8.0.tgz", + "integrity": "sha512-TsBK1RSG8mXCJaOce+gcNLU8ORl5yx111/HnsTTL70qwfb1AtbcqGtpz2OvfI/Q23baMtWDVy4L1KHgJk0B1XQ==", "requires": { "@babel/runtime": "^7.9.6", "@testing-library/dom": "^7.28.1", @@ -18166,9 +18315,9 @@ } }, "eslint-plugin-react": { - "version": "7.23.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.23.1.tgz", - "integrity": "sha512-MvFGhZjI8Z4HusajmSw0ougGrq3Gs4vT/0WgwksZgf5RrLrRa2oYAw56okU4tZJl8+j7IYNuTM+2RnFEuTSdRQ==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.23.2.tgz", + "integrity": "sha512-AfjgFQB+nYszudkxRkTFu0UR1zEQig0ArVMPloKhxwlwkzaw/fBiH0QWcBBhZONlXqQC51+nfqFrkn4EzHcGBw==", "requires": { "array-includes": "^3.1.3", "array.prototype.flatmap": "^1.2.4", @@ -18939,7 +19088,8 @@ "graphql": { "version": "15.5.0", "resolved": "https://registry.npmjs.org/graphql/-/graphql-15.5.0.tgz", - "integrity": "sha512-OmaM7y0kaK31NKG31q4YbD2beNYa6jBBKtMFT6gLYJljHLJr42IqJ8KX08u3Li/0ifzTU5HjmoOOrwa5BRLeDA==" + "integrity": "sha512-OmaM7y0kaK31NKG31q4YbD2beNYa6jBBKtMFT6gLYJljHLJr42IqJ8KX08u3Li/0ifzTU5HjmoOOrwa5BRLeDA==", + "peer": true }, "graphql-tag": { "version": "2.12.3", @@ -19159,9 +19309,9 @@ "dev": true }, "i18next": { - "version": "20.1.0", - "resolved": "https://registry.npmjs.org/i18next/-/i18next-20.1.0.tgz", - "integrity": "sha512-sV+ZwTM4Ik4d6wKdwNS/ocKmvXi6DFA/YHMgdQX3i4L5993jnbo1/j1pK/c4+zBOjexer4dt+c5JHsFj4CUoXQ==", + "version": "20.2.1", + "resolved": "https://registry.npmjs.org/i18next/-/i18next-20.2.1.tgz", + "integrity": "sha512-JLruWDEQ3T6tKT6P7u+DsNtToMHUwUcQIYOMRcnNBdUhSfKkoIDUKdVDKgGtmqr//LrirxjADUdr3d5Gwbow6g==", "requires": { "@babel/runtime": "^7.12.0" } @@ -24405,6 +24555,11 @@ "is-typedarray": "^1.0.0" } }, + "typescript": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.4.tgz", + "integrity": "sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==" + }, "ua-parser-js": { "version": "0.7.24", "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.24.tgz", diff --git a/ui/package.json b/ui/package.json index 43c1d7d..24d6612 100644 --- a/ui/package.json +++ b/ui/package.json @@ -9,11 +9,11 @@ "license": "GPL-3.0", "description": "UI app for Photoview", "dependencies": { - "@apollo/client": "^3.3.13", - "@babel/core": "^7.13.14", + "@apollo/client": "^3.3.14", + "@babel/core": "^7.13.15", "@babel/plugin-transform-modules-commonjs": "^7.13.8", - "@babel/plugin-transform-runtime": "^7.13.10", - "@babel/preset-env": "^7.13.12", + "@babel/plugin-transform-runtime": "^7.13.15", + "@babel/preset-env": "^7.13.15", "@babel/preset-react": "^7.13.13", "babel-eslint": "^10.1.0", "babel-jest": "^26.6.3", @@ -27,14 +27,13 @@ "dotenv": "^8.2.0", "esbuild": "^0.8.52", "esbuild-plugin-babel": "^0.2.3", - "eslint": "^7.23.0", - "eslint-plugin-jest": "^24.3.3", - "eslint-plugin-jest-dom": "^3.7.0", - "eslint-plugin-react": "^7.23.1", + "eslint": "^7.24.0", + "eslint-plugin-jest": "^24.3.5", + "eslint-plugin-jest-dom": "^3.8.0", + "eslint-plugin-react": "^7.23.2", "eslint-plugin-react-hooks": "^4.2.0", "fs-extra": "^9.1.0", - "graphql": "^15.5.0", - "i18next": "^20.1.0", + "i18next": "^20.2.1", "mapbox-gl": "^2.2.0", "prop-types": "^15.7.2", "react": "^17.0.2", @@ -49,6 +48,7 @@ "semantic-ui-react": "^2.0.3", "styled-components": "^5.2.3", "subscriptions-transport-ws": "^0.9.18", + "typescript": "^4.2.4", "url-join": "^4.0.1", "workbox-build": "^6.1.2" }, @@ -58,12 +58,17 @@ "test": "npm run lint && npm run jest", "lint": "eslint ./src --max-warnings 0 --cache", "jest": "jest", + "genSchemaTypes": "npx apollo client:codegen --target=typescript", "prepare": "(cd .. && npx husky install)" }, "devDependencies": { "@testing-library/jest-dom": "^5.11.10", "@testing-library/react": "^11.2.6", "@types/react": "^17.0.3", + "@types/react-dom": "^17.0.3", + "@types/react-helmet": "^6.1.1", + "@types/react-router-dom": "^5.1.7", + "@types/styled-components": "^5.1.9", "husky": "^6.0.0", "jest": "^26.6.3", "lint-staged": "^10.5.4", @@ -91,9 +96,5 @@ "lint-staged": { "*.{js,json,css,md,graphql}": "prettier --write", "*.js": "eslint --cache --fix --max-warnings 0" - }, - "sideEffects": [ - "./src/index.js", - "./src/localization.js" - ] + } } diff --git a/ui/src/App.js b/ui/src/App.tsx similarity index 75% rename from ui/src/App.js rename to ui/src/App.tsx index ba3d0bf..dbbac51 100644 --- a/ui/src/App.js +++ b/ui/src/App.tsx @@ -30,9 +30,12 @@ const GlobalStyle = createGlobalStyle` ` import 'semantic-ui-css/semantic.min.css' +import { siteTranslation } from './__generated__/siteTranslation' +import { LanguageTranslation } from '../__generated__/globalTypes' +import { useTranslation } from 'react-i18next' const SITE_TRANSLATION = gql` - query { + query siteTranslation { myUserPreferences { id language @@ -41,7 +44,7 @@ const SITE_TRANSLATION = gql` ` const loadTranslations = () => { - const [loadLang, { data }] = useLazyQuery(SITE_TRANSLATION) + const [loadLang, { data }] = useLazyQuery(SITE_TRANSLATION) useEffect(() => { if (authToken()) { @@ -51,7 +54,7 @@ const loadTranslations = () => { useEffect(() => { switch (data?.myUserPreferences.language) { - case 'da': + case LanguageTranslation.Danish: import('../extractedTranslations/da/translation.json').then(danish => { i18n.addResourceBundle('da', 'translation', danish) i18n.changeLanguage('da') @@ -64,6 +67,7 @@ const loadTranslations = () => { } const App = () => { + const { t } = useTranslation() loadTranslations() return ( @@ -71,7 +75,10 @@ const App = () => { diff --git a/ui/src/Layout.js b/ui/src/Layout.tsx similarity index 86% rename from ui/src/Layout.js rename to ui/src/Layout.tsx index 661ef09..fe11940 100644 --- a/ui/src/Layout.js +++ b/ui/src/Layout.tsx @@ -1,4 +1,4 @@ -import React from 'react' +import React, { ReactChild, ReactChildren } from 'react' import PropTypes from 'prop-types' import styled from 'styled-components' import { NavLink } from 'react-router-dom' @@ -79,16 +79,28 @@ const SideButtonLink = styled(NavLink)` } ` -const SideButton = props => { - return ( - - {props.children} - - ) +type SideButtonProps = { + children: any + to: string + exact: boolean } -SideButton.propTypes = { - children: PropTypes.any, +const SideButton = ({ + children, + to, + exact, + ...otherProps +}: SideButtonProps) => { + return ( + + {children} + + ) } const SideButtonLabel = styled.div` @@ -130,7 +142,12 @@ export const SideMenu = () => { ) } -const Layout = ({ children, title, ...otherProps }) => { +type LayoutProps = { + children: ReactChild | ReactChildren + title: string +} + +const Layout = ({ children, title, ...otherProps }: LayoutProps) => { return ( diff --git a/ui/src/Pages/AlbumPage/__generated__/albumQuery.ts b/ui/src/Pages/AlbumPage/__generated__/albumQuery.ts new file mode 100644 index 0000000..c61f267 --- /dev/null +++ b/ui/src/Pages/AlbumPage/__generated__/albumQuery.ts @@ -0,0 +1,118 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +import { OrderDirection, MediaType } from "./../../../../__generated__/globalTypes"; + +// ==================================================== +// GraphQL query operation: albumQuery +// ==================================================== + +export interface albumQuery_album_subAlbums_thumbnail_thumbnail { + __typename: "MediaURL"; + /** + * URL for previewing the image + */ + url: string; +} + +export interface albumQuery_album_subAlbums_thumbnail { + __typename: "Media"; + /** + * URL to display the media in a smaller resolution + */ + thumbnail: albumQuery_album_subAlbums_thumbnail_thumbnail | null; +} + +export interface albumQuery_album_subAlbums { + __typename: "Album"; + id: string; + title: string; + /** + * An image in this album used for previewing this album + */ + thumbnail: albumQuery_album_subAlbums_thumbnail | null; +} + +export interface albumQuery_album_media_thumbnail { + __typename: "MediaURL"; + /** + * URL for previewing the image + */ + url: string; + /** + * Width of the image in pixels + */ + width: number; + /** + * Height of the image in pixels + */ + height: number; +} + +export interface albumQuery_album_media_highRes { + __typename: "MediaURL"; + /** + * URL for previewing the image + */ + url: string; +} + +export interface albumQuery_album_media_videoWeb { + __typename: "MediaURL"; + /** + * URL for previewing the image + */ + url: string; +} + +export interface albumQuery_album_media { + __typename: "Media"; + id: string; + type: MediaType; + /** + * URL to display the media in a smaller resolution + */ + thumbnail: albumQuery_album_media_thumbnail | null; + /** + * URL to display the photo in full resolution, will be null for videos + */ + highRes: albumQuery_album_media_highRes | null; + /** + * URL to get the video in a web format that can be played in the browser, will be null for photos + */ + videoWeb: albumQuery_album_media_videoWeb | null; + favorite: boolean; +} + +export interface albumQuery_album { + __typename: "Album"; + id: string; + title: string; + /** + * The albums contained in this album + */ + subAlbums: albumQuery_album_subAlbums[]; + /** + * The media inside this album + */ + media: albumQuery_album_media[]; +} + +export interface albumQuery { + /** + * Get album by id, user must own the album or be admin + * If valid tokenCredentials are provided, the album may be retrived without further authentication + */ + album: albumQuery_album; +} + +export interface albumQueryVariables { + id: string; + onlyFavorites?: boolean | null; + mediaOrderBy?: string | null; + mediaOrderDirection?: OrderDirection | null; + limit?: number | null; + offset?: number | null; +} diff --git a/ui/src/Pages/AllAlbumsPage/__generated__/getMyAlbums.ts b/ui/src/Pages/AllAlbumsPage/__generated__/getMyAlbums.ts new file mode 100644 index 0000000..33fb85e --- /dev/null +++ b/ui/src/Pages/AllAlbumsPage/__generated__/getMyAlbums.ts @@ -0,0 +1,41 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL query operation: getMyAlbums +// ==================================================== + +export interface getMyAlbums_myAlbums_thumbnail_thumbnail { + __typename: "MediaURL"; + /** + * URL for previewing the image + */ + url: string; +} + +export interface getMyAlbums_myAlbums_thumbnail { + __typename: "Media"; + /** + * URL to display the media in a smaller resolution + */ + thumbnail: getMyAlbums_myAlbums_thumbnail_thumbnail | null; +} + +export interface getMyAlbums_myAlbums { + __typename: "Album"; + id: string; + title: string; + /** + * An image in this album used for previewing this album + */ + thumbnail: getMyAlbums_myAlbums_thumbnail | null; +} + +export interface getMyAlbums { + /** + * List of albums owned by the logged in user. + */ + myAlbums: getMyAlbums_myAlbums[]; +} diff --git a/ui/src/Pages/LoginPage/__generated__/Authorize.ts b/ui/src/Pages/LoginPage/__generated__/Authorize.ts new file mode 100644 index 0000000..2e59f1e --- /dev/null +++ b/ui/src/Pages/LoginPage/__generated__/Authorize.ts @@ -0,0 +1,24 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL mutation operation: Authorize +// ==================================================== + +export interface Authorize_authorizeUser { + __typename: "AuthorizeResult"; + success: boolean; + status: string; + token: string | null; +} + +export interface Authorize { + authorizeUser: Authorize_authorizeUser; +} + +export interface AuthorizeVariables { + username: string; + password: string; +} diff --git a/ui/src/Pages/LoginPage/__generated__/CheckInitialSetup.ts b/ui/src/Pages/LoginPage/__generated__/CheckInitialSetup.ts new file mode 100644 index 0000000..04e813d --- /dev/null +++ b/ui/src/Pages/LoginPage/__generated__/CheckInitialSetup.ts @@ -0,0 +1,17 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL query operation: CheckInitialSetup +// ==================================================== + +export interface CheckInitialSetup_siteInfo { + __typename: "SiteInfo"; + initialSetup: boolean; +} + +export interface CheckInitialSetup { + siteInfo: CheckInitialSetup_siteInfo; +} diff --git a/ui/src/Pages/LoginPage/__generated__/InitialSetup.ts b/ui/src/Pages/LoginPage/__generated__/InitialSetup.ts new file mode 100644 index 0000000..ba42b9e --- /dev/null +++ b/ui/src/Pages/LoginPage/__generated__/InitialSetup.ts @@ -0,0 +1,28 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL mutation operation: InitialSetup +// ==================================================== + +export interface InitialSetup_initialSetupWizard { + __typename: "AuthorizeResult"; + success: boolean; + status: string; + token: string | null; +} + +export interface InitialSetup { + /** + * Registers the initial user, can only be called if initialSetup from SiteInfo is true + */ + initialSetupWizard: InitialSetup_initialSetupWizard | null; +} + +export interface InitialSetupVariables { + username: string; + password: string; + rootPath: string; +} diff --git a/ui/src/Pages/PeoplePage/PeoplePage.js b/ui/src/Pages/PeoplePage/PeoplePage.js index 60fac48..991447b 100644 --- a/ui/src/Pages/PeoplePage/PeoplePage.js +++ b/ui/src/Pages/PeoplePage/PeoplePage.js @@ -39,7 +39,7 @@ export const MY_FACES_QUERY = gql` ` export const SET_GROUP_LABEL_MUTATION = gql` - mutation($groupID: ID!, $label: String) { + mutation setGroupLabel($groupID: ID!, $label: String) { setFaceGroupLabel(faceGroupID: $groupID, label: $label) { id label diff --git a/ui/src/Pages/PeoplePage/SingleFaceGroup/MergeFaceGroupsModal.js b/ui/src/Pages/PeoplePage/SingleFaceGroup/MergeFaceGroupsModal.js index 9d7dff2..6d724fa 100644 --- a/ui/src/Pages/PeoplePage/SingleFaceGroup/MergeFaceGroupsModal.js +++ b/ui/src/Pages/PeoplePage/SingleFaceGroup/MergeFaceGroupsModal.js @@ -7,7 +7,7 @@ import { MY_FACES_QUERY } from '../PeoplePage' import SelectFaceGroupTable from './SelectFaceGroupTable' const COMBINE_FACES_MUTATION = gql` - mutation($destID: ID!, $srcID: ID!) { + mutation combineFaces($destID: ID!, $srcID: ID!) { combineFaceGroups( destinationFaceGroupID: $destID sourceFaceGroupID: $srcID diff --git a/ui/src/Pages/PeoplePage/SingleFaceGroup/__generated__/combineFaces.ts b/ui/src/Pages/PeoplePage/SingleFaceGroup/__generated__/combineFaces.ts new file mode 100644 index 0000000..23f6c44 --- /dev/null +++ b/ui/src/Pages/PeoplePage/SingleFaceGroup/__generated__/combineFaces.ts @@ -0,0 +1,25 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL mutation operation: combineFaces +// ==================================================== + +export interface combineFaces_combineFaceGroups { + __typename: "FaceGroup"; + id: string; +} + +export interface combineFaces { + /** + * Merge two face groups into a single one, all ImageFaces from source will be moved to destination + */ + combineFaceGroups: combineFaces_combineFaceGroups; +} + +export interface combineFacesVariables { + destID: string; + srcID: string; +} diff --git a/ui/src/Pages/PeoplePage/SingleFaceGroup/__generated__/detachImageFaces.ts b/ui/src/Pages/PeoplePage/SingleFaceGroup/__generated__/detachImageFaces.ts new file mode 100644 index 0000000..ad423de --- /dev/null +++ b/ui/src/Pages/PeoplePage/SingleFaceGroup/__generated__/detachImageFaces.ts @@ -0,0 +1,25 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL mutation operation: detachImageFaces +// ==================================================== + +export interface detachImageFaces_detachImageFaces { + __typename: "FaceGroup"; + id: string; + label: string | null; +} + +export interface detachImageFaces { + /** + * Move a list of ImageFaces to a new face group + */ + detachImageFaces: detachImageFaces_detachImageFaces; +} + +export interface detachImageFacesVariables { + faceIDs: string[]; +} diff --git a/ui/src/Pages/PeoplePage/SingleFaceGroup/__generated__/moveImageFaces.ts b/ui/src/Pages/PeoplePage/SingleFaceGroup/__generated__/moveImageFaces.ts new file mode 100644 index 0000000..1279f42 --- /dev/null +++ b/ui/src/Pages/PeoplePage/SingleFaceGroup/__generated__/moveImageFaces.ts @@ -0,0 +1,31 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL mutation operation: moveImageFaces +// ==================================================== + +export interface moveImageFaces_moveImageFaces_imageFaces { + __typename: "ImageFace"; + id: string; +} + +export interface moveImageFaces_moveImageFaces { + __typename: "FaceGroup"; + id: string; + imageFaces: moveImageFaces_moveImageFaces_imageFaces[]; +} + +export interface moveImageFaces { + /** + * Move a list of ImageFaces to another face group + */ + moveImageFaces: moveImageFaces_moveImageFaces; +} + +export interface moveImageFacesVariables { + faceIDs: string[]; + destFaceGroupID: string; +} diff --git a/ui/src/Pages/PeoplePage/SingleFaceGroup/__generated__/singleFaceGroup.ts b/ui/src/Pages/PeoplePage/SingleFaceGroup/__generated__/singleFaceGroup.ts new file mode 100644 index 0000000..08ac01e --- /dev/null +++ b/ui/src/Pages/PeoplePage/SingleFaceGroup/__generated__/singleFaceGroup.ts @@ -0,0 +1,82 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +import { MediaType } from "./../../../../../__generated__/globalTypes"; + +// ==================================================== +// GraphQL query operation: singleFaceGroup +// ==================================================== + +export interface singleFaceGroup_faceGroup_imageFaces_rectangle { + __typename: "FaceRectangle"; + minX: number; + maxX: number; + minY: number; + maxY: number; +} + +export interface singleFaceGroup_faceGroup_imageFaces_media_thumbnail { + __typename: "MediaURL"; + /** + * URL for previewing the image + */ + url: string; + /** + * Width of the image in pixels + */ + width: number; + /** + * Height of the image in pixels + */ + height: number; +} + +export interface singleFaceGroup_faceGroup_imageFaces_media_highRes { + __typename: "MediaURL"; + /** + * URL for previewing the image + */ + url: string; +} + +export interface singleFaceGroup_faceGroup_imageFaces_media { + __typename: "Media"; + id: string; + type: MediaType; + title: string; + /** + * URL to display the media in a smaller resolution + */ + thumbnail: singleFaceGroup_faceGroup_imageFaces_media_thumbnail | null; + /** + * URL to display the photo in full resolution, will be null for videos + */ + highRes: singleFaceGroup_faceGroup_imageFaces_media_highRes | null; + favorite: boolean; +} + +export interface singleFaceGroup_faceGroup_imageFaces { + __typename: "ImageFace"; + id: string; + rectangle: singleFaceGroup_faceGroup_imageFaces_rectangle | null; + media: singleFaceGroup_faceGroup_imageFaces_media; +} + +export interface singleFaceGroup_faceGroup { + __typename: "FaceGroup"; + id: string; + label: string | null; + imageFaces: singleFaceGroup_faceGroup_imageFaces[]; +} + +export interface singleFaceGroup { + faceGroup: singleFaceGroup_faceGroup; +} + +export interface singleFaceGroupVariables { + id: string; + limit: number; + offset: number; +} diff --git a/ui/src/Pages/PeoplePage/__generated__/myFaces.ts b/ui/src/Pages/PeoplePage/__generated__/myFaces.ts new file mode 100644 index 0000000..22e17e4 --- /dev/null +++ b/ui/src/Pages/PeoplePage/__generated__/myFaces.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL query operation: myFaces +// ==================================================== + +export interface myFaces_myFaceGroups_imageFaces_rectangle { + __typename: "FaceRectangle"; + minX: number; + maxX: number; + minY: number; + maxY: number; +} + +export interface myFaces_myFaceGroups_imageFaces_media_thumbnail { + __typename: "MediaURL"; + /** + * URL for previewing the image + */ + url: string; + /** + * Width of the image in pixels + */ + width: number; + /** + * Height of the image in pixels + */ + height: number; +} + +export interface myFaces_myFaceGroups_imageFaces_media { + __typename: "Media"; + id: string; + /** + * URL to display the media in a smaller resolution + */ + thumbnail: myFaces_myFaceGroups_imageFaces_media_thumbnail | null; +} + +export interface myFaces_myFaceGroups_imageFaces { + __typename: "ImageFace"; + id: string; + rectangle: myFaces_myFaceGroups_imageFaces_rectangle | null; + media: myFaces_myFaceGroups_imageFaces_media; +} + +export interface myFaces_myFaceGroups { + __typename: "FaceGroup"; + id: string; + label: string | null; + imageFaceCount: number; + imageFaces: myFaces_myFaceGroups_imageFaces[]; +} + +export interface myFaces { + myFaceGroups: myFaces_myFaceGroups[]; +} + +export interface myFacesVariables { + limit?: number | null; + offset?: number | null; +} diff --git a/ui/src/Pages/PeoplePage/__generated__/recognizeUnlabeledFaces.ts b/ui/src/Pages/PeoplePage/__generated__/recognizeUnlabeledFaces.ts new file mode 100644 index 0000000..bfbfb49 --- /dev/null +++ b/ui/src/Pages/PeoplePage/__generated__/recognizeUnlabeledFaces.ts @@ -0,0 +1,20 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL mutation operation: recognizeUnlabeledFaces +// ==================================================== + +export interface recognizeUnlabeledFaces_recognizeUnlabeledFaces { + __typename: "ImageFace"; + id: string; +} + +export interface recognizeUnlabeledFaces { + /** + * Check all unlabeled faces to see if they match a labeled FaceGroup, and move them if they match + */ + recognizeUnlabeledFaces: recognizeUnlabeledFaces_recognizeUnlabeledFaces[]; +} diff --git a/ui/src/Pages/PeoplePage/__generated__/setGroupLabel.ts b/ui/src/Pages/PeoplePage/__generated__/setGroupLabel.ts new file mode 100644 index 0000000..4ca3620 --- /dev/null +++ b/ui/src/Pages/PeoplePage/__generated__/setGroupLabel.ts @@ -0,0 +1,26 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL mutation operation: setGroupLabel +// ==================================================== + +export interface setGroupLabel_setFaceGroupLabel { + __typename: "FaceGroup"; + id: string; + label: string | null; +} + +export interface setGroupLabel { + /** + * Assign a label to a face group, set label to null to remove the current one + */ + setFaceGroupLabel: setGroupLabel_setFaceGroupLabel; +} + +export interface setGroupLabelVariables { + groupID: string; + label?: string | null; +} diff --git a/ui/src/Pages/PlacesPage/__generated__/placePageMapboxToken.ts b/ui/src/Pages/PlacesPage/__generated__/placePageMapboxToken.ts new file mode 100644 index 0000000..e519734 --- /dev/null +++ b/ui/src/Pages/PlacesPage/__generated__/placePageMapboxToken.ts @@ -0,0 +1,19 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL query operation: placePageMapboxToken +// ==================================================== + +export interface placePageMapboxToken { + /** + * Get the mapbox api token, returns null if mapbox is not enabled + */ + mapboxToken: string | null; + /** + * Get media owned by the logged in user, returned in GeoJson format + */ + myMediaGeoJson: any; +} diff --git a/ui/src/Pages/PlacesPage/__generated__/placePageQueryMedia.ts b/ui/src/Pages/PlacesPage/__generated__/placePageQueryMedia.ts new file mode 100644 index 0000000..311338d --- /dev/null +++ b/ui/src/Pages/PlacesPage/__generated__/placePageQueryMedia.ts @@ -0,0 +1,88 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +import { MediaType } from "./../../../../__generated__/globalTypes"; + +// ==================================================== +// GraphQL query operation: placePageQueryMedia +// ==================================================== + +export interface placePageQueryMedia_mediaList_thumbnail { + __typename: "MediaURL"; + /** + * URL for previewing the image + */ + url: string; + /** + * Width of the image in pixels + */ + width: number; + /** + * Height of the image in pixels + */ + height: number; +} + +export interface placePageQueryMedia_mediaList_highRes { + __typename: "MediaURL"; + /** + * URL for previewing the image + */ + url: string; + /** + * Width of the image in pixels + */ + width: number; + /** + * Height of the image in pixels + */ + height: number; +} + +export interface placePageQueryMedia_mediaList_videoWeb { + __typename: "MediaURL"; + /** + * URL for previewing the image + */ + url: string; + /** + * Width of the image in pixels + */ + width: number; + /** + * Height of the image in pixels + */ + height: number; +} + +export interface placePageQueryMedia_mediaList { + __typename: "Media"; + id: string; + title: string; + /** + * URL to display the media in a smaller resolution + */ + thumbnail: placePageQueryMedia_mediaList_thumbnail | null; + /** + * URL to display the photo in full resolution, will be null for videos + */ + highRes: placePageQueryMedia_mediaList_highRes | null; + /** + * URL to get the video in a web format that can be played in the browser, will be null for photos + */ + videoWeb: placePageQueryMedia_mediaList_videoWeb | null; + type: MediaType; +} + +export interface placePageQueryMedia { + /** + * Get a list of media by their ids, user must own the media or be admin + */ + mediaList: placePageQueryMedia_mediaList[]; +} + +export interface placePageQueryMediaVariables { + mediaIDs: string[]; +} diff --git a/ui/src/Pages/SettingsPage/UserPreferences.js b/ui/src/Pages/SettingsPage/UserPreferences.js index 1a0cbab..b67d6d0 100644 --- a/ui/src/Pages/SettingsPage/UserPreferences.js +++ b/ui/src/Pages/SettingsPage/UserPreferences.js @@ -13,7 +13,7 @@ const languagePreferences = [ ] const CHANGE_USER_PREFERENCES = gql` - mutation($language: String) { + mutation changeUserPreferences($language: String) { changeUserPreferences(language: $language) { id language @@ -22,7 +22,7 @@ const CHANGE_USER_PREFERENCES = gql` ` const MY_USER_PREFERENCES = gql` - query { + query myUserPreferences { myUserPreferences { id language diff --git a/ui/src/Pages/SettingsPage/Users/AddUserRow.js b/ui/src/Pages/SettingsPage/Users/AddUserRow.js index 3d87f44..831239f 100644 --- a/ui/src/Pages/SettingsPage/Users/AddUserRow.js +++ b/ui/src/Pages/SettingsPage/Users/AddUserRow.js @@ -15,7 +15,7 @@ const createUserMutation = gql` } ` -const addRootPathMutation = gql` +export const userAddRootPathMutation = gql` mutation userAddRootPath($id: ID!, $rootPath: String!) { userAddRootPath(id: $id, rootPath: $rootPath) { id @@ -35,7 +35,7 @@ const AddUserRow = ({ setShow, show, onUserAdded }) => { const [state, setState] = useState(initialState) const [addRootPath, { loading: addRootPathLoading }] = useMutation( - addRootPathMutation, + userAddRootPathMutation, { onCompleted: () => { setState(initialState) diff --git a/ui/src/Pages/SettingsPage/Users/EditUserRowRootPaths.js b/ui/src/Pages/SettingsPage/Users/EditUserRowRootPaths.js index 11e84bc..ddc5c00 100644 --- a/ui/src/Pages/SettingsPage/Users/EditUserRowRootPaths.js +++ b/ui/src/Pages/SettingsPage/Users/EditUserRowRootPaths.js @@ -5,14 +5,7 @@ import { Button, Icon, Input } from 'semantic-ui-react' import styled from 'styled-components' import { USERS_QUERY } from './UsersTable' import { useTranslation } from 'react-i18next' - -const userAddRootPathMutation = gql` - mutation userAddRootPath($id: ID!, $rootPath: String!) { - userAddRootPath(id: $id, rootPath: $rootPath) { - id - } - } -` +import { userAddRootPathMutation } from './AddUserRow' const userRemoveAlbumPathMutation = gql` mutation userRemoveAlbumPathMutation($userId: ID!, $albumId: ID!) { diff --git a/ui/src/Pages/SettingsPage/Users/__generated__/changeUserPassword.ts b/ui/src/Pages/SettingsPage/Users/__generated__/changeUserPassword.ts new file mode 100644 index 0000000..a2fc65c --- /dev/null +++ b/ui/src/Pages/SettingsPage/Users/__generated__/changeUserPassword.ts @@ -0,0 +1,22 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL mutation operation: changeUserPassword +// ==================================================== + +export interface changeUserPassword_updateUser { + __typename: "User"; + id: string; +} + +export interface changeUserPassword { + updateUser: changeUserPassword_updateUser | null; +} + +export interface changeUserPasswordVariables { + userId: string; + password: string; +} diff --git a/ui/src/Pages/SettingsPage/Users/__generated__/createUser.ts b/ui/src/Pages/SettingsPage/Users/__generated__/createUser.ts new file mode 100644 index 0000000..87db9bc --- /dev/null +++ b/ui/src/Pages/SettingsPage/Users/__generated__/createUser.ts @@ -0,0 +1,24 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL mutation operation: createUser +// ==================================================== + +export interface createUser_createUser { + __typename: "User"; + id: string; + username: string; + admin: boolean; +} + +export interface createUser { + createUser: createUser_createUser | null; +} + +export interface createUserVariables { + username: string; + admin: boolean; +} diff --git a/ui/src/Pages/SettingsPage/Users/__generated__/deleteUser.ts b/ui/src/Pages/SettingsPage/Users/__generated__/deleteUser.ts new file mode 100644 index 0000000..fb130b3 --- /dev/null +++ b/ui/src/Pages/SettingsPage/Users/__generated__/deleteUser.ts @@ -0,0 +1,22 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL mutation operation: deleteUser +// ==================================================== + +export interface deleteUser_deleteUser { + __typename: "User"; + id: string; + username: string; +} + +export interface deleteUser { + deleteUser: deleteUser_deleteUser | null; +} + +export interface deleteUserVariables { + id: string; +} diff --git a/ui/src/Pages/SettingsPage/Users/__generated__/scanUser.ts b/ui/src/Pages/SettingsPage/Users/__generated__/scanUser.ts new file mode 100644 index 0000000..37f0c92 --- /dev/null +++ b/ui/src/Pages/SettingsPage/Users/__generated__/scanUser.ts @@ -0,0 +1,24 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL mutation operation: scanUser +// ==================================================== + +export interface scanUser_scanUser { + __typename: "ScannerResult"; + success: boolean; +} + +export interface scanUser { + /** + * Scan a single user for new media + */ + scanUser: scanUser_scanUser; +} + +export interface scanUserVariables { + userId: string; +} diff --git a/ui/src/Pages/SettingsPage/Users/__generated__/settingsUsersQuery.ts b/ui/src/Pages/SettingsPage/Users/__generated__/settingsUsersQuery.ts new file mode 100644 index 0000000..9de9605 --- /dev/null +++ b/ui/src/Pages/SettingsPage/Users/__generated__/settingsUsersQuery.ts @@ -0,0 +1,35 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL query operation: settingsUsersQuery +// ==================================================== + +export interface settingsUsersQuery_user_rootAlbums { + __typename: "Album"; + id: string; + /** + * The path on the filesystem of the server, where this album is located + */ + filePath: string; +} + +export interface settingsUsersQuery_user { + __typename: "User"; + id: string; + username: string; + admin: boolean; + /** + * Top level albums owned by this user + */ + rootAlbums: settingsUsersQuery_user_rootAlbums[]; +} + +export interface settingsUsersQuery { + /** + * List of registered users, must be admin to call + */ + user: settingsUsersQuery_user[]; +} diff --git a/ui/src/Pages/SettingsPage/Users/__generated__/updateUser.ts b/ui/src/Pages/SettingsPage/Users/__generated__/updateUser.ts new file mode 100644 index 0000000..fcd282d --- /dev/null +++ b/ui/src/Pages/SettingsPage/Users/__generated__/updateUser.ts @@ -0,0 +1,25 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL mutation operation: updateUser +// ==================================================== + +export interface updateUser_updateUser { + __typename: "User"; + id: string; + username: string; + admin: boolean; +} + +export interface updateUser { + updateUser: updateUser_updateUser | null; +} + +export interface updateUserVariables { + id: string; + username?: string | null; + admin?: boolean | null; +} diff --git a/ui/src/Pages/SettingsPage/Users/__generated__/userAddRootPath.ts b/ui/src/Pages/SettingsPage/Users/__generated__/userAddRootPath.ts new file mode 100644 index 0000000..666df55 --- /dev/null +++ b/ui/src/Pages/SettingsPage/Users/__generated__/userAddRootPath.ts @@ -0,0 +1,25 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL mutation operation: userAddRootPath +// ==================================================== + +export interface userAddRootPath_userAddRootPath { + __typename: "Album"; + id: string; +} + +export interface userAddRootPath { + /** + * Add a root path from where to look for media for the given user + */ + userAddRootPath: userAddRootPath_userAddRootPath | null; +} + +export interface userAddRootPathVariables { + id: string; + rootPath: string; +} diff --git a/ui/src/Pages/SettingsPage/Users/__generated__/userRemoveAlbumPathMutation.ts b/ui/src/Pages/SettingsPage/Users/__generated__/userRemoveAlbumPathMutation.ts new file mode 100644 index 0000000..9d16cb2 --- /dev/null +++ b/ui/src/Pages/SettingsPage/Users/__generated__/userRemoveAlbumPathMutation.ts @@ -0,0 +1,22 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL mutation operation: userRemoveAlbumPathMutation +// ==================================================== + +export interface userRemoveAlbumPathMutation_userRemoveRootAlbum { + __typename: "Album"; + id: string; +} + +export interface userRemoveAlbumPathMutation { + userRemoveRootAlbum: userRemoveAlbumPathMutation_userRemoveRootAlbum | null; +} + +export interface userRemoveAlbumPathMutationVariables { + userId: string; + albumId: string; +} diff --git a/ui/src/Pages/SettingsPage/__generated__/changeScanIntervalMutation.ts b/ui/src/Pages/SettingsPage/__generated__/changeScanIntervalMutation.ts new file mode 100644 index 0000000..f1ff320 --- /dev/null +++ b/ui/src/Pages/SettingsPage/__generated__/changeScanIntervalMutation.ts @@ -0,0 +1,20 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL mutation operation: changeScanIntervalMutation +// ==================================================== + +export interface changeScanIntervalMutation { + /** + * Set how often, in seconds, the server should automatically scan for new media, + * a value of 0 will disable periodic scans + */ + setPeriodicScanInterval: number; +} + +export interface changeScanIntervalMutationVariables { + interval: number; +} diff --git a/ui/src/Pages/SettingsPage/__generated__/changeUserPreferences.ts b/ui/src/Pages/SettingsPage/__generated__/changeUserPreferences.ts new file mode 100644 index 0000000..a198727 --- /dev/null +++ b/ui/src/Pages/SettingsPage/__generated__/changeUserPreferences.ts @@ -0,0 +1,24 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +import { LanguageTranslation } from "./../../../../__generated__/globalTypes"; + +// ==================================================== +// GraphQL mutation operation: changeUserPreferences +// ==================================================== + +export interface changeUserPreferences_changeUserPreferences { + __typename: "UserPreferences"; + id: string; + language: LanguageTranslation | null; +} + +export interface changeUserPreferences { + changeUserPreferences: changeUserPreferences_changeUserPreferences; +} + +export interface changeUserPreferencesVariables { + language?: string | null; +} diff --git a/ui/src/Pages/SettingsPage/__generated__/concurrentWorkersQuery.ts b/ui/src/Pages/SettingsPage/__generated__/concurrentWorkersQuery.ts new file mode 100644 index 0000000..b1bfe3e --- /dev/null +++ b/ui/src/Pages/SettingsPage/__generated__/concurrentWorkersQuery.ts @@ -0,0 +1,20 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL query operation: concurrentWorkersQuery +// ==================================================== + +export interface concurrentWorkersQuery_siteInfo { + __typename: "SiteInfo"; + /** + * How many max concurrent scanner jobs that should run at once + */ + concurrentWorkers: number; +} + +export interface concurrentWorkersQuery { + siteInfo: concurrentWorkersQuery_siteInfo; +} diff --git a/ui/src/Pages/SettingsPage/__generated__/myUserPreferences.ts b/ui/src/Pages/SettingsPage/__generated__/myUserPreferences.ts new file mode 100644 index 0000000..4f8e690 --- /dev/null +++ b/ui/src/Pages/SettingsPage/__generated__/myUserPreferences.ts @@ -0,0 +1,20 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +import { LanguageTranslation } from "./../../../../__generated__/globalTypes"; + +// ==================================================== +// GraphQL query operation: myUserPreferences +// ==================================================== + +export interface myUserPreferences_myUserPreferences { + __typename: "UserPreferences"; + id: string; + language: LanguageTranslation | null; +} + +export interface myUserPreferences { + myUserPreferences: myUserPreferences_myUserPreferences; +} diff --git a/ui/src/Pages/SettingsPage/__generated__/scanAllMutation.ts b/ui/src/Pages/SettingsPage/__generated__/scanAllMutation.ts new file mode 100644 index 0000000..95fa9b3 --- /dev/null +++ b/ui/src/Pages/SettingsPage/__generated__/scanAllMutation.ts @@ -0,0 +1,21 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL mutation operation: scanAllMutation +// ==================================================== + +export interface scanAllMutation_scanAll { + __typename: "ScannerResult"; + success: boolean; + message: string | null; +} + +export interface scanAllMutation { + /** + * Scan all users for new media + */ + scanAll: scanAllMutation_scanAll; +} diff --git a/ui/src/Pages/SettingsPage/__generated__/scanIntervalQuery.ts b/ui/src/Pages/SettingsPage/__generated__/scanIntervalQuery.ts new file mode 100644 index 0000000..9128437 --- /dev/null +++ b/ui/src/Pages/SettingsPage/__generated__/scanIntervalQuery.ts @@ -0,0 +1,20 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL query operation: scanIntervalQuery +// ==================================================== + +export interface scanIntervalQuery_siteInfo { + __typename: "SiteInfo"; + /** + * How often automatic scans should be initiated in seconds + */ + periodicScanInterval: number; +} + +export interface scanIntervalQuery { + siteInfo: scanIntervalQuery_siteInfo; +} diff --git a/ui/src/Pages/SettingsPage/__generated__/setConcurrentWorkers.ts b/ui/src/Pages/SettingsPage/__generated__/setConcurrentWorkers.ts new file mode 100644 index 0000000..7c6207c --- /dev/null +++ b/ui/src/Pages/SettingsPage/__generated__/setConcurrentWorkers.ts @@ -0,0 +1,19 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL mutation operation: setConcurrentWorkers +// ==================================================== + +export interface setConcurrentWorkers { + /** + * Set max number of concurrent scanner jobs running at once + */ + setScannerConcurrentWorkers: number; +} + +export interface setConcurrentWorkersVariables { + workers: number; +} diff --git a/ui/src/Pages/SharePage/__generated__/SharePageToken.ts b/ui/src/Pages/SharePage/__generated__/SharePageToken.ts new file mode 100644 index 0000000..fd14709 --- /dev/null +++ b/ui/src/Pages/SharePage/__generated__/SharePageToken.ts @@ -0,0 +1,165 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +import { MediaType } from "./../../../../__generated__/globalTypes"; + +// ==================================================== +// GraphQL query operation: SharePageToken +// ==================================================== + +export interface SharePageToken_shareToken_album { + __typename: "Album"; + id: string; +} + +export interface SharePageToken_shareToken_media_thumbnail { + __typename: "MediaURL"; + /** + * URL for previewing the image + */ + url: string; + /** + * Width of the image in pixels + */ + width: number; + /** + * Height of the image in pixels + */ + height: number; +} + +export interface SharePageToken_shareToken_media_downloads_mediaUrl { + __typename: "MediaURL"; + /** + * URL for previewing the image + */ + url: string; + /** + * Width of the image in pixels + */ + width: number; + /** + * Height of the image in pixels + */ + height: number; + /** + * The file size of the resource in bytes + */ + fileSize: number; +} + +export interface SharePageToken_shareToken_media_downloads { + __typename: "MediaDownload"; + title: string; + mediaUrl: SharePageToken_shareToken_media_downloads_mediaUrl; +} + +export interface SharePageToken_shareToken_media_highRes { + __typename: "MediaURL"; + /** + * URL for previewing the image + */ + url: string; + /** + * Width of the image in pixels + */ + width: number; + /** + * Height of the image in pixels + */ + height: number; +} + +export interface SharePageToken_shareToken_media_videoWeb { + __typename: "MediaURL"; + /** + * URL for previewing the image + */ + url: string; +} + +export interface SharePageToken_shareToken_media_exif { + __typename: "MediaEXIF"; + /** + * The model name of the camera + */ + camera: string | null; + /** + * The maker of the camera + */ + maker: string | null; + /** + * The name of the lens + */ + lens: string | null; + dateShot: any | null; + /** + * The exposure time of the image + */ + exposure: number | null; + /** + * The aperature stops of the image + */ + aperture: number | null; + /** + * The ISO setting of the image + */ + iso: number | null; + /** + * The focal length of the lens, when the image was taken + */ + focalLength: number | null; + /** + * A formatted description of the flash settings, when the image was taken + */ + flash: number | null; + /** + * An index describing the mode for adjusting the exposure of the image + */ + exposureProgram: number | null; +} + +export interface SharePageToken_shareToken_media { + __typename: "Media"; + id: string; + title: string; + type: MediaType; + /** + * URL to display the media in a smaller resolution + */ + thumbnail: SharePageToken_shareToken_media_thumbnail | null; + downloads: SharePageToken_shareToken_media_downloads[]; + /** + * URL to display the photo in full resolution, will be null for videos + */ + highRes: SharePageToken_shareToken_media_highRes | null; + /** + * URL to get the video in a web format that can be played in the browser, will be null for photos + */ + videoWeb: SharePageToken_shareToken_media_videoWeb | null; + exif: SharePageToken_shareToken_media_exif | null; +} + +export interface SharePageToken_shareToken { + __typename: "ShareToken"; + token: string; + /** + * The album this token shares + */ + album: SharePageToken_shareToken_album | null; + /** + * The media this token shares + */ + media: SharePageToken_shareToken_media | null; +} + +export interface SharePageToken { + shareToken: SharePageToken_shareToken; +} + +export interface SharePageTokenVariables { + token: string; + password?: string | null; +} diff --git a/ui/src/Pages/SharePage/__generated__/ShareTokenValidatePassword.ts b/ui/src/Pages/SharePage/__generated__/ShareTokenValidatePassword.ts new file mode 100644 index 0000000..5f59ec2 --- /dev/null +++ b/ui/src/Pages/SharePage/__generated__/ShareTokenValidatePassword.ts @@ -0,0 +1,17 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL query operation: ShareTokenValidatePassword +// ==================================================== + +export interface ShareTokenValidatePassword { + shareTokenValidatePassword: boolean; +} + +export interface ShareTokenValidatePasswordVariables { + token: string; + password?: string | null; +} diff --git a/ui/src/Pages/SharePage/__generated__/shareAlbumQuery.ts b/ui/src/Pages/SharePage/__generated__/shareAlbumQuery.ts new file mode 100644 index 0000000..31c6b5e --- /dev/null +++ b/ui/src/Pages/SharePage/__generated__/shareAlbumQuery.ts @@ -0,0 +1,194 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +import { MediaType } from "./../../../../__generated__/globalTypes"; + +// ==================================================== +// GraphQL query operation: shareAlbumQuery +// ==================================================== + +export interface shareAlbumQuery_album_subAlbums_thumbnail_thumbnail { + __typename: "MediaURL"; + /** + * URL for previewing the image + */ + url: string; +} + +export interface shareAlbumQuery_album_subAlbums_thumbnail { + __typename: "Media"; + /** + * URL to display the media in a smaller resolution + */ + thumbnail: shareAlbumQuery_album_subAlbums_thumbnail_thumbnail | null; +} + +export interface shareAlbumQuery_album_subAlbums { + __typename: "Album"; + id: string; + title: string; + /** + * An image in this album used for previewing this album + */ + thumbnail: shareAlbumQuery_album_subAlbums_thumbnail | null; +} + +export interface shareAlbumQuery_album_media_thumbnail { + __typename: "MediaURL"; + /** + * URL for previewing the image + */ + url: string; + /** + * Width of the image in pixels + */ + width: number; + /** + * Height of the image in pixels + */ + height: number; +} + +export interface shareAlbumQuery_album_media_downloads_mediaUrl { + __typename: "MediaURL"; + /** + * URL for previewing the image + */ + url: string; + /** + * Width of the image in pixels + */ + width: number; + /** + * Height of the image in pixels + */ + height: number; + /** + * The file size of the resource in bytes + */ + fileSize: number; +} + +export interface shareAlbumQuery_album_media_downloads { + __typename: "MediaDownload"; + title: string; + mediaUrl: shareAlbumQuery_album_media_downloads_mediaUrl; +} + +export interface shareAlbumQuery_album_media_highRes { + __typename: "MediaURL"; + /** + * URL for previewing the image + */ + url: string; + /** + * Width of the image in pixels + */ + width: number; + /** + * Height of the image in pixels + */ + height: number; +} + +export interface shareAlbumQuery_album_media_videoWeb { + __typename: "MediaURL"; + /** + * URL for previewing the image + */ + url: string; +} + +export interface shareAlbumQuery_album_media_exif { + __typename: "MediaEXIF"; + /** + * The model name of the camera + */ + camera: string | null; + /** + * The maker of the camera + */ + maker: string | null; + /** + * The name of the lens + */ + lens: string | null; + dateShot: any | null; + /** + * The exposure time of the image + */ + exposure: number | null; + /** + * The aperature stops of the image + */ + aperture: number | null; + /** + * The ISO setting of the image + */ + iso: number | null; + /** + * The focal length of the lens, when the image was taken + */ + focalLength: number | null; + /** + * A formatted description of the flash settings, when the image was taken + */ + flash: number | null; + /** + * An index describing the mode for adjusting the exposure of the image + */ + exposureProgram: number | null; +} + +export interface shareAlbumQuery_album_media { + __typename: "Media"; + id: string; + title: string; + type: MediaType; + /** + * URL to display the media in a smaller resolution + */ + thumbnail: shareAlbumQuery_album_media_thumbnail | null; + downloads: shareAlbumQuery_album_media_downloads[]; + /** + * URL to display the photo in full resolution, will be null for videos + */ + highRes: shareAlbumQuery_album_media_highRes | null; + /** + * URL to get the video in a web format that can be played in the browser, will be null for photos + */ + videoWeb: shareAlbumQuery_album_media_videoWeb | null; + exif: shareAlbumQuery_album_media_exif | null; +} + +export interface shareAlbumQuery_album { + __typename: "Album"; + id: string; + title: string; + /** + * The albums contained in this album + */ + subAlbums: shareAlbumQuery_album_subAlbums[]; + /** + * The media inside this album + */ + media: shareAlbumQuery_album_media[]; +} + +export interface shareAlbumQuery { + /** + * Get album by id, user must own the album or be admin + * If valid tokenCredentials are provided, the album may be retrived without further authentication + */ + album: shareAlbumQuery_album; +} + +export interface shareAlbumQueryVariables { + id: string; + token: string; + password?: string | null; + limit?: number | null; + offset?: number | null; +} diff --git a/ui/src/__generated__/adminQuery.ts b/ui/src/__generated__/adminQuery.ts new file mode 100644 index 0000000..232a958 --- /dev/null +++ b/ui/src/__generated__/adminQuery.ts @@ -0,0 +1,20 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL query operation: adminQuery +// ==================================================== + +export interface adminQuery_myUser { + __typename: "User"; + admin: boolean; +} + +export interface adminQuery { + /** + * Information about the currently logged in user + */ + myUser: adminQuery_myUser; +} diff --git a/ui/src/__generated__/mapboxEnabledQuery.ts b/ui/src/__generated__/mapboxEnabledQuery.ts new file mode 100644 index 0000000..e666de4 --- /dev/null +++ b/ui/src/__generated__/mapboxEnabledQuery.ts @@ -0,0 +1,15 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL query operation: mapboxEnabledQuery +// ==================================================== + +export interface mapboxEnabledQuery { + /** + * Get the mapbox api token, returns null if mapbox is not enabled + */ + mapboxToken: string | null; +} diff --git a/ui/src/__generated__/siteTranslation.ts b/ui/src/__generated__/siteTranslation.ts new file mode 100644 index 0000000..dfe5a7d --- /dev/null +++ b/ui/src/__generated__/siteTranslation.ts @@ -0,0 +1,20 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +import { LanguageTranslation } from "./../../__generated__/globalTypes"; + +// ==================================================== +// GraphQL query operation: siteTranslation +// ==================================================== + +export interface siteTranslation_myUserPreferences { + __typename: "UserPreferences"; + id: string; + language: LanguageTranslation | null; +} + +export interface siteTranslation { + myUserPreferences: siteTranslation_myUserPreferences; +} diff --git a/ui/src/components/__generated__/albumPathQuery.ts b/ui/src/components/__generated__/albumPathQuery.ts new file mode 100644 index 0000000..258c586 --- /dev/null +++ b/ui/src/components/__generated__/albumPathQuery.ts @@ -0,0 +1,32 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL query operation: albumPathQuery +// ==================================================== + +export interface albumPathQuery_album_path { + __typename: "Album"; + id: string; + title: string; +} + +export interface albumPathQuery_album { + __typename: "Album"; + id: string; + path: albumPathQuery_album_path[]; +} + +export interface albumPathQuery { + /** + * Get album by id, user must own the album or be admin + * If valid tokenCredentials are provided, the album may be retrived without further authentication + */ + album: albumPathQuery_album; +} + +export interface albumPathQueryVariables { + id: string; +} diff --git a/ui/src/components/header/__generated__/searchQuery.ts b/ui/src/components/header/__generated__/searchQuery.ts new file mode 100644 index 0000000..434dd76 --- /dev/null +++ b/ui/src/components/header/__generated__/searchQuery.ts @@ -0,0 +1,76 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL query operation: searchQuery +// ==================================================== + +export interface searchQuery_search_albums_thumbnail_thumbnail { + __typename: "MediaURL"; + /** + * URL for previewing the image + */ + url: string; +} + +export interface searchQuery_search_albums_thumbnail { + __typename: "Media"; + /** + * URL to display the media in a smaller resolution + */ + thumbnail: searchQuery_search_albums_thumbnail_thumbnail | null; +} + +export interface searchQuery_search_albums { + __typename: "Album"; + id: string; + title: string; + /** + * An image in this album used for previewing this album + */ + thumbnail: searchQuery_search_albums_thumbnail | null; +} + +export interface searchQuery_search_media_thumbnail { + __typename: "MediaURL"; + /** + * URL for previewing the image + */ + url: string; +} + +export interface searchQuery_search_media_album { + __typename: "Album"; + id: string; +} + +export interface searchQuery_search_media { + __typename: "Media"; + id: string; + title: string; + /** + * URL to display the media in a smaller resolution + */ + thumbnail: searchQuery_search_media_thumbnail | null; + /** + * The album that holds the media + */ + album: searchQuery_search_media_album; +} + +export interface searchQuery_search { + __typename: "SearchResult"; + query: string; + albums: searchQuery_search_albums[]; + media: searchQuery_search_media[]; +} + +export interface searchQuery { + search: searchQuery_search; +} + +export interface searchQueryVariables { + query: string; +} diff --git a/ui/src/components/messages/__generated__/notificationSubscription.ts b/ui/src/components/messages/__generated__/notificationSubscription.ts new file mode 100644 index 0000000..b091a83 --- /dev/null +++ b/ui/src/components/messages/__generated__/notificationSubscription.ts @@ -0,0 +1,29 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +import { NotificationType } from "./../../../../__generated__/globalTypes"; + +// ==================================================== +// GraphQL subscription operation: notificationSubscription +// ==================================================== + +export interface notificationSubscription_notification { + __typename: "Notification"; + key: string; + type: NotificationType; + header: string; + content: string; + progress: number | null; + positive: boolean; + negative: boolean; + /** + * Time in milliseconds before the notification will close + */ + timeout: number | null; +} + +export interface notificationSubscription { + notification: notificationSubscription_notification; +} diff --git a/ui/src/components/photoGallery/__generated__/markMediaFavorite.ts b/ui/src/components/photoGallery/__generated__/markMediaFavorite.ts new file mode 100644 index 0000000..2ab672b --- /dev/null +++ b/ui/src/components/photoGallery/__generated__/markMediaFavorite.ts @@ -0,0 +1,26 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL mutation operation: markMediaFavorite +// ==================================================== + +export interface markMediaFavorite_favoriteMedia { + __typename: "Media"; + id: string; + favorite: boolean; +} + +export interface markMediaFavorite { + /** + * Mark or unmark a media as being a favorite + */ + favoriteMedia: markMediaFavorite_favoriteMedia | null; +} + +export interface markMediaFavoriteVariables { + mediaId: string; + favorite: boolean; +} diff --git a/ui/src/components/routes/AuthorizedRoute.js b/ui/src/components/routes/AuthorizedRoute.js index afc75a9..b0ccb2c 100644 --- a/ui/src/components/routes/AuthorizedRoute.js +++ b/ui/src/components/routes/AuthorizedRoute.js @@ -1,16 +1,9 @@ import React, { useEffect } from 'react' import PropTypes from 'prop-types' import { Route, Redirect } from 'react-router-dom' -import { gql, useLazyQuery } from '@apollo/client' +import { useLazyQuery } from '@apollo/client' import { authToken } from '../../helpers/authentication' - -export const ADMIN_QUERY = gql` - query adminQuery { - myUser { - admin - } - } -` +import { ADMIN_QUERY } from '../../Layout' export const useIsAdmin = (enabled = true) => { const [fetchAdminQuery, { data }] = useLazyQuery(ADMIN_QUERY) diff --git a/ui/src/components/routes/Routes.js b/ui/src/components/routes/Routes.tsx similarity index 100% rename from ui/src/components/routes/Routes.js rename to ui/src/components/routes/Routes.tsx diff --git a/ui/src/components/sidebar/__generated__/getAlbumSidebar.ts b/ui/src/components/sidebar/__generated__/getAlbumSidebar.ts new file mode 100644 index 0000000..e4e6604 --- /dev/null +++ b/ui/src/components/sidebar/__generated__/getAlbumSidebar.ts @@ -0,0 +1,26 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL query operation: getAlbumSidebar +// ==================================================== + +export interface getAlbumSidebar_album { + __typename: "Album"; + id: string; + title: string; +} + +export interface getAlbumSidebar { + /** + * Get album by id, user must own the album or be admin + * If valid tokenCredentials are provided, the album may be retrived without further authentication + */ + album: getAlbumSidebar_album; +} + +export interface getAlbumSidebarVariables { + id: string; +} diff --git a/ui/src/components/sidebar/__generated__/sidbarGetAlbumShares.ts b/ui/src/components/sidebar/__generated__/sidbarGetAlbumShares.ts new file mode 100644 index 0000000..7e7fa27 --- /dev/null +++ b/ui/src/components/sidebar/__generated__/sidbarGetAlbumShares.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL query operation: sidbarGetAlbumShares +// ==================================================== + +export interface sidbarGetAlbumShares_album_shares { + __typename: "ShareToken"; + id: string; + token: string; + /** + * Whether or not a password is needed to access the share + */ + hasPassword: boolean; +} + +export interface sidbarGetAlbumShares_album { + __typename: "Album"; + id: string; + shares: (sidbarGetAlbumShares_album_shares | null)[] | null; +} + +export interface sidbarGetAlbumShares { + /** + * Get album by id, user must own the album or be admin + * If valid tokenCredentials are provided, the album may be retrived without further authentication + */ + album: sidbarGetAlbumShares_album; +} + +export interface sidbarGetAlbumSharesVariables { + id: string; +} diff --git a/ui/src/components/sidebar/__generated__/sidbarGetPhotoShares.ts b/ui/src/components/sidebar/__generated__/sidbarGetPhotoShares.ts new file mode 100644 index 0000000..400e27d --- /dev/null +++ b/ui/src/components/sidebar/__generated__/sidbarGetPhotoShares.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL query operation: sidbarGetPhotoShares +// ==================================================== + +export interface sidbarGetPhotoShares_media_shares { + __typename: "ShareToken"; + id: string; + token: string; + /** + * Whether or not a password is needed to access the share + */ + hasPassword: boolean; +} + +export interface sidbarGetPhotoShares_media { + __typename: "Media"; + id: string; + shares: sidbarGetPhotoShares_media_shares[]; +} + +export interface sidbarGetPhotoShares { + /** + * Get media by id, user must own the media or be admin. + * If valid tokenCredentials are provided, the media may be retrived without further authentication + */ + media: sidbarGetPhotoShares_media; +} + +export interface sidbarGetPhotoSharesVariables { + id: string; +} diff --git a/ui/src/components/sidebar/__generated__/sidebarAlbumAddShare.ts b/ui/src/components/sidebar/__generated__/sidebarAlbumAddShare.ts new file mode 100644 index 0000000..50a80f5 --- /dev/null +++ b/ui/src/components/sidebar/__generated__/sidebarAlbumAddShare.ts @@ -0,0 +1,26 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL mutation operation: sidebarAlbumAddShare +// ==================================================== + +export interface sidebarAlbumAddShare_shareAlbum { + __typename: "ShareToken"; + token: string; +} + +export interface sidebarAlbumAddShare { + /** + * Generate share token for album + */ + shareAlbum: sidebarAlbumAddShare_shareAlbum | null; +} + +export interface sidebarAlbumAddShareVariables { + id: string; + password?: string | null; + expire?: any | null; +} diff --git a/ui/src/components/sidebar/__generated__/sidebarDownloadQuery.ts b/ui/src/components/sidebar/__generated__/sidebarDownloadQuery.ts new file mode 100644 index 0000000..dd67886 --- /dev/null +++ b/ui/src/components/sidebar/__generated__/sidebarDownloadQuery.ts @@ -0,0 +1,52 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL query operation: sidebarDownloadQuery +// ==================================================== + +export interface sidebarDownloadQuery_media_downloads_mediaUrl { + __typename: "MediaURL"; + /** + * URL for previewing the image + */ + url: string; + /** + * Width of the image in pixels + */ + width: number; + /** + * Height of the image in pixels + */ + height: number; + /** + * The file size of the resource in bytes + */ + fileSize: number; +} + +export interface sidebarDownloadQuery_media_downloads { + __typename: "MediaDownload"; + title: string; + mediaUrl: sidebarDownloadQuery_media_downloads_mediaUrl; +} + +export interface sidebarDownloadQuery_media { + __typename: "Media"; + id: string; + downloads: sidebarDownloadQuery_media_downloads[]; +} + +export interface sidebarDownloadQuery { + /** + * Get media by id, user must own the media or be admin. + * If valid tokenCredentials are provided, the media may be retrived without further authentication + */ + media: sidebarDownloadQuery_media; +} + +export interface sidebarDownloadQueryVariables { + mediaId: string; +} diff --git a/ui/src/components/sidebar/__generated__/sidebarPhoto.ts b/ui/src/components/sidebar/__generated__/sidebarPhoto.ts new file mode 100644 index 0000000..0766b5d --- /dev/null +++ b/ui/src/components/sidebar/__generated__/sidebarPhoto.ts @@ -0,0 +1,167 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +import { MediaType } from "./../../../../__generated__/globalTypes"; + +// ==================================================== +// GraphQL query operation: sidebarPhoto +// ==================================================== + +export interface sidebarPhoto_media_highRes { + __typename: "MediaURL"; + /** + * URL for previewing the image + */ + url: string; + /** + * Width of the image in pixels + */ + width: number; + /** + * Height of the image in pixels + */ + height: number; +} + +export interface sidebarPhoto_media_thumbnail { + __typename: "MediaURL"; + /** + * URL for previewing the image + */ + url: string; + /** + * Width of the image in pixels + */ + width: number; + /** + * Height of the image in pixels + */ + height: number; +} + +export interface sidebarPhoto_media_videoWeb { + __typename: "MediaURL"; + /** + * URL for previewing the image + */ + url: string; + /** + * Width of the image in pixels + */ + width: number; + /** + * Height of the image in pixels + */ + height: number; +} + +export interface sidebarPhoto_media_videoMetadata { + __typename: "VideoMetadata"; + id: string; + width: number; + height: number; + duration: number; + codec: string | null; + framerate: number | null; + bitrate: string | null; + colorProfile: string | null; + audio: string | null; +} + +export interface sidebarPhoto_media_exif { + __typename: "MediaEXIF"; + id: string; + /** + * The model name of the camera + */ + camera: string | null; + /** + * The maker of the camera + */ + maker: string | null; + /** + * The name of the lens + */ + lens: string | null; + dateShot: any | null; + /** + * The exposure time of the image + */ + exposure: number | null; + /** + * The aperature stops of the image + */ + aperture: number | null; + /** + * The ISO setting of the image + */ + iso: number | null; + /** + * The focal length of the lens, when the image was taken + */ + focalLength: number | null; + /** + * A formatted description of the flash settings, when the image was taken + */ + flash: number | null; + /** + * An index describing the mode for adjusting the exposure of the image + */ + exposureProgram: number | null; +} + +export interface sidebarPhoto_media_faces_rectangle { + __typename: "FaceRectangle"; + minX: number; + maxX: number; + minY: number; + maxY: number; +} + +export interface sidebarPhoto_media_faces_faceGroup { + __typename: "FaceGroup"; + id: string; +} + +export interface sidebarPhoto_media_faces { + __typename: "ImageFace"; + id: string; + rectangle: sidebarPhoto_media_faces_rectangle | null; + faceGroup: sidebarPhoto_media_faces_faceGroup; +} + +export interface sidebarPhoto_media { + __typename: "Media"; + id: string; + title: string; + type: MediaType; + /** + * URL to display the photo in full resolution, will be null for videos + */ + highRes: sidebarPhoto_media_highRes | null; + /** + * URL to display the media in a smaller resolution + */ + thumbnail: sidebarPhoto_media_thumbnail | null; + /** + * URL to get the video in a web format that can be played in the browser, will be null for photos + */ + videoWeb: sidebarPhoto_media_videoWeb | null; + videoMetadata: sidebarPhoto_media_videoMetadata | null; + exif: sidebarPhoto_media_exif | null; + faces: sidebarPhoto_media_faces[]; +} + +export interface sidebarPhoto { + /** + * Get media by id, user must own the media or be admin. + * If valid tokenCredentials are provided, the media may be retrived without further authentication + */ + media: sidebarPhoto_media; +} + +export interface sidebarPhotoVariables { + id: string; +} diff --git a/ui/src/components/sidebar/__generated__/sidebarPhotoAddShare.ts b/ui/src/components/sidebar/__generated__/sidebarPhotoAddShare.ts new file mode 100644 index 0000000..8803f68 --- /dev/null +++ b/ui/src/components/sidebar/__generated__/sidebarPhotoAddShare.ts @@ -0,0 +1,26 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL mutation operation: sidebarPhotoAddShare +// ==================================================== + +export interface sidebarPhotoAddShare_shareMedia { + __typename: "ShareToken"; + token: string; +} + +export interface sidebarPhotoAddShare { + /** + * Generate share token for media + */ + shareMedia: sidebarPhotoAddShare_shareMedia | null; +} + +export interface sidebarPhotoAddShareVariables { + id: string; + password?: string | null; + expire?: any | null; +} diff --git a/ui/src/components/sidebar/__generated__/sidebarProtectShare.ts b/ui/src/components/sidebar/__generated__/sidebarProtectShare.ts new file mode 100644 index 0000000..6ea497a --- /dev/null +++ b/ui/src/components/sidebar/__generated__/sidebarProtectShare.ts @@ -0,0 +1,29 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL mutation operation: sidebarProtectShare +// ==================================================== + +export interface sidebarProtectShare_protectShareToken { + __typename: "ShareToken"; + token: string; + /** + * Whether or not a password is needed to access the share + */ + hasPassword: boolean; +} + +export interface sidebarProtectShare { + /** + * Set a password for a token, if null is passed for the password argument, the password will be cleared + */ + protectShareToken: sidebarProtectShare_protectShareToken | null; +} + +export interface sidebarProtectShareVariables { + token: string; + password?: string | null; +} diff --git a/ui/src/components/sidebar/__generated__/sidebareDeleteShare.ts b/ui/src/components/sidebar/__generated__/sidebareDeleteShare.ts new file mode 100644 index 0000000..59aaa32 --- /dev/null +++ b/ui/src/components/sidebar/__generated__/sidebareDeleteShare.ts @@ -0,0 +1,24 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +// ==================================================== +// GraphQL mutation operation: sidebareDeleteShare +// ==================================================== + +export interface sidebareDeleteShare_deleteShareToken { + __typename: "ShareToken"; + token: string; +} + +export interface sidebareDeleteShare { + /** + * Delete a share token by it's token value + */ + deleteShareToken: sidebareDeleteShare_deleteShareToken | null; +} + +export interface sidebareDeleteShareVariables { + token: string; +} diff --git a/ui/src/components/timelineGallery/__generated__/myTimeline.ts b/ui/src/components/timelineGallery/__generated__/myTimeline.ts new file mode 100644 index 0000000..cfbaa97 --- /dev/null +++ b/ui/src/components/timelineGallery/__generated__/myTimeline.ts @@ -0,0 +1,94 @@ +/* tslint:disable */ +/* eslint-disable */ +// @generated +// This file was automatically generated and should not be edited. + +import { MediaType } from "./../../../../__generated__/globalTypes"; + +// ==================================================== +// GraphQL query operation: myTimeline +// ==================================================== + +export interface myTimeline_myTimeline_album { + __typename: "Album"; + id: string; + title: string; +} + +export interface myTimeline_myTimeline_media_thumbnail { + __typename: "MediaURL"; + /** + * URL for previewing the image + */ + url: string; + /** + * Width of the image in pixels + */ + width: number; + /** + * Height of the image in pixels + */ + height: number; +} + +export interface myTimeline_myTimeline_media_highRes { + __typename: "MediaURL"; + /** + * URL for previewing the image + */ + url: string; + /** + * Width of the image in pixels + */ + width: number; + /** + * Height of the image in pixels + */ + height: number; +} + +export interface myTimeline_myTimeline_media_videoWeb { + __typename: "MediaURL"; + /** + * URL for previewing the image + */ + url: string; +} + +export interface myTimeline_myTimeline_media { + __typename: "Media"; + id: string; + title: string; + type: MediaType; + /** + * URL to display the media in a smaller resolution + */ + thumbnail: myTimeline_myTimeline_media_thumbnail | null; + /** + * URL to display the photo in full resolution, will be null for videos + */ + highRes: myTimeline_myTimeline_media_highRes | null; + /** + * URL to get the video in a web format that can be played in the browser, will be null for photos + */ + videoWeb: myTimeline_myTimeline_media_videoWeb | null; + favorite: boolean; +} + +export interface myTimeline_myTimeline { + __typename: "TimelineGroup"; + album: myTimeline_myTimeline_album; + media: myTimeline_myTimeline_media[]; + mediaTotal: number; + date: any; +} + +export interface myTimeline { + myTimeline: myTimeline_myTimeline[]; +} + +export interface myTimelineVariables { + onlyFavorites?: boolean | null; + limit?: number | null; + offset?: number | null; +} diff --git a/ui/src/index.js b/ui/src/index.tsx similarity index 100% rename from ui/src/index.js rename to ui/src/index.tsx diff --git a/ui/tsconfig.json b/ui/tsconfig.json new file mode 100644 index 0000000..b3854d6 --- /dev/null +++ b/ui/tsconfig.json @@ -0,0 +1,72 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig.json to read more about this file */ + + /* Basic Options */ + // "incremental": true, /* Enable incremental compilation */ + // "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + // "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ + // "lib": [], /* Specify library files to be included in the compilation. */ + "allowJs": true /* Allow javascript files to be compiled. */, + // "checkJs": true, /* Report errors in .js files. */ + "jsx": "preserve" /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */, + "resolveJsonModule": true, + // "declaration": true, /* Generates corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "sourceMap": true, /* Generates corresponding '.map' file. */ + // "outFile": "./", /* Concatenate and emit output to single file. */ + // "outDir": "./", /* Redirect output structure to the directory. */ + // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "composite": true, /* Enable project compilation */ + // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ + // "removeComments": true, /* Do not emit comments to output. */ + "noEmit": true /* Do not emit outputs. */, + // "importHelpers": true, /* Import emit helpers from 'tslib'. */ + // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + + /* Strict Type-Checking Options */ + "strict": true /* Enable all strict type-checking options. */, + "noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */, + "strictNullChecks": true /* Enable strict null checks. */, + "strictFunctionTypes": true /* Enable strict checking of function types. */, + "strictBindCallApply": true /* Enable strict 'bind', 'call', and 'apply' methods on functions. */, + "strictPropertyInitialization": true /* Enable strict checking of property initialization in classes. */, + "noImplicitThis": true /* Raise error on 'this' expressions with an implied 'any' type. */, + "alwaysStrict": true /* Parse in strict mode and emit "use strict" for each source file. */, + + /* Additional Checks */ + // "noUnusedLocals": true, /* Report errors on unused locals. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */ + // "noPropertyAccessFromIndexSignature": true, /* Require undeclared properties from index signatures to use element accesses. */ + + /* Module Resolution Options */ + // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ + // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "typeRoots": [], /* List of folders to include type definitions from. */ + // "types": [], /* Type declaration files to be included in compilation. */ + // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, + // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + + /* Source Map Options */ + // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ + // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + + /* Experimental Options */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ + + /* Advanced Options */ + "skipLibCheck": true /* Skip type checking of declaration files. */, + "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ + } +}