Skip to content

Commit 8c650ae

Browse files
author
decryptable
committed
feat: initialize project structure with core components and configurations
0 parents  commit 8c650ae

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+9480
-0
lines changed

.github/workflows/release.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Release
2+
on:
3+
push:
4+
tags:
5+
- 'v*'
6+
workflow_dispatch:
7+
8+
jobs:
9+
release:
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
platform: [macos-latest, ubuntu-20.04, windows-latest]
14+
runs-on: ${{ matrix.platform }}
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v3
18+
19+
- name: Install dependencies (ubuntu only)
20+
if: matrix.platform == 'ubuntu-20.04'
21+
run: |
22+
sudo apt-get update
23+
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf libayatana-appindicator3-dev
24+
25+
- name: Setup Bun
26+
uses: oven-sh/setup-bun@v2
27+
with:
28+
bun-version: '1.1.24'
29+
cache: 'bun'
30+
31+
- name: Setup Rust
32+
uses: dtolnay/rust-toolchain@stable
33+
with:
34+
targets: ${{ matrix.target }}
35+
36+
- name: Install Rust dependencies
37+
run: |
38+
rustup target add wasm32-unknown-unknown
39+
cargo install wasm-bindgen-cli
40+
41+
- name: Install dependencies
42+
run: bun ci
43+
44+
- name: Build the app
45+
run: bun run build
46+
47+
- name: Build Tauri
48+
uses: tauri-apps/tauri-action@v0
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
with:
52+
tagName: ${{ github.ref_name }}
53+
releaseName: 'Awesome Timer v__VERSION__'
54+
releaseBody: 'See the assets to download and install this version.'
55+
releaseDraft: true
56+
prerelease: false

.gitignore

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
dist/
8+
9+
# testing
10+
/coverage
11+
12+
# next.js
13+
/.next/
14+
/out/
15+
16+
# production
17+
/build
18+
19+
# tauri
20+
/src-tauri/target
21+
22+
# misc
23+
.DS_Store
24+
*.pem
25+
26+
# debug
27+
npm-debug.log*
28+
yarn-debug.log*
29+
yarn-error.log*
30+
31+
# local env files
32+
.env*.local
33+
34+
# vercel
35+
.vercel
36+
37+
# typescript
38+
*.tsbuildinfo
39+
next-env.d.ts
40+

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Awesome Timer
2+
3+
A customizable timer application with shell command execution capabilities.
4+
5+
## Features
6+
7+
- Customizable timer with adjustable appearance
8+
- Shell command execution when timer completes
9+
- Preset management for saving and loading timer configurations
10+
- Cross-platform support (Windows, macOS, Linux)

