Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 16 additions & 0 deletions TablePro/Assets.xcassets/mariadb-icon.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"images" : [
{
"filename" : "mariadb.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
}
}
1 change: 1 addition & 0 deletions TablePro/Assets.xcassets/mariadb-icon.imageset/mariadb.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions TablePro/Assets.xcassets/mysql-icon.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"images" : [
{
"filename" : "mysql.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
}
}
1 change: 1 addition & 0 deletions TablePro/Assets.xcassets/mysql-icon.imageset/mysql.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions TablePro/Assets.xcassets/postgresql-icon.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"images" : [
{
"filename" : "postgresql.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions TablePro/Assets.xcassets/sqlite-icon.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"images" : [
{
"filename" : "sqlite.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
}
}
1 change: 1 addition & 0 deletions TablePro/Assets.xcassets/sqlite-icon.imageset/sqlite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 7 additions & 5 deletions TablePro/Models/DatabaseConnection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,17 @@ enum DatabaseType: String, CaseIterable, Identifiable, Codable {

var id: String { rawValue }

/// SF Symbol name for each database type
/// Asset name for each database type icon
var iconName: String {
switch self {
case .mysql, .mariadb:
return "cylinder.split.1x2.fill"
case .mysql:
return "mysql-icon"
case .mariadb:
return "mariadb-icon"
case .postgresql:
return "server.rack"
return "postgresql-icon"
case .sqlite:
return "doc.fill"
return "sqlite-icon"
}
}

Expand Down
9 changes: 6 additions & 3 deletions TablePro/Views/Connection/ConnectionSidebarHeader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ struct ConnectionSidebarHeader: View {
onSelectSession(session.id)
}) {
HStack {
Image(systemName: session.connection.type.iconName)
Image(session.connection.type.iconName)
.renderingMode(.template)
.foregroundStyle(session.connection.displayColor)

Text(session.connection.database)
Expand Down Expand Up @@ -66,7 +67,8 @@ struct ConnectionSidebarHeader: View {
onOpenConnection(connection)
}) {
HStack {
Image(systemName: connection.type.iconName)
Image(connection.type.iconName)
.renderingMode(.template)
.foregroundStyle(connection.displayColor)

Text(connection.name)
Expand All @@ -88,7 +90,8 @@ struct ConnectionSidebarHeader: View {
HStack(spacing: 8) {
// Database icon
if let session = currentSession {
Image(systemName: session.connection.type.iconName)
Image(session.connection.type.iconName)
.renderingMode(.template)
.font(.system(size: DesignConstants.IconSize.medium))
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The .font() modifier only works with SF Symbols loaded via Image(systemName:). For custom asset images loaded with Image(_:), this modifier has no effect. Since you're now loading custom SVG icons from assets, you should either: 1) remove this line and use a frame size, or 2) add .resizable() modifier to make the image scalable. The recommended approach is to use .resizable().aspectRatio(contentMode: .fit).frame(width: size, height: size) to properly scale the custom icon.

Suggested change
.font(.system(size: DesignConstants.IconSize.medium))
.resizable()
.aspectRatio(contentMode: .fit)
.frame(width: DesignConstants.IconSize.medium,
height: DesignConstants.IconSize.medium)

Copilot uses AI. Check for mistakes.
.foregroundStyle(session.connection.displayColor)
} else {
Expand Down
3 changes: 2 additions & 1 deletion TablePro/Views/Toolbar/ConnectionStatusView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ struct ConnectionStatusView: View {
private var databaseInfoSection: some View {
HStack(spacing: 6) {
// Database type icon
Image(systemName: databaseType.iconName)
Image(databaseType.iconName)
.renderingMode(.template)
.font(.system(size: DesignConstants.IconSize.default))
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The .font() modifier only works with SF Symbols loaded via Image(systemName:). For custom asset images loaded with Image(_:), this modifier has no effect. Since you're now loading custom SVG icons from assets, you should either: 1) remove this line and rely on the frame size for the icon, or 2) add .resizable() modifier to make the image scalable. The recommended approach is to use .resizable().aspectRatio(contentMode: .fit).frame(width: size, height: size) to properly scale the custom icon.

Suggested change
.font(.system(size: DesignConstants.IconSize.default))
.resizable()
.aspectRatio(contentMode: .fit)
.frame(width: DesignConstants.IconSize.default,
height: DesignConstants.IconSize.default)

Copilot uses AI. Check for mistakes.
.foregroundStyle(displayColor)

Expand Down
10 changes: 6 additions & 4 deletions TablePro/Views/WelcomeWindowView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -359,10 +359,12 @@ private struct ConnectionRow: View {

var body: some View {
HStack(spacing: 12) {
// Database type indicator - uses custom color if set
Circle()
.fill(connection.displayColor)
.frame(width: DesignConstants.IconSize.statusDot + 2, height: DesignConstants.IconSize.statusDot + 2)
// Database type icon
Image(connection.type.iconName)
.renderingMode(.template)
.font(.system(size: DesignConstants.IconSize.medium))
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The .font() modifier only works with SF Symbols loaded via Image(systemName:). For custom asset images loaded with Image(_:), this modifier has no effect. Since you're now loading custom SVG icons from assets, you should either: 1) remove this line and rely on the .frame() modifier for sizing, or 2) add .resizable() before .font() to properly scale the image. The recommended approach is to remove .font() and use .resizable().aspectRatio(contentMode: .fit) if the frame alone doesn't scale the image correctly.

Suggested change
.font(.system(size: DesignConstants.IconSize.medium))
.resizable()
.aspectRatio(contentMode: .fit)

Copilot uses AI. Check for mistakes.
.foregroundStyle(connection.displayColor)
.frame(width: DesignConstants.IconSize.medium, height: DesignConstants.IconSize.medium)

// Connection info
VStack(alignment: .leading, spacing: 2) {
Expand Down