Some tweaks to Mac UI

This commit is contained in:
Jackson Harper 2023-06-05 12:06:27 +08:00
parent 815f93ca94
commit abeff164b9
4 changed files with 6 additions and 16 deletions

View file

@ -153,15 +153,6 @@
"version" : "2.1.0"
}
},
{
"identity" : "pspdfkit-sp",
"kind" : "remoteSourceControl",
"location" : "https://github.com/PSPDFKit/PSPDFKit-SP",
"state" : {
"revision" : "f4ba9790488b8f11c29cff35943e430efcdb8003",
"version" : "12.0.1"
}
},
{
"identity" : "sovran-swift",
"kind" : "remoteSourceControl",

View file

@ -57,7 +57,7 @@ let package = Package(
var appPackageDependencies: [Target.Dependency] {
var deps: [Target.Dependency] = ["Views", "Services", "Models", "Utils"]
// Comment out following line for macOS build
deps.append(.product(name: "PSPDFKit", package: "PSPDFKit-SP"))
// deps.append(.product(name: "PSPDFKit", package: "PSPDFKit-SP"))
return deps
}
@ -71,6 +71,6 @@ var dependencies: [Package.Dependency] {
.package(url: "https://github.com/gonzalezreal/swift-markdown-ui", from: "2.0.0")
]
// Comment out following line for macOS build
deps.append(.package(url: "https://github.com/PSPDFKit/PSPDFKit-SP", from: "12.0.1"))
// deps.append(.package(url: "https://github.com/PSPDFKit/PSPDFKit-SP", from: "12.0.1"))
return deps
}

View file

@ -45,6 +45,7 @@ import Views
item: item,
viewModel: viewModel
)
.listRowInsets(EdgeInsets())
.contextMenu {
Button(
action: { viewModel.itemUnderTitleEdit = item },
@ -91,11 +92,11 @@ import Views
LoadingSection()
}
}
// .listStyle(PlainListStyle())
.listStyle(InsetListStyle())
.navigationTitle("Home")
.searchable(
text: $viewModel.searchTerm,
placement: .sidebar
placement: .toolbar
) {
if viewModel.searchTerm.isEmpty {
Text(LocalText.inboxGeneric).searchCompletion("in:inbox ")
@ -105,8 +106,6 @@ import Views
}
}
.onChange(of: viewModel.searchTerm) { _ in
// Maybe we should debounce this, but
// it feels like it works ok without
loadItems(isRefresh: true)
}
.onSubmit(of: .search) {

View file

@ -81,7 +81,7 @@ struct WebReaderContent {
title: `\(articleContent.title.replacingOccurrences(of: "`", with: "\\`"))`,
content: document.getElementById('_omnivore-htmlContent').innerHTML,
originalArticleUrl: "\(item.unwrappedPageURLString)",
contentReader: "WEB",
contentReader: "\(item.contentReader ?? "WEB")",
readingProgressPercent: \(item.readingProgress),
readingProgressAnchorIndex: \(item.readingProgressAnchor),
labels: \(item.labelsJSONString),