Skip to content

Commit a9d1514

Browse files
xiaojunjunxiaojunjun
authored andcommitted
Fix traffic light button paths for web environment
1 parent 197b823 commit a9d1514

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/components/TabBar.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,11 @@ const trafficLightSvg = (
3939
type: "close" | "minimize" | "maximize",
4040
state: "normal" | "hover" | "press",
4141
) => {
42+
const basePath = isWeb ? "/QuickNote-for-macOS" : "";
4243
if (type === "minimize" || type === "maximize") {
43-
return "/traffic-lights/all-three-nofocus.svg";
44+
return `${basePath}/traffic-lights/all-three-nofocus.svg`;
4445
}
45-
return `/traffic-lights/${type}-${state}.svg`;
46+
return `${basePath}/traffic-lights/${type}-${state}.svg`;
4647
};
4748
4849
// Only close (red) button has click handler; minimize and maximize are UI only
@@ -124,7 +125,7 @@ const openSettings = () => {
124125
<div class="top-drag-handle" data-tauri-drag-region>
125126
<img
126127
class="drag-indicator"
127-
src="/drag-indicator.svg"
128+
:src="isWeb ? '/QuickNote-for-macOS/drag-indicator.svg' : '/drag-indicator.svg'"
128129
alt="drag indicator"
129130
/>
130131
</div>

0 commit comments

Comments
 (0)