Browse Source

delete useless i18n

tumao 4 years ago
parent
commit
06c13a2798

+ 1 - 1
client/src/components/customCard/CustomCard.tsx

@@ -28,7 +28,7 @@ const getStyles = makeStyles((theme: Theme) => ({
     textTransform: 'capitalize',
 
     '&:hover': {
-      backgroundColor: theme.palette.zilliz.light,
+      backgroundColor: theme.palette.primary.light,
     },
   },
   menuPaper: {

+ 1 - 1
client/src/components/filter/Filter.tsx

@@ -59,7 +59,7 @@ const useStyles = makeStyles((theme: Theme) =>
     active: {
       color: theme.palette.common.black,
       opacity: 0.6,
-      backgroundColor: theme.palette.zilliz.light,
+      backgroundColor: theme.palette.primary.light,
     },
     typoButton: {
       textTransform: 'none',

+ 0 - 1
client/src/components/grid/Table.tsx

@@ -55,7 +55,6 @@ const useStyles = makeStyles(theme => ({
   },
   rowHover: {
     '&:hover': {
-      // backgroundColor: `${theme.palette.zilliz.light} !important`,
       backgroundColor: `#f3fcfe`,
       '& td': {
         background: 'inherit',

+ 4 - 150
client/src/context/Root.tsx

@@ -1,13 +1,7 @@
 import { useState, useCallback } from 'react';
-import * as React from 'react';
-import {
-  // for strict mode
-  unstable_createMuiStrictModeTheme as createMuiTheme,
-  ThemeProvider,
-  makeStyles,
-} from '@material-ui/core/styles';
-import { Backdrop, CircularProgress, SwipeableDrawer } from '@material-ui/core';
-
+import React from 'react';
+import { ThemeProvider, makeStyles } from '@material-ui/core/styles';
+import { SwipeableDrawer } from '@material-ui/core';
 import {
   RootContextType,
   DialogType,
@@ -16,16 +10,7 @@ import {
 } from './Types';
 import CustomSnackBar from '../components/customSnackBar/CustomSnackBar';
 import CustomDialog from '../components/customDialog/CustomDialog';
-import lightBlue from '@material-ui/core/colors/lightBlue';
-
-declare module '@material-ui/core/styles/createPalette' {
-  interface Palette {
-    zilliz: Palette['primary'];
-  }
-  interface PaletteOptions {
-    zilliz: PaletteOptions['primary'];
-  }
-}
+import { theme } from '../styles/theme';
 
 const DefaultDialogConfigs: DialogType = {
   open: false,
@@ -48,135 +33,9 @@ export const rootContext = React.createContext<RootContextType>({
   dialog: DefaultDialogConfigs,
   setDialog: params => {},
   handleCloseDialog: () => {},
-  setGlobalLoading: () => {},
   setDrawer: (params: any) => {},
 });
 
-const otherThemes = {
-  spacing: (factor: any) => `${8 * factor}px`,
-};
-
-const theme = createMuiTheme({
-  palette: {
-    primary: {
-      ...lightBlue,
-      main: '#06AFF2',
-      light: '#65DAF8',
-      dark: '#009BC4',
-    },
-    secondary: {
-      light: '#82D3BA',
-      main: '#31B78D',
-      dark: '#279371',
-    },
-    error: {
-      main: '#FF4605',
-      light: '#FF8F68',
-      dark: '#CD3804',
-    },
-    zilliz: {
-      ...lightBlue,
-      light: lightBlue[50],
-    },
-  },
-  ...otherThemes,
-  overrides: {
-    MuiTypography: {
-      button: {
-        textTransform: 'initial',
-        lineHeight: '16px',
-        fontWeight: 'bold',
-      },
-      h1: {
-        fontSize: '36px',
-        lineHeight: '42px',
-        letterSpacing: '-0.02em',
-      },
-      h2: {
-        lineHeight: '24px',
-        fontSize: '28px',
-      },
-      h3: {
-        lineHeight: '20px',
-        fontSize: '23px',
-        fontWeight: 'bold',
-      },
-      h4: {
-        fontWeight: 500,
-        lineHeight: '23px',
-        fontSize: '20px',
-        letterSpacing: '-0.02em',
-      },
-      h5: {
-        fontWeight: 'bold',
-        fontSize: '16px',
-        lineHeight: '24px',
-      },
-      h6: {
-        fontWeight: 'normal',
-        fontSize: '16px',
-        lineHeight: '24px',
-        letterSpacing: '-0.01em',
-      },
-      body1: {
-        fontSize: '14px',
-        lineHeight: '20px',
-      },
-      body2: {
-        fontSize: '12px',
-        lineHeight: '16px',
-      },
-      caption: {
-        fontSize: '10px',
-        lineHeight: '12px',
-      },
-    },
-    MuiButton: {
-      root: {
-        textTransform: 'initial',
-        fontWeight: 'bold',
-      },
-      text: {
-        '&:hover': {
-          backgroundColor: lightBlue[50],
-        },
-      },
-    },
-    MuiDialogActions: {
-      spacing: {
-        padding: otherThemes.spacing(4),
-      },
-    },
-    MuiDialogContent: {
-      root: {
-        padding: `${otherThemes.spacing(1)} ${otherThemes.spacing(4)}`,
-      },
-    },
-    MuiDialogTitle: {
-      root: {
-        padding: otherThemes.spacing(4),
-        paddingBottom: otherThemes.spacing(1),
-      },
-    },
-    MuiStepIcon: {
-      root: {
-        color: '#c4c4c4',
-        '&$active': {
-          color: '#12C3F4',
-        },
-        '&$completed': {
-          color: '#12C3F4',
-        },
-      },
-    },
-    MuiFormHelperText: {
-      contained: {
-        marginLeft: 0,
-      },
-    },
-  },
-});
-
 const { Provider } = rootContext;
 // Dialog has two type : normal | custom;
 // notice type mean it's a notice dialog you need to set props like title, content, actions
@@ -200,7 +59,6 @@ export const RootProvider = (props: { children: React.ReactNode }) => {
     autoHideDuration: 3000,
   });
   const [dialog, setDialog] = useState<DialogType>(DefaultDialogConfigs);
-  const [globalLoading, setGlobalLoading] = useState<boolean>(false);
   const [drawer, setDrawer]: any = useState({
     anchor: 'right',
     open: false,
@@ -255,7 +113,6 @@ export const RootProvider = (props: { children: React.ReactNode }) => {
         dialog,
         setDialog,
         handleCloseDialog,
-        setGlobalLoading,
         setDrawer,
       }}
     >
@@ -263,9 +120,6 @@ export const RootProvider = (props: { children: React.ReactNode }) => {
         <CustomSnackBar {...snackBar} onClose={handleSnackBarClose} />
         {props.children}
         <CustomDialog {...dialog} onClose={handleCloseDialog} />
-        <Backdrop open={globalLoading} style={{ zIndex: 2000 }}>
-          <CircularProgress color="inherit" />
-        </Backdrop>
 
         <SwipeableDrawer
           anchor={drawer.anchor}

+ 0 - 1
client/src/context/Types.ts

@@ -5,7 +5,6 @@ export type RootContextType = {
   dialog: DialogType;
   setDialog: (params: DialogType) => void;
   handleCloseDialog: () => void;
-  setGlobalLoading: (loading: boolean) => void;
   setDrawer: (params: any) => void;
 };
 

+ 0 - 13
client/src/i18n/cn/card.ts

@@ -1,13 +0,0 @@
-export default {
-  // base card
-  core: 'cores',
-  memory: 'memory',
-  capacity: 'capacity',
-  count: 'node count',
-
-  // info card
-  dimension: 'Dimension',
-  metric: 'Metric type',
-  createTime: 'Created time',
-  index: 'Index',
-};

+ 0 - 31
client/src/i18n/cn/collection.ts

@@ -1,31 +0,0 @@
-export default {
-  // dialog
-  collection: 'Collection',
-  create: 'Create Collection',
-  edit: 'Edit Collection',
-  deleteMultipleTitle: 'Delete {{number}} Collections',
-  deleteWarning:
-    'You are trying to delete a collection with data. This action cannot be undone.',
-  deleteMultipleWarning:
-    'You are trying to delete multiple collections. This action cannot be undone.',
-
-  // dialog form and table
-  name: 'Name',
-  database: 'Database',
-  dimension: 'Dimension',
-  metric: 'Metric Type',
-  desc: 'Description',
-  time: 'Created Time',
-  partition: 'Partition Count',
-  index: 'Index count',
-  location: 'Location',
-
-  empty: 'No Collection',
-
-  // dialog snackbar
-  createSuccess: `"{{collectionName}}" is created in "{{dbName}}"`,
-  editSuccess: 'Collection is updated',
-
-  deleteMultipleSuccess: '{{number}} collections are deleted',
-  deleteSuccess: `Collection "{{name}}" is deleted`,
-};

+ 0 - 12
client/src/i18n/cn/connect.ts

@@ -1,12 +0,0 @@
-export default {
-  connect: 'Connect',
-  title: 'Connect Your Service',
-  subtitle: 'Here are the fast way to connect your Zilliz Cloud',
-  download: 'Download Golang SDK',
-  tip: 'More operations, please check the documentation',
-  link: 'Go to Milvus Doc',
-
-  start: 'Quick Start',
-  py: 'Python',
-  go: 'Golang',
-};

+ 0 - 5
client/src/i18n/cn/data.ts

@@ -1,5 +0,0 @@
-export default {
-  id: 'ID',
-  vector: 'Vector',
-  empty: 'No Data',
-};

+ 0 - 43
client/src/i18n/cn/database.ts

@@ -1,43 +0,0 @@
-export default {
-  // dialog
-  db: 'Database',
-  empty: 'No Database',
-
-  create: 'Create Database',
-  editDb: 'Edit Database',
-  deleteDb: 'Delete Database',
-  deleteWarning:
-    'Deleting this database will terminate all related query services, this action can not be undone.',
-
-  // card
-  endpoint: 'Endpoint',
-  token: 'Access Token',
-  query: 'Query Service',
-  addQuery: 'Add Query Service',
-  write: 'Write Node',
-  // view: 'View Collections',
-  connect: 'Connect Your Service',
-  edit: 'edit',
-  delete: 'delete',
-  createCollection: 'Create Collection',
-  createQuery: 'Create Query Service',
-  createQueryTip: 'one database can only has one query service',
-
-  // dialog form
-  name: 'Name',
-  provider: 'Cloud Provider',
-  region: 'Cloud Region',
-  node: 'Node Type',
-  price: 'Price',
-  desc: 'Description',
-  time: 'Create Time',
-  status: 'Status',
-
-  // dialog snackbar
-  createSuccess: `Start creating Database "{{dbName}}"`,
-  editSuccess: `Database "{{name}}" is updated`,
-  deleteSuccess: `Database "{{name}}" is deleted`,
-
-  // tooltip
-  viewCollectionTip: 'Database is creating',
-};

+ 0 - 8
client/src/i18n/cn/dialog.ts

@@ -1,8 +0,0 @@
-export default {
-  deleteTipAction: 'Type',
-  deleteTipPurpose: 'to confirm.',
-  deleteTitle: `Delete {{type}} "{{name}}"`,
-  dropTitle: `Drop {{type}} {{name}}`,
-
-  createTitle: `Create {{type}} in "{{name}}"`,
-};

+ 0 - 15
client/src/i18n/cn/help.ts

@@ -1,15 +0,0 @@
-export default {
-  text: '发送反馈',
-  tip: '',
-  title: '联系我们',
-  content: '有任何意见或问题?',
-  content2: '请告诉我们.',
-  placeholder: '填写你的经历',
-  success: '您的反馈已发送成功',
-
-  // type
-  support: 'Support',
-  bug: 'Bug',
-  suggestion: 'Suggestion',
-  other: 'Other',
-};

+ 0 - 24
client/src/i18n/cn/index.ts

@@ -1,24 +0,0 @@
-export default {
-  index: 'Index',
-  drop: 'Drop Index "{{name}}"',
-  dropWarning: 'This action cannot be undone',
-  create: 'Create Index',
-
-  // form
-  name: 'Name',
-  indexType: 'Index Type',
-  param: 'Parameters',
-
-  // snackbar
-  createSuccess: `"{{indexName}}" is created in "{{collectionName}}"`,
-  editSuccess: 'Index "{{name}}" is updated',
-  deleteSuccess: 'Index "{{name}}" is deleted',
-
-  // table
-  type: 'Type',
-  metric: 'Metric',
-  location: 'Location',
-  empty: 'No Index',
-  edit: 'Edit Index',
-  status: 'Status',
-};

+ 0 - 29
client/src/i18n/cn/partition.ts

@@ -1,29 +0,0 @@
-export default {
-  partition: 'Partition',
-  create: 'Create Partition',
-  edit: 'Edit Partition',
-  deleteMultipleTitle: 'Delete {{number}} Partitions',
-  deleteWarning:
-    'You are trying to delete a partition with data. This action cannot be undone.',
-  deleteMultipleWarning:
-    'You are trying to delete multiple partitions. This action cannot be undone.',
-
-  empty: 'No Parition',
-
-  // form
-  database: 'Database',
-  collection: 'Collection',
-
-  // table
-  name: 'Name',
-  desc: 'Description',
-  time: 'Create Time',
-  location: 'Location',
-
-  // snackbar
-  createSuccess: `"{{partitionName}}" is created in "{{collectionName}}"`,
-  editSuccess: `Partition "{{name}}" is updated`,
-
-  deleteSuccess: `Partition "{{name}}" is deleted`,
-  deleteMultipleSuccess: '{{number}} partitions are deleted',
-};

+ 0 - 20
client/src/i18n/cn/password.ts

@@ -1,20 +0,0 @@
-export default {
-  pwd: '密码',
-  reset: '重置密码',
-  changePwdTip: '一封有修改密码链接的邮件将会发送到',
-
-  recoverPwd: {
-    title: '重置密码',
-    tip: 'No worries, happens to the best of us.',
-    confirm: '发送重置邮件',
-    cancel: '返回登录',
-    success: '发送成功',
-  },
-  changePwd: {
-    title: '修改密码',
-    newPwd: '新密码',
-    confirmNewPwd: '确认新密码',
-    confirm: '修改密码',
-    success: '您的密码已修改成功',
-  },
-};

+ 0 - 47
client/src/i18n/cn/query.ts

@@ -1,47 +0,0 @@
-export default {
-  // dialog
-  createTitle: 'Create Query Service',
-  edit: 'Edit Query Service',
-  terminateTitle: 'Terminate Query',
-  terminateWarning: 'This action can’t be undone.',
-
-  empty: 'No Query Service',
-
-  // dialog form
-  name: 'Name',
-  database: 'Database',
-  type: 'Query Service Type',
-  count: 'Query Node Count',
-  desc: 'Description',
-  noDbs: 'No database available',
-  capacity: 'Capacity',
-
-  // card
-  editQuery: 'edit',
-  deleteQuery: 'delete',
-  terminate: 'terminate',
-  queryLabel: 'Query Service',
-  search: 'Vector Search',
-
-  // query service page
-  token: 'Access Token',
-  endpoint: 'Endpoint',
-  create: 'Create Query',
-  region: 'Cloud Region',
-  time: 'Create Time',
-  status: 'Status',
-  vectorSearchEmpty: 'Start your search',
-  noVectorSearch: 'No result found',
-
-  // vector search
-  rank: 'Rank',
-  id: 'ID',
-  vector: 'Vector',
-  distance: 'Distance',
-  topK: 'TopK',
-
-  // dialog snackbar
-  createSuccess: 'Start creating query node',
-  editSuccess: 'Query node is updated',
-  deleteSuccess: `Query Service "{{name}}" is deleted.`,
-};

+ 0 - 6
client/src/i18n/cn/signUp.ts

@@ -1,6 +0,0 @@
-export default {
-  title: '创建账号',
-  account: '邮箱',
-  password: '密码',
-  confirm: '确认密码',
-};

+ 0 - 6
client/src/i18n/cn/verify.ts

@@ -1,6 +0,0 @@
-export default {
-  thank: '感谢使用 Zilliz 云平台,邮件已发送至',
-  check: '请检查邮箱,验证账号',
-  continue: '重新登录',
-  successMsg: '账号验证成功',
-};

+ 0 - 13
client/src/i18n/en/card.ts

@@ -1,13 +0,0 @@
-export default {
-  // base card
-  core: 'cores',
-  memory: 'memory',
-  capacity: 'capacity',
-  count: 'node count',
-
-  // info card
-  dimension: 'Dimension',
-  metric: 'Metric type',
-  createTime: 'Created time',
-  index: 'Index',
-};

+ 0 - 31
client/src/i18n/en/collection.ts

@@ -1,31 +0,0 @@
-export default {
-  // dialog
-  collection: 'Collection',
-  create: 'Create Collection',
-  edit: 'Edit Collection',
-  deleteMultipleTitle: 'Delete {{number}} Collections',
-  deleteWarning:
-    'You are trying to delete a collection with data. This action cannot be undone.',
-  deleteMultipleWarning:
-    'You are trying to delete multiple collections. This action cannot be undone.',
-
-  // dialog form and table
-  name: 'Name',
-  database: 'Database',
-  dimension: 'Dimension',
-  metric: 'Metric Type',
-  desc: 'Description',
-  time: 'Created Time',
-  partition: 'Partition Count',
-  index: 'Index count',
-  location: 'Location',
-
-  empty: 'No Collection',
-
-  // dialog snackbar
-  createSuccess: `"{{collectionName}}" is created in "{{dbName}}"`,
-  editSuccess: `Collection "{{name}}" is updated`,
-
-  deleteMultipleSuccess: '{{number}} collections are deleted',
-  deleteSuccess: `Collection "{{name}}" is deleted`,
-};

+ 0 - 12
client/src/i18n/en/connect.ts

@@ -1,12 +0,0 @@
-export default {
-  connect: 'Connect',
-  title: 'Connect Your Service',
-  subtitle: 'Here are the fast way to connect your Zilliz Cloud',
-  download: 'Download {{name}} SDK',
-  tip: 'More operations, please check the documentation',
-  link: 'Go to Milvus Doc',
-
-  start: 'Quick Start',
-  py: 'Python',
-  go: 'Golang',
-};

+ 0 - 5
client/src/i18n/en/data.ts

@@ -1,5 +0,0 @@
-export default {
-  id: 'ID',
-  vector: 'Vector',
-  empty: 'No Data',
-};

+ 0 - 42
client/src/i18n/en/database.ts

@@ -1,42 +0,0 @@
-export default {
-  // dialog
-  db: 'Database',
-  empty: 'No Database',
-  create: 'Create Database',
-  editDb: 'Edit Database',
-  deleteDb: 'Delete Database',
-  deleteWarning:
-    'Deleting this database will terminate all related query services, this action can not be undone.',
-
-  // card
-  endpoint: 'Endpoint',
-  token: 'Access Token',
-  query: 'Query Service',
-  addQuery: 'Add Query Service',
-  write: 'Write Node',
-  // view: 'View Collections',
-  connect: 'Connect Your Service',
-  edit: 'edit',
-  delete: 'delete',
-  createCollection: 'Create Collection',
-  createQuery: 'Create Query Service',
-  createQueryTip: 'one database can only has one query service',
-
-  // dialog form
-  name: 'Name',
-  provider: 'Cloud Provider',
-  region: 'Cloud Region',
-  node: 'Node Type',
-  price: 'Price',
-  desc: 'Description',
-  time: 'Create Time',
-  status: 'Status',
-
-  // dialog snackbar
-  createSuccess: `Start creating Database "{{dbName}}"`,
-  editSuccess: `Database "{{name}}" is updated`,
-  deleteSuccess: `Database "{{name}}" is deleted`,
-
-  // tooltip
-  viewCollectionTip: 'Database is creating',
-};

+ 0 - 8
client/src/i18n/en/dialog.ts

@@ -1,8 +0,0 @@
-export default {
-  deleteTipAction: 'Type',
-  deleteTipPurpose: 'to confirm.',
-  deleteTitle: `Delete {{type}} "{{name}}"`,
-  dropTitle: `Drop {{type}} {{name}}`,
-
-  createTitle: `Create {{type}} in "{{name}}"`,
-};

+ 0 - 15
client/src/i18n/en/help.ts

@@ -1,15 +0,0 @@
-export default {
-  text: 'Send feedback',
-  tip: 'Help/feedback',
-  title: 'Send Feedback',
-  content: 'Do you have a suggestion or found some bug?',
-  content2: 'Let us know in the field bellow.',
-  placeholder: 'Describe your experience here...',
-  success: 'Your message has been successfully sent',
-
-  // type
-  support: 'Support',
-  bug: 'Bug',
-  suggestion: 'Suggestion',
-  other: 'Other',
-};

+ 0 - 24
client/src/i18n/en/index.ts

@@ -1,24 +0,0 @@
-export default {
-  index: 'Index',
-  drop: 'Drop Index "{{name}}"',
-  dropWarning: 'This action cannot be undone',
-  create: 'Create Index',
-
-  // form
-  name: 'Name',
-  indexType: 'Index Type',
-  param: 'Parameters',
-
-  // snackbar
-  createSuccess: `"{{indexName}}" is created in "{{collectionName}}"`,
-  editSuccess: 'Index "{{name}}" is updated',
-  deleteSuccess: 'Index "{{name}}" is deleted',
-
-  // table
-  type: 'Type',
-  metric: 'Metric',
-  location: 'Location',
-  empty: 'No Index',
-  edit: 'Edit Index',
-  status: 'Status',
-};

+ 0 - 29
client/src/i18n/en/partition.ts

@@ -1,29 +0,0 @@
-export default {
-  partition: 'Partition',
-  create: 'Create Partition',
-  edit: 'Edit Partition',
-  deleteMultipleTitle: 'Delete {{number}} Partitions',
-  deleteWarning:
-    'You are trying to delete a partition with data. This action cannot be undone.',
-  deleteMultipleWarning:
-    'You are trying to delete multiple partitions. This action cannot be undone.',
-
-  empty: 'No Parition',
-
-  // form
-  database: 'Database',
-  collection: 'Collection',
-
-  // table
-  name: 'Name',
-  desc: 'Description',
-  time: 'Create Time',
-  location: 'Location',
-
-  // snackbar
-  createSuccess: `"{{partitionName}}" is created in "{{collectionName}}"`,
-  editSuccess: `Partition "{{name}}" is updated`,
-
-  deleteSuccess: `Partition "{{name}}" is deleted`,
-  deleteMultipleSuccess: '{{number}} partitions are deleted',
-};

+ 0 - 21
client/src/i18n/en/password.ts

@@ -1,21 +0,0 @@
-export default {
-  pwd: 'Password',
-  reset: 'Reset Password',
-  changePwdTip:
-    ' A verification email with a link to change your password will be sent to',
-
-  recoverPwd: {
-    title: 'Recover password',
-    tip: 'No worries, happens to the best of us.',
-    confirm: 'Email me a recovery link',
-    cancel: 'Back to sign in',
-    success: 'Send recovery password email success, please check your email.',
-  },
-  changePwd: {
-    title: 'Change password',
-    newPwd: 'New password',
-    confirmNewPwd: 'Re-enter your new password',
-    confirm: 'Change password',
-    success: 'Your password has been changed.',
-  },
-};

+ 0 - 47
client/src/i18n/en/query.ts

@@ -1,47 +0,0 @@
-export default {
-  // dialog
-  createTitle: 'Create Query Service',
-  edit: 'Edit Query Service',
-  terminateTitle: 'Terminate Query',
-  terminateWarning: 'This action can’t be undone.',
-
-  empty: 'No Query Service',
-
-  // dialog form
-  name: 'Name',
-  database: 'Database',
-  type: 'Query Service Type',
-  count: 'Query Node Count',
-  desc: 'Description',
-  noDbs: 'No database available',
-  capacity: 'Capacity',
-
-  // card
-  editQuery: 'edit',
-  deleteQuery: 'delete',
-  terminate: 'terminate',
-  queryLabel: 'Query Service',
-  search: 'Vector Search',
-
-  // query service page
-  token: 'Access Token',
-  endpoint: 'Endpoint',
-  create: 'Create Query',
-  region: 'Cloud Region',
-  time: 'Create Time',
-  status: 'Status',
-  vectorSearchEmpty: 'Start your search',
-  noVectorSearch: 'No result found',
-
-  // vector search
-  rank: 'Rank',
-  id: 'ID',
-  vector: 'Vector',
-  distance: 'Distance',
-  topK: 'TopK',
-
-  // dialog snackbar
-  createSuccess: 'Start creating query node',
-  editSuccess: 'Query node is updated',
-  deleteSuccess: `Query Service "{{name}}" is deleted.`,
-};

+ 0 - 6
client/src/i18n/en/signUp.ts

@@ -1,6 +0,0 @@
-export default {
-  title: 'Sign up',
-  account: 'Email Address',
-  password: 'Password',
-  confirm: 'Confirm password',
-};

+ 0 - 6
client/src/i18n/en/verify.ts

@@ -1,6 +0,0 @@
-export default {
-  thank: 'Thank you for using Zilliz Cloud. An Email had been sent to',
-  check: 'Check your mail box to verify your account.',
-  continue: 'Continue to sign in',
-  successMsg: 'Your account had been verified.',
-};

+ 0 - 52
client/src/i18n/index.ts

@@ -5,71 +5,19 @@ import commonCn from './cn/common';
 import commonEn from './en/common';
 import buttonEn from './en/button';
 import buttonCn from './cn/button';
-import databaseCn from './cn/database';
-import databaseEn from './en/database';
-import signUpCn from './cn/signUp';
-import signUpEn from './en/signUp';
 import warningCn from './cn/warning';
 import warningEn from './en/warning';
-import verifyCn from './cn/verify';
-import verifyEn from './en/verify';
-import helpCn from './cn/help';
-import helpEn from './en/help';
-import queryCn from './cn/query';
-import queryEn from './en/query';
-import collectionCn from './cn/collection';
-import collectionEn from './en/collection';
-import partitionCn from './cn/partition';
-import partitionEn from './en/partition';
-import indexCn from './cn/index';
-import indexEn from './en/index';
-import cardCn from './cn/card';
-import cardEn from './en/card';
-import dataCn from './cn/data';
-import dataEn from './en/data';
-import dialogCn from './cn/dialog';
-import dialogEn from './en/dialog';
-import passwordCn from './cn/password';
-import passwordEn from './en/password';
-import connectCn from './cn/connect';
-import connectEn from './en/connect';
 
 export const resources = {
   cn: {
     translation: commonCn,
-    signUp: signUpCn,
     btn: buttonCn,
     warning: warningCn,
-    verify: verifyCn,
-    help: helpCn,
-    database: databaseCn,
-    query: queryCn,
-    collection: collectionCn,
-    partition: partitionCn,
-    index: indexCn,
-    card: cardCn,
-    data: dataCn,
-    dialog: dialogCn,
-    password: passwordCn,
-    connect: connectCn,
   },
   en: {
     translation: commonEn,
-    signUp: signUpEn,
     btn: buttonEn,
     warning: warningEn,
-    verify: verifyEn,
-    help: helpEn,
-    database: databaseEn,
-    query: queryEn,
-    collection: collectionEn,
-    partition: partitionEn,
-    index: indexEn,
-    card: cardEn,
-    data: dataEn,
-    dialog: dialogEn,
-    password: passwordEn,
-    connect: connectEn,
   },
 };
 

+ 136 - 0
client/src/styles/theme.ts

@@ -0,0 +1,136 @@
+import {
+  // for strict mode
+  unstable_createMuiStrictModeTheme as createMuiTheme,
+} from '@material-ui/core/styles';
+
+const commonThemes = {
+  typography: {
+    fontFamily: [
+      'Roboto',
+      '-apple-system',
+      'BlinkMacSystemFont',
+      '"Segoe UI"',
+      '"Helvetica Neue"',
+      'Arial',
+      'sans-serif',
+      '"Apple Color Emoji"',
+      '"Segoe UI Emoji"',
+      '"Segoe UI Symbol"',
+    ].join(','),
+  },
+  palette: {
+    primary: {
+      main: '#06aff2',
+      light: '#65daf8',
+      dark: '#009bc4',
+    },
+    secondary: {
+      light: '#82d3ba',
+      main: '#31b78d',
+      dark: '#279371',
+    },
+    error: {
+      main: '#ff4605',
+      light: '#ff8f68',
+      dark: '#cd3804',
+    },
+  },
+  breakpoints: {
+    values: {
+      xs: 0,
+      sm: 600,
+      md: 1025,
+      lg: 1200,
+      xl: 1920,
+    },
+  },
+  spacing: (factor: number) => `${8 * factor}px`,
+};
+
+export const theme = createMuiTheme({
+  ...commonThemes,
+  overrides: {
+    MuiTypography: {
+      button: {
+        textTransform: 'initial',
+        lineHeight: '16px',
+        fontWeight: 'bold',
+      },
+      h1: {
+        fontSize: '36px',
+        lineHeight: '42px',
+        letterSpacing: '-0.02em',
+      },
+      h2: {
+        lineHeight: '24px',
+        fontSize: '28px',
+      },
+      h3: {
+        lineHeight: '20px',
+        fontSize: '23px',
+        fontWeight: 'bold',
+      },
+      h4: {
+        fontWeight: 500,
+        lineHeight: '23px',
+        fontSize: '20px',
+        letterSpacing: '-0.02em',
+      },
+      h5: {
+        fontWeight: 'bold',
+        fontSize: '16px',
+        lineHeight: '24px',
+      },
+      h6: {
+        fontWeight: 'normal',
+        fontSize: '16px',
+        lineHeight: '24px',
+        letterSpacing: '-0.01em',
+      },
+      body1: {
+        fontSize: '14px',
+        lineHeight: '20px',
+      },
+      body2: {
+        fontSize: '12px',
+        lineHeight: '16px',
+      },
+      caption: {
+        fontSize: '10px',
+        lineHeight: '12px',
+      },
+    },
+    MuiButton: {
+      root: {
+        textTransform: 'initial',
+        fontWeight: 'bold',
+      },
+      text: {
+        '&:hover': {
+          backgroundColor: commonThemes.palette.primary.light,
+        },
+      },
+    },
+    MuiDialogActions: {
+      spacing: {
+        padding: commonThemes.spacing(4),
+      },
+    },
+    MuiDialogContent: {
+      root: {
+        padding: `${commonThemes.spacing(1)} ${commonThemes.spacing(4)}`,
+      },
+    },
+    MuiDialogTitle: {
+      root: {
+        padding: commonThemes.spacing(4),
+        paddingBottom: commonThemes.spacing(1),
+      },
+    },
+    MuiFormHelperText: {
+      contained: {
+        marginLeft: 0,
+      },
+    },
+  },
+});