Skip to content

Commit 6f9ee72

Browse files
committed
adjust for smaller screens
1 parent 8c342e3 commit 6f9ee72

File tree

6 files changed

+34
-22
lines changed

6 files changed

+34
-22
lines changed

frontend/src/features/browser-profiles/templates/badges.ts

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,15 @@ import capitalize from "lodash/fp/capitalize";
66
import { CrawlerChannelImage, type Profile } from "@/types/crawler";
77

88
export const usageBadge = (inUse: boolean) =>
9-
html`<btrix-badge
10-
variant=${inUse ? "cyan" : "neutral"}
11-
class="font-monostyle"
12-
>
13-
<sl-icon
14-
name=${inUse ? "check-circle" : "dash-circle"}
15-
class="mr-1.5"
16-
></sl-icon>
17-
${inUse ? msg("In Use") : msg("Not In Use")}
18-
</btrix-badge>`;
9+
html`<sl-tooltip content=${msg("Crawl Workflow Usage")}>
10+
<btrix-badge variant=${inUse ? "cyan" : "neutral"} class="font-monostyle">
11+
<sl-icon
12+
name=${inUse ? "check-circle" : "dash-circle"}
13+
class="mr-1.5"
14+
></sl-icon>
15+
${inUse ? msg("In Use") : msg("Not In Use")}
16+
</btrix-badge>
17+
</sl-tooltip>`;
1918

2019
export const badges = (
2120
profile: Partial<Pick<Profile, "inUse" | "crawlerChannel" | "proxyId">>,

frontend/src/features/crawl-workflows/workflow-list.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@ const rowCss = css`
5656
.row {
5757
display: grid;
5858
grid-template-columns: 1fr;
59+
position: relative;
60+
}
61+
62+
.action {
63+
position: absolute;
64+
top: 0;
65+
right: 0;
5966
}
6067
6168
@media only screen and (min-width: ${mediumBreakpointCss}) {
@@ -68,6 +75,10 @@ const rowCss = css`
6875
grid-template-columns: var(--btrix-workflow-list-columns);
6976
white-space: nowrap;
7077
}
78+
79+
.action {
80+
position: relative;
81+
}
7182
}
7283
7384
.col {

frontend/src/layouts/pageHeader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export function pageHeader({
128128
classNames,
129129
)}
130130
>
131-
<div class="flex flex-1 flex-col gap-2">
131+
<div class="flex min-w-72 flex-1 flex-col gap-2">
132132
<div class="flex flex-wrap items-center gap-2.5">
133133
${prefix}${pageTitle(title)}${suffix}
134134
</div>

frontend/src/layouts/panel.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@ export function panel({
5353
} & Parameters<typeof panelHeader>[0]) {
5454
return html`<section id=${ifDefined(id)} class=${ifDefined(className)}>
5555
${panelHeader({ heading, actions })}
56-
<sl-divider
57-
class=${clsx(tw`mb-4 lg:hidden`, actions ? tw`-mt-1` : tw`mt-4`)}
58-
></sl-divider>
56+
<sl-divider class="mb-4 mt-0 lg:hidden"></sl-divider>
5957
${body}
6058
</section>`;
6159
}

frontend/src/pages/org/browser-profiles/browser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ export class BrowserProfilesBrowserPage extends BtrixElement {
256256
}
257257
}}
258258
>
259-
${msg(this.profileId ? "Save Profile" : "Finish Browsing")}
259+
${this.profileId ? msg("Save Profile") : msg("Finish Browsing")}
260260
</sl-button>
261261
</btrix-popover>
262262
</div>

frontend/src/pages/org/browser-profiles/profile.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,8 @@ export class BrowserProfilesProfilePage extends BtrixElement {
280280

281281
private readonly renderPage = () => {
282282
return html`
283-
<div class="mt-1 grid grid-cols-7 gap-7">
284-
<div class="col-span-full flex flex-col gap-7 lg:col-span-5">
283+
<div class="mt-2 grid grid-cols-7 gap-7">
284+
<div class="col-span-full flex flex-col gap-7 lg:col-span-5 lg:gap-10">
285285
${this.renderProfile()} ${this.renderUsage()}
286286
</div>
287287
@@ -300,7 +300,7 @@ export class BrowserProfilesProfilePage extends BtrixElement {
300300
this.browserIdTask.value;
301301

302302
return panel({
303-
heading: msg("Visited Sites"),
303+
heading: msg("Configured Sites"),
304304
actions: this.appState.isCrawler
305305
? html`<sl-tooltip content=${msg("Configure Profile")}>
306306
<sl-icon-button
@@ -351,12 +351,16 @@ export class BrowserProfilesProfilePage extends BtrixElement {
351351
const origins = (profile: Profile) =>
352352
profile.origins.map(
353353
(origin) => html`
354-
<li class="flex items-center gap-2">
354+
<li class="flex items-center gap-1">
355355
<div
356356
class="flex flex-1 items-center gap-2 overflow-hidden border-r"
357357
>
358358
<div class="border-r p-1">
359-
<btrix-copy-button .value=${origin} placement="left">
359+
<btrix-copy-button
360+
content=${msg("Copy URL")}
361+
.value=${origin}
362+
placement="left"
363+
>
360364
</btrix-copy-button>
361365
</div>
362366
<btrix-code
@@ -488,7 +492,7 @@ export class BrowserProfilesProfilePage extends BtrixElement {
488492
html`<sl-skeleton class="h-36" effect="sheen"></sl-skeleton>`;
489493

490494
return panel({
491-
heading: msg("Usage"),
495+
heading: msg("Related Workflows"),
492496
body: when(
493497
this.profile,
494498
(profile) =>
@@ -561,7 +565,7 @@ export class BrowserProfilesProfilePage extends BtrixElement {
561565
const failedNotLoggedInState = "failed_not_logged_in" satisfies CrawlState;
562566

563567
return html`
564-
<div class="mb-3 rounded-lg border bg-neutral-50 px-6 py-3">
568+
<div class="mb-3 rounded-lg border bg-neutral-50 px-5 py-3">
565569
<div class="flex flex-wrap items-center gap-2">
566570
<span class="whitespace-nowrap text-sm text-neutral-500">
567571
${msg("Filter by:")}

0 commit comments

Comments
 (0)