app/globals.css

Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;
4+
5+
@layer base {
6+
:root {
7+
--background: 0 0% 100%;
8+
--foreground: 222.2 84% 4.9%;
9+
--card: 0 0% 100%;
10+
--card-foreground: 222.2 84% 4.9%;
11+
--popover: 0 0% 100%;
12+
--popover-foreground: 222.2 84% 4.9%;
13+
--primary: 221.2 83.2% 53.3%;
14+
--primary-foreground: 210 40% 98%;
15+
--secondary: 210 40% 96.1%;
16+
--secondary-foreground: 222.2 47.4% 11.2%;
17+
--muted: 210 40% 96.1%;
18+
--muted-foreground: 215.4 16.3% 46.9%;
19+
--accent: 210 40% 96.1%;
20+
--accent-foreground: 222.2 47.4% 11.2%;
21+
--destructive: 0 84.2% 60.2%;
22+
--destructive-foreground: 210 40% 98%;
23+
--border: 214.3 31.8% 91.4%;
24+
--input: 214.3 31.8% 91.4%;
25+
--ring: 221.2 83.2% 53.3%;
26+
--radius: 0.5rem;
27+
}
28+
29+
.dark {
30+
--background: 222.2 84% 4.9%;
31+
--foreground: 210 40% 98%;
32+
--card: 222.2 84% 4.9%;
33+
--card-foreground: 210 40% 98%;
34+
--popover: 222.2 84% 4.9%;
35+
--popover-foreground: 210 40% 98%;
36+
--primary: 217.2 91.2% 59.8%;
37+
--primary-foreground: 222.2 47.4% 11.2%;
38+
--secondary: 217.2 32.6% 17.5%;
39+
--secondary-foreground: 210 40% 98%;
40+
--muted: 217.2 32.6% 17.5%;
41+
--muted-foreground: 215 20.2% 65.1%;
42+
--accent: 217.2 32.6% 17.5%;
43+
--accent-foreground: 210 40% 98%;
44+
--destructive: 0 62.8% 30.6%;
45+
--destructive-foreground: 210 40% 98%;
46+
--border: 217.2 32.6% 17.5%;
47+
--input: 217.2 32.6% 17.5%;
48+
--ring: 224.3 76.3% 48%;
49+
}
50+
}
51+
52+
@layer base {
53+
* {
54+
@apply border-border;
55+
}
56+
body {
57+
@apply bg-background text-foreground;
58+
font-feature-settings: "rlig" 1, "calt" 1;
59+
}
60+
}
61+
62+
/* Update the Tauri window styling */
63+
html,
64+
body {
65+
margin: 0;
66+
padding: 0;
67+
height: 100%;
68+
overflow: hidden;
69+
}
70+
71+
.electron-window {
72+
height: 100vh;
73+
display: flex;
74+
flex-direction: column;
75+
border-radius: 12px;
76+
overflow: hidden;
77+
background-color: hsl(var(--background));
78+
}
79+
80+
.electron-content {
81+
flex: 1;
82+
overflow: auto;
83+
}
84+
85+
/* Title bar styling */
86+
.title-bar {
87+
height: 32px;
88+
display: flex;
89+
align-items: center;
90+
justify-content: space-between;
91+
background-color: hsl(var(--card));
92+
user-select: none;
93+
border-bottom: 1px solid hsl(var(--border));
94+
}
95+
96+
.title-bar-drag-area {
97+
flex: 1;
98+
display: flex;
99+
align-items: center;
100+
padding-left: 12px;
101+
}
102+
103+
.title-bar-title {
104+
font-size: 14px;
105+
font-weight: 500;
106+
color: hsl(var(--foreground));
107+
}
108+
109+
.title-bar-controls {
110+
display: flex;
111+
}
112+
113+
.title-bar-button {
114+
width: 46px;
115+
height: 32px;
116+
display: flex;
117+
align-items: center;
118+
justify-content: center;
119+
background: transparent;
120+
border: none;
121+
outline: none;
122+
color: hsl(var(--foreground));
123+
transition: background-color 0.2s;
124+
}
125+
126+
.title-bar-button:hover {
127+
background-color: hsl(var(--muted));
128+
}
129+
130+
.title-bar-button-close:hover {
131+
background-color: hsl(var(--destructive));
132+
color: hsl(var(--destructive-foreground));
133+
}
134+
135+
/* App toolbar styling */
136+
.app-toolbar {
137+
height: 40px;
138+
display: flex;
139+
align-items: center;
140+
justify-content: space-between;
141+
user-select: none;
142+
}
143+
144+
/* Custom color picker styling */
145+
.color-picker-preview {
146+
width: 24px;
147+
height: 24px;
148+
border-radius: 4px;
149+
border: 1px solid hsl(var(--border));
150+
}
151+
152+
.color-picker-grid {
153+
display: grid;
154+
grid-template-columns: repeat(5, 1fr);
155+
gap: 4px;
156+
}
157+
158+
.color-picker-swatch {
159+
width: 100%;
160+
aspect-ratio: 1;
161+
border-radius: 4px;
162+
border: 1px solid hsl(var(--border));
163+
cursor: pointer;
164+
}
165+
166+
/* Disable text selection */
167+
.no-select {
168+
-webkit-user-select: none;
169+
-moz-user-select: none;
170+
-ms-user-select: none;
171+
user-select: none;
172+
}
173+
174+
/* Allow text selection in inputs */
175+
input,
176+
textarea,
177+
[contenteditable="true"] {
178+
-webkit-user-select: text;
179+
-moz-user-select: text;
180+
-ms-user-select: text;
181+
user-select: text;
182+
}
183+

app/layout.tsx

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import type React from "react"
2+
import "./globals.css"
3+
import { ThemeProvider } from "@/components/theme-provider"
4+
import DynamicTitleBar from "@/components/dynamic-title-bar"
5+
import ContextMenuProvider from "@/components/context-menu"
6+
import { Github, Clock } from "lucide-react"
7+
8+
export default function RootLayout({
9+
children,
10+
}: {
11+
children: React.ReactNode
12+
}) {
13+
return (
14+
<html lang="en" suppressHydrationWarning>
15+
<head>
16+
<title>Awesome Timer</title>
17+
<meta name="description" content="Customizable timer with shell actions" />
18+
</head>
19+
<body>
20+
<ThemeProvider attribute="class" defaultTheme="dark" enableSystem disableTransitionOnChange>
21+
<ContextMenuProvider>
22+
<div className="electron-window">
23+
<DynamicTitleBar />
24+
<div className="electron-content">{children}</div>
25+
<footer className="bg-card border-t border-border p-4 text-center text-sm text-muted-foreground">
26+
<div className="flex items-center justify-center gap-2">
27+
<Clock className="h-4 w-4" />
28+
<span>Awesome Timer</span>
29+
<span></span>
30+
<span>© 2025 decryptable</span>
31+
<span></span>
32+
<a
33+
href="https://github.com/decryptable/awesome-timer"
34+
target="_blank"
35+
rel="noopener noreferrer"
36+
className="flex items-center hover:text-foreground transition-colors"
37+
>
38+
<Github className="h-4 w-4 mr-1" />
39+
<span>Open Source</span>
40+
</a>
41+
</div>
42+
</footer>
43+
</div>
44+
</ContextMenuProvider>
45+
</ThemeProvider>
46+
</body>
47+
</html>
48+
)
49+
}
50+

0 commit comments

Comments
 (0)