diff --git a/README.md b/README.md index 3fb5866445..48d5b15082 100644 --- a/README.md +++ b/README.md @@ -134,12 +134,10 @@ Before you can begin, you need to create a workspace and an account and associat ```bash cd ./tool # dev/tool in the repository root -rushx run-local create-workspace ws1 -w DevWorkspace # Create workspace rushx run-local create-account user1 -p 1234 -f John -l Appleseed # Create account -rushx run-local configure ws1 --list --enable '*' # Enable all modules, even if they are not yet intended to be used by a wide audience. -rushx run-local assign-workspace user1 ws1 # Assign workspace to user. -rushx run-local confirm-email user1 # To allow the creation of additional test workspaces. - +rushx run-local create-workspace ws1 email:user1 # Create workspace +rushx run-local configure ws1 --list --enable '*' # Enable all modules, even if they are not yet intended to be used by a wide audience +rushx run-local assign-workspace user1 ws1 # Assign user to workspace ``` Alternatively, you can just execute: diff --git a/dev/tool/package.json b/dev/tool/package.json index e62c42b455..8572286258 100644 --- a/dev/tool/package.json +++ b/dev/tool/package.json @@ -21,7 +21,7 @@ "docker:staging": "../../common/scripts/docker_tag.sh hardcoreeng/tool staging", "docker:push": "../../common/scripts/docker_tag.sh hardcoreeng/tool", "run-local": "rush bundle --to @hcengineering/tool >/dev/null && cross-env SERVER_SECRET=secret FULLTEXT_URL=http://localhost:4700 ACCOUNTS_URL=http://localhost:3000 TRANSACTOR_URL=ws://localhost:3333 MINIO_ACCESS_KEY=minioadmin MINIO_SECRET_KEY=minioadmin MINIO_ENDPOINT=localhost ACCOUNT_DB_URL=mongodb://localhost:27017 DB_URL=mongodb://localhost:27017 TELEGRAM_DATABASE=telegram-service REKONI_URL=http://localhost:4004 MODEL_VERSION=$(node ../../common/scripts/show_version.js) GIT_REVISION=$(git describe --all --long) node --expose-gc --max-old-space-size=18000 ./bundle/bundle.js", - "run-local-cr": "rush bundle --to @hcengineering/tool >/dev/null && cross-env SERVER_SECRET=secret FULLTEXT_URL=http://localhost:4702 ACCOUNTS_URL=http://localhost:3000 TRANSACTOR_URL=ws://localhost:3332 MINIO_ACCESS_KEY=minioadmin MINIO_SECRET_KEY=minioadmin MINIO_ENDPOINT=localhost ACCOUNT_DB_URL=mongodb://localhost:27017 DB_URL=postgresql://root@host.docker.internal:26257/defaultdb?sslmode=disable TELEGRAM_DATABASE=telegram-service REKONI_URL=http://localhost:4004 MODEL_VERSION=$(node ../../common/scripts/show_version.js) GIT_REVISION=$(git describe --all --long) node --expose-gc --max-old-space-size=18000 ./bundle/bundle.js", + "run-local-cr": "rush bundle --to @hcengineering/tool >/dev/null && cross-env SERVER_SECRET=secret FULLTEXT_URL=http://localhost:4702 ACCOUNTS_URL=http://localhost:3000 TRANSACTOR_URL=ws://localhost:3332 MINIO_ACCESS_KEY=minioadmin MINIO_SECRET_KEY=minioadmin MINIO_ENDPOINT=localhost ACCOUNT_DB_URL=mongodb://localhost:27017 DB_URL=postgresql://root@host.docker.internal:26257/defaultdb?sslmode=disable TELEGRAM_DATABASE=telegram-service REKONI_URL=http://localhost:4004 MODEL_VERSION=$(node ../../common/scripts/show_version.js) GIT_REVISION=$(git describe --all --long) node --expose-gc --max-old-space-size=18000 $TOOL_OPT ./bundle/bundle.js", "run-local-brk": "rush bundle --to @hcengineering/tool >/dev/null && cross-env SERVER_SECRET=secret ACCOUNTS_URL=http://localhost:3000 TRANSACTOR_URL=ws://localhost:3333 MINIO_ACCESS_KEY=minioadmin MINIO_SECRET_KEY=minioadmin MINIO_ENDPOINT=localhost ACCOUNT_DB_URL=mongodb://localhost:27017 DB_URL=mongodb://localhost:27017 TELEGRAM_DATABASE=telegram-service REKONI_URL=http://localhost:4004 MODEL_VERSION=$(node ../../common/scripts/show_version.js) GIT_REVISION=$(git describe --all --long) node --inspect-brk --enable-source-maps --max-old-space-size=18000 ./bundle/bundle.js", "run": "rush bundle --to @hcengineering/tool >/dev/null && cross-env node --max-old-space-size=8000 ./bundle/bundle.js", "upgrade": "rushx run-local upgrade", diff --git a/models/mail/src/index.ts b/models/mail/src/index.ts index f9c0a5f5e5..b44ca4f405 100644 --- a/models/mail/src/index.ts +++ b/models/mail/src/index.ts @@ -18,10 +18,10 @@ import core, { IndexKind } from '@hcengineering/core' import { type Builder, Index, Model, Prop, TypeString, UX } from '@hcengineering/model' import contact from '@hcengineering/model-contact' import view from '@hcengineering/model-view' -import { TChunterSpace } from '@hcengineering/model-chunter' +import { TChunterSpace, TChatMessage } from '@hcengineering/model-chunter' import chunter from '@hcengineering/chunter' -import mail, { type MailThread } from '@hcengineering/mail' +import mail, { type MailThread, type MailMessage } from '@hcengineering/mail' export { mailId } from '@hcengineering/mail' export { default } from './plugin' @@ -49,8 +49,16 @@ export class TMailThread extends TChunterSpace implements MailThread { preview!: string } +@Model(mail.class.MailMessage, chunter.class.ChatMessage) +@UX(mail.string.MailMessage, undefined, undefined, undefined, undefined, mail.string.MailMessages) +export class TMailMessage extends TChatMessage implements MailMessage { + @Prop(TypeString(), mail.string.MailId) + @Index(IndexKind.Indexed) + mailId!: string +} + export function createModel (builder: Builder): void { - builder.createModel(TMailThread) + builder.createModel(TMailThread, TMailMessage) builder.mixin(mail.class.MailThread, core.class.Class, activity.mixin.ActivityDoc, {}) diff --git a/models/my-space/src/index.ts b/models/my-space/src/index.ts index 4cb8f3de63..2bcd483d8f 100644 --- a/models/my-space/src/index.ts +++ b/models/my-space/src/index.ts @@ -52,6 +52,9 @@ export function createModel (builder: Builder): void { label: mySpace.string.Mail, createLabel: mail.string.CreateMail, createComponent: mail.component.CreateMail + }, + queryOptions: { + filterBySpace: true } } ] diff --git a/models/server-card/src/index.ts b/models/server-card/src/index.ts index f26ef63727..9fe22a9a47 100644 --- a/models/server-card/src/index.ts +++ b/models/server-card/src/index.ts @@ -32,6 +32,15 @@ export function createModel (builder: Builder): void { } }) + builder.createDoc(serverCore.class.Trigger, core.space.Model, { + trigger: serverCard.trigger.OnMasterTagRemove, + isAsync: true, + txMatch: { + _class: core.class.TxRemoveDoc, + objectClass: card.class.MasterTag + } + }) + builder.mixin(card.class.Card, core.class.Class, serverCore.mixin.SearchPresenter, { searchIcon: card.icon.Card, title: [['title']] diff --git a/models/training/src/index.ts b/models/training/src/index.ts index fc25f209de..dcd9c2e091 100644 --- a/models/training/src/index.ts +++ b/models/training/src/index.ts @@ -16,7 +16,7 @@ import activity from '@hcengineering/activity' import notification, { type NotificationType } from '@hcengineering/notification' import { type Asset, type IntlString } from '@hcengineering/platform' -import type { BuildModelKey, Viewlet, ViewletDescriptor } from '@hcengineering/view' +import type { BuildModelKey, KeyFilterPreset, Viewlet, ViewletDescriptor } from '@hcengineering/view' import questions from '@hcengineering/model-questions' import contact from '@hcengineering/contact' import tracker from '@hcengineering/model-tracker' @@ -659,9 +659,19 @@ function defineTrainingAttempt (builder: Builder): void { sortingKey: 'state', displayProps: { align: 'center' } } - const columnOwner: BuildModelKey = { - ...columns.owner, - key: 'owner' + const columnTrainee: BuildModelKey = { + key: 'owner', + label: training.string.TrainingRequestTrainee, + presenter: contacts.component.EmployeePresenter, + props: { shouldShowName: true }, + displayProps: { align: 'center' } + } + + const columnTraineeFilter: KeyFilterPreset = { + _class: training.class.TrainingAttempt, + component: contacts.component.EmployeeFilter, + key: 'owner', + label: training.string.TrainingRequestTrainee } defineTableBrowserViewletDescriptor( @@ -693,7 +703,7 @@ function defineTrainingAttempt (builder: Builder): void { columnScore, 'createdOn', 'submittedOn', - columnOwner + columnTrainee ], configOptions: { strict: true, @@ -720,7 +730,7 @@ function defineTrainingAttempt (builder: Builder): void { }) builder.mixin(training.class.TrainingAttempt, core.class.Class, view.mixin.ClassFilters, { - filters: ['state', 'owner', 'submittedOn'] as Array, + filters: ['state', 'submittedOn', columnTraineeFilter] as Array, strict: true }) diff --git a/packages/account-client/src/client.ts b/packages/account-client/src/client.ts index 0958eeb884..dfc8e64f33 100644 --- a/packages/account-client/src/client.ts +++ b/packages/account-client/src/client.ts @@ -48,7 +48,8 @@ export interface AccountClient { restorePassword: (password: string) => Promise confirm: () => Promise requestPasswordReset: (email: string) => Promise - sendInvite: (email: string, role?: AccountRole) => Promise + sendInvite: (email: string, role: AccountRole) => Promise + resendInvite: (email: string, role: AccountRole) => Promise leaveWorkspace: (account: string) => Promise changeUsername: (first: string, last: string) => Promise changePassword: (oldPassword: string, newPassword: string) => Promise @@ -255,7 +256,7 @@ class AccountClientImpl implements AccountClient { await this.rpc(request) } - async sendInvite (email: string, role?: AccountRole): Promise { + async sendInvite (email: string, role: AccountRole): Promise { const request = { method: 'sendInvite' as const, params: [email, role] @@ -264,6 +265,15 @@ class AccountClientImpl implements AccountClient { await this.rpc(request) } + async resendInvite (email: string, role: AccountRole): Promise { + const request = { + method: 'resendInvite' as const, + params: [email, role] + } + + await this.rpc(request) + } + async leaveWorkspace (account: string): Promise { const request = { method: 'leaveWorkspace' as const, diff --git a/packages/presentation/src/components/ActionContext.svelte b/packages/presentation/src/components/ActionContext.svelte index f6926950de..c5e86e3001 100644 --- a/packages/presentation/src/components/ActionContext.svelte +++ b/packages/presentation/src/components/ActionContext.svelte @@ -13,37 +13,43 @@ // limitations under the License. --> diff --git a/packages/text/src/kits/default-kit.ts b/packages/text/src/kits/default-kit.ts index 56aea0a518..30d78e7dad 100644 --- a/packages/text/src/kits/default-kit.ts +++ b/packages/text/src/kits/default-kit.ts @@ -56,7 +56,7 @@ export const DefaultKit = Extension.create({ }), Typography.configure({}), Link.extend({ inclusive: false }).configure({ - openOnClick: true, + openOnClick: false, HTMLAttributes: { class: 'cursor-pointer', rel: 'noopener noreferrer', target: '_blank' } }) ] diff --git a/packages/theme/styles/_colors.scss b/packages/theme/styles/_colors.scss index 6fc0a2c934..e1110ddc22 100644 --- a/packages/theme/styles/_colors.scss +++ b/packages/theme/styles/_colors.scss @@ -68,9 +68,9 @@ --text-editor-selected-node-background: rgba(43, 81, 144, 0.1); --text-editor-selected-node-color: #93CAF3; - --text-editor-highlighted-node-warning-active-background-color: #F2D7AE; - --text-editor-highlighted-node-warning-background-color: #F8EBD7; - --text-editor-highlighted-node-warning-border-color: #DE9B35; + --text-editor-highlighted-node-warning-active-background-color: rgba(255, 203, 0, .24); + --text-editor-highlighted-node-warning-background-color: rgba(255, 203, 0, .12); + --text-editor-highlighted-node-warning-border-color: rgba(255, 203, 0, .35); --text-editor-highlighted-node-add-background-color: #DAEDDC; --text-editor-highlighted-node-add-font-color: #1C4220; diff --git a/packages/theme/styles/_text-editor.scss b/packages/theme/styles/_text-editor.scss index c546f3cebf..20f56a6045 100644 --- a/packages/theme/styles/_text-editor.scss +++ b/packages/theme/styles/_text-editor.scss @@ -323,7 +323,9 @@ .text-editor-highlighted-node-warning { background-color: var(--text-editor-highlighted-node-warning-background-color); - border-bottom: 0.0625rem solid var(--text-editor-highlighted-node-warning-border-color); + border-bottom: 2px solid var(--text-editor-highlighted-node-warning-border-color); + padding-bottom: 2px; + transition: background 0.2s ease, border 0.2s ease; &.text-editor-highlighted-node-selected, &:hover { background-color: var(--text-editor-highlighted-node-warning-active-background-color); diff --git a/plugins/card-resources/src/components/TagsEditor.svelte b/plugins/card-resources/src/components/TagsEditor.svelte index e60d0fa236..6a5ebc9d6c 100644 --- a/plugins/card-resources/src/components/TagsEditor.svelte +++ b/plugins/card-resources/src/components/TagsEditor.svelte @@ -16,21 +16,20 @@ --> {#if $controlledDocument !== null} diff --git a/plugins/controlled-documents-resources/src/styles/_colors.scss b/plugins/controlled-documents-resources/src/styles/_colors.scss index 4d0e1ef26a..44e6db6f7a 100644 --- a/plugins/controlled-documents-resources/src/styles/_colors.scss +++ b/plugins/controlled-documents-resources/src/styles/_colors.scss @@ -17,8 +17,7 @@ .theme-dark { --theme-docs-contrast-color: #ffffff; --theme-docs-description-border-color: rgba(0, 0, 0, 0.2); - --theme-docs-frozen-description-color: #e7f2f3; - --theme-docs-comment-highlighted-color: #fefbf1; + --theme-docs-comment-highlighted-color: var(--theme-comp-header-color); --theme-docs-warning-color: rgba(222, 155, 53, 0.08); --theme-docs-warning-icon-color: #d27540; --theme-docs-accepted-color: #38833f; @@ -28,8 +27,7 @@ .theme-light { --theme-docs-contrast-color: #000000; --theme-docs-description-border-color: rgba(0, 0, 0, 0.2); - --theme-docs-frozen-description-color: #e7f2f3; - --theme-docs-comment-highlighted-color: #fefbf1; + --theme-docs-comment-highlighted-color: var(--theme-comp-header-color); --theme-docs-warning-color: rgba(222, 155, 53, 0.08); --theme-docs-warning-icon-color: #d27540; --theme-docs-accepted-color: #38833f; diff --git a/plugins/login-assets/lang/cs.json b/plugins/login-assets/lang/cs.json index 9babbe924d..2db38da02d 100644 --- a/plugins/login-assets/lang/cs.json +++ b/plugins/login-assets/lang/cs.json @@ -52,6 +52,8 @@ "CanFindCode": "Nemůžete najít svůj kód? Zkontrolujte složku nevyžádané pošty.", "LoginWithPassword": "Přihlásit se pomocí hesla", "LoginWithCode": "Přihlásit se pomocí kódu", + "SignUpWithPassword": "Registrace pomocí hesla", + "SignUpWithCode": "Registrace pomocí kódu", "FillInProfile": "Vyplňte svůj profil", "SetUpPassword": "Nastavte si heslo", "Next": "Další", diff --git a/plugins/login-assets/lang/de.json b/plugins/login-assets/lang/de.json index 9d81a390b4..626419f5dd 100644 --- a/plugins/login-assets/lang/de.json +++ b/plugins/login-assets/lang/de.json @@ -52,6 +52,8 @@ "CanFindCode": "Code nicht gefunden? Überprüfen Sie Ihren Spam-Ordner.", "LoginWithPassword": "Mit Passwort anmelden", "LoginWithCode": "Mit Code anmelden", + "SignUpWithPassword": "Mit Passwort registrieren", + "SignUpWithCode": "Mit Code registrieren", "FillInProfile": "Profil ausfüllen", "SetUpPassword": "Passwort einrichten", "Next": "Weiter", diff --git a/plugins/login-assets/lang/en.json b/plugins/login-assets/lang/en.json index e7893ad4cc..ba230573ec 100644 --- a/plugins/login-assets/lang/en.json +++ b/plugins/login-assets/lang/en.json @@ -51,6 +51,8 @@ "CanFindCode": "Can't find your code? Check your spam folder.", "LoginWithPassword": "Login with password", "LoginWithCode": "Login with code", + "SignUpWithPassword": "Sign up with password", + "SignUpWithCode": "Sign up with code", "FillInProfile": "Fill in your profile", "SetUpPassword": "Set up your password", "Next": "Next", diff --git a/plugins/login-assets/lang/es.json b/plugins/login-assets/lang/es.json index 42cfbd3116..7a051528c0 100644 --- a/plugins/login-assets/lang/es.json +++ b/plugins/login-assets/lang/es.json @@ -51,6 +51,8 @@ "CanFindCode": "¿No encuentras tu código? Revisa tu", "LoginWithPassword": "Iniciar sesión con contraseña", "LoginWithCode": "Iniciar sesión con código", + "SignUpWithPassword": "Registrarse con contraseña", + "SignUpWithCode": "Registrarse con código", "FillInProfile": "Rellena tu perfil", "SetUpPassword": "Establecer tu contraseña", "Next": "Siguiente", diff --git a/plugins/login-assets/lang/fr.json b/plugins/login-assets/lang/fr.json index 7f9609e6b5..7e3e9876be 100644 --- a/plugins/login-assets/lang/fr.json +++ b/plugins/login-assets/lang/fr.json @@ -51,6 +51,8 @@ "CanFindCode": "Vous ne trouvez pas votre code ? Vérifiez votre", "LoginWithPassword": "Connexion avec mot de passe", "LoginWithCode": "Connexion avec code", + "SignUpWithPassword": "Inscrivez-vous avec votre mot de passe", + "SignUpWithCode": "Inscrivez-vous avec votre code", "FillInProfile": "Remplissez votre profil", "SetUpPassword": "Définir votre mot de passe", "Next": "Suivant", diff --git a/plugins/login-assets/lang/it.json b/plugins/login-assets/lang/it.json index e36badaf7a..05048983a4 100644 --- a/plugins/login-assets/lang/it.json +++ b/plugins/login-assets/lang/it.json @@ -51,6 +51,8 @@ "CanFindCode": "Non riesci a trovare il tuo codice? Controlla la tua cartella spam.", "LoginWithPassword": "Accedi con la password", "LoginWithCode": "Accedi con il codice", + "SignUpWithPassword": "Registrati con la password", + "SignUpWithCode": "Registrati con il codice", "FillInProfile": "Compila il tuo profilo", "SetUpPassword": "Imposta la tua password", "Next": "Avanti", diff --git a/plugins/login-assets/lang/pt.json b/plugins/login-assets/lang/pt.json index 428d222888..490dea877b 100644 --- a/plugins/login-assets/lang/pt.json +++ b/plugins/login-assets/lang/pt.json @@ -51,6 +51,8 @@ "CanFindCode": "Não encontra o seu código? Verifique a sua pasta de spam.", "LoginWithPassword": "Iniciar sessão com palavra-passe", "LoginWithCode": "Iniciar sessão com código", + "SignUpWithPassword": "Registar com palavra-passe", + "SignUpWithCode": "Registar com código", "FillInProfile": "Preencha o seu perfil", "SetUpPassword": "Definir a sua palavra-passe", "Next": "Seguinte", diff --git a/plugins/login-assets/lang/ru.json b/plugins/login-assets/lang/ru.json index 9d0ddc383d..32462c77e8 100644 --- a/plugins/login-assets/lang/ru.json +++ b/plugins/login-assets/lang/ru.json @@ -51,6 +51,8 @@ "CanFindCode": "Не нашли код? Проверьте папку со спамом.", "LoginWithPassword": "Войти с паролем", "LoginWithCode": "Войти с кодом", + "SignUpWithPassword": "Регистрация с паролем", + "SignUpWithCode": "Регистрация с кодом", "FillInProfile": "Заполните профиль", "SetUpPassword": "Установите пароль", "Next": "Дальше", diff --git a/plugins/login-assets/lang/zh.json b/plugins/login-assets/lang/zh.json index 04ca2aa0d0..c76526186e 100644 --- a/plugins/login-assets/lang/zh.json +++ b/plugins/login-assets/lang/zh.json @@ -51,6 +51,8 @@ "CanFindCode": "找不到验证码?请检查您的垃圾邮件文件夹。", "LoginWithPassword": "使用密码登录", "LoginWithCode": "使用代码登录", + "SignUpWithPassword": "注册密码", + "SignUpWithCode": "注册代码", "FillInProfile": "填写您的个人资料", "SetUpPassword": "设置您的密码", "Next": "下一个", diff --git a/plugins/login-resources/src/components/Form.svelte b/plugins/login-resources/src/components/Form.svelte index d9502141d1..2972bdb746 100644 --- a/plugins/login-resources/src/components/Form.svelte +++ b/plugins/login-resources/src/components/Form.svelte @@ -86,6 +86,10 @@ return true }) + export function invalidate (): void { + void validate($themeStore.language) + } + $: if ($themeStore.language != null && $themeStore.language !== '') { void validate($themeStore.language) } diff --git a/plugins/login-resources/src/components/LoginApp.svelte b/plugins/login-resources/src/components/LoginApp.svelte index 442012091c..fee0cc9f1c 100644 --- a/plugins/login-resources/src/components/LoginApp.svelte +++ b/plugins/login-resources/src/components/LoginApp.svelte @@ -143,7 +143,7 @@ {#if page === 'login'} {:else if page === 'signup'} - + {:else if page === 'createWorkspace'} {:else if page === 'password'} diff --git a/plugins/login-resources/src/components/OtpForm.svelte b/plugins/login-resources/src/components/OtpForm.svelte index 25d3dbe1d2..0e47f81ce6 100644 --- a/plugins/login-resources/src/components/OtpForm.svelte +++ b/plugins/login-resources/src/components/OtpForm.svelte @@ -29,6 +29,7 @@ export let email: string export let retryOn: Timestamp export let signUpDisabled = false + export let loginState: 'login' | 'signup' | 'none' = 'none' const dispatch = createEventDispatcher() @@ -233,7 +234,7 @@ style:min-height={$deviceInfo.docHeight > 720 ? '42rem' : '0'} >
- +