diff --git a/graphql/documents/data/config.graphql b/graphql/documents/data/config.graphql
index 57cd64c94..e36594c50 100644
--- a/graphql/documents/data/config.graphql
+++ b/graphql/documents/data/config.graphql
@@ -21,6 +21,7 @@ fragment ConfigInterfaceData on ConfigInterfaceResult {
showStudioAsText
css
cssEnabled
+ language
}
fragment ConfigData on ConfigResult {
diff --git a/graphql/schema/types/config.graphql b/graphql/schema/types/config.graphql
index 2d90c24f4..8054798ea 100644
--- a/graphql/schema/types/config.graphql
+++ b/graphql/schema/types/config.graphql
@@ -75,6 +75,7 @@ input ConfigInterfaceInput {
"""Custom CSS"""
css: String
cssEnabled: Boolean
+ language: String
}
type ConfigInterfaceResult {
@@ -91,6 +92,8 @@ type ConfigInterfaceResult {
"""Custom CSS"""
css: String
cssEnabled: Boolean
+ """Interface language"""
+ language: String
}
"""All configuration settings"""
diff --git a/pkg/api/resolver_mutation_configure.go b/pkg/api/resolver_mutation_configure.go
index 2b9273caf..5cec957b1 100644
--- a/pkg/api/resolver_mutation_configure.go
+++ b/pkg/api/resolver_mutation_configure.go
@@ -106,6 +106,10 @@ func (r *mutationResolver) ConfigureInterface(ctx context.Context, input models.
config.Set(config.ShowStudioAsText, *input.ShowStudioAsText)
}
+ if input.Language != nil {
+ config.Set(config.Language, *input.Language)
+ }
+
css := ""
if input.CSS != nil {
diff --git a/pkg/api/resolver_query_configuration.go b/pkg/api/resolver_query_configuration.go
index 80ddf8bd2..d9865f1c7 100644
--- a/pkg/api/resolver_query_configuration.go
+++ b/pkg/api/resolver_query_configuration.go
@@ -57,6 +57,8 @@ func makeConfigInterfaceResult() *models.ConfigInterfaceResult {
showStudioAsText := config.GetShowStudioAsText()
css := config.GetCSS()
cssEnabled := config.GetCSSEnabled()
+ language := config.GetLanguage()
+
return &models.ConfigInterfaceResult{
SoundOnPreview: &soundOnPreview,
@@ -66,5 +68,6 @@ func makeConfigInterfaceResult() *models.ConfigInterfaceResult {
ShowStudioAsText: &showStudioAsText,
CSS: &css,
CSSEnabled: &cssEnabled,
+ Language: &language,
}
}
diff --git a/pkg/manager/config/config.go b/pkg/manager/config/config.go
index 490094966..e5fa50f51 100644
--- a/pkg/manager/config/config.go
+++ b/pkg/manager/config/config.go
@@ -32,6 +32,9 @@ const Host = "host"
const Port = "port"
const ExternalHost = "external_host"
+// i18n
+const Language = "language"
+
// Interface options
const SoundOnPreview = "sound_on_preview"
const WallShowTitle = "wall_show_title"
@@ -97,6 +100,17 @@ func GetExcludes() []string {
return viper.GetStringSlice(Exclude)
}
+func GetLanguage() string {
+ ret := viper.GetString(Language)
+
+ // default to English
+ if ret == "" {
+ return "en-US"
+ }
+
+ return ret
+}
+
func GetScrapersPath() string {
return viper.GetString(ScrapersPath)
}
diff --git a/ui/v2.5/.babelrc b/ui/v2.5/.babelrc
new file mode 100644
index 000000000..c14b2828d
--- /dev/null
+++ b/ui/v2.5/.babelrc
@@ -0,0 +1,3 @@
+{
+ "presets": ["react-app"]
+}
diff --git a/ui/v2.5/.editorconfig b/ui/v2.5/.editorconfig
new file mode 100644
index 000000000..86a63dc0f
--- /dev/null
+++ b/ui/v2.5/.editorconfig
@@ -0,0 +1,9 @@
+root = true
+
+[*]
+charset = utf-8
+end_of_line = lf
+indent_style = space
+indent_size = 2
+insert_final_newline = true
+trim_trailing_whitespace = true
diff --git a/ui/v2.5/.env b/ui/v2.5/.env
new file mode 100644
index 000000000..4b2b446bd
--- /dev/null
+++ b/ui/v2.5/.env
@@ -0,0 +1,2 @@
+BROWSER=none
+PORT=3001
diff --git a/ui/v2.5/.eslintrc.json b/ui/v2.5/.eslintrc.json
new file mode 100644
index 000000000..5718d6a31
--- /dev/null
+++ b/ui/v2.5/.eslintrc.json
@@ -0,0 +1,53 @@
+{
+ "parser": "@typescript-eslint/parser",
+ "parserOptions": {
+ "project": "./tsconfig.json"
+ },
+ "plugins": [
+ "@typescript-eslint"
+ ],
+ "extends": [
+ "airbnb-typescript",
+ "airbnb/hooks",
+ "prettier",
+ "prettier/react",
+ "prettier/@typescript-eslint"
+ ],
+ "rules": {
+ "@typescript-eslint/explicit-function-return-type": "off",
+ "@typescript-eslint/no-explicit-any": 2,
+ "lines-between-class-members": "off",
+ "@typescript-eslint/interface-name-prefix": [
+ "warn",
+ { "prefixWithI": "always" }
+ ],
+ "import/named": "off",
+ "import/namespace": "off",
+ "import/default": "off",
+ "import/no-named-as-default-member": "off",
+ "import/no-named-as-default": "off",
+ "import/no-cycle": "off",
+ "import/no-unused-modules": "off",
+ "import/no-deprecated": "off",
+ "import/no-unresolved": "off",
+ "import/prefer-default-export": "off",
+ "import/no-extraneous-dependencies": "off",
+ "indent": "off",
+ "@typescript-eslint/indent": "off",
+ "react/prop-types": "off",
+ "react/destructuring-assignment": "off",
+ "react/jsx-props-no-spreading": "off",
+ "spaced-comment": ["error", "always", {
+ "markers": ["/"]
+ }],
+ "max-classes-per-file": "off",
+ "no-plusplus": "off",
+ "prefer-destructuring": ["error", {"object": true, "array": false}],
+ "default-case": "off",
+ "consistent-return": "off",
+ "@typescript-eslint/no-use-before-define": ["error", { "functions": false, "classes": true }],
+ "no-underscore-dangle": "off",
+ "no-nested-ternary": "off",
+ "jsx-a11y/media-has-caption": "off"
+ }
+}
diff --git a/ui/v2.5/.gitignore b/ui/v2.5/.gitignore
new file mode 100755
index 000000000..d7b8f1bd7
--- /dev/null
+++ b/ui/v2.5/.gitignore
@@ -0,0 +1,25 @@
+# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
+
+# dependencies
+/node_modules
+/.pnp
+.pnp.js
+
+# testing
+/coverage
+
+# production
+/build
+
+# misc
+.DS_Store
+.env.local
+.env.development.local
+.env.test.local
+.env.production.local
+
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+
+.eslintcache
diff --git a/ui/v2.5/.stylelintrc b/ui/v2.5/.stylelintrc
new file mode 100644
index 000000000..f90195b09
--- /dev/null
+++ b/ui/v2.5/.stylelintrc
@@ -0,0 +1,96 @@
+{
+ "plugins": [
+ "stylelint-order"
+ ],
+ "rules": {
+ "indentation": 2,
+ "at-rule-empty-line-before": [ "always", {
+ except: ["after-same-name", "first-nested" ],
+ ignore: ["after-comment"],
+ } ],
+ "at-rule-no-vendor-prefix": true,
+ "selector-no-vendor-prefix": true,
+ "block-closing-brace-newline-after": "always",
+ "block-closing-brace-newline-before": "always-multi-line",
+ "block-closing-brace-space-before": "always-single-line",
+ "block-no-empty": true,
+ "block-opening-brace-newline-after": "always-multi-line",
+ "block-opening-brace-space-after": "always-single-line",
+ "block-opening-brace-space-before": "always",
+ "color-hex-case": "lower",
+ "color-hex-length": "short",
+ "color-no-invalid-hex": true,
+ "comment-empty-line-before": [ "always", {
+ except: ["first-nested"],
+ ignore: ["stylelint-commands"],
+ } ],
+ "comment-whitespace-inside": "always",
+ "declaration-bang-space-after": "never",
+ "declaration-bang-space-before": "always",
+ "declaration-block-no-shorthand-property-overrides": true,
+ "declaration-block-semicolon-newline-after": "always-multi-line",
+ "declaration-block-semicolon-space-after": "always-single-line",
+ "declaration-block-semicolon-space-before": "never",
+ "declaration-block-single-line-max-declarations": 1,
+ "declaration-block-trailing-semicolon": "always",
+ "declaration-colon-newline-after": "always-multi-line",
+ "declaration-colon-space-after": "always-single-line",
+ "declaration-colon-space-before": "never",
+ "declaration-no-important": true,
+ "font-family-name-quotes": "always-where-recommended",
+ "function-calc-no-unspaced-operator": true,
+ "function-comma-newline-after": "always-multi-line",
+ "function-comma-space-after": "always-single-line",
+ "function-comma-space-before": "never",
+ "function-linear-gradient-no-nonstandard-direction": true,
+ "function-parentheses-newline-inside": "always-multi-line",
+ "function-parentheses-space-inside": "never-single-line",
+ "function-url-quotes": "always",
+ "function-whitespace-after": "always",
+ "length-zero-no-unit": true,
+ "max-empty-lines": 1,
+ "max-nesting-depth": 4,
+ "max-line-length": 100,
+ "media-feature-colon-space-after": "always",
+ "media-feature-colon-space-before": "never",
+ "media-feature-range-operator-space-after": "always",
+ "media-feature-range-operator-space-before": "always",
+ "media-query-list-comma-newline-after": "always-multi-line",
+ "media-query-list-comma-space-after": "always-single-line",
+ "media-query-list-comma-space-before": "never",
+ "media-feature-parentheses-space-inside": "never",
+ "no-descending-specificity": null,
+ "no-invalid-double-slash-comments": true,
+ "no-missing-end-of-source-newline": true,
+ "number-leading-zero": "never",
+ "number-max-precision": 2,
+ "number-no-trailing-zeros": true,
+ "order/order": [
+ "custom-properties",
+ "declarations"
+ ],
+ "order/properties-alphabetical-order": true,
+ "rule-empty-line-before": ["always-multi-line", {
+ except: ["after-single-line-comment", "first-nested" ],
+ ignore: ["after-comment"],
+ }],
+ "selector-max-id": 1,
+ "selector-max-type": 2,
+ "selector-class-pattern": "^(\\.*[A-Z]*[a-z]+)+(-[a-z0-9]+)*$",
+ "selector-combinator-space-after": "always",
+ "selector-combinator-space-before": "always",
+ "selector-list-comma-newline-after": "always",
+ "selector-list-comma-space-before": "never",
+ "selector-max-universal": 0,
+ "selector-type-case": "lower",
+ "selector-pseudo-element-colon-notation": "double",
+ "string-no-newline": true,
+ "string-quotes": "double",
+ "time-min-milliseconds": 100,
+ "unit-blacklist": ["em"],
+ "value-list-comma-newline-after": "always-multi-line",
+ "value-list-comma-space-after": "always-single-line",
+ "value-list-comma-space-before": "never",
+ "value-no-vendor-prefix": true
+ },
+}
diff --git a/ui/v2.5/.vscode/launch.json b/ui/v2.5/.vscode/launch.json
new file mode 100644
index 000000000..a0b21cbef
--- /dev/null
+++ b/ui/v2.5/.vscode/launch.json
@@ -0,0 +1,18 @@
+{
+ // Use IntelliSense to learn about possible attributes.
+ // Hover to view descriptions of existing attributes.
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "type": "chrome",
+ "request": "launch",
+ "name": "Chrome",
+ "url": "http://localhost:3000",
+ "webRoot": "${workspaceFolder}/src",
+ "sourceMapPathOverrides": {
+ "webpack:///src/*": "${webRoot}/*"
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/ui/v2.5/.vscode/settings.json b/ui/v2.5/.vscode/settings.json
new file mode 100644
index 000000000..ba34e28f0
--- /dev/null
+++ b/ui/v2.5/.vscode/settings.json
@@ -0,0 +1,10 @@
+{
+ "typescript.tsdk": "node_modules/typescript/lib",
+ "editor.tabSize": 2,
+ "editor.renderWhitespace": "boundary",
+ "editor.wordWrap": "bounded",
+ "javascript.preferences.importModuleSpecifier": "relative",
+ "typescript.preferences.importModuleSpecifier": "relative",
+ "editor.wordWrapColumn": 120,
+ "editor.rulers": [120]
+}
\ No newline at end of file
diff --git a/ui/v2.5/README.md b/ui/v2.5/README.md
new file mode 100755
index 000000000..60f58b443
--- /dev/null
+++ b/ui/v2.5/README.md
@@ -0,0 +1,47 @@
+* Install gulp `yarn global add gulp`
+
+
+This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
+
+## Available Scripts
+
+In the project directory, you can run:
+
+### `npm start`
+
+Runs the app in the development mode.
+Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
+
+The page will reload if you make edits.
+You will also see any lint errors in the console.
+
+### `npm test`
+
+Launches the test runner in the interactive watch mode.
+See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
+
+### `npm run build`
+
+Builds the app for production to the `build` folder.
+It correctly bundles React in production mode and optimizes the build for the best performance.
+
+The build is minified and the filenames include the hashes.
+Your app is ready to be deployed!
+
+See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
+
+### `npm run eject`
+
+**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
+
+If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
+
+Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
+
+You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
+
+## Learn More
+
+You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
+
+To learn React, check out the [React documentation](https://reactjs.org/).
diff --git a/ui/v2.5/codegen.yml b/ui/v2.5/codegen.yml
new file mode 100644
index 000000000..dbab06402
--- /dev/null
+++ b/ui/v2.5/codegen.yml
@@ -0,0 +1,15 @@
+overwrite: true
+schema: "../../graphql/schema/**/*.graphql"
+documents: "../../graphql/documents/**/*.graphql"
+generates:
+ src/core/generated-graphql.tsx:
+ config:
+ withHooks: true
+ withHOC: false
+ withComponents: false
+ plugins:
+ - add: "/* eslint-disable */"
+ - time
+ - typescript
+ - typescript-operations
+ - typescript-react-apollo
diff --git a/ui/v2.5/package.json b/ui/v2.5/package.json
new file mode 100644
index 000000000..1a790570f
--- /dev/null
+++ b/ui/v2.5/package.json
@@ -0,0 +1,97 @@
+{
+ "name": "stash",
+ "version": "0.1.0",
+ "private": true,
+ "sideEffects": false,
+ "scripts": {
+ "start": "react-scripts start",
+ "build": "react-scripts build",
+ "test": "react-scripts test",
+ "eject": "react-scripts eject",
+ "lint": "yarn lint:css && yarn lint:js",
+ "lint:js": "eslint --cache src/**/*.{ts,tsx}",
+ "lint:css": "stylelint 'src/**/*.scss'",
+ "format": "prettier --write \"src/**/!(generated-graphql).{js,jsx,ts,tsx}\"",
+ "gqlgen": "gql-gen --config codegen.yml",
+ "extract": "NODE_ENV=development extract-messages -l=en,de -o src/locale -d en --flat false 'src/**/!(*.test).tsx'"
+ },
+ "browserslist": [
+ ">0.2%",
+ "not dead",
+ "not ie <= 11",
+ "not op_mini all"
+ ],
+ "dependencies": {
+ "@apollo/react-hooks": "^3.1.3",
+ "@fortawesome/fontawesome-svg-core": "^1.2.26",
+ "@fortawesome/free-solid-svg-icons": "^5.12.0",
+ "@fortawesome/react-fontawesome": "^0.1.8",
+ "apollo-cache": "^1.3.4",
+ "apollo-cache-inmemory": "^1.6.5",
+ "apollo-client": "^2.6.8",
+ "apollo-link": "^1.2.13",
+ "apollo-link-http": "^1.5.16",
+ "apollo-link-ws": "^1.0.19",
+ "apollo-utilities": "^1.3.3",
+ "axios": "0.18.1",
+ "bootstrap": "^4.4.1",
+ "classnames": "^2.2.6",
+ "formik": "^2.1.2",
+ "graphql": "^14.5.8",
+ "graphql-tag": "^2.10.1",
+ "localforage": "1.7.3",
+ "lodash": "^4.17.15",
+ "query-string": "6.10.1",
+ "react": "~16.12.0",
+ "react-apollo": "^3.1.3",
+ "react-bootstrap": "^1.0.0-beta.16",
+ "react-dom": "16.12.0",
+ "react-hotkeys": "^2.0.0",
+ "react-images": "0.5.19",
+ "react-intl": "^3.12.0",
+ "react-jw-player": "1.19.0",
+ "react-photo-gallery": "^8.0.0",
+ "react-router-bootstrap": "^0.25.0",
+ "react-router-dom": "^5.1.2",
+ "react-select": "^3.0.8",
+ "subscriptions-transport-ws": "^0.9.16",
+ "video.js": "^7.6.0"
+ },
+ "devDependencies": {
+ "@graphql-codegen/add": "^1.11.2",
+ "@graphql-codegen/cli": "^1.11.2",
+ "@graphql-codegen/time": "^1.11.2",
+ "@graphql-codegen/typescript": "^1.11.2",
+ "@graphql-codegen/typescript-compatibility": "^1.11.2",
+ "@graphql-codegen/typescript-operations": "^1.11.2",
+ "@graphql-codegen/typescript-react-apollo": "^1.11.2",
+ "@types/classnames": "^2.2.9",
+ "@types/jest": "24.0.13",
+ "@types/lodash": "^4.14.149",
+ "@types/node": "13.1.8",
+ "@types/react": "16.9.19",
+ "@types/react-dom": "^16.9.5",
+ "@types/react-images": "^0.5.1",
+ "@types/react-router-bootstrap": "^0.24.5",
+ "@types/react-router-dom": "5.1.3",
+ "@types/react-select": "^3.0.8",
+ "@types/video.js": "^7.2.11",
+ "@typescript-eslint/eslint-plugin": "^2.16.0",
+ "@typescript-eslint/parser": "^2.16.0",
+ "eslint": "^6.7.2",
+ "eslint-config-airbnb-typescript": "^6.3.1",
+ "eslint-config-prettier": "^6.9.0",
+ "eslint-plugin-import": "^2.20.0",
+ "eslint-plugin-jsx-a11y": "^6.2.3",
+ "eslint-plugin-react": "^7.18.0",
+ "eslint-plugin-react-hooks": "^1.7.0",
+ "extract-react-intl-messages": "^2.3.5",
+ "node-sass": "4.13.1",
+ "postcss-safe-parser": "^4.0.1",
+ "prettier": "1.19.1",
+ "react-scripts": "^3.3.1",
+ "stylelint": "^13.0.0",
+ "stylelint-order": "^4.0.0",
+ "typescript": "^3.7.5"
+ }
+}
diff --git a/ui/v2.5/public/favicon.ico b/ui/v2.5/public/favicon.ico
new file mode 100644
index 000000000..6ff0465ca
Binary files /dev/null and b/ui/v2.5/public/favicon.ico differ
diff --git a/ui/v2.5/public/index.html b/ui/v2.5/public/index.html
new file mode 100755
index 000000000..322bc1d11
--- /dev/null
+++ b/ui/v2.5/public/index.html
@@ -0,0 +1,41 @@
+
+
+