-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #624 from Syn-McJ/feat/voting-cast-vote
feat(voting): cast a vote UI
- Loading branch information
Showing
27 changed files
with
1,019 additions
and
103 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
DashWallet/Resources/AppAssets.xcassets/Voting/checkmark.circle.white.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" : "checkmark.circle.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "checkmark.circle@2x.png", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "checkmark.circle@3x.png", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+401 Bytes
.../AppAssets.xcassets/Voting/checkmark.circle.white.imageset/checkmark.circle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+754 Bytes
...pAssets.xcassets/Voting/checkmark.circle.white.imageset/checkmark.circle@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.03 KB
...pAssets.xcassets/Voting/checkmark.circle.white.imageset/checkmark.circle@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
DashWallet/Resources/AppAssets.xcassets/Voting/plus.rounded.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" : "plus.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "plus@2x.png", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "plus@3x.png", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+287 Bytes
DashWallet/Resources/AppAssets.xcassets/Voting/plus.rounded.imageset/plus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+345 Bytes
DashWallet/Resources/AppAssets.xcassets/Voting/plus.rounded.imageset/plus@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+414 Bytes
DashWallet/Resources/AppAssets.xcassets/Voting/plus.rounded.imageset/plus@3x.png
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// | ||
// Created by Andrei Ashikhmin | ||
// Copyright © 2023 Dash Core Group. All rights reserved. | ||
// | ||
// Licensed under the MIT License (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://opensource.org/licenses/MIT | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
|
||
import Foundation | ||
|
||
struct MasternodeKey: Hashable { | ||
var key: String | ||
var ip: String | ||
} |
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,70 @@ | ||
// | ||
// Created by Andrei Ashikhmin | ||
// Copyright © 2023 Dash Core Group. All rights reserved. | ||
// | ||
// Licensed under the MIT License (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://opensource.org/licenses/MIT | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
|
||
import UIKit | ||
|
||
@objc(DWCustomHUDView) | ||
class CustomHUDView: UIView { | ||
let iconImageView: UIImageView | ||
let textLabel: UILabel | ||
|
||
override init(frame: CGRect) { | ||
iconImageView = UIImageView(frame: .zero) | ||
textLabel = UILabel(frame: .zero) | ||
|
||
super.init(frame: frame) | ||
|
||
iconImageView.translatesAutoresizingMaskIntoConstraints = false | ||
iconImageView.contentMode = .scaleAspectFit | ||
|
||
textLabel.translatesAutoresizingMaskIntoConstraints = false | ||
textLabel.textColor = .white | ||
textLabel.font = .dw_regularFont(ofSize: 14) | ||
|
||
addSubview(iconImageView) | ||
addSubview(textLabel) | ||
|
||
setupConstraints() | ||
|
||
backgroundColor = UIColor.black | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
fatalError("init(coder:) has not been implemented") | ||
} | ||
|
||
private func setupConstraints() { | ||
NSLayoutConstraint.activate([ | ||
iconImageView.heightAnchor.constraint(equalToConstant: 18), | ||
iconImageView.widthAnchor.constraint(equalToConstant: 18), | ||
iconImageView.centerYAnchor.constraint(equalTo: centerYAnchor), | ||
iconImageView.leadingAnchor.constraint(equalTo: leadingAnchor, constant: 0), | ||
|
||
textLabel.leadingAnchor.constraint(equalTo: iconImageView.trailingAnchor, constant: 8), | ||
textLabel.centerYAnchor.constraint(equalTo: centerYAnchor), | ||
textLabel.trailingAnchor.constraint(equalTo: trailingAnchor, constant: 0) | ||
]) | ||
} | ||
|
||
@objc func setText(_ text: String) { | ||
textLabel.text = text | ||
} | ||
|
||
@objc func setIconImage(_ image: UIImage) { | ||
iconImageView.image = image | ||
} | ||
} |
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
Oops, something went wrong.