Skip to content

Commit c71241d

Browse files
committed
chore: widget css updates + empty transcription view
1 parent b32064c commit c71241d

File tree

8 files changed

+99
-53
lines changed

8 files changed

+99
-53
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ yarn-error.log*
3939
CLAUDE.md
4040
.serena
4141
.local
42+
.claude
4243

4344
# Temp files
4445
/tmp

apps/desktop/assets/dmg_bg.tiff

6.25 MB
Binary file not shown.

apps/desktop/forge.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,10 @@ const config: ForgeConfig = {
355355
), // Required for macOS auto-updates
356356
new MakerDMG(
357357
{
358+
//! @see https://github.com/electron/forge/issues/3517#issuecomment-2428129194
358359
// macOS DMG files will be named like: Amical-0.0.1-arm64.dmg
359360
icon: "./assets/logo.icns",
361+
background: "./assets/dmg_bg.tiff",
360362
},
361363
["darwin"],
362364
),

apps/desktop/package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@amical/desktop",
3-
"version": "0.0.1",
3+
"version": "0.0.5",
44
"description": "Amical Desktop app",
55
"main": ".vite/build/main.js",
66
"productName": "Amical",
@@ -12,8 +12,10 @@
1212
"start": "pnpm build:swift-helper && electron-forge start",
1313
"start:onboarding": "FORCE_ONBOARDING=true pnpm start",
1414
"package": "pnpm build:swift-helper && electron-forge package",
15-
"make": "pnpm build:swift-helper && electron-forge make --platform=darwin --arch=arm64,x64",
16-
"make:dmg": "pnpm build:swift-helper && electron-forge make --targets=@electron-forge/maker-dmg --platform=darwin --arch=arm64",
15+
"make": "pnpm build:swift-helper && electron-forge make --platform=darwin --arch=x64,arm64",
16+
"make:arm64": "pnpm build:swift-helper && electron-forge make --platform=darwin --arch=arm64",
17+
"make:x64": "pnpm build:swift-helper && electron-forge make --platform=darwin --arch=x64",
18+
"make:dmg": "pnpm build:swift-helper && electron-forge make --targets=@electron-forge/maker-dmg --platform=darwin --arch=arm64,x64",
1719
"make:dmg:arm64": "pnpm build:swift-helper && electron-forge make --targets=@electron-forge/maker-dmg --platform=darwin --arch=arm64",
1820
"make:dmg:x64": "pnpm build:swift-helper && electron-forge make --targets=@electron-forge/maker-dmg --platform=darwin --arch=x64",
1921
"make:zip:arm64": "pnpm build:swift-helper && electron-forge make --targets=@electron-forge/maker-zip --platform=darwin --arch=arm64",

