Skip to content

Epic/profile #83

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 29 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
001374d
add docompositions folder
ilyanikitash Mar 13, 2025
bff54f8
add decomposition
DavidBekoev Mar 22, 2025
c818fd9
update Kingfisher
DavidBekoev Mar 22, 2025
462467d
кингфишер
DavidBekoev Mar 23, 2025
8519473
update kingFisher
DavidBekoev Mar 23, 2025
fca2b1a
assets
DavidBekoev Mar 23, 2025
f643c50
add TabBar,ProfileViewController,add token
DavidBekoev Mar 23, 2025
1eb130c
add assets,add profileviewcontroller,add webviewcontroller
DavidBekoev Mar 23, 2025
a6fe7e4
ProfileViewController done,add ProfileRequest, add ProfileModel, add…
DavidBekoev Mar 24, 2025
e5814ab
конфликты
DavidBekoev Mar 25, 2025
b9580c5
токен
DavidBekoev Mar 25, 2025
fba17b5
таб бар
DavidBekoev Mar 25, 2025
b2aee20
Merge pull request #7 from ilyanikitash/epic/profile_1
DavidBekoev Mar 25, 2025
b759bed
.
DavidBekoev Mar 25, 2025
db67f90
+ Edit ProfileView, + EditProfileViewController
DavidBekoev Mar 25, 2025
833f63f
add decomposition
DavidBekoev Mar 25, 2025
fe7abfe
удаление лишних полей
DavidBekoev Mar 25, 2025
261057a
New Group For Edit
DavidBekoev Mar 25, 2025
26c885e
FIx after team Review
DavidBekoev Mar 26, 2025
c27b417
Merge pull request #10 from ilyanikitash/epic/profile_2
DavidBekoev Mar 27, 2025
fcc122b
fix
DavidBekoev Mar 27, 2025
f62f6be
add My NFT
DavidBekoev Mar 29, 2025
b244aa9
add myNFT
DavidBekoev Apr 1, 2025
6df4f1e
add FavoritesNFT
DavidBekoev Apr 2, 2025
d689c8f
fix after review
DavidBekoev Apr 3, 2025
23c4cd8
fix after review 2
DavidBekoev Apr 4, 2025
b1842bf
отступы
DavidBekoev Apr 4, 2025
a622386
Merge pull request #11 from ilyanikitash/epic/profile_3
DavidBekoev Apr 6, 2025
76175b2
.
DavidBekoev Apr 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added Decompositions/.gitkeep
Empty file.
126 changes: 112 additions & 14 deletions FakeNFT.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"originHash" : "3ca36a61ff4abf417842daa08db83926a5b53c93475117297e3cb9099bc72fb9",
"pins" : [
{
"identity" : "kingfisher",
"kind" : "remoteSourceControl",
"location" : "https://github.com/onevcat/Kingfisher.git",
"state" : {
"revision" : "af4be924ad984cf4d16f4ae4df424e79a443d435",
"version" : "7.6.2"
"revision" : "4c6b067f96953ee19526e49e4189403a2be21fb3",
"version" : "8.3.1"
}
},
{
Expand All @@ -19,5 +20,5 @@
}
}
],
"version" : 2
"version" : 3
}
2 changes: 1 addition & 1 deletion FakeNFT.xcodeproj/xcshareddata/xcschemes/FakeNFT.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1620"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
6 changes: 5 additions & 1 deletion FakeNFT/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ final class AppDelegate: UIResponder, UIApplicationDelegate {
configurationForConnecting connectingSceneSession: UISceneSession,
options _: UIScene.ConnectionOptions
) -> UISceneConfiguration {
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
let configuration = UISceneConfiguration(name: nil, sessionRole: connectingSceneSession.role)
configuration.storyboard = nil
configuration.sceneClass = UIWindowScene.self
configuration.delegateClass = SceneDelegate.self
return configuration
}
}
15 changes: 15 additions & 0 deletions FakeNFT/Models/Network/My NFT.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// My NFT.swift
// FakeNFT
//
// Created by Давид Бекоев on 29.03.2025.
//

