Skip to content

Commit

Permalink
Fix image widths
Browse files Browse the repository at this point in the history
  • Loading branch information
eyeseast committed Jan 18, 2024
1 parent 886476b commit fb7bfc2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/common/ProgressiveImage.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
let largestLoaded = -1;
const NORMAL_WIDTH = IMAGE_WIDTHS.map((x, i) => [x, i]).filter(
(x) => x[1][0] == "normal",
(x) => x[0][1] == "normal",
)[0];
let mounted = false;
Expand Down
8 changes: 7 additions & 1 deletion src/config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,20 @@ export const DC_LOGOUT = "/accounts/logout/";
export const SQUARELET_SIGNUP = "/accounts/signup/?intent=documentcloud&next=";

export const POLL_INTERVAL = 5000;
export const IMAGE_WIDTHS = [

export const IMAGE_WIDTHS_ENTRIES = [
["xlarge", 2000],
["large", 1000],
["normal", 700],
["small", 180],
["thumbnail", 60],
];

export const IMAGE_WIDTHS = IMAGE_WIDTHS_ENTRIES.map(([name, width]) => [
width,
name,
]);

export const IMAGE_WIDTHS_MAP = new Map(IMAGE_WIDTHS);

export const MAX_PER_PAGE = 100;
Expand Down
2 changes: 1 addition & 1 deletion tests/anonymous/manager/app.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ test.describe("manager tests", () => {
).toBeVisible();

// close the overlay
await page.getByRole("button").nth(3).click();
await page.locator("button.dismiss").click();

// can we see documents?
await expect(page.locator(".outer > div").first()).toBeVisible();
Expand Down

0 comments on commit fb7bfc2

Please sign in to comment.