Skip to content

知了 Cicada · 任何会议和直播的实时字幕、同声传译、AI 会议纪要,Mac、Windows、Linux、Android 免费开源。Live subtitles, interpreting and meeting notes for any call or stream, on Mac, Windows, Linux and Android.

feat: quieter records window with conclusions first and an empty-state welcome

wqugurue432c3ac5621
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c0318fa..469ebf1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,7 +6,7 @@ the release workflow publishes it as the release notes.
## Unreleased
- Changed: the menu bar panel's display section is easier to read. 显示方式 is three tiles with a small picture each (实时纪要, 字幕条, 不显示), and under them one card holds only the chosen mode's settings: for the notes, whether the window is open with an 打开 / 收起 button (收起 hides it without opening the records window) and 共享屏幕时让对方看到 (formerly 录屏时显示纪要窗口); for the subtitle bar, when it appears and how long it waits; for 不显示, a line saying the transcript is still saved. The ⌃⌥S shortcut sits beside the title, and the 字幕 row above (原文 + 译文) is now called 内容 so 字幕 no longer means two things. The segmented choices left in system blue (the subtitle bar's timing in the panel and Settings, 显示方式 in Settings, 双语 / 原文 / 译文 in the records window) now use the app's own grey track with a white thumb, and the two subtitle bar choices in the panel line up at the same width.
-- Changed: the records window is one white page. The title bar holds the switch, led by the logo: grey with 知了 · 开始听 (⌘R) when idle; while listening an ink pill where the logo breathes, bars follow the sound and the time runs, with 结束; when a meeting is about to end, a countdown ring around the logo with 继续记录. The window buttons sit on the same line. The list is one line per meeting (title and time; 未命名会议 for untitled ones, without the date the notes title starts with); the page has no card or toolbar: a grey line of facts, the title, then 纪要 / 文字记录 and 导出… (which also has 在 Finder 中显示). In a wide window the original and translation sit beside the notes, and a topic's time scrolls them there. While recording, 此刻 pins the sentence being heard under the page. The window opens a little larger.
+- Changed: the records window is one white page. The title bar holds the switch, led by the logo: a white pill with the logo and 知了 · 开始听 (⌘R) when idle; while listening an ink pill where the logo breathes, bars follow the sound and the time runs, with 结束; when a meeting is about to end, a countdown ring around the logo with 继续记录. The window buttons sit on the same line. The list is one line per meeting (title and time; 未命名会议 for untitled ones, without the date the notes title starts with); the page has no card or toolbar: a grey line of facts, the title, then 纪要 / 文字记录 and 导出… (which also has 在 Finder 中显示). In a wide window, 原话 beside 导出… puts the original and translation next to the notes (off by default, remembered), and a topic's time scrolls them there. While recording, 此刻 pins the sentence being heard under the page. The window opens a little larger. Later: the list is titles only on a faint tint (time and length in the tooltip), with only the newest day shown and the rest under 更早的会议; the page is a narrower column that opens with the conclusions in one block, then the summary, then numbered topics that fold open to their points (the first and the one being discussed start open). With no meetings yet, the window shows only the logo, 还没有会议, 开始听 and 先听一段示例.
- New: turning on 同声传译 switches the Mac's system microphone to BlackHole 2ch and switches it back when 同声传译 is turned off or Cicada quits, so a meeting page in Chrome (or any app left on the default microphone) hears the translation with no setup. Cicada itself keeps recording from your real microphone (Settings › 同声传译 › 系统麦克风 lets you pin one). If Cicada didn't get to switch back (it crashed), or AirPods or something else took over the system mic while you were speaking, the menu bar panel says so with a 还原 / 换回 button; the panel's ⋯ menu also has 同声传译设置…, 试一句 and 还原系统麦克风. The switch can be turned off in Settings.
- Changed: the installer window explains the first-open warning. While the developer certificate is pending, macOS says Apple can't verify Cicada; the window, now a little taller, says this is expected and shows the three screens to click through in miniature, each with the button ringed: 完成 (not 移到废纸篓), 隐私与安全性 in System Settings, then 仍要打开 under 安全性.
- New: 共享屏幕时让对方看到 lets screen recordings capture the live notes window, for demos and tutorials. It is off by default; turn it on in Settings › 显示, the menu bar panel, or 显示 › 共享屏幕时对方可见 in the app menu. macOS has one switch for recording and screen sharing, so while it is on people also see the notes when you share your screen: the notes window shows a breathing record mark next to its status the whole time, and clicking it turns the setting off. In a narrow English window, the title and the status line no longer break onto two lines.
diff --git a/Resources/en.lproj/Localizable.strings b/Resources/en.lproj/Localizable.strings
index 101612c..0e08cba 100644
--- a/Resources/en.lproj/Localizable.strings
+++ b/Resources/en.lproj/Localizable.strings
@@ -712,7 +712,11 @@
"还原系统麦克风" = "Restore System Mic";
"搜索" = "Search";
"导出…" = "Export…";
-"开启字幕后,每场会议都会自动保存在这里。" = "Once subtitles are on, every meeting is saved here.";
+"收起更早的会议" = "Hide earlier meetings";
+"更早的会议" = "Earlier meetings";
+"还没有会议" = "No meetings yet";
+"打开会议或视频,开始听后,每一场都会存在这里。" = "Open a meeting or a video and start listening: each one is kept here.";
+"先听一段示例" = "Try a sample first";
"没有找到“%@”" = "Nothing found for “%@”";
"今天" = "Today";
"昨天" = "Yesterday";
@@ -735,8 +739,6 @@
"开始听" = "Start listening";
"正在听,说话的内容会出现在这里" = "Listening; what's said will appear here";
"这场会议没有记录到内容" = "Nothing was recorded in this meeting";
-"还没有会议记录" = "No meetings yet";
-"开启字幕后,每场会议都会自动保存一份双语记录。" = "Once subtitles are on, every meeting is saved as a bilingual record.";
"译文" = "Translation";
"复制为 Markdown" = "Copy as Markdown";
"导出 Markdown…" = "Export Markdown…";
@@ -746,6 +748,8 @@
"完整版纪要" = "Full notes";
"速记版纪要" = "Draft notes";
"原话" = "Original";
+"收起原话" = "Hide original";
+"在纪要旁显示原话" = "Show the original beside the notes";
"此刻" = "Now";
"全部 %lld 句" = "All %lld lines";
"翻译中…" = "Translating…";
diff --git a/Resources/ja.lproj/Localizable.strings b/Resources/ja.lproj/Localizable.strings
index 0e6b5c7..ecfc97b 100644
--- a/Resources/ja.lproj/Localizable.strings
+++ b/Resources/ja.lproj/Localizable.strings
@@ -712,7 +712,11 @@
"还原系统麦克风" = "システムのマイクを戻す";
"搜索" = "検索";
"导出…" = "書き出す…";
-"开启字幕后,每场会议都会自动保存在这里。" = "字幕をオンにすると、すべての会議がここに自動保存されます。";
+"收起更早的会议" = "以前の会議を隠す";
+"更早的会议" = "以前の会議";
+"还没有会议" = "まだ会議はありません";
+"打开会议或视频,开始听后,每一场都会存在这里。" = "会議や動画を開いて聞き取りを始めると、毎回ここに保存されます。";
+"先听一段示例" = "まずサンプルを聞く";
"没有找到“%@”" = "「%@」は見つかりません";
"今天" = "今日";
"昨天" = "昨日";
@@ -735,8 +739,6 @@
"开始听" = "聞き取りを開始";
"正在听,说话的内容会出现在这里" = "聞き取り中。発言内容がここに表示されます";
"这场会议没有记录到内容" = "この会議では何も記録されませんでした";
-"还没有会议记录" = "会議の記録はまだありません";
-"开启字幕后,每场会议都会自动保存一份双语记录。" = "字幕をオンにすると、すべての会議が二言語の記録として自動保存されます。";
"译文" = "翻訳";
"复制为 Markdown" = "Markdown としてコピー";
"导出 Markdown…" = "Markdown を書き出す…";
@@ -746,6 +748,8 @@
"完整版纪要" = "完全版の議事メモ";
"速记版纪要" = "速記版の議事メモ";
"原话" = "原文";
+"收起原话" = "原文を隠す";
+"在纪要旁显示原话" = "議事録の横に原文を表示";
"此刻" = "いま";
"全部 %lld 句" = "全%lld文";
"翻译中…" = "翻訳中…";
diff --git a/Resources/ko.lproj/Localizable.strings b/Resources/ko.lproj/Localizable.strings
index bf19413..cc6db03 100644
--- a/Resources/ko.lproj/Localizable.strings
+++ b/Resources/ko.lproj/Localizable.strings
@@ -712,7 +712,11 @@
"还原系统麦克风" = "시스템 마이크 되돌리기";
"搜索" = "검색";
"导出…" = "내보내기…";
-"开启字幕后,每场会议都会自动保存在这里。" = "자막을 켜면 모든 회의가 자동으로 여기에 저장됩니다.";
+"收起更早的会议" = "이전 회의 숨기기";
+"更早的会议" = "이전 회의";
+"还没有会议" = "아직 회의가 없습니다";
+"打开会议或视频,开始听后,每一场都会存在这里。" = "회의나 동영상을 열고 듣기를 시작하면 모두 여기에 저장됩니다.";
+"先听一段示例" = "먼저 샘플 듣기";
"没有找到“%@”" = "“%@” 검색 결과 없음";
"今天" = "오늘";
"昨天" = "어제";
@@ -735,8 +739,6 @@
"开始听" = "듣기 시작";
"正在听,说话的内容会出现在这里" = "듣는 중입니다. 말한 내용이 여기에 표시됩니다";
"这场会议没有记录到内容" = "이 회의에는 기록된 내용이 없습니다";
-"还没有会议记录" = "회의 기록 없음";
-"开启字幕后,每场会议都会自动保存一份双语记录。" = "자막을 켜면 모든 회의가 이중 언어 기록으로 자동 저장됩니다.";
"译文" = "번역문";
"复制为 Markdown" = "Markdown으로 복사하기";
"导出 Markdown…" = "Markdown 내보내기…";
@@ -746,6 +748,8 @@
"完整版纪要" = "전체본 회의록";
"速记版纪要" = "속기본 회의록";
"原话" = "원문";
+"收起原话" = "원문 숨기기";
+"在纪要旁显示原话" = "회의록 옆에 원문 표시";
"此刻" = "지금";
"全部 %lld 句" = "전체 %lld문장";
"翻译中…" = "번역 중…";
diff --git a/Resources/zh-Hans.lproj/Localizable.strings b/Resources/zh-Hans.lproj/Localizable.strings
index 2c59fca..7e4902a 100644
--- a/Resources/zh-Hans.lproj/Localizable.strings
+++ b/Resources/zh-Hans.lproj/Localizable.strings
@@ -712,7 +712,11 @@
"还原系统麦克风" = "还原系统麦克风";
"搜索" = "搜索";
"导出…" = "导出…";
-"开启字幕后,每场会议都会自动保存在这里。" = "开启字幕后,每场会议都会自动保存在这里。";
+"收起更早的会议" = "收起更早的会议";
+"更早的会议" = "更早的会议";
+"还没有会议" = "还没有会议";
+"打开会议或视频,开始听后,每一场都会存在这里。" = "打开会议或视频,开始听后,每一场都会存在这里。";
+"先听一段示例" = "先听一段示例";
"没有找到“%@”" = "没有找到“%@”";
"今天" = "今天";
"昨天" = "昨天";
@@ -735,8 +739,6 @@
"开始听" = "开始听";
"正在听,说话的内容会出现在这里" = "正在听,说话的内容会出现在这里";
"这场会议没有记录到内容" = "这场会议没有记录到内容";
-"还没有会议记录" = "还没有会议记录";
-"开启字幕后,每场会议都会自动保存一份双语记录。" = "开启字幕后,每场会议都会自动保存一份双语记录。";
"译文" = "译文";
"复制为 Markdown" = "复制为 Markdown";
"导出 Markdown…" = "导出 Markdown…";
@@ -746,6 +748,8 @@
"完整版纪要" = "完整版纪要";
"速记版纪要" = "速记版纪要";
"原话" = "原话";
+"收起原话" = "收起原话";
+"在纪要旁显示原话" = "在纪要旁显示原话";
"此刻" = "此刻";
"全部 %lld 句" = "全部 %lld 句";
"翻译中…" = "翻译中…";
diff --git a/Sources/LiveSubs/ListenPill.swift b/Sources/LiveSubs/ListenPill.swift
index c57ff9f..d788881 100644
--- a/Sources/LiveSubs/ListenPill.swift
+++ b/Sources/LiveSubs/ListenPill.swift
@@ -52,7 +52,7 @@ import SwiftUI
}
}
-/// The listening switch, led by the logo: grey and still while idle, in colour and breathing while
+/// The listening switch, led by the logo: still in a white pill while idle, breathing in an ink pill while
/// listening, ringed by a countdown when the meeting is about to end. The brand is the switch.
struct ListenPill: View {
@ObservedObject var model: AppModel
@@ -83,7 +83,8 @@ struct ListenPill: View {
private var idle: some View {
Button { model.setRunning(true) } label: {
HStack(spacing: 9) {
- BrandMark(size: 22).saturation(0).opacity(0.55)
+ // In colour while idle too: the white pill against the ink one already tells off from on.
+ BrandMark(size: 22)
Text(L("知了")).font(.system(size: 13, weight: .heavy)).foregroundStyle(Palette.ink)
Rectangle().fill(Palette.line).frame(width: 1, height: 14)
Text(model.autoEnded ? L("会议已自动结束") : L("开始听"))
diff --git a/Sources/LiveSubs/NotesViews.swift b/Sources/LiveSubs/NotesViews.swift
index 3345baa..3e55f71 100644
--- a/Sources/LiveSubs/NotesViews.swift
+++ b/Sources/LiveSubs/NotesViews.swift
@@ -24,6 +24,14 @@ struct NotesContentView: View {
var onJump: (Double) -> Void = { _ in }
var body: some View {
+ if document {
+ DocumentNotesView(notes: notes, fresh: fresh, live: live, updating: updating, endedAt: endedAt, onJump: onJump)
+ } else {
+ cards
+ }
+ }
+
+ private var cards: some View {
VStack(alignment: .leading, spacing: document ? 32 : 18) {
if document && !notes.summary.isEmpty {
Text(notes.summary).font(.system(size: 17)).lineSpacing(7).foregroundStyle(Palette.ink.opacity(0.9))
@@ -133,6 +141,156 @@ struct NotesContentView: View {
}
}
+/// The main window's page: the conclusions first in one quiet block, the summary, then the topics
+/// as numbered rows that open to their points. Less on screen at once than the live window's cards.
+private struct DocumentNotesView: View {
+ let notes: MeetingNotes
+ let fresh: Set<String>
+ let live: Bool
+ let updating: Bool
+ let endedAt: Double?
+ let onJump: (Double) -> Void
+
+ var body: some View {
+ VStack(alignment: .leading, spacing: 40) {
+ let items = notes.conclusions + notes.todos
+ if !items.isEmpty {
+ VStack(alignment: .leading, spacing: 12) {
+ Text(notes.todos.isEmpty ? L("结论") : L("结论和待办"))
+ .font(.system(size: 12)).foregroundStyle(Palette.secondary)
+ ForEach(Array(items.enumerated()), id: \.offset) { i, item in
+ conclusion(item, todo: i >= notes.conclusions.count)
+ }
+ }
+ .padding(.horizontal, 24).padding(.vertical, 22)
+ .frame(maxWidth: .infinity, alignment: .leading)
+ .background(RoundedRectangle(cornerRadius: 14).fill(Palette.raised))
+ }
+
+ if !notes.summary.isEmpty {
+ Text(notes.summary).font(.system(size: 15)).lineSpacing(9).foregroundStyle(Palette.secondary)
+ .textSelection(.enabled).fixedSize(horizontal: false, vertical: true)
+ }
+
+ if !notes.topics.isEmpty {
+ VStack(alignment: .leading, spacing: 0) {
+ Text("议题").font(.system(size: 12)).foregroundStyle(Palette.secondary).padding(.bottom, 8)
+ ForEach(Array(notes.topics.enumerated()), id: \.element.id) { i, topic in
+ let current = live && i == notes.topics.count - 1
+ Rectangle().fill(MainWindowView.hairline).frame(height: 1)
+ DocumentTopicRow(index: i, topic: topic, current: current,
+ updating: updating && current, fresh: fresh,
+ startOpen: i == 0 || current, onJump: onJump)
+ .id(NotesContentView.topicID(topic))
+ }
+ Rectangle().fill(MainWindowView.hairline).frame(height: 1)
+ }
+ }
+
+ if !notes.terms.isEmpty {
+ VStack(alignment: .leading, spacing: 10) {
+ Text("人名和术语").font(.system(size: 12)).foregroundStyle(Palette.secondary)
+ FlowLayout(spacing: 6) {
+ ForEach(notes.terms) { t in
+ (Text(t.name).bold() + Text(t.note.isEmpty ? "" : " \(t.note)"))
+ .font(.system(size: 12))
+ .padding(.horizontal, 9).padding(.vertical, 5)
+ .background(RoundedRectangle(cornerRadius: 7).fill(Palette.fill))
+ }
+ }
+ }
+ }
+ }
+ }
+
+ /// A conclusion reads as a sentence; clicking it jumps to the lines behind it.
+ private func conclusion(_ item: NoteItem, todo: Bool) -> some View {
+ HStack(alignment: .firstTextBaseline, spacing: 10) {
+ if todo { Image(systemName: "circle").font(.system(size: 13)).foregroundStyle(Palette.secondary) }
+ Text(item.text + (item.owner.map { "(\($0))" } ?? ""))
+ .font(.system(size: 17, weight: .medium)).lineSpacing(5)
+ .foregroundStyle(item.support == 0 ? Palette.secondary : Palette.ink)
+ .fixedSize(horizontal: false, vertical: true)
+ .frame(maxWidth: .infinity, alignment: .leading)
+ if item.support == 0 { Tag(L("依据较少")) }
+ }
+ .contentShape(Rectangle())
+ .onTapGesture { if let t = item.t { onJump(t) } }
+ .help(item.t.map { L("\(NotesEngine.clock($0)) · \(item.support) 句") } ?? "")
+ }
+}
+
+private struct DocumentTopicRow: View {
+ let index: Int
+ let topic: NoteTopic
+ let current: Bool
+ let updating: Bool
+ let fresh: Set<String>
+ let onJump: (Double) -> Void
+ @State private var open: Bool
+
+ init(index: Int, topic: NoteTopic, current: Bool, updating: Bool, fresh: Set<String>,
+ startOpen: Bool, onJump: @escaping (Double) -> Void) {
+ self.index = index; self.topic = topic; self.current = current; self.updating = updating
+ self.fresh = fresh; self.onJump = onJump
+ _open = State(initialValue: startOpen)
+ }
+
+ var body: some View {
+ VStack(alignment: .leading, spacing: 0) {
+ HStack(alignment: .firstTextBaseline, spacing: 8) {
+ Button { withAnimation(.easeOut(duration: 0.2)) { open.toggle() } } label: {
+ HStack(alignment: .firstTextBaseline, spacing: 8) {
+ Text(String(format: "%02d", index + 1)).font(.system(size: 12, weight: .bold).monospacedDigit())
+ .foregroundStyle(Palette.secondary).frame(width: 28, alignment: .leading)
+ Text(topic.title).font(.system(size: 16, weight: .semibold)).foregroundStyle(Palette.ink)
+ .multilineTextAlignment(.leading)
+ if current { Tag(L("正在讲"), live: true) }
+ if fresh.contains(topic.title) && !current { Tag(L("新"), live: true) }
+ Spacer(minLength: 8)
+ }
+ .contentShape(Rectangle())
+ }
+ .buttonStyle(.plain)
+ TimeLink(text: NotesEngine.clock(topic.start), t: topic.start, onJump: onJump)
+ Image(systemName: "chevron.right").font(.system(size: 10, weight: .semibold))
+ .foregroundStyle(Palette.secondary).rotationEffect(.degrees(open ? 90 : 0))
+ }
+ .padding(.vertical, 15)
+
+ if open {
+ VStack(alignment: .leading, spacing: 7) {
+ if !topic.summary.isEmpty {
+ Text(topic.summary).font(.system(size: 15)).lineSpacing(6).foregroundStyle(Palette.secondary)
+ .fixedSize(horizontal: false, vertical: true)
+ }
+ ForEach(Array(topic.points.enumerated()), id: \.offset) { i, p in
+ HStack(alignment: .firstTextBaseline, spacing: 8) {
+ Text("·").foregroundStyle(Palette.secondary)
+ Text(p).font(.system(size: 15)).lineSpacing(5).textSelection(.enabled)
+ .fixedSize(horizontal: false, vertical: true)
+ if fresh.contains(p) { Tag(L("新"), live: true) }
+ }
+ .help(topic.pointTime(i).map { NotesEngine.clock($0) } ?? "")
+ .modifier(FadeIn(active: fresh.contains(p)))
+ }
+ if let fish = topic.fishbone { FishboneView(fishbone: fish, onJump: onJump).padding(.top, 4) }
+ if updating {
+ VStack(alignment: .leading, spacing: 7) {
+ SkeletonBar(fraction: 0.82, height: 10, warm: true)
+ SkeletonBar(fraction: 0.56, height: 10, warm: true)
+ }
+ .padding(.top, 2)
+ }
+ }
+ .padding(.leading, 36).padding(.bottom, 20)
+ .transition(.opacity)
+ }
+ }
+ .onChange(of: current) { _, now in if now { open = true } }
+ }
+}
+
private struct TopicView: View {
let topic: NoteTopic
/// The next topic's start, or the meeting's end; nil while it is still being discussed.
diff --git a/Sources/LiveSubs/Views.swift b/Sources/LiveSubs/Views.swift
index 4f38757..aa9c7bb 100644
--- a/Sources/LiveSubs/Views.swift
+++ b/Sources/LiveSubs/Views.swift
@@ -456,9 +456,13 @@ struct MainWindowView: View {
@State private var quoteJump: Double?
@State private var detailWidth: CGFloat = 0
@FocusState private var searchFocused: Bool
+ /// The bilingual column beside the notes is opt-in: three full columns of text read as crowded.
+ @AppStorage("mainShowQuotes") private var showQuotes = false
+ @State private var showOlder = false
/// Wide enough for the notes and the bilingual transcript side by side.
- private var sideBySide: Bool { detailWidth >= 940 }
+ private var sideBySide: Bool { showQuotes && wideEnough }
+ private var wideEnough: Bool { detailWidth >= 940 }
private var filtered: [Session] {
guard !query.isEmpty else { return store.sessions }
@@ -471,12 +475,15 @@ struct MainWindowView: View {
private var current: Session? { store.session(selection ?? store.sessions.first?.id) }
var body: some View {
- // One white sheet: no ground, no card, one hairline between the list and the page.
- // The listening pill lives in the window's toolbar (`MainToolbar`).
+ // One white sheet; the list sits on a faint tint instead of behind a rule. The listening
+ // pill lives in the window's toolbar (`MainToolbar`). With no meetings yet, only the
+ // welcome shows: an empty list is noise.
HStack(spacing: 0) {
- sidebar
- .frame(width: 240)
- Rectangle().fill(Self.hairline).frame(width: 1)
+ if !store.sessions.isEmpty {
+ sidebar
+ .frame(width: 232)
+ .background(UnevenRoundedRectangle(topTrailingRadius: 14).fill(Self.listTint).ignoresSafeArea(edges: .bottom))
+ }
detail
.frame(maxWidth: .infinity, maxHeight: .infinity)
.onGeometryChange(for: CGFloat.self) { $0.size.width } action: { detailWidth = $0 }
@@ -492,6 +499,7 @@ struct MainWindowView: View {
}
static let hairline = Color(red: 0.941, green: 0.945, blue: 0.957)
+ static let listTint = Color(red: 0.98, green: 0.98, blue: 0.984)
// MARK: Sidebar
@@ -508,20 +516,35 @@ struct MainWindowView: View {
}
}
.font(.system(size: 13))
- .padding(.horizontal, 10).frame(height: 30)
+ .padding(.horizontal, 12).frame(height: 30)
+ .padding(.bottom, 6)
ScrollView {
- LazyVStack(alignment: .leading, spacing: 1) {
- ForEach(groups, id: \.title) { g in
+ LazyVStack(alignment: .leading, spacing: 2) {
+ // The newest day shows; older ones fold under one row until asked for (or searched).
+ let all = groups
+ let folded = query.isEmpty && !showOlder && all.count > 1
+ ForEach(Array((folded ? Array(all.prefix(1)) : all).enumerated()), id: \.element.title) { i, g in
Text(g.title).font(.system(size: 11, weight: .semibold)).foregroundStyle(Palette.secondary)
- .padding(.horizontal, 10).padding(.top, g.title == groups.first?.title ? 0 : 12).padding(.bottom, 4)
+ .padding(.horizontal, 12).padding(.top, i == 0 ? 0 : 18).padding(.bottom, 6)
ForEach(g.sessions) { sessionRow($0) }
}
- if store.sessions.isEmpty {
- Text("开启字幕后,每场会议都会自动保存在这里。")
- .font(.system(size: 12)).foregroundStyle(Palette.secondary)
- .padding(.horizontal, 10)
- } else if filtered.isEmpty {
+ if query.isEmpty && all.count > 1 {
+ Button { withAnimation(.easeOut(duration: 0.2)) { showOlder.toggle() } } label: {
+ HStack {
+ Text(showOlder ? L("收起更早的会议") : L("更早的会议"))
+ Spacer()
+ Image(systemName: "chevron.right").font(.system(size: 10, weight: .semibold))
+ .rotationEffect(.degrees(showOlder ? -90 : 0))
+ }
+ .font(.system(size: 13)).foregroundStyle(Palette.secondary)
+ .padding(.horizontal, 12).padding(.vertical, 9)
+ .contentShape(Rectangle())
+ }
+ .buttonStyle(.plain)
+ .padding(.top, 12)
+ }
+ if filtered.isEmpty {
Text("没有找到“\(query)”").font(.system(size: 12)).foregroundStyle(Palette.secondary)
.padding(.horizontal, 10)
}
@@ -529,7 +552,11 @@ struct MainWindowView: View {
}
.scrollIndicators(.never)
}
- .padding(.leading, 12).padding(.trailing, 10).padding(.top, 6).padding(.bottom, 14)
+ .padding(.horizontal, 10).padding(.top, 10).padding(.bottom, 14)
+ .onChange(of: selection) { _, id in
+ // A meeting picked from elsewhere (search, the notes window) shouldn't hide in a fold.
+ if let id, let first = groups.first, !first.sessions.contains(where: { $0.id == id }) { showOlder = true }
+ }
}
/// 今天 / 昨天 / 本周 / then one group per month, newest first.
@@ -556,24 +583,21 @@ struct MainWindowView: View {
selection = s.id
titleDraft = ""
} label: {
- // One line: the title and when. Length and languages are on the meeting's page.
- HStack(alignment: .firstTextBaseline, spacing: 8) {
- if live { BreathingDot(size: 6).alignmentGuide(.firstTextBaseline) { $0[.bottom] - 1 } }
- if Self.untitled(s) {
- // The default title only repeats the time beside it.
- Text("未命名会议").font(.system(size: 13)).foregroundStyle(Palette.secondary)
- } else {
- Text(Self.listTitle(s)).font(.system(size: 13, weight: selected ? .semibold : .regular))
- .foregroundStyle(Palette.ink).lineLimit(1)
- }
- Spacer(minLength: 4)
- Text(live ? L("正在记录") : when(s)).font(.system(size: 12).monospacedDigit())
- .foregroundStyle(live ? Palette.accentInk : Palette.secondary).lineLimit(1).fixedSize()
+ // Titles only: the time and length are on the page (and in the tooltip). Unpicked rows
+ // stay grey so the one being read stands out.
+ HStack(spacing: 8) {
+ if live { BreathingDot(size: 6) }
+ Text(Self.untitled(s) ? L("未命名会议") : Self.listTitle(s))
+ .font(.system(size: 13, weight: selected ? .semibold : .regular))
+ .foregroundStyle(selected || live ? Palette.ink : Palette.secondary).lineLimit(1)
+ Spacer(minLength: 0)
}
- .padding(.horizontal, 10).padding(.vertical, 8)
- .background(RoundedRectangle(cornerRadius: 8).fill(selected ? Palette.fill : Color.clear))
+ .padding(.horizontal, 12).padding(.vertical, 9)
+ .background(RoundedRectangle(cornerRadius: 8).fill(selected ? Color.white : Color.clear)
+ .shadow(color: selected ? Palette.ink.opacity(0.06) : .clear, radius: 1.5, y: 1))
.contentShape(Rectangle())
}
+ .help(live ? L("正在记录") : [when(s), Self.length(s)].joined(separator: " · "))
.buttonStyle(.plain)
.contextMenu {
Button("在 Finder 中显示") { NSWorkspace.shared.activateFileViewerSelecting([store.folder(s.id)]) }
@@ -666,14 +690,34 @@ struct MainWindowView: View {
}
.onChange(of: s.id) { _, _ in titleDraft = "" }
} else {
- VStack(spacing: 10) {
- LogoTile(size: 44)
- Text("还没有会议记录").font(.system(size: 15, weight: .semibold))
- Text("开启字幕后,每场会议都会自动保存一份双语记录。")
- .font(.system(size: 13)).foregroundStyle(Palette.secondary)
+ welcome
+ }
+ }
+
+ /// No meetings yet: the logo, one line and the one thing to do.
+ private var welcome: some View {
+ VStack(spacing: 0) {
+ BrandMark(size: 72).shadow(color: Palette.accent.opacity(0.22), radius: 14, y: 8)
+ Text("还没有会议").font(.system(size: 26, weight: .bold)).padding(.top, 28)
+ Text("打开会议或视频,开始听后,每一场都会存在这里。")
+ .font(.system(size: 15)).foregroundStyle(Palette.secondary).multilineTextAlignment(.center)
+ .padding(.top, 10)
+ Button { model.setRunning(true) } label: {
+ HStack(spacing: 10) {
+ Circle().fill(Palette.accent).frame(width: 9, height: 9)
+ Text("开始听").font(.system(size: 15, weight: .semibold))
+ }
+ .foregroundStyle(.white).padding(.horizontal, 22).frame(height: 44)
+ .background(Capsule().fill(Palette.ink))
+ .contentShape(Capsule())
}
- .frame(maxWidth: .infinity, maxHeight: .infinity)
+ .buttonStyle(.plain).padding(.top, 32)
+ Button("先听一段示例") { model.ensureListening(); model.sample.play() }
+ .buttonStyle(.plain).font(.system(size: 13)).foregroundStyle(Palette.secondary).padding(.top, 16)
}
+ .frame(maxWidth: 420)
+ .padding(.bottom, 60)
+ .frame(maxWidth: .infinity, maxHeight: .infinity)
}
/// 此刻: the sentence being heard, pinned under the page while the meeting is live.
@@ -711,6 +755,17 @@ struct MainWindowView: View {
Spacer()
if tab == "transcript" {
Segments(options: [("both", L("双语")), ("src", L("原文")), ("dst", L("译文"))], value: view) { view = $0 }
+ } else if wideEnough, !s.lines.isEmpty {
+ Button { withAnimation(.easeOut(duration: 0.2)) { showQuotes.toggle() } } label: {
+ HStack(spacing: 5) {
+ Image(systemName: "sidebar.right").font(.system(size: 12))
+ Text("原话").font(.system(size: 13))
+ }
+ .foregroundStyle(showQuotes ? Palette.ink : Palette.secondary)
+ .contentShape(Rectangle())
+ }
+ .buttonStyle(.plain)
+ .help(showQuotes ? L("收起原话") : L("在纪要旁显示原话"))
}
Menu {
Button("复制为 Markdown") { model.export(s, kind: "copy") }
@@ -747,26 +802,28 @@ struct MainWindowView: View {
private func header(_ s: Session) -> some View {
let live = s.id == store.liveID
let notes = live ? model.notes.notes : s.notes
- let facts = [dateLine(s, live: live), Self.length(s), Self.pair(s, short: false),
- notes.flatMap { $0.isEmpty ? nil : ($0.final ? L("完整版纪要") : L("速记版纪要")) }]
+ // When and how long up front; the languages and notes version wait in the tooltip.
+ let more = [Self.pair(s, short: false),
+ notes.flatMap { $0.isEmpty ? nil : ($0.final ? L("完整版纪要") : L("速记版纪要")) }]
return VStack(alignment: .leading, spacing: 0) {
HStack(spacing: 8) {
if live { Tag(L("正在记录"), live: true) }
- Text(facts.compactMap { $0 }.joined(separator: " · "))
+ Text([dateText(s.startedAt, "MMMdHHmm"), Self.length(s)].joined(separator: " · "))
.font(.system(size: 12).monospacedDigit()).foregroundStyle(Palette.secondary).lineLimit(1)
+ .help(([dateLine(s, live: live)] + more.compactMap { $0 }).joined(separator: " · "))
}
TextField("标题", text: Binding(
get: { titleDraft.isEmpty ? s.displayTitle : titleDraft },
set: { titleDraft = $0 }
), axis: .vertical)
.textFieldStyle(.plain)
- .font(.system(size: 28, weight: .bold))
- .padding(.top, 8)
+ .font(.system(size: 30, weight: .bold))
+ .padding(.top, 10)
.onSubmit {
if !titleDraft.isEmpty { store.rename(s.id, to: titleDraft) }
titleDraft = ""
}
- tabsRow(s).padding(.top, 20)
+ tabsRow(s).padding(.top, 24)
}
.frame(maxWidth: .infinity, alignment: .leading)
}
@@ -899,7 +956,7 @@ struct SessionNotesView: View {
var body: some View {
ScrollView {
- VStack(alignment: .leading, spacing: 30) {
+ VStack(alignment: .leading, spacing: 40) {
header
if let notes, !notes.isEmpty {
NotesContentView(notes: notes, fresh: live ? engine.fresh : [], live: live, document: true,
@@ -930,8 +987,9 @@ struct SessionNotesView: View {
.background(RoundedRectangle(cornerRadius: 18).fill(Palette.raised))
}
}
- .frame(maxWidth: 680, alignment: .leading)
- .padding(.horizontal, 44).padding(.vertical, 36)
+ // A narrow measure and a tall top margin: the page reads as one quiet column.
+ .frame(maxWidth: 600, alignment: .leading)
+ .padding(.horizontal, 44).padding(.top, 52).padding(.bottom, 64)
.frame(maxWidth: .infinity)
}
}
diff --git a/site/changelog.json b/site/changelog.json
index fe3b836..a3eb7bb 100644
--- a/site/changelog.json
+++ b/site/changelog.json
@@ -14,7 +14,7 @@
{
"kind": "changed",
"title": "会议记录窗口变成一张白纸,开关就是知了。",
- "text": "标题栏中间是知了开关:没在听时是灰色的知了和“开始听”(⌘R);听的时候变成深色胶囊,知了在呼吸,声音条跟着声音跳,旁边是计时和结束;会议快自动结束时,知了外圈变成倒数环,可以点继续记录。左边列表每场会议一行,只有标题和时间;会议页去掉了卡片和工具栏,标题下面就是纪要、文字记录和导出。窗口够宽时,纪要右边并排显示原话和译文,点议题的时间就滚到那里;正在记录时,页面底部的“此刻”显示正在说的这句话。"
+ "text": "标题栏中间是知了开关:没在听时是白色胶囊里的知了和“开始听”(⌘R);听的时候变成深色胶囊,知了在呼吸,声音条跟着声音跳,旁边是计时和结束;会议快自动结束时,知了外圈变成倒数环,可以点继续记录。左边列表每场会议一行,只有标题和时间;会议页去掉了卡片和工具栏,标题下面就是纪要、文字记录和导出。窗口够宽时,点导出旁边的“原话”可以在纪要右边并排看原话和译文(默认收起,会记住你的选择),点议题的时间就滚到那里;正在记录时,页面底部的“此刻”显示正在说的这句话。列表只留标题,较早的会议收在“更早的会议”里;会议页先看结论,再看总结,议题按编号排开,点开才看要点。还没有任何会议时,窗口里只有知了、一句话、“开始听”和“先听一段示例”。"
},
{
"kind": "new",