-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
54 changed files
with
1,947 additions
and
0 deletions.
There are no files selected for viewing
638 changes: 638 additions & 0 deletions
638
old/v1.1/aria2c_gui/aria2c_gui.xcodeproj/project.pbxproj
Large diffs are not rendered by default.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
old/v1.1/aria2c_gui/aria2c_gui.xcodeproj/project.xcworkspace/contents.xcworkspacedata
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file added
BIN
+29.6 KB
...deproj/project.xcworkspace/xcuserdata/timi2506.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
19 changes: 19 additions & 0 deletions
19
...i/aria2c_gui.xcodeproj/xcuserdata/timi2506.xcuserdatad/xcschemes/xcschememanagement.plist
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,19 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>SchemeUserState</key> | ||
<dict> | ||
<key>aria2c_executer.xcscheme_^#shared#^_</key> | ||
<dict> | ||
<key>orderHint</key> | ||
<integer>0</integer> | ||
</dict> | ||
<key>aria2c_gui.xcscheme_^#shared#^_</key> | ||
<dict> | ||
<key>orderHint</key> | ||
<integer>1</integer> | ||
</dict> | ||
</dict> | ||
</dict> | ||
</plist> |
11 changes: 11 additions & 0 deletions
11
old/v1.1/aria2c_gui/aria2c_gui/Assets.xcassets/AccentColor.colorset/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,11 @@ | ||
{ | ||
"colors" : [ | ||
{ | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
68 changes: 68 additions & 0 deletions
68
old/v1.1/aria2c_gui/aria2c_gui/Assets.xcassets/AppIcon.appiconset/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,68 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "icon_16x16 2.png", | ||
"idiom" : "mac", | ||
"scale" : "1x", | ||
"size" : "16x16" | ||
}, | ||
{ | ||
"filename" : "icon_16x16 1.png", | ||
"idiom" : "mac", | ||
"scale" : "2x", | ||
"size" : "16x16" | ||
}, | ||
{ | ||
"filename" : "icon_16x16.png", | ||
"idiom" : "mac", | ||
"scale" : "1x", | ||
"size" : "32x32" | ||
}, | ||
{ | ||
"filename" : "icon_32x32.png", | ||
"idiom" : "mac", | ||
"scale" : "2x", | ||
"size" : "32x32" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "mac", | ||
"scale" : "1x", | ||
"size" : "128x128" | ||
}, | ||
{ | ||
"filename" : "icon_128x128 1.png", | ||
"idiom" : "mac", | ||
"scale" : "2x", | ||
"size" : "128x128" | ||
}, | ||
{ | ||
"filename" : "icon_128x128.png", | ||
"idiom" : "mac", | ||
"scale" : "1x", | ||
"size" : "256x256" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "mac", | ||
"scale" : "2x", | ||
"size" : "256x256" | ||
}, | ||
{ | ||
"filename" : "icon_512x512.png", | ||
"idiom" : "mac", | ||
"scale" : "1x", | ||
"size" : "512x512" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "mac", | ||
"scale" : "2x", | ||
"size" : "512x512" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+57.3 KB
...1.1/aria2c_gui/aria2c_gui/Assets.xcassets/AppIcon.appiconset/icon_128x128 1.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
+57.3 KB
old/v1.1/aria2c_gui/aria2c_gui/Assets.xcassets/AppIcon.appiconset/icon_128x128.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
+6.18 KB
old/v1.1/aria2c_gui/aria2c_gui/Assets.xcassets/AppIcon.appiconset/icon_16x16 1.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
+6.18 KB
old/v1.1/aria2c_gui/aria2c_gui/Assets.xcassets/AppIcon.appiconset/icon_16x16 2.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
+6.18 KB
old/v1.1/aria2c_gui/aria2c_gui/Assets.xcassets/AppIcon.appiconset/icon_16x16.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
+873 KB
....1/aria2c_gui/aria2c_gui/Assets.xcassets/AppIcon.appiconset/[email protected]
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
+9.49 KB
old/v1.1/aria2c_gui/aria2c_gui/Assets.xcassets/AppIcon.appiconset/icon_32x32.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
+20.7 KB
...v1.1/aria2c_gui/aria2c_gui/Assets.xcassets/AppIcon.appiconset/[email protected]
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
+873 KB
old/v1.1/aria2c_gui/aria2c_gui/Assets.xcassets/AppIcon.appiconset/icon_512x512.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
+4.18 MB
....1/aria2c_gui/aria2c_gui/Assets.xcassets/AppIcon.appiconset/[email protected]
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
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,37 @@ | ||
import SwiftUI | ||
import Foundation | ||
import AppKit | ||
|
||
struct ContentView: View { | ||
@State private var url: String = "" | ||
@State private var isNextWindowPresented: Bool = false | ||
|
||
var body: some View { | ||
VStack { | ||
Text("Paste the URL to download with aria2") | ||
.font(.headline) | ||
|
||
TextField("URL", text: $url) | ||
.textFieldStyle(RoundedBorderTextFieldStyle()) | ||
.padding() | ||
|
||
HStack { | ||
Button("Cancel") { | ||
NSApplication.shared.terminate(nil) | ||
} | ||
Button("Continue") { | ||
if !url.isEmpty { | ||
isNextWindowPresented = true | ||
} | ||
} | ||
.disabled(url.isEmpty) | ||
} | ||
.padding() | ||
} | ||
.padding() | ||
.frame(width: 400, height: 150) | ||
.sheet(isPresented: $isNextWindowPresented) { | ||
PathSelectionView(url: url) | ||
} | ||
} | ||
} |
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,65 @@ | ||
import SwiftUI | ||
import Foundation | ||
import AppKit | ||
|
||
struct PathSelectionView: View { | ||
@Environment(\.presentationMode) var presentationMode // Add this line to control sheet dismissal | ||
@State private var path: String = "" | ||
@State private var isShowingFileChooser: Bool = false | ||
let url: String | ||
|
||
var body: some View { | ||
VStack { | ||
HStack { | ||
TextField("Choose Download-Location", text: $path) | ||
.textFieldStyle(RoundedBorderTextFieldStyle()) | ||
|
||
Button("Browse") { | ||
isShowingFileChooser = true | ||
} | ||
.fileImporter(isPresented: $isShowingFileChooser, allowedContentTypes: [.folder]) { result in | ||
switch result { | ||
case .success(let selectedPath): | ||
path = selectedPath.path | ||
case .failure(let error): | ||
print("Failed to select path: \(error.localizedDescription)") | ||
} | ||
} | ||
} | ||
.padding() | ||
|
||
HStack { | ||
Button("Cancel") { | ||
presentationMode.wrappedValue.dismiss() // Dismiss the sheet to return to the previous window | ||
} | ||
|
||
Button("Done") { | ||
copyCommandToClipboard(url: url, path: path) | ||
openURLScheme() | ||
} | ||
.disabled(path.isEmpty) | ||
} | ||
.padding() | ||
} | ||
.padding() | ||
.frame(width: 400, height: 150) | ||
} | ||
|
||
func copyCommandToClipboard(url: String, path: String) { | ||
let command = "/opt/homebrew/bin/aria2c \"\(url)\" --dir \"\(path)\"" | ||
|
||
// Copy command to clipboard | ||
let pasteboard = NSPasteboard.general | ||
pasteboard.clearContents() | ||
pasteboard.setString(command, forType: .string) | ||
|
||
print("Command copied to clipboard: \(command)") | ||
} | ||
|
||
func openURLScheme() { | ||
let urlScheme = "shortcuts://run-shortcut?name=DO-NOT-CHANGE_aria2c_GUI_downloader" | ||
if let url = URL(string: urlScheme) { | ||
NSWorkspace.shared.open(url) | ||
} | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
old/v1.1/aria2c_gui/aria2c_gui/Preview Content/Preview Assets.xcassets/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,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
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,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>com.apple.security.app-sandbox</key> | ||
<true/> | ||
<key>com.apple.security.automation.apple-events</key> | ||
<true/> | ||
<key>com.apple.security.cs.allow-jit</key> | ||
<true/> | ||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key> | ||
<true/> | ||
<key>com.apple.security.files.user-selected.read-write</key> | ||
<true/> | ||
</dict> | ||
</plist> |
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,10 @@ | ||
import SwiftUI | ||
|
||
@main | ||
struct Aria2DownloaderApp: App { | ||
var body: some Scene { | ||
WindowGroup { | ||
ContentView() // Ensure ContentView is correctly defined | ||
} | ||
} | ||
} |
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,17 @@ | ||
// | ||
// aria2c_guiTests.swift | ||
// aria2c_guiTests | ||
// | ||
// Created by Tim Schuchardt on 10.08.2024. | ||
// | ||
|
||
import Testing | ||
@testable import aria2c_gui | ||
|
||
struct aria2c_guiTests { | ||
|
||
@Test func example() async throws { | ||
// Write your test here and use APIs like `#expect(...)` to check expected conditions. | ||
} | ||
|
||
} |
43 changes: 43 additions & 0 deletions
43
old/v1.1/aria2c_gui/aria2c_guiUITests/aria2c_guiUITests.swift
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,43 @@ | ||
// | ||
// aria2c_guiUITests.swift | ||
// aria2c_guiUITests | ||
// | ||
// Created by Tim Schuchardt on 10.08.2024. | ||
// | ||
|
||
import XCTest | ||
|
||
final class aria2c_guiUITests: XCTestCase { | ||
|
||
override func setUpWithError() throws { | ||
// Put setup code here. This method is called before the invocation of each test method in the class. | ||
|
||
// In UI tests it is usually best to stop immediately when a failure occurs. | ||
continueAfterFailure = false | ||
|
||
// In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. | ||
} | ||
|
||
override func tearDownWithError() throws { | ||
// Put teardown code here. This method is called after the invocation of each test method in the class. | ||
} | ||
|
||
@MainActor | ||
func testExample() throws { | ||
// UI tests must launch the application that they test. | ||
let app = XCUIApplication() | ||
app.launch() | ||
|
||
// Use XCTAssert and related functions to verify your tests produce the correct results. | ||
} | ||
|
||
@MainActor | ||
func testLaunchPerformance() throws { | ||
if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) { | ||
// This measures how long it takes to launch your application. | ||
measure(metrics: [XCTApplicationLaunchMetric()]) { | ||
XCUIApplication().launch() | ||
} | ||
} | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
old/v1.1/aria2c_gui/aria2c_guiUITests/aria2c_guiUITestsLaunchTests.swift
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,33 @@ | ||
// | ||
// aria2c_guiUITestsLaunchTests.swift | ||
// aria2c_guiUITests | ||
// | ||
// Created by Tim Schuchardt on 10.08.2024. | ||
// | ||
|
||
import XCTest | ||
|
||
final class aria2c_guiUITestsLaunchTests: XCTestCase { | ||
|
||
override class var runsForEachTargetApplicationUIConfiguration: Bool { | ||
true | ||
} | ||
|
||
override func setUpWithError() throws { | ||
continueAfterFailure = false | ||
} | ||
|
||
@MainActor | ||
func testLaunch() throws { | ||
let app = XCUIApplication() | ||
app.launch() | ||
|
||
// Insert steps here to perform after app launch but before taking a screenshot, | ||
// such as logging into a test account or navigating somewhere in the app | ||
|
||
let attachment = XCTAttachment(screenshot: app.screenshot()) | ||
attachment.name = "Launch Screen" | ||
attachment.lifetime = .keepAlways | ||
add(attachment) | ||
} | ||
} |
Oops, something went wrong.