Skip to content

Commit

Permalink
update ui
Browse files Browse the repository at this point in the history
  • Loading branch information
xqsadness committed Sep 18, 2023
1 parent 78d6af9 commit 36202a1
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 23 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,50 @@
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="AppIconSingle" translatesAutoresizingMaskIntoConstraints="NO" id="GmL-E7-X0F">
<rect key="frame" x="156.66666666666666" y="398.66666666666669" width="80" height="80"/>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" image="AppIconSingle" translatesAutoresizingMaskIntoConstraints="NO" id="GmL-E7-X0F">
<rect key="frame" x="156" y="386" width="80" height="80"/>
<constraints>
<constraint firstAttribute="width" constant="80" id="Lwf-5z-7jd"/>
<constraint firstAttribute="height" constant="80" id="WwQ-BO-U86"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Quiz App" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DyQ-ie-krj">
<rect key="frame" x="130" y="474" width="132" height="48"/>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="48" id="B8B-I9-O1Y"/>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="222" id="YWW-zZ-ifn"/>
<constraint firstAttribute="height" constant="48" id="jSL-YU-TPM"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="22"/>
<color key="textColor" name="Background"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<viewLayoutGuide key="safeArea" id="Bcu-3y-fUS"/>
<color key="backgroundColor" name="Background2"/>
<color key="backgroundColor" name="AccentColor"/>
<constraints>
<constraint firstItem="DyQ-ie-krj" firstAttribute="centerX" secondItem="GmL-E7-X0F" secondAttribute="centerX" id="4Mt-HM-Jzn"/>
<constraint firstItem="GmL-E7-X0F" firstAttribute="centerX" secondItem="Bcu-3y-fUS" secondAttribute="centerX" id="MAM-sO-R7W"/>
<constraint firstItem="Bcu-3y-fUS" firstAttribute="bottom" secondItem="DyQ-ie-krj" secondAttribute="bottom" constant="296" id="MjH-r5-IRc"/>
<constraint firstItem="DyQ-ie-krj" firstAttribute="top" secondItem="Bcu-3y-fUS" secondAttribute="top" constant="415" id="dPg-yt-SHO"/>
<constraint firstItem="DyQ-ie-krj" firstAttribute="top" secondItem="Bcu-3y-fUS" secondAttribute="top" constant="415" id="jBo-Bd-3iR"/>
<constraint firstItem="GmL-E7-X0F" firstAttribute="centerY" secondItem="Bcu-3y-fUS" secondAttribute="centerY" id="kDv-Vq-Dsn"/>
<constraint firstItem="Bcu-3y-fUS" firstAttribute="bottom" secondItem="DyQ-ie-krj" secondAttribute="bottom" constant="296" id="n4Z-zp-TdI"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
<point key="canvasLocation" x="52.671755725190835" y="374.64788732394368"/>
</scene>
</scenes>
<resources>
<image name="AppIconSingle" width="60" height="60"/>
<namedColor name="Background2">
<color red="0.16798350209999999" green="0.14819172019999999" blue="0.18858304619999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<namedColor name="AccentColor">
<color red="0.17700000107288361" green="0.65499997138977051" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="Background">
<color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
</document>
8 changes: 4 additions & 4 deletions DefaultProject/View/ChooseLanguageView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ struct ChooseLanguageView: SwiftUI.View {
.frame(width: 32, height: 32)
.overlay {
Circle()
.stroke(style: StrokeStyle(lineWidth: 1))
.frame(width: 32, height: 32)
.foregroundColor(.text2)
.stroke(style: StrokeStyle(lineWidth: 1))
.frame(width: 32, height: 32)
.foregroundColor(.text2)
}

Text(ele.name)
Expand Down Expand Up @@ -85,7 +85,7 @@ struct ChooseLanguageView: SwiftUI.View {
AuthManagerViewModel.shared.logoutUser()
coordinator.popToRoot()
coordinator.push(.loginDefaultView)
// coordinator.path = NavigationPath()
// coordinator.path = NavigationPath()
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions DefaultProject/View/CreateUsernameView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ struct CreateUsernameView: View {
.cornerRadius(6)
.contentShape(Rectangle())
.onTapGesture {
if name.isEmpty || name.count < 2{
LocalNotification.shared.message("Name must be >= 2 characters", .warning)
if name.isEmpty || name.count < 2 || name.count > 18{
LocalNotification.shared.message("Name must be >= 2, <= 18 characters", .warning)
}else{
User.shared.userEmail = name
if User.shared.userEmail != "" {
Expand Down
13 changes: 8 additions & 5 deletions DefaultProject/View/Home/SectionListenAndRPView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,21 @@ struct SectionListenAndRPView: View {
var body: some View {
VStack(spacing: 0) {
LottieView(name: "animation_human2", loopMode: .loop)
.frame(width: 100, height: 60)
.frame(width: 80, height: 60)

VStack(spacing: 5) {
Text("Listen And Repeat".cw_localized)
.font(.bold(size: 16))
.font(.bold(size: 14))
.foregroundColor(Color.background)
.hAlign(.leading)

HStack{
Text("\(CONSTANT.SHARED.DATA_LISTEN_AND_REPEAT.count) \("\nquestions".cw_localized)")
Text("\(CONSTANT.SHARED.DATA_LISTEN_AND_REPEAT.count) \n\("questions".cw_localized)")
.font(.bold(size: 14))
.foregroundColor(Color.text)
.hAlign(.center)
.hAlign(.leading)

Spacer()

VStack{
ZStack {
Expand All @@ -45,7 +48,7 @@ struct SectionListenAndRPView: View {
.font(.bold(size: 12))
.foregroundColor(Color.text)
}
.padding()
.hAlign(.trailing)
}
}
}
Expand Down
13 changes: 7 additions & 6 deletions DefaultProject/View/Home/SectionWritingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,17 @@ struct SectionWritingView: View {

VStack(spacing: 5) {
Text("Writing".cw_localized)
.font(.bold(size: 16))
.font(.bold(size: 14))
.foregroundColor(Color.background)
.hAlign(.center)
.hAlign(.center)

HStack{
Text("\(CONSTANT.SHARED.DATA_WRITING.count) \("\nquestions".cw_localized)")
Text("\(CONSTANT.SHARED.DATA_WRITING.count)\n\("questions".cw_localized)")
.font(.bold(size: 14))
.foregroundColor(Color.text)
.hAlign(.center)
.hAlign(.leading)

Spacer()
VStack{
ZStack {
Image("Ellipse")
Expand All @@ -47,9 +48,9 @@ struct SectionWritingView: View {
.font(.bold(size: 12))
.foregroundColor(Color.text)
}
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .bottomTrailing)
.padding()
.hAlign(.trailing)
}
.hAlign(.center)
}
}
}
Expand Down

0 comments on commit 36202a1

Please sign in to comment.