Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

Apply window effects

Ilya06e1d6721d4d
diff --git a/apps/desktop/src-tauri/capabilities/migrated.json b/apps/desktop/src-tauri/capabilities/migrated.json
index b55bbbbd8..cc1a43572 100644
--- a/apps/desktop/src-tauri/capabilities/migrated.json
+++ b/apps/desktop/src-tauri/capabilities/migrated.json
@@ -3,7 +3,8 @@
"description": "permissions that were migrated from v1",
"local": true,
"windows": [
- "main"
+ "main",
+ "camera"
],
"permissions": [
"core:default"
diff --git a/apps/desktop/src-tauri/src/main.rs b/apps/desktop/src-tauri/src/main.rs
index 2d47cb734..2dc9b9fa0 100644
--- a/apps/desktop/src-tauri/src/main.rs
+++ b/apps/desktop/src-tauri/src/main.rs
@@ -194,24 +194,6 @@ fn main() {
.setup(move |app| {
let handle = app.handle();
- // if let Some(options_window) = app.get_window("main") {
- // let _ = options_window.move_window(Position::Center);
- // #[cfg(target_os = "macos")]
- // apply_vibrancy(
- // &options_window,
- // NSVisualEffectMaterial::MediumLight,
- // None,
- // Some(16.0)
- // ).expect("Unsupported platform! 'apply_vibrancy' is only supported on macOS");
-
- // #[cfg(target_os = "windows")]
- // apply_blur(&options_window, Some((255, 255, 255, 128))).expect(
- // "Unsupported platform! 'apply_blur' is only supported on Windows"
- // );
-
- // set_shadow(&options_window, true).expect("Unsupported platform!");
- // }
-
let data_directory = handle
.path()
.app_data_dir()
diff --git a/apps/desktop/src-tauri/tauri.conf.json b/apps/desktop/src-tauri/tauri.conf.json
index 0b7d7db73..d5103004c 100644
--- a/apps/desktop/src-tauri/tauri.conf.json
+++ b/apps/desktop/src-tauri/tauri.conf.json
@@ -50,7 +50,11 @@
"transparent": true,
"decorations": false,
"alwaysOnTop": false,
- "center": true
+ "center": true,
+ "windowEffects": {
+ "effects": ["underWindowBackground", "mica"],
+ "radius": 16.0
+ }
}
],
"security": {
diff --git a/apps/desktop/src/app/page.tsx b/apps/desktop/src/app/page.tsx
index 245b7b0ba..bf9a9a9f2 100644
--- a/apps/desktop/src/app/page.tsx
+++ b/apps/desktop/src/app/page.tsx
@@ -9,7 +9,6 @@ import { LogoSpinner } from "@cap/ui";
import { getPermissions } from "@/utils/helpers";
import { initializeCameraWindow } from "@/utils/recording/utils";
import { getVersion } from "@tauri-apps/api/app";
-import { invoke } from "@tauri-apps/api/core";
import toast from "react-hot-toast";
import { authFetch } from "@/utils/auth/helpers";
import { commands } from "@/utils/commands";