mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-25 23:25:20 +00:00
Add visual save indicator button for rooms
- Add bookmark icon button in room header to toggle save status - Use bookmark.fill when room is saved, bookmark when not - Button shows yellow when saved, default color when not - Integrate with existing /save command functionality - Add savedRooms published property for reactive UI updates
This commit is contained in:
@@ -296,6 +296,16 @@ struct ContentView: View {
|
||||
Spacer()
|
||||
|
||||
HStack(spacing: 8) {
|
||||
// Save button
|
||||
Button(action: {
|
||||
viewModel.sendMessage("/save")
|
||||
}) {
|
||||
Image(systemName: viewModel.savedRooms.contains(currentRoom) ? "bookmark.fill" : "bookmark")
|
||||
.font(.system(size: 16))
|
||||
.foregroundColor(viewModel.savedRooms.contains(currentRoom) ? Color.yellow : textColor)
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
|
||||
// Password button for room creator only
|
||||
if viewModel.roomCreators[currentRoom] == viewModel.meshService.myPeerID {
|
||||
Button(action: {
|
||||
|
||||
Reference in New Issue
Block a user