Skip to content

Commit

Permalink
add icon to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
0-don committed Feb 5, 2025
1 parent b44f297 commit 36e398b
Show file tree
Hide file tree
Showing 13 changed files with 134 additions and 24 deletions.
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
DATABASE_URL=sqlite://clippy.sqlite?mode=rwc
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
TAURI_GOOGLE_CLIENT_ID=
TAURI_GOOGLE_CLIENT_SECRET=
12 changes: 12 additions & 0 deletions .github/replace-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { readFileSync, writeFileSync } from "fs";
import { join, resolve } from "path";

const configPath = join(resolve(), "src-tauri/tauri.conf.json");
const config = JSON.parse(readFileSync(configPath, "utf8"));

// Replace the secret
config.plugins.oauth.google.clientId = process.env.TAURI_GOOGLE_CLIENT_ID;
config.plugins.oauth.google.clientSecret = process.env.TAURI_GOOGLE_CLIENT_SECRET;

// Write back to file
writeFileSync(configPath, JSON.stringify(config, null, 2));
4 changes: 2 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
- name: Create env file
run: |
touch .env
echo GOOGLE_CLIENT_ID=${{ secrets.GOOGLE_CLIENT_ID }} > .env
echo GOOGLE_CLIENT_SECRET=${{ secrets.GOOGLE_CLIENT_SECRET }} >> .env
echo TAURI_GOOGLE_CLIENT_ID=${{ secrets.TAURI_GOOGLE_CLIENT_ID }} > .env
echo TAURI_GOOGLE_CLIENT_SECRET=${{ secrets.TAURI_GOOGLE_CLIENT_SECRET }} >> .env
cat .env
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: "publish"
on:
workflow_dispatch:
push:
branches: [mastera]
branches: [master]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
Expand Down Expand Up @@ -63,6 +63,12 @@ jobs:
with:
node-version: lts/*

- name: Replace environment variables in config
env:
TAURI_GOOGLE_CLIENT_ID: ${{ secrets.TAURI_GOOGLE_CLIENT_ID }}
TAURI_GOOGLE_CLIENT_SECRET: ${{ secrets.TAURI_GOOGLE_CLIENT_SECRET }}
run: node ./.github/replace-config.js

- name: install rust stable
uses: dtolnay/rust-toolchain@stable
with:
Expand All @@ -84,8 +90,6 @@ jobs:
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }}
GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }}
with:
tagName: ${{ needs.setup.outputs.tag_name }}
releaseName: ${{ needs.setup.outputs.tag_name }}
Expand Down
79 changes: 67 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</a>
<p align="center">
<br />
Clipboard Manager made with Tauri, Solid & Sea-Orm
clipboard manager with sync & encryption
<br />
<a href="https://github.com/0-don/clippy/releases/latest">Try it out</a>
·
Expand All @@ -18,20 +18,75 @@
</p>
</p>

successor of [the electron clippy](https://github.com/0-don/clippy-ts)
<div align="center">

<a href="https://github.com/0-don/clippy/releases/download/v1.3.1/clippy_1.3.1_x64-setup.exe">
<img src="./public/windows.png"> Windows (x64)
</a>
<a href="https://github.com/0-don/clippy/releases/download/v1.3.1/clippy_1.3.1_x64-setup.exe">
Windows (arm64)
</a>
<br>
<a href="https://github.com/0-don/clippy/releases/download/v1.4.0/clippy_1.4.0_amd64.deb">
<img src="./public/linux.png"> Linux (deb)
</a>
<a href="https://github.com/0PandaDEV/Qopy/releases/download/v0.3.1/Qopy-0.3.1.rpm">
Linux (rpm)
</a>
<a href="https://github.com/0-don/clippy/releases/download/v1.4.0/clippy-bin-1.4.0-1-x86_64.pkg.tar.zst">
Linux (zst)
</a>
<a href="https://github.com/0-don/clippy/releases/download/v1.4.0/clippy_1.4.0_amd64.AppImage">
Linux (AppImage)
</a>
<br>
<a href="https://github.com/0-don/clippy/releases/download/v1.4.0/clippy_1.4.0_aarch64.dmg">
<img src="./public/apple.png"> macOS (Silicon)
</a>
<a href="https://github.com/0-don/clippy/releases/download/v1.4.0/clippy_1.4.0_aarch64.dmg">
macOS (Intel)
</a>
<br>
<br>

</div>

### Features

- display/hide **ctrl+y** or **ctrl+d** (change in settings)
- type out clipboard **ctrl+b** (where pasting isn't allowed)
- text, html, rtf, image, file support
- keybinds for everything & custom keybinds
- add favorite clipboards
- smart search, for links, colors, images, hex, etc.
- change/sync database location
- dark mode / white mode
- multilanguage support
- display scale
- **Multi-content support:**
- Text, HTML, RTF support
- Image support with thumbnails
- File support with metadata
- **Smart clipboard features:**
- Type out clipboard content (where pasting isn't allowed) **ctrl+b**
- Smart search for links, colors, images, hex codes etc.
- Add favorite clipboards
- Clear history by type
- **Security & Privacy:**
- End-to-end encryption support
- Password protection
- Configurable size limits for different content types
- **Cloud sync:**
- Google Drive integration
- Sync favorites and history
- Configurable sync limits
- **Customization:**
- Global hotkeys for all functions
- Custom keybinds
- Adjustable display scale
- Dark/Light mode
- Multiple languages support
- Configurable window positions
- Database location customization
- **System Integration:**
- Autostart option
- System tray support
- Display toggle with **ctrl+y** or **ctrl+d**

### Prerequisites Development

Expand Down
Binary file added docs/src/assets/app-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/src/content/docs/index.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: Welcome to Clippy
description: Get started building your docs site with Starlight.
description: Get started with Clippy, modern clipboard mana
template: splash
hero:
tagline: Well done! Your Clippy project is up and running!
image:
file: ../../assets/Clippy.webp
file: ../../assets/app-icon.png
actions:
- text: Quick Start
link: /guides/installation/
Expand Down
Binary file added public/apple.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/windows.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
dotenvy::dotenv()?;
#[cfg(debug_assertions)]
dotenvy::dotenv().ok();

#[cfg(target_os = "linux")]
{
Expand Down
34 changes: 32 additions & 2 deletions src-tauri/src/utils/providers/google_drive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,39 @@ pub struct GoogleDriveProviderImpl(GoogleDriveProvider);

impl GoogleDriveProviderImpl {
pub async fn new() -> Result<Self, CommandError> {
let config = get_app().config();

let (client_id, client_secret) = match (
std::env::var("TAURI_GOOGLE_CLIENT_ID"),
std::env::var("TAURI_GOOGLE_CLIENT_SECRET"),
) {
(Ok(id), Ok(secret)) => (id, secret),
_ => {
let plugins = config
.plugins
.0
.get("oauth")
.and_then(|o| o.get("google"))
.ok_or_else(|| CommandError::new("Missing Google OAuth configuration"))?;

(
plugins
.get("clientId")
.and_then(|v| v.as_str())
.ok_or_else(|| CommandError::new("Missing Google client ID"))?
.to_string(),
plugins
.get("clientSecret")
.and_then(|v| v.as_str())
.ok_or_else(|| CommandError::new("Missing Google client secret"))?
.to_string(),
)
}
};

let secret = yup_oauth2::ApplicationSecret {
client_id: std::env::var("GOOGLE_CLIENT_ID")?,
client_secret: std::env::var("GOOGLE_CLIENT_SECRET")?,
client_id,
client_secret,
auth_uri: "https://accounts.google.com/o/oauth2/auth".into(),
token_uri: "https://accounts.google.com/o/oauth2/token".into(),
..Default::default()
Expand Down
8 changes: 8 additions & 0 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,13 @@
]
}
}
},
"plugins": {
"oauth": {
"google": {
"clientId": "%TAURI_GOOGLE_CLIENT_ID%",
"clientSecret": "%TAURI_GOOGLE_CLIENT_SECRET%"
}
}
}
}

0 comments on commit 36e398b

Please sign in to comment.