diff --git a/plugins/setting-assets/lang/cs.json b/plugins/setting-assets/lang/cs.json
index 43f8618c7dc..47517f5d935 100644
--- a/plugins/setting-assets/lang/cs.json
+++ b/plugins/setting-assets/lang/cs.json
@@ -197,6 +197,11 @@
"IntegrationIsUnstable": "Integrační služba má problémy. Některé funkce nemusí fungovat správně.",
"MinValue": "Minimální hodnota",
"MaxValue": "Maximální hodnota",
- "IntegerOnly": "Pouze celá čísla"
+ "IntegerOnly": "Pouze celá čísla",
+ "AccessControl": "Řízení přístupu",
+ "DangerZone": "Nebezpečná zóna",
+ "ApiAccess": "Přístup k API",
+ "ApiToken": "API token",
+ "GenerateApiToken": "Vygenerovat API token"
}
}
diff --git a/plugins/setting-assets/lang/de.json b/plugins/setting-assets/lang/de.json
index 2a41cbcb148..f71506cfba6 100644
--- a/plugins/setting-assets/lang/de.json
+++ b/plugins/setting-assets/lang/de.json
@@ -199,6 +199,11 @@
"IntegrationIsUnstable": "Der Integrationsdienst hat Probleme. Einige Funktionen funktionieren möglicherweise nicht richtig.",
"MinValue": "Minimalwert",
"MaxValue": "Maximalwert",
- "IntegerOnly": "Nur ganze Zahlen"
+ "IntegerOnly": "Nur ganze Zahlen",
+ "AccessControl": "Zugriffskontrolle",
+ "DangerZone": "Gefahrenzone",
+ "ApiAccess": "API-Zugriff",
+ "ApiToken": "API-Token",
+ "GenerateApiToken": "API-Token generieren"
}
}
diff --git a/plugins/setting-assets/lang/en.json b/plugins/setting-assets/lang/en.json
index 2aab6077414..e2d5ff25ced 100644
--- a/plugins/setting-assets/lang/en.json
+++ b/plugins/setting-assets/lang/en.json
@@ -199,6 +199,11 @@
"IntegrationIsUnstable": "Integration service is experiencing issues. Some features may not work properly.",
"MinValue": "Minimum value",
"MaxValue": "Maximum value",
- "IntegerOnly": "Integer numbers only"
+ "IntegerOnly": "Integer numbers only",
+ "AccessControl": "Access control",
+ "DangerZone": "Danger zone",
+ "ApiAccess": "API access",
+ "ApiToken": "API token",
+ "GenerateApiToken": "Generate API token"
}
}
diff --git a/plugins/setting-assets/lang/es.json b/plugins/setting-assets/lang/es.json
index e0e20d0a3f6..41ab01b2354 100644
--- a/plugins/setting-assets/lang/es.json
+++ b/plugins/setting-assets/lang/es.json
@@ -190,6 +190,11 @@
"IntegrationIsUnstable": "El servicio de integración está experimentando problemas. Es posible que algunas funciones no funcionen correctamente.",
"MinValue": "Valor mínimo",
"MaxValue": "Valor máximo",
- "IntegerOnly": "Solo números enteros"
+ "IntegerOnly": "Solo números enteros",
+ "AccessControl": "Control de acceso",
+ "DangerZone": "Zona de peligro",
+ "ApiAccess": "Acceso API",
+ "ApiToken": "Token API",
+ "GenerateApiToken": "Generar token API"
}
}
diff --git a/plugins/setting-assets/lang/fr.json b/plugins/setting-assets/lang/fr.json
index 4c6d4262d38..2a738bd64a9 100644
--- a/plugins/setting-assets/lang/fr.json
+++ b/plugins/setting-assets/lang/fr.json
@@ -199,6 +199,11 @@
"IntegrationIsUnstable": "Le service d'intégration rencontre des problèmes. Certaines fonctionnalités peuvent ne pas fonctionner correctement.",
"MinValue": "Valeur minimale",
"MaxValue": "Valeur maximale",
- "IntegerOnly": "Nombres entiers uniquement"
+ "IntegerOnly": "Nombres entiers uniquement",
+ "AccessControl": "Contrôle d'accès",
+ "DangerZone": "Zone dangereuse",
+ "ApiAccess": "Accès API",
+ "ApiToken": "Token API",
+ "GenerateApiToken": "Générer un token API"
}
}
diff --git a/plugins/setting-assets/lang/it.json b/plugins/setting-assets/lang/it.json
index 443521c7e10..d2382c5d8c5 100644
--- a/plugins/setting-assets/lang/it.json
+++ b/plugins/setting-assets/lang/it.json
@@ -199,6 +199,11 @@
"IntegrationIsUnstable": "L'integrazione è instabile. Alcune funzionalità potrebbero non funzionare correttamente.",
"MinValue": "Valore minimo",
"MaxValue": "Valore massimo",
- "IntegerOnly": "Solo numeri interi"
+ "IntegerOnly": "Solo numeri interi",
+ "AccessControl": "Controllo accessi",
+ "DangerZone": "Zona pericolosa",
+ "ApiAccess": "Accesso API",
+ "ApiToken": "Token API",
+ "GenerateApiToken": "Genera token API"
}
}
diff --git a/plugins/setting-assets/lang/ja.json b/plugins/setting-assets/lang/ja.json
index 3066a7f0641..bea50ca974e 100644
--- a/plugins/setting-assets/lang/ja.json
+++ b/plugins/setting-assets/lang/ja.json
@@ -199,6 +199,11 @@
"IntegrationIsUnstable": "統合サービスに問題が発生しています。一部の機能が正しく動作しない可能性があります。",
"MinValue": "最小値",
"MaxValue": "最大値",
- "IntegerOnly": "整数のみ"
+ "IntegerOnly": "整数のみ",
+ "AccessControl": "アクセス制御",
+ "DangerZone": "危険ゾーン",
+ "ApiAccess": "APIアクセス",
+ "ApiToken": "APIトークン",
+ "GenerateApiToken": "APIトークンを生成"
}
}
diff --git a/plugins/setting-assets/lang/pt.json b/plugins/setting-assets/lang/pt.json
index 8a035c42553..fb671c09c87 100644
--- a/plugins/setting-assets/lang/pt.json
+++ b/plugins/setting-assets/lang/pt.json
@@ -187,6 +187,14 @@
"Disconnected": "Desconectado",
"Available": "Disponível",
"NotConnectedIntegration": "A conta {account} não está integrada com o espaço de trabalho",
- "IntegrationIsUnstable": "O serviço de integração está enfrentando problemas. Algumas funcionalidades podem não funcionar corretamente."
+ "IntegrationIsUnstable": "O serviço de integração está enfrentando problemas. Algumas funcionalidades podem não funcionar corretamente.",
+ "MinValue": "Valor mínimo",
+ "MaxValue": "Valor máximo",
+ "IntegerOnly": "Apenas números inteiros",
+ "AccessControl": "Controle de acesso",
+ "DangerZone": "Zona de perigo",
+ "ApiAccess": "Acesso à API",
+ "ApiToken": "Token de API",
+ "GenerateApiToken": "Gerar token de API"
}
}
diff --git a/plugins/setting-assets/lang/ru.json b/plugins/setting-assets/lang/ru.json
index 63c1a5d8607..f72c2058c8b 100644
--- a/plugins/setting-assets/lang/ru.json
+++ b/plugins/setting-assets/lang/ru.json
@@ -199,6 +199,11 @@
"Disconnected": "Отключено",
"Available": "Доступно",
"NotConnectedIntegration": "Учетная запись {account} не интегрирована с рабочим пространством",
- "IntegrationIsUnstable": "Сервис интеграции испытывает проблемы. Некоторые функции могут работать некорректно."
+ "IntegrationIsUnstable": "Сервис интеграции испытывает проблемы. Некоторые функции могут работать некорректно.",
+ "AccessControl": "Контроль доступа",
+ "DangerZone": "Опасная зона",
+ "ApiAccess": "Доступ к API",
+ "ApiToken": "API токен",
+ "GenerateApiToken": "Создать API токен"
}
}
diff --git a/plugins/setting-assets/lang/tr.json b/plugins/setting-assets/lang/tr.json
index 56b726bdb2c..b05bfca09f4 100644
--- a/plugins/setting-assets/lang/tr.json
+++ b/plugins/setting-assets/lang/tr.json
@@ -199,6 +199,11 @@
"IntegrationIsUnstable": "Entegrasyon servisi sorunlar yaşıyor. Bazı özellikler düzgün çalışmayabilir.",
"MinValue": "Minimum değer",
"MaxValue": "Maksimum değer",
- "IntegerOnly": "Sadece tam sayılar"
+ "IntegerOnly": "Sadece tam sayılar",
+ "AccessControl": "Erişim kontrolü",
+ "DangerZone": "Tehlike bölgesi",
+ "ApiAccess": "API erişimi",
+ "ApiToken": "API token",
+ "GenerateApiToken": "API token oluştur"
}
}
diff --git a/plugins/setting-assets/lang/zh.json b/plugins/setting-assets/lang/zh.json
index a1af841d2f8..f1565044223 100644
--- a/plugins/setting-assets/lang/zh.json
+++ b/plugins/setting-assets/lang/zh.json
@@ -199,6 +199,11 @@
"IntegrationIsUnstable": "集成服务出现问题。某些功能可能无法正常工作。",
"MinValue": "最小值",
"MaxValue": "最大值",
- "IntegerOnly": "仅整数"
+ "IntegerOnly": "仅整数",
+ "AccessControl": "访问控制",
+ "DangerZone": "危险区域",
+ "ApiAccess": "API访问",
+ "ApiToken": "API令牌",
+ "GenerateApiToken": "生成API令牌"
}
}
diff --git a/plugins/setting-resources/src/components/ApiTokenPopup.svelte b/plugins/setting-resources/src/components/ApiTokenPopup.svelte
new file mode 100644
index 00000000000..7a4df4f4bc7
--- /dev/null
+++ b/plugins/setting-resources/src/components/ApiTokenPopup.svelte
@@ -0,0 +1,104 @@
+
+
+
+
+
+
diff --git a/plugins/setting-resources/src/components/Backup.svelte b/plugins/setting-resources/src/components/Backup.svelte
index 7fe2f66903a..a47ababddf2 100644
--- a/plugins/setting-resources/src/components/Backup.svelte
+++ b/plugins/setting-resources/src/components/Backup.svelte
@@ -172,7 +172,7 @@
{#if loading}
-
+
{:else if backupInfo == null}
diff --git a/plugins/setting-resources/src/components/General.svelte b/plugins/setting-resources/src/components/General.svelte
index 23d6d79c974..fd276a6d991 100644
--- a/plugins/setting-resources/src/components/General.svelte
+++ b/plugins/setting-resources/src/components/General.svelte
@@ -37,13 +37,12 @@
Header,
IconCheckmark,
IconClose,
- IconDelete,
IconEdit,
Label,
+ Loading,
navigate,
Scroller,
showPopup,
- Spinner,
themeStore,
Toggle
} from '@hcengineering/ui'
@@ -57,11 +56,13 @@
import communication, { GuestCommunicationSettings } from '@hcengineering/communication'
import card, { Card } from '@hcengineering/card'
import chat from '@hcengineering/chat'
+ import ApiTokenPopup from './ApiTokenPopup.svelte'
let loading = true
let isEditingName = false
let oldName: string
let name: string = ''
+ let workspaceUrl = ''
let allowReadOnlyGuests: boolean
let allowGuestSignUp: boolean
@@ -80,6 +81,7 @@
async function loadWorkspaceName (): Promise
{
const res = await accountClient.getWorkspaceInfo()
+ workspaceUrl = res.url
oldName = res.name
name = oldName
allowReadOnlyGuests = res.allowReadOnlyGuest ?? false
@@ -126,25 +128,26 @@
})
async function handleAvatarDone (): Promise {
- if (workspaceSettings === undefined) {
+ const existing = await client.findOne(settingsRes.class.WorkspaceSetting, { _id: settingsRes.ids.WorkspaceSetting })
+ if (existing !== undefined) {
const avatar = await avatarEditor.createAvatar()
+ // Remove old avatar if changed
+ if (existing.icon != null && existing.icon !== avatar.avatar) {
+ await avatarEditor.removeAvatar(existing.icon)
+ }
+
+ const icon = avatar.avatarType === AvatarType.IMAGE ? avatar.avatar : null
+ await client.diffUpdate(existing, { icon })
+ } else {
+ const avatar = await avatarEditor.createAvatar()
+
await client.createDoc(
settingsRes.class.WorkspaceSetting,
core.space.Workspace,
{ icon: avatar.avatar },
settingsRes.ids.WorkspaceSetting
)
- return
}
-
- const avatar = await avatarEditor.createAvatar()
- if (workspaceSettings.icon != null && workspaceSettings.icon !== avatar.avatar) {
- // Different avatar
- await avatarEditor.removeAvatar(workspaceSettings.icon)
- }
- await client.update(workspaceSettings, {
- icon: avatar.avatar
- })
}
const permissionConfigurationQuery = createQuery()
@@ -193,6 +196,11 @@
await accountClient.updateAllowGuestSignUp(e.detail)
}
+ async function handleGenerateApiToken (): Promise {
+ const { token } = await accountClient.selectWorkspace(workspaceUrl)
+ showPopup(ApiTokenPopup, { token })
+ }
+
function handleTogglePermissions (): void {
const newState = !arePermissionsDisabled
showPopup(MessageBox, {
@@ -268,11 +276,13 @@
{#if loading}
-
+
+
+
{:else}
@@ -280,10 +290,11 @@
{/if}
-
+
-
-
-
-
{
- void handleToggleReadonlyAccess(e)
- }}
- />
+
+
+
+
+
+ {
+ void handleToggleReadonlyAccess(e)
+ }}
+ />
+
+
+
+
+ {
+ void handleToggleGuestSignUp(e)
+ }}
+ />
+
+
+
+
+
+
-
-
-
{
- void handleToggleGuestSignUp(e)
- }}
- />
+
+
-
-
-
+
+
-
@@ -389,8 +429,4 @@
.editBox {
width: 16rem;
}
-
- .delete {
- width: 6rem;
- }
diff --git a/plugins/setting-resources/src/components/socialIds/SocialIdRow.svelte b/plugins/setting-resources/src/components/socialIds/SocialIdRow.svelte
index 9e335d615ae..c5a60468491 100644
--- a/plugins/setting-resources/src/components/socialIds/SocialIdRow.svelte
+++ b/plugins/setting-resources/src/components/socialIds/SocialIdRow.svelte
@@ -131,12 +131,6 @@
{/if}
-
- {#if canRelease}
-
-
-
- {/if}