From 65dce27deb6d8177ca0e4577ea08090e708ad457 Mon Sep 17 00:00:00 2001 From: RockBacon9922 <58570245+RockBacon9922@users.noreply.github.com> Date: Wed, 22 Jun 2022 17:28:21 +0000 Subject: [PATCH 01/14] Trying to build a script that works for my system --- setup.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 setup.sh diff --git a/setup.sh b/setup.sh new file mode 100755 index 000000000..f95abbc3c --- /dev/null +++ b/setup.sh @@ -0,0 +1,9 @@ +#!/bin/bash +sudo npm install -y -g npm@latest pnpm +sudo apt install -y cargo pnpm +DEBIAN_TAURI_DEPS="libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libappindicator3-dev librsvg2-dev" # Tauri dependencies +DEBIAN_FFMPEG_DEPS="libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavresample-dev libavutil-dev libswscale-dev libswresample-dev ffmpeg" # FFMPEG dependencies +DEBIAN_BINDGEN_DEPS="pkg-config clang" # Bindgen dependencies - it's used by a dependency of Spacedrive + +sudo apt-get -y update +sudo apt-get -y install ${SPACEDRIVE_CUSTOM_APT_FLAGS:-} $DEBIAN_TAURI_DEPS $DEBIAN_FFMPEG_DEPS $DEBIAN_BINDGEN_DEPS \ No newline at end of file From 036339f8171f5527c7679fa991901653b0e05a32 Mon Sep 17 00:00:00 2001 From: RockBacon9922 <58570245+RockBacon9922@users.noreply.github.com> Date: Wed, 22 Jun 2022 17:48:31 +0000 Subject: [PATCH 02/14] Changed name. and added cargo and pnpm i and prep --- setup.sh => ubuntu-setup.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) rename setup.sh => ubuntu-setup.sh (86%) diff --git a/setup.sh b/ubuntu-setup.sh similarity index 86% rename from setup.sh rename to ubuntu-setup.sh index f95abbc3c..f9396bbd0 100755 --- a/setup.sh +++ b/ubuntu-setup.sh @@ -6,4 +6,8 @@ DEBIAN_FFMPEG_DEPS="libavcodec-dev libavdevice-dev libavfilter-dev libavformat-d DEBIAN_BINDGEN_DEPS="pkg-config clang" # Bindgen dependencies - it's used by a dependency of Spacedrive sudo apt-get -y update -sudo apt-get -y install ${SPACEDRIVE_CUSTOM_APT_FLAGS:-} $DEBIAN_TAURI_DEPS $DEBIAN_FFMPEG_DEPS $DEBIAN_BINDGEN_DEPS \ No newline at end of file +sudo apt-get -y install ${SPACEDRIVE_CUSTOM_APT_FLAGS:-} $DEBIAN_TAURI_DEPS $DEBIAN_FFMPEG_DEPS $DEBIAN_BINDGEN_DEPS + +pnpm i +cargo install tauri-cli +pnpm prep \ No newline at end of file From 9ab8b26e920f899d4bbc1e502d03bc84f52f440b Mon Sep 17 00:00:00 2001 From: RockBacon9922 <58570245+RockBacon9922@users.noreply.github.com> Date: Wed, 22 Jun 2022 18:30:05 +0000 Subject: [PATCH 03/14] updated scripts --- OSXsetup.sh | 9 +++++++++ ubuntu-setup.sh | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 OSXsetup.sh diff --git a/OSXsetup.sh b/OSXsetup.sh new file mode 100644 index 000000000..13782cea4 --- /dev/null +++ b/OSXsetup.sh @@ -0,0 +1,9 @@ +sudo npm install -y -g npm@latest pnpm +sudo apt install -y cargo pnpm + +# OS specific part +brew install ffmpeg + +pnpm i +cargo install tauri-cli +pnpm prep diff --git a/ubuntu-setup.sh b/ubuntu-setup.sh index f9396bbd0..99861081f 100755 --- a/ubuntu-setup.sh +++ b/ubuntu-setup.sh @@ -1,10 +1,10 @@ #!/bin/bash sudo npm install -y -g npm@latest pnpm sudo apt install -y cargo pnpm +# this is the distro specific part DEBIAN_TAURI_DEPS="libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libappindicator3-dev librsvg2-dev" # Tauri dependencies DEBIAN_FFMPEG_DEPS="libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavresample-dev libavutil-dev libswscale-dev libswresample-dev ffmpeg" # FFMPEG dependencies DEBIAN_BINDGEN_DEPS="pkg-config clang" # Bindgen dependencies - it's used by a dependency of Spacedrive - sudo apt-get -y update sudo apt-get -y install ${SPACEDRIVE_CUSTOM_APT_FLAGS:-} $DEBIAN_TAURI_DEPS $DEBIAN_FFMPEG_DEPS $DEBIAN_BINDGEN_DEPS From 072fc4187ec018a6a74d42209b36512dd77ae495 Mon Sep 17 00:00:00 2001 From: RockBacon9922 <58570245+RockBacon9922@users.noreply.github.com> Date: Wed, 22 Jun 2022 19:37:26 +0100 Subject: [PATCH 04/14] Fixed osx script --- OSXsetup.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) mode change 100644 => 100755 OSXsetup.sh diff --git a/OSXsetup.sh b/OSXsetup.sh old mode 100644 new mode 100755 index 13782cea4..39b639571 --- a/OSXsetup.sh +++ b/OSXsetup.sh @@ -1,8 +1,5 @@ -sudo npm install -y -g npm@latest pnpm -sudo apt install -y cargo pnpm - # OS specific part -brew install ffmpeg +brew install ffmpeg rust pnpm pnpm i cargo install tauri-cli From 2d6a8eb78405da8b12e0c149e715b98a7ba6c9b5 Mon Sep 17 00:00:00 2001 From: RockBacon9922 <58570245+RockBacon9922@users.noreply.github.com> Date: Thu, 7 Jul 2022 17:53:44 +0000 Subject: [PATCH 05/14] updated shell and added build-mac --- apps/desktop/package.json | 5 +++-- ubuntu-setup.sh | 11 ++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/apps/desktop/package.json b/apps/desktop/package.json index 7218ea08f..4aa8616c8 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -8,7 +8,8 @@ "vite": "vite", "dev": "tauri dev", "tauri": "tauri", - "build": "tauri build" + "build": "tauri build", + "build-mac": "tauri build --target aarch64-apple-darwin" }, "dependencies": { "@sd/client": "workspace:*", @@ -38,4 +39,4 @@ "vite-plugin-filter-replace": "^0.1.9", "vite-plugin-svgr": "^2.1.0" } -} +} \ No newline at end of file diff --git a/ubuntu-setup.sh b/ubuntu-setup.sh index 99861081f..220bd16cc 100755 --- a/ubuntu-setup.sh +++ b/ubuntu-setup.sh @@ -1,13 +1,18 @@ #!/bin/bash +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh +chmod +x rustup.sh +sudo ./rustup.sh -y +rm -f rustup.sh sudo npm install -y -g npm@latest pnpm -sudo apt install -y cargo pnpm # this is the distro specific part -DEBIAN_TAURI_DEPS="libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libappindicator3-dev librsvg2-dev" # Tauri dependencies +DEBIAN_TAURI_DEPS="libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libappindicator3-dev librsvg2-dev libdbus-1-dev libavutil-dev" # Tauri dependencies DEBIAN_FFMPEG_DEPS="libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavresample-dev libavutil-dev libswscale-dev libswresample-dev ffmpeg" # FFMPEG dependencies DEBIAN_BINDGEN_DEPS="pkg-config clang" # Bindgen dependencies - it's used by a dependency of Spacedrive sudo apt-get -y update sudo apt-get -y install ${SPACEDRIVE_CUSTOM_APT_FLAGS:-} $DEBIAN_TAURI_DEPS $DEBIAN_FFMPEG_DEPS $DEBIAN_BINDGEN_DEPS +while read -r env; do export "$env"; done +pnpm setup pnpm i -cargo install tauri-cli +cargo install -y tauri-cli pnpm prep \ No newline at end of file From 9b5f4625355044fdf9aa5433feefbee55b7db5cb Mon Sep 17 00:00:00 2001 From: RockBacon9922 <58570245+RockBacon9922@users.noreply.github.com> Date: Thu, 7 Jul 2022 20:57:21 +0100 Subject: [PATCH 06/14] update to osx setup --- OSXsetup.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/OSXsetup.sh b/OSXsetup.sh index 39b639571..daf234a0e 100755 --- a/OSXsetup.sh +++ b/OSXsetup.sh @@ -1,6 +1,12 @@ # OS specific part -brew install ffmpeg rust pnpm - +brew install ffmpeg pnpm +brew upgrade +brew cleanup +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh +chmod +x rustup.sh +sudo ./rustup.sh -y +rm -f rustup.sh +while read -r env; do export "$env"; done pnpm i cargo install tauri-cli pnpm prep From d254aeb500da1f2b1b31272d338f4f236dcf3271 Mon Sep 17 00:00:00 2001 From: RockBacon9922 <58570245+RockBacon9922@users.noreply.github.com> Date: Thu, 7 Jul 2022 21:07:08 +0100 Subject: [PATCH 07/14] removed shell scripts as they are specific for me. --- OSXsetup.sh | 12 ------------ ubuntu-setup.sh | 18 ------------------ 2 files changed, 30 deletions(-) delete mode 100755 OSXsetup.sh delete mode 100755 ubuntu-setup.sh diff --git a/OSXsetup.sh b/OSXsetup.sh deleted file mode 100755 index daf234a0e..000000000 --- a/OSXsetup.sh +++ /dev/null @@ -1,12 +0,0 @@ -# OS specific part -brew install ffmpeg pnpm -brew upgrade -brew cleanup -curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh -chmod +x rustup.sh -sudo ./rustup.sh -y -rm -f rustup.sh -while read -r env; do export "$env"; done -pnpm i -cargo install tauri-cli -pnpm prep diff --git a/ubuntu-setup.sh b/ubuntu-setup.sh deleted file mode 100755 index 220bd16cc..000000000 --- a/ubuntu-setup.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh -chmod +x rustup.sh -sudo ./rustup.sh -y -rm -f rustup.sh -sudo npm install -y -g npm@latest pnpm -# this is the distro specific part -DEBIAN_TAURI_DEPS="libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libappindicator3-dev librsvg2-dev libdbus-1-dev libavutil-dev" # Tauri dependencies -DEBIAN_FFMPEG_DEPS="libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavresample-dev libavutil-dev libswscale-dev libswresample-dev ffmpeg" # FFMPEG dependencies -DEBIAN_BINDGEN_DEPS="pkg-config clang" # Bindgen dependencies - it's used by a dependency of Spacedrive -sudo apt-get -y update -sudo apt-get -y install ${SPACEDRIVE_CUSTOM_APT_FLAGS:-} $DEBIAN_TAURI_DEPS $DEBIAN_FFMPEG_DEPS $DEBIAN_BINDGEN_DEPS -while read -r env; do export "$env"; done - -pnpm setup -pnpm i -cargo install -y tauri-cli -pnpm prep \ No newline at end of file From 35a4e8b42c924e929d3691ef322b5e35e1fcee9e Mon Sep 17 00:00:00 2001 From: RockBacon9922 <58570245+RockBacon9922@users.noreply.github.com> Date: Thu, 7 Jul 2022 21:45:05 +0100 Subject: [PATCH 08/14] Implemented super+k focus. hint hides onFocus --- .../src/components/layout/TopBar.tsx | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/packages/interface/src/components/layout/TopBar.tsx b/packages/interface/src/components/layout/TopBar.tsx index a451dc7f1..79160b4de 100644 --- a/packages/interface/src/components/layout/TopBar.tsx +++ b/packages/interface/src/components/layout/TopBar.tsx @@ -67,6 +67,18 @@ export const TopBar: React.FC = (props) => { }); let navigate = useNavigate(); + const [showSuperK, setShowSuperK] = React.useState(true); + + //create function to focus on search box when cmd+k is pressed + const searchRef: any = React.useRef(null); + React.useEffect(() => { + document.addEventListener('keydown', (e) => { + if (e.metaKey && e.key === 'k' && searchRef.current) { + searchRef.current.focus() + } + }) + },[]) + return ( <>
= (props) => {
{ + setShowSuperK(false); + }} + onBlur={() => { + setShowSuperK(true); + }} className="w-32 h-[30px] focus:w-52 text-sm p-3 rounded-lg outline-none focus:ring-2 placeholder-gray-400 dark:placeholder-gray-500 bg-[#F6F2F6] border border-gray-50 dark:bg-gray-650 dark:border-gray-550 focus:ring-gray-100 dark:focus:ring-gray-600 transition-all" /> -
+ {showSuperK &&
{/* */} -
+
}
From 098d7f7be1ba6b683c894b63b3ed503ae0ce1b31 Mon Sep 17 00:00:00 2001 From: RockBacon9922 <58570245+RockBacon9922@users.noreply.github.com> Date: Thu, 7 Jul 2022 21:48:56 +0100 Subject: [PATCH 09/14] revert changes --- apps/desktop/package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/desktop/package.json b/apps/desktop/package.json index 4aa8616c8..872fd5b3b 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -8,8 +8,7 @@ "vite": "vite", "dev": "tauri dev", "tauri": "tauri", - "build": "tauri build", - "build-mac": "tauri build --target aarch64-apple-darwin" + "build": "tauri build" }, "dependencies": { "@sd/client": "workspace:*", From 4baca470ef573be5dccaae86c036c319827a309e Mon Sep 17 00:00:00 2001 From: RockBacon9922 <58570245+RockBacon9922@users.noreply.github.com> Date: Thu, 7 Jul 2022 21:50:14 +0100 Subject: [PATCH 10/14] RevertChanges2 --- apps/desktop/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/desktop/package.json b/apps/desktop/package.json index 872fd5b3b..7218ea08f 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -38,4 +38,4 @@ "vite-plugin-filter-replace": "^0.1.9", "vite-plugin-svgr": "^2.1.0" } -} \ No newline at end of file +} From cbfa5b8da327f1416ad383503bae1a87a4873b8f Mon Sep 17 00:00:00 2001 From: RockBacon9922 <58570245+RockBacon9922@users.noreply.github.com> Date: Fri, 8 Jul 2022 09:38:44 +0100 Subject: [PATCH 11/14] added cleanup function --- packages/interface/src/components/layout/TopBar.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/interface/src/components/layout/TopBar.tsx b/packages/interface/src/components/layout/TopBar.tsx index 79160b4de..39a328aab 100644 --- a/packages/interface/src/components/layout/TopBar.tsx +++ b/packages/interface/src/components/layout/TopBar.tsx @@ -77,6 +77,14 @@ export const TopBar: React.FC = (props) => { searchRef.current.focus() } }) + return () => { + //remove event listener + document.removeEventListener('keydown', (e) => { + if (e.metaKey && e.key === 'k' && searchRef.current) { + searchRef.current.focus() + } + }) + } },[]) return ( From 89110e57d0fb6af9d2ec47efb71e1c7a31edac1b Mon Sep 17 00:00:00 2001 From: RockBacon9922 <58570245+RockBacon9922@users.noreply.github.com> Date: Fri, 8 Jul 2022 14:00:59 +0100 Subject: [PATCH 12/14] Changed conditional render to tailwind peer class --- packages/interface/src/components/layout/TopBar.tsx | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/packages/interface/src/components/layout/TopBar.tsx b/packages/interface/src/components/layout/TopBar.tsx index 39a328aab..bfbaadf50 100644 --- a/packages/interface/src/components/layout/TopBar.tsx +++ b/packages/interface/src/components/layout/TopBar.tsx @@ -67,7 +67,6 @@ export const TopBar: React.FC = (props) => { }); let navigate = useNavigate(); - const [showSuperK, setShowSuperK] = React.useState(true); //create function to focus on search box when cmd+k is pressed const searchRef: any = React.useRef(null); @@ -112,18 +111,12 @@ export const TopBar: React.FC = (props) => { { - setShowSuperK(false); - }} - onBlur={() => { - setShowSuperK(true); - }} - className="w-32 h-[30px] focus:w-52 text-sm p-3 rounded-lg outline-none focus:ring-2 placeholder-gray-400 dark:placeholder-gray-500 bg-[#F6F2F6] border border-gray-50 dark:bg-gray-650 dark:border-gray-550 focus:ring-gray-100 dark:focus:ring-gray-600 transition-all" + className="peer w-32 h-[30px] focus:w-52 text-sm p-3 rounded-lg outline-none focus:ring-2 placeholder-gray-400 dark:placeholder-gray-500 bg-[#F6F2F6] border border-gray-50 dark:bg-gray-650 dark:border-gray-550 focus:ring-gray-100 dark:focus:ring-gray-600 transition-all" /> - {showSuperK &&
+
{/* */} -
} +
From 9e11022d64bea023ec15e2fed27f8bb22a24ade8 Mon Sep 17 00:00:00 2001 From: RockBacon9922 <58570245+RockBacon9922@users.noreply.github.com> Date: Mon, 11 Jul 2022 12:40:32 +0100 Subject: [PATCH 13/14] Fixed type error --- packages/interface/src/components/layout/TopBar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/interface/src/components/layout/TopBar.tsx b/packages/interface/src/components/layout/TopBar.tsx index bfbaadf50..d3a97a41c 100644 --- a/packages/interface/src/components/layout/TopBar.tsx +++ b/packages/interface/src/components/layout/TopBar.tsx @@ -69,7 +69,7 @@ export const TopBar: React.FC = (props) => { let navigate = useNavigate(); //create function to focus on search box when cmd+k is pressed - const searchRef: any = React.useRef(null); + const searchRef = React.useRef(null); React.useEffect(() => { document.addEventListener('keydown', (e) => { if (e.metaKey && e.key === 'k' && searchRef.current) { From d35e68f1531aebb015acf92c7077c7c25fbee18a Mon Sep 17 00:00:00 2001 From: RockBacon9922 <58570245+RockBacon9922@users.noreply.github.com> Date: Fri, 15 Jul 2022 00:11:20 +0100 Subject: [PATCH 14/14] modified the key combos and the prompt. --- packages/interface/src/components/layout/TopBar.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/interface/src/components/layout/TopBar.tsx b/packages/interface/src/components/layout/TopBar.tsx index d3a97a41c..14162a604 100644 --- a/packages/interface/src/components/layout/TopBar.tsx +++ b/packages/interface/src/components/layout/TopBar.tsx @@ -72,14 +72,14 @@ export const TopBar: React.FC = (props) => { const searchRef = React.useRef(null); React.useEffect(() => { document.addEventListener('keydown', (e) => { - if (e.metaKey && e.key === 'k' && searchRef.current) { - searchRef.current.focus() + if (e.metaKey && e.key === 'l' && searchRef.current || e.key === '/' && searchRef.current) { + searchRef.current.focus(); } }) return () => { //remove event listener document.removeEventListener('keydown', (e) => { - if (e.metaKey && e.key === 'k' && searchRef.current) { + if (e.metaKey && e.key === 'l' && searchRef.current || e.key === '/' && searchRef.current) { searchRef.current.focus() } }) @@ -114,7 +114,7 @@ export const TopBar: React.FC = (props) => { className="peer w-32 h-[30px] focus:w-52 text-sm p-3 rounded-lg outline-none focus:ring-2 placeholder-gray-400 dark:placeholder-gray-500 bg-[#F6F2F6] border border-gray-50 dark:bg-gray-650 dark:border-gray-550 focus:ring-gray-100 dark:focus:ring-gray-600 transition-all" />
- + {/* */}