Skip to content

Commit

Permalink
Merge pull request #172 from Type-Style/dev
Browse files Browse the repository at this point in the history
Release 1.1.1
  • Loading branch information
Type-Style authored Sep 21, 2024
2 parents b5543a4 + dc01421 commit 6a7cf15
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"@mui/icons-material": "^5.16.7",
"@mui/material": "^5.16.7",
"@types/leaflet-rotatedmarker": "^0.2.5",
"axios": "^1.7.5",
"axios": "^1.7.6",
"bcrypt": "^5.1.1",
"chalk": "^4.1.2",
"compression": "^1.7.4",
Expand Down
2 changes: 1 addition & 1 deletion src/client/components/Map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ function Map({ entries }: { entries: Models.IEntry[] }) {
})}
</LayersControl>

<MarkerClusterGroup>
<MarkerClusterGroup disableClusteringAtZoom={15}>
{cleanEntries.map((entry) => {
const iconObj = getClassName(entry);
if (iconObj.className != "none") { return } // exclude start and end from being in cluster group;
Expand Down
4 changes: 4 additions & 0 deletions src/client/css/map.css
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@
}
}

&.end {
z-index: 999; /* over cluster group */
}

&.start {
outline: none;
}
Expand Down
5 changes: 3 additions & 2 deletions src/scripts/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import logger from '@src/scripts/logger';

export const getFile = (res: Response, next: NextFunction, method: File.method): File.Obj => {
const date = new Date();
const formattedDate = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`;
const formattedDate = `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}-${String(date.getDate()).padStart(2, '0')}`;

const dirPath = path.resolve(__dirname, '../data');
let filePath = path.resolve(dirPath, `data-${formattedDate}.json`);

Expand Down Expand Up @@ -93,7 +94,7 @@ const findMostRecentFile = (directoryPath: string) => {
// check if it is a file (and not a directory) and most recent
if (stats.isFile() && stats.mtimeMs > mostRecentTime) {
if (stats.mtimeMs > mostRecentTime) {
mostRecentTime &&= stats.mtimeMs;
mostRecentTime = stats.mtimeMs;
mostRecentFile = filePath;
}
}
Expand Down

0 comments on commit 6a7cf15

Please sign in to comment.