Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 업데이트 알림 추가 #18

Merged
merged 27 commits into from
Apr 28, 2024
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
167e2be
feat: mode 추가
DevooKim Apr 6, 2024
0827d34
feat: env type 추가
DevooKim Apr 6, 2024
c6012da
feat: 버전 fetch 추가
DevooKim Apr 6, 2024
5199ad8
feat: 현재 앱 버전 추가
DevooKim Apr 6, 2024
c780737
feat: 업데이트 바 추가
DevooKim Apr 6, 2024
1584cef
refactor: 쿼리 리팩토링
DevooKim Apr 6, 2024
e0c57db
feat: 파일 다운로드 추가
DevooKim Apr 6, 2024
68c31af
fix: 버전 컴포넌트 수정
DevooKim Apr 6, 2024
9ea5c39
feat: 아이콘 추가
DevooKim Apr 10, 2024
5c20255
add githubaction ci
DevooKim Apr 10, 2024
a10ad74
v1.1.0
DevooKim Apr 10, 2024
e7c76c6
fix: action
DevooKim Apr 10, 2024
0ba4294
Merge branch 'update-notice' of github.com:DevooKim/Flex-time-extensi…
DevooKim Apr 10, 2024
fbe99d8
v1.2.0
DevooKim Apr 10, 2024
64b0349
fix: action2
DevooKim Apr 10, 2024
d9a464e
fix: action2
DevooKim Apr 10, 2024
d2f4878
Merge branch 'update-notice' of github.com:DevooKim/Flex-time-extensi…
DevooKim Apr 10, 2024
4dab795
v1.3.0
DevooKim Apr 10, 2024
3748682
fix: action
DevooKim Apr 10, 2024
7ab69c1
Merge branch 'update-notice' of github.com:DevooKim/Flex-time-extensi…
DevooKim Apr 10, 2024
01c6d29
v3.0.0
DevooKim Apr 10, 2024
64ad5d2
.github/workflows/
DevooKim Apr 10, 2024
f0da312
Merge branch 'develop' of github.com:DevooKim/Flex-time-extension int…
DevooKim Apr 28, 2024
ba91c1b
feat: 버전체크 유틸 추가
DevooKim Apr 28, 2024
1fd3458
fix: .env.sample 변경
DevooKim Apr 28, 2024
ca3cc6b
fix: build action 변경
DevooKim Apr 28, 2024
09ed6f4
chore: release 액션 비활성화
DevooKim Apr 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: 아이콘 추가
DevooKim committed Apr 10, 2024
commit 9ea5c39f06ff3cd7e0b9d042232d7bec69cdac85
20 changes: 20 additions & 0 deletions src/icons/DownloadIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
type DownloadIconProps = React.SVGProps<SVGSVGElement>

const DownloadIcon = (props: DownloadIconProps) => (
<svg
width="16"
height="16"
viewBox="0 0 16 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...props}
>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M13.5 6.25H11V2H5V6.25H2.5L8 12.25L13.5 6.25ZM2.5 14.5H13.5V13.2H2.5V14.5Z"
/>
</svg>
)

export default DownloadIcon
20 changes: 20 additions & 0 deletions src/icons/StarFillIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
type StarFillIconProps = React.SVGProps<SVGSVGElement>

const StarFillIcon = (props: StarFillIconProps) => (
<svg
width="16"
height="16"
viewBox="0 0 16 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...props}
>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M8 1.24121L10.055 5.77321L15 6.32721L11.325 9.68221L12.326 14.5562L8 12.0972L3.674 14.5562L4.675 9.68221L1 6.32721L5.945 5.77321L8 1.24121Z"
/>
</svg>
)

export default StarFillIcon
39 changes: 36 additions & 3 deletions src/pages/popup/components/Header/Header.tsx
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ import IconButton from '@src/components/IconButton'
import { useOpenFlex } from '@src/hooks'
import useMyFloating from '@src/hooks/useMyFloating'
import GlobalIcon from '@src/icons/GlobalIcon'
import StarFillIcon from '@src/icons/StarFillIcon'
import { parseClockData } from '@src/utils/parseClockData'
import { parseScheduleData } from '@src/utils/parseScheduleData'

@@ -42,6 +43,15 @@ const Header = () => {
})
const flexFloatingInteraction = getFlexFloatingInteraction()

const {
floating: updateFloating,
getFloatingInteraction: getUpdateFloatingInteraction,
arrowRef: updateFloatingArrowRef,
isOpen: isUpdateFloatingOpen,
} = useMyFloating({})

const updateFloatingInteraction = getUpdateFloatingInteraction()

const { data: userIdHash } = useFetchUserIdHash()

const { data: scheduleData } = useFetchScheduleData({
@@ -88,7 +98,7 @@ const Header = () => {
</div>
</div>

<div className="flex items-center">
<div className="flex items-center gap-1">
<div
ref={flexFloating.refs.setReference}
className="flex"
@@ -99,8 +109,17 @@ const Header = () => {
onClick={openFlex}
/>
</div>
<div>
<button onClick={() => refetch()}>업데이트 확인</button>
<div
ref={updateFloating.refs.setReference}
className="flex"
{...updateFloatingInteraction.getReferenceProps()}
>
<IconButton
icon={
<StarFillIcon className="w-6 h-6 fill-link" />
}
onClick={() => refetch()}
/>
</div>
</div>
<FloatingPortal>
@@ -132,6 +151,20 @@ const Header = () => {
flex로 이동
</div>
)}
{isUpdateFloatingOpen && (
<div
ref={updateFloating.refs.setFloating}
className="tooltip"
style={updateFloating.floatingStyles}
{...updateFloatingInteraction.getFloatingProps()}
>
<FloatingArrow
ref={updateFloatingArrowRef}
context={updateFloating.context}
/>
업데이트 확인
</div>
)}
</FloatingPortal>
</div>
</div>