Refactor home to single collection view and add all-functions customization.

Replace scroll/stack layout with one UICollectionView, fix grid column math and Diffable item IDs so location report and quick actions render, and add the customizable all-functions page with persistence and tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-07 09:57:41 +08:00
parent d8329d19fd
commit 715393e78c
14 changed files with 1222 additions and 209 deletions

View File

@ -47,4 +47,15 @@ final class HomeCommonMenuStoreTests: XCTestCase {
)
XCTAssertEqual(common.map(\.uri), ["cloud_management"])
}
func testSplitMenusSeparatesCommonAndMore() {
let menus = [
HomeMenuItem(uri: "wallet", title: "钱包", iconName: "wallet.pass"),
HomeMenuItem(uri: "cloud_management", title: "云盘", iconName: "icloud"),
HomeMenuItem(uri: "task_management", title: "任务", iconName: "checklist"),
]
let split = HomeCommonMenuStore.splitMenus(from: menus, commonURIs: ["wallet", "task_management"])
XCTAssertEqual(split.common.map(\.uri), ["wallet", "task_management"])
XCTAssertEqual(split.more.map(\.uri), ["cloud_management"])
}
}