checkpoint: v3.0.4 — 隐藏 APP 名称开关,Preferences General Toggle,Flat/Container 双模式均支持
5 files modified
28 ■■■■ changed files
Apptag/AppGridItem.swift 13 ●●●●● patch | view | raw | blame | history
Apptag/ApptagApp.swift 5 ●●●●● patch | view | raw | blame | history
Apptag/ContentView.swift 6 ●●●●● patch | view | raw | blame | history
Apptag/Info.plist 2 ●●● patch | view | raw | blame | history
Apptag/TagGroupView.swift 2 ●●●●● patch | view | raw | blame | history
Apptag/AppGridItem.swift
@@ -6,6 +6,7 @@
struct AppGridItem: View {
    let app: AppInfo
    let iconSize: CGFloat
    var showName: Bool = true
    let onSelect: () -> Void
    @State private var isHovered = false
@@ -25,11 +26,13 @@
                    )
                    .animation(.spring(response: 0.3, dampingFraction: 0.7), value: isHovered)
                Text(app.name)
                    .font(.system(size: 11, weight: .medium))
                    .lineLimit(1)
                    .truncationMode(.tail)
                    .frame(maxWidth: iconSize + 20)
                if showName {
                    Text(app.name)
                        .font(.system(size: 11, weight: .medium))
                        .lineLimit(1)
                        .truncationMode(.tail)
                        .frame(maxWidth: iconSize + 20)
                }
            }
            .padding(.vertical, 8)
            .padding(.horizontal, 4)
Apptag/ApptagApp.swift
@@ -320,6 +320,7 @@
    @AppStorage("tagPosition") private var tagPosition = "left"
    @AppStorage("defaultGroupName") private var defaultGroupName = "Other"
    @AppStorage("displayMode") private var displayMode = "flat"
    @AppStorage("hideAppNames") private var hideAppNames = false
    @State private var allApps: [AppInfo] = []
    @State private var tagColors: [String: Int] = [:]
@@ -400,6 +401,10 @@
                }
                Section {
                    Toggle("Hide app names", isOn: $hideAppNames)
                }
                Section {
                    LabeledContent("Tag position:") {
                        Picker("", selection: $tagPosition) {
                            Text("Left").tag("left")
Apptag/ContentView.swift
@@ -212,6 +212,7 @@
    @AppStorage("tagPosition") private var tagPosition = "left"
    @State private var notchHeight: CGFloat = 0
    @AppStorage("displayMode") private var displayMode = "flat"
    @AppStorage("hideAppNames") private var hideAppNames = false
    private var isSideLayout: Bool {
        tagPosition == "left" || tagPosition == "right"
@@ -382,7 +383,8 @@
                            group: group,
                            onSelectApp: { app in openApp(app) },
                            tagFontSize: tagFontSize,
                            iconSize: iconSize
                            iconSize: iconSize,
                            showNames: !hideAppNames
                        ).id(group.id)
                    }
                }.padding(20)
@@ -456,7 +458,7 @@
                spacing: 2
            ) {
                ForEach(group.apps) { app in
                    AppGridItem(app: app, iconSize: iconSize, onSelect: { openApp(app) })
                    AppGridItem(app: app, iconSize: iconSize, showName: !hideAppNames, onSelect: { openApp(app) })
                }
            }
        }
Apptag/Info.plist
@@ -19,7 +19,7 @@
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>3.0.2</string>
    <string>3.0.4</string>
    <key>CFBundleVersion</key>
    <string>1</string>
    <key>LSMinimumSystemVersion</key>
Apptag/TagGroupView.swift
@@ -7,6 +7,7 @@
    let onSelectApp: (AppInfo) -> Void
    let tagFontSize: CGFloat
    let iconSize: CGFloat
    var showNames: Bool = true
    /// Adaptive columns — auto-fit based on icon size and available width.
    private var columns: [GridItem] {
@@ -43,6 +44,7 @@
                    AppGridItem(
                        app: app,
                        iconSize: iconSize,
                        showName: showNames,
                        onSelect: { onSelectApp(app) }
                    )
                }