Skip to content

Commit

Permalink
styles(desktop): update desktop worksapce (labring#4328)
Browse files Browse the repository at this point in the history
  • Loading branch information
xudaotutou authored Nov 22, 2023
1 parent bd52c56 commit 160b7a2
Show file tree
Hide file tree
Showing 8 changed files with 219 additions and 147 deletions.
2 changes: 2 additions & 0 deletions frontend/desktop/deploy/Kubefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ ENV passWordEnabled="false"
ENV githubEnabled="false"
ENV wechatEnabled="false"
ENV smsEnabled="false"
ENV signUpEnabled="false"
ENV apiEnabled="false"

CMD ["bash scripts/init.sh"]
6 changes: 6 additions & 0 deletions frontend/desktop/deploy/manifests/deploy.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ spec:
# set to true to enable sms login
- name: SMS_ENABLED
value: '{{ .smsEnabled }}'
# set to true to enable sign up
- name: SIGN_UP_ENABLED
value: '{{ .signUpEnabled }}'
# set to true to open api
- name: API_ENABLED
value: '{{ .apiEnabled }}'
# password login env
- name: PASSWORD_SALT
valueFrom:
Expand Down
2 changes: 1 addition & 1 deletion frontend/desktop/deploy/manifests/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ roleRef:
subjects:
- kind: ServiceAccount
name: desktop-frontend
namespace: sealos
namespace: sealos
3 changes: 2 additions & 1 deletion frontend/desktop/next-i18next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ module.exports = {
defaultLocale: 'zh',
locales: ['en', 'zh'],
localeDetection: false
}
},
reloadOnPrerender: process.env.NODE_ENV === 'development'
};
21 changes: 11 additions & 10 deletions frontend/desktop/public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,17 @@
"Confirm": "Confirm",
"Login to your account": "Login to your account",
"Abdication": "Abdication",
"Team": "Team",
"Team": "Workspace",
"Member List": "Member List",
"Created Time": "Created Time",
"Create Team": "Create Team",
"Name of Team": "Name of Team",
"Dissolve Team": "Dissovle Team",
"Invaild Name of Team": "Dissovle Team",
"Manage Team": "Manage Team",
"Default Team": "Default",
"private team ID of user": "private team ID of user",
"Create Team": "Create Workspace",
"noWorkspaceCreated": "You haven't created a workspace yet",
"Name of Team": "Name of Workspace",
"Dissolve Team": "Delete Workspace",
"Invaild Name of Team": "Invaild Name of Workspace",
"Manage Team": "Manage Workspace",
"Default Team": "Personal Workspace",
"private team ID of user": "User's ID",
"Invite Member": "Invite Member",
"Handle": "Handle",
"Reject": "Reject",
Expand All @@ -81,11 +82,11 @@
"Operating": "Operating",
"Waiting": "Waiting",
"Added": "Added",
"Invaild Context": "You need switch to other team for handling",
"Invaild Context": "You need switch to other workspace for handling",
"Remove Member Tips": "Determine that you want to remove the member?",
"Invalid User ID": "Invalid User ID",
"The invited user must be others": "The invited user must be others",
"Dissovle Tips": "Dissolving the team will clear all resources. Are you sure you want to disband",
"Dissovle Tips": "Deleting the workspace will clear all resources. Are you sure you want to disband",
"Enter Confirm.": "Please enter {{value}} to confirm",
"Accept Invitation": "Accept Invitation",
"Recive Tips": "{{managerName}} invite you join in {{teamName}} as {{role}}",
Expand Down
23 changes: 12 additions & 11 deletions frontend/desktop/public/locales/zh/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,17 @@
"Confirm": "确认",
"Login to your account": "登录您的帐户",
"Abdication": "移交",
"Team": "团队",
"Team": "工作空间",
"Member List": "成员列表",
"Created Time": "创建时间",
"Create Team": "创建团队",
"Name of Team": "团队名称",
"Dissolve Team": "解散",
"Invaild Name of Team": "不合法的团队名称",
"Manage Team": "管理团队",
"Default Team": "默认",
"private team ID of user": "用户的 private team 的团队ID",
"Create Team": "创建工作空间",
"noWorkspaceCreated": "您还没有创建工作空间",
"Name of Team": "工作空间名称",
"Dissolve Team": "删除",
"Invaild Name of Team": "不合法的工作空间名称",
"Manage Team": "管理工作空间",
"Default Team": "个人空间",
"private team ID of user": "用户ID",
"Invite Member": "邀请成员",
"Handle": "操作",
"Reject": "拒绝",
Expand All @@ -77,11 +78,11 @@
"Operating": "操作",
"Waiting": "等待中",
"Added": "已加入",
"Invaild Context": "你需要切换到其他团队操作",
"Invaild Context": "你需要切换到其他工作空间操作",
"Remove Member Tips": "确认要移除该成员?",
"Invalid User ID": "用户的 ID 不合法",
"The invited user must be others": "只能邀请其他人",
"Dissovle Tips": "解散团队会清空所有资源,确定要解散吗",
"Dissovle Tips": "删除工作空间会清空所有资源,确定要删除吗",
"Enter Confirm.": "请输入 {{value}} 确认",
"Accept Invitation": "接受邀请",
"Recive Tips": "{{managerName}} 邀请你到 {{teamName}} 当 {{role}}",
Expand All @@ -95,4 +96,4 @@
"Purchase Link Error": "购买链接错误",
"You have not purchased the License": "您还没有购买 License",
"App Info": "应用信息"
}
}
38 changes: 26 additions & 12 deletions frontend/desktop/src/components/team/CreateTeam.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { useCustomToast } from '@/hooks/useCustomToast';
import { ApiResp } from '@/types';
import { useTranslation } from 'react-i18next';
import { AddIcon, GroupAddIcon } from '@sealos/ui';
export default function CreateTeam() {
export default function CreateTeam({ textButton = false }: { textButton?: boolean }) {
const { onOpen, isOpen, onClose } = useDisclosure();
const { t } = useTranslation();
const [teamName, setTeamName] = useState('');
Expand All @@ -48,17 +48,31 @@ export default function CreateTeam() {
};
return (
<>
<IconButton
onClick={() => {
onOpen();
setTeamName('');
}}
variant={'white-bg-icon'}
mr="4px"
p="4px"
aria-label={'create team'}
icon={<AddIcon boxSize={'20px'} color={'brightBlue.600'} />}
/>
{textButton ? (
<Button
onClick={() => {
onOpen();
setTeamName('');
}}
variant={'primary'}
leftIcon={<AddIcon boxSize={'20px'} color={'white'} />}
iconSpacing={'8px'}
>
{t('Create Team')}
</Button>
) : (
<IconButton
onClick={() => {
onOpen();
setTeamName('');
}}
variant={'white-bg-icon'}
mr="4px"
p="4px"
aria-label={'create team'}
icon={<AddIcon boxSize={'20px'} color={'brightBlue.600'} />}
/>
)}
<Modal isOpen={isOpen} onClose={onClose} isCentered>
<ModalOverlay />
<ModalContent
Expand Down
Loading

0 comments on commit 160b7a2

Please sign in to comment.