Skip to content

Commit

Permalink
MacOS improvements (#24)
Browse files Browse the repository at this point in the history
* fix: library

* feat: macosv2

* feat: macosv2

* fix: ui improvements

* feat: icons adjusted

* macOS file select

* fix: ui improvements

* assets here

* iOS crash resolved

* adjusted panel animations

* cmd+v buttons

* fix: reachability
  • Loading branch information
AugustDev authored Feb 18, 2024
1 parent e46a8d6 commit d6c42a6
Show file tree
Hide file tree
Showing 50 changed files with 1,019 additions and 242 deletions.
95 changes: 82 additions & 13 deletions Enchanted.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,30 @@
}
},
{
"identity" : "ollamakit",
"identity" : "sauce",
"kind" : "remoteSourceControl",
"location" : "git@github.com:AugustDev/OllamaKit.git",
"location" : "https://github.com/Clipy/Sauce",
"state" : {
"branch" : "main",
"revision" : "ff201fd2f542cad507f0906d0a51a8f9c808726f"
"revision" : "8f8fabaa8509c1a653d6c2c3c87396a4c493d876",
"version" : "2.4.0"
}
},
{
"identity" : "sauce",
"identity" : "swift-docc-plugin",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Clipy/Sauce",
"location" : "https://github.com/apple/swift-docc-plugin.git",
"state" : {
"revision" : "8f8fabaa8509c1a653d6c2c3c87396a4c493d876",
"version" : "2.4.0"
"revision" : "26ac5758409154cc448d7ab82389c520fa8a8247",
"version" : "1.3.0"
}
},
{
"identity" : "swift-docc-symbolkit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-docc-symbolkit",
"state" : {
"revision" : "b45d1f2ed151d057b54504d653e0da5552844e34",
"version" : "1.0.0"
}
},
{
Expand All @@ -62,6 +71,15 @@
"revision" : "5df8a4adedd6ae4eb2455ef60ff75183984daeb8",
"version" : "2.2.0"
}
},
{
"identity" : "vortex",
"kind" : "remoteSourceControl",
"location" : "https://github.com/twostraws/Vortex",
"state" : {
"revision" : "3eabf0572fd37e943be64b9d2589f97f1999cb26",
"version" : "1.0.0"
}
}
],
"version" : 2
Expand Down
10 changes: 10 additions & 0 deletions Enchanted.xcodeproj/xcshareddata/xcschemes/Enchanted.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@
ReferencedContainer = "container:Enchanted.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<CommandLineArguments>
<CommandLineArgument
argument = "-com.apple.CoreData.SQLDebug 1"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "-com.apple.CoreData.ConcurrencyDebug 1"
isEnabled = "NO">
</CommandLineArgument>
</CommandLineArguments>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
22 changes: 11 additions & 11 deletions Enchanted/Assets.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -1,67 +1,67 @@
{
"images" : [
{
"filename" : "cir-1024.png",
"filename" : "ios 1.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
},
{
"filename" : "cir-1024 1-16.png",
"filename" : "latest-16.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "16x16"
},
{
"filename" : "cir-1024 1-32.png",
"filename" : "latest-32.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "16x16"
},
{
"filename" : "cir-1024 1-32.png",
"filename" : "latest-32.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "32x32"
},
{
"filename" : "cir-1024 1-64.png",
"filename" : "latest-64.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "32x32"
},
{
"filename" : "cir-1024 1-128.png",
"filename" : "latest-128.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "128x128"
},
{
"filename" : "cir-1024 1-256.png",
"filename" : "latest-256.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "128x128"
},
{
"filename" : "cir-1024 1-256.png",
"filename" : "latest-256.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "256x256"
},
{
"filename" : "cir-1024 1-512.png",
"filename" : "latest-512.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "256x256"
},
{
"filename" : "cir-1024 1-512.png",
"filename" : "latest-512.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "512x512"
},
{
"filename" : "cir-1024 1-1024.png",
"filename" : "latest-1024.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512"
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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.
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.
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.
1 change: 0 additions & 1 deletion Enchanted/Extensions/Button+Extension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import SwiftUI
struct GrowingButton: ButtonStyle {
func makeBody(configuration: Configuration) -> some View {
configuration.label
.clipShape(Capsule())
.scaleEffect(configuration.isPressed ? 1.2 : 1)
.animation(.easeOut(duration: 0.2), value: configuration.isPressed)
}
Expand Down
4 changes: 2 additions & 2 deletions Enchanted/Extensions/KeyboardReadable+Extension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import Combine
#if os(iOS)
/// Publisher to read keyboard changes.
protocol KeyboardReadable {
var keyboardPublisher: AnyPublisher<Bool, Never> { get }
@MainActor var keyboardPublisher: AnyPublisher<Bool, Never> { get }
}

extension KeyboardReadable {
var keyboardPublisher: AnyPublisher<Bool, Never> {
@MainActor var keyboardPublisher: AnyPublisher<Bool, Never> {
Publishers.Merge(
NotificationCenter.default
.publisher(for: UIResponder.keyboardWillShowNotification)
Expand Down
19 changes: 19 additions & 0 deletions Enchanted/Extensions/NSClipboardItem.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// NSPasteboardItem.swift
// Enchanted
//
// Created by Augustinas Malinauskas on 17/02/2024.
//

#if os(macOS)
import Foundation
import AppKit

extension NSPasteboardItem {
func image(forType type: NSPasteboard.PasteboardType) -> Data? {
guard let tiffData = data(forType: type) else { return nil }
let image = NSImage(data: tiffData)
return image?.tiffRepresentation
}
}
#endif
1 change: 1 addition & 0 deletions Enchanted/Extensions/View+Extension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import SwiftUI

// MARK: - Conditional View
extension View {
/// Whether the view should be empty.
/// - Parameter bool: Set to `true` to show the view (return EmptyView instead).
Expand Down
20 changes: 20 additions & 0 deletions Enchanted/Helpers/DeallocPrinter.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// DeallocPrinter.swift
// Enchanted
//
// Created by Augustinas Malinauskas on 17/02/2024.
//

import Foundation

class DeallocPrinter {
var message: String

init(_ message: String) {
self.message = message
}

deinit {
print("deallocated \(message)")
}
}
Loading

0 comments on commit d6c42a6

Please sign in to comment.