@@ -37,7 +37,25 @@ public extension CategoryDetailView {
3737 . padding ( . horizontal, 20 )
3838 . padding ( . top, 12 )
3939 . pokitNavigationBar { navigationBar }
40- . pokitFloatButton ( action: { send ( . 링크_추가_버튼_눌렀을때) } )
40+ //TODO: overlay(condition) merge 시 수정
41+ . overlay ( alignment: . bottomTrailing) {
42+ if !store. contents. isEmpty {
43+ Button ( action: { send ( . 링크_추가_버튼_눌렀을때) } ) {
44+ Image ( . icon( . plus) )
45+ . resizable ( )
46+ . frame ( width: 36 , height: 36 )
47+ . padding ( 12 )
48+ . foregroundStyle ( . pokit( . icon( . inverseWh) ) )
49+ . background {
50+ RoundedRectangle ( cornerRadius: 9999 , style: . continuous)
51+ . fill ( . pokit( . bg( . brand) ) )
52+ }
53+ . frame ( width: 60 , height: 60 )
54+ }
55+ . padding ( . trailing, 20 )
56+ . padding ( . bottom, 39 )
57+ }
58+ }
4159 . ignoresSafeArea ( edges: . bottom)
4260 . sheet ( isPresented: $store. isCategorySheetPresented) {
4361 PokitBottomSheet (
@@ -160,34 +178,37 @@ private extension CategoryDetailView {
160178 }
161179 }
162180
181+ @ViewBuilder
163182 var filterHeader : some View {
164- HStack ( spacing: 8 ) {
165- PokitTextButton (
166- " 즐겨찾기 " ,
167- state: store. isFavoriteFiltered
168- ? . filled( . primary)
169- : . default( . secondary) ,
170- size: . small,
171- shape: . round,
172- action: { send ( . 분류_버튼_눌렀을때( . 즐겨찾기) ) }
173- )
174- PokitTextButton (
175- " 안읽음 " ,
176- state: store. isUnreadFiltered
177- ? . filled( . primary)
178- : . default( . secondary) ,
179- size: . small,
180- shape: . round,
181- action: { send ( . 분류_버튼_눌렀을때( . 안읽음) ) }
182- )
183-
184- Spacer ( )
185- PokitIconLTextLink (
186- store. sortType. title,
187- icon: . icon( . align) ,
188- action: { send ( . 정렬_버튼_눌렀을때) }
189- )
190- . contentTransition ( . numericText( ) )
183+ if !store. contents. isEmpty {
184+ HStack ( spacing: 8 ) {
185+ PokitTextButton (
186+ " 즐겨찾기 " ,
187+ state: store. isFavoriteFiltered
188+ ? . filled( . primary)
189+ : . default( . secondary) ,
190+ size: . small,
191+ shape: . round,
192+ action: { send ( . 분류_버튼_눌렀을때( . 즐겨찾기) ) }
193+ )
194+ PokitTextButton (
195+ " 안읽음 " ,
196+ state: store. isUnreadFiltered
197+ ? . filled( . primary)
198+ : . default( . secondary) ,
199+ size: . small,
200+ shape: . round,
201+ action: { send ( . 분류_버튼_눌렀을때( . 안읽음) ) }
202+ )
203+
204+ Spacer ( )
205+ PokitIconLTextLink (
206+ store. sortType. title,
207+ icon: . icon( . align) ,
208+ action: { send ( . 정렬_버튼_눌렀을때) }
209+ )
210+ . contentTransition ( . numericText( ) )
211+ }
191212 }
192213 }
193214
@@ -196,8 +217,10 @@ private extension CategoryDetailView {
196217 if !store. isLoading {
197218 if store. contents. isEmpty {
198219 VStack {
199- PokitCaution ( type: . 링크없음)
200- . padding ( . top, 20 )
220+ PokitCaution (
221+ type: . 포킷상세_링크없음,
222+ action: { send ( . 링크_추가_버튼_눌렀을때) }
223+ )
201224
202225 Spacer ( )
203226 }
0 commit comments