struct MyNFT: Decodable {
let id: String
let name: String
let images: [String]
let rating: Int
let price: Float
let author: String
}
23 changes: 23 additions & 0 deletions FakeNFT/Resources/Assets.xcassets/Edit.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"colors" : [
{
"color" : {
"color-space" : "display-p3",
"components" : {
"alpha" : "1.000",
"blue" : "0xF8",
"green" : "0xF7",
"red" : "0xF7"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
22 changes: 22 additions & 0 deletions FakeNFT/Resources/Assets.xcassets/Profile.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "No Active.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "No Active 1.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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Light.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Light 1.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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"colors" : [
{
"color" : {
"color-space" : "display-p3",
"components" : {
"alpha" : "1.000",
"blue" : "0x22",
"green" : "0x1B",
"red" : "0x1A"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
22 changes: 22 additions & 0 deletions FakeNFT/Resources/Assets.xcassets/backward.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Light.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Light 2.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.
22 changes: 22 additions & 0 deletions FakeNFT/Resources/Assets.xcassets/red_heart.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Favourites icons 1.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Favourites icons.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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Favourites icons.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Favourites icons 1.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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "Stars 1.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Stars 2.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Stars.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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "Stars 2.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Stars 1.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Stars.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.
27 changes: 27 additions & 0 deletions FakeNFT/Resources/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,30 @@
"Error.unknown" = "Произошла неизвестная ошибка";
"Error.repeat" = "Повторить";
"Error.title" = "Ошибка";

"Tab.profile" = "Профиль";
"MyNFT" = "Мои NFT";
"Favorites" = "Избранные NFT";
"AboutDeveloper" = "О разработчике";
"NoInformation" = "Нет дополнительной информации";
"Name" = "Имя";
"Description" = "Описание";
"WebSite" = "Сайт";
"ChangePhoto" = "Сменить\nфото";
"LoadImage" = "Загрузить изображение";
"EnterImageURL" = "Введите ссылку";
"PleaseEnterURLForAvatar" = "Введите ссылку на изображение";
"FailedToLoadProfile" = "Не удалось загрузить профиль";
"Cancel" = "Отмена";
"TryAgain" = "Попробовать снова";
"by" = "от";
"Price" = "Цена";
"MyNFT" = "Мои NFT";
"Sort by" = "Сортировка";
"by Price" = "По цене";
"by Rating" = "По рейтингу";
"by Name" = "По названию";
"Close" = "Закрыть";
"noNFTs" = "У Вас еще нет NFT";
"noFavoritesNFTs" = "У Вас еще нет избранных NFT";

38 changes: 29 additions & 9 deletions FakeNFT/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,34 @@ import UIKit

final class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow?

let servicesAssembly = ServicesAssembly(
networkClient: DefaultNetworkClient(),
nftStorage: NftStorageImpl()
)

func scene(_: UIScene, willConnectTo _: UISceneSession, options _: UIScene.ConnectionOptions) {
let tabBarController = window?.rootViewController as? TabBarController
tabBarController?.servicesAssembly = servicesAssembly
var servicesAssembly: ServicesAssembly!
func scene(_ scene: UIScene, willConnectTo _: UISceneSession, options _: UIScene.ConnectionOptions) {
guard let windowScene = (scene as? UIWindowScene) else { return }
let window = UIWindow(windowScene: windowScene)
let tabBarController = TabBarController()

window.rootViewController = tabBarController
self.window = window
window.makeKeyAndVisible()
}

func sceneWillResignActive(_ scene: UIScene) {
sendLikesToServer()
}

func sceneDidEnterBackground(_ scene: UIScene) {
sendLikesToServer()
}

private func sendLikesToServer() {
let likes = LikesStorageImpl.shared.getAllLikes()
servicesAssembly.profileService.updateLikes(likes: likes) { result in
switch result {
case .success:
print("Лайки успешно отправлены перед выходом из приложения.")
case .failure(let error):
print("Ошибка отправки лайков: \(error.localizedDescription)")
}
}
}
}
16 changes: 16 additions & 0 deletions FakeNFT/Scenes /ProfileViewController/Edit.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// EditProfileViewController.swift
// FakeNFT
//
// Created by Давид Бекоев on 23.03.2025.
//

import UIKit

final class EditProfileViewController: UIViewController {

override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .white
}
}
Loading