Minor improvements (#46)

This commit is contained in:
David Walter 2023-01-08 19:45:11 +01:00 committed by GitHub
parent 8e57f0e63b
commit 6ccd27b2e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 2 deletions

View File

@ -12,7 +12,7 @@ struct AppAccountView: View {
AvatarView(url: account.avatar)
if viewModel.appAccount.id == appAccounts.currentAccount.id {
Image(systemName: "checkmark.circle.fill")
.foregroundColor(.green)
.foregroundStyle(.white, .green)
.offset(x: 5, y: -5)
}
}

View File

@ -213,6 +213,21 @@ public struct AccountDetailView: View {
.scrollContentBackground(.hidden)
.background(theme.secondaryBackgroundColor)
.navigationTitle("About")
.toolbar {
ToolbarItem(placement: .primaryAction) {
Button {
isFieldsSheetDisplayed = false
} label: {
Image(systemName: "xmark")
.imageScale(.small)
.font(.body.weight(.semibold))
.frame(width: 30, height: 30)
.background(theme.primaryBackgroundColor.opacity(0.5))
.clipShape(Circle())
}
.foregroundColor(theme.tintColor)
}
}
}
}

View File

@ -27,5 +27,6 @@ public struct EmptyView: View {
}
.padding(.top, 100)
.padding(.layoutPadding)
.fixedSize(horizontal: false, vertical: true)
}
}

View File

@ -146,7 +146,7 @@ public class StatusEditorViewModel: ObservableObject {
statusText.addAttributes([.foregroundColor: UIColor(Color.label)],
range: NSMakeRange(0, statusText.string.utf16.count))
let hashtagPattern = "(#+[a-zA-Z0-9(_)]{1,})"
let mentionPattern = "(@+[a-zA-Z0-9(_).]{1,})"
let mentionPattern = "(@+[a-zA-Z0-9(_).-]{1,})"
let urlPattern = "(?i)https?://(?:www\\.)?\\S+(?:/|\\b)"
do {