-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[dashboard] Misc style updates #3619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,12 +50,12 @@ function AddEnvVarModal(p: EnvVarModalProps) { | |
}; | ||
|
||
return <Modal visible={true} onClose={p.onClose} onEnter={save}> | ||
<h3 className="pb-2">{isNew ? 'New' : 'Edit'} Variable</h3> | ||
<div className="border-t -mx-6 px-6 py-2 flex flex-col"> | ||
{error ? <div className="bg-gitpod-kumquat-light rounded-md p-3 text-red-500 text-sm"> | ||
<h3 className="mb-4">{isNew ? 'New' : 'Edit'} Variable</h3> | ||
<div className="border-t border-b -mx-6 px-6 py-4 flex flex-col"> | ||
{error ? <div className="bg-gitpod-kumquat-light rounded-md p-3 text-red-500 text-sm mb-2"> | ||
{error} | ||
</div> : null} | ||
<div className="mt-4"> | ||
<div> | ||
<h4>Name</h4> | ||
<input className="w-full" type="text" value={ev.name} onChange={(v) => { update({name: v.target.value}) }} /> | ||
</div> | ||
|
@@ -68,8 +68,8 @@ function AddEnvVarModal(p: EnvVarModalProps) { | |
<input className="w-full" type="text" value={ev.repositoryPattern} placeholder="e.g. org/project" | ||
onChange={(v) => { update({repositoryPattern: v.target.value}) }} /> | ||
</div> | ||
<div className="mt-3"> | ||
<p>You can pass a variable for a specific project or use wildcard characters (<span className="text-gitpod-kumquat-dark bg-gitpod-kumquat-light px-1 py-0.5 rounded-md text-sm font-mono">*/*</span>) to make it available in more projects.</p> | ||
<div className="mt-1"> | ||
<p className="text-gray-500">You can pass a variable for a specific project or use wildcard character (<span className="text-gray--300 bg-gray-100 px-1.5 py-1 rounded-md text-sm font-mono font-medium">*/*</span>) to make it available in more projects.</p> | ||
</div> | ||
</div> | ||
<div className="flex justify-end mt-6"> | ||
|
@@ -147,18 +147,27 @@ export default function EnvVars() { | |
envVar={currentEnvVar} | ||
validate={validate} | ||
onClose={() => setAddEnvVarModalVisible(false)} /> : null} | ||
<div className="flex items-start sm:justify-between mb-2"> | ||
<div> | ||
<h3>Environment Variables</h3> | ||
<h2 className="text-gray-500">Variables are used to store information like passwords.</h2> | ||
</div> | ||
{envVars.length !== 0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thought: Not sure if there's a better more efficient way to check this here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. looks good |
||
? | ||
<div className="mt-3 flex mt-0"> | ||
<button onClick={add} className="ml-2">New Variable</button> | ||
</div> | ||
: null} | ||
</div> | ||
{envVars.length === 0 | ||
? <div className="bg-gray-100 rounded-xl w-full h-96"> | ||
<div className="pt-28 flex flex-col items-center w-96 m-auto"> | ||
<h3 className="text-center pb-3 text-gray-500">No Environment Variables</h3> | ||
<div className="text-center pb-6 text-gray-500">In addition to user-specific environment variables you can also pass variables through a workspace creation URL. <a className="text-gray-400 underline underline-thickness-thin underline-offset-small hover:text-gray-600" href="https://www.gitpod.io/docs/environment-variables/#using-the-account-settings">Learn more</a></div> | ||
<button onClick={add}>New Environment Variable</button> | ||
<button onClick={add}>New Variable</button> | ||
</div> | ||
</div> | ||
: <div className="space-y-2"> | ||
<div className="flex justify-end mb-2"> | ||
<button onClick={add} className="ml-2">New Environment Variable</button> | ||
</div> | ||
<div className="flex flex-col space-y-2"> | ||
<div className="px-3 py-3 flex justify-between space-x-2 text-sm text-gray-400 border-t border-b border-gray-200"> | ||
<div className="w-5/12">Name</div> | ||
|
@@ -168,11 +177,11 @@ export default function EnvVars() { | |
</div> | ||
<div className="flex flex-col"> | ||
{envVars.map(ev => { | ||
return <div className="rounded-xl whitespace-nowrap flex space-x-2 py-3 px-3 w-full justify-between hover:bg-gray-100 focus:bg-gitpod-kumquat-light group"> | ||
return <div className="rounded-xl whitespace-nowrap flex space-x-2 py-3 px-3 w-full justify-between hover:bg-gray-100 focus:bg-gitpod-kumquat-light transition ease-in-out group"> | ||
<div className="w-5/12 m-auto">{ev.name}</div> | ||
<div className="w-5/12 m-auto text-sm text-gray-400">{ev.repositoryPattern}</div> | ||
<div className="w-2/12 flex justify-end"> | ||
<div className="flex w-8 self-center hover:bg-gray-200 rounded-md cursor-pointer"> | ||
<div className="flex w-8 self-center hover:bg-gray-200 rounded-md cursor-pointer opacity-0 group-hover:opacity-100"> | ||
<ContextMenu menuEntries={[ | ||
{ | ||
title: 'Edit', | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -254,11 +254,11 @@ function GitProviders() { | |
</Modal> | ||
)} | ||
|
||
<h3>Git Providers</h3> | ||
<h2>Manage permissions for git providers.</h2> | ||
<h3>Git Providers</h3> | ||
<h2>Manage permissions for git providers.</h2> | ||
<div className="flex flex-col pt-6 space-y-2"> | ||
{authProviders && authProviders.map(ap => ( | ||
<div key={"ap-" + ap.authProviderId} className="flex-grow flex flex-row hover:bg-gray-100 rounded-xl h-16 w-full"> | ||
<div key={"ap-" + ap.authProviderId} className="flex-grow flex flex-row hover:bg-gray-100 rounded-xl h-16 w-full transition ease-in-out group"> | ||
<div className="px-4 self-center w-1/12"> | ||
<div className={"rounded-full w-3 h-3 text-sm align-middle " + (isConnected(ap.authProviderId) ? "bg-green-500" : "bg-gray-400")}> | ||
| ||
|
@@ -276,7 +276,7 @@ function GitProviders() { | |
<span className="my-auto truncate text-gray-500 overflow-ellipsis">{getPermissions(ap.authProviderId)?.join(", ") || "–"}</span> | ||
<span className="text-sm my-auto text-gray-400">Permissions</span> | ||
</div> | ||
<div className="my-auto flex w-1/12 pl-8"> | ||
<div className="my-auto flex w-1/12 pl-8 mr-4 opacity-0 group-hover:opacity-100"> | ||
<div className="self-center hover:bg-gray-200 rounded-md cursor-pointer w-8"> | ||
<ContextMenu menuEntries={gitProviderMenu(ap)}> | ||
<img className="w-8 h-8 p-1" src={ThreeDots} alt="Actions" /> | ||
|
@@ -355,21 +355,31 @@ function GitIntegrations() { | |
</Modal> | ||
)} | ||
|
||
<h3 className="flex-grow self-center">Git Integrations</h3> | ||
<h2>Manage git integrations for GitLab or GitHub self-hosted instances.</h2> | ||
<div className="flex items-start sm:justify-between mb-2"> | ||
<div> | ||
<h3>Git Integrations</h3> | ||
<h2 className="text-gray-500">Manage git integrations for GitLab or GitHub self-hosted instances.</h2> | ||
</div> | ||
{providers.length !== 0 | ||
? | ||
<div className="mt-3 flex mt-0"> | ||
<button onClick={() => setModal({ mode: "new" })} className="ml-2 font-medium">New Integration</button> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thought: This could look like weird. An alternative plan could be to a) introduce the table header (see Workspaces, Environment Variables) to add some visual balance or b) keep the New Integration button below the list. |
||
</div> | ||
: null} | ||
</div> | ||
|
||
{providers && providers.length === 0 && ( | ||
<div className="w-full flex h-80 mt-2 rounded-xl bg-gray-100"> | ||
<div className="m-auto text-center"> | ||
<h3 className="self-center text-gray-500 mb-4">No Git Integrations</h3> | ||
<div className="text-gray-500 mb-6">In addition to the default Git Providers you can authorize<br /> with a self hosted instace of a provider.</div> | ||
<button className="self-center" onClick={() => setModal({ mode: "new" })}>New Git Integration</button> | ||
<button className="self-center" onClick={() => setModal({ mode: "new" })}>New Integration</button> | ||
</div> | ||
</div> | ||
)} | ||
<div className="flex flex-col pt-6 space-y-2"> | ||
{providers && providers.map(ap => ( | ||
<div key={"ap-" + ap.id} className="flex-grow flex flex-row hover:bg-gray-100 rounded-xl h-16 w-full"> | ||
<div key={"ap-" + ap.id} className="flex-grow flex flex-row hover:bg-gray-100 rounded-xl h-16 w-full transition ease-in-out group"> | ||
|
||
<div className="px-4 self-center w-1/12"> | ||
<div className={"rounded-full w-3 h-3 text-sm align-middle " + (ap.status === "verified" ? "bg-green-500" : "bg-gray-400")}> | ||
|
@@ -382,7 +392,7 @@ function GitIntegrations() { | |
<div className="p-0 my-auto flex flex-col w-7/12"> | ||
<span className="my-auto truncate text-gray-500 overflow-ellipsis">{ap.host}</span> | ||
</div> | ||
<div className="my-auto flex w-1/12 pl-8"> | ||
<div className="my-auto flex w-1/12 pl-8 opacity-0 group-hover:opacity-100"> | ||
<div className="self-center hover:bg-gray-200 rounded-md cursor-pointer w-8"> | ||
<ContextMenu menuEntries={gitProviderMenu(ap)}> | ||
<img className="w-8 h-8 p-1" src={ThreeDots} alt="Actions" /> | ||
|
@@ -392,11 +402,6 @@ function GitIntegrations() { | |
</div> | ||
))} | ||
</div> | ||
{providers && providers.length > 0 && ( | ||
<div className="flex justify-start mt-6"> | ||
<button className="h-full" onClick={() => setModal({ mode: "new" })}>New Git Integration</button> | ||
</div> | ||
)} | ||
</div>); | ||
} | ||
|
||
|
@@ -584,7 +589,7 @@ function GitIntegrationModal(props: ({ | |
<div className="w-full relative"> | ||
<input name="redirectURL" disabled={true} readOnly={true} type="text" value={redirectURL} className="w-full truncate" /> | ||
<div className="cursor-pointer" onClick={() => copyRedirectUrl()}> | ||
<img src={copy} title="Copy the Redirect URL to clippboard." className="absolute top-1/3 right-3" /> | ||
<img src={copy} title="Copy the Redirect URL to clippboard" className="absolute top-1/3 right-3" /> | ||
</div> | ||
</div> | ||
<span className="text-gray-500 text-sm">{getRedirectUrlDescription(type, host)}</span> | ||
|
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue: We're still missing the whitespace on the right of this page after a recent change. See #3582 (comment)