Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added docs/images/pr-716/cumulative-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/pr-716/heatmap-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/pr-716/heatmap-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/pr-716/hover-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/pr-716/weekly-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions openless-all/app/src/components/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export const ICONS: Record<string, string> = {
trash: 'M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M10 11v6M14 11v6', // Trash
refresh: 'M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8M3 3v5h5', // Refresh ccw
sparkle: 'M12 3L14.5 9.5 21 12 14.5 14.5 12 21 9.5 14.5 3 12 9.5 9.5 12 3Z', // Sparkle
sun: 'M12 4V2M12 22v-2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M4 12H2M22 12h-2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41M12 17a5 5 0 1 0 0-10 5 5 0 0 0 0 10z', // Sun
moon: 'M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z', // Moon
bolt: 'M13 2L3 14h9l-1 8 10-12h-9l1-8z', // Zap
clock: 'M12 8v4l3 3M12 22a10 10 0 1 1 0-20 10 10 0 0 1 0 20z', // Clock standard
hash: 'M4 9h16M4 15h16M10 3L8 21M16 3l-2 18', // Hash
Expand Down
19 changes: 18 additions & 1 deletion openless-all/app/src/i18n/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,26 @@ export const en: typeof zhCN = {
metricNoData: 'No data',
historyLoadError: 'History load failed',
metricTotal: 'Total records',
metricTotalTrend: 'Local archive (max 200)',
metricTotalTrend: 'Local archive',
weekTitle: 'Last 7 days',
weekUnit: 'count / day',
activityTitle: 'Annual activity',
activityModeDaily: 'Daily',
activityMode: {
daily: 'Daily',
weekly: 'Weekly',
cumulative: 'Total',
},
activityUnit: 'Past year · {{days}} active days',
activityEmpty: 'No history in the past year.',
activityTooltip: '{{date}} · {{count}} records · {{chars}} chars',
activitySummaryDaily: '{{date}} used {{count}} records / {{chars}} chars',
activitySummaryWeekly: 'Week of {{start}} used {{count}} records / {{chars}} chars',
activitySummaryCumulative: 'Through week of {{start}} used {{count}} records / {{chars}} chars',
activityLegendLow: 'Less',
activityLegendHigh: 'More',
themeToggle: 'Switch to {{mode}}',
monthNames: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
recentTitle: 'Recent transcripts',
recentAll: 'View all →',
recentEmpty: 'No records yet. Press {{trigger}} to start your first recording.',
Expand Down
19 changes: 18 additions & 1 deletion openless-all/app/src/i18n/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,26 @@ export const ja: typeof zhCN = {
metricNoData: 'データなし',
historyLoadError: '履歴の読み込みに失敗',
metricTotal: '累計記録',
metricTotalTrend: 'ローカル保存(上限 200)',
metricTotalTrend: 'ローカル保存',
weekTitle: '直近 7 日',
weekUnit: '件 / 日',
activityTitle: '年間アクティビティ',
activityModeDaily: '毎日',
activityMode: {
daily: '毎日',
weekly: '毎週',
cumulative: '累計',
},
activityUnit: '過去 1 年 · {{days}} 日に記録',
activityEmpty: '過去 1 年の履歴はまだありません。',
activityTooltip: '{{date}} · {{count}} 件 · {{chars}} 文字',
activitySummaryDaily: '{{date}} に {{count}} 件 / {{chars}} 文字',
activitySummaryWeekly: '{{start}} の週に {{count}} 件 / {{chars}} 文字',
activitySummaryCumulative: '{{start}} の週まで累計 {{count}} 件 / {{chars}} 文字',
activityLegendLow: '少',
activityLegendHigh: '多',
themeToggle: '{{mode}}に切り替え',
monthNames: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
recentTitle: '最近の認識',
recentAll: 'すべて表示 →',
recentEmpty: '記録がありません。{{trigger}} を押して最初の録音を始めましょう。',
Expand Down
19 changes: 18 additions & 1 deletion openless-all/app/src/i18n/ko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,26 @@ export const ko: typeof zhCN = {
metricNoData: '데이터 없음',
historyLoadError: '기록 로드 실패',
metricTotal: '누적 기록',
metricTotalTrend: '로컬 보관(상한 200)',
metricTotalTrend: '로컬 보관',
weekTitle: '최근 7일',
weekUnit: '건/일',
activityTitle: '연간 활동',
activityModeDaily: '매일',
activityMode: {
daily: '매일',
weekly: '매주',
cumulative: '누적',
},
activityUnit: '지난 1년 · {{days}}일 기록 있음',
activityEmpty: '지난 1년 동안 기록이 없습니다.',
activityTooltip: '{{date}} · {{count}}건 · {{chars}}자',
activitySummaryDaily: '{{date}} 사용 {{count}}건 / {{chars}}자',
activitySummaryWeekly: '{{start}} 주간 사용 {{count}}건 / {{chars}}자',
activitySummaryCumulative: '{{start}} 주까지 누적 사용 {{count}}건 / {{chars}}자',
activityLegendLow: '적음',
activityLegendHigh: '많음',
themeToggle: '{{mode}}로 전환',
monthNames: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'],
recentTitle: '최근 인식',
recentAll: '전체 보기 →',
recentEmpty: '아직 기록이 없습니다. {{trigger}} 를 눌러 첫 녹음을 시작하세요.',
Expand Down
19 changes: 18 additions & 1 deletion openless-all/app/src/i18n/zh-CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,26 @@ export const zhCN = {
metricNoData: '暂无数据',
historyLoadError: '历史读取失败',
metricTotal: '累计记录',
metricTotalTrend: '本机存档 (上限 200)',
metricTotalTrend: '本机存档',
weekTitle: '近 7 天',
weekUnit: '条数 / 天',
activityTitle: '年度活动',
activityModeDaily: '每日',
activityMode: {
daily: '每日',
weekly: '每周',
cumulative: '累计',
},
activityUnit: '过去一年 · {{days}} 天有记录',
activityEmpty: '过去一年还没有历史记录。',
activityTooltip: '{{date}} · {{count}} 条 · {{chars}} 字',
activitySummaryDaily: '{{date}} 使用了 {{count}} 条 / {{chars}} 字',
activitySummaryWeekly: '{{start}} 当周使用了 {{count}} 条 / {{chars}} 字',
activitySummaryCumulative: '截至 {{start}} 当周累计使用了 {{count}} 条 / {{chars}} 字',
activityLegendLow: '少',
activityLegendHigh: '多',
themeToggle: '切换到 {{mode}}',
monthNames: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
recentTitle: '最近识别',
recentAll: '全部记录 →',
recentEmpty: '还没有记录。按 {{trigger}} 开始第一次录音。',
Expand Down
19 changes: 18 additions & 1 deletion openless-all/app/src/i18n/zh-TW.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,26 @@ export const zhTW: typeof zhCN = {
metricNoData: '暫無數據',
historyLoadError: '歷史讀取失敗',
metricTotal: '累計記錄',
metricTotalTrend: '本機存檔 (上限 200)',
metricTotalTrend: '本機存檔',
weekTitle: '近 7 天',
weekUnit: '條數 / 天',
activityTitle: '年度活動',
activityModeDaily: '每日',
activityMode: {
daily: '每日',
weekly: '每週',
cumulative: '累計',
},
activityUnit: '過去一年 · {{days}} 天有記錄',
activityEmpty: '過去一年還沒有歷史記錄。',
activityTooltip: '{{date}} · {{count}} 條 · {{chars}} 字',
activitySummaryDaily: '{{date}} 使用了 {{count}} 條 / {{chars}} 字',
activitySummaryWeekly: '{{start}} 當週使用了 {{count}} 條 / {{chars}} 字',
activitySummaryCumulative: '截至 {{start}} 當週累計使用了 {{count}} 條 / {{chars}} 字',
activityLegendLow: '少',
activityLegendHigh: '多',
themeToggle: '切換到 {{mode}}',
monthNames: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
recentTitle: '最近識別',
recentAll: '全部記錄 →',
recentEmpty: '還沒有記錄。按 {{trigger}} 開始第一次錄音。',
Expand Down
51 changes: 34 additions & 17 deletions openless-all/app/src/lib/ipc/mock-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -431,23 +431,40 @@ export const mockMicrophoneDevices: MicrophoneDevice[] = [
{ name: "USB Microphone", isDefault: false },
]

export const mockHistory: DictationSession[] = OL_DATA.history.map((h, i) => ({
id: `mock-${i}`,
createdAt: new Date().toISOString(),
rawTranscript: h.preview,
finalText: h.preview,
mode: "structured",
stylePackId: "builtin.structured",
translationActive: false,
polishSource: null,
appBundleId: null,
appName: "VS Code",
insertStatus: "inserted",
errorCode: null,
durationMs: 600,
dictionaryEntryCount: 28,
hasAudioRecording: null,
}))
const mockHistoryOffsets = [0, 0, 0, 1, 1, 2, 3, 3, 4, 5, 6, 15, 32, 54, 91, 130, 178, 230, 292, 340]
const mockHistoryModes: PolishMode[] = ["structured", "light", "raw", "formal"]
const mockHistoryApps = ["VS Code", "Obsidian", "Chrome", "微信", "Word"]

function mockCreatedAt(dayOffset: number, index: number): string {
const source = OL_DATA.history[index % OL_DATA.history.length]
const [hours = 12, minutes = 0] = source.time.split(":").map(Number)
const date = new Date()
date.setDate(date.getDate() - dayOffset)
date.setHours(hours, minutes, 0, 0)
return date.toISOString()
}

export const mockHistory: DictationSession[] = mockHistoryOffsets.map((dayOffset, i) => {
const h = OL_DATA.history[i % OL_DATA.history.length]
const mode = mockHistoryModes[i % mockHistoryModes.length]
return {
id: `mock-${dayOffset}-${i}`,
createdAt: mockCreatedAt(dayOffset, i),
rawTranscript: h.preview,
finalText: h.preview,
mode,
stylePackId: `builtin.${mode}`,
translationActive: false,
polishSource: null,
appBundleId: null,
appName: mockHistoryApps[i % mockHistoryApps.length],
insertStatus: "inserted",
errorCode: null,
durationMs: 9000 + (i % 6) * 1800,
dictionaryEntryCount: 12 + (i % 5) * 4,
hasAudioRecording: null,
}
})

export const mockVocab: DictionaryEntry[] = OL_DATA.vocab.map((v, i) => ({
id: `vocab-${i}`,
Expand Down
Loading