mirror of
https://github.com/labring/sealos.git
synced 2026-09-01 15:38:06 +08:00
feat(desktop): add community entry (#7054)
Signed-off-by: Nixieboluo <me@sagirii.me>
This commit is contained in:
@@ -73,6 +73,9 @@ desktop:
|
||||
phoneAlertEnabled: false
|
||||
announcementEnabled: false
|
||||
kcRotationEnabled: true
|
||||
communityEnabled: true
|
||||
communityQRCodeImage: ""
|
||||
communityLink: ""
|
||||
gtmId: null
|
||||
auth:
|
||||
billingToken: ""
|
||||
|
||||
@@ -232,6 +232,9 @@ desktop:
|
||||
emailAlertEnabled: false
|
||||
phoneAlertEnabled: false
|
||||
announcementEnabled: false
|
||||
communityEnabled: true
|
||||
communityQRCodeImage: ''
|
||||
communityLink: ''
|
||||
auth:
|
||||
proxyAddress: ''
|
||||
callbackURL: 'https://cloud.example.com/callback'
|
||||
|
||||
@@ -232,6 +232,9 @@ desktop:
|
||||
emailAlertEnabled: false
|
||||
phoneAlertEnabled: false
|
||||
announcementEnabled: false
|
||||
communityEnabled: true
|
||||
communityQRCodeImage: ''
|
||||
communityLink: ''
|
||||
auth:
|
||||
proxyAddress: ''
|
||||
callbackURL: 'https://cloud.example.com/callback'
|
||||
|
||||
@@ -57,6 +57,9 @@ desktopConfig:
|
||||
trackingEnabled: false
|
||||
realNameAuthEnabled: false
|
||||
kcRotationEnabled: false
|
||||
communityEnabled: true
|
||||
communityQRCodeImage: ""
|
||||
communityLink: ""
|
||||
|
||||
# Common URLs (default values)
|
||||
realNameReward: 0
|
||||
|
||||
@@ -91,6 +91,9 @@ data:
|
||||
phoneAlertEnabled: false
|
||||
announcementEnabled: false
|
||||
kcRotationEnabled: {{ .Values.desktopConfig.kcRotationEnabled }}
|
||||
communityEnabled: {{ .Values.desktopConfig.communityEnabled }}
|
||||
communityQRCodeImage: {{ .Values.desktopConfig.communityQRCodeImage | quote }}
|
||||
communityLink: {{ .Values.desktopConfig.communityLink | quote }}
|
||||
auth:
|
||||
callbackURL: "https://{{ .Values.desktopConfig.cloudDomain }}{{ if .Values.desktopConfig.cloudPort }}:{{ .Values.desktopConfig.cloudPort }}{{ end }}/callback"
|
||||
signUpEnabled: {{ .Values.desktopConfig.signUpEnabled }}
|
||||
@@ -189,4 +192,4 @@ data:
|
||||
ssl: {{ .Values.desktopConfig.realNameOSSSSL }}
|
||||
port: {{ .Values.desktopConfig.realNameOSSPort }}
|
||||
realNameBucket: "{{ .Values.desktopConfig.realNameOSSRealNameBucket }}"
|
||||
enterpriseRealNameBucket: "{{ .Values.desktopConfig.realNameOSSEnterpriseRealNameBucket }}"
|
||||
enterpriseRealNameBucket: "{{ .Values.desktopConfig.realNameOSSEnterpriseRealNameBucket }}"
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 527 259"><path fill="url(#a)" fill-opacity=".25" d="m350.82.15 44.03 25.48.25.15v50.37l42.65-24.54.25-.14.25.14 44.02 25.33.25.15v51.65l43.78 25.18.25.15v52.22l-.25.15-43.77 25.19v.61l-.26.15-44.02 25.33-.25.14-.25-.14-43.77-25.19-43.47 25.19-.25.14-.25-.14-43.71-25.33-.25-.15v-50.89l-42.97 24.9-.25.15-.25-.15-42.34-24.54v51l-.25.14-44.34 25.49-.25.14-.25-.14-44.33-25.49-.06-.03-.06.03L87 258.34l-.25.14-.26-.14-43.71-25.49-.25-.14v-.78L.25 207.28l-.25-.14V154.6l.25-.14 43.71-25.49.25-.14.26.14 42.08 24.54v-50.29l.25-.14 44.33-25.33.25-.15.25.15 44.33 25.33.25.14v.98l42.4 24.4v-.05l.26-.14 43.71-25.33.06-.04V51.66l.25-.14 43.16-25v-.74l.25-.15L350.32.15l.25-.15zM131.57 231.62v.51l43.34 24.91v-50.13l-.06-.04zm44.34-25.07v50.49l43.33-24.91v-50.52zM44.54 232.73l41.7 24.3v-48.61zm42.7-24.9v49.2l42.7-24.9v-.86L88.1 207.33zm307.3 23.85h-.02l42.98 24.74v-49.64zm43.96 24.74 43.02-24.76v-.03l-43.02-24.76zm-131.45-24.76 42.71 24.76V206.1l-42.71-24.76zm43.71 24.76 42.72-24.76v-.31l-42.72-24.75zM43.52 231.35l.2.12v-50.03l-.2-.11zm1.2.12 41.52-24.21v-1.03l-41.53-24.2zM1 206.57l41.52 24.2v-50.6l.18-.1L1 155.77zm130.57 23.9 42.27-24.17-42.27-24.33zm307.12-24.65 42.83 24.65v-49.3zm43.83-25.84v50.5l43.03-24.77v-50.49zm-87.73 50.4 42.44-24.6-42.44-24.43zm-43.45-24.6 42.14 24.41v-48.84zm-262.91-.25v.84l41.52 23.75v-48.79zm87.17-49.73v49.46l43.02-24.73v-.14l-42.9-24.66zM44.7 180.66v.2l41.84 24.4v-48.98zm174.9-.85.38.22.25.14v.39l42.1 24.4v-50.5l-42.72-24.75zm43.72 25.14 42.46-24.6-42.46-24.75zm-131.07-24.39 42.34 24.34v-48.53zm297.7-20.38-34.75 20.26 42.3 24.33v-48.93zm8.54 44.6 42.52-24.47-42.52-24.47zm-130.73-24.34 42 24.33v-48.8zm43.3 24.15 41.9-24.28-41.9-24.29zm-262.64-.21 41.03-23.92-41.03-23.92zM1.49 154.89l42.2 24.6 42.72-24.9-42.2-24.6zm262.15-.61v.34l42.4 24.72v-49.63zm43.72 24.98 42.4-24.57v-.23l-42.4-24.57zM176.2 154.73v.13l42.4 24.38v-48.92zm-87.78-.12v.43l42.14 24.1V130.5zm350.57-.25 43.02 24.75 43.03-24.75-43.02-24.76zm-307.12 24.6 42.2-24.14-42.2-24.14zm262.9-.23 42.14-24.42-42.13-24.25zm-43.21-24.47 41.9 24.29v-48.57zm-219.5-24.8 43.03 24.76.12-.07v-49.38l-.12-.06zm-44.52 24.5 43.02-24.6v-.19l.19-.1-43.21-24.7zm88.67-.39 41.9-24.1-41.9-24.12zM438.5 103v50.49l43.02-24.76V78.24zm-218.38 25.84 42.52 24.64V104.2zm87.66.14 42.3 24.5v-49.01zm87.08-.3 42.64 24.72v-49.58zm-131.22 24.44 41.91-24.28-41.9-24.28zm87.43 0 41.9-24.28-41.9-24.28zm-263.02-49.6 43.33 24.75 43.33-24.76-43.33-24.75zm306.8-25.06-.37.21v49.08l42.53-24.8-31.46-18.34zm-130.71 24.5 42.22 24.6V78.5l-.06-.03-.08-.05zm43.22 24.6 41.74-24.33-41.74-24.16zm44.69-24.33 41.43 24.16V79.25zm43.05-25.92v.05l10.99 6.4L438 102.14l43.02-24.75L438 52.62zm-131.46 24.77 42.38-24.7-42.38-24.56zm44.06-24.7 42.37 24.7V52.82zm43.37-25.54v50.24l42.4-24.72v-.27l.26-.15.37-.21v-49.8zM307.05 76.6l42.52-24.65-42.52-24.64zm-42.9-24.65 41.9 24.29V27.67zm43.4-25.89 43.02 24.91 43.03-24.9-43.03-24.91z"/><defs><linearGradient id="a" x1="235.72" x2="527.62" y1="237.99" y2="97.27" gradientUnits="userSpaceOnUse"><stop offset=".27" stop-color="#fff"/><stop offset="1" stop-color="#60a5fa"/></linearGradient></defs></svg>
|
||||
|
After Width: | Height: | Size: 3.1 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 197 55"><path fill="#fff" d="m133.25-33.94 16.72 9.68.1.05v19.13l16.2-9.32.1-.05.09.05 16.72 9.62.1.06V14.9l16.62 9.56.1.06v19.84l-.1.05-16.62 9.57v.23l-.1.06-16.72 9.62-.1.05-.09-.05-16.63-9.57-16.5 9.57-.1.05-.1-.05-16.6-9.62-.1-.06V34.88l-16.31 9.46-.1.06-.1-.06-16.08-9.32V54.4l-.1.06-16.83 9.67-.1.06-.1-.06-16.83-9.67-.02-.02-.03.01-16.6 9.68-.1.06-.1-.06-16.6-9.68-.09-.05v-.3L.09 44.73 0 44.68V24.72l.1-.05 16.6-9.68.1-.06.09.06 15.98 9.32V5.2l.1-.06L49.8-4.47l.1-.05.09.05 16.83 9.62.1.06v.37l16.1 9.27v-.02l.1-.06 16.6-9.62.03-.01v-19.52l.1-.05 16.39-9.5v-.28l.1-.05 16.71-9.68.1-.06zM49.97 53.98v.19l16.46 9.46V44.6l-.02-.01zm16.84-9.53v19.18l16.46-9.46V34.98zm-49.9 9.95 15.84 9.23V45.16zm16.22-9.46v18.69l16.23-9.46v-.33l-15.9-9.09zM149.86 54h-.01l16.33 9.4V44.54zm16.7 9.4L182.9 54v-.02l-16.34-9.4zM116.63 54l16.22 9.4V44.28l-16.22-9.4zm16.6 9.4 16.22-9.4v-.12l-16.22-9.4zm-116.7-9.53.07.05v-19l-.07-.05zm.45.05 15.77-9.2v-.39l-15.77-9.19zM.38 44.46l15.77 9.2V34.43l.07-.04L.38 25.16zm49.6 9.08 16.05-9.18-16.06-9.24zm116.65-9.36 16.27 9.36V34.81zm16.65-9.82v19.18l16.34-9.4V24.96zM149.95 53.5l16.12-9.34-16.12-9.28zm-16.5-9.34 16 9.27V34.88zm-99.86-.1v.32l15.77 9.03V34.88zm33.1-18.88v18.78l16.35-9.4v-.04l-16.3-9.37zM17 34.62v.08l15.88 9.26v-18.6zm66.43-.32.14.08.1.05v.15l15.98 9.27V24.67l-16.22-9.4zm16.6 9.55 16.13-9.35-16.13-9.4zm-49.79-9.27 16.09 9.25V25.39zm113.06-7.73-13.18 7.69 16.07 9.24V25.19zm3.27 16.93 16.15-9.3-16.15-9.29zm-49.66-9.24 15.95 9.24V25.24zm16.45 9.17 15.92-9.22-15.92-9.23zm-99.76-.08 15.58-9.09-15.58-9.08zM.57 24.83l16.02 9.35 16.23-9.46-16.03-9.35zm99.57-.23v.13l16.1 9.39V15.27zm16.6 9.49 16.11-9.34v-.08l-16.1-9.33zm-49.8-9.32v.05l16.1 9.26V15.5zm-33.35-.05v.17l16 9.15V15.57zm133.16-.1 16.34 9.41 16.34-9.4-16.34-9.4zM50.09 33.98l16.03-9.16-16.03-9.17zm99.86-.08 16-9.28-16-9.2zm-16.41-9.3 15.91 9.23V15.37zm-83.38-9.42 16.34 9.4.05-.02V5.8l-.05-.03zm-16.9 9.3 16.33-9.34v-.07l.07-.04-16.4-9.38zm33.67-.14 15.92-9.16-15.92-9.16zm99.63-19.21V24.3l16.34-9.4V-4.28zM83.6 14.94l16.15 9.36V5.58zm33.3.05 16.06 9.3V5.69zm33.07-.11 16.2 9.38V5.43zm-49.84 9.28 15.92-9.22-15.92-9.23zm33.2 0 15.93-9.22-15.92-9.23zM33.45 5.32l16.46 9.4 16.46-9.4-16.46-9.4zM149.98-4.2l-.15.08v18.64L166 5.1l-12-6.99zm-49.65 9.3 16.03 9.35V-4.19l-.02-.01-.03-.02zm16.41 9.35 15.86-9.24-15.86-9.18zm16.98-9.24 15.73 9.17V-3.9zm16.35-9.85v.02l4.2 2.46 12.1 6.95 16.34-9.4-16.34-9.4zm-49.93 9.41 16.1-9.38-16.1-9.33zm16.73-9.38 16.1 9.38v-18.7zm16.48-9.7V4.77l16.1-9.39v-.1l.1-.06.14-.08v-18.91zm-16.72 9.4 16.15-9.36-16.15-9.36zm-16.3-9.36 15.92 9.23V-23.5zm16.48-9.83 16.35 9.46 16.34-9.46-16.34-9.46z"/></svg>
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 338 393"><foreignObject width="172.17" height="301.47" x="-.61" y="-.46"><div xmlns="http://www.w3.org/1999/xhtml" style="backdrop-filter:blur(.3px);clip-path:url(#a);height:100%;width:100%"/></foreignObject><path fill="#fff" fill-opacity=".37" stroke="url(#b)" stroke-opacity=".3" stroke-width=".61" d="M.3 99.04 170.67.67v196.16L.3 299.87z" data-figma-bg-blur-radius=".61"/><path fill="#eef0f7" stroke="url(#c)" stroke-opacity=".3" stroke-width=".3" d="M167.4 199.42.3 300.2l167.1 91.87 169.55-99.37z"/><path stroke="url(#d)" stroke-opacity=".3" stroke-width=".61" d="M296.39 122.35 166.6 194.57v142.75"/><path fill="#f4f4f5" fill-opacity=".37" stroke="#ccdaff" stroke-opacity=".8" stroke-width=".3" d="M336.95 96.75 170.68.26l-1.23 197.54 167.5 94.9z"/><path fill="#a3c4ff" fill-opacity=".4" stroke="#005bff" stroke-opacity=".5" stroke-width=".3" d="m143.06 235.58-51.68-30.35v-28.77l51.68 29.92V85.85l-77.86 45.1V250.2l104.03 60.24 102.82-59.54V130.94l-51.41-29.77-51.41 29.77v89.49z"/><path stroke="#005bff" stroke-opacity=".5" stroke-width=".3" d="m168.79 131.26 51.63 29.8m0 0 51.63-29.8m-51.63 29.8v89.4m-51.63 29.99 51.63-29.8v-.2m-51.63 30-103.6-59.8 26-15m77.6 74.8v30.46m0-90.26 51.63 29.8"/><foreignObject width="172.17" height="294.29" x="165.68" y="96.88"><div xmlns="http://www.w3.org/1999/xhtml" style="backdrop-filter:blur(.3px);clip-path:url(#e);height:100%;width:100%"/></foreignObject><path fill="#c9d3ee" fill-opacity=".37" stroke="url(#f)" stroke-opacity=".3" stroke-width=".61" d="m166.6 195.03 170.35-97.02v193.47L166.6 390.04z" data-figma-bg-blur-radius=".61"/><foreignObject width="338.25" height="196.6" x="-.09" y="-.29"><div xmlns="http://www.w3.org/1999/xhtml" style="backdrop-filter:blur(.3px);clip-path:url(#g);height:100%;width:100%"/></foreignObject><path fill="#e4eafb" fill-opacity=".37" stroke="url(#h)" stroke-opacity=".3" stroke-width=".61" d="M170.68.67 1.13 99.03l166.27 96.33 169.55-97.8z" data-figma-bg-blur-radius=".61"/><defs><linearGradient id="b" x1="170.66" x2=".35" y1="192.69" y2="104.66" gradientUnits="userSpaceOnUse"><stop offset=".5" stop-color="#a3afff"/><stop offset="1" stop-color="#005bff"/></linearGradient><linearGradient id="c" x1="168.63" x2="39.94" y1="203.47" y2="300.62" gradientUnits="userSpaceOnUse"><stop stop-color="#83afff"/><stop offset=".98" stop-color="#0042ba"/></linearGradient><linearGradient id="d" x1="166.6" x2="296.39" y1="229.84" y2="229.84" gradientUnits="userSpaceOnUse"><stop offset=".13" stop-color="#005bff"/><stop offset=".9" stop-color="#fff" stop-opacity="0"/></linearGradient><linearGradient id="f" x1="336.94" x2="167.64" y1="287.4" y2="198.67" gradientUnits="userSpaceOnUse"><stop offset=".5" stop-color="#a3afff"/><stop offset="1" stop-color="#005bff"/></linearGradient><linearGradient id="h" x1="168.63" x2="168.63" y1=".67" y2="195.36" gradientUnits="userSpaceOnUse"><stop offset=".42" stop-color="#a3c4ff"/><stop offset="1" stop-color="#005bff"/></linearGradient><clipPath id="a" transform="translate(.6 .46)"><path d="M.3 99.04 170.67.67v196.16L.3 299.87z"/></clipPath><clipPath id="e" transform="translate(-165.68 -96.88)"><path d="m166.6 195.03 170.35-97.02v193.47L166.6 390.04z"/></clipPath><clipPath id="g" transform="translate(.09 .29)"><path d="M170.68.67 1.13 99.03l166.27 96.33 169.55-97.8z"/></clipPath></defs></svg>
|
||||
|
After Width: | Height: | Size: 3.3 KiB |
@@ -90,6 +90,19 @@
|
||||
"click_on_any_shadow_to_skip": "Click on any shadow to skip",
|
||||
"click_to_upload_file": "Click to upload file",
|
||||
"completed": "Finish",
|
||||
"community": {
|
||||
"menu": {
|
||||
"title": "Community",
|
||||
"badge": "Featured",
|
||||
"description": "Updates • Events • Stories"
|
||||
},
|
||||
"modal": {
|
||||
"title": "Join the Sealos Community",
|
||||
"description": "Help shape the future of Sealos.",
|
||||
"button": "Join Us",
|
||||
"qr_alt": "Sealos community QR code"
|
||||
}
|
||||
},
|
||||
"completed_the_deployment_of_an_nginx_for_the_first_time": "Completed a deployment of nginx for the first time",
|
||||
"confirm": "Confirm",
|
||||
"confirm_again": "confirm again",
|
||||
|
||||
@@ -90,6 +90,19 @@
|
||||
"click_on_any_shadow_to_skip": "点击任意阴影跳过",
|
||||
"click_to_upload_file": "点击上传文件",
|
||||
"completed": "完成",
|
||||
"community": {
|
||||
"menu": {
|
||||
"title": "加入 Sealos 生态群",
|
||||
"badge": "推荐",
|
||||
"description": "产品更新 • 活动福利 • 案例共创"
|
||||
},
|
||||
"modal": {
|
||||
"title": "加入 Sealos 生态群",
|
||||
"description": "与 Sealos 官方共建产品形态!",
|
||||
"button": "即刻入群",
|
||||
"qr_alt": "Sealos 生态群二维码"
|
||||
}
|
||||
},
|
||||
"completed_the_deployment_of_an_nginx_for_the_first_time": "部署一个 nginx ,首次完成 将",
|
||||
"confirm": "确认",
|
||||
"copy": "复制",
|
||||
|
||||
@@ -14,6 +14,10 @@ import {
|
||||
MenuButton,
|
||||
MenuItem,
|
||||
MenuList,
|
||||
Modal,
|
||||
ModalCloseButton,
|
||||
ModalContent,
|
||||
ModalOverlay,
|
||||
Text,
|
||||
useBreakpointValue,
|
||||
useDisclosure,
|
||||
@@ -28,7 +32,9 @@ import WorkspaceToggle from '../team/WorkspaceToggle';
|
||||
import useAppStore from '@/stores/app';
|
||||
import {
|
||||
ArrowLeftRight,
|
||||
ArrowRight,
|
||||
Bell,
|
||||
ChevronRight,
|
||||
Copy,
|
||||
Dock,
|
||||
FileCode,
|
||||
@@ -44,6 +50,7 @@ import { useGuideModalStore } from '@/stores/guideModal';
|
||||
import SecondaryLinks from '../SecondaryLinks';
|
||||
import { useSubscriptionStore } from '@/stores/subscription';
|
||||
import { Badge } from '@sealos/shadcn-ui/badge';
|
||||
import { Button } from '@sealos/shadcn-ui/button';
|
||||
import { cn } from '@sealos/shadcn-ui';
|
||||
import { getPlanBackgroundClass } from '@/utils/styling';
|
||||
import { AlertSettings } from './AlertSettings';
|
||||
@@ -71,6 +78,7 @@ export default function Account() {
|
||||
const kubeconfig = session?.kubeconfig || '';
|
||||
const toast = useToast();
|
||||
const showDisclosure = useDisclosure();
|
||||
const communityDisclosure = useDisclosure();
|
||||
const [, setNotificationAmount] = useState(0);
|
||||
const { openDesktopApp, autolaunch } = useAppStore();
|
||||
const { openGuideModal, initGuide, autoOpenBlocked, blockAutoOpen } = useGuideModalStore();
|
||||
@@ -83,6 +91,9 @@ export default function Account() {
|
||||
const emailAlertEnabled = layoutConfig?.common.emailAlertEnabled && authConfig?.idp.email.enabled;
|
||||
const phoneAlertEnabled = layoutConfig?.common.phoneAlertEnabled && authConfig?.idp.sms.enabled;
|
||||
const alertSettingsEnabled = emailAlertEnabled || phoneAlertEnabled;
|
||||
const communityEnabled = layoutConfig?.common.communityEnabled !== false;
|
||||
const communityQRCodeImage = layoutConfig?.common.communityQRCodeImage;
|
||||
const communityLink = layoutConfig?.common.communityLink;
|
||||
|
||||
const logout = (e: React.MouseEvent<HTMLElement>) => {
|
||||
e.preventDefault();
|
||||
@@ -394,7 +405,87 @@ export default function Account() {
|
||||
</Flex>
|
||||
</MenuItem>
|
||||
</Box>
|
||||
{communityEnabled && (
|
||||
<>
|
||||
<Divider bg={'#E4E4E7'} />
|
||||
|
||||
<Box p={'8px'}>
|
||||
<MenuItem
|
||||
mt="0px"
|
||||
py="6px"
|
||||
px="8px"
|
||||
borderRadius="8px"
|
||||
bg={'rgba(59, 130, 246, 0.15)'}
|
||||
border={'1px solid rgba(59, 130, 246, 0.15)'}
|
||||
position="relative"
|
||||
overflow="hidden"
|
||||
_before={{
|
||||
content: '""',
|
||||
position: 'absolute',
|
||||
inset: 0,
|
||||
bgGradient:
|
||||
'linear(to bottom right, var(--color-background) 13.69%, var(--color-blue-300) 91.5%)',
|
||||
maskImage: "url('/images/hexgrid.svg')",
|
||||
WebkitMaskImage: "url('/images/hexgrid.svg')",
|
||||
maskPosition: 'right center',
|
||||
WebkitMaskPosition: 'right center',
|
||||
maskRepeat: 'no-repeat',
|
||||
WebkitMaskRepeat: 'no-repeat',
|
||||
maskSize: '197px 55px',
|
||||
WebkitMaskSize: '197px 55px',
|
||||
pointerEvents: 'none'
|
||||
}}
|
||||
_hover={{
|
||||
cursor: 'pointer',
|
||||
|
||||
_before: {
|
||||
bgGradient:
|
||||
'linear(to bottom right, var(--color-background) 13.69%, var(--color-blue-500) 91.5%)'
|
||||
}
|
||||
}}
|
||||
_active={{
|
||||
_before: {
|
||||
bgGradient:
|
||||
'linear(to bottom right, var(--color-background) 13.69%, var(--color-blue-500) 91.5%)'
|
||||
}
|
||||
}}
|
||||
className="group"
|
||||
onClick={communityDisclosure.onOpen}
|
||||
>
|
||||
<Flex
|
||||
alignItems="center"
|
||||
gap="8px"
|
||||
w="full"
|
||||
justifyContent="space-between"
|
||||
position="relative"
|
||||
>
|
||||
<div>
|
||||
<div className="flex gap-2 items-center">
|
||||
<span className="font-medium text-sm">
|
||||
{t('common:community.menu.title')}
|
||||
</span>
|
||||
<span className="font-semibold text-xs text-blue-600 py-0.5 px-2.5 rounded-full border-t-[0.5px] border-l-[0.5px] border-t-blue-500 border-l-blue-500 bg-gradient-to-br from-blue-400/40 to-pink-300/40 inset-shadow-[-1px_-1px_2px_0] inset-shadow-white/50">
|
||||
{t('common:community.menu.badge')}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span className="text-xs">
|
||||
{t('common:community.menu.description')}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<ChevronRight className="size-4 text-muted-foreground group-hover:text-blue-600" />
|
||||
</div>
|
||||
</Flex>
|
||||
</MenuItem>
|
||||
</Box>
|
||||
</>
|
||||
)}
|
||||
|
||||
<Divider bg={'#E4E4E7'} />
|
||||
|
||||
<Box p={'8px'}>
|
||||
{/* <MenuItem
|
||||
py="6px"
|
||||
@@ -535,6 +626,43 @@ export default function Account() {
|
||||
phoneEnabled={phoneAlertEnabled}
|
||||
/>
|
||||
|
||||
<Modal isOpen={communityDisclosure.isOpen} onClose={communityDisclosure.onClose} isCentered>
|
||||
<ModalOverlay />
|
||||
<ModalContent
|
||||
className="relative items-center gap-7 overflow-hidden bg-white p-8"
|
||||
width="24rem"
|
||||
>
|
||||
<div className="pointer-events-none absolute inset-x-0 -top-[20%] h-48 bg-[url('/images/sealos-box.svg')] bg-[length:80%_auto] bg-top bg-no-repeat [mask-image:linear-gradient(to_bottom,black_20%,transparent_100%)] [-webkit-mask-image:linear-gradient(to_bottom,black_20%,transparent_100%)]" />
|
||||
<div className="pointer-events-none absolute inset-x-0 bottom-0 h-36 bg-[url('/images/boxgrid.svg')] bg-no-repeat bg-cover bg-top" />
|
||||
<ModalCloseButton className="z-20" />
|
||||
<h1 className="relative z-10 bg-gradient-to-r from-foreground to-blue-800 bg-clip-text text-2xl font-semibold tracking-tight text-transparent">
|
||||
{t('common:community.modal.title')}
|
||||
</h1>
|
||||
<div className="relative z-10 size-40 rounded-xl border border-blue-500 p-2">
|
||||
{communityQRCodeImage && (
|
||||
<Image
|
||||
src={communityQRCodeImage}
|
||||
alt={t('common:community.modal.qr_alt')}
|
||||
className="size-full rounded-lg object-cover"
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
<span className="relative z-10 text-sm font-medium">
|
||||
{t('common:community.modal.description')}
|
||||
</span>
|
||||
<Button
|
||||
className="relative z-10 h-10 w-full"
|
||||
disabled={!communityLink}
|
||||
onClick={() =>
|
||||
communityLink && window.open(communityLink, '_blank', 'noopener,noreferrer')
|
||||
}
|
||||
>
|
||||
{t('common:community.modal.button')}
|
||||
<ArrowRight className="size-4" />
|
||||
</Button>
|
||||
</ModalContent>
|
||||
</Modal>
|
||||
|
||||
{/*
|
||||
{layoutConfig?.common.workorderEnabled && (
|
||||
<Flex
|
||||
|
||||
@@ -98,6 +98,9 @@ export type LayoutConfigType = {
|
||||
phoneAlertEnabled: boolean;
|
||||
announcementEnabled: boolean;
|
||||
kcRotationEnabled: boolean;
|
||||
communityEnabled?: boolean;
|
||||
communityQRCodeImage?: string;
|
||||
communityLink?: string;
|
||||
};
|
||||
gtmId: string | null;
|
||||
};
|
||||
@@ -332,7 +335,10 @@ export const DefaultLayoutConfig: LayoutConfigType = {
|
||||
emailAlertEnabled: false,
|
||||
phoneAlertEnabled: false,
|
||||
announcementEnabled: false,
|
||||
kcRotationEnabled: true
|
||||
kcRotationEnabled: true,
|
||||
communityEnabled: true,
|
||||
communityQRCodeImage: '',
|
||||
communityLink: ''
|
||||
},
|
||||
gtmId: null
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user