Skip to content

Commit

Permalink
Merge pull request #284 from usual2970/feat/ui-1030
Browse files Browse the repository at this point in the history
Fix the issue where long domain names or titles overlap the next column.
  • Loading branch information
usual2970 authored Oct 31, 2024
2 parents 10e14ca + d833f4b commit a27a9f5
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 26 deletions.
2 changes: 1 addition & 1 deletion ui/src/components/certimate/DeployToTencentCOS.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const DeployToTencentCOS = () => {
onChange={(e) => {
const temp = e.target.value;

const resp = bucketSchema.safeParse(temp);
const resp = regionSchema.safeParse(temp);
if (!resp.success) {
setError({
...error,
Expand Down
12 changes: 9 additions & 3 deletions ui/src/domain/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ export type NotifyChannels = {
mail?: NotifyChannelMail;
};

export type NotifyChannel = NotifyChannelDingTalk | NotifyChannelLark | NotifyChannelTelegram | NotifyChannelWebhook | NotifyChannelServerChan | NotifyChannelMail;
export type NotifyChannel =
| NotifyChannelDingTalk
| NotifyChannelLark
| NotifyChannelTelegram
| NotifyChannelWebhook
| NotifyChannelServerChan
| NotifyChannelMail;

export type NotifyChannelDingTalk = {
accessToken: string;
Expand Down Expand Up @@ -60,8 +66,8 @@ export type NotifyChannelMail = {
receiverAddresses: string;
smtpHostAddr: string;
smtpHostPort: string;
username:string;
password:string;
username: string;
password: string;
enabled: boolean;
};

Expand Down
4 changes: 3 additions & 1 deletion ui/src/pages/access/Access.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ const Access = () => {
className="flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm"
key={access.id}
>
<div className="sm:w-48 w-full pt-1 sm:pt-0 flex items-center">{access.name}</div>
<div className="sm:w-48 w-full pt-1 sm:pt-0 flex items-start">
<div className="pr-3 truncate">{access.name}</div>
</div>
<div className="sm:w-48 w-full pt-1 sm:pt-0 flex items-center space-x-2">
<img src={accessProvidersMap.get(access.configType)?.icon} className="w-6" />
<div>{t(accessProvidersMap.get(access.configType)?.name || "")}</div>
Expand Down
9 changes: 2 additions & 7 deletions ui/src/pages/dashboard/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,8 @@ const Dashboard = () => {
key={deployment.id}
className="flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm"
>
<div className="sm:w-48 w-full pt-1 sm:pt-0 flex items-center">
{deployment.expand.domain?.domain.split(";").map((domain: string) => (
<>
{domain}
<br />
</>
))}
<div className="sm:w-48 w-full pt-1 sm:pt-0 flex flex-col items-start">
{deployment.expand.domain?.domain.split(";").map((domain: string) => <div className="pr-3 truncate w-full">{domain}</div>)}
</div>
<div className="sm:w-24 w-full pt-1 sm:pt-0 flex items-center">
<DeployState deployment={deployment} />
Expand Down
10 changes: 3 additions & 7 deletions ui/src/pages/domains/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,9 @@ const Home = () => {
className="flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm"
key={domain.id}
>
<div className="sm:w-36 w-full pt-1 sm:pt-0 flex items-center truncate">
{domain.domain.split(";").map((item) => (
<>
{item}
<br />
</>
<div className="sm:w-36 w-full pt-1 sm:pt-0 flex flex-col items-start">
{domain.domain.split(";").map((domain: string) => (
<div className="pr-3 truncate w-full">{domain}</div>
))}
</div>
<div className="sm:w-40 w-full pt-1 sm:pt-0 flex items-center">
Expand Down Expand Up @@ -340,4 +337,3 @@ const Home = () => {
};

export default Home;

9 changes: 2 additions & 7 deletions ui/src/pages/history/History.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,8 @@ const History = () => {
key={deployment.id}
className="flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm"
>
<div className="sm:w-48 w-full pt-1 sm:pt-0 flex items-center">
{deployment.expand.domain?.domain.split(";").map((domain: string) => (
<>
{domain}
<br />
</>
))}
<div className="sm:w-48 w-full pt-1 sm:pt-0 flex items-start flex-col">
{deployment.expand.domain?.domain.split(";").map((domain: string) => <div className="pr-3 truncate w-full">{domain}</div>)}
</div>
<div className="sm:w-24 w-full pt-1 sm:pt-0 flex items-center">
<DeployState deployment={deployment} />
Expand Down

0 comments on commit a27a9f5

Please sign in to comment.