ios: appearance tweaks
This commit is contained in:
BIN
ios/Apps/Sybil/Resources/Fonts/StalinistOne-Regular.ttf
Normal file
BIN
ios/Apps/Sybil/Resources/Fonts/StalinistOne-Regular.ttf
Normal file
Binary file not shown.
@@ -34,7 +34,7 @@ struct SybilPhoneShellView: View {
|
|||||||
.navigationBarTitleDisplayMode(.inline)
|
.navigationBarTitleDisplayMode(.inline)
|
||||||
.toolbar {
|
.toolbar {
|
||||||
ToolbarItem(placement: .topBarLeading) {
|
ToolbarItem(placement: .topBarLeading) {
|
||||||
SybilWordmark(size: 18)
|
SybilWordmark(size: 21)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.navigationDestination(for: PhoneRoute.self) { route in
|
.navigationDestination(for: PhoneRoute.self) { route in
|
||||||
@@ -137,12 +137,15 @@ private struct SybilPhoneSidebarRoot: View {
|
|||||||
.padding(16)
|
.padding(16)
|
||||||
} else {
|
} else {
|
||||||
ScrollView {
|
ScrollView {
|
||||||
LazyVStack(alignment: .leading, spacing: 8) {
|
LazyVStack(alignment: .leading, spacing: 0) {
|
||||||
ForEach(viewModel.sidebarItems) { item in
|
ForEach(viewModel.sidebarItems) { item in
|
||||||
Button {
|
Button {
|
||||||
open(item.selection)
|
open(item.selection)
|
||||||
} label: {
|
} label: {
|
||||||
|
VStack(spacing: 0.0) {
|
||||||
SybilPhoneSidebarRow(item: item)
|
SybilPhoneSidebarRow(item: item)
|
||||||
|
Divider()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.buttonStyle(
|
.buttonStyle(
|
||||||
SybilPhoneSidebarRowButtonStyle(
|
SybilPhoneSidebarRowButtonStyle(
|
||||||
@@ -160,7 +163,6 @@ private struct SybilPhoneSidebarRoot: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.padding(10)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -279,19 +281,18 @@ private struct SybilPhoneSidebarRow: View {
|
|||||||
var item: SidebarItem
|
var item: SidebarItem
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack(alignment: .leading, spacing: 6) {
|
let leadingWidth = 22.0
|
||||||
|
|
||||||
|
VStack(alignment: .leading, spacing: 8) {
|
||||||
HStack(spacing: 8) {
|
HStack(spacing: 8) {
|
||||||
Image(systemName: item.kind == .chat ? "message" : "globe")
|
Image(systemName: item.kind == .chat ? "message" : "globe")
|
||||||
.font(.system(size: 12, weight: .semibold))
|
.font(.system(size: 12, weight: .semibold))
|
||||||
.foregroundStyle(isHighlighted ? SybilTheme.accent : SybilTheme.textMuted)
|
.foregroundStyle(isHighlighted ? SybilTheme.accent : SybilTheme.textMuted)
|
||||||
.frame(width: 22, height: 22)
|
.frame(width: leadingWidth, height: leadingWidth)
|
||||||
.background(
|
.background(
|
||||||
RoundedRectangle(cornerRadius: 7)
|
Rectangle()
|
||||||
.fill(isHighlighted ? SybilTheme.accent.opacity(0.12) : SybilTheme.surface.opacity(0.72))
|
.fill(isHighlighted ? SybilTheme.accent.opacity(0.12) : SybilTheme.surface.opacity(0.72))
|
||||||
.overlay(
|
|
||||||
RoundedRectangle(cornerRadius: 7)
|
|
||||||
.stroke(isHighlighted ? SybilTheme.accent.opacity(0.36) : SybilTheme.border.opacity(0.72), lineWidth: 1)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
Text(item.title)
|
Text(item.title)
|
||||||
@@ -300,6 +301,9 @@ private struct SybilPhoneSidebarRow: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
HStack(spacing: 8) {
|
HStack(spacing: 8) {
|
||||||
|
Spacer()
|
||||||
|
.frame(width: leadingWidth)
|
||||||
|
|
||||||
Text(item.updatedAt.sybilRelativeLabel)
|
Text(item.updatedAt.sybilRelativeLabel)
|
||||||
.font(.sybil(.caption2))
|
.font(.sybil(.caption2))
|
||||||
.foregroundStyle(SybilTheme.textMuted)
|
.foregroundStyle(SybilTheme.textMuted)
|
||||||
@@ -316,21 +320,17 @@ private struct SybilPhoneSidebarRow: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.foregroundStyle(SybilTheme.text)
|
.foregroundStyle(SybilTheme.text)
|
||||||
.padding(.horizontal, 12)
|
.padding(18.0)
|
||||||
.padding(.vertical, 10)
|
|
||||||
.frame(maxWidth: .infinity, alignment: .leading)
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
.background(
|
.background(
|
||||||
RoundedRectangle(cornerRadius: 12)
|
Rectangle()
|
||||||
.fill(
|
.fill(
|
||||||
isHighlighted
|
isHighlighted
|
||||||
? SybilTheme.selectedRowGradient
|
? SybilTheme.selectedRowGradient
|
||||||
: LinearGradient(colors: [SybilTheme.surface.opacity(0.56), SybilTheme.surface.opacity(0.36)], startPoint: .topLeading, endPoint: .bottomTrailing)
|
: LinearGradient(colors: [SybilTheme.surface.opacity(0.56), SybilTheme.surface.opacity(0.36)], startPoint: .topLeading, endPoint: .bottomTrailing)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
.overlay(
|
|
||||||
RoundedRectangle(cornerRadius: 12)
|
|
||||||
.stroke(isHighlighted ? SybilTheme.primary.opacity(0.55) : SybilTheme.border.opacity(0.72), lineWidth: 1)
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ enum SybilFontRegistry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static let registeredFonts: Void = {
|
private static let registeredFonts: Void = {
|
||||||
for fontName in ["Inter", "Orbitron"] {
|
for fontName in ["Inter", "Orbitron", "StalinistOne-Regular"] {
|
||||||
guard let url = Bundle.main.url(forResource: fontName, withExtension: "ttf", subdirectory: "Fonts") ??
|
guard let url = Bundle.main.url(forResource: fontName, withExtension: "ttf", subdirectory: "Fonts") ??
|
||||||
Bundle.main.url(forResource: fontName, withExtension: "ttf")
|
Bundle.main.url(forResource: fontName, withExtension: "ttf")
|
||||||
else {
|
else {
|
||||||
@@ -203,7 +203,7 @@ struct SybilWordmark: View {
|
|||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
Text("SYBIL")
|
Text("SYBIL")
|
||||||
.font(.custom("Orbitron", size: size))
|
.font(.custom("Stalinist One", size: size))
|
||||||
.fontWeight(.black)
|
.fontWeight(.black)
|
||||||
.tracking(0)
|
.tracking(0)
|
||||||
.foregroundStyle(SybilTheme.brandGradient)
|
.foregroundStyle(SybilTheme.brandGradient)
|
||||||
|
|||||||
@@ -332,7 +332,7 @@ final class SybilViewModel {
|
|||||||
kind: .search,
|
kind: .search,
|
||||||
title: searchTitle(title: search.title, query: search.query),
|
title: searchTitle(title: search.title, query: search.query),
|
||||||
updatedAt: search.updatedAt,
|
updatedAt: search.updatedAt,
|
||||||
initiatedLabel: nil
|
initiatedLabel: "exa"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ struct SybilWorkspaceView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private var shouldAutoFocusComposer: Bool {
|
private var shouldAutoFocusComposer: Bool {
|
||||||
viewModel.displayedMessages.isEmpty
|
viewModel.draftKind == .chat && viewModel.displayedMessages.isEmpty
|
||||||
}
|
}
|
||||||
|
|
||||||
private var composerFocusPolicyID: String {
|
private var composerFocusPolicyID: String {
|
||||||
|
|||||||
Reference in New Issue
Block a user