apps/desktop/src/renderer/main/pages/transcriptions/components/TranscriptionsList.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ export const TranscriptionsList: React.FC = () => {
3636
const [searchTerm, setSearchTerm] = useState("");
3737
const [openDropdownId, setOpenDropdownId] = useState<number | null>(null);
3838

39+
// Get shortcuts data
40+
const shortcutsQuery = api.settings.getShortcuts.useQuery();
41+
const pushToTalkShortcut = shortcutsQuery.data?.pushToTalk || "";
42+
3943
// tRPC React Query hooks
4044
const transcriptionsQuery = api.transcriptions.getTranscriptions.useQuery(
4145
{
@@ -154,9 +158,8 @@ export const TranscriptionsList: React.FC = () => {
154158
<p className="text-sm text-muted-foreground max-w-sm">
155159
{searchTerm
156160
? "Try adjusting your search terms."
157-
: "Start recording to see your transcriptions here."}
161+
: `Click on the widget to start dictation or press and hold the PTT shortcut key${pushToTalkShortcut ? ` (${pushToTalkShortcut})` : ""}.`}
158162
</p>
159-
{!searchTerm && <Button className="mt-4">Start Recording</Button>}
160163
</div>
161164
</CardContent>
162165
</Card>

apps/desktop/src/renderer/widget/pages/widget/components/FloatingButton.tsx

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ const StopButton: React.FC<{ onClick: (e: React.MouseEvent) => void }> = ({
1313
}) => (
1414
<button
1515
onClick={onClick}
16-
className="flex items-center justify-center w-[20px] h-[20px] bg-red-500 hover:bg-red-600 rounded transition-colors"
16+
className="flex items-center justify-center w-[20px] h-[20px]rounded transition-colors"
1717
aria-label="Stop recording"
1818
>
19-
<Square className="w-[12px] h-[12px] text-white fill-white" />
19+
<Square className="w-[12px] h-[12px] text-red-500 fill-red-500" />
2020
</button>
2121
);
2222

2323
// Separate component for the processing indicator
2424
const ProcessingIndicator: React.FC = () => (
25-
<div className="flex gap-[4px] items-center justify-center">
25+
<div className="flex gap-[4px] items-center justify-center flex-1 h-6">
2626
<div className="w-[4px] h-[4px] bg-blue-500 rounded-full animate-bounce [animation-delay:-0.3s]" />
2727
<div className="w-[4px] h-[4px] bg-blue-500 rounded-full animate-bounce [animation-delay:-0.15s]" />
2828
<div className="w-[4px] h-[4px] bg-blue-500 rounded-full animate-bounce" />
@@ -41,7 +41,7 @@ const WaveformVisualization: React.FC<{
4141
index={index}
4242
isRecording={isRecording}
4343
voiceDetected={voiceDetected}
44-
baseHeight={100}
44+
baseHeight={60}
4545
silentHeight={20}
4646
/>
4747
))}
@@ -138,11 +138,13 @@ export const FloatingButton: React.FC = () => {
138138
if (isHandsFreeMode && isRecording) {
139139
return (
140140
<>
141-
<WaveformVisualization
142-
isRecording={isRecording}
143-
voiceDetected={voiceDetected}
144-
/>
145-
<div className="ml-[4px]">
141+
<div className="justify-center items-center flex flex-1 gap-1">
142+
<WaveformVisualization
143+
isRecording={isRecording}
144+
voiceDetected={voiceDetected}
145+
/>
146+
</div>
147+
<div className="h-full items-center flex mr-2">
146148
<StopButton onClick={handleStopClick} />
147149
</div>
148150
</>
@@ -151,32 +153,37 @@ export const FloatingButton: React.FC = () => {
151153

152154
// Show waveform visualization for all other states
153155
return (
154-
<WaveformVisualization
155-
isRecording={isRecording}
156-
voiceDetected={voiceDetected}
157-
/>
156+
<button
157+
className="justify-center items-center flex flex-1 gap-1 h-full w-full"
158+
role="button"
159+
onClick={handleButtonClick}
160+
>
161+
<WaveformVisualization
162+
isRecording={isRecording}
163+
voiceDetected={voiceDetected}
164+
/>
165+
</button>
158166
);
159167
};
160168

161169
return (
162-
<button
163-
role="button"
164-
onClick={handleButtonClick}
170+
<div
165171
onMouseEnter={handleMouseEnter}
166172
onMouseLeave={handleMouseLeave}
167173
className={`
168174
transition-all duration-200 ease-in-out
169-
${expanded ? "h-[32px] w-[112px]" : "h-[16px] w-[48px]"}
170-
rounded-full border-2 border-text-muted bg-black/50 border-muted-foreground
175+
${expanded ? "h-[24px] w-[96px]" : "h-[8px] w-[48px]"}
176+
bg-black/70 rounded-[24px] backdrop-blur-md ring-[1px] ring-black/60 shadow-[0px_0px_15px_0px_rgba(0,0,0,0.40)]
177+
before:content-[''] before:absolute before:inset-[1px] before:rounded-[23px] before:outline before:outline-white/15 before:pointer-events-none
171178
mb-2 cursor-pointer select-none
172179
`}
173180
style={{ pointerEvents: "auto" }}
174181
>
175182
{expanded && (
176-
<div className="flex gap-[2px] items-end h-[40%] justify-center w-full">
183+
<div className="flex gap-[2px] h-full w-full justify-between">
177184
{renderWidgetContent()}
178185
</div>
179186
)}
180-
</button>
187+
</div>
181188
);
182189
};

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
"node": ">=24"
2020
},
2121
"pnpm": {
22+
"overrides": {
23+
"@electron-forge/maker-dmg": "https://registry.npmjs.org/@fellow/maker-dmg/-/maker-dmg-7.4.0.tgz"
24+
},
2225
"ignoredBuiltDependencies": [
2326
"@tailwindcss/oxide",
2427
"core-js-pure",

pnpm-lock.yaml

Lines changed: 56 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)