From f8521c9a241a7fd70c7a36c9810a36ab843f9b12 Mon Sep 17 00:00:00 2001
From: Ariver <ar@MacBook-Air.local>
Date: Wed, 06 May 2026 17:41:54 +0800
Subject: [PATCH] checkpoint: v3.0.9 — 点击标签高亮容器(粗彩色边框),移除 hover 滚动(瀑布流不兼容)
---
Apptag/ContentView.swift | 39 +++++++++++++++++++++++++++------------
Apptag/Info.plist | 2 +-
CHANGELOG.md | 4 ++++
3 files changed, 32 insertions(+), 13 deletions(-)
diff --git a/Apptag/ContentView.swift b/Apptag/ContentView.swift
index 66c849e..76a4df7 100644
--- a/Apptag/ContentView.swift
+++ b/Apptag/ContentView.swift
@@ -204,6 +204,7 @@
@State private var successToast: String? = nil
@State private var draggedTagNames: [String] = [] // live drag order
@State private var dragItem: String? = nil // currently dragged tag
+ @State private var highlightedGroup: String? = nil // container highlight
// Configurable defaults
@AppStorage("defaultGroupName") private var defaultGroupName = "Other"
@@ -339,7 +340,11 @@
HStack(spacing: 8) {
ForEach(tagLabels) { tag in
TagPill(name: tag.name, colorIndex: tag.colorIndex,
- action: { scrollTo(tag.id) })
+ action: {
+ if highlightedGroup == tag.id { highlightedGroup = nil }
+ else { highlightedGroup = tag.id }
+ scrollTo(tag.id)
+ })
}
}.padding(.horizontal, 24)
}
@@ -350,7 +355,11 @@
VStack(spacing: 6) {
ForEach(tagLabels) { tag in
SideTagPill(name: tag.name, colorIndex: tag.colorIndex,
- action: { scrollTo(tag.id) })
+ action: {
+ if highlightedGroup == tag.id { highlightedGroup = nil }
+ else { highlightedGroup = tag.id }
+ scrollTo(tag.id)
+ })
}
}.padding(12)
}.frame(width: 135)
@@ -403,18 +412,21 @@
let columns = distributeToColumns(groups: groups, colCount: colCount, colWidth: actualColW)
- ScrollView {
- HStack(alignment: .top, spacing: gap) {
- ForEach(0..<colCount, id: \.self) { ci in
- LazyVStack(spacing: gap) {
- ForEach(columns[ci]) { group in
- masonryCard(group, width: actualColW)
- .id(group.id)
+ ScrollViewReader { proxy in
+ ScrollView {
+ HStack(alignment: .top, spacing: gap) {
+ ForEach(0..<colCount, id: \.self) { ci in
+ LazyVStack(spacing: gap) {
+ ForEach(columns[ci]) { group in
+ masonryCard(group, width: actualColW)
+ .id(group.id)
+ }
}
}
}
+ .padding(outerPad)
}
- .padding(outerPad)
+ .onAppear { scrollProxy = proxy }
}
}
}
@@ -441,7 +453,9 @@
}
private func masonryCard(_ group: TagGroup, width: CGFloat) -> some View {
- VStack(alignment: .leading, spacing: 6) {
+ let isHL = highlightedGroup == group.name
+ let hlColor = Color(nsColor: TagColor.nsColor(for: tagColors[group.name] ?? 0))
+ return VStack(alignment: .leading, spacing: 6) {
HStack(spacing: 0) {
Rectangle().fill(.secondary.opacity(0.25)).frame(height: 1)
Text(group.name)
@@ -470,7 +484,8 @@
)
.overlay(
RoundedRectangle(cornerRadius: 14)
- .stroke(Color.primary.opacity(0.08), lineWidth: 1)
+ .stroke(isHL ? hlColor : Color.primary.opacity(0.08),
+ lineWidth: isHL ? 3 : 1)
)
}
diff --git a/Apptag/Info.plist b/Apptag/Info.plist
index 3368aad..e788887 100644
--- a/Apptag/Info.plist
+++ b/Apptag/Info.plist
@@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>3.0.8</string>
+ <string>3.0.9</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 901cac6..38e4d98 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
# Apptag Changelog
+## [3.0.9] — 2026-05-06
+- 容器模式:hover 左侧标签 → 右侧自动滚动到对应容器
+- 容器模式:点击左侧标签 → 对应容器加粗彩色边框(再点取消),边框颜色与标签颜色一致
+
## [3.0.8] — 2026-05-06
- 修复 hover 显示名称时容器抖动:文本始终渲染,opacity 控制显隐(空间预占位)
--
Gitblit v1.9.3