style: workspace and project settings (#946)

This commit is contained in:
Aaryan Khandelwal 2023-04-24 13:21:09 +05:30 committed by GitHub
parent d8a5b8d848
commit 7234d6f68b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 66 additions and 58 deletions

View File

@ -36,7 +36,7 @@ const EmojiIconPicker: React.FC<Props> = ({
const [isOpen, setIsOpen] = useState(false); const [isOpen, setIsOpen] = useState(false);
const [openColorPicker, setOpenColorPicker] = useState(false); const [openColorPicker, setOpenColorPicker] = useState(false);
const [activeColor, setActiveColor] = useState<string>("#020617"); const [activeColor, setActiveColor] = useState<string>("#858e96");
const [recentEmojis, setRecentEmojis] = useState<string[]>([]); const [recentEmojis, setRecentEmojis] = useState<string[]>([]);
@ -69,8 +69,8 @@ const EmojiIconPicker: React.FC<Props> = ({
leaveFrom="transform opacity-100 scale-100" leaveFrom="transform opacity-100 scale-100"
leaveTo="transform opacity-0 scale-95" leaveTo="transform opacity-0 scale-95"
> >
<Popover.Panel className="absolute z-10 mt-2 w-[250px] rounded-[4px] bg-brand-surface-2 shadow-lg"> <Popover.Panel className="absolute z-10 mt-2 w-[250px] rounded-[4px] border border-brand-base bg-brand-surface-2 shadow-lg">
<div className="h-[230px] w-[250px] overflow-auto border border-brand-base rounded-[4px] bg-brand-surface-2 p-2 shadow-xl"> <div className="h-[230px] w-[250px] overflow-auto rounded-[4px] border border-brand-base bg-brand-surface-2 p-2 shadow-xl">
<Tab.Group as="div" className="flex h-full w-full flex-col"> <Tab.Group as="div" className="flex h-full w-full flex-col">
<Tab.List className="flex-0 -mx-2 flex justify-around gap-1 p-1"> <Tab.List className="flex-0 -mx-2 flex justify-around gap-1 p-1">
{tabOptions.map((tab) => ( {tabOptions.map((tab) => (
@ -82,7 +82,7 @@ const EmojiIconPicker: React.FC<Props> = ({
setOpenColorPicker(false); setOpenColorPicker(false);
}} }}
className={`-my-1 w-1/2 border-b pb-2 text-center text-sm font-medium outline-none transition-colors ${ className={`-my-1 w-1/2 border-b pb-2 text-center text-sm font-medium outline-none transition-colors ${
selected ? "border-theme text-theme" : "border-transparent text-gray-500" selected ? "" : "border-transparent text-brand-secondary"
}`} }`}
> >
{tab.title} {tab.title}
@ -95,12 +95,12 @@ const EmojiIconPicker: React.FC<Props> = ({
<Tab.Panel> <Tab.Panel>
{recentEmojis.length > 0 && ( {recentEmojis.length > 0 && (
<div className="py-2"> <div className="py-2">
<h3 className="mb-2 ml-1 text-xs text-gray-400">Recent</h3> <h3 className="mb-2 text-xs text-brand-secondary">Recent</h3>
<div className="grid grid-cols-8 gap-2"> <div className="grid grid-cols-8 gap-2">
{recentEmojis.map((emoji) => ( {recentEmojis.map((emoji) => (
<button <button
type="button" type="button"
className="h-4 w-4 select-none text-sm hover:bg-brand-surface-2 flex items-center justify-between" className="flex h-4 w-4 select-none items-center justify-between text-sm"
key={emoji} key={emoji}
onClick={() => { onClick={() => {
onChange(emoji); onChange(emoji);
@ -113,13 +113,13 @@ const EmojiIconPicker: React.FC<Props> = ({
</div> </div>
</div> </div>
)} )}
<hr className="w-full h-[1px] mb-2" /> <hr className="mb-2 h-[1px] w-full border-brand-base" />
<div> <div>
<div className="grid grid-cols-8 gap-x-2 gap-y-3"> <div className="grid grid-cols-8 gap-x-2 gap-y-3">
{emojis.map((emoji) => ( {emojis.map((emoji) => (
<button <button
type="button" type="button"
className="h-4 w-4 mb-1 select-none text-sm hover:bg-brand-surface-2 flex items-center" className="mb-1 flex h-4 w-4 select-none items-center text-sm"
key={emoji} key={emoji}
onClick={() => { onClick={() => {
onChange(emoji); onChange(emoji);
@ -136,7 +136,7 @@ const EmojiIconPicker: React.FC<Props> = ({
<div className="py-2"> <div className="py-2">
<Tab.Panel className="flex h-full w-full flex-col justify-center"> <Tab.Panel className="flex h-full w-full flex-col justify-center">
<div className="relative"> <div className="relative">
<div className="pb-2 px-1 flex items-center justify-between"> <div className="flex items-center justify-between px-1 pb-2">
{[ {[
"#FF6B00", "#FF6B00",
"#8CC1FF", "#8CC1FF",
@ -147,7 +147,7 @@ const EmojiIconPicker: React.FC<Props> = ({
"#000000", "#000000",
].map((curCol) => ( ].map((curCol) => (
<span <span
className="w-4 h-4 rounded-full cursor-pointer" className="h-4 w-4 cursor-pointer rounded-full"
style={{ backgroundColor: curCol }} style={{ backgroundColor: curCol }}
onClick={() => setActiveColor(curCol)} onClick={() => setActiveColor(curCol)}
/> />
@ -158,14 +158,14 @@ const EmojiIconPicker: React.FC<Props> = ({
className="flex items-center gap-1" className="flex items-center gap-1"
> >
<span <span
className="w-4 h-4 rounded-full conical-gradient" className="conical-gradient h-4 w-4 rounded-full"
style={{ backgroundColor: activeColor }} style={{ backgroundColor: activeColor }}
/> />
</button> </button>
</div> </div>
<div> <div>
<TwitterPicker <TwitterPicker
className={`m-2 !absolute top-4 left-4 z-10 ${ className={`!absolute top-4 left-4 z-10 m-2 ${
openColorPicker ? "block" : "hidden" openColorPicker ? "block" : "hidden"
}`} }`}
color={activeColor} color={activeColor}
@ -178,13 +178,12 @@ const EmojiIconPicker: React.FC<Props> = ({
/> />
</div> </div>
</div> </div>
<hr className="w-full h-[1px] mb-1" /> <hr className="mb-1 h-[1px] w-full border-brand-base" />
<div className="mt-1 ml-1 grid grid-cols-8 gap-x-2 gap-y-3">
<div className="grid grid-cols-8 mt-1 ml-1 gap-x-2 gap-y-3">
{icons.material_rounded.map((icon) => ( {icons.material_rounded.map((icon) => (
<button <button
type="button" type="button"
className="h-4 w-4 mb-1 select-none text-lg hover:bg-brand-surface-2 flex items-center" className="mb-1 flex h-4 w-4 select-none items-center text-lg"
key={icon.name} key={icon.name}
onClick={() => { onClick={() => {
if (onIconsClick) onIconsClick(icon.name); if (onIconsClick) onIconsClick(icon.name);

View File

@ -99,7 +99,7 @@ export const SingleIntegrationCard: React.FC<Props> = ({ integration }) => {
); );
return ( return (
<div className="flex items-center justify-between gap-2 rounded-[10px] border border-brand-base bg-brand-surface-2 p-5"> <div className="flex items-center justify-between gap-2 rounded-[10px] border border-brand-base bg-brand-base p-5">
<div className="flex items-start gap-4"> <div className="flex items-start gap-4">
<div className="h-12 w-12 flex-shrink-0"> <div className="h-12 w-12 flex-shrink-0">
<Image <Image

View File

@ -82,7 +82,7 @@ const ProjectAuthorizationWrapped: React.FC<Props> = ({
) : error?.status === 404 ? ( ) : error?.status === 404 ? (
<div className="container grid h-screen place-items-center"> <div className="container grid h-screen place-items-center">
<div className="space-y-4 text-center"> <div className="space-y-4 text-center">
<p className="text-2xl font-semibold">No such project exist. Create one?</p> <p className="text-2xl font-semibold">No such project exists. Create one?</p>
<PrimaryButton <PrimaryButton
onClick={() => { onClick={() => {
const e = new KeyboardEvent("keydown", { key: "p" }); const e = new KeyboardEvent("keydown", { key: "p" });
@ -131,7 +131,7 @@ const ProjectAuthorizationWrapped: React.FC<Props> = ({
<div className="mb-12 space-y-6"> <div className="mb-12 space-y-6">
<div> <div>
<h3 className="text-3xl font-semibold">Project Settings</h3> <h3 className="text-3xl font-semibold">Project Settings</h3>
<p className="mt-1 text-gray-600"> <p className="mt-1 text-brand-secondary">
This information will be displayed to every member of the project. This information will be displayed to every member of the project.
</p> </p>
</div> </div>

View File

@ -143,7 +143,7 @@ export const WorkspaceAuthorizationLayout: React.FC<Props> = ({
<h3 className="text-3xl font-semibold"> <h3 className="text-3xl font-semibold">
{profilePage ? "Profile" : "Workspace"} Settings {profilePage ? "Profile" : "Workspace"} Settings
</h3> </h3>
<p className="mt-1 text-gray-600"> <p className="mt-1 text-brand-secondary">
{profilePage {profilePage
? "This information will be visible to only you." ? "This information will be visible to only you."
: "This information will be displayed to every member of the workspace."} : "This information will be displayed to every member of the workspace."}

View File

@ -107,8 +107,8 @@ const ControlSettings: NextPage = () => {
<div className="space-y-8 sm:space-y-12"> <div className="space-y-8 sm:space-y-12">
<div className="grid grid-cols-12 items-start gap-4 sm:gap-16"> <div className="grid grid-cols-12 items-start gap-4 sm:gap-16">
<div className="col-span-12 sm:col-span-6"> <div className="col-span-12 sm:col-span-6">
<h4 className="text-xl font-semibold">Project Lead</h4> <h4 className="text-lg font-semibold">Project Lead</h4>
<p className="text-brand-secondary">Select the project leader.</p> <p className="text-sm text-brand-secondary">Select the project leader.</p>
</div> </div>
<div className="col-span-12 sm:col-span-6"> <div className="col-span-12 sm:col-span-6">
{projectDetails ? ( {projectDetails ? (
@ -120,7 +120,7 @@ const ControlSettings: NextPage = () => {
{...field} {...field}
label={ label={
people?.find((person) => person.member.id === field.value)?.member people?.find((person) => person.member.id === field.value)?.member
.first_name ?? "Select Lead" .first_name ?? <span className="text-brand-secondary">Select lead</span>
} }
width="w-full" width="w-full"
input input
@ -167,8 +167,10 @@ const ControlSettings: NextPage = () => {
</div> </div>
<div className="grid grid-cols-12 items-start gap-4 sm:gap-16"> <div className="grid grid-cols-12 items-start gap-4 sm:gap-16">
<div className="col-span-12 sm:col-span-6"> <div className="col-span-12 sm:col-span-6">
<h4 className="text-xl font-semibold">Default Assignee</h4> <h4 className="text-lg font-semibold">Default Assignee</h4>
<p className="text-brand-secondary">Select the default assignee for the project.</p> <p className="text-sm text-brand-secondary">
Select the default assignee for the project.
</p>
</div> </div>
<div className="col-span-12 sm:col-span-6"> <div className="col-span-12 sm:col-span-6">
{projectDetails ? ( {projectDetails ? (
@ -179,8 +181,9 @@ const ControlSettings: NextPage = () => {
<CustomSelect <CustomSelect
{...field} {...field}
label={ label={
people?.find((p) => p.member.id === field.value)?.member.first_name ?? people?.find((p) => p.member.id === field.value)?.member.first_name ?? (
"Select Default Assignee" <span className="text-brand-secondary">Select default assignee</span>
)
} }
width="w-full" width="w-full"
input input

View File

@ -155,8 +155,10 @@ const GeneralSettings: NextPage = () => {
<div className="space-y-8 sm:space-y-12"> <div className="space-y-8 sm:space-y-12">
<div className="grid grid-cols-12 items-start gap-4 sm:gap-16"> <div className="grid grid-cols-12 items-start gap-4 sm:gap-16">
<div className="col-span-12 sm:col-span-6"> <div className="col-span-12 sm:col-span-6">
<h4 className="text-xl font-semibold">Icon & Name</h4> <h4 className="text-lg font-semibold">Icon & Name</h4>
<p className="text-brand-secondary">Select an icon and a name for your project.</p> <p className="text-sm text-brand-secondary">
Select an icon and a name for your project.
</p>
</div> </div>
<div className="col-span-12 flex gap-2 sm:col-span-6"> <div className="col-span-12 flex gap-2 sm:col-span-6">
{projectDetails ? ( {projectDetails ? (
@ -196,8 +198,8 @@ const GeneralSettings: NextPage = () => {
</div> </div>
<div className="grid grid-cols-12 gap-4 sm:gap-16"> <div className="grid grid-cols-12 gap-4 sm:gap-16">
<div className="col-span-12 sm:col-span-6"> <div className="col-span-12 sm:col-span-6">
<h4 className="text-xl font-semibold">Description</h4> <h4 className="text-lg font-semibold">Description</h4>
<p className="text-brand-secondary">Give a description to your project.</p> <p className="text-sm text-brand-secondary">Give a description to your project.</p>
</div> </div>
<div className="col-span-12 sm:col-span-6"> <div className="col-span-12 sm:col-span-6">
{projectDetails ? ( {projectDetails ? (
@ -208,7 +210,7 @@ const GeneralSettings: NextPage = () => {
register={register} register={register}
placeholder="Enter project description" placeholder="Enter project description"
validations={{}} validations={{}}
className="min-h-[46px]" className="min-h-[46px] text-sm"
/> />
) : ( ) : (
<Loader className="w-full"> <Loader className="w-full">
@ -219,8 +221,10 @@ const GeneralSettings: NextPage = () => {
</div> </div>
<div className="grid grid-cols-12 gap-4 sm:gap-16"> <div className="grid grid-cols-12 gap-4 sm:gap-16">
<div className="col-span-12 sm:col-span-6"> <div className="col-span-12 sm:col-span-6">
<h4 className="text-xl font-semibold">Cover Photo</h4> <h4 className="text-lg font-semibold">Cover Photo</h4>
<p className="text-gray-500">Select your cover photo from the given library.</p> <p className="text-sm text-gray-500">
Select your cover photo from the given library.
</p>
</div> </div>
<div className="col-span-12 sm:col-span-6"> <div className="col-span-12 sm:col-span-6">
{watch("cover_image") ? ( {watch("cover_image") ? (
@ -253,8 +257,8 @@ const GeneralSettings: NextPage = () => {
</div> </div>
<div className="grid grid-cols-12 gap-4 sm:gap-16"> <div className="grid grid-cols-12 gap-4 sm:gap-16">
<div className="col-span-12 sm:col-span-6"> <div className="col-span-12 sm:col-span-6">
<h4 className="text-xl font-semibold">Identifier</h4> <h4 className="text-lg font-semibold">Identifier</h4>
<p className="text-brand-secondary"> <p className="text-sm text-brand-secondary">
Create a 1-6 characters{"'"} identifier for the project. Create a 1-6 characters{"'"} identifier for the project.
</p> </p>
</div> </div>
@ -289,8 +293,8 @@ const GeneralSettings: NextPage = () => {
</div> </div>
<div className="grid grid-cols-12 gap-4 sm:gap-16"> <div className="grid grid-cols-12 gap-4 sm:gap-16">
<div className="col-span-12 sm:col-span-6"> <div className="col-span-12 sm:col-span-6">
<h4 className="text-xl font-semibold">Network</h4> <h4 className="text-lg font-semibold">Network</h4>
<p className="text-brand-secondary">Select privacy type for the project.</p> <p className="text-sm text-brand-secondary">Select privacy type for the project.</p>
</div> </div>
<div className="col-span-12 sm:col-span-6"> <div className="col-span-12 sm:col-span-6">
{projectDetails ? ( {projectDetails ? (
@ -336,8 +340,8 @@ const GeneralSettings: NextPage = () => {
</div> </div>
<div className="grid grid-cols-12 gap-4 sm:gap-16"> <div className="grid grid-cols-12 gap-4 sm:gap-16">
<div className="col-span-12 sm:col-span-6"> <div className="col-span-12 sm:col-span-6">
<h4 className="text-xl font-semibold">Danger Zone</h4> <h4 className="text-lg font-semibold">Danger Zone</h4>
<p className="text-brand-secondary"> <p className="text-sm text-brand-secondary">
The danger zone of the project delete page is a critical area that requires careful The danger zone of the project delete page is a critical area that requires careful
consideration and attention. When deleting a project, all of the data and resources consideration and attention. When deleting a project, all of the data and resources
within that project will be permanently removed and cannot be recovered. within that project will be permanently removed and cannot be recovered.

View File

@ -40,26 +40,28 @@ const BillingSettings: NextPage = () => {
> >
<section className="space-y-8"> <section className="space-y-8">
<div> <div>
<h3 className="text-3xl font-bold leading-6 text-gray-900">Billing & Plans</h3> <h3 className="text-3xl font-bold leading-6">Billing & Plans</h3>
<p className="mt-4 text-sm text-gray-500">[Free launch preview] plan Pro</p> <p className="mt-4 text-sm text-brand-secondary">[Free launch preview] plan Pro</p>
</div> </div>
<div className="space-y-8 md:w-2/3"> <div className="space-y-8 md:w-2/3">
<div> <div>
<div className="w-80 rounded-md border bg-white p-4 text-center"> <div className="w-80 rounded-md border border-brand-base bg-brand-base p-4 text-center">
<h4 className="text-md mb-1 leading-6 text-gray-900">Payment due</h4> <h4 className="text-md mb-1 leading-6">Payment due</h4>
<h2 className="text-3xl font-extrabold">--</h2> <h2 className="text-3xl font-extrabold">--</h2>
</div> </div>
</div> </div>
<div> <div>
<h4 className="text-md mb-1 leading-6 text-gray-900">Current plan</h4> <h4 className="text-md mb-1 leading-6">Current plan</h4>
<p className="mb-3 text-sm text-gray-500">You are currently using the free plan</p> <p className="mb-3 text-sm text-brand-secondary">
You are currently using the free plan
</p>
<a href="https://plane.so/pricing" target="_blank" rel="noreferrer"> <a href="https://plane.so/pricing" target="_blank" rel="noreferrer">
<SecondaryButton outline>View Plans and Upgrade</SecondaryButton> <SecondaryButton outline>View Plans and Upgrade</SecondaryButton>
</a> </a>
</div> </div>
<div> <div>
<h4 className="text-md mb-1 leading-6 text-gray-900">Billing history</h4> <h4 className="text-md mb-1 leading-6">Billing history</h4>
<p className="mb-3 text-sm text-gray-500">There are no invoices to display</p> <p className="mb-3 text-sm text-brand-secondary">There are no invoices to display</p>
</div> </div>
</div> </div>
</section> </section>

View File

@ -176,8 +176,8 @@ const WorkspaceSettings: NextPage = () => {
<div className="space-y-8 sm:space-y-12"> <div className="space-y-8 sm:space-y-12">
<div className="grid grid-cols-12 gap-4 sm:gap-16"> <div className="grid grid-cols-12 gap-4 sm:gap-16">
<div className="col-span-12 sm:col-span-6"> <div className="col-span-12 sm:col-span-6">
<h4 className="text-xl font-semibold">Logo</h4> <h4 className="text-lg font-semibold">Logo</h4>
<p className="text-brand-secondary"> <p className="text-sm text-brand-secondary">
Max file size is 5MB. Supported file types are .jpg and .png. Max file size is 5MB. Supported file types are .jpg and .png.
</p> </p>
</div> </div>
@ -220,8 +220,8 @@ const WorkspaceSettings: NextPage = () => {
</div> </div>
<div className="grid grid-cols-12 gap-4 sm:gap-16"> <div className="grid grid-cols-12 gap-4 sm:gap-16">
<div className="col-span-12 sm:col-span-6"> <div className="col-span-12 sm:col-span-6">
<h4 className="text-xl font-semibold">URL</h4> <h4 className="text-lg font-semibold">URL</h4>
<p className="text-brand-secondary">Your workspace URL.</p> <p className="text-sm text-brand-secondary">Your workspace URL.</p>
</div> </div>
<div className="col-span-12 flex items-center gap-2 sm:col-span-6"> <div className="col-span-12 flex items-center gap-2 sm:col-span-6">
<Input <Input
@ -260,8 +260,8 @@ const WorkspaceSettings: NextPage = () => {
</div> </div>
<div className="grid grid-cols-12 gap-4 sm:gap-16"> <div className="grid grid-cols-12 gap-4 sm:gap-16">
<div className="col-span-12 sm:col-span-6"> <div className="col-span-12 sm:col-span-6">
<h4 className="text-xl font-semibold">Name</h4> <h4 className="text-lg font-semibold">Name</h4>
<p className="text-brand-secondary">Give a name to your workspace.</p> <p className="text-sm text-brand-secondary">Give a name to your workspace.</p>
</div> </div>
<div className="col-span-12 sm:col-span-6"> <div className="col-span-12 sm:col-span-6">
<Input <Input
@ -279,8 +279,8 @@ const WorkspaceSettings: NextPage = () => {
</div> </div>
<div className="grid grid-cols-12 gap-4 sm:gap-16"> <div className="grid grid-cols-12 gap-4 sm:gap-16">
<div className="col-span-12 sm:col-span-6"> <div className="col-span-12 sm:col-span-6">
<h4 className="text-xl font-semibold">Company Size</h4> <h4 className="text-lg font-semibold">Company Size</h4>
<p className="text-brand-secondary">How big is your company?</p> <p className="text-sm text-brand-secondary">How big is your company?</p>
</div> </div>
<div className="col-span-12 sm:col-span-6"> <div className="col-span-12 sm:col-span-6">
<Controller <Controller
@ -310,8 +310,8 @@ const WorkspaceSettings: NextPage = () => {
</div> </div>
<div className="grid grid-cols-12 gap-4 sm:gap-16"> <div className="grid grid-cols-12 gap-4 sm:gap-16">
<div className="col-span-12 sm:col-span-6"> <div className="col-span-12 sm:col-span-6">
<h4 className="text-xl font-semibold">Danger Zone</h4> <h4 className="text-lg font-semibold">Danger Zone</h4>
<p className="text-brand-secondary"> <p className="text-sm text-brand-secondary">
The danger zone of the workspace delete page is a critical area that requires The danger zone of the workspace delete page is a critical area that requires
careful consideration and attention. When deleting a workspace, all of the data and careful consideration and attention. When deleting a workspace, all of the data and
resources within that workspace will be permanently removed and cannot be recovered. resources within that workspace will be permanently removed and cannot be recovered.