Merge branch 'release/v2.0.0' of github.com:ONLYOFFICE/DocSpace-client into release/v2.0.0

This commit is contained in:
Nikita Gopienko 2023-11-08 17:52:54 +03:00
commit e19547d493
4 changed files with 241 additions and 46 deletions

184
.vscode/tasks.json vendored
View File

@ -1,63 +1,171 @@
{ {
"version": "2.0.0", "version": "2.0.0",
"problemMatcher": [], "problemMatcher": [],
"presentation": {
"focus": true,
"close": true
},
"tasks": [ "tasks": [
{ {
"label": "Frontend | Start", "label": "Backend | build EE",
"command": "cd ${workspaceFolder}/../ ; ${command:python.interpreterPath} buildtools/build.backend.docker.py",
"type": "shell", "type": "shell",
"command": "cd ${workspaceFolder} ; yarn start" "group": {
"kind": "build",
"isDefault": true
}, },
{ "presentation": {
"label": "Backend | Build", "reveal": "always",
"type": "shell", "panel": "new",
"command": "${workspaceFolder}/build/build.backend.docker.sh", "focus": true,
"windows": { "close": false
"command": "${workspaceFolder}\\build\\build.bat"
} }
}, },
{ {
"label": "Backend | Start", "label": "Backend | build CE",
"command": "cd ${workspaceFolder}/../ ; ${command:python.interpreterPath} buildtools/build.backend.docker.py -c",
"type": "shell", "type": "shell",
"command": "${workspaceFolder}/build/start/start.backend.docker.sh", "group": {
"windows": { "kind": "build",
"command": "${workspaceFolder}\\build\\start\\start.bat" "isDefault": true
},
"presentation": {
"reveal": "always",
"panel": "new",
"focus": true,
"close": false
} }
}, },
{ {
"label": "Backend | Restart", "label": "Backend | build SAAS",
"command": "cd ${workspaceFolder}/../ ; ${command:python.interpreterPath} buildtools/build.backend.docker.py -s",
"type": "shell", "type": "shell",
"command": "${workspaceFolder}/build/start/restart.backend.docker.sh", "group": {
"windows": { "kind": "build",
"command": "${workspaceFolder}\\build\\start\\restart.bat" "isDefault": true
},
"presentation": {
"reveal": "always",
"panel": "new",
"focus": true,
"close": false
} }
}, },
{ {
"label": "Backend | Stop", "label": "Backend | clear",
"command": "cd ${workspaceFolder}/../ ; ${command:python.interpreterPath} buildtools/clear.backend.docker.py",
"type": "shell", "type": "shell",
"command": "${workspaceFolder}/build/start/stop.backend.docker.sh", "group": {
"windows": { "kind": "build",
"command": "${workspaceFolder}\\build\\start\\stop.bat" "isDefault": true
},
"presentation": {
"reveal": "always",
"panel": "new",
"focus": true,
"close": false
} }
}
],
"inputs": [
{
"id": "start-param",
"description": "Command",
"default": "Start",
"type": "pickString",
"options": ["Start", "Restart", "Stop"]
}, },
{ {
"id": "local-docker", "label": "Backend | stop",
"description": "Manipulation", "command": "cd ${workspaceFolder}/../ ; ${command:python.interpreterPath} buildtools/start/stop.backend.docker.py",
"default": "Local", "type": "shell",
"type": "pickString", "group": {
"options": ["Local", "Docker"] "kind": "build",
"isDefault": true
},
"presentation": {
"reveal": "always",
"panel": "new",
"focus": true,
"close": false
}
},
{
"label": "Backend | restart",
"command": "cd ${workspaceFolder}/../ ; ${command:python.interpreterPath} buildtools/start/restart.backend.docker.py",
"type": "shell",
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"reveal": "always",
"panel": "new",
"focus": true,
"close": false
}
},
{
"label": "Backend | start",
"command": "cd ${workspaceFolder}/../ ; ${command:python.interpreterPath} buildtools/start/start.backend.docker.py",
"type": "shell",
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"reveal": "always",
"panel": "new",
"focus": true,
"close": false
}
},
{
"label": "Frontend | install",
"type": "shell",
"command": "cd ${workspaceFolder} ; yarn install",
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"reveal": "always",
"panel": "new",
"focus": true,
"close": false
}
},
{
"label": "Frontend | build",
"type": "shell",
"command": "cd ${workspaceFolder} ; yarn build",
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"reveal": "always",
"panel": "new",
"focus": true,
"close": false
}
},
{
"label": "Frontend | start",
"type": "shell",
"command": "cd ${workspaceFolder} ; yarn start",
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"reveal": "always",
"panel": "new",
"focus": true,
"close": false
}
},
{
"label": "Frontend | start-prod",
"type": "shell",
"command": "cd ${workspaceFolder} ; yarn start-prod",
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"reveal": "always",
"panel": "new",
"focus": true,
"close": false
}
} }
] ]
} }

