mirror of
https://github.com/readest/readest
synced 2026-04-21 13:37:44 +00:00
fix: fixed status info layout in vertical mode, fixed Android build (#3735)
This commit is contained in:
parent
6a44f609ba
commit
52ac74bbad
4 changed files with 30 additions and 67 deletions
75
Cargo.lock
generated
75
Cargo.lock
generated
|
|
@ -1409,22 +1409,6 @@ dependencies = [
|
|||
"syn 2.0.117",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ctor"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "352d39c2f7bef1d6ad73db6f5160efcaed66d94ef8c6c573a8410c00bf909a98"
|
||||
dependencies = [
|
||||
"ctor-proc-macro",
|
||||
"dtor",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ctor-proc-macro"
|
||||
version = "0.0.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "52560adf09603e58c9a7ee1fe1dcb95a16927b17c127f0ac02d6e768a0e25bc1"
|
||||
|
||||
[[package]]
|
||||
name = "ctr"
|
||||
version = "0.9.2"
|
||||
|
|
@ -1515,17 +1499,6 @@ version = "0.3.2"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "be1e0bca6c3637f992fc1cc7cbc52a78c1ef6db076dbf1059c4323d6a2048376"
|
||||
|
||||
[[package]]
|
||||
name = "dbus"
|
||||
version = "0.9.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "21b3aa68d7e7abee336255bd7248ea965cc393f3e70411135a6f6a4b651345d4"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"libdbus-sys",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "default-net"
|
||||
version = "0.22.0"
|
||||
|
|
@ -1804,21 +1777,6 @@ dependencies = [
|
|||
"dtoa",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dtor"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f1057d6c64987086ff8ed0fd3fbf377a6b7d205cc7715868cd401705f715cbe4"
|
||||
dependencies = [
|
||||
"dtor-proc-macro",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dtor-proc-macro"
|
||||
version = "0.0.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f678cf4a922c215c63e0de95eb1ff08a958a81d47e485cf9da1e27bf6305cfa5"
|
||||
|
||||
[[package]]
|
||||
name = "dunce"
|
||||
version = "1.0.5"
|
||||
|
|
@ -3532,15 +3490,6 @@ version = "0.2.183"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d"
|
||||
|
||||
[[package]]
|
||||
name = "libdbus-sys"
|
||||
version = "0.2.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "328c4789d42200f1eeec05bd86c9c13c7f091d2ba9a6ea35acdf51f31bc0f043"
|
||||
dependencies = [
|
||||
"pkg-config",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libloading"
|
||||
version = "0.7.4"
|
||||
|
|
@ -3957,6 +3906,12 @@ dependencies = [
|
|||
"thiserror 1.0.69",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ndk-context"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b"
|
||||
|
||||
[[package]]
|
||||
name = "ndk-sys"
|
||||
version = "0.6.0+11769913"
|
||||
|
|
@ -7086,16 +7041,15 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "tao"
|
||||
version = "0.35.0"
|
||||
version = "0.34.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1cf65722394c2ac443e80120064987f8914ee1d4e4e36e63cdf10f2990f01159"
|
||||
checksum = "9103edf55f2da3c82aea4c7fab7c4241032bfeea0e71fa557d98e00e7ce7cc20"
|
||||
dependencies = [
|
||||
"bitflags 2.11.0",
|
||||
"block2",
|
||||
"core-foundation 0.10.1",
|
||||
"core-graphics 0.25.0",
|
||||
"crossbeam-channel",
|
||||
"dbus",
|
||||
"dispatch2",
|
||||
"dlopen2 0.8.2",
|
||||
"dpi",
|
||||
|
|
@ -7106,14 +7060,13 @@ dependencies = [
|
|||
"libc",
|
||||
"log",
|
||||
"ndk",
|
||||
"ndk-context",
|
||||
"ndk-sys",
|
||||
"objc2",
|
||||
"objc2-app-kit",
|
||||
"objc2-foundation",
|
||||
"objc2-ui-kit",
|
||||
"once_cell",
|
||||
"parking_lot",
|
||||
"percent-encoding",
|
||||
"raw-window-handle",
|
||||
"tao-macros",
|
||||
"unicode-segmentation",
|
||||
|
|
@ -7827,8 +7780,7 @@ dependencies = [
|
|||
"anyhow",
|
||||
"brotli",
|
||||
"cargo_metadata",
|
||||
"ctor 0.8.0",
|
||||
"dom_query",
|
||||
"ctor",
|
||||
"dunce",
|
||||
"getrandom 0.3.4",
|
||||
"glob",
|
||||
|
|
@ -7854,7 +7806,6 @@ dependencies = [
|
|||
"serialize-to-javascript",
|
||||
"swift-rs",
|
||||
"tauri",
|
||||
"tempfile",
|
||||
"thiserror 2.0.18",
|
||||
"toml 1.1.1+spec-1.1.0",
|
||||
"url",
|
||||
|
|
@ -7871,7 +7822,7 @@ checksum = "219a1f983a2af3653f75b5747f76733b0da7ff03069c7a41901a5eb3ace4557d"
|
|||
dependencies = [
|
||||
"anyhow",
|
||||
"cargo_metadata",
|
||||
"ctor 0.2.9",
|
||||
"ctor",
|
||||
"dunce",
|
||||
"glob",
|
||||
"html5ever 0.29.1",
|
||||
|
|
@ -10001,9 +9952,9 @@ checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9"
|
|||
|
||||
[[package]]
|
||||
name = "wry"
|
||||
version = "0.55.0"
|
||||
version = "0.54.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3013fd6116aac351dd2e18f349b28b2cfef3a5ff3253a9d0ce2d7193bb1b4429"
|
||||
checksum = "e5a8135d8676225e5744de000d4dff5a082501bf7db6a1c1495034f8c314edbc"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"block2",
|
||||
|
|
|
|||
|
|
@ -231,8 +231,14 @@ describe('Paginator multi-view architecture (browser)', () => {
|
|||
await paginator.goTo({ index: idx, anchor: 0.5 });
|
||||
await stabilized;
|
||||
expect(paginator.primaryIndex).toBe(idx);
|
||||
// When anchored at 0.5 in a multi-page section, page > 0
|
||||
expect(paginator.page).toBeGreaterThan(0);
|
||||
// When anchored at 0.5 in a multi-page section, page should be
|
||||
// roughly in the middle — at least past page 0 when there are
|
||||
// enough pages (sections with few columns may legitimately land
|
||||
// on page 0 at 50%).
|
||||
if (paginator.pages > 2) {
|
||||
expect(paginator.page).toBeGreaterThan(0);
|
||||
}
|
||||
expect(paginator.page).toBeLessThan(paginator.pages);
|
||||
});
|
||||
|
||||
it('should navigate to a later section and back', async () => {
|
||||
|
|
|
|||
|
|
@ -29,12 +29,17 @@ const StatusInfo: React.FC<StatusInfoProps> = ({
|
|||
<div
|
||||
className={clsx(
|
||||
'status-bar flex shrink-0 items-center gap-2 whitespace-nowrap tabular-nums',
|
||||
isVertical ? 'my-auto flex-col' : 'flex-row',
|
||||
isVertical ? 'my-auto' : 'flex-row',
|
||||
)}
|
||||
>
|
||||
{showTime && <span>{formattedTime}</span>}
|
||||
{showBattery && batteryLevel !== null && (
|
||||
<span className='relative inline-flex translate-y-[-0.5px] items-center justify-center'>
|
||||
<span
|
||||
className={clsx(
|
||||
'relative inline-flex items-center justify-center',
|
||||
isVertical ? 'my-[6.5px] rotate-90' : 'translate-y-[-0.5px]',
|
||||
)}
|
||||
>
|
||||
<svg width='25' height='12' viewBox='0 0 25 12' fill='none'>
|
||||
<rect
|
||||
x='0.5'
|
||||
|
|
@ -65,6 +70,7 @@ const StatusInfo: React.FC<StatusInfoProps> = ({
|
|||
<span
|
||||
className={clsx(
|
||||
'absolute text-[8px] font-medium leading-none invert',
|
||||
isVertical && '[writing-mode:horizontal-tb]',
|
||||
isEink ? 'text-black mix-blend-difference' : 'text-base-300 mix-blend-luminosity',
|
||||
)}
|
||||
style={{ left: '11px', transform: 'translateX(-50%)' }}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit d8ccbd18c992297bbfb36440b68646adf0ffa704
|
||||
Subproject commit a605890df2c3f802aaa5b9a28d522772d7e7bc76
|
||||
Loading…
Reference in a new issue