Skip to content
This repository was archived by the owner on Sep 12, 2024. It is now read-only.

Commit 1f95735

Browse files
committed
Update sidebar
1 parent 0a13215 commit 1f95735

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Snip/Components/Sidebar/SnipItemView.swift

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ struct SnipItemView<Content: View>: View {
3535
Image( self.isExpanded ? "ic_up" : "ic_down")
3636
.resizable()
3737
.renderingMode(.template)
38-
.colorMultiply(self.appState.selectedSnippetId == self.viewModel.snipItem.id && self.appState.selectedSnippetFilter.case == self.viewModel.activeFilter.case ? .white : .text)
38+
.colorMultiply(Color.BLUE_200)
3939
.scaledToFit()
4040
.frame(width: 10, height: 10, alignment: .center)
4141
Spacer()
@@ -44,7 +44,7 @@ struct SnipItemView<Content: View>: View {
4444
Image( self.isExpanded ? "ic_folder_opened" : "ic_folder_closed")
4545
.resizable()
4646
.renderingMode(.template)
47-
.colorMultiply(self.appState.selectedSnippetId == self.viewModel.snipItem.id && self.appState.selectedSnippetFilter.case == self.viewModel.activeFilter.case ? .white : .text)
47+
.colorMultiply(Color.BLUE_200)
4848
.scaledToFit()
4949
.frame(width: 15, height: 15, alignment: .center)
5050

@@ -126,12 +126,6 @@ struct SnipItemView<Content: View>: View {
126126
.scaledToFit()
127127
.frame(width: 15, height: 15, alignment: .center)
128128
.padding(.leading, 4)
129-
.overlay(
130-
Circle()
131-
.fill(self.viewModel.snipItem.syncState == .local ? Color.clear : Color.green)
132-
.frame(width: 8, height: 8)
133-
.offset(x: 7, y: 6)
134-
)
135129
TextField("Snip name", text: Binding<String>(
136130
get: {
137131
self.viewModel.snipItem.name
@@ -152,6 +146,10 @@ struct SnipItemView<Content: View>: View {
152146
.frame(maxWidth: .infinity, alignment: .leading)
153147
.background(isEditingName ? .primary : Color.transparent)
154148
Spacer()
149+
Circle()
150+
.fill(self.viewModel.snipItem.syncState == .local ? Color.clear : Color.green)
151+
.frame(width: 8, height: 8)
152+
.padding(.trailing, 8)
155153
}
156154
.frame(maxWidth: .infinity, alignment: .leading)
157155
.padding(EdgeInsets(top: 4, leading: 0, bottom: 4, trailing: 0))

Snip/Extensions/Color.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ extension Color {
3434
static let PURPLE_500 = Color.init(hex: "bd93f9")
3535
static let PURPLE_700 = Color.init(hex: "735CD1")
3636

37+
static let BLUE_200 = Color.init(hex: "BBDEFB")
38+
3739
static let RED_500 = Color.init(hex: "ff5555")
3840

3941
static let ORANGE_500 = Color.init(hex: "E5946A")

0 commit comments

Comments
 (0)