mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-12-24 08:00:38 +00:00
Editor fixes
This commit is contained in:
parent
556eb15fb4
commit
14b25830ff
1 changed files with 23 additions and 25 deletions
|
@ -157,33 +157,31 @@ extension StatusEditor {
|
||||||
private var characterCountAndLangView: some View {
|
private var characterCountAndLangView: some View {
|
||||||
let value = (currentInstance.instance?.configuration?.statuses.maxCharacters ?? 500) + viewModel.statusTextCharacterLength
|
let value = (currentInstance.instance?.configuration?.statuses.maxCharacters ?? 500) + viewModel.statusTextCharacterLength
|
||||||
HStack(alignment: .center) {
|
HStack(alignment: .center) {
|
||||||
if editorFocusState == assignedFocusState {
|
LangButton(viewModel: viewModel)
|
||||||
LangButton(viewModel: viewModel)
|
.padding(.leading, .layoutPadding)
|
||||||
.padding(.leading, .layoutPadding)
|
|
||||||
|
Button {
|
||||||
Button {
|
withAnimation {
|
||||||
withAnimation {
|
viewModel.showPoll.toggle()
|
||||||
viewModel.showPoll.toggle()
|
viewModel.resetPollDefaults()
|
||||||
viewModel.resetPollDefaults()
|
|
||||||
}
|
|
||||||
} label: {
|
|
||||||
Image(systemName: viewModel.showPoll ? "chart.bar.fill" : "chart.bar")
|
|
||||||
}
|
}
|
||||||
.buttonStyle(.bordered)
|
} label: {
|
||||||
.accessibilityLabel("accessibility.editor.button.poll")
|
Image(systemName: viewModel.showPoll ? "chart.bar.fill" : "chart.bar")
|
||||||
.disabled(viewModel.shouldDisablePollButton)
|
|
||||||
|
|
||||||
Button {
|
|
||||||
withAnimation {
|
|
||||||
viewModel.spoilerOn.toggle()
|
|
||||||
}
|
|
||||||
isSpoilerTextFocused = viewModel.id
|
|
||||||
} label: {
|
|
||||||
Image(systemName: viewModel.spoilerOn ? "exclamationmark.triangle.fill" : "exclamationmark.triangle")
|
|
||||||
}
|
|
||||||
.buttonStyle(.bordered)
|
|
||||||
.accessibilityLabel("accessibility.editor.button.spoiler")
|
|
||||||
}
|
}
|
||||||
|
.buttonStyle(.bordered)
|
||||||
|
.accessibilityLabel("accessibility.editor.button.poll")
|
||||||
|
.disabled(viewModel.shouldDisablePollButton)
|
||||||
|
|
||||||
|
Button {
|
||||||
|
withAnimation {
|
||||||
|
viewModel.spoilerOn.toggle()
|
||||||
|
}
|
||||||
|
isSpoilerTextFocused = viewModel.id
|
||||||
|
} label: {
|
||||||
|
Image(systemName: viewModel.spoilerOn ? "exclamationmark.triangle.fill" : "exclamationmark.triangle")
|
||||||
|
}
|
||||||
|
.buttonStyle(.bordered)
|
||||||
|
.accessibilityLabel("accessibility.editor.button.spoiler")
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue