Skip to content

Commit

Permalink
1.1.3-1, bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cdillard committed May 11, 2023
1 parent d87b805 commit adc9284
Show file tree
Hide file tree
Showing 14 changed files with 194 additions and 230 deletions.
2 changes: 1 addition & 1 deletion SwiftSageiOS/Sourceful/Themes/DefaultSourceCodeTheme.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public struct DefaultSourceCodeTheme: SourceCodeTheme {
public let font = getFont()

static func getFont() -> Font {
Font(name: "Menlo", size: CGFloat(SettingsViewModel.shared.sourceEditorFontSizeFloat))!
Font(name: "Menlo", size: CGFloat(SettingsViewModel.shared.fontSizeSrcEditor))!
}
public let backgroundColor = Colorv(SettingsViewModel.shared.backgroundColorSrcEditor)

Expand Down
8 changes: 4 additions & 4 deletions SwiftSageiOS/SwiftSageiOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@
CODE_SIGN_ENTITLEMENTS = SwiftSageiOS/SwiftSageiOS.entitlements;
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Mac Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"SwiftSageiOS/Preview Content\"";
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 72WEN2C47N;
Expand Down Expand Up @@ -856,7 +856,7 @@
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 1.1.2;
MARKETING_VERSION = 1.1.3;
PRODUCT_BUNDLE_IDENTIFIER = com.chrisdillard.SwiftSageDev;
PRODUCT_NAME = LogicSageDev;
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -877,7 +877,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = SwiftSageiOS/SwiftSageiOS.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"SwiftSageiOS/Preview Content\"";
DEVELOPMENT_TEAM = 72WEN2C47N;
ENABLE_HARDENED_RUNTIME = YES;
Expand Down Expand Up @@ -905,7 +905,7 @@
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 1.1.2;
MARKETING_VERSION = 1.1.3;
PRODUCT_BUNDLE_IDENTIFIER = com.chrisdillard.SwiftSage;
PRODUCT_NAME = LogicSage;
SDKROOT = auto;
Expand Down
106 changes: 69 additions & 37 deletions SwiftSageiOS/SwiftSageiOS/AddView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ struct AddView: View {
@EnvironmentObject var windowManager: WindowManager
@State var currentRoot: GitHubContent?


@State var repoListOpen: Bool = false
@State var fileListOpen: Bool = false
@State var windowListOpen: Bool = false

private func resizableButtonImage(systemName: String, size: CGSize) -> some View {
Image(systemName: systemName)
.resizable()
Expand All @@ -29,21 +34,18 @@ struct AddView: View {
var body: some View {
GeometryReader { geometry in
ScrollView {
VStack(spacing: 4) {
HStack(spacing: 4) {
VStack {
HStack {
Text("open menu:")
.font(.subheadline)
.font(.headline)
.foregroundColor(settingsViewModel.buttonColor)

.padding(.bottom)

Text("for more scroll down 📜⬇️")
.font(.subheadline)
.font(.headline)
.foregroundColor(settingsViewModel.buttonColor)

.padding(.bottom)
}
HStack(spacing: 4) {
HStack {
Button(action: {
withAnimation {
logD("open new File")
Expand Down Expand Up @@ -159,63 +161,93 @@ struct AddView: View {
}

if !settingsViewModel.isLoading {
let repoListMoji = repoListOpen ? "🔽" : "▶️"

let val = max(3, min(15,settingsViewModel.loadDirectories().count))
Text("Downloaded Repositories")
Text("\(repoListMoji) Downloaded Repositories")
.font(.title3)
.lineLimit(nil)
.fontWeight(.bold)

NavigationView {
RepositoriesListView(settingsViewModel: settingsViewModel)
.environmentObject(windowManager)
}
.frame(minWidth: 0, maxWidth: .infinity, minHeight: geometry.size.height/listHeightFactor * Double(val), maxHeight: geometry.size.height/listHeightFactor * Double(val))
.padding()

.onTapGesture {
repoListOpen.toggle()
}
if repoListOpen {


NavigationView {
RepositoriesListView(settingsViewModel: settingsViewModel)
.environmentObject(windowManager)
}
.frame(minWidth: 0, maxWidth: .infinity, minHeight: geometry.size.height/listHeightFactor * Double(val), maxHeight: geometry.size.height/listHeightFactor * Double(val))
#if !os(macOS)

.navigationViewStyle(StackNavigationViewStyle())
.navigationViewStyle(StackNavigationViewStyle())
#endif
}

}
if !settingsViewModel.isLoading {
let filesListMoji = fileListOpen ? "🔽" : "▶️"

Text("Open Repo Tree")
Text("\(filesListMoji) Repo File Tree")
.font(.title3)
.lineLimit(nil)
.fontWeight(.bold)
let rootFileCount = max(3, min(15,settingsViewModel.rootFiles.count))
NavigationView {
RepositoryTreeView(settingsViewModel: settingsViewModel, accessToken: "")
.environmentObject(windowManager)
}
.frame(minWidth: 0, maxWidth: .infinity, minHeight: geometry.size.height/listHeightFactor * Double(rootFileCount), maxHeight: geometry.size.height/listHeightFactor * Double(rootFileCount))
.padding()
.onTapGesture {
fileListOpen.toggle()
}
if (fileListOpen) {


let rootFileCount = max(3, min(15,settingsViewModel.rootFiles.count))

NavigationView {
RepositoryTreeView(settingsViewModel: settingsViewModel, accessToken: "")
.environmentObject(windowManager)
}
.frame(minWidth: 0, maxWidth: .infinity, minHeight: geometry.size.height/listHeightFactor * Double(rootFileCount), maxHeight: geometry.size.height/listHeightFactor * Double(rootFileCount))
#if !os(macOS)

.navigationViewStyle(StackNavigationViewStyle())
.navigationViewStyle(StackNavigationViewStyle())
#endif
.navigationTitle("Repository Tree")
.navigationTitle("Repository Tree")
}
}
Text("Window List")
let windowListMoji = windowListOpen ? "🔽" : "▶️"
Text("\(windowListMoji) Window List")
.font(.title3)
.lineLimit(nil)
.fontWeight(.bold)
let windowCount = max(3, min(15,windowManager.windows.count))
NavigationView {
WindowList(showAddView: $showAddView)
.environmentObject(windowManager)
}
.frame(minWidth: 0, maxWidth: .infinity, minHeight: geometry.size.height/listHeightFactor * Double(windowCount), maxHeight: geometry.size.height/listHeightFactor * Double(windowCount))
.padding()
.onTapGesture {
windowListOpen.toggle()
}
if windowListOpen {
let windowCount = max(3, min(15,windowManager.windows.count))
NavigationView {
WindowList(showAddView: $showAddView)
.environmentObject(windowManager)
}
.frame(minWidth: 0, maxWidth: .infinity, minHeight: geometry.size.height/listHeightFactor * Double(windowCount), maxHeight: geometry.size.height/listHeightFactor * Double(windowCount))
#if !os(macOS)
.navigationViewStyle(StackNavigationViewStyle())
.navigationViewStyle(StackNavigationViewStyle())
#endif
.navigationTitle("Window List:")
.navigationTitle("Window List:")
}
}
.padding(.bottom, geometry.size.height / 8)
#if !os(macOS)

.background(settingsViewModel.backgroundColor)
#endif
.cornerRadius(16)
.frame(minWidth: 0, maxWidth: .infinity, minHeight: 0, maxHeight: .infinity)
}

}
#if !os(macOS)

.background(settingsViewModel.backgroundColor)
#endif
}
}
26 changes: 13 additions & 13 deletions SwiftSageiOS/SwiftSageiOS/CommandButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ struct CommandButtonView: View {
.opacity(0.6)

}
.modifier(CustomFontSize(size: $settingsViewModel.commandButtonFontSizeFloat))
.modifier(CustomFontSize(size: $settingsViewModel.commandButtonFontSize))
.lineLimit(1)
.foregroundColor(Color.white)
.background(settingsViewModel.buttonColor)
Expand All @@ -82,7 +82,7 @@ struct CommandButtonView: View {
Text("")
.opacity(0.6)
}
.modifier(CustomFontSize(size: $settingsViewModel.commandButtonFontSizeFloat))
.modifier(CustomFontSize(size: $settingsViewModel.commandButtonFontSize))
.lineLimit(1)
.foregroundColor(Color.white)
.background(settingsViewModel.buttonColor)
Expand All @@ -97,7 +97,7 @@ struct CommandButtonView: View {
settingsViewModel.multiLineText += "debate "
}) {
Text( "⚖️")
.modifier(CustomFontSize(size: $settingsViewModel.commandButtonFontSizeFloat))
.modifier(CustomFontSize(size: $settingsViewModel.commandButtonFontSize))
.lineLimit(1)
.foregroundColor(Color.white)
.background(settingsViewModel.buttonColor)
Expand All @@ -113,7 +113,7 @@ struct CommandButtonView: View {
settingsViewModel.multiLineText += "i "
}) {
Text( "💡")
.modifier(CustomFontSize(size: $settingsViewModel.commandButtonFontSizeFloat))
.modifier(CustomFontSize(size: $settingsViewModel.commandButtonFontSize))
.lineLimit(1)
.foregroundColor(Color.white)
.background(settingsViewModel.buttonColor)
Expand All @@ -127,7 +127,7 @@ struct CommandButtonView: View {
settingsViewModel.multiLineText += "g "
}) {
Text( "g")
.modifier(CustomFontSize(size: $settingsViewModel.commandButtonFontSizeFloat))
.modifier(CustomFontSize(size: $settingsViewModel.commandButtonFontSize))
.lineLimit(1)
.foregroundColor(Color.white)
.background(settingsViewModel.buttonColor)
Expand Down Expand Up @@ -159,7 +159,7 @@ struct CommandButtonView: View {
Text("")
.opacity(0.74)
}
.modifier(CustomFontSize(size: $settingsViewModel.commandButtonFontSizeFloat))
.modifier(CustomFontSize(size: $settingsViewModel.commandButtonFontSize))

.lineLimit(1)
.foregroundColor(Color.white)
Expand All @@ -173,7 +173,7 @@ struct CommandButtonView: View {
settingsViewModel.multiLineText = ""
}) {
Text( "🗑️")
.modifier(CustomFontSize(size: $settingsViewModel.commandButtonFontSizeFloat))
.modifier(CustomFontSize(size: $settingsViewModel.commandButtonFontSize))
.lineLimit(1)
.foregroundColor(Color.white)
.background(settingsViewModel.buttonColor)
Expand All @@ -198,7 +198,7 @@ struct CommandButtonView: View {

}) {
Text("🛑")
.modifier(CustomFontSize(size: $settingsViewModel.commandButtonFontSizeFloat))
.modifier(CustomFontSize(size: $settingsViewModel.commandButtonFontSize))
.lineLimit(1)
.foregroundColor(Color.white)
.background(settingsViewModel.buttonColor)
Expand All @@ -221,7 +221,7 @@ struct CommandButtonView: View {
#endif
}) {
Text("")
.modifier(CustomFontSize(size: $settingsViewModel.commandButtonFontSizeFloat))
.modifier(CustomFontSize(size: $settingsViewModel.commandButtonFontSize))
.lineLimit(1)
.foregroundColor(Color.white)
.background(settingsViewModel.buttonColor)
Expand Down Expand Up @@ -249,14 +249,14 @@ struct CommandButtonView: View {
ZStack {
Text("🔽")
}
.modifier(CustomFontSize(size: $settingsViewModel.commandButtonFontSizeFloat))
.modifier(CustomFontSize(size: $settingsViewModel.commandButtonFontSize))
.lineLimit(1)
.foregroundColor(Color.white)
.background(settingsViewModel.buttonColor)
}
else {
Text( "💬")
.modifier(CustomFontSize(size: $settingsViewModel.commandButtonFontSizeFloat))
.modifier(CustomFontSize(size: $settingsViewModel.commandButtonFontSize))
.lineLimit(1)
.foregroundColor(Color.white)
.background(settingsViewModel.buttonColor)
Expand Down Expand Up @@ -286,10 +286,10 @@ struct CommandButtonView: View {
}
}
struct CustomFontSize: ViewModifier {
@Binding var size: CGFloat
@Binding var size: Double

func body(content: Content) -> some View {
content
.font(.system(size: size))
.font(.system(size: CGFloat(size)))
}
}
3 changes: 3 additions & 0 deletions SwiftSageiOS/SwiftSageiOS/HelpPopup.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ struct HelpPopup: View {
Text("This app/project is an ALPHA. email me with issues/suggestions.")

Text("Tips:\nYou can dock terminals to side of screen to get them out of way.\nTry making button/toolbar smaller than larger to get your desired size.\nKeyboards can be swiped away or dismissed with Done button.\nTurn off `Button Shapes` in System Display settings.\nOn iPad, use the floating keyboard for max screen real estate and reduction of keyboard annoyance.")

Text("Tap me! ▶️ , I will expand a section...")

Group {
Text("You will start in `mobile` mode. Check out Settings to set your key. Set up server to use computer mode. computer mode allows you to use Xcode from your iOS device.")

Expand Down
2 changes: 0 additions & 2 deletions SwiftSageiOS/SwiftSageiOS/Loading/AsciiText.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@
import Foundation

let logoAscii2 = """
____ _ _____ ________ ______
/ __/ __(_) _/ /___ ______/ ___/ _ \\ /_ __/
_\\ \\| |/|/ / / _/ __/ // /___/ (_ / ___/ / /
/___/|__,__/_/_/ \\__ /\\_ / \\___/_/ /_/
/___/
"""


Expand Down
Loading

0 comments on commit adc9284

Please sign in to comment.