Compare commits

..
Author SHA1 Message Date
Etienne 3516703144 fix 2026-02-19 10:28:26 +01:00
Etienne 31111faeb9 fix 2026-02-19 09:41:12 +01:00
db9636bd9e i18n - docs translations (#18067)
Created by Github action

Co-authored-by: github-actions <github-actions@twenty.com>
2026-02-19 02:07:09 +01:00
4 changed files with 29 additions and 27 deletions
@@ -497,7 +497,7 @@ export default defineLogicFunction({
安装后函数是在你的应用安装到工作区后自动运行的逻辑函数。 这对于一次性设置任务很有用,例如填充默认数据、创建初始记录或配置工作区设置。
When you scaffold a new app with `create-twenty-app`, a post-install function is generated for you at `src/logic-functions/post-install.ts`:
当你使用 `create-twenty-app` 脚手架创建一个新应用时,会在 `src/logic-functions/post-install.ts` 为你生成一个安装后函数:
```typescript
// src/logic-functions/post-install.ts
@@ -518,7 +518,7 @@ export default defineLogicFunction({
});
```
The function is wired into your app by referencing its universal identifier in `application-config.ts`:
通过在 `application-config.ts` 中引用其通用标识符,可将该函数接入你的应用:
```typescript
import { POST_INSTALL_UNIVERSAL_IDENTIFIER } from 'src/logic-functions/post-install';
@@ -17,12 +17,12 @@ import { ActivityList } from '@/activities/components/ActivityList';
import { useHasPermissionFlag } from '@/settings/roles/hooks/useHasPermissionFlag';
import { useModal } from '@/ui/layout/modal/hooks/useModal';
import { ScrollWrapper } from '@/ui/utilities/scroll/components/ScrollWrapper';
import { assertIsDefinedOrThrow } from 'twenty-shared/utils';
import { assertIsDefinedOrThrow, isDefined } from 'twenty-shared/utils';
import { IconDownload, IconX } from 'twenty-ui/display';
import { IconButton } from 'twenty-ui/input';
import {
PermissionFlagType,
FeatureFlagKey,
PermissionFlagType,
} from '~/generated-metadata/graphql';
import { AttachmentRow } from './AttachmentRow';
@@ -212,15 +212,20 @@ export const AttachmentList = ({
/>
) : (
<ActivityList>
{attachments.map((attachment) => (
<AttachmentRow
key={attachment.id}
attachment={attachment}
onPreview={
isAttachmentPreviewEnabled ? handlePreview : undefined
}
/>
))}
{attachments
.filter(
(attachment) =>
!isFilesFieldMigrated || isDefined(attachment.file?.[0]),
)
.map((attachment) => (
<AttachmentRow
key={attachment.id}
attachment={attachment}
onPreview={
isAttachmentPreviewEnabled ? handlePreview : undefined
}
/>
))}
</ActivityList>
)}
</StyledDropZoneContainer>
@@ -22,8 +22,8 @@ import { useHasPermissionFlag } from '@/settings/roles/hooks/useHasPermissionFla
import { IconCalendar, OverflowingTextWithTooltip } from 'twenty-ui/display';
import { isNavigationModifierPressed } from 'twenty-ui/utilities';
import {
PermissionFlagType,
FeatureFlagKey,
PermissionFlagType,
} from '~/generated-metadata/graphql';
import { formatToHumanReadableDate } from '~/utils/date-utils';
import { getFileNameAndExtension } from '~/utils/file/getFileNameAndExtension';
@@ -96,7 +96,11 @@ export const AttachmentRow = ({
);
const { name: originalFileName, extension: attachmentFileExtension } =
getFileNameAndExtension(attachment.name);
getFileNameAndExtension(
isFilesFieldMigrated
? (attachment.file?.[0]?.label as string)
: attachment.name,
);
const [attachmentFileName, setAttachmentFileName] =
useState(originalFileName);
@@ -206,7 +210,9 @@ export const AttachmentRow = ({
target="_blank"
rel="noopener noreferrer"
>
<OverflowingTextWithTooltip text={attachment.name} />
<OverflowingTextWithTooltip
text={`${attachmentFileName}${attachmentFileExtension}`}
/>
</StyledLink>
</StyledLinkContainer>
)}
@@ -4,7 +4,7 @@ import {
ApolloLink,
type FetchResult,
fromPromise,
Observable,
type Observable,
type Operation,
type ServerError,
type ServerParseError,
@@ -181,16 +181,7 @@ export class ApolloFactory<TCacheShape> implements ApolloManager<TCacheShape> {
});
}
return fromPromise(renewalPromise).flatMap(() => {
// If token pair is not available after renewal attempt,
// don't retry the operation — renewal has failed and the
// user has already been redirected to the sign-in page.
if (isUndefinedOrNull(getTokenPair())) {
return new Observable<FetchResult>(() => {});
}
return forward(operation);
});
return fromPromise(renewalPromise).flatMap(() => forward(operation));
};
const sendToSentry = ({