|
1 | 1 | import { UserPrefView } from "@/components/preference/list"; |
2 | 2 | import { Button } from "@/components/ui/button"; |
| 3 | +import { Link } from "@/components/ui/link"; |
3 | 4 | import settings from "@/data/preferences"; |
4 | 5 | import { useAuth } from "@/hooks/store/useAuth"; |
5 | 6 | import { Native, User } from "@aws/amazon-q-developer-cli-api-bindings"; |
@@ -94,39 +95,61 @@ export default function Page() { |
94 | 95 | </p> |
95 | 96 |
|
96 | 97 | {auth.authed && auth.authKind === "IamIdentityCenter" && ( |
97 | | - <div className="py-4 flex flex-col gap-1"> |
98 | | - <h3 className="font-medium leading-none">Active Profile</h3> |
99 | | - <p className="font-light leading-tight text-sm"> |
100 | | - SSO users with multiple profiles can select them here |
101 | | - </p> |
102 | | - {profiles ? ( |
103 | | - <Select |
104 | | - value={profile?.arn} |
105 | | - onValueChange={(profile) => { |
106 | | - onProfileChange(profiles?.find((p) => p.arn === profile)); |
107 | | - }} |
108 | | - disabled={!profiles} |
109 | | - > |
110 | | - <SelectTrigger className="w-60"> |
111 | | - <SelectValue placeholder="No Profile Selected" /> |
112 | | - </SelectTrigger> |
113 | | - <SelectContent> |
114 | | - {profiles && |
115 | | - profiles.map((p) => ( |
116 | | - <SelectItem |
117 | | - key={p.arn} |
118 | | - value={p.arn} |
119 | | - description={p.arn} |
120 | | - > |
121 | | - {p.profileName} |
122 | | - </SelectItem> |
123 | | - ))} |
124 | | - </SelectContent> |
125 | | - </Select> |
126 | | - ) : ( |
127 | | - <Skeleton className="w-60 h-10" /> |
128 | | - )} |
129 | | - </div> |
| 98 | + <> |
| 99 | + <div className="flex flex-col p-4 mt-2 gap-4 rounded-lg bg-zinc-50 dark:bg-zinc-900 border border-zinc-100 dark:border-zinc-700"> |
| 100 | + <div className="flex flex-col items-start gap-1"> |
| 101 | + <h4 className="font-medium leading-none">Start URL</h4> |
| 102 | + <Link |
| 103 | + href={auth.startUrl ?? ""} |
| 104 | + className="font-light leading-tight text-sm text-black/50 dark:text-white/50" |
| 105 | + > |
| 106 | + {auth.startUrl} |
| 107 | + </Link> |
| 108 | + </div> |
| 109 | + <div className="flex flex-col items-start gap-1"> |
| 110 | + <h4 className="font-medium leading-none">Region</h4> |
| 111 | + <p className="font-light leading-tight text-sm text-black/50 dark:text-white/50"> |
| 112 | + {auth.region} |
| 113 | + </p> |
| 114 | + </div> |
| 115 | + </div> |
| 116 | + |
| 117 | + <div className="py-4 flex flex-col gap-1"> |
| 118 | + <h3 className="font-medium leading-none">Active Profile</h3> |
| 119 | + <p className="font-light leading-tight text-sm"> |
| 120 | + SSO users with multiple profiles can select them here |
| 121 | + </p> |
| 122 | + {profiles ? ( |
| 123 | + <Select |
| 124 | + value={profile?.arn} |
| 125 | + onValueChange={(profile) => { |
| 126 | + onProfileChange( |
| 127 | + profiles?.find((p) => p.arn === profile), |
| 128 | + ); |
| 129 | + }} |
| 130 | + disabled={!profiles} |
| 131 | + > |
| 132 | + <SelectTrigger className="w-60"> |
| 133 | + <SelectValue placeholder="No Profile Selected" /> |
| 134 | + </SelectTrigger> |
| 135 | + <SelectContent> |
| 136 | + {profiles && |
| 137 | + profiles.map((p) => ( |
| 138 | + <SelectItem |
| 139 | + key={p.arn} |
| 140 | + value={p.arn} |
| 141 | + description={p.arn} |
| 142 | + > |
| 143 | + {p.profileName} |
| 144 | + </SelectItem> |
| 145 | + ))} |
| 146 | + </SelectContent> |
| 147 | + </Select> |
| 148 | + ) : ( |
| 149 | + <Skeleton className="w-60 h-10" /> |
| 150 | + )} |
| 151 | + </div> |
| 152 | + </> |
130 | 153 | )} |
131 | 154 | <div className="pt-2"> |
132 | 155 | <Button |
|
0 commit comments