Skip to content

Commit

Permalink
(clean) up styling and improve responsiveness
Browse files Browse the repository at this point in the history
  • Loading branch information
danh91 committed Dec 20, 2023
1 parent 0528419 commit 35499b2
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 19 deletions.
10 changes: 7 additions & 3 deletions apps/dashboard/src/modules/Settings/account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,17 @@ export default function AccountPage(pageProps: any) {

<div>
<div className="columns py-6 my-4">
<div className="column is-5 pr-6">
<div className="column is-5 pr-2">
<p className="subtitle is-6 py-1">Profile</p>
<p className="is-size-7 pr-6">Your email address is your identity on {APP_NAME} and is used to log in.</p>
<p className="is-size-7 pr-2">Your email address is your identity on {APP_NAME} and is used to log in.</p>
</div>

<div className="column is-7">
<div className="column is-4">
<EmailManagement />
<ProfileUpdateInput label="Name (Optional)" propertyKey="full_name" inputType="text" />
</div>

<div className="column is-3"></div>
</div>

<hr style={{ height: '1px' }} />
Expand All @@ -77,6 +79,8 @@ export default function AccountPage(pageProps: any) {
</div>

<PasswordManagement />

<div className="column is-3"></div>
</div>

<hr style={{ height: '1px' }} />
Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard/src/modules/Settings/addresses.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export default function AddressPage(pageProps: any) {
{(address_templates?.edges || []).map(({ node: template }) => (

<tr key={`${template.id}-${Date.now()}`}>
<td className="template is-vcentered is-size-6 has-text-weight-bold text-ellipsis">
<td className="template is-vcentered is-size-7 has-text-weight-bold text-ellipsis">
<span className="text-ellipsis" title={template.label}>{template.label}</span>
</td>
<td className="address is-vcentered is-size-7 has-text-weight-bold has-text-grey text-ellipsis">
Expand Down
4 changes: 2 additions & 2 deletions apps/dashboard/src/modules/Settings/parcels.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ export default function ParcelsPage(pageProps: any) {
{(parcel_templates?.edges || []).map(({ node: template }) => (

<tr key={`${template.id}-${Date.now()}`}>
<td className="template is-vcentered is-size-6 has-text-weight-bold text-ellipsis">
<td className="template is-vcentered is-size-7 has-text-weight-bold text-ellipsis">
<span className="text-ellipsis" title={template.label}>{template.label}</span>
</td>
<td className="parcel is-vcentered">
<td className="parcel is-vcentered text-ellipsis">
<ParcelDescription parcel={template.parcel as any} />
</td>
<td className="default is-vcentered has-text-right">
Expand Down
16 changes: 11 additions & 5 deletions apps/dashboard/src/styles/dashboard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ Karrio custom styling
}

.action {
width: 15%;
width: 150px;
min-width: 150px;
}
}

Expand All @@ -154,10 +155,12 @@ Karrio custom styling

.default {
width: 100px;
min-width: 100px;
}

.action {
width: 90px;
min-width: 90px;
}
}

Expand All @@ -168,16 +171,17 @@ Karrio custom styling
}

.parcel {
min-width: 10vw;
min-width: 250px;
}

.default {
width: 10%;
width: 100px;
min-width: 100px;
}

.action {
width: 90px;
min-width: 90px;
}
}

Expand Down Expand Up @@ -356,15 +360,17 @@ Karrio custom styling
.members-table {
.member {
width: 40%;
min-width: 150px;
}

.role {
width: 25%;
min-width: 150px;
}

.last-login {
width: 25%;
min-width: 150px;
width: 180px;
min-width: 180px;
}

.action {
Expand Down
5 changes: 4 additions & 1 deletion packages/ui/forms/organization-management.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@ export const OrganizationManagement: React.FC<OrganizationManagementComponent> =
<p className="subtitle is-6 py-1">Organization Name</p>
</div>

<div className="column is-7">
<div className="column is-5">

<OrganizationUpdateInput propertyKey="name" inputType="text" />

</div>

<div className="column is-2"></div>
</div>

<header className="px-0 pt-4">
Expand Down Expand Up @@ -83,6 +85,7 @@ export const OrganizationManagement: React.FC<OrganizationManagementComponent> =
{member.is_admin && <span className="is-size-7">Admin</span>}
{member.is_admin && member.is_owner && ', '}
{member.is_owner && <span className="is-size-7">Owner</span>}
{!member.is_admin && !member.is_owner && <span className="is-size-7">View Only</span>}
</p>
</td>
<td className="last-login is-vcentered">
Expand Down
1 change: 0 additions & 1 deletion packages/ui/forms/organization-update-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ export const OrganizationUpdateInput: React.FC<OrganizationUpdateInputComponent>
onChange={handleOnChange}
defaultValue={((organization || {}) as any)[propertyKey] || ""}
type={inputType}
style={{ maxWidth: "60%" }}
disabled={!organization?.current_user?.is_admin}
required
/>
Expand Down
10 changes: 5 additions & 5 deletions packages/ui/forms/password-management.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,28 +69,28 @@ export const PasswordManagement: React.FC<{}> = () => {
}

return (
<form method="post" onSubmit={onSubmit} className="column is-7">
<form method="post" onSubmit={onSubmit} className="column">

<InputField
label="Current Password" name="old_password" type="password"
placeholder="Current Password" className="is-small" fieldClass="mt-3"
onChange={handleChange} value={data.old_password} style={{ maxWidth: "60%" }} required>
onChange={handleChange} value={data.old_password} required>
{renderFieldError("old_password", error)}
</InputField>

<hr style={{ height: "1px", maxWidth: "60%" }} />
<hr style={{ height: "1px" }} />

<InputField
label="New Password" name="new_password1" type="password"
placeholder="New Password" className="is-small" fieldClass="mt-3"
onChange={handleChange} value={data.new_password1} style={{ maxWidth: "60%" }} required>
onChange={handleChange} value={data.new_password1} required>
{renderFieldError("new_password1", error)}
</InputField>

<InputField
label="Confirm New Password" name="new_password2" type="password"
placeholder="Confirm Password" className="is-small" fieldClass="mt-3"
onChange={handleChange} value={data.new_password2} style={{ maxWidth: "60%" }} required>
onChange={handleChange} value={data.new_password2} required>
{renderFieldError("new_password2", error)}
</InputField>

Expand Down
3 changes: 2 additions & 1 deletion packages/ui/forms/profile-update-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ export const ProfileUpdateInput: React.FC<ProfileUpdateInputComponent> = ({ labe
onChange={handleOnChange}
defaultValue={((user || {}) as any)[propertyKey] || ""}
type={inputType}
style={{ maxWidth: "60%" }} required />
required
/>

<input className="button is-success is-small mr-1" type="submit" value="Save"
style={{ visibility: (hasChanged ? "visible" : "hidden") }} />
Expand Down

0 comments on commit 35499b2

Please sign in to comment.