View File

@ -41,13 +41,89 @@
], ],
"[javascript]": { "[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode" "editor.defaultFormatter": "esbenp.prettier-vscode"
},
"VsCodeTaskButtons.tasks": [
{
"label": "Server",
"tasks": [
{
"label": "Docker : Build-EE",
"task": "Backend | build EE",
"tooltip": "🛠️ Start the \"backend docker build EE\" task"
},
{
"label": "Docker : Build-CE",
"task": "Backend | build CE",
"tooltip": "🛠️ Start the \"backend docker build CE\" task"
},
{
"label": "Docker : Build-SAAS",
"task": "Backend | build SAAS",
"tooltip": "🛠️ Start the \"backend docker build SAAS\" task"
},
{
"label": "Docker : Clear",
"task": "Backend | clear",
"tooltip": "🛠️ Start the \"backend docker clear\" task"
},
{
"label": "Docker : Stop",
"task": "Backend | stop",
"tooltip": "🛠️ Start the \"backend docker stop\" task"
},
{
"label": "Docker : Start",
"task": "Backend | start",
"tooltip": "🛠️ Start the \"backend docker start\" task"
},
{
"label": "Docker : Restart",
"task": "Backend | restart",
"tooltip": "🛠️ Start the \"backend docker restart\" task"
} }
],
"tooltip": "🛠️ Server tasks"
},
{
"label": "Client",
"tasks": [
{
"label": "Install",
"task": "Frontend | install",
"tooltip": "🛠️ Start the \"frontend install packages\" task"
},
{
"label": "Build",
"task": "Frontend | build",
"tooltip": "🛠️ Start the \"frontend build\" task"
},
{
"label": "Start",
"task": "Frontend | start",
"tooltip": "🛠️ Start the \"frontend start\" task"
},
{
"label": "Start prod",
"task": "Frontend | start-prod",
"tooltip": "🛠️ Start the \"frontend start production\" task"
}
],
"tooltip": "🛠️ Client tasks"
}
]
}, },
"extensions": { "extensions": {
"recommendations": [ "recommendations": [
"folke.vscode-monorepo-workspace", "folke.vscode-monorepo-workspace",
"orta.vscode-jest", "orta.vscode-jest",
"firsttris.vscode-jest-runner" "firsttris.vscode-jest-runner",
"spencerwmiles.vscode-task-buttons",
"esbenp.prettier-vscode",
"formulahendry.auto-close-tag",
"formulahendry.auto-complete-tag",
"formulahendry.auto-rename-tag",
"mrmlnc.vscode-duplicate",
"ms-python.python"
] ]
} }
} }

View File

@ -57,7 +57,7 @@ const SecretKeyInput = (props) => {
name, name,
value, value,
onChange, onChange,
passwordSettings, PASSWORD_SETTINGS,
isPasswordValid, isPasswordValid,
setIsPasswordValid, setIsPasswordValid,
setIsResetVisible, setIsResetVisible,
@ -149,7 +149,7 @@ const SecretKeyInput = (props) => {
isDisableTooltip={true} isDisableTooltip={true}
inputType="password" inputType="password"
isFullWidth={true} isFullWidth={true}
passwordSettings={passwordSettings} passwordSettings={PASSWORD_SETTINGS}
key={passwordInputKey} key={passwordInputKey}
/> />
<Link <Link
@ -166,12 +166,12 @@ const SecretKeyInput = (props) => {
); );
}; };
export default inject(({ auth }) => { export default inject(({ auth, webhooksStore }) => {
const { passwordSettings } = auth.settingsStore;
const { webhooksGuideUrl } = auth.settingsStore; const { webhooksGuideUrl } = auth.settingsStore;
const { PASSWORD_SETTINGS } = webhooksStore;
return { return {
passwordSettings,
webhooksGuideUrl, webhooksGuideUrl,
PASSWORD_SETTINGS,
}; };
})(observer(SecretKeyInput)); })(observer(SecretKeyInput));

View File

@ -25,6 +25,17 @@ class WebhooksStore {
isRetryPending = false; isRetryPending = false;
configName = ""; configName = "";
PASSWORD_SETTINGS = {
"minLength": 12,
"allowedCharactersRegexStr": "[\\x21-\\x7E]",
"upperCase": true,
"digits": true,
"digitsRegexStr": "(?=.*\\d)",
"upperCaseRegexStr": "(?=.*[A-Z])",
"specSymbols": false,
"specSymbolsRegexStr": "(?=.*[\\x21-\\x2F\\x3A-\\x40\\x5B-\\x60\\x7B-\\x7E])"
}
constructor(authStore) { constructor(authStore) {
makeAutoObservable(this); makeAutoObservable(this);