Skip to content

Commit d970c79

Browse files
committed
Refactor code for improved readability and consistency
- Updated JSON localization file for better formatting and structure. - Enhanced event listener and command invocation functions in `tauri.ts` for clarity. - Improved type definitions in `utils.ts` for better type safety. - Refactored settings component in `settings.tsx` for cleaner conditional rendering. - Cleaned up app store logic in `app-store.ts` for better readability. - Streamlined clipboard store implementation in `clipboard-store.ts`. - Refined hotkey store logic in `hotkey-store.ts` for improved clarity. - Enhanced settings store functionality in `settings-store.ts` for better maintainability. - Fixed formatting issues in enums and type definitions for consistency.
1 parent c0c2b06 commit d970c79

Some content is hidden

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

72 files changed

+4184
-3766
lines changed

.github/workflows/docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
- 'docs/**'
99

1010
concurrency:
11-
group: ${{ github.ref }}
11+
group: docker-${{ github.ref }}
1212
cancel-in-progress: true
1313

1414
jobs:

.github/workflows/release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ on:
44
workflow_dispatch:
55
push:
66
branches: [main]
7+
paths-ignore:
8+
- 'docs/**'
79
concurrency:
8-
group: ${{ github.ref }}
10+
group: release-${{ github.ref }}
911
cancel-in-progress: true
1012
env:
1113
ARCH: x86_64

docs/.vscode/extensions.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
{
2-
"recommendations": ["astro-build.astro-vscode", "unifiedjs.vscode-mdx", "bradlc.vscode-tailwindcss", "esbenp.prettier-vscode"],
2+
"recommendations": [
3+
"astro-build.astro-vscode",
4+
"unifiedjs.vscode-mdx",
5+
"bradlc.vscode-tailwindcss",
6+
"esbenp.prettier-vscode"
7+
],
38
"unwantedRecommendations": []
49
}

