• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

teableio / teable / 10211584623

02 Aug 2024 07:14AM UTC coverage: 17.734% (-64.2%) from 81.98%
10211584623

push

github

web-flow
fix: design page i18n (#787)

* fix: graph page i18n

* fix: crash i18n

* fix: design page i18n

* fix: text

1387 of 2813 branches covered (49.31%)

3 of 32 new or added lines in 6 files covered. (9.38%)

14082 of 79405 relevant lines covered (17.73%)

1.76 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

32.53
/apps/nextjs-app/src/features/app/components/field-setting/SystemInfo.tsx
1
import type { IFieldVo } from '@teable/core';
1✔
2
import { LocalStorageKeys } from '@teable/sdk/config/local-storage-keys';
1✔
3
import { useTranslation } from 'next-i18next';
1✔
4
import { useLocalStorage } from 'react-use';
1✔
5

1✔
6
// eslint-disable-next-line sonarjs/cognitive-complexity
1✔
7
export const SystemInfo: React.FC<{ field: Partial<IFieldVo> }> = ({ field }) => {
1✔
8
  const [show, setShow] = useLocalStorage<boolean>(LocalStorageKeys.FieldSystem);
6✔
9
  const { t } = useTranslation(['table']);
6✔
10
  if (!field.id) {
6✔
11
    return null;
6✔
12
  }
6!
13

×
14
  return show ? (
×
15
    <div className="flex flex-col space-y-1 border-b border-slate-200 pb-2">
×
16
      <p className="text-xs">
×
17
        <span className="select-none text-slate-400">id: </span>
×
18
        {field.id}
×
19
      </p>
×
20
      <p className="text-xs">
×
21
        <span className="select-none text-slate-400">dbName: </span>
×
22
        {field.dbFieldName}
×
23
      </p>
×
24
      <p className="text-xs">
×
25
        <span className="select-none text-slate-400">dbType: </span>
×
26
        {field.dbFieldType}
×
27
      </p>
×
28
      <p className="text-xs">
×
29
        <span className="select-none text-slate-400">cellValueType: </span>
×
30
        {field.cellValueType}
×
31
      </p>
×
32
      <p className="text-xs">
×
33
        <span className="select-none text-slate-400">isMultipleCellValue: </span>
×
34
        {field.isMultipleCellValue ? 'true' : 'false'}
×
35
      </p>
×
36
      <p className="text-xs">
×
37
        <span className="select-none text-slate-400">isPrimary: </span>
×
38
        {field.isPrimary ? 'true' : 'false'}
×
39
      </p>
×
40
      <p className="text-xs">
×
41
        <span className="select-none text-slate-400">isComputed: </span>
×
42
        {field.isComputed ? 'true' : 'false'}
×
43
      </p>
×
44
      <p className="text-left text-xs font-medium">
×
45
        <span
×
46
          onClick={() => {
×
47
            setShow(false);
×
48
          }}
×
49
          onKeyDown={(e) => {
×
50
            if (e.key === 'Enter' || e.key === ' ') {
×
51
              setShow(false);
×
52
            }
×
53
          }}
×
54
          tabIndex={0}
×
55
          role={'button'}
×
56
          className="cursor-pointer border-b border-solid border-slate-500 "
×
57
        >
×
NEW
58
          {t('field.hide')}
×
59
        </span>
×
60
      </p>
×
61
    </div>
×
62
  ) : (
×
63
    <div className="absolute right-0">
6✔
64
      <p className="text-xs font-medium text-slate-500">
6✔
65
        <span
6✔
66
          onClick={() => {
6✔
67
            setShow(true);
×
68
          }}
×
69
          onKeyDown={(e) => {
6✔
70
            if (e.key === 'Enter' || e.key === ' ') {
×
71
              setShow(true);
×
72
            }
×
73
          }}
×
74
          tabIndex={0}
6✔
75
          role={'button'}
6✔
76
          className="cursor-pointer border-b border-solid border-slate-500 "
6✔
77
        >
6✔
78
          {t('field.advancedProps')}
6✔
79
        </span>
6✔
80
      </p>
6✔
81
    </div>
6✔
82
  );
6✔
83
};
6✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc