mirror of
https://github.com/kiwix/kiwix-apple.git
synced 2025-09-07 02:58:10 -04:00

* setup * RootView setup * open url * ReadingView * ReadingView * webview delegate * webview outlint * sidebar * buttons * bar buttons * reader view model * reader view model * ReadingView iOS * NavigationTitleSubtitle * map * introspect * content group * setting navigation * WebViewCoordinator * webview state * outline * root view iOS macos * ios buttons * OutlineMenu * OutlineMenu * outlint tree * webview gesture * bookmark button * merge notification * BookmarkMultiButton * ArticleCell * ArticleCell * data model * iOS bookmarks * bookmark loading * search * RandomArticle * MainArticleMenuButton * MoreActionMenu * swiftui4 * BarSetupModifier * RootView_SwiftUI4 * NavigationItem * purge & renaming * bookmarks * welcome no content * welcome no content * file importer * macos library hookup * library iOS setup * Library * Library setup * buttons * library setup * CategoryList * predicates * grid * settings view * RootView_SwiftUI4 * RootView * root view * RootView_iOS * ios reading view model * rootview * onchange * ios bars * reading view iOS 16 button * bookmark sort * mvoe * project setting * focus * NavigationItemButtons * patches * PageZoomButtons * FocusedSceneValue modifier * pagezoom observer * search view * SearchView * dismiss search * min detail view size * search result * SearchView * resrch * dismiss search on url change * search view * ios search setup * search * macos search * ios search * remove old search * use searchbar * searching * ios memory leak * WebViewConfiguration * macOS webview * refactor * SearchBar setup * search bar setup * SearchBar setup * searchbar * ReadingView * webview ref * outline * sheet * toolbar title outline * compact reading view * settings * recent search * reading view * reading view * SearchView * several small changes * shortcuts * commands buttons * macos command * navigation action * patch * revert * webview retention * navigation focused scene value * ipad keyboard shortcut * macos app min fheight * ios sheet action * macOS 13 build * purge * move * move * indent * settings * file import * rename * GridCommon * library views * purge * remove LibraryTopic * LibraryView_iOS * move * coredata context * add url binding * ZimFileSelection * pass url down * ZimFileDetail * load main page * revert * macos 12 compile * reading view empty title * view model * onboarding view * root view iOS 16 * ios search * root view * OutlineTree * search overlay * library view * library refresh views * view model * view model * LibraryViewModel * zim file detail * zim file detail styling * zim file detail * library detail & refresh * ZimFileContextMenu * directory monitor * LibraryOperations * LibraryOperations * reopen * migration * zim file migration * bookmark migration * comments * open zim file via bookmark * welcome view * hide bookmark section when empty * bookmark context menu setup * bookmark add / delete view model * skip notification * refactor view modifier * remove old code * url loading * refactor navigation delegate * safari sheet * safari view sheet * iOS font size * max width welcome view * onboarding view * library view * FileImportButton * FileImportButton * dismiss sheet when loading main page * settings misc * category auto refresh * ios app version
76 lines
3.2 KiB
Swift
76 lines
3.2 KiB
Swift
//
|
|
// DefaultKeys.swift
|
|
// Kiwix
|
|
//
|
|
// Created by Chris Li on 6/16/22.
|
|
// Copyright © 2022 Chris Li. All rights reserved.
|
|
//
|
|
|
|
import Defaults
|
|
|
|
extension Defaults.Keys {
|
|
// // reading
|
|
static let webViewTextSizeAdjustFactor = Key<Double>("webViewZoomScale", default: 1)
|
|
static let webViewPageZoom = Key<Double>("webViewPageZoom", default: 1)
|
|
static let externalLinkLoadingPolicy = Key<ExternalLinkLoadingPolicy>(
|
|
"externalLinkLoadingPolicy", default: .alwaysAsk
|
|
)
|
|
static let searchResultSnippetMode = Key<SearchResultSnippetMode>(
|
|
"searchResultSnippetMode", default: .firstSentence
|
|
)
|
|
//
|
|
// // UI
|
|
// static let sideBarDisplayMode = Key<SideBarDisplayMode>("sideBarDisplayMode", default: .automatic)
|
|
//
|
|
// // search
|
|
static let recentSearchTexts = Key<[String]>("recentSearchTexts", default: [])
|
|
|
|
|
|
// library
|
|
static let libraryLanguageCodes = Key<Set<String>>("libraryLanguageCodes", default: Set())
|
|
static let libraryLanguageSortingMode = Key<LibraryLanguageSortingMode>(
|
|
"libraryLanguageSortingMode", default: LibraryLanguageSortingMode.byCounts
|
|
)
|
|
static let libraryAutoRefresh = Key<Bool>("libraryAutoRefresh", default: true)
|
|
static let libraryLastRefresh = Key<Date?>("libraryLastRefresh")
|
|
static let libraryLastRefreshTime = Key<Date?>("libraryLastRefreshTime")
|
|
|
|
static let downloadUsingCellular = Key<Bool>("downloadUsingCellular", default: false)
|
|
static let backupDocumentDirectory = Key<Bool>("backupDocumentDirectory", default: false)
|
|
}
|
|
|
|
extension Defaults.Serializable where Self: Codable {
|
|
public static var bridge: Defaults.TopLevelCodableBridge<Self> { Defaults.TopLevelCodableBridge() }
|
|
}
|
|
|
|
extension Defaults.Serializable where Self: Codable & NSSecureCoding {
|
|
public static var bridge: Defaults.CodableNSSecureCodingBridge<Self> { Defaults.CodableNSSecureCodingBridge() }
|
|
}
|
|
|
|
extension Defaults.Serializable where Self: Codable & NSSecureCoding & Defaults.PreferNSSecureCoding {
|
|
public static var bridge: Defaults.NSSecureCodingBridge<Self> { Defaults.NSSecureCodingBridge() }
|
|
}
|
|
|
|
extension Defaults.Serializable where Self: Codable & RawRepresentable {
|
|
public static var bridge: Defaults.RawRepresentableCodableBridge<Self> { Defaults.RawRepresentableCodableBridge() }
|
|
}
|
|
|
|
extension Defaults.Serializable where Self: Codable & RawRepresentable & Defaults.PreferRawRepresentable {
|
|
public static var bridge: Defaults.RawRepresentableBridge<Self> { Defaults.RawRepresentableBridge() }
|
|
}
|
|
|
|
extension Defaults.Serializable where Self: RawRepresentable {
|
|
public static var bridge: Defaults.RawRepresentableBridge<Self> { Defaults.RawRepresentableBridge() }
|
|
}
|
|
extension Defaults.Serializable where Self: NSSecureCoding {
|
|
public static var bridge: Defaults.NSSecureCodingBridge<Self> { Defaults.NSSecureCodingBridge() }
|
|
}
|
|
|
|
extension Defaults.CollectionSerializable where Element: Defaults.Serializable {
|
|
public static var bridge: Defaults.CollectionBridge<Self> { Defaults.CollectionBridge() }
|
|
}
|
|
|
|
extension Defaults.SetAlgebraSerializable where Element: Defaults.Serializable & Hashable {
|
|
public static var bridge: Defaults.SetAlgebraBridge<Self> { Defaults.SetAlgebraBridge() }
|
|
}
|