docs/astro.config.mjs

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,16 @@ export default defineConfig({
1212
starlight({
1313
title: "Clippy Docs",
1414
social: [
15-
{ icon: "github", label: "GitHub", href: "https://github.com/0-don/clippy" },
16-
{ icon: "discord", label: "Discord", href: "https://discord.gg/coding" },
15+
{
16+
icon: "github",
17+
label: "GitHub",
18+
href: "https://github.com/0-don/clippy",
19+
},
20+
{
21+
icon: "discord",
22+
label: "Discord",
23+
href: "https://discord.gg/coding",
24+
},
1725
],
1826
sidebar: [
1927
{
@@ -32,7 +40,10 @@ export default defineConfig({
3240
{
3341
label: "Features",
3442
items: [
35-
{ label: "Clipboard History", slug: "features/clipboard-history" },
43+
{
44+
label: "Clipboard History",
45+
slug: "features/clipboard-history",
46+
},
3647
{ label: "Global Hotkeys", slug: "features/hotkeys" },
3748
{ label: "Cloud Sync", slug: "features/cloud-sync" },
3849
{ label: "File Support", slug: "features/file-support" },

docs/prettier.config.mjs

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/src/content.config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ import { docsLoader } from "@astrojs/starlight/loaders";
22
import { docsSchema } from "@astrojs/starlight/schema";
33
import { defineCollection } from "astro:content";
44

5-
export const collections = { docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }) };
5+
export const collections = {
6+
docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }),
7+
};

docs/src/content/docs/features/index.mdx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ description: Comprehensive overview of Clippy's features and capabilities
1010
### Clipboard Management
1111

1212
- **Multi-content Support**
13-
1413
- Text, HTML, and RTF content support
1514
- Image support with thumbnails
1615
- File support with metadata
@@ -26,7 +25,6 @@ description: Comprehensive overview of Clippy's features and capabilities
2625
### Security & Privacy
2726

2827
- **Encryption**
29-
3028
- End-to-end encryption support
3129
- Password protection for sensitive content
3230
- Secure storage of clipboard data
@@ -46,7 +44,6 @@ description: Comprehensive overview of Clippy's features and capabilities
4644
### Customization
4745

4846
- **Interface**
49-
5047
- Dark/Light mode support
5148
- Adjustable display scale
5249
- Multiple languages support
@@ -69,7 +66,6 @@ description: Comprehensive overview of Clippy's features and capabilities
6966
### Backend Capabilities
7067

7168
- **Database Management**
72-
7369
- SQLite database for local storage
7470
- Configurable database location
7571
- Database information retrieval
@@ -82,7 +78,6 @@ description: Comprehensive overview of Clippy's features and capabilities
8278
### Frontend Features
8379

8480
- **User Interface**
85-
8681
- Modern React-based UI
8782
- Responsive design
8883
- Component-based architecture
@@ -101,7 +96,6 @@ description: Comprehensive overview of Clippy's features and capabilities
10196
## Development Features
10297

10398
- **Build System**
104-
10599
- Tauri-based desktop application
106100
- TypeScript/React frontend
107101
- Rust backend

docs/src/content/docs/guides/getting-started.mdx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,15 @@ description: Learn how to install and start using Clippy
2222
### Clipboard Management
2323

2424
1. **Copying Content**
25-
2625
- Copy any content (text, images, files) as usual
2726
- Clippy automatically saves it to your history
2827

2928
2. **Accessing History**
30-
3129
- Click the tray icon or use the hotkey
3230
- Your clipboard history appears in the main window
3331
- Click any item to copy it back to your clipboard
3432

3533
3. **Searching History**
36-
3734
- Use the search bar to find specific content
3835
- Smart search recognizes:
3936
- Links
@@ -56,7 +53,6 @@ description: Learn how to install and start using Clippy
5653
#### Cloud Sync
5754

5855
1. **Setup**
59-
6056
- Go to Settings → Sync
6157
- Click "Connect Google Drive"
6258
- Follow the authentication process
@@ -69,7 +65,6 @@ description: Learn how to install and start using Clippy
6965
#### Security Features
7066

7167
1. **Encryption**
72-
7368
- Enable encryption in Settings → Security
7469
- Set a strong password
7570
- Choose what content to encrypt
@@ -84,7 +79,6 @@ description: Learn how to install and start using Clippy
8479
#### Interface
8580

8681
1. **Theme**
87-
8882
- Toggle between light/dark mode
8983
- Adjust display scale
9084
- Choose your preferred language
@@ -97,7 +91,6 @@ description: Learn how to install and start using Clippy
9791
#### Keyboard Shortcuts
9892

9993
1. **Default Hotkeys**
100-
10194
- Show/Hide: `Ctrl+Y` or `Ctrl+D`
10295
- Type Out: `Ctrl+B`
10396

@@ -124,13 +117,11 @@ description: Learn how to install and start using Clippy
124117
### Common Issues
125118

126119
1. **Hotkeys Not Working**
127-
128120
- Check for conflicts with other applications
129121
- Verify permissions in system settings
130122
- Try changing hotkey combinations
131123

132124
2. **Sync Problems**
133-
134125
- Check internet connection
135126
- Verify Google Drive permissions
136127
- Try reconnecting sync

docs/src/content/docs/index.mdx

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ import "../../styles/global.css";
5353
Use Clippy on Windows, macOS, and Linux with the same seamless experience.
5454
</Card>
5555
<Card title="Cloud Sync" icon="seti:salesforce">
56-
Sync your clipboard history across all your devices with Google Drive integration.
56+
Sync your clipboard history across all your devices with Google Drive
57+
integration.
5758
</Card>
5859
<Card title="Secure" icon="seti:lock">
5960
Built with Rust and Tauri for maximum security and performance.
@@ -63,23 +64,32 @@ import "../../styles/global.css";
6364
</Card>
6465
</CardGrid>
6566

66-
6767
## Showcase
6868

6969
<div class="flex flex-col items-center justify-center">
7070
<p>
71-
Here you can see a screenshot of the Clippy app in action. The image showcases the user interface and some of the
72-
key features, giving you a first impression of what Clippy offers.
71+
Here you can see a screenshot of the Clippy app in action. The image
72+
showcases the user interface and some of the key features, giving you a
73+
first impression of what Clippy offers.
7374
</p>
74-
<img src="/clippy-showcase.webp" alt="Clippy App Screenshot" class="rounded-xl shadow-lg" />
75+
<img
76+
src="/clippy-showcase.webp"
77+
alt="Clippy App Screenshot"
78+
class="rounded-xl shadow-lg"
79+
/>
7580
</div>
7681

7782
<div class="!mt-16 flex justify-between border-t border-slate-200 pt-6 dark:border-slate-700">
78-
<a href="/legal/privacy-policy" class="text-slate-500 transition-colors hover:text-blue-500 hover:underline">
83+
<a
84+
href="/legal/privacy-policy"
85+
class="text-slate-500 transition-colors hover:text-blue-500 hover:underline"
86+
>
7987
Privacy Policy
8088
</a>
81-
<a href="/legal/terms-of-service" class="text-slate-500 transition-colors hover:text-blue-500 hover:underline">
89+
<a
90+
href="/legal/terms-of-service"
91+
class="text-slate-500 transition-colors hover:text-blue-500 hover:underline"
92+
>
8293
Terms of Service
8394
</a>
8495
</div>
85-

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"tauri:build": "cross-env NO_STRIP=true tauri build --verbose",
1414
"d": "cross-env COLORBT_SHOW_HIDDEN=1 tauri dev",
1515
"gen": "sea-orm-cli migrate refresh -v -d src-tauri/migration && sea-orm-cli generate entity -l -o src-tauri/entity/src --model-extra-derives Default --expanded-format --with-serde both",
16-
"icon": "tauri icon"
16+
"icon": "tauri icon",
17+
"format": "prettier --write ."
1718
},
1819
"dependencies": {
1920
"@corvu/tooltip": "0.2.2",

0 commit comments

Comments
 (0)