Skip to content

Commit d7f761d

Browse files
committed
feat: add shiny borders to bug report button
1 parent 67743af commit d7f761d

File tree

7 files changed

+134
-51
lines changed

7 files changed

+134
-51
lines changed

.github/workflows/draft-release.yml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -213,28 +213,28 @@ jobs:
213213
fi
214214
done
215215
216-
generate-release-notes:
217-
name: Generate Release Notes
218-
needs: build
219-
runs-on: ubuntu-latest
220-
steps:
221-
- name: Checkout repository
222-
uses: actions/checkout@v4
223-
with:
224-
fetch-depth: 0 # Fetch all history for all branches and tags
225-
submodules: recursive
226-
227-
- name: Generate Release Notes
228-
env:
229-
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
230-
run: |
231-
set -xv
232-
233-
# Make the script executable
234-
chmod +x ./scripts/generate-release-notes.sh
235-
236-
# Generate release notes and save to a file
237-
./scripts/generate-release-notes.sh > release_notes.md
238-
239-
# Update the release with the generated notes
240-
gh release edit ${{ inputs.version }} --notes-file release_notes.md
216+
# generate-release-notes:
217+
# name: Generate Release Notes
218+
# needs: build
219+
# runs-on: ubuntu-latest
220+
# steps:
221+
# - name: Checkout repository
222+
# uses: actions/checkout@v4
223+
# with:
224+
# fetch-depth: 0 # Fetch all history for all branches and tags
225+
# submodules: recursive
226+
227+
# - name: Generate Release Notes
228+
# env:
229+
# OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
230+
# run: |
231+
# set -xv
232+
233+
# # Make the script executable
234+
# chmod +x ./scripts/generate-release-notes.sh
235+
236+
# # Generate release notes and save to a file
237+
# ./scripts/generate-release-notes.sh > release_notes.md
238+
239+
# # Update the release with the generated notes
240+
# gh release edit ${{ inputs.version }} --notes-file release_notes.md

src-frontend/app/globals.css

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,3 +185,35 @@
185185
@apply bg-background text-foreground;
186186
}
187187
}
188+
189+
/*
190+
---break---
191+
*/
192+
193+
@theme inline {
194+
--animate-shine: shine var(--duration) infinite linear;
195+
@keyframes shine {
196+
0% {
197+
background-position: 0% 0%;
198+
}
199+
50% {
200+
background-position: 100% 100%;
201+
}
202+
to {
203+
background-position: 0% 0%;
204+
}
205+
}
206+
}
207+
208+
/*
209+
---break---
210+
*/
211+
212+
@layer base {
213+
* {
214+
@apply border-border outline-ring/50;
215+
}
216+
body {
217+
@apply bg-background text-foreground;
218+
}
219+
}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
"use client";
2+
3+
import * as React from "react";
4+
5+
import { cn } from "@/lib/utils";
6+
7+
interface ShineBorderProps extends React.HTMLAttributes<HTMLDivElement> {
8+
/**
9+
* Width of the border in pixels
10+
* @default 1
11+
*/
12+
borderWidth?: number;
13+
/**
14+
* Duration of the animation in seconds
15+
* @default 14
16+
*/
17+
duration?: number;
18+
/**
19+
* Color of the border, can be a single color or an array of colors
20+
* @default "#000000"
21+
*/
22+
shineColor?: string | string[];
23+
}
24+
25+
/**
26+
* Shine Border
27+
*
28+
* An animated background border effect component with configurable properties.
29+
*/
30+
export function ShineBorder({
31+
borderWidth = 1,
32+
duration = 14,
33+
shineColor = "#000000",
34+
className,
35+
style,
36+
...props
37+
}: ShineBorderProps) {
38+
return (
39+
<div
40+
style={
41+
{
42+
"--border-width": `${borderWidth}px`,
43+
"--duration": `${duration}s`,
44+
backgroundImage: `radial-gradient(transparent,transparent, ${
45+
Array.isArray(shineColor) ? shineColor.join(",") : shineColor
46+
},transparent,transparent)`,
47+
backgroundSize: "300% 300%",
48+
mask: `linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)`,
49+
WebkitMask: `linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)`,
50+
WebkitMaskComposite: "xor",
51+
maskComposite: "exclude",
52+
padding: "var(--border-width)",
53+
...style,
54+
} as React.CSSProperties
55+
}
56+
className={cn(
57+
"motion-safe:animate-shine pointer-events-none absolute inset-0 size-full rounded-[inherit] will-change-[background-position]",
58+
className,
59+
)}
60+
{...props}
61+
/>
62+
);
63+
}

