File tree Expand file tree Collapse file tree 7 files changed +29
-25
lines changed Expand file tree Collapse file tree 7 files changed +29
-25
lines changed Original file line number Diff line number Diff line change 43
43
password : ${{ secrets.GITHUB_TOKEN }}
44
44
- name : Build and push Docker image
45
45
run : |
46
- docker build --build-arg BUILD_VERSION =${{ needs.release.outputs.new-release-version }} VERSION=${{ needs.release.outputs.new-release-version }} \
47
- -t ghcr.io/${{ github.repository }}:${{ needs.release.outputs.new-release-version }} \
46
+ echo VERSION =${{ needs.release.outputs.new-release-version }} >> .env
47
+ docker build -t ghcr.io/${{ github.repository }}:${{ needs.release.outputs.new-release-version }} \
48
48
-t ghcr.io/${{ github.repository }}:latest .
49
49
docker push ghcr.io/${{ github.repository }}:latest
50
50
docker push ghcr.io/${{ github.repository }}:${{ needs.release.outputs.new-release-version }}
Original file line number Diff line number Diff line change 3
3
# Install dependencies only when needed
4
4
FROM node:18-alpine AS deps
5
5
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
6
+
6
7
RUN apk add --no-cache libc6-compat
7
8
WORKDIR /app
8
9
COPY package.json ./
9
10
RUN npm install --frozen-lockfile
10
11
11
12
# Rebuild the source code only when needed
12
13
FROM node:18-alpine AS builder
14
+
13
15
WORKDIR /app
14
16
COPY --from=deps /app/node_modules ./node_modules
15
17
COPY . .
Original file line number Diff line number Diff line change @@ -10,5 +10,3 @@ services:
10
10
- " 3000:3000"
11
11
env_file :
12
12
- .env
13
- environment :
14
- - BUILD_VERSION=${BUILD_VERSION}
Original file line number Diff line number Diff line change 1
1
/** @type {import('next').NextConfig } */
2
2
3
- import { readFileSync } from 'fs' ;
4
-
5
- const { version } = JSON . parse ( readFileSync ( './package.json' , 'utf-8' ) ) ;
6
-
7
- console . log ( `Version: ${ version } ` ) ;
8
-
9
3
const nextConfig = {
10
4
reactStrictMode : false ,
11
5
output : 'standalone' ,
12
6
images : {
13
7
unoptimized : true ,
14
8
} ,
15
9
env : {
16
- VERSION : process . env . BUILD_VERSION || version ,
10
+ VERSION : process . env . VERSION ,
17
11
} ,
18
12
} ;
19
13
Original file line number Diff line number Diff line change 1
1
import React , { useEffect , useState } from "react" ;
2
2
import { getHeatMapData } from "@/handlers/api/analytics.handler" ;
3
3
import { useConfig } from "@/contexts/ConfigContext" ;
4
+ import { Tooltip } from "@/components/ui/tooltip" ;
4
5
5
6
type HeatMapEntry = {
6
7
date : string ;
7
8
count : number ;
8
9
} ;
9
10
10
11
export default function AssetHeatMap ( ) {
11
- const { exImmichUrl } = useConfig ( ) ;
12
+ const { exImmichUrl } = useConfig ( ) ;
12
13
13
14
const [ heatMapData , setHeatMapData ] = useState < HeatMapEntry [ ] [ ] > ( [ ] ) ;
14
15
const [ loading , setLoading ] = useState ( false ) ;
@@ -117,18 +118,19 @@ export default function AssetHeatMap() {
117
118
>
118
119
{
119
120
column [ rowIndex ] ?. date ? (
120
- < a
121
- href = { ` ${ exImmichUrl } /search?query=%7B%22takenAfter%22%3A%22 ${ column [ rowIndex ] ?. date ?? "N/A" } T00%3A00%3A00.000Z%22%2C%22takenBefore%22%3A%22 ${ column [ rowIndex ] ?. date ?? "N/A" } T23%3A59%3A59.999Z%22%7D` }
122
- className = "block h-full w-full"
123
- target = "_blank "
124
- >
125
- < div
126
- className = "h-full w-full"
127
- title = { `Date: ${ column [ rowIndex ] ?. date ?? "N/A" } , Count: ${ column [ rowIndex ] ?. count ?? 0 } ` }
128
- />
129
- </ a > ) : < div
121
+ < Tooltip delayDuration = { 0 } content = { `Date: ${ column [ rowIndex ] ?. date ?? "N/A" } - Count: ${ column [ rowIndex ] ?. count ?? 0 } ` } >
122
+ < a
123
+ href = { ` ${ exImmichUrl } /search?query=%7B%22takenAfter%22%3A%22 ${ column [ rowIndex ] ?. date ?? "N/A" } T00%3A00%3A00.000Z%22%2C%22takenBefore%22%3A%22 ${ column [ rowIndex ] ?. date ?? "N/A" } T23%3A59%3A59.999Z%22%7D` }
124
+ className = "block h-full w-full "
125
+ target = "_blank"
126
+ >
127
+ < div
128
+ className = "h-full w-full"
129
+ />
130
+ </ a > </ Tooltip > ) : < div
130
131
className = "h-full w-full"
131
132
/>
133
+
132
134
}
133
135
</ td >
134
136
) ) }
Original file line number Diff line number Diff line change @@ -26,14 +26,22 @@ const TooltipContent = React.forwardRef<
26
26
TooltipContent . displayName = TooltipPrimitive . Content . displayName
27
27
28
28
29
- const Tooltip : React . FC < React . ComponentProps < typeof TooltipRoot > > = ( {
29
+ export interface ITooltipProps extends React . ComponentProps < typeof TooltipRoot > {
30
+ content : string
31
+ }
32
+ const Tooltip : React . FC < ITooltipProps > = ( {
30
33
children,
34
+ content,
31
35
...props
32
36
} ) => (
33
37
< TooltipProvider >
34
38
< TooltipRoot { ...props } >
35
- { children }
36
- < TooltipContent />
39
+ < TooltipTrigger asChild >
40
+ { children }
41
+ </ TooltipTrigger >
42
+ < TooltipContent >
43
+ < p > { content } </ p >
44
+ </ TooltipContent >
37
45
</ TooltipRoot >
38
46
</ TooltipProvider >
39
47
)
You can’t perform that action at this time.
0 commit comments