diff --git a/Makefile b/Makefile index 6ced4b5..2f67b08 100644 --- a/Makefile +++ b/Makefile @@ -5,12 +5,15 @@ NODE_VERSION = 20 DOCKER_REGISTRY = harbor.jongyeob.com DOCKER_PROJECT = nicepay DOCKER_IMAGE = nice-app-web -DOCKER_TAG = 1.0.0 +DOCKER_TAG = 1.0.3 DOCKER_FULL_IMAGE = $(DOCKER_REGISTRY)/$(DOCKER_PROJECT)/$(DOCKER_IMAGE) CONTAINER_NAME = nice-app-web PORT = 80 PLATFORMS = linux/amd64,linux/arm64 +# Version management - use VERSION from command line or default to package.json +VERSION ?= $(shell node -p "require('./package.json').version") + # Default target .DEFAULT_GOAL := help @@ -29,26 +32,23 @@ dev: ## Start development server build: ## Build for production pnpm run build -build-staging: ## Build for staging environment with zip packaging +build-staging: ## Build for staging environment with zip packaging (usage: make build-staging VERSION=x.y.z) pnpm run build:staging - @echo "Creating deployment package..." - $(eval VERSION := $(shell node -p "require('./package.json').version")) + @echo "Creating deployment package with version $(VERSION)..." @mkdir -p dist cd build && zip -r ../dist/nice-app-web-staging-$(VERSION).zip . && cd .. @echo "Deployment package created: dist/nice-app-web-staging-$(VERSION).zip" -build-dev: ## Build for development with zip packaging +build-dev: ## Build for development with zip packaging (usage: make build-dev VERSION=x.y.z) pnpm run build - @echo "Creating development deployment package..." - $(eval VERSION := $(shell node -p "require('./package.json').version")) + @echo "Creating development deployment package with version $(VERSION)..." @mkdir -p dist cd build && zip -r ../dist/nice-app-web-development-$(VERSION).zip . && cd .. @echo "Deployment package created: dist/nice-app-web-development-$(VERSION).zip" -build-production: ## Build for production with zip packaging +build-production: ## Build for production with zip packaging (usage: make build-production VERSION=x.y.z) pnpm run build - @echo "Creating production deployment package..." - $(eval VERSION := $(shell node -p "require('./package.json').version")) + @echo "Creating production deployment package with version $(VERSION)..." @mkdir -p dist cd build && zip -r ../dist/nice-app-web-production-$(VERSION).zip . && cd .. @echo "Deployment package created: dist/nice-app-web-production-$(VERSION).zip" diff --git a/index.html b/index.html index 0c5c0a8..3c11476 100644 --- a/index.html +++ b/index.html @@ -9,6 +9,7 @@ + diff --git a/package.json b/package.json index cc9c9bb..c9dbcae 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,14 @@ { "name": "web", "private": true, - "version": "1.0.0", + "version": "1.0.3", "type": "module", "scripts": { - "dev": "env-cmd -f .env.development vite --host --open", + "dev": "env-cmd -f .env.local vite --host --open", "build:development": "env-cmd -f .env.development vite build", "build": "env-cmd -f .env.production vite build", "lint": "eslint . --ext js,jsx,ts,tsx --report-unused-disable-directives --max-warnings 0", - "preview": "env-cmd -f .env.development vite preview" + "preview": "env-cmd -f .env.local vite preview" }, "dependencies": { "@babel/plugin-transform-react-jsx": "^7.27.1", diff --git a/src/shared/constants/common.ts b/src/shared/constants/common.ts index 57b114b..23e816c 100644 --- a/src/shared/constants/common.ts +++ b/src/shared/constants/common.ts @@ -56,16 +56,23 @@ export const getMax = (data: Array>) => { }; export const setScrollAction = ( - e: Event, - setGroupDate: (groupDate: string) => void, + e: Event, + setGroupDate: (groupDate: string) => void, setGroupDateOn: (groupDateOn: boolean) => void ) => { + // iOS safe-area-inset-top 값 가져오기 + const safeAreaInsetTop = parseInt( + window.getComputedStyle(document.documentElement) + .getPropertyValue('--safe-area-inset-top') || '0' + ); + + let dateHeader = document.querySelectorAll('.date-header'); let posData: Array> = []; dateHeader.forEach((value, index) => { let date: string = value.innerHTML; let top: number = value.getBoundingClientRect().top; - if(top < 10){ + if(top < safeAreaInsetTop + 86){ posData.push({ date: date, top: top diff --git a/src/shared/ui/assets/css/style-fix.css b/src/shared/ui/assets/css/style-fix.css index d829935..dd239f8 100644 --- a/src/shared/ui/assets/css/style-fix.css +++ b/src/shared/ui/assets/css/style-fix.css @@ -544,7 +544,7 @@ main.pop{ position: fixed; background-color: #ffffff; width: calc(100% - 42px); - top: 50px; + top: calc(50px + env(safe-area-inset-top)); padding-left: 10px; padding-bottom: 20px; }