src-frontend/components/sidebar.tsx

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import { useRouter, usePathname } from "next/navigation";
3434
import { LogoComponent } from "./logo/logo";
3535
import { useConnectionStore, useFileSystemStore } from "@/stores";
3636
import { BugReportDialog } from "./diagnostic/bug-report-dialog";
37-
import { AnimatePresence, motion } from "framer-motion";
37+
import { ShineBorder } from "@/components/magicui/shine-border";
3838

3939
interface SidebarProps {
4040
closeSidebar: () => void;
@@ -358,23 +358,14 @@ export function Sidebar({ closeSidebar }: SidebarProps) {
358358
className="relative m-4"
359359
onClick={handleBugReportOpen}
360360
>
361+
{!hasOpenedBugReport && (
362+
<ShineBorder
363+
shineColor={["#A07CFE", "#FE8FB5", "#FFBE7B"]}
364+
borderWidth={2}
365+
duration={7}
366+
/>
367+
)}
361368
<Bug className="h-4 w-4" />
362-
<AnimatePresence>
363-
{!hasOpenedBugReport && (
364-
<motion.div
365-
initial={{ scale: 1 }}
366-
animate={{
367-
scale: [1.5, 1, 1.5],
368-
}}
369-
transition={{
370-
duration: 1,
371-
repeat: Infinity,
372-
ease: "easeInOut",
373-
}}
374-
className="absolute -top-1 -right-1 h-2 w-2 rounded-full bg-red-500"
375-
/>
376-
)}
377-
</AnimatePresence>
378369
Report Bug
379370
</Button>
380371
}

src-tauri/src/utils.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
//! Utility functions and helpers
22
3-
use log;
43
use tauri::{
54
menu::{CheckMenuItem, Menu, MenuItem},
65
tray::TrayIconBuilder,
@@ -272,12 +271,10 @@ pub fn _setup_system_tray(app: &AppHandle) {
272271
} else {
273272
log::debug!("Autostart disabled");
274273
}
274+
} else if let Err(e) = manager.enable() {
275+
log::error!("Failed to enable autostart: {}", e);
275276
} else {
276-
if let Err(e) = manager.enable() {
277-
log::error!("Failed to enable autostart: {}", e);
278-
} else {
279-
log::debug!("Autostart enabled");
280-
}
277+
log::debug!("Autostart enabled");
281278
}
282279
}
283280
"check_for_updates" => {

src-tauri/src/version.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
pub const DESKTOP_VERSION: &str = "0.1.19";
2-
pub const DESKTOP_HASH: &str = "310b474";
3-
pub const DESKTOP_BUILD: &str = "2025-06-10T00:07:36+04:00";
2+
pub const DESKTOP_HASH: &str = "987ed02";
3+
pub const DESKTOP_BUILD: &str = "2025-06-10T02:56:49+04:00";
44
pub const DAEMON_VERSION: &str = "0.5.0";
55
pub const DAEMON_HASH: &str = "59e559e";
66
pub const DAEMON_BUILD: &str = "2025-06-05T23:22:11+04:00";

src-tauri/src/windows.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pub fn _setup_main_window(app: &AppHandle, url: WebviewUrl) {
3737
.expect("Failed to get download directory")
3838
.join(destination.clone());
3939
log::info!("downloading {} to {:?}", url, dst);
40-
*destination = dst.into();
40+
*destination = dst;
4141
}
4242
DownloadEvent::Finished { url, path, success } => {
4343
log::info!("downloaded {} to {:?}, success: {}", url, path, success);

0 commit comments

Comments
 (0)