spb/zyquo-atlas Public License
The AI-native macOS web browser — every surface, intelligent.
Swift 75.2%
JavaScript 22%
Shell 2%
Makefile 0.9%
1//2// BookmarksBarView.swift3// Zyquo Atlas4//5// Author: Simon-Pierre Boucher6// Mail: contact@spboucher.ai7//8// The toggleable bookmarks bar under the toolbar: the on-bar favorites as9// compact clickable chips. Toggled via the customization panel's "Bookmarks10// bar" switch; full organization lives in the bookmarks manager.11//1213import SwiftUI1415struct BookmarksBarView: View {16 let onOpen: (String) -> Void17 @EnvironmentObject private var env: AppEnvironment18 @EnvironmentObject private var themeEngine: ThemeEngine19 private var theme: AtlasTheme { themeEngine.theme }2021 var body: some View {22 ScrollView(.horizontal, showsIndicators: false) {23 HStack(spacing: ZyquoSpacing.xs) {24 ForEach(env.bookmarks.barBookmarks) { bm in25 Button { onOpen(bm.url) } label: {26 HStack(spacing: ZyquoSpacing.xxs) {27 Image(systemName: "globe").font(.system(size: 9))28 .foregroundStyle(theme.accent)29 Text(bm.title).font(.system(size: 11, weight: .medium)).lineLimit(1)30 .foregroundStyle(theme.textSecondary)31 }32 .padding(.horizontal, ZyquoSpacing.xs)33 .frame(height: 22)34 .contentShape(Rectangle())35 }36 .buttonStyle(.plain)37 .help(bm.url)38 }39 if env.bookmarks.barBookmarks.isEmpty {40 Text("Bookmark a page (⌘D) to add it here")41 .font(.system(size: 11)).foregroundStyle(theme.textTertiary)42 }43 }44 .padding(.horizontal, ZyquoSpacing.sm)45 }46 .frame(height: 30)47 .background(theme.surface)48 .overlay(alignment: .bottom) {49 Rectangle().fill(theme.border).frame(height: ZyquoMetrics.hairline)50 }51 }52}53