-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release/1.2' into main
- Loading branch information
Showing
40 changed files
with
829 additions
and
242 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
Twitimer/Assets.xcassets/Icon/settings.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "settings.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "settings@2x.png", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "settings@3x.png", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions
15
Twitimer/Assets.xcassets/Networks/tiktok.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "tiktok.svg", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
}, | ||
"properties" : { | ||
"preserves-vector-representation" : true | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// | ||
// IconTextField.swift | ||
// Twitimer | ||
// | ||
// Created by Brais Moure on 25/8/21. | ||
// | ||
|
||
import SwiftUI | ||
|
||
struct IconTextField: View { | ||
|
||
// Properties | ||
|
||
let image: String | ||
@Binding var title: String | ||
let placeholder: LocalizedStringKey | ||
|
||
// Body | ||
|
||
var body: some View { | ||
HStack(spacing: Size.medium.rawValue) { | ||
Image(image).template.resizable().aspectRatio(contentMode: .fit) | ||
.foregroundColor(.textColor) | ||
.frame(width: Size.mediumBig.rawValue, height: Size.big.rawValue) | ||
MainTextField(title: $title, placeholder: placeholder) | ||
} | ||
} | ||
} | ||
|
||
struct IconTextField_Previews: PreviewProvider { | ||
static var previews: some View { | ||
IconTextField(image: "discord", title: .constant(""), placeholder: "My placeholder") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// | ||
// MainTextField.swift | ||
// Twitimer | ||
// | ||
// Created by Brais Moure on 25/8/21. | ||
// | ||
|
||
import SwiftUI | ||
import Combine | ||
|
||
struct MainTextField: View { | ||
|
||
// Properties | ||
|
||
@Binding var title: String | ||
let placeholder: LocalizedStringKey | ||
var readOnly = false | ||
var enable = true | ||
|
||
private let kTextLimit = 100 | ||
|
||
// Body | ||
|
||
var body: some View { | ||
|
||
TextField("", text: $title).onReceive(Just(title)) { _ in | ||
limitText(kTextLimit) | ||
} | ||
.modifier(TextFieldPlaceholderStyle(showPlaceHolder: title.isEmpty, placeholder: placeholder)) | ||
.font(size:.body) | ||
.foregroundColor(readOnly ? .lightColor : .textColor) | ||
.accentColor(readOnly ? .lightColor : .textColor) | ||
.padding(Size.small.rawValue) | ||
.background(readOnly ? Color.secondaryColor : Color.backgroundColor) | ||
.clipShape(Capsule()) | ||
.disabled(!enable || readOnly) | ||
} | ||
|
||
// MARK: Functions | ||
|
||
private func limitText(_ upper: Int) { | ||
if title.count > upper { | ||
title = String(title.prefix(upper)) | ||
} | ||
} | ||
|
||
} | ||
|
||
struct MainTextField_Previews: PreviewProvider { | ||
static var previews: some View { | ||
MainTextField(title: .constant(""), placeholder: "My placeholder") | ||
} | ||
} |
Oops, something went wrong.