diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index ac63d5a..d7967db 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -2273,6 +2273,12 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" +[[package]] +name = "minisign-verify" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "933dca44d65cdd53b355d0b73d380a2ff5da71f87f036053188bf1eab6a19881" + [[package]] name = "miniz_oxide" version = "0.7.1" @@ -3817,6 +3823,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd27c04b9543776a972c86ccf70660b517ecabbeced9fb58d8b961a13ad129af" dependencies = [ "anyhow", + "base64 0.21.7", "bytes", "cocoa 0.24.1", "dirs-next", @@ -3830,6 +3837,7 @@ dependencies = [ "heck 0.4.1", "http", "ignore", + "minisign-verify", "notify-rust", "objc", "once_cell", @@ -3857,12 +3865,14 @@ dependencies = [ "tauri-utils", "tempfile", "thiserror", + "time", "tokio", "url", "uuid", "webkit2gtk", "webview2-com", "windows 0.39.0", + "zip", ] [[package]] @@ -5387,6 +5397,17 @@ dependencies = [ "zvariant", ] +[[package]] +name = "zip" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" +dependencies = [ + "byteorder", + "crc32fast", + "crossbeam-utils", +] + [[package]] name = "zune-inflate" version = "0.2.54" diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index e47b735..76a6dc7 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -17,7 +17,7 @@ tauri-build = { version = "1.5", features = [] } [dependencies] serde_json = "1.0" serde = { version = "1.0", features = ["derive"] } -tauri = { version = "1.5", features = [ "system-tray", "macos-private-api", "api-all"] } +tauri = { version = "1.5", features = [ "updater", "system-tray", "macos-private-api", "api-all"] } window-vibrancy = "0.4.0" tauri-plugin-clipboard = "0.6.0" tauri-plugin-positioner = { version = "1.0.4", features = ["system-tray"] } diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 8338528..29433c6 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -8,7 +8,6 @@ use window_vibrancy::{apply_vibrancy, NSVisualEffectMaterial}; all(not(debug_assertions), target_os = "windows"), windows_subsystem = "windows" )] - #[tauri::command] fn on_button_clicked() -> String { let start = SystemTime::now(); @@ -60,6 +59,7 @@ fn main() { }) .setup(|app| { let window = app.get_window("main").unwrap(); + // #[cfg(target_os = "macos")] // { // use cocoa::appkit::{NSMainMenuWindowLevel, NSWindow, NSWindowCollectionBehavior}; @@ -67,7 +67,9 @@ fn main() { // let ns_win = window.ns_window().unwrap() as id; // unsafe { // ns_win.setLevel_(((NSMainMenuWindowLevel + 1) as u64).try_into().unwrap()); - // ns_win.setCollectionBehavior_(NSWindowCollectionBehavior::NSWindowCollectionBehaviorCanJoinAllSpaces); + // ns_win.setCollectionBehavior_( + // NSWindowCollectionBehavior::NSWindowCollectionBehaviorCanJoinAllSpaces, + // ); // // ns_win.setCollectionBehavior_(NSWindowCollectionBehavior::NSWindowCollectionBehaviorMoveToActiveSpace); // } // } diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 78a5e20..18a7166 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -18,6 +18,9 @@ "all": true, "writeText": true, "readText": true + }, + "globalShortcut": { + "all": true } }, "bundle": { diff --git a/src/components/TextCard.tsx b/src/components/TextCard.tsx index 9f1f371..206d110 100644 --- a/src/components/TextCard.tsx +++ b/src/components/TextCard.tsx @@ -27,12 +27,8 @@ export const ClipboardItem: React.FC = ({ clip }) => { } return ( -
-
diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 60af8a0..c301dbf 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -8,6 +8,7 @@ import { onTextUpdate, startListening, } from "tauri-plugin-clipboard-api" +import { exit } from '@tauri-apps/api/process'; import Empty from "@/components/Empty" import { SearchIcon } from "@/components/Icons" @@ -83,11 +84,12 @@ const Home: NextPage = () => { diff --git a/tailwind.config.js b/tailwind.config.js deleted file mode 100644 index aba3387..0000000 --- a/tailwind.config.js +++ /dev/null @@ -1,37 +0,0 @@ -/** @type {import('tailwindcss').Config} */ -module.exports = { - darkMode: ["class"], - content: [ - './pages/**/*.{ts,tsx}', - './components/**/*.{ts,tsx}', - './app/**/*.{ts,tsx}', - './src/**/*.{ts,tsx}', - ], - prefix: "", - theme: { - container: { - center: true, - padding: "2rem", - screens: { - "2xl": "1400px", - }, - }, - extend: { - keyframes: { - "accordion-down": { - from: { height: "0" }, - to: { height: "var(--radix-accordion-content-height)" }, - }, - "accordion-up": { - from: { height: "var(--radix-accordion-content-height)" }, - to: { height: "0" }, - }, - }, - animation: { - "accordion-down": "accordion-down 0.2s ease-out", - "accordion-up": "accordion-up 0.2s ease-out", - }, - }, - }, - plugins: [require("tailwindcss-animate")], -} \ No newline at end of file diff --git a/tailwind.config.ts b/tailwind.config.ts new file mode 100644 index 0000000..109fb1f --- /dev/null +++ b/tailwind.config.ts @@ -0,0 +1,86 @@ +import type { Config } from "tailwindcss" +const { fontFamily } = require('tailwindcss/defaultTheme') + + +const config = { + darkMode: ["class"], + content: [ + './pages/**/*.{ts,tsx}', + './components/**/*.{ts,tsx}', + './app/**/*.{ts,tsx}', + './src/**/*.{ts,tsx}', + ], + prefix: "", + theme: { + container: { + center: true, + padding: "2rem", + screens: { + "2xl": "1400px", + }, + }, + extend: { + fontFamily: { + scary: ['var(--font-scary)', ...fontFamily.sans], + heading: ['"Recursive"', ...fontFamily.sans] + }, + colors: { + border: "hsl(var(--border))", + input: "hsl(var(--input))", + ring: "hsl(var(--ring))", + background: "hsl(var(--background))", + foreground: "hsl(var(--foreground))", + primary: { + DEFAULT: "hsl(var(--primary))", + foreground: "hsl(var(--primary-foreground))", + }, + secondary: { + DEFAULT: "hsl(var(--secondary))", + foreground: "hsl(var(--secondary-foreground))", + }, + destructive: { + DEFAULT: "hsl(var(--destructive))", + foreground: "hsl(var(--destructive-foreground))", + }, + muted: { + DEFAULT: "hsl(var(--muted))", + foreground: "hsl(var(--muted-foreground))", + }, + accent: { + DEFAULT: "hsl(var(--accent))", + foreground: "hsl(var(--accent-foreground))", + }, + popover: { + DEFAULT: "hsl(var(--popover))", + foreground: "hsl(var(--popover-foreground))", + }, + card: { + DEFAULT: "hsl(var(--card))", + foreground: "hsl(var(--card-foreground))", + }, + }, + borderRadius: { + lg: "var(--radius)", + md: "calc(var(--radius) - 2px)", + sm: "calc(var(--radius) - 4px)", + }, + keyframes: { + "accordion-down": { + from: { height: "0" }, + to: { height: "var(--radix-accordion-content-height)" }, + }, + "accordion-up": { + from: { height: "var(--radix-accordion-content-height)" }, + to: { height: "0" }, + }, + }, + animation: { + "accordion-down": "accordion-down 0.2s ease-out", + "accordion-up": "accordion-up 0.2s ease-out", + }, + }, + }, + plugins: [require("tailwindcss-animate")], +} satisfies Config + +export default config \ No newline at end of file