Skip to content

Commit

Permalink
fix: the gallery card could not render the link (#1070)
Browse files Browse the repository at this point in the history
* fix: the gallery card could not render the link

* feat: update usage feature limit

* chore: update icons
  • Loading branch information
Sky-FE authored Nov 8, 2024
1 parent 80e1ddb commit 555bcc4
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/icons/src/components/Condition.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const Condition = (props: SVGProps<SVGSVGElement>) => (
>
<path
fill="currentColor"
d="m20.589 6.429-.001 10.285h2.555l-3.429 3.429-3.428-3.429h2.554V8.143H16.2a4.3 4.3 0 0 0 0-1.715zm-12.875.857q.001.441.086.857h-.943V8.14l-1.698.001v8.572h2.555l-3.428 3.429-3.429-3.429h2.554V6.43L7.8 6.428a4.4 4.4 0 0 0-.086.858M12 3.857a3.428 3.428 0 1 1 0 6.857 3.428 3.428 0 0 1 0-6.857m0 1.714A1.714 1.714 0 1 0 12 9a1.714 1.714 0 0 0 0-3.429"
d="m20.589 6.429-.001 10.285h2.555l-3.429 3.429-3.428-3.429h2.554V8.143H16.2a4.3 4.3 0 0 0 0-1.715zm-12.875.857q.001.441.086.857h-.943V8.14l-1.698.001v8.572h2.555l-3.428 3.429-3.429-3.429h2.554V6.43L7.8 6.428a4.4 4.4 0 0 0-.086.858M12 3.857a3.429 3.429 0 1 1 0 6.858 3.429 3.429 0 0 1 0-6.858m0 1.714A1.714 1.714 0 1 0 12 9a1.714 1.714 0 0 0 0-3.429"
/>
</svg>
);
Expand Down
4 changes: 2 additions & 2 deletions packages/icons/src/components/GoogleLogo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ const GoogleLogo = (props: SVGProps<SVGSVGElement>) => (
/>
<path
fill="#34A853"
d="M12.24 24c3.302 0 6.087-1.062 8.115-2.897l-3.945-2.998c-1.097.732-2.514 1.146-4.165 1.146-3.194 0-5.903-2.112-6.874-4.951H1.3v3.09C3.378 21.444 7.61 24 12.24 24"
d="M12.24 24c3.302 0 6.087-1.062 8.116-2.897l-3.946-2.998c-1.097.732-2.514 1.146-4.165 1.146-3.194 0-5.902-2.112-6.874-4.951H1.3v3.09C3.378 21.444 7.61 24 12.24 24"
/>
<path
fill="#FBBC04"
d="M5.367 14.3a7.05 7.05 0 0 1 0-4.595v-3.09H1.3a11.8 11.8 0 0 0 0 10.776z"
/>
<path
fill="#EA4335"
d="M12.24 4.75a6.73 6.73 0 0 1 4.697 1.798l3.495-3.426A11.9 11.9 0 0 0 12.24 0C7.611 0 3.378 2.558 1.3 6.614l4.066 3.091c.967-2.844 3.68-4.956 6.874-4.956"
d="M12.24 4.75a6.73 6.73 0 0 1 4.697 1.798l3.495-3.426A11.9 11.9 0 0 0 12.24 0C7.611 0 3.378 2.558 1.3 6.614l4.066 3.091c.968-2.844 3.68-4.956 6.874-4.956"
/>
</g>
<defs>
Expand Down
28 changes: 28 additions & 0 deletions packages/icons/src/components/ShieldCheck.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import * as React from 'react';
import type { SVGProps } from 'react';
const ShieldCheck = (props: SVGProps<SVGSVGElement>) => (
<svg
xmlns="http://www.w3.org/2000/svg"
width="1em"
height="1em"
fill="none"
viewBox="0 0 24 24"
{...props}
>
<path
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={2}
d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10"
/>
<path
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={2}
d="m9 12 2 2 4-4"
/>
</svg>
);
export default ShieldCheck;
1 change: 1 addition & 0 deletions packages/icons/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ export { default as SendMail } from './components/SendMail';
export { default as Settings } from './components/Settings';
export { default as Share2 } from './components/Share2';
export { default as Sheet } from './components/Sheet';
export { default as ShieldCheck } from './components/ShieldCheck';
export { default as Sidebar } from './components/Sidebar';
export { default as SortAsc } from './components/SortAsc';
export { default as Square } from './components/Square';
Expand Down
2 changes: 2 additions & 0 deletions packages/openapi/src/usage/get-space-usage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export enum UsageFeatureLimit {
AdvancedPermissionsEnable = 'advancedPermissionsEnable',
PasswordRestrictedSharesEnable = 'passwordRestrictedSharesEnable',
AuthenticationEnable = 'authenticationEnable',
DomainVerificationEnable = 'domainVerificationEnable',
}

export const usageFeatureLimitSchema = z.object({
Expand All @@ -50,6 +51,7 @@ export const usageFeatureLimitSchema = z.object({
[UsageFeatureLimit.AdvancedPermissionsEnable]: z.boolean(),
[UsageFeatureLimit.PasswordRestrictedSharesEnable]: z.boolean(),
[UsageFeatureLimit.AuthenticationEnable]: z.boolean(),
[UsageFeatureLimit.DomainVerificationEnable]: z.boolean(),
});

export const usageVoSchema = z.object({
Expand Down
17 changes: 12 additions & 5 deletions packages/sdk/src/components/cell-value/CellValue.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import type {
IRatingFieldOptions,
IDatetimeFormatting,
ILinkCellValue,
SingleLineTextDisplayType,
} from '@teable/core';
import { CellValueType, FieldType } from '@teable/core';
import type { IFieldInstance } from '../../model';
Expand All @@ -28,7 +29,7 @@ interface ICellValueContainer extends ICellValue<unknown> {
}

export const CellValue = (props: ICellValueContainer) => {
const { field, value, maxWidth, ellipsis, className, itemClassName, formatImageUrl } = props;
const { field, value, ellipsis, className, itemClassName, formatImageUrl } = props;
const { type, options, cellValueType } = field;

switch (type) {
Expand Down Expand Up @@ -78,7 +79,6 @@ export const CellValue = (props: ICellValueContainer) => {
options={transformSelectOptions(options.choices)}
className={className}
itemClassName={itemClassName}
maxWidth={maxWidth}
ellipsis={ellipsis}
/>
);
Expand All @@ -91,7 +91,6 @@ export const CellValue = (props: ICellValueContainer) => {
value={value as IUserCellValue | IUserCellValue[]}
className={className}
itemClassName={itemClassName}
maxWidth={maxWidth}
formatImageUrl={formatImageUrl}
/>
);
Expand Down Expand Up @@ -131,6 +130,7 @@ export const CellValue = (props: ICellValueContainer) => {
value={value as string}
formatting={options.formatting as IDatetimeFormatting}
className={className}
ellipsis={ellipsis}
/>
);
}
Expand All @@ -141,19 +141,26 @@ export const CellValue = (props: ICellValueContainer) => {
value={value as number}
formatting={options.formatting as INumberFormatting}
className={className}
ellipsis={ellipsis}
/>
);
}

return <CellText value={value as string} className={className} />;
return (
<CellText
value={value as string}
className={className}
ellipsis={ellipsis}
displayType={options.showAs?.type as SingleLineTextDisplayType}
/>
);
}
case FieldType.Link: {
return (
<CellLink
value={value as ILinkCellValue | ILinkCellValue[]}
className={className}
itemClassName={itemClassName}
maxWidth={maxWidth}
/>
);
}
Expand Down
1 change: 0 additions & 1 deletion packages/sdk/src/components/cell-value/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ export interface ICellValue<T> {
value?: T;
className?: string;
style?: React.CSSProperties;
maxWidth?: number;
ellipsis?: boolean;
}

0 comments on commit 555bcc4

Please sign in to comment.