floq 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja.md +133 -0
- package/README.md +133 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.js +124 -0
- package/dist/commands/add.d.ts +6 -0
- package/dist/commands/add.js +36 -0
- package/dist/commands/config.d.ts +6 -0
- package/dist/commands/config.js +73 -0
- package/dist/commands/done.d.ts +1 -0
- package/dist/commands/done.js +37 -0
- package/dist/commands/list.d.ts +2 -0
- package/dist/commands/list.js +96 -0
- package/dist/commands/move.d.ts +1 -0
- package/dist/commands/move.js +50 -0
- package/dist/commands/project.d.ts +8 -0
- package/dist/commands/project.js +160 -0
- package/dist/config.d.ts +14 -0
- package/dist/config.js +64 -0
- package/dist/db/index.d.ts +6 -0
- package/dist/db/index.js +72 -0
- package/dist/db/schema.d.ts +192 -0
- package/dist/db/schema.js +13 -0
- package/dist/i18n/en.d.ts +160 -0
- package/dist/i18n/en.js +108 -0
- package/dist/i18n/index.d.ts +7 -0
- package/dist/i18n/index.js +15 -0
- package/dist/i18n/ja.d.ts +2 -0
- package/dist/i18n/ja.js +108 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -0
- package/dist/paths.d.ts +6 -0
- package/dist/paths.js +22 -0
- package/dist/ui/App.d.ts +2 -0
- package/dist/ui/App.js +472 -0
- package/dist/ui/SplashScreen.d.ts +7 -0
- package/dist/ui/SplashScreen.js +61 -0
- package/dist/ui/TaskList.d.ts +10 -0
- package/dist/ui/TaskList.js +9 -0
- package/dist/ui/ThemeSelector.d.ts +7 -0
- package/dist/ui/ThemeSelector.js +17 -0
- package/dist/ui/components/FullScreenBox.d.ts +8 -0
- package/dist/ui/components/FullScreenBox.js +10 -0
- package/dist/ui/components/FunctionKeyBar.d.ts +10 -0
- package/dist/ui/components/FunctionKeyBar.js +19 -0
- package/dist/ui/components/HelpModal.d.ts +6 -0
- package/dist/ui/components/HelpModal.js +11 -0
- package/dist/ui/components/StatusBadge.d.ts +7 -0
- package/dist/ui/components/StatusBadge.js +16 -0
- package/dist/ui/components/TaskItem.d.ts +9 -0
- package/dist/ui/components/TaskItem.js +10 -0
- package/dist/ui/theme/index.d.ts +10 -0
- package/dist/ui/theme/index.js +11 -0
- package/dist/ui/theme/themes.d.ts +9 -0
- package/dist/ui/theme/themes.js +163 -0
- package/dist/ui/theme/types.d.ts +43 -0
- package/dist/ui/theme/types.js +1 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +7 -0
- package/package.json +57 -0
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
export declare const en: {
|
|
2
|
+
status: {
|
|
3
|
+
inbox: string;
|
|
4
|
+
next: string;
|
|
5
|
+
waiting: string;
|
|
6
|
+
someday: string;
|
|
7
|
+
done: string;
|
|
8
|
+
};
|
|
9
|
+
projectStatus: {
|
|
10
|
+
active: string;
|
|
11
|
+
someday: string;
|
|
12
|
+
completed: string;
|
|
13
|
+
};
|
|
14
|
+
commands: {
|
|
15
|
+
add: {
|
|
16
|
+
success: string;
|
|
17
|
+
withProject: string;
|
|
18
|
+
projectNotFound: string;
|
|
19
|
+
};
|
|
20
|
+
list: {
|
|
21
|
+
invalidStatus: string;
|
|
22
|
+
validStatuses: string;
|
|
23
|
+
noTasks: string;
|
|
24
|
+
noProjects: string;
|
|
25
|
+
tasks: string;
|
|
26
|
+
activeDone: string;
|
|
27
|
+
};
|
|
28
|
+
move: {
|
|
29
|
+
success: string;
|
|
30
|
+
waitingFor: string;
|
|
31
|
+
invalidStatus: string;
|
|
32
|
+
validStatuses: string;
|
|
33
|
+
specifyWaiting: string;
|
|
34
|
+
notFound: string;
|
|
35
|
+
multipleMatch: string;
|
|
36
|
+
};
|
|
37
|
+
done: {
|
|
38
|
+
success: string;
|
|
39
|
+
alreadyDone: string;
|
|
40
|
+
notFound: string;
|
|
41
|
+
multipleMatch: string;
|
|
42
|
+
};
|
|
43
|
+
project: {
|
|
44
|
+
created: string;
|
|
45
|
+
alreadyExists: string;
|
|
46
|
+
notFound: string;
|
|
47
|
+
multipleMatch: string;
|
|
48
|
+
completed: string;
|
|
49
|
+
noProjects: string;
|
|
50
|
+
description: string;
|
|
51
|
+
statusLabel: string;
|
|
52
|
+
tasksCount: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
tui: {
|
|
56
|
+
title: string;
|
|
57
|
+
helpHint: string;
|
|
58
|
+
newTask: string;
|
|
59
|
+
placeholder: string;
|
|
60
|
+
inputHelp: string;
|
|
61
|
+
added: string;
|
|
62
|
+
completed: string;
|
|
63
|
+
movedTo: string;
|
|
64
|
+
refreshed: string;
|
|
65
|
+
footer: string;
|
|
66
|
+
noTasks: string;
|
|
67
|
+
tabInbox: string;
|
|
68
|
+
tabNext: string;
|
|
69
|
+
tabWaiting: string;
|
|
70
|
+
tabSomeday: string;
|
|
71
|
+
tabProjects: string;
|
|
72
|
+
madeProject: string;
|
|
73
|
+
linkedToProject: string;
|
|
74
|
+
selectProject: string;
|
|
75
|
+
selectProjectHelp: string;
|
|
76
|
+
back: string;
|
|
77
|
+
help: {
|
|
78
|
+
title: string;
|
|
79
|
+
navigation: string;
|
|
80
|
+
tabSwitch: string;
|
|
81
|
+
prevNextTab: string;
|
|
82
|
+
taskSelect: string;
|
|
83
|
+
actions: string;
|
|
84
|
+
addTask: string;
|
|
85
|
+
completeTask: string;
|
|
86
|
+
moveToNext: string;
|
|
87
|
+
moveToSomeday: string;
|
|
88
|
+
moveToInbox: string;
|
|
89
|
+
refresh: string;
|
|
90
|
+
projects: string;
|
|
91
|
+
makeProject: string;
|
|
92
|
+
linkToProject: string;
|
|
93
|
+
openProject: string;
|
|
94
|
+
backFromProject: string;
|
|
95
|
+
other: string;
|
|
96
|
+
showHelp: string;
|
|
97
|
+
quit: string;
|
|
98
|
+
closeHint: string;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
export type HelpTranslations = {
|
|
103
|
+
title: string;
|
|
104
|
+
navigation: string;
|
|
105
|
+
tabSwitch: string;
|
|
106
|
+
prevNextTab: string;
|
|
107
|
+
taskSelect: string;
|
|
108
|
+
actions: string;
|
|
109
|
+
addTask: string;
|
|
110
|
+
completeTask: string;
|
|
111
|
+
moveToNext: string;
|
|
112
|
+
moveToSomeday: string;
|
|
113
|
+
moveToInbox: string;
|
|
114
|
+
refresh: string;
|
|
115
|
+
projects: string;
|
|
116
|
+
makeProject: string;
|
|
117
|
+
linkToProject: string;
|
|
118
|
+
openProject: string;
|
|
119
|
+
backFromProject: string;
|
|
120
|
+
other: string;
|
|
121
|
+
showHelp: string;
|
|
122
|
+
quit: string;
|
|
123
|
+
closeHint: string;
|
|
124
|
+
};
|
|
125
|
+
export type TuiTranslations = {
|
|
126
|
+
title: string;
|
|
127
|
+
helpHint: string;
|
|
128
|
+
newTask: string;
|
|
129
|
+
placeholder: string;
|
|
130
|
+
inputHelp: string;
|
|
131
|
+
added: string;
|
|
132
|
+
completed: string;
|
|
133
|
+
movedTo: string;
|
|
134
|
+
refreshed: string;
|
|
135
|
+
footer: string;
|
|
136
|
+
noTasks: string;
|
|
137
|
+
tabInbox: string;
|
|
138
|
+
tabNext: string;
|
|
139
|
+
tabWaiting: string;
|
|
140
|
+
tabSomeday: string;
|
|
141
|
+
tabProjects: string;
|
|
142
|
+
madeProject: string;
|
|
143
|
+
linkedToProject: string;
|
|
144
|
+
selectProject: string;
|
|
145
|
+
selectProjectHelp: string;
|
|
146
|
+
back: string;
|
|
147
|
+
help: HelpTranslations;
|
|
148
|
+
};
|
|
149
|
+
export type Translations = {
|
|
150
|
+
status: Record<string, string>;
|
|
151
|
+
projectStatus: Record<string, string>;
|
|
152
|
+
commands: {
|
|
153
|
+
add: Record<string, string>;
|
|
154
|
+
list: Record<string, string>;
|
|
155
|
+
move: Record<string, string>;
|
|
156
|
+
done: Record<string, string>;
|
|
157
|
+
project: Record<string, string>;
|
|
158
|
+
};
|
|
159
|
+
tui: TuiTranslations;
|
|
160
|
+
};
|
package/dist/i18n/en.js
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
export const en = {
|
|
2
|
+
// Status labels
|
|
3
|
+
status: {
|
|
4
|
+
inbox: 'Inbox',
|
|
5
|
+
next: 'Next Actions',
|
|
6
|
+
waiting: 'Waiting For',
|
|
7
|
+
someday: 'Someday/Maybe',
|
|
8
|
+
done: 'Done',
|
|
9
|
+
},
|
|
10
|
+
// Project status
|
|
11
|
+
projectStatus: {
|
|
12
|
+
active: 'Active Projects',
|
|
13
|
+
someday: 'Someday Projects',
|
|
14
|
+
completed: 'Completed Projects',
|
|
15
|
+
},
|
|
16
|
+
// Commands
|
|
17
|
+
commands: {
|
|
18
|
+
add: {
|
|
19
|
+
success: 'Added task to Inbox: "{title}"',
|
|
20
|
+
withProject: ' Project: {project}',
|
|
21
|
+
projectNotFound: 'Project "{project}" not found.',
|
|
22
|
+
},
|
|
23
|
+
list: {
|
|
24
|
+
invalidStatus: 'Invalid status: {status}',
|
|
25
|
+
validStatuses: 'Valid statuses: {statuses}',
|
|
26
|
+
noTasks: 'No tasks',
|
|
27
|
+
noProjects: 'No active projects',
|
|
28
|
+
tasks: '{count} tasks',
|
|
29
|
+
activeDone: '{active} active, {done} done',
|
|
30
|
+
},
|
|
31
|
+
move: {
|
|
32
|
+
success: 'Moved "{title}" to {status}',
|
|
33
|
+
waitingFor: ' Waiting for: {person}',
|
|
34
|
+
invalidStatus: 'Invalid status: {status}',
|
|
35
|
+
validStatuses: 'Valid statuses: {statuses}',
|
|
36
|
+
specifyWaiting: 'Please specify who you are waiting for: floq move <id> waiting "person"',
|
|
37
|
+
notFound: 'Task not found: {id}',
|
|
38
|
+
multipleMatch: 'Multiple tasks match "{id}". Please be more specific:',
|
|
39
|
+
},
|
|
40
|
+
done: {
|
|
41
|
+
success: 'Completed: "{title}"',
|
|
42
|
+
alreadyDone: 'Task "{title}" is already done.',
|
|
43
|
+
notFound: 'Task not found: {id}',
|
|
44
|
+
multipleMatch: 'Multiple tasks match "{id}". Please be more specific:',
|
|
45
|
+
},
|
|
46
|
+
project: {
|
|
47
|
+
created: 'Created project: "{name}"',
|
|
48
|
+
alreadyExists: 'Project "{name}" already exists.',
|
|
49
|
+
notFound: 'Project not found: {id}',
|
|
50
|
+
multipleMatch: 'Multiple projects match "{id}". Please be more specific.',
|
|
51
|
+
completed: 'Completed project: "{name}"',
|
|
52
|
+
noProjects: 'No projects',
|
|
53
|
+
description: 'Description: {description}',
|
|
54
|
+
statusLabel: 'Status: {status}',
|
|
55
|
+
tasksCount: 'Tasks: {count}',
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
// TUI
|
|
59
|
+
tui: {
|
|
60
|
+
title: 'Floq',
|
|
61
|
+
helpHint: '?=Help',
|
|
62
|
+
newTask: 'New task: ',
|
|
63
|
+
placeholder: 'Enter task title...',
|
|
64
|
+
inputHelp: '(Enter to save, Esc to cancel)',
|
|
65
|
+
added: 'Added: "{title}"',
|
|
66
|
+
completed: 'Completed: "{title}"',
|
|
67
|
+
movedTo: 'Moved "{title}" to {status}',
|
|
68
|
+
refreshed: 'Refreshed',
|
|
69
|
+
footer: 'a=add d=done n=next s=someday i=inbox p=project P=link',
|
|
70
|
+
noTasks: 'No tasks',
|
|
71
|
+
// Tab labels
|
|
72
|
+
tabInbox: 'Inbox',
|
|
73
|
+
tabNext: 'Next',
|
|
74
|
+
tabWaiting: 'Waiting',
|
|
75
|
+
tabSomeday: 'Someday',
|
|
76
|
+
tabProjects: 'Projects',
|
|
77
|
+
// Project actions
|
|
78
|
+
madeProject: 'Made project: "{title}"',
|
|
79
|
+
linkedToProject: 'Linked "{title}" to {project}',
|
|
80
|
+
selectProject: 'Select project for',
|
|
81
|
+
selectProjectHelp: 'j/k: select, Enter: confirm, Esc: cancel',
|
|
82
|
+
back: 'back',
|
|
83
|
+
// Help modal
|
|
84
|
+
help: {
|
|
85
|
+
title: 'Keyboard Shortcuts',
|
|
86
|
+
navigation: 'Navigation',
|
|
87
|
+
tabSwitch: 'Switch tab (5=Projects)',
|
|
88
|
+
prevNextTab: 'Previous/Next tab',
|
|
89
|
+
taskSelect: 'Select task',
|
|
90
|
+
actions: 'Actions',
|
|
91
|
+
addTask: 'Add new task',
|
|
92
|
+
completeTask: 'Complete selected task',
|
|
93
|
+
moveToNext: 'Move to Next Actions',
|
|
94
|
+
moveToSomeday: 'Move to Someday/Maybe',
|
|
95
|
+
moveToInbox: 'Move to Inbox',
|
|
96
|
+
refresh: 'Refresh list',
|
|
97
|
+
projects: 'Projects',
|
|
98
|
+
makeProject: 'Make task a project',
|
|
99
|
+
linkToProject: 'Link task to project',
|
|
100
|
+
openProject: 'Open project (on Projects tab)',
|
|
101
|
+
backFromProject: 'Back from project detail',
|
|
102
|
+
other: 'Other',
|
|
103
|
+
showHelp: 'Show this help',
|
|
104
|
+
quit: 'Quit',
|
|
105
|
+
closeHint: 'Press any key to close',
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type Translations } from './en.js';
|
|
2
|
+
import { type Locale } from '../config.js';
|
|
3
|
+
export declare function setLocale(locale: Locale): void;
|
|
4
|
+
export declare function t(): Translations;
|
|
5
|
+
export declare function fmt(template: string, values: Record<string, string | number>): string;
|
|
6
|
+
export { type Translations };
|
|
7
|
+
export { getLocale, type Locale } from '../config.js';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { en } from './en.js';
|
|
2
|
+
import { ja } from './ja.js';
|
|
3
|
+
import { getLocale, setLocale as setConfigLocale } from '../config.js';
|
|
4
|
+
const translations = { en, ja };
|
|
5
|
+
export function setLocale(locale) {
|
|
6
|
+
setConfigLocale(locale);
|
|
7
|
+
}
|
|
8
|
+
export function t() {
|
|
9
|
+
return translations[getLocale()];
|
|
10
|
+
}
|
|
11
|
+
// Template string interpolation helper
|
|
12
|
+
export function fmt(template, values) {
|
|
13
|
+
return template.replace(/\{(\w+)\}/g, (_, key) => String(values[key] ?? `{${key}}`));
|
|
14
|
+
}
|
|
15
|
+
export { getLocale } from '../config.js';
|
package/dist/i18n/ja.js
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
export const ja = {
|
|
2
|
+
// Status labels
|
|
3
|
+
status: {
|
|
4
|
+
inbox: 'Inbox',
|
|
5
|
+
next: '次のアクション',
|
|
6
|
+
waiting: '連絡待ち',
|
|
7
|
+
someday: 'いつかやる',
|
|
8
|
+
done: '完了',
|
|
9
|
+
},
|
|
10
|
+
// Project status
|
|
11
|
+
projectStatus: {
|
|
12
|
+
active: 'アクティブなプロジェクト',
|
|
13
|
+
someday: 'いつかやるプロジェクト',
|
|
14
|
+
completed: '完了したプロジェクト',
|
|
15
|
+
},
|
|
16
|
+
// Commands
|
|
17
|
+
commands: {
|
|
18
|
+
add: {
|
|
19
|
+
success: 'Inboxに追加しました: 「{title}」',
|
|
20
|
+
withProject: ' プロジェクト: {project}',
|
|
21
|
+
projectNotFound: 'プロジェクト「{project}」が見つかりません。',
|
|
22
|
+
},
|
|
23
|
+
list: {
|
|
24
|
+
invalidStatus: '無効なステータス: {status}',
|
|
25
|
+
validStatuses: '有効なステータス: {statuses}',
|
|
26
|
+
noTasks: 'タスクなし',
|
|
27
|
+
noProjects: 'アクティブなプロジェクトなし',
|
|
28
|
+
tasks: '{count}件のタスク',
|
|
29
|
+
activeDone: '{active}件アクティブ, {done}件完了',
|
|
30
|
+
},
|
|
31
|
+
move: {
|
|
32
|
+
success: '「{title}」を{status}に移動しました',
|
|
33
|
+
waitingFor: ' 待機中: {person}',
|
|
34
|
+
invalidStatus: '無効なステータス: {status}',
|
|
35
|
+
validStatuses: '有効なステータス: {statuses}',
|
|
36
|
+
specifyWaiting: '待機相手を指定してください: floq move <id> waiting "担当者"',
|
|
37
|
+
notFound: 'タスクが見つかりません: {id}',
|
|
38
|
+
multipleMatch: '「{id}」に一致するタスクが複数あります。より具体的に指定してください:',
|
|
39
|
+
},
|
|
40
|
+
done: {
|
|
41
|
+
success: '完了しました: 「{title}」',
|
|
42
|
+
alreadyDone: 'タスク「{title}」は既に完了しています。',
|
|
43
|
+
notFound: 'タスクが見つかりません: {id}',
|
|
44
|
+
multipleMatch: '「{id}」に一致するタスクが複数あります。より具体的に指定してください:',
|
|
45
|
+
},
|
|
46
|
+
project: {
|
|
47
|
+
created: 'プロジェクトを作成しました: 「{name}」',
|
|
48
|
+
alreadyExists: 'プロジェクト「{name}」は既に存在します。',
|
|
49
|
+
notFound: 'プロジェクトが見つかりません: {id}',
|
|
50
|
+
multipleMatch: '「{id}」に一致するプロジェクトが複数あります。より具体的に指定してください。',
|
|
51
|
+
completed: 'プロジェクトを完了しました: 「{name}」',
|
|
52
|
+
noProjects: 'プロジェクトなし',
|
|
53
|
+
description: '説明: {description}',
|
|
54
|
+
statusLabel: 'ステータス: {status}',
|
|
55
|
+
tasksCount: 'タスク: {count}件',
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
// TUI
|
|
59
|
+
tui: {
|
|
60
|
+
title: 'Floq',
|
|
61
|
+
helpHint: '?=ヘルプ',
|
|
62
|
+
newTask: '新規タスク: ',
|
|
63
|
+
placeholder: 'タスク名を入力...',
|
|
64
|
+
inputHelp: '(Enterで保存, Escでキャンセル)',
|
|
65
|
+
added: '追加しました: 「{title}」',
|
|
66
|
+
completed: '完了しました: 「{title}」',
|
|
67
|
+
movedTo: '「{title}」を{status}に移動しました',
|
|
68
|
+
refreshed: '更新しました',
|
|
69
|
+
footer: 'a=追加 d=完了 n=次 s=いつか i=Inbox p=プロジェクト化 P=紐づけ',
|
|
70
|
+
noTasks: 'タスクなし',
|
|
71
|
+
// Tab labels
|
|
72
|
+
tabInbox: 'Inbox',
|
|
73
|
+
tabNext: '次',
|
|
74
|
+
tabWaiting: '待ち',
|
|
75
|
+
tabSomeday: 'いつか',
|
|
76
|
+
tabProjects: 'プロジェクト',
|
|
77
|
+
// Project actions
|
|
78
|
+
madeProject: 'プロジェクト化しました: 「{title}」',
|
|
79
|
+
linkedToProject: '「{title}」を{project}に紐づけました',
|
|
80
|
+
selectProject: 'プロジェクトを選択',
|
|
81
|
+
selectProjectHelp: 'j/k: 選択, Enter: 確定, Esc: キャンセル',
|
|
82
|
+
back: '戻る',
|
|
83
|
+
// Help modal
|
|
84
|
+
help: {
|
|
85
|
+
title: 'キーボードショートカット',
|
|
86
|
+
navigation: 'ナビゲーション',
|
|
87
|
+
tabSwitch: 'タブ切替 (5=プロジェクト)',
|
|
88
|
+
prevNextTab: '前後のタブ',
|
|
89
|
+
taskSelect: 'タスク選択',
|
|
90
|
+
actions: 'アクション',
|
|
91
|
+
addTask: '新規タスク追加',
|
|
92
|
+
completeTask: '選択タスクを完了',
|
|
93
|
+
moveToNext: '次のアクションへ移動',
|
|
94
|
+
moveToSomeday: 'いつかやるへ移動',
|
|
95
|
+
moveToInbox: 'Inboxへ移動',
|
|
96
|
+
refresh: 'リスト更新',
|
|
97
|
+
projects: 'プロジェクト',
|
|
98
|
+
makeProject: 'タスクをプロジェクト化',
|
|
99
|
+
linkToProject: 'タスクをプロジェクトに紐づけ',
|
|
100
|
+
openProject: 'プロジェクトを開く (Projectsタブ)',
|
|
101
|
+
backFromProject: 'プロジェクト詳細から戻る',
|
|
102
|
+
other: 'その他',
|
|
103
|
+
showHelp: 'このヘルプを表示',
|
|
104
|
+
quit: '終了',
|
|
105
|
+
closeHint: '任意のキーで閉じる',
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
};
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
package/dist/paths.d.ts
ADDED
package/dist/paths.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { homedir } from 'os';
|
|
2
|
+
import { join } from 'path';
|
|
3
|
+
// XDG Base Directory Specification
|
|
4
|
+
// https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
|
5
|
+
export function getConfigDir() {
|
|
6
|
+
const xdgConfigHome = process.env.XDG_CONFIG_HOME;
|
|
7
|
+
if (xdgConfigHome) {
|
|
8
|
+
return join(xdgConfigHome, 'gtd-cli');
|
|
9
|
+
}
|
|
10
|
+
return join(homedir(), '.config', 'gtd-cli');
|
|
11
|
+
}
|
|
12
|
+
export function getDataDir() {
|
|
13
|
+
const xdgDataHome = process.env.XDG_DATA_HOME;
|
|
14
|
+
if (xdgDataHome) {
|
|
15
|
+
return join(xdgDataHome, 'gtd-cli');
|
|
16
|
+
}
|
|
17
|
+
return join(homedir(), '.local', 'share', 'gtd-cli');
|
|
18
|
+
}
|
|
19
|
+
export const CONFIG_DIR = getConfigDir();
|
|
20
|
+
export const DATA_DIR = getDataDir();
|
|
21
|
+
export const CONFIG_FILE = join(CONFIG_DIR, 'config.json');
|
|
22
|
+
export const DB_PATH = join(DATA_DIR, 'gtd.db');
|
package/dist/ui/App.d.ts
ADDED