Skip to content

Commit 238ebc3

Browse files
authored
1.8.2 update
1 parent 9764320 commit 238ebc3

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

Weave/BrowserView.swift

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -73,29 +73,29 @@ struct BrowserView: View {
7373
.navigationTitle(pageTitle)
7474

7575
// Toolbar with keyboard shortcuts and tooltips
76-
.toolbar {
76+
.toolbar(id:"overall") {
7777
// Back button
78-
ToolbarItem(placement: .navigation) {
78+
ToolbarItem(id: "back", placement: .navigation) {
7979
Button(action: goBack) {
80-
Image(systemName: "chevron.left")
80+
Label("Back", systemImage: "chevron.left")
8181
}
8282
.help("Go back")
8383
.keyboardShortcut(KeyEquivalent.leftArrow, modifiers: [.command])
8484
.disabled(!webView.canGoBack)
8585
}
8686

8787
// Forward button
88-
ToolbarItem(placement: .navigation) {
88+
ToolbarItem(id: "forward", placement: .navigation) {
8989
Button(action: goForward) {
90-
Image(systemName: "chevron.right")
90+
Label("Forward", systemImage: "chevron.right")
9191
}
9292
.help("Go forward")
9393
.keyboardShortcut(KeyEquivalent.rightArrow, modifiers: [.command])
9494
.disabled(!webView.canGoForward)
9595
}
9696

9797
// Address Bar
98-
ToolbarItem(placement: .status) {
98+
ToolbarItem(id: "address", placement: .status) {
9999
TextField("Search or enter URL", text: $URLString, onCommit: loadURL)
100100
.textFieldStyle(RoundedBorderTextFieldStyle())
101101
.frame(width: 500, height: nil) // Set a fixed width
@@ -109,39 +109,42 @@ struct BrowserView: View {
109109
}
110110

111111
// Refresh button
112-
ToolbarItem(placement: .navigation) {
112+
ToolbarItem(id: "refresh", placement: .navigation) {
113113
Button(action: refresh) {
114-
Image(systemName: "arrow.clockwise")
114+
Label("Refresh", systemImage: "arrow.clockwise")
115115
}
116116
.help("Refresh this page")
117117
.keyboardShortcut("r", modifiers: [.command])
118118
}
119119

120120
// Favicon display
121-
ToolbarItem(placement: .navigation) {
121+
ToolbarItem(id: "favicon", placement: .navigation) {
122+
// Site favicon
122123
if let faviconImage = faviconImage {
123124
Image(nsImage: faviconImage)
124125
.resizable()
125-
.frame(width: 18, height: 18) // Size set to 18x18 for favicon
126+
.frame(width: 18, height: 18)
127+
.font(Font.title.weight(.bold))
126128
} else {
129+
// Placeholder favicon
127130
Image(systemName: "globe.americas.fill")
128131
.resizable()
129-
.frame(width: 18, height: 18) // Placeholder icon
132+
.frame(width: 18, height: 18)
130133
.font(Font.title.weight(.bold))
131134
}
132135
}
133136

134-
// Spacer between address bar and next button chunk
135-
ToolbarItem(placement: .primaryAction) {
137+
// Spacer between address bar and Share button chunk
138+
ToolbarItem(id: "spacer1", placement: .primaryAction) {
136139
Spacer()
137140
}
138141

139142
// Share button
140-
ToolbarItem(placement: .primaryAction) {
143+
ToolbarItem(id: "share", placement: .primaryAction) {
141144
Button(action: {
142145
shareURL(URLString)
143146
}) {
144-
Image(systemName: "square.and.arrow.up")
147+
Label("Share", systemImage: "square.and.arrow.up")
145148
}
146149
.help("Share this page")
147150
}

0 commit comments

Comments
 (0)