Align iOS home common apps and all-functions page with Android.

Add unified HomeCommonMenu/HomeAllFunctions diagnostics, rebuild all-functions from top-level menuList permissions, and document Home and AllFunctions module logic.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-30 09:40:02 +08:00
parent 63fb0462d6
commit 5692134efc
11 changed files with 693 additions and 138 deletions

View File

@ -0,0 +1,33 @@
//
// HomeCommonMenuDiagnostics.swift
// suixinkan
//
// Created by Codex on 2026/6/30.
//
import Foundation
import os
/// Android `HomeCommonMenu` tag
enum HomeCommonMenuDiagnostics {
private static let logger = Logger(subsystem: "com.yuanzhixiang.suixinkan", category: "HomeCommonMenu")
/// 线
static func log(step: String, fields: [String: String]) {
#if DEBUG
let payload = fields.map { "\($0.key)=\($0.value)" }.joined(separator: " ")
logger.debug("step=\(step, privacy: .public) \(payload, privacy: .public)")
#endif
}
/// URI
static func formatURIList(_ uris: [String]) -> String {
"[\(uris.joined(separator: ","))]"
}
/// title|uri
static func formatDisplayItems(_ items: [(title: String, uri: String)]) -> String {
let labels = items.map { "\($0.title)|\($0.uri)" }
return "[\(labels.joined(separator: ","))]"
}
}