Skip to content

Commit

Permalink
fix: entry thumbnail keep origin aspect ratio
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <[email protected]>
  • Loading branch information
Innei committed Oct 26, 2024
1 parent 87717d6 commit 6e04e6e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export function ListItem({
loading="lazy"
proxy={{
width: 160,
height: 160,
height: 0,
}}
height={entry.entries.media[0].height}
width={entry.entries.media[0].width}
Expand Down
8 changes: 8 additions & 0 deletions plugins/vite/hmr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ export const circularImportRefreshPlugin = (): Plugin => ({
name: "circular-import-refresh",
handleHotUpdate({ file, server }: HmrContext) {
const mod = server.moduleGraph.getModuleById(file)

// Check for circular imports
if (mod && isNodeWithinCircularImports(mod, [mod])) {
console.error(
red(
Expand All @@ -56,5 +58,11 @@ export const circularImportRefreshPlugin = (): Plugin => ({
server.ws.send({ type: "full-reload" })
return []
}

if (file.startsWith(path.resolve(process.cwd(), "src/store")) && file.endsWith(".ts")) {
console.warn(yellow(`[memory-hmr] Detected change in store file: ${file}. Reloading page.`))
server.ws.send({ type: "full-reload" })
return []
}
},
})

0 comments on commit 6e04e6e

Please sign in to comment.