라이브 UI 변경
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
//
|
||||
// LiveRoomNewChatView.swift
|
||||
// SodaLive
|
||||
//
|
||||
// Created by klaus on 2024/01/18.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct LiveRoomNewChatView: View {
|
||||
|
||||
let scrollToBottom: () -> Void
|
||||
|
||||
var body: some View {
|
||||
HStack(spacing: 0) {
|
||||
Spacer()
|
||||
|
||||
HStack(spacing: 6.7) {
|
||||
Image("ic_bottom_white")
|
||||
Text("새로운 채팅")
|
||||
.font(.custom(Font.medium.rawValue, size: 13.3))
|
||||
.foregroundColor(Color.grayee)
|
||||
}
|
||||
.padding(.vertical, 8)
|
||||
.padding(.horizontal, 13.3)
|
||||
.background(Color.gray55.opacity(0.8))
|
||||
.cornerRadius(16.7)
|
||||
.padding(.bottom, 13.3)
|
||||
.onTapGesture { scrollToBottom() }
|
||||
|
||||
Spacer()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct LiveRoomNewChatView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
LiveRoomNewChatView {}
|
||||
}
|
||||
}
|
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// LiveRoomOverlayStrokeImageButton.swift
|
||||
// SodaLive
|
||||
//
|
||||
// Created by klaus on 2024/01/17.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct LiveRoomOverlayStrokeImageButton: View {
|
||||
|
||||
let imageName: String
|
||||
let strokeColor: Color
|
||||
let strokeWidth: CGFloat
|
||||
let strokeCornerRadius: CGFloat
|
||||
|
||||
let onClick: () -> Void
|
||||
|
||||
var body: some View {
|
||||
Image(imageName)
|
||||
.padding(4)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: strokeCornerRadius)
|
||||
.stroke(
|
||||
strokeColor,
|
||||
lineWidth: strokeWidth
|
||||
)
|
||||
)
|
||||
.onTapGesture { onClick() }
|
||||
}
|
||||
}
|
||||
|
||||
struct LiveRoomOverlayStrokeImageButton_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
LiveRoomOverlayStrokeImageButton(
|
||||
imageName: "ic_edit",
|
||||
strokeColor: Color.graybb,
|
||||
strokeWidth: 1,
|
||||
strokeCornerRadius: 5.3,
|
||||
onClick: {}
|
||||
)
|
||||
}
|
||||
}
|
@@ -0,0 +1,45 @@
|
||||
//
|
||||
// LiveRoomOverlayStrokeTextButton.swift
|
||||
// SodaLive
|
||||
//
|
||||
// Created by klaus on 2024/01/17.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct LiveRoomOverlayStrokeTextButton: View {
|
||||
|
||||
let text: String
|
||||
let textColor: Color
|
||||
let strokeColor: Color
|
||||
let strokeWidth: CGFloat
|
||||
let strokeCornerRadius: CGFloat
|
||||
|
||||
let onClick: () -> Void
|
||||
|
||||
var body: some View {
|
||||
Text(text)
|
||||
.font(.custom(Font.medium.rawValue, size: 12))
|
||||
.foregroundColor(Color.red)
|
||||
.padding(.horizontal, 8)
|
||||
.padding(.vertical, 6)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: strokeCornerRadius)
|
||||
.stroke(strokeColor, lineWidth: strokeWidth)
|
||||
)
|
||||
.onTapGesture { onClick() }
|
||||
}
|
||||
}
|
||||
|
||||
struct LiveRoomOverlayStrokeTextButton_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
LiveRoomOverlayStrokeTextButton(
|
||||
text: "라이브 종료",
|
||||
textColor: Color.mainRed,
|
||||
strokeColor: Color.mainRed,
|
||||
strokeWidth: 1,
|
||||
strokeCornerRadius: 5.3,
|
||||
onClick: {}
|
||||
)
|
||||
}
|
||||
}
|
@@ -0,0 +1,59 @@
|
||||
//
|
||||
// LiveRoomOverlayStrokeTextToggleButton.swift
|
||||
// SodaLive
|
||||
//
|
||||
// Created by klaus on 2024/01/17.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct LiveRoomOverlayStrokeTextToggleButton: View {
|
||||
|
||||
let isOn: Bool
|
||||
|
||||
let onText: String
|
||||
let onTextColor: Color
|
||||
let onStrokeColor: Color
|
||||
|
||||
let offText: String?
|
||||
let offTextColor: Color
|
||||
let offStrokeColor: Color
|
||||
|
||||
let strokeWidth: CGFloat
|
||||
let strokeCornerRadius: CGFloat
|
||||
|
||||
let onClick: () -> Void
|
||||
|
||||
var body: some View {
|
||||
Text(isOn ? onText : offText != nil && offText?.count ?? 0 > 0 ? offText! : onText)
|
||||
.font(.custom(Font.medium.rawValue, size: 12))
|
||||
.foregroundColor(isOn ? onTextColor : offTextColor)
|
||||
.padding(.horizontal, 8)
|
||||
.padding(.vertical, 6)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: strokeCornerRadius)
|
||||
.stroke(
|
||||
isOn ? onStrokeColor : offStrokeColor,
|
||||
lineWidth: strokeWidth
|
||||
)
|
||||
)
|
||||
.onTapGesture { onClick() }
|
||||
}
|
||||
}
|
||||
|
||||
struct LiveRoomOverlayStrokeTextToggleButton_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
LiveRoomOverlayStrokeTextToggleButton(
|
||||
isOn: true,
|
||||
onText: "배경 ON",
|
||||
onTextColor: Color.button,
|
||||
onStrokeColor: Color.button,
|
||||
offText: "배경 OFF",
|
||||
offTextColor: Color.grayee,
|
||||
offStrokeColor: Color.graybb,
|
||||
strokeWidth: 1,
|
||||
strokeCornerRadius: 5.3,
|
||||
onClick: {}
|
||||
)
|
||||
}
|
||||
}
|
@@ -0,0 +1,33 @@
|
||||
//
|
||||
// LiveRoomRightBottomButton.swift
|
||||
// SodaLive
|
||||
//
|
||||
// Created by klaus on 2024/01/17.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct LiveRoomRightBottomButton: View {
|
||||
|
||||
let imageName: String
|
||||
let onClick: () -> Void
|
||||
|
||||
var body: some View {
|
||||
Image(imageName)
|
||||
.resizable()
|
||||
.frame(width: 24, height: 24)
|
||||
.padding(10)
|
||||
.background(Color.gray52.opacity(0.6))
|
||||
.cornerRadius(10)
|
||||
.onTapGesture { onClick() }
|
||||
}
|
||||
}
|
||||
|
||||
struct LiveRoomRightBottomButton_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
LiveRoomRightBottomButton(
|
||||
imageName: "ic_donation",
|
||||
onClick: {}
|
||||
)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user