Editor toolbar icons

This commit is contained in:
Thomas Ricouard 2024-01-07 09:47:55 +01:00
parent d952601528
commit 27ce7fe916
2 changed files with 27 additions and 25 deletions

View file

@ -53,7 +53,6 @@ extension StatusEditor {
Divider()
}
.opacity(editorFocusState == assignedFocusState ? 1 : 0.6)
}
#if !os(visionOS)
.background(theme.primaryBackgroundColor)
@ -158,6 +157,7 @@ extension StatusEditor {
private var characterCountAndLangView: some View {
let value = (currentInstance.instance?.configuration?.statuses.maxCharacters ?? 500) + viewModel.statusTextCharacterLength
HStack(alignment: .center) {
if editorFocusState == assignedFocusState {
LangButton(viewModel: viewModel)
.padding(.leading, .layoutPadding)
@ -183,6 +183,7 @@ extension StatusEditor {
}
.buttonStyle(.bordered)
.accessibilityLabel("accessibility.editor.button.spoiler")
}
Spacer()

View file

@ -31,7 +31,7 @@ extension StatusEditor {
Button {
isDraftsSheetDisplayed = true
} label: {
Text("status.editor.drafts.navigation-title")
Image(systemName: "pencil.and.list.clipboard")
}
.accessibilityLabel("accessibility.editor.button.drafts")
.popover(isPresented: $isDraftsSheetDisplayed) {
@ -57,7 +57,8 @@ extension StatusEditor {
}
}
} label: {
Text("status.action.post").bold()
Image(systemName: "paperplane.fill")
.bold()
}
.buttonStyle(.borderedProminent)
.disabled(!mainSEVM.canPost || mainSEVM.isPosting)
@ -77,7 +78,7 @@ extension StatusEditor {
object: nil)
}
} label: {
Text("action.cancel")
Image(systemName: "xmark")
}
.keyboardShortcut(.cancelAction)
.confirmationDialog(