diff --git a/.github/scripts/macOS.sh b/.github/scripts/macOS.sh new file mode 100755 index 0000000..0800a69 --- /dev/null +++ b/.github/scripts/macOS.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +if [ -f .env ]; then + export $(cat .env | grep -v '^#' | xargs) +fi + +set -e + +required_vars=("APPLE_CERTIFICATE" "APPLE_CERTIFICATE_PASSWORD" "APPLE_ID" "APPLE_ID_PASSWORD" "KEYCHAIN_PASSWORD" "APP_BUNDLE_ID") +for var in "${required_vars[@]}"; do + if [ -z "${!var}" ]; then + exit 1 + fi +done + +bun run tauri build + +rm -f certificate.p12 +echo "$APPLE_CERTIFICATE" | base64 --decode > certificate.p12 2>/dev/null +security import certificate.p12 -P "$APPLE_CERTIFICATE_PASSWORD" -A 2>/dev/null + +SIGNING_IDENTITY=$(security find-identity -v -p codesigning | grep "Apple Development" | head -1 | awk -F '"' '{print $2}') + +if [ -z "$SIGNING_IDENTITY" ]; then + exit 1 +fi + +codesign --force --options runtime --sign "$SIGNING_IDENTITY" src-tauri/target/release/bundle/macos/*.app 2>/dev/null + +rm -f certificate.p12 + +hdiutil create -volname "Qopy" -srcfolder src-tauri/target/release/bundle/dmg -ov -format UDZO Qopy.dmg + +codesign --force --sign "$APPLE_CERTIFICATE" Qopy.dmg 2>/dev/null + +xcrun notarytool submit Qopy.dmg --apple-id "$APPLE_ID" --password "$APPLE_ID_PASSWORD" --team-id "$APPLE_CERTIFICATE" --wait + +xcrun stapler staple Qopy.dmg + +exit 0 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4c23943..7e4cc80 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,14 +22,15 @@ jobs: build-macos: needs: prepare + runs-on: macos-latest + timeout-minutes: 30 strategy: matrix: include: - args: "--target aarch64-apple-darwin" - arch: "silicon" + arch: "arm64" - args: "--target x86_64-apple-darwin" - arch: "intel" - runs-on: macos-latest + arch: "x64" env: APPLE_ID: ${{ secrets.APPLE_ID }} APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} @@ -39,7 +40,7 @@ jobs: - name: Redact Sensitive Information run: | function redact_output { - sed -e "s/${{ secrets.REDACT_PATTERN }}/REDACTED/g" + sed -e "s/${{ secrets.APPLE_ID }}/REDACTED/g;s/${{ secrets.APPLE_ID_PASSWORD }}/REDACTED/g;s/${{ secrets.APPLE_CERTIFICATE }}/REDACTED/g;s/${{ secrets.APPLE_CERTIFICATE_PASSWORD }}/REDACTED/g;s/${{ secrets.KEYCHAIN_PASSWORD }}/REDACTED/g;s/${{ secrets.PAT }}/REDACTED/g;s/${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}/REDACTED/g" } exec > >(redact_output) 2>&1 - uses: actions/setup-node@v4 @@ -71,6 +72,7 @@ jobs: security create-keychain -p "$KEYCHAIN_PASSWORD" build.keychain security default-keychain -s build.keychain security unlock-keychain -p "$KEYCHAIN_PASSWORD" build.keychain + security set-keychain-settings -lut 7200 build.keychain security import certificate.p12 -k build.keychain -P "$APPLE_CERTIFICATE_PASSWORD" -T /usr/bin/codesign security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$KEYCHAIN_PASSWORD" build.keychain security find-identity -v -p codesigning build.keychain @@ -85,7 +87,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} - TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} + TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} APPLE_SIGNING_IDENTITY: ${{ env.CERT_ID }} with: @@ -94,24 +96,31 @@ jobs: if: failure() run: | echo "Attempting manual signing:" - codesign --force --options runtime --sign "$CERT_ID" --entitlements src-tauri/entitlements.plist src-tauri/target/aarch64-apple-darwin/release/bundle/macos/Qopy.app + timeout 300 codesign --force --options runtime --sign "$CERT_ID" --entitlements src-tauri/entitlements.plist src-tauri/target/${{ matrix.args == '--target aarch64-apple-darwin' && 'aarch64-apple-darwin' || 'x86_64-apple-darwin' }}/release/bundle/macos/Qopy.app echo "Verifying signature:" - codesign -dv --verbose=4 src-tauri/target/aarch64-apple-darwin/release/bundle/macos/Qopy.app | sed 's/.*Authority=.*/Authority=REDACTED/' + codesign -dv --verbose=4 "src-tauri/target/${{ matrix.args == '--target aarch64-apple-darwin' && 'aarch64-apple-darwin' || 'x86_64-apple-darwin' }}/release/bundle/macos/Qopy.app" | sed 's/.*Authority=.*/Authority=REDACTED/' + - name: Set architecture label + run: | + if [[ "${{ matrix.args }}" == "--target aarch64-apple-darwin" ]]; then + echo "ARCH_LABEL=aarch64-apple-darwin" >> $GITHUB_ENV + else + echo "ARCH_LABEL=x86_64-apple-darwin" >> $GITHUB_ENV + fi - name: Rename and Publish macOS Artifacts run: | - mv src-tauri/target/${{ matrix.args == '--target aarch64-apple-darwin' && 'aarch64-apple-darwin' || 'x86_64-apple-darwin' }}/release/bundle/dmg/*.dmg src-tauri/target/${{ matrix.args == '--target aarch64-apple-darwin' && 'aarch64-apple-darwin' || 'x86_64-apple-darwin' }}/release/bundle/dmg/Qopy-${{ needs.prepare.outputs.version }}_${{ matrix.arch }}.dmg - mv src-tauri/target/${{ matrix.args == '--target aarch64-apple-darwin' && 'aarch64-apple-darwin' || 'x86_64-apple-darwin' }}/release/bundle/macos/*.app.tar.gz src-tauri/target/${{ matrix.args == '--target aarch64-apple-darwin' && 'aarch64-apple-darwin' || 'x86_64-apple-darwin' }}/release/bundle/macos/Qopy-${{ needs.prepare.outputs.version }}_${{ matrix.arch }}.app.tar.gz - mv src-tauri/target/${{ matrix.args == '--target aarch64-apple-darwin' && 'aarch64-apple-darwin' || 'x86_64-apple-darwin' }}/release/bundle/macos/*.app.tar.gz.sig src-tauri/target/${{ matrix.args == '--target aarch64-apple-darwin' && 'aarch64-apple-darwin' || 'x86_64-apple-darwin' }}/release/bundle/macos/Qopy-${{ needs.prepare.outputs.version }}_${{ matrix.arch }}.app.tar.gz.sig + mv src-tauri/target/${{ env.ARCH_LABEL }}/release/bundle/dmg/*.dmg src-tauri/target/${{ env.ARCH_LABEL }}/release/bundle/dmg/Qopy-${{ needs.prepare.outputs.version }}_${{ matrix.arch }}.dmg + mv src-tauri/target/${{ env.ARCH_LABEL }}/release/bundle/macos/*.app.tar.gz src-tauri/target/${{ env.ARCH_LABEL }}/release/bundle/macos/Qopy-${{ needs.prepare.outputs.version }}_${{ matrix.arch }}.app.tar.gz + mv src-tauri/target/${{ env.ARCH_LABEL }}/release/bundle/macos/*.app.tar.gz.sig src-tauri/target/${{ env.ARCH_LABEL }}/release/bundle/macos/Qopy-${{ needs.prepare.outputs.version }}_${{ matrix.arch }}.app.tar.gz.sig - uses: actions/upload-artifact@v4 with: name: macos-dmg-${{ matrix.arch }} - path: src-tauri/target/${{ matrix.args == '--target aarch64-apple-darwin' && 'aarch64-apple-darwin' || 'x86_64-apple-darwin' }}/release/bundle/dmg/*.dmg + path: "src-tauri/target/${{ env.ARCH_LABEL }}/release/bundle/dmg/*.dmg" - uses: actions/upload-artifact@v4 with: name: updater-macos-${{ matrix.arch }} path: | - src-tauri/target/${{ matrix.args == '--target aarch64-apple-darwin' && 'aarch64-apple-darwin' || 'x86_64-apple-darwin' }}/release/bundle/macos/*.app.tar.gz - src-tauri/target/${{ matrix.args == '--target aarch64-apple-darwin' && 'aarch64-apple-darwin' || 'x86_64-apple-darwin' }}/release/bundle/macos/*.app.tar.gz.sig + src-tauri/target/${{ env.ARCH_LABEL }}/release/bundle/macos/*.app.tar.gz + src-tauri/target/${{ env.ARCH_LABEL }}/release/bundle/macos/*.app.tar.gz.sig build-windows: needs: prepare diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 21b6882..b3c8847 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -79,7 +79,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} - TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} + TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} with: args: ${{ matrix.args }} @@ -233,18 +233,41 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 + token: ${{ secrets.PAT }} + + - name: Check if release already exists + id: check_release + run: | + VERSION="${{ needs.prepare.outputs.version }}" + RELEASE_EXISTS=$(gh release view v$VERSION --json id --jq '.id' 2>/dev/null || echo "") + if [ -n "$RELEASE_EXISTS" ]; then + echo "SKIP_RELEASE=true" >> $GITHUB_ENV + else + echo "SKIP_RELEASE=false" >> $GITHUB_ENV + fi + env: + GITHUB_TOKEN: ${{ secrets.PAT }} - name: Download all artifacts + if: env.SKIP_RELEASE == 'false' uses: actions/download-artifact@v4 with: path: artifacts + - name: Update CHANGELOG + if: env.SKIP_RELEASE == 'false' + id: changelog + uses: requarks/changelog-action@v1 + with: + token: ${{ github.token }} + tag: ${{ github.ref_name }} + - name: Generate Release Body + if: env.SKIP_RELEASE == 'false' id: release_body run: | VERSION="${{ needs.prepare.outputs.version }}" - CHANGES=$(git log $(git describe --tags --abbrev=0)..HEAD --pretty=format:"- %s") - + # Calculate hashes with corrected paths WINDOWS_ARM_HASH=$(sha256sum "artifacts/windows-arm64-binaries/Qopy-${VERSION}_arm64.msi" | awk '{ print $1 }') WINDOWS_64_HASH=$(sha256sum "artifacts/windows-x64-binaries/Qopy-${VERSION}_x64.msi" | awk '{ print $1 }') @@ -265,10 +288,9 @@ jobs: echo "Red Hat: $REDHAT_HASH" RELEASE_BODY=$(cat <<-EOF - ## ♻️ Changelog - - $CHANGES - + + ${{ needs.create-release.outputs.changelog }} + ## ⬇️ Downloads - [Windows (x64)](https://github.com/${{ github.repository }}/releases/download/v${VERSION}/Qopy-${VERSION}_x64.msi) - ${WINDOWS_64_HASH} @@ -286,9 +308,10 @@ jobs: echo "EOF" >> $GITHUB_ENV - name: Create Release + if: env.SKIP_RELEASE == 'false' uses: softprops/action-gh-release@v2 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.PAT }} with: draft: true tag_name: v${{ needs.prepare.outputs.version }} diff --git a/.gitignore b/.gitignore index c000981..1e5c576 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ logs bun.lockb .gitignore .vscode +bun.lock \ No newline at end of file diff --git a/GET_STARTED.md b/GET_STARTED.md index dc761bf..a793041 100644 --- a/GET_STARTED.md +++ b/GET_STARTED.md @@ -1,6 +1,6 @@ # Get Started -The default hotkey for Qopy is Windows+V which is also the hotkey for the default clipboard manager to turn that off follow [this guide](https://github.com/0PandaDEV/Qopy/blob/main/GET_STARTED.md#disable-windowsv-for-default-clipboard-manager). +The default hotkey for Qopy is Windows+V which is also the hotkey for the default clipboard manager to turn that off follow [this guide](https://github.com/0PandaDEV/Qopy/blob/main/GET_STARTED.md#disable-windowsv-for-default-clipboard-manager). All the data of Qopy is stored inside of a SQLite database. @@ -8,11 +8,11 @@ All the data of Qopy is stored inside of a SQLite database. |------------------|-----------------------------------------------------------------| | Windows | `C:\Users\USERNAME\AppData\Roaming\net.pandadev.qopy` | | macOS | `/Users/USERNAME/Library/Application Support/net.pandadev.qopy` | -| Linux | `` | +| Linux | `/home/USERNAME/.local/share/net.pandadev.qopy` | ## Disable Windows+V for default clipboard manager -https://github.com/user-attachments/assets/723f9e07-3190-46ec-9bb7-15dfc112f620 + To disable the default clipboard manager popup from windows open Command prompt and run this command diff --git a/LICENSE b/LICENSE index f288702..0ad25db 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies @@ -7,17 +7,15 @@ Preamble - The GNU General Public License is a free, copyleft license for -software and other kinds of works. + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to +our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. +software for all its users. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you @@ -26,44 +24,34 @@ them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. The precise terms and conditions for copying, distribution and modification follow. @@ -72,7 +60,7 @@ modification follow. 0. Definitions. - "This License" refers to version 3 of the GNU General Public License. + "This License" refers to version 3 of the GNU Affero General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. @@ -549,35 +537,45 @@ to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. - 13. Use with the GNU Affero General Public License. + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single +under version 3 of the GNU General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General +Program specifies that a certain numbered version of the GNU Affero General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published +GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's +versions of the GNU Affero General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. @@ -635,40 +633,29 @@ the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Affero General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Affero General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see +For more information on this, and how to apply and follow the GNU AGPL, see . - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/README.md b/README.md index c13d915..9e4f2d2 100644 --- a/README.md +++ b/README.md @@ -5,31 +5,31 @@ The fixed and simple clipboard manager for both Windows and Linux. - + Windows (x64) • - + Windows (arm64)
- + Linux (deb) • - + Linux (rpm) • - + Linux (AppImage)
- + macOS (Silicon) • - + macOS (Intel)
@@ -46,10 +46,9 @@ The fixed and simple clipboard manager for both Windows and Linux.
Star History - + - - +
@@ -61,10 +60,10 @@ The fixed and simple clipboard manager for both Windows and Linux. Qopy is a fixed clipboard manager designed as a simple alternative to the standard clipboard on Windows. It aims to provide a faster, more reliable experience while providing an extensive set of features compared to its Windows counterpart. ## 🚧 Roadmap -- [ ] [Setup guide](https://github.com/0PandaDEV/Qopy/blob/main/GET_STARTED.md) +- [x] [Setup guide](https://github.com/0PandaDEV/Qopy/blob/main/GET_STARTED.md) - [ ] Sync Clipboard across devices https://github.com/0PandaDEV/Qopy/issues/8 -- [ ] Settings https://github.com/0PandaDEV/Qopy/issues/2 -- [ ] Metadata for copied items https://github.com/0PandaDEV/Qopy/issues/5 +- [x] Settings https://github.com/0PandaDEV/Qopy/issues/2 +- [x] Metadata for copied items https://github.com/0PandaDEV/Qopy/issues/5 - [ ] Code highlighting https://github.com/0PandaDEV/Qopy/issues/7 - [ ] Streamshare integration https://github.com/0PandaDEV/Qopy/issues/4 - [ ] Content type filter https://github.com/0PandaDEV/Qopy/issues/16 @@ -95,13 +94,13 @@ You can use GitHub Codespaces for online development: [![][codespaces-shield]][codespaces-link] -Or to get Qopy set up on your machine, you'll need to have Rust and pnpm installed. Then, follow these steps: +Or to get Qopy set up on your machine, you'll need to have Rust and bun installed. Then, follow these steps: ```zsh git clone https://github.com/0pandadev/Qopy.git cd Qopy -pnpm i -pnpm dev +bun i +bun dev ``` > \[!TIP] @@ -113,7 +112,7 @@ pnpm dev To build for production simply execute: ```zsh -pnpm build +bun build ``` > \[!NOTE] @@ -124,7 +123,7 @@ pnpm build ## 📝 License -Qopy is licensed under GPL-3. See the [LICENSE file](./LICENCE) for more information. +Qopy is licensed under AGPL-3. See the [LICENSE file](./LICENCE) for more information. [codespaces-link]: https://codespaces.new/0pandadev/Qopy [codespaces-shield]: https://github.com/codespaces/badge.svg diff --git a/README_ru.md b/README_ru.md new file mode 100644 index 0000000..e9f63ad --- /dev/null +++ b/README_ru.md @@ -0,0 +1,130 @@ +
+ + +

Qopy

+ +Простой и исправленный менеджер буфера обмена как для Windows, так и для Linux. + + + Windows (x64) + +• + + Windows (arm64) + +
+ + Linux (deb) + +• + + Linux (rpm) + +• + + Linux (AppImage) + +
+ + macOS (Silicon) + +• + + macOS (Intel) + +
+
+Тестовые версии можно найти тут + +
+ +[discord »](https://discord.gg/invite/Y7SbYphVw9) + +> \[!IMPORTANT] +> +> **Нажав на звезду**, Вы будете получать все уведомления от Github о новых версиях без задержек \~ ⭐️ + +
+ Star History + + + + + + +
+ +[![wakatime](https://wakatime.com/badge/user/018ce503-097f-4057-9599-db20b190920c/project/fe76359d-56c2-4a13-8413-55207b6ad298.svg?style=flat_square)](https://wakatime.com/badge/user/018ce503-097f-4057-9599-db20b190920c/project/fe76359d-56c2-4a13-8413-55207b6ad298) + +## 📋 Что такое Qopy + +Qopy представляет собой исправленный менеджер буфера обмена, разработанный как простая альтернатива стандартному буферу обмена в Windows. Его цель - обеспечить более быструю и надежную работу, предоставляя при этом обширный набор функций по сравнению со своим аналогом в Windows. + +## 🚧 Дорожная карта +- [ ] [Руководство по установке](https://github.com/0PandaDEV/Qopy/blob/main/GET_STARTED.md) +- [ ] Синхронизация буфера обмена между устройствами https://github.com/0PandaDEV/Qopy/issues/8 +- [ ] Настройки https://github.com/0PandaDEV/Qopy/issues/2 +- [x] Метаданные для скопированных элементов https://github.com/0PandaDEV/Qopy/issues/5 +- [ ] Выделение кода https://github.com/0PandaDEV/Qopy/issues/7 +- [ ] Интеграция Streamshare https://github.com/0PandaDEV/Qopy/issues/4 +- [ ] Фильтр типов контента https://github.com/0PandaDEV/Qopy/issues/16 +- [ ] Превью для скопированных файлов https://github.com/0PandaDEV/Qopy/issues/15 +- [ ] Конвертация файлов в другие форматы https://github.com/0PandaDEV/Qopy/issues/17 +- [x] Опция для пользовательской привязки клавиш https://github.com/0PandaDEV/Qopy/issues/3 +- [x] Поддержка macOS https://github.com/0PandaDEV/Qopy/issues/13 + +Если у вас есть идеи для функций, которые можно добавить в будущем, пожалуйста, напишите об этом [здесь](https://github.com/0pandadev/Qopy/issues). + +## 📦 Концепты + +Здесь вы можете увидеть несколько концепцов, которые могут быть не реализованы: + +![Clipboard](https://github.com/user-attachments/assets/45a44a13-6ebd-4f2d-84d2-55178e303a54) +![Settings](https://github.com/user-attachments/assets/bff5456a-f413-4e62-a43d-22c8e453aa87) + + +## ❤️ Пожертвования и Поддержка + +Qopy имеет открытый исходный код и бесплатен для использования. Я ценю пожертвования в поддержку постоянной разработки и улучшений. Ваши взносы являются добровольными и помогают мне улучшить приложение для всех. + + + +## ⌨️ Локальная разработка + +Вы можете использовать GitHub Codespaces для онлайн-разработки: + +[![][codespaces-shield]][codespaces-link] + +Или, чтобы настроить Qopy на вашем компьютере, вам необходимо установить Rust и bun. Затем выполните следующие действия: + +```zsh +git clone https://github.com/0pandadev/Qopy.git +cd Qopy +bun i +bun dev +``` + +> \[!Tip] +> +> Если вы заинтересованы во внесении кода, не стесняйтесь смотреть здесь [Issues](https://github.com/0pandadev/Qopy/issues). + +## 🔨 Сборка для продакшена + +Чтобы собрать для продакшена,просто выполните: + +```zsh +bun build +``` + +> \[!NOTE] +> +> Не волнуйтесь, в конце произойдет сбой, потому что он не сможет обнаружить Приватный ключ, но установочные файлы будут сгенерированы независимо от этого. +> +> Вы можете найти его в `src-tauri/target/release/bundle`. + +## 📝 Лицензия + +Qopy лицензирован под GPL-3. Смотрите [LICENSE file](./LICENCE) для дополнительной информации. + +[codespaces-link]: https://codespaces.new/0pandadev/Qopy +[codespaces-shield]: https://github.com/codespaces/badge.svg diff --git a/app.vue b/app.vue index ef6e0aa..6b9f531 100644 --- a/app.vue +++ b/app.vue @@ -1,77 +1,107 @@ \ No newline at end of file + diff --git a/assets/css/index.scss b/assets/css/index.scss deleted file mode 100644 index db473f6..0000000 --- a/assets/css/index.scss +++ /dev/null @@ -1,362 +0,0 @@ -$primary: #2e2d2b; -$accent: #feb453; -$divider: #ffffff0d; - -$text: #e5dfd5; -$text2: #ada9a1; -$mutedtext: #78756f; - -.bg { - width: 750px; - height: 474px; - background-color: $primary; - border: 1px solid $divider; - border-radius: 12px; - z-index: -1; - position: fixed; - outline: none; -} - -.search { - width: 100%; - position: fixed; - top: 0; - left: 0; - height: 54px; - background-color: transparent; - outline: none; - border: none; - font-size: 18px; - color: $text; - padding-inline: 16px; - border-bottom: 1px solid $divider; - font-family: SFRoundedMedium; -} - -.results { - position: absolute; - width: 284px; - top: 53px; - left: 0; - height: calc(100vh - 95px); - border-right: 1px solid $divider; - display: flex; - flex-direction: column; - padding-inline: 8px; - padding-bottom: 8px; - overflow-y: auto; - overflow-x: hidden; - - .result { - height: 40px; - font-size: 14px; - align-items: center; - display: flex; - padding: 10px; - padding-inline: 10px; - letter-spacing: 0.5px; - gap: 10px; - overflow: hidden; - text-overflow: clip; - white-space: nowrap; - } - - .result { - cursor: pointer; - - &.selected { - background-color: $divider; - } - } - - .time-separator { - font-size: 12px; - color: $text2; - font-family: SFRoundedSemiBold; - padding-left: 8px; - padding-bottom: 8px; - padding-top: 14px; - } - - .favicon { - width: 18px; - height: 18px; - } - - .image { - width: 18px; - height: 18px; - } - - .icon { - width: 18px; - height: 18px; - } -} - -.content { - position: absolute; - top: 53px; - left: 284px; - height: calc(100vh - 254px); - font-family: CommitMono Nerd Font !important; - font-size: 12px; - letter-spacing: 1; - border-radius: 10px; - width: calc(100vw - 286px); - white-space: pre-wrap; - word-wrap: break-word; - display: flex; - flex-direction: column; - align-items: center; - overflow: hidden; - - &:not(:has(.image)) { - padding: 8px; - } - - span { - font-family: CommitMono Nerd Font !important; - } - - .image { - width: 100%; - height: 100%; - object-fit: contain; - object-position: center; - } -} - -.bottom-bar { - height: 40px; - width: calc(100vw - 2px); - backdrop-filter: blur(18px); - background-color: hsla(40, 3%, 16%, 0.8); - position: fixed; - bottom: 1px; - left: 1px; - z-index: 100; - border-radius: 0 0 12px 12px; - display: flex; - flex-direction: row; - justify-content: space-between; - padding-inline: 12px; - padding-right: 6px; - padding-top: 1px; - align-items: center; - font-size: 14px; - border-top: 1px solid $divider; - - p { - color: $text2; - } - - .left { - display: flex; - align-items: center; - gap: 8px; - - .logo { - width: 18px; - height: 18px; - } - } - - .right { - display: flex; - align-items: center; - - .paste p { - color: $text; - } - - .actions div { - display: flex; - align-items: center; - gap: 2px; - } - - .divider { - width: 2px; - height: 12px; - background-color: $divider; - margin-left: 8px; - margin-right: 4px; - transition: all 0.2s; - } - - .paste, - .actions { - padding: 4px; - padding-left: 8px; - display: flex; - align-items: center; - gap: 8px; - border-radius: 7px; - background-color: transparent; - transition: all 0.2s; - cursor: pointer; - } - - .paste:hover, - .actions:hover { - background-color: $divider; - } - - &:hover .paste:hover ~ .divider, - &:hover .actions:hover ~ .divider { - opacity: 0; - } - } -} - -.information { - position: absolute; - display: flex; - flex-direction: column; - gap: 14px; - bottom: 40px; - left: 284px; - height: 160px; - width: calc(100vw - 286px); - border-top: 1px solid $divider; - background-color: $primary; - padding: 14px; - - .title { - font-family: SFRoundedSemiBold; - font-size: 12px; - letter-spacing: 0.6px; - } - - .info-content { - display: flex; - gap: 0; - flex-direction: column; - - .info-row { - display: flex; - width: 100%; - font-size: 12px; - justify-content: space-between; - padding: 8px 0; - border-bottom: 1px solid $divider; - line-height: 1; - - &:last-child { - border-bottom: none; - padding-bottom: 0; - } - - &:first-child { - padding-top: 22px; - } - - p { - font-family: SFRoundedMedium; - color: $text2; - font-weight: 500; - flex-shrink: 0; - } - - span { - font-family: CommitMono; - color: $text; - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; - margin-left: 32px; - } - } - } -} - -.clothoid-corner { - clip-path: polygon( - 13.890123px 0px, - calc(100% - 13.890123px) 0px, - calc(100% - 12.723414px) 0.004211px, - calc(100% - 11.556933px) 0.025635px, - calc(100% - 10.391895px) 0.085062px, - calc(100% - 9.231074px) 0.199291px, - calc(100% - 8.079275px) 0.382298px, - calc(100% - 6.947448px) 0.662609px, - calc(100% - 5.844179px) 1.039291px, - calc(100% - 4.793324px) 1.542842px, - calc(100% - 3.811369px) 2.169728px, - calc(100% - 2.926417px) 2.926417px, - calc(100% - 2.169728px) 3.811369px, - calc(100% - 1.542842px) 4.793324px, - calc(100% - 1.039291px) 5.844179px, - calc(100% - 0.662609px) 6.947448px, - calc(100% - 0.382298px) 8.079275px, - calc(100% - 0.199291px) 9.231074px, - calc(100% - 0.085062px) 10.391895px, - calc(100% - 0.025635px) 11.556933px, - calc(100% - 0.004211px) 12.723414px, - 100% 13.890123px, - 100% calc(100% - 13.890123px), - calc(100% - 0.004211px) calc(100% - 12.723414px), - calc(100% - 0.025635px) calc(100% - 11.556933px), - calc(100% - 0.085062px) calc(100% - 10.391895px), - calc(100% - 0.199291px) calc(100% - 9.231074px), - calc(100% - 0.382298px) calc(100% - 8.079275px), - calc(100% - 0.662609px) calc(100% - 6.947448px), - calc(100% - 1.039291px) calc(100% - 5.844179px), - calc(100% - 1.542842px) calc(100% - 4.793324px), - calc(100% - 2.169728px) calc(100% - 3.811369px), - calc(100% - 2.926417px) calc(100% - 2.926417px), - calc(100% - 3.811369px) calc(100% - 2.169728px), - calc(100% - 4.793324px) calc(100% - 1.542842px), - calc(100% - 5.844179px) calc(100% - 1.039291px), - calc(100% - 6.947448px) calc(100% - 0.662609px), - calc(100% - 8.079275px) calc(100% - 0.382298px), - calc(100% - 9.231074px) calc(100% - 0.199291px), - calc(100% - 10.391895px) calc(100% - 0.085062px), - calc(100% - 11.556933px) calc(100% - 0.025635px), - calc(100% - 12.723414px) calc(100% - 0.004211px), - calc(100% - 13.890123px) 100%, - 13.890123px 100%, - 12.723414px calc(100% - 0.004211px), - 11.556933px calc(100% - 0.025635px), - 10.391895px calc(100% - 0.085062px), - 9.231074px calc(100% - 0.199291px), - 8.079275px calc(100% - 0.382298px), - 6.947448px calc(100% - 0.662609px), - 5.844179px calc(100% - 1.039291px), - 4.793324px calc(100% - 1.542842px), - 3.811369px calc(100% - 2.169728px), - 2.926417px calc(100% - 2.926417px), - 2.169728px calc(100% - 3.811369px), - 1.542842px calc(100% - 4.793324px), - 1.039291px calc(100% - 5.844179px), - 0.662609px calc(100% - 6.947448px), - 0.382298px calc(100% - 8.079275px), - 0.199291px calc(100% - 9.231074px), - 0.085062px calc(100% - 10.391895px), - 0.025635px calc(100% - 11.556933px), - 0.004211px calc(100% - 12.723414px), - 0px calc(100% - 13.890123px), - 0px 13.890123px, - 0.004211px 12.723414px, - 0.025635px 11.556933px, - 0.085062px 10.391895px, - 0.199291px 9.231074px, - 0.382298px 8.079275px, - 0.662609px 6.947448px, - 1.039291px 5.844179px, - 1.542842px 4.793324px, - 2.169728px 3.811369px, - 2.926417px 2.926417px, - 3.811369px 2.169728px, - 4.793324px 1.542842px, - 5.844179px 1.039291px, - 6.947448px 0.662609px, - 8.079275px 0.382298px, - 9.231074px 0.199291px, - 10.391895px 0.085062px, - 11.556933px 0.025635px, - 12.723414px 0.004211px, - 13.890123px 0px - ); -} diff --git a/assets/css/settings.scss b/assets/css/settings.scss deleted file mode 100644 index c3ad9d4..0000000 --- a/assets/css/settings.scss +++ /dev/null @@ -1,149 +0,0 @@ -$primary: #2E2D2B; -$accent: #FEB453; -$divider: #ffffff0d; - -$text: #E5DFD5; -$text2: #ADA9A1; -$mutedtext: #78756F; - -.bg { - width: 750px; - height: 474px; - background-color: $primary; - border: 1px solid $divider; - border-radius: 12px; - z-index: -1; - position: fixed; - outline: none; -} - -.back { - position: absolute; - top: 16px; - left: 16px; - display: flex; - gap: 8px; - align-items: center; - - img{ - background-color: $divider; - border-radius: 6px; - padding: 8px 6px; - } - - p { - color: $text2; - } -} - -.keybind-container { - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - height: 100vh; - gap: 6px; - - .title { - font-size: 20px; - font-weight: 800; - } - - .keybind-input { - padding: 6px; - border: 1px solid $divider; - color: $text2; - display: flex; - border-radius: 13px; - outline: none; - gap: 6px; - - .key { - color: $text2; - font-family: SFRoundedMedium; - background-color: $divider; - padding: 6px 8px; - border-radius: 8px; - } - } - - .keybind-input:focus { - border: 1px solid rgba(255, 255, 255, 0.2); - } -} - -.bottom-bar { - height: 40px; - width: calc(100vw - 2px); - backdrop-filter: blur(18px); - background-color: hsla(40, 3%, 16%, 0.8); - position: fixed; - bottom: 1px; - left: 1px; - z-index: 100; - border-radius: 0 0 12px 12px; - display: flex; - flex-direction: row; - justify-content: space-between; - padding-inline: 12px; - padding-right: 6px; - padding-top: 1px; - align-items: center; - font-size: 14px; - border-top: 1px solid $divider; - - p { - color: $text2; - } - - .left { - display: flex; - align-items: center; - gap: 8px; - - .logo { - width: 18px; - height: 18px; - } - } - - .right { - display: flex; - align-items: center; - - .actions div { - display: flex; - align-items: center; - gap: 2px; - } - - .divider { - width: 2px; - height: 12px; - background-color: $divider; - margin-left: 8px; - margin-right: 4px; - transition: all .2s; - } - - .actions { - padding: 4px; - padding-left: 8px; - display: flex; - align-items: center; - gap: 8px; - border-radius: 7px; - background-color: transparent; - transition: all .2s; - cursor: pointer; - } - - .actions:hover { - background-color: $divider; - } - - &:hover .actions:hover~.divider { - opacity: 0; - } - } -} \ No newline at end of file diff --git a/components/BottomBar.vue b/components/BottomBar.vue new file mode 100644 index 0000000..2ec32ed --- /dev/null +++ b/components/BottomBar.vue @@ -0,0 +1,124 @@ + + + + + diff --git a/components/Icons/Cmd.vue b/components/Icons/Cmd.vue new file mode 100644 index 0000000..7b18f3e --- /dev/null +++ b/components/Icons/Cmd.vue @@ -0,0 +1,39 @@ + diff --git a/components/Icons/Code.vue b/components/Icons/Code.vue new file mode 100644 index 0000000..975d5c2 --- /dev/null +++ b/components/Icons/Code.vue @@ -0,0 +1,16 @@ + diff --git a/components/Icons/Ctrl.vue b/components/Icons/Ctrl.vue new file mode 100644 index 0000000..60163bd --- /dev/null +++ b/components/Icons/Ctrl.vue @@ -0,0 +1,32 @@ + diff --git a/components/Icons/Enter.vue b/components/Icons/Enter.vue new file mode 100644 index 0000000..e6e50a0 --- /dev/null +++ b/components/Icons/Enter.vue @@ -0,0 +1,41 @@ + diff --git a/components/Icons/File.vue b/components/Icons/File.vue new file mode 100644 index 0000000..1f64eba --- /dev/null +++ b/components/Icons/File.vue @@ -0,0 +1,16 @@ + diff --git a/components/Icons/Image.vue b/components/Icons/Image.vue new file mode 100644 index 0000000..ed67dbe --- /dev/null +++ b/components/Icons/Image.vue @@ -0,0 +1,15 @@ + diff --git a/components/Icons/K.vue b/components/Icons/K.vue new file mode 100644 index 0000000..8bdc675 --- /dev/null +++ b/components/Icons/K.vue @@ -0,0 +1,29 @@ + diff --git a/components/Icons/Link.vue b/components/Icons/Link.vue new file mode 100644 index 0000000..2036f60 --- /dev/null +++ b/components/Icons/Link.vue @@ -0,0 +1,15 @@ + diff --git a/components/Icons/Text.vue b/components/Icons/Text.vue new file mode 100644 index 0000000..3b9eb2d --- /dev/null +++ b/components/Icons/Text.vue @@ -0,0 +1,16 @@ + diff --git a/components/Noise.vue b/components/Noise.vue index 41bb879..9be572c 100644 --- a/components/Noise.vue +++ b/components/Noise.vue @@ -6,16 +6,18 @@ .noise { position: absolute; overflow: hidden; - top: 0; - left: 0; - width: 100vw; - height: 100vh; + top: 1px; + left: 1px; + width: calc(100vw - 2px); + height: calc(100vh - 2px); pointer-events: none; user-select: none; - z-index: 0; - background-image: url('/noise.png'); + background-image: url("/noise.webp"); background-repeat: repeat; image-rendering: pixelated; overflow: hidden; + mix-blend-mode: multiply; + opacity: .5; + border-radius: 12px; } - \ No newline at end of file + diff --git a/components/Result.vue b/components/Result.vue new file mode 100644 index 0000000..515f9f1 --- /dev/null +++ b/components/Result.vue @@ -0,0 +1,122 @@ + + + + + diff --git a/components/TopBar.vue b/components/TopBar.vue new file mode 100644 index 0000000..91924ec --- /dev/null +++ b/components/TopBar.vue @@ -0,0 +1,57 @@ + + + + + diff --git a/assets/fonts/CommitMono.woff2 b/fonts/CommitMono.woff2 similarity index 100% rename from assets/fonts/CommitMono.woff2 rename to fonts/CommitMono.woff2 diff --git a/assets/fonts/SFRoundedMedium.otf b/fonts/SFRoundedMedium.otf similarity index 100% rename from assets/fonts/SFRoundedMedium.otf rename to fonts/SFRoundedMedium.otf diff --git a/assets/fonts/SFRoundedRegular.otf b/fonts/SFRoundedRegular.otf similarity index 100% rename from assets/fonts/SFRoundedRegular.otf rename to fonts/SFRoundedRegular.otf diff --git a/assets/fonts/SFRoundedSemiBold.otf b/fonts/SFRoundedSemiBold.otf similarity index 100% rename from assets/fonts/SFRoundedSemiBold.otf rename to fonts/SFRoundedSemiBold.otf diff --git a/lib/selectedResult.ts b/lib/selectedResult.ts new file mode 100644 index 0000000..e53411b --- /dev/null +++ b/lib/selectedResult.ts @@ -0,0 +1,54 @@ +import type { HistoryItem } from '~/types/types' + +interface GroupedHistory { + label: string + items: HistoryItem[] +} + +export const selectedGroupIndex = ref(0) +export const selectedItemIndex = ref(0) +export const selectedElement = ref(null) + +export const useSelectedResult = (groupedHistory: Ref) => { + const selectedItem = computed(() => { + const group = groupedHistory.value[selectedGroupIndex.value] + return group?.items[selectedItemIndex.value] ?? null + }) + + const isSelected = (groupIndex: number, itemIndex: number): boolean => { + return selectedGroupIndex.value === groupIndex && selectedItemIndex.value === itemIndex + } + + const selectNext = (): void => { + const currentGroup = groupedHistory.value[selectedGroupIndex.value] + if (selectedItemIndex.value < currentGroup.items.length - 1) { + selectedItemIndex.value++ + } else if (selectedGroupIndex.value < groupedHistory.value.length - 1) { + selectedGroupIndex.value++ + selectedItemIndex.value = 0 + } + } + + const selectPrevious = (): void => { + if (selectedItemIndex.value > 0) { + selectedItemIndex.value-- + } else if (selectedGroupIndex.value > 0) { + selectedGroupIndex.value-- + selectedItemIndex.value = groupedHistory.value[selectedGroupIndex.value].items.length - 1 + } + } + + const selectItem = (groupIndex: number, itemIndex: number): void => { + selectedGroupIndex.value = groupIndex + selectedItemIndex.value = itemIndex + } + + return { + selectedItem, + isSelected, + selectNext, + selectPrevious, + selectItem, + selectedElement + } +} \ No newline at end of file diff --git a/nuxt.config.ts b/nuxt.config.ts index a401152..b10de45 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -3,7 +3,13 @@ export default defineNuxtConfig({ devtools: { enabled: false }, compatibilityDate: "2024-07-04", ssr: false, - modules: ["wrdu-keyboard"], + app: { + head: { + charset: "utf-8", + viewport: + "width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0", + }, + }, vite: { css: { preprocessorOptions: { diff --git a/package.json b/package.json index 5e1944c..2dbe25d 100644 --- a/package.json +++ b/package.json @@ -10,19 +10,19 @@ "postinstall": "nuxt prepare" }, "dependencies": { - "@tauri-apps/api": "2.1.1", - "@tauri-apps/cli": "2.1.0", + "@tauri-apps/api": "2.3.0", + "@tauri-apps/cli": "2.3.1", "@tauri-apps/plugin-autostart": "2.2.0", - "@tauri-apps/plugin-os": "2.2.0", - "nuxt": "3.14.1592", - "overlayscrollbars": "2.10.1", + "@tauri-apps/plugin-os": "2.2.1", + "nuxt": "3.16.0", + "overlayscrollbars": "2.11.1", "overlayscrollbars-vue": "0.5.9", - "sass-embedded": "1.83.0", - "uuid": "11.0.3", + "sass-embedded": "1.85.1", + "uuid": "11.1.0", "vue": "3.5.13", - "wrdu-keyboard": "1.1.1" + "wrdu-keyboard": "github:0PandaDEV/keyboard" }, "overrides": { "chokidar": "^3.6.0" } -} \ No newline at end of file +} diff --git a/pages/index.vue b/pages/index.vue index c902e9b..0accd10 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -1,150 +1,58 @@ diff --git a/pages/settings.vue b/pages/settings.vue index 6fd6417..f67a52b 100644 --- a/pages/settings.vue +++ b/pages/settings.vue @@ -1,113 +1,120 @@ diff --git a/plugins/history.ts b/plugins/history.ts index 934ded5..2bd84c2 100644 --- a/plugins/history.ts +++ b/plugins/history.ts @@ -14,17 +14,27 @@ export default defineNuxtPlugin(() => { }, async searchHistory(query: string): Promise { - return await invoke("search_history", { query }); + try { + return await invoke("search_history", { query }); + } catch (error) { + console.error("Error searching history:", error); + return []; + } }, async loadHistoryChunk( offset: number, limit: number ): Promise { - return await invoke("load_history_chunk", { - offset, - limit, - }); + try { + return await invoke("load_history_chunk", { + offset, + limit, + }); + } catch (error) { + console.error("Error loading history chunk:", error); + return []; + } }, async deleteHistoryItem(id: string): Promise { diff --git a/plugins/settings.ts b/plugins/settings.ts index 601efea..8e2fcf2 100644 --- a/plugins/settings.ts +++ b/plugins/settings.ts @@ -1,5 +1,4 @@ import { invoke } from "@tauri-apps/api/core"; -import type { Settings } from "~/types/types"; export default defineNuxtPlugin(() => { return { @@ -12,14 +11,6 @@ export default defineNuxtPlugin(() => { async saveSetting(key: string, value: string): Promise { await invoke("save_setting", { key, value }); }, - - async getKeybind(): Promise { - return await invoke("get_keybind"); - }, - - async saveKeybind(keybind: string[]): Promise { - await invoke("save_keybind", { keybind }); - }, }, }, }; diff --git a/public/cmd.svg b/public/cmd.svg deleted file mode 100644 index fc2ea77..0000000 --- a/public/cmd.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/ctrl.svg b/public/ctrl.svg deleted file mode 100644 index 91c0d68..0000000 --- a/public/ctrl.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/public/enter.svg b/public/enter.svg deleted file mode 100644 index 7ede06c..0000000 --- a/public/enter.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/public/icons/Code.svg b/public/icons/Code.svg deleted file mode 100644 index 5c34abf..0000000 --- a/public/icons/Code.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/public/icons/File.svg b/public/icons/File.svg deleted file mode 100644 index 8341a3c..0000000 --- a/public/icons/File.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/public/icons/Image.svg b/public/icons/Image.svg deleted file mode 100644 index c177239..0000000 --- a/public/icons/Image.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/public/icons/Link.svg b/public/icons/Link.svg deleted file mode 100644 index 64cc120..0000000 --- a/public/icons/Link.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/public/icons/Text.svg b/public/icons/Text.svg deleted file mode 100644 index 0ca21e8..0000000 --- a/public/icons/Text.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/public/k.svg b/public/k.svg deleted file mode 100644 index 64eb413..0000000 --- a/public/k.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/public/noise.png b/public/noise.png deleted file mode 100644 index 2a0223e..0000000 Binary files a/public/noise.png and /dev/null differ diff --git a/public/noise.webp b/public/noise.webp new file mode 100644 index 0000000..b0e8845 Binary files /dev/null and b/public/noise.webp differ diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index d24fd5b..add115b 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -2,20 +2,6 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "active-win-pos-rs" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e227f8493de9f5e493f8e762ac7516d2ae42464df2e8122fcafd604f0b16c634" -dependencies = [ - "appkit-nsworkspace-bindings", - "core-foundation 0.9.4", - "core-graphics 0.23.2", - "objc", - "windows 0.48.0", - "xcb", -] - [[package]] name = "addr2line" version = "0.22.0" @@ -31,18 +17,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[package]] -name = "ahash" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" -dependencies = [ - "cfg-if", - "once_cell", - "version_check", - "zerocopy", -] - [[package]] name = "aho-corasick" version = "1.1.3" @@ -100,28 +74,20 @@ version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" -[[package]] -name = "appkit-nsworkspace-bindings" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "062382938604cfa02c03689ab75af0e7eb79175ba0d0b2bcfad18f5190702dd7" -dependencies = [ - "bindgen", - "objc", -] - [[package]] name = "applications" -version = "0.2.3" -source = "git+https://github.com/HuakunShen/applications-rs?branch=dev#ac41b051f0ebeac96213c6c32621b098634219ac" +version = "0.3.0" +source = "git+https://github.com/HuakunShen/applications-rs?branch=fix/win-app-detection#ddcec7cdc3cc4f6678f1b1b525b3e509987b21ae" dependencies = [ "anyhow", "cocoa 0.25.0", "core-foundation 0.9.4", + "env_logger", "glob", "image", "ini", "lnk", + "log", "objc", "parselnk", "plist", @@ -132,14 +98,16 @@ dependencies = [ "tauri-icns", "thiserror 1.0.63", "walkdir", + "winapi", + "windows-icons", "winreg 0.52.0", ] [[package]] name = "arbitrary" -version = "1.3.2" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" dependencies = [ "derive_arbitrary", ] @@ -413,29 +381,6 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" -[[package]] -name = "bindgen" -version = "0.68.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "726e4313eb6ec35d2730258ad4e15b547ee75d6afaa1361a922e78e59b7d8078" -dependencies = [ - "bitflags 2.6.0", - "cexpr", - "clang-sys", - "lazy_static", - "lazycell", - "log", - "peeking_take_while", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "rustc-hash 1.1.0", - "shlex", - "syn 2.0.87", - "which", -] - [[package]] name = "bit-set" version = "0.5.3" @@ -465,9 +410,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.6.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36" dependencies = [ "serde", ] @@ -493,13 +438,41 @@ dependencies = [ "generic-array", ] +[[package]] +name = "block-sys" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae85a0696e7ea3b835a453750bf002770776609115e6d25c6d2ff28a8200f7e7" +dependencies = [ + "objc-sys", +] + +[[package]] +name = "block2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e58aa60e59d8dbfcc36138f5f18be5f24394d33b38b24f7fd0b1caa33095f22f" +dependencies = [ + "block-sys", + "objc2 0.5.2", +] + [[package]] name = "block2" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" dependencies = [ - "objc2", + "objc2 0.5.2", +] + +[[package]] +name = "block2" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d59b4c170e16f0405a2e95aff44432a0d41aa97675f3d52623effe95792a037" +dependencies = [ + "objc2 0.6.0", ] [[package]] @@ -592,7 +565,7 @@ version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "cairo-sys-rs", "glib", "libc", @@ -631,36 +604,37 @@ dependencies = [ [[package]] name = "cargo_metadata" -version = "0.18.1" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +checksum = "8769706aad5d996120af43197bf46ef6ad0fda35216b4505f926a365a232d924" dependencies = [ "camino", "cargo-platform", "semver", "serde", "serde_json", - "thiserror 1.0.63", + "thiserror 2.0.3", ] [[package]] name = "cargo_toml" -version = "0.17.2" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a969e13a7589e9e3e4207e153bae624ade2b5622fb4684a4923b23ec3d57719" +checksum = "5fbd1fe9db3ebf71b89060adaf7b0504c2d6a425cf061313099547e382c2e472" dependencies = [ "serde", - "toml 0.8.2", + "toml", ] [[package]] name = "cc" -version = "1.1.8" +version = "1.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "504bdec147f2cc13c8b57ed9401fd8a147cc66b67ad5cb241394244f2c947549" +checksum = "be714c154be609ec7f5dad223a33bf1482fff90472de28f7362806e6d4832b8c" dependencies = [ "jobserver", "libc", + "shlex", ] [[package]] @@ -669,15 +643,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] - [[package]] name = "cfb" version = "0.7.3" @@ -713,9 +678,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" -version = "0.4.39" +version = "0.4.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" +checksum = "1a7964611d71df112cb1730f2ee67324fcf4d0fc6606acbbe9bfe06df124637c" dependencies = [ "android-tzdata", "iana-time-zone", @@ -723,18 +688,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.6", -] - -[[package]] -name = "clang-sys" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" -dependencies = [ - "glob", - "libc", - "libloading 0.8.6", + "windows-link", ] [[package]] @@ -745,9 +699,9 @@ checksum = "bd61885ce9f906c60f40d384b132fed04685f51d3da3576d27b8e4f274b6100d" dependencies = [ "clipboard-win", "image", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "objc2 0.5.2", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", "x11rb", ] @@ -784,7 +738,7 @@ checksum = "f6140449f97a6e97f9511815c5632d84c8aacf8ac271ad77c559218161a1373c" dependencies = [ "bitflags 1.3.2", "block", - "cocoa-foundation 0.1.2", + "cocoa-foundation", "core-foundation 0.9.4", "core-graphics 0.23.2", "foreign-types 0.5.0", @@ -792,22 +746,6 @@ dependencies = [ "objc", ] -[[package]] -name = "cocoa" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f79398230a6e2c08f5c9760610eb6924b52aa9e7950a619602baba59dcbbdbb2" -dependencies = [ - "bitflags 2.6.0", - "block", - "cocoa-foundation 0.2.0", - "core-foundation 0.10.0", - "core-graphics 0.24.0", - "foreign-types 0.5.0", - "libc", - "objc", -] - [[package]] name = "cocoa-foundation" version = "0.1.2" @@ -822,20 +760,6 @@ dependencies = [ "objc", ] -[[package]] -name = "cocoa-foundation" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14045fb83be07b5acf1c0884b2180461635b433455fa35d1cd6f17f1450679d" -dependencies = [ - "bitflags 2.6.0", - "block", - "core-foundation 0.10.0", - "core-graphics-types 0.2.0", - "libc", - "objc", -] - [[package]] name = "color_quant" version = "1.1.0" @@ -974,7 +898,7 @@ version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa95a34622365fa5bbf40b20b75dba8dfa8c94c734aea8ac9a5ca38af14316f1" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "core-foundation 0.10.0", "core-graphics-types 0.2.0", "foreign-types 0.5.0", @@ -998,7 +922,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "core-foundation 0.10.0", "libc", ] @@ -1075,9 +999,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.20" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crunchy" @@ -1201,9 +1125,9 @@ dependencies = [ [[package]] name = "derive_arbitrary" -version = "1.3.2" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" +checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" dependencies = [ "proc-macro2", "quote", @@ -1246,11 +1170,11 @@ dependencies = [ [[package]] name = "dirs" -version = "5.0.1" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" dependencies = [ - "dirs-sys 0.4.1", + "dirs-sys 0.5.0", ] [[package]] @@ -1260,20 +1184,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" dependencies = [ "libc", - "redox_users", + "redox_users 0.4.5", "winapi", ] [[package]] name = "dirs-sys" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" dependencies = [ "libc", "option-ext", - "redox_users", - "windows-sys 0.48.0", + "redox_users 0.5.0", + "windows-sys 0.59.0", ] [[package]] @@ -1384,14 +1308,14 @@ dependencies = [ [[package]] name = "embed-resource" -version = "2.4.3" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4edcacde9351c33139a41e3c97eb2334351a81a2791bebb0b243df837128f602" +checksum = "7fbc6e0d8e0c03a655b53ca813f0463d2c956bc4db8138dbc89f120b066551e3" dependencies = [ "cc", "memchr", "rustc_version", - "toml 0.8.2", + "toml", "vswhom", "winreg 0.52.0", ] @@ -1438,6 +1362,19 @@ dependencies = [ "syn 2.0.87", ] +[[package]] +name = "env_logger" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" +dependencies = [ + "humantime", + "is-terminal", + "log", + "regex", + "termcolor", +] + [[package]] name = "equivalent" version = "1.0.1" @@ -1582,6 +1519,12 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" + [[package]] name = "foreign-types" version = "0.3.2" @@ -1645,9 +1588,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -1660,9 +1603,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -1670,15 +1613,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -1698,9 +1641,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-lite" @@ -1717,9 +1660,9 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", @@ -1728,21 +1671,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -1886,9 +1829,9 @@ dependencies = [ [[package]] name = "gethostname" -version = "0.5.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc3655aa6818d65bc620d6911f05aa7b6aeb596291e1e9f79e52df85583d1e30" +checksum = "4fd4b8790c0792e3b11895efdf5f289ebe8b59107a6624f1cce68f24ff8c7035" dependencies = [ "rustix", "windows-targets 0.52.6", @@ -1916,6 +1859,18 @@ dependencies = [ "wasi 0.11.0+wasi-snapshot-preview1", ] +[[package]] +name = "getrandom" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.13.3+wasi-0.2.2", + "windows-targets 0.52.6", +] + [[package]] name = "gif" version = "0.13.1" @@ -1970,7 +1925,7 @@ version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "futures-channel", "futures-core", "futures-executor", @@ -1994,7 +1949,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc" dependencies = [ "heck 0.4.1", - "proc-macro-crate 2.0.2", + "proc-macro-crate 2.0.0", "proc-macro-error", "proc-macro2", "quote", @@ -2013,23 +1968,23 @@ dependencies = [ [[package]] name = "glob" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" [[package]] name = "global-hotkey" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b00d88f1be7bf4cd2e61623ce08e84be2dfa4eab458e5d632d3dab95f16c1f64" +checksum = "41fbb3a4e56c901ee66c190fdb3fa08344e6d09593cc6c61f8eb9add7144b271" dependencies = [ "crossbeam-channel", "keyboard-types", - "objc2", - "objc2-app-kit", + "objc2 0.6.0", + "objc2-app-kit 0.3.0", "once_cell", "serde", - "thiserror 1.0.63", + "thiserror 2.0.3", "windows-sys 0.59.0", "x11-dl", ] @@ -2137,18 +2092,25 @@ name = "hashbrown" version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" + +[[package]] +name = "hashbrown" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" dependencies = [ - "ahash", "allocator-api2", + "equivalent", + "foldhash", ] [[package]] name = "hashlink" -version = "0.9.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" +checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" dependencies = [ - "hashbrown 0.14.5", + "hashbrown 0.15.2", ] [[package]] @@ -2175,6 +2137,12 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" +[[package]] +name = "hermit-abi" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbd780fe5cc30f81464441920d82ac8740e2e46b29a6fad543ddd075229ce37e" + [[package]] name = "hex" version = "0.4.3" @@ -2262,6 +2230,12 @@ version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" +[[package]] +name = "humantime" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b112acc8b3adf4b107a8ec20977da0273a8c386765a3ec0229bd500a1443f9f" + [[package]] name = "hyper" version = "1.4.1" @@ -2318,9 +2292,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.7" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-channel", @@ -2331,7 +2305,6 @@ dependencies = [ "pin-project-lite", "socket2", "tokio", - "tower", "tower-service", "tracing", ] @@ -2361,14 +2334,24 @@ dependencies = [ [[package]] name = "ico" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3804960be0bb5e4edb1e1ad67afd321a9ecfd875c3e65c099468fd2717d7cae" +checksum = "cc50b891e4acf8fe0e71ef88ec43ad82ee07b3810ad09de10f1d01f072ed4b98" dependencies = [ "byteorder", "png", ] +[[package]] +name = "icrate" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fb69199826926eb864697bddd27f73d9fddcffc004f5733131e15b465e30642" +dependencies = [ + "block2 0.4.0", + "objc2 0.5.2", +] + [[package]] name = "icu_collections" version = "1.5.0" @@ -2596,9 +2579,9 @@ dependencies = [ [[package]] name = "infer" -version = "0.16.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc150e5ce2330295b8616ce0e3f53250e53af31759a9dbedad1621ba29151847" +checksum = "a588916bfdfd92e71cacef98a63d9b1f0d74d6599980d11894290e7ddefffcf7" dependencies = [ "cfb", ] @@ -2612,15 +2595,6 @@ dependencies = [ "configparser", ] -[[package]] -name = "instant" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" -dependencies = [ - "cfg-if", -] - [[package]] name = "interpolate_name" version = "0.2.4" @@ -2638,6 +2612,17 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +[[package]] +name = "is-terminal" +version = "0.4.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9" +dependencies = [ + "hermit-abi 0.5.0", + "libc", + "windows-sys 0.59.0", +] + [[package]] name = "itertools" version = "0.12.1" @@ -2649,9 +2634,9 @@ dependencies = [ [[package]] name = "itertools" -version = "0.13.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" dependencies = [ "either", ] @@ -2730,10 +2715,11 @@ checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0" [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -2765,7 +2751,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b750dcadc39a09dbadd74e118f6dd6598df77fa01df0cfcdc52c28dece74528a" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "serde", "unicode-segmentation", ] @@ -2792,12 +2778,6 @@ dependencies = [ "spin", ] -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - [[package]] name = "lebe" version = "0.5.2" @@ -2830,9 +2810,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.155" +version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "libfuzzer-sys" @@ -2862,7 +2842,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ "cfg-if", - "windows-targets 0.52.6", + "windows-targets 0.48.5", ] [[package]] @@ -2877,7 +2857,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "libc", "redox_syscall 0.5.3", ] @@ -2931,9 +2911,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.22" +version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e" [[package]] name = "loop9" @@ -3080,21 +3060,22 @@ dependencies = [ [[package]] name = "muda" -version = "0.15.1" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8123dfd4996055ac9b15a60ad263b44b01e539007523ad7a4a533a3d93b0591" +checksum = "4de14a9b5d569ca68d7c891d613b390cf5ab4f851c77aaa2f9e435555d3d9492" dependencies = [ "crossbeam-channel", "dpi", "gtk", "keyboard-types", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "objc2 0.6.0", + "objc2-app-kit 0.3.0", + "objc2-core-foundation", + "objc2-foundation 0.3.0", "once_cell", "png", "serde", - "thiserror 1.0.63", + "thiserror 2.0.3", "windows-sys 0.59.0", ] @@ -3121,7 +3102,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "jni-sys", "log", "ndk-sys", @@ -3157,7 +3138,7 @@ version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "cfg-if", "libc", "memoffset", @@ -3296,7 +3277,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ - "proc-macro-crate 2.0.2", + "proc-macro-crate 2.0.0", "proc-macro2", "quote", "syn 2.0.87", @@ -3316,9 +3297,6 @@ name = "objc-sys" version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" -dependencies = [ - "cc", -] [[package]] name = "objc2" @@ -3330,44 +3308,60 @@ dependencies = [ "objc2-encode", ] +[[package]] +name = "objc2" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3531f65190d9cff863b77a99857e74c314dd16bf56c538c4b57c7cbc3f3a6e59" +dependencies = [ + "objc2-encode", + "objc2-exception-helper", +] + [[package]] name = "objc2-app-kit" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" dependencies = [ - "bitflags 2.6.0", - "block2", + "bitflags 2.8.0", + "block2 0.5.1", "libc", - "objc2", - "objc2-core-data", - "objc2-core-image", - "objc2-foundation", - "objc2-quartz-core", + "objc2 0.5.2", + "objc2-core-data 0.2.2", + "objc2-core-image 0.2.2", + "objc2-foundation 0.2.2", + "objc2-quartz-core 0.2.2", +] + +[[package]] +name = "objc2-app-kit" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5906f93257178e2f7ae069efb89fbd6ee94f0592740b5f8a1512ca498814d0fb" +dependencies = [ + "bitflags 2.8.0", + "block2 0.6.0", + "libc", + "objc2 0.6.0", + "objc2-cloud-kit", + "objc2-core-data 0.3.0", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-core-image 0.3.0", + "objc2-foundation 0.3.0", + "objc2-quartz-core 0.3.0", ] [[package]] name = "objc2-cloud-kit" -version = "0.2.2" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" +checksum = "6c1948a9be5f469deadbd6bcb86ad7ff9e47b4f632380139722f7d9840c0d42c" dependencies = [ - "bitflags 2.6.0", - "block2", - "objc2", - "objc2-core-location", - "objc2-foundation", -] - -[[package]] -name = "objc2-contacts" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" -dependencies = [ - "block2", - "objc2", - "objc2-foundation", + "bitflags 2.8.0", + "objc2 0.6.0", + "objc2-foundation 0.3.0", ] [[package]] @@ -3376,10 +3370,43 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" dependencies = [ - "bitflags 2.6.0", - "block2", - "objc2", - "objc2-foundation", + "bitflags 2.8.0", + "block2 0.5.1", + "objc2 0.5.2", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-core-data" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f860f8e841f6d32f754836f51e6bc7777cd7e7053cf18528233f6811d3eceb4" +dependencies = [ + "bitflags 2.8.0", + "objc2 0.6.0", + "objc2-foundation 0.3.0", +] + +[[package]] +name = "objc2-core-foundation" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daeaf60f25471d26948a1c2f840e3f7d86f4109e3af4e8e4b5cd70c39690d925" +dependencies = [ + "bitflags 2.8.0", + "objc2 0.6.0", +] + +[[package]] +name = "objc2-core-graphics" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dca602628b65356b6513290a21a6405b4d4027b8b250f0b98dddbb28b7de02" +dependencies = [ + "bitflags 2.8.0", + "objc2 0.6.0", + "objc2-core-foundation", + "objc2-io-surface", ] [[package]] @@ -3388,29 +3415,36 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" dependencies = [ - "block2", - "objc2", - "objc2-foundation", + "block2 0.5.1", + "objc2 0.5.2", + "objc2-foundation 0.2.2", "objc2-metal", ] [[package]] -name = "objc2-core-location" -version = "0.2.2" +name = "objc2-core-image" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" +checksum = "6ffa6bea72bf42c78b0b34e89c0bafac877d5f80bf91e159a5d96ea7f693ca56" dependencies = [ - "block2", - "objc2", - "objc2-contacts", - "objc2-foundation", + "objc2 0.6.0", + "objc2-foundation 0.3.0", ] [[package]] name = "objc2-encode" -version = "4.0.3" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7891e71393cd1f227313c9379a26a584ff3d7e6e7159e988851f0934c993f0f8" +checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" + +[[package]] +name = "objc2-exception-helper" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7a1c5fbb72d7735b076bb47b578523aedc40f3c439bea6dfd595c089d79d98a" +dependencies = [ + "cc", +] [[package]] name = "objc2-foundation" @@ -3418,23 +3452,35 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" dependencies = [ - "bitflags 2.6.0", - "block2", + "bitflags 2.8.0", + "block2 0.5.1", "dispatch", "libc", - "objc2", + "objc2 0.5.2", ] [[package]] -name = "objc2-link-presentation" -version = "0.2.2" +name = "objc2-foundation" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" +checksum = "3a21c6c9014b82c39515db5b396f91645182611c97d24637cf56ac01e5f8d998" dependencies = [ - "block2", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "bitflags 2.8.0", + "block2 0.6.0", + "libc", + "objc2 0.6.0", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-io-surface" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "161a8b87e32610086e1a7a9e9ec39f84459db7b3a0881c1f16ca5a2605581c19" +dependencies = [ + "bitflags 2.8.0", + "objc2 0.6.0", + "objc2-core-foundation", ] [[package]] @@ -3443,10 +3489,22 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" dependencies = [ - "bitflags 2.6.0", - "block2", - "objc2", - "objc2-foundation", + "bitflags 2.8.0", + "block2 0.5.1", + "objc2 0.5.2", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-osa-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6788b04a18ea31e3dc3ab256b8546639e5bbae07c1a0dc4ea8615252bc6aee9a" +dependencies = [ + "bitflags 2.8.0", + "objc2 0.5.2", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", ] [[package]] @@ -3455,79 +3513,48 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" dependencies = [ - "bitflags 2.6.0", - "block2", - "objc2", - "objc2-foundation", + "bitflags 2.8.0", + "block2 0.5.1", + "objc2 0.5.2", + "objc2-foundation 0.2.2", "objc2-metal", ] [[package]] -name = "objc2-symbols" -version = "0.2.2" +name = "objc2-quartz-core" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc" +checksum = "6fb3794501bb1bee12f08dcad8c61f2a5875791ad1c6f47faa71a0f033f20071" dependencies = [ - "objc2", - "objc2-foundation", + "bitflags 2.8.0", + "objc2 0.6.0", + "objc2-foundation 0.3.0", ] [[package]] name = "objc2-ui-kit" -version = "0.2.2" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" +checksum = "777a571be14a42a3990d4ebedaeb8b54cd17377ec21b92e8200ac03797b3bee1" dependencies = [ - "bitflags 2.6.0", - "block2", - "objc2", - "objc2-cloud-kit", - "objc2-core-data", - "objc2-core-image", - "objc2-core-location", - "objc2-foundation", - "objc2-link-presentation", - "objc2-quartz-core", - "objc2-symbols", - "objc2-uniform-type-identifiers", - "objc2-user-notifications", -] - -[[package]] -name = "objc2-uniform-type-identifiers" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" -dependencies = [ - "block2", - "objc2", - "objc2-foundation", -] - -[[package]] -name = "objc2-user-notifications" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" -dependencies = [ - "bitflags 2.6.0", - "block2", - "objc2", - "objc2-core-location", - "objc2-foundation", + "bitflags 2.8.0", + "objc2 0.6.0", + "objc2-core-foundation", + "objc2-foundation 0.3.0", ] [[package]] name = "objc2-web-kit" -version = "0.2.2" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68bc69301064cebefc6c4c90ce9cba69225239e4b8ff99d445a2b5563797da65" +checksum = "b717127e4014b0f9f3e8bba3d3f2acec81f1bde01f656823036e823ed2c94dce" dependencies = [ - "bitflags 2.6.0", - "block2", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "bitflags 2.8.0", + "block2 0.6.0", + "objc2 0.6.0", + "objc2-app-kit 0.3.0", + "objc2-core-foundation", + "objc2-foundation 0.3.0", ] [[package]] @@ -3541,17 +3568,17 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "cde51589ab56b20a6f686b2c68f7a0bd6add753d697abf720d63f8db3ab7b1ad" [[package]] name = "openssl" -version = "0.10.66" +version = "0.10.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" +checksum = "5e14130c6a98cd258fdcb0fb6d744152343ff729cbfcb28c656a9d12b999fbcd" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "cfg-if", "foreign-types 0.3.2", "libc", @@ -3579,9 +3606,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.103" +version = "0.9.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" +checksum = "8bb61ea9811cc39e3c2069f40b8b8e2e70d8569b361f879786cc7ed48b777cdd" dependencies = [ "cc", "libc", @@ -3607,15 +3634,29 @@ dependencies = [ [[package]] name = "os_info" -version = "3.8.2" +version = "3.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae99c7fa6dd38c7cafe1ec085e804f8f555a2f8659b0dbe03f1f9963a9b51092" +checksum = "6e6520c8cc998c5741ee68ec1dc369fc47e5f0ea5320018ecf2a1ccd6328f48b" dependencies = [ "log", "serde", "windows-sys 0.52.0", ] +[[package]] +name = "osakit" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35366a452fce3f8947eb2f33226a133aaf0cacedef2af67ade348d58be7f85d0" +dependencies = [ + "icrate", + "objc2-foundation 0.2.2", + "objc2-osa-kit", + "serde", + "serde_json", + "thiserror 1.0.63", +] + [[package]] name = "pango" version = "0.18.3" @@ -3689,12 +3730,6 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - [[package]] name = "pem-rfc7468" version = "0.7.0" @@ -3844,26 +3879,6 @@ dependencies = [ "siphasher", ] -[[package]] -name = "pin-project" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.87", -] - [[package]] name = "pin-project-lite" version = "0.2.14" @@ -3967,7 +3982,7 @@ version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" dependencies = [ - "zerocopy", + "zerocopy 0.7.35", ] [[package]] @@ -3976,16 +3991,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" -[[package]] -name = "prettyplease" -version = "0.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" -dependencies = [ - "proc-macro2", - "syn 2.0.87", -] - [[package]] name = "proc-macro-crate" version = "1.3.1" @@ -3998,11 +4003,10 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "2.0.2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" +checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" dependencies = [ - "toml_datetime", "toml_edit 0.20.2", ] @@ -4075,19 +4079,20 @@ dependencies = [ [[package]] name = "qopy" -version = "0.3.1" +version = "0.4.0" dependencies = [ - "active-win-pos-rs", "applications", "base64 0.22.1", "chrono", + "glob", "global-hotkey", "image", "include_dir", "lazy_static", "log", "meta_fetcher", - "rand 0.8.5", + "parking_lot", + "rand 0.9.0", "rdev", "regex", "reqwest", @@ -4119,15 +4124,6 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" -[[package]] -name = "quick-xml" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956" -dependencies = [ - "memchr", -] - [[package]] name = "quick-xml" version = "0.32.0" @@ -4156,7 +4152,7 @@ dependencies = [ "pin-project-lite", "quinn-proto", "quinn-udp", - "rustc-hash 2.0.0", + "rustc-hash", "rustls", "socket2", "thiserror 1.0.63", @@ -4173,7 +4169,7 @@ dependencies = [ "bytes", "rand 0.8.5", "ring", - "rustc-hash 2.0.0", + "rustc-hash", "rustls", "slab", "thiserror 1.0.63", @@ -4228,6 +4224,17 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "rand" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.0", + "zerocopy 0.8.14", +] + [[package]] name = "rand_chacha" version = "0.2.2" @@ -4248,6 +4255,16 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.0", +] + [[package]] name = "rand_core" version = "0.5.1" @@ -4266,6 +4283,16 @@ dependencies = [ "getrandom 0.2.15", ] +[[package]] +name = "rand_core" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b08f3c9802962f7e1b25113931d94f43ed9725bebc59db9d0c3e9a23b67e15ff" +dependencies = [ + "getrandom 0.3.1", + "zerocopy 0.8.14", +] + [[package]] name = "rand_hc" version = "0.2.0" @@ -4391,7 +4418,7 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", ] [[package]] @@ -4405,6 +4432,17 @@ dependencies = [ "thiserror 1.0.63", ] +[[package]] +name = "redox_users" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd6f9d3d47bdd2ad6945c5015a226ec6155d0bcdfd8f7cd29f86b71f8de99d2b" +dependencies = [ + "getrandom 0.2.15", + "libredox", + "thiserror 2.0.3", +] + [[package]] name = "regex" version = "1.11.1" @@ -4442,9 +4480,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.12.9" +version = "0.12.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" +checksum = "989e327e510263980e231de548a33e63d34962d29ae61b467389a1a09627a254" dependencies = [ "base64 0.22.1", "bytes", @@ -4481,6 +4519,7 @@ dependencies = [ "tokio-native-tls", "tokio-rustls", "tokio-util", + "tower", "tower-service", "url", "wasm-bindgen", @@ -4498,15 +4537,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8af382a047821a08aa6bfc09ab0d80ff48d45d8726f7cd8e44891f7cb4a4278e" dependencies = [ "ashpd", - "block2", + "block2 0.5.1", "glib-sys", "gobject-sys", "gtk-sys", "js-sys", "log", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "objc2 0.5.2", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", "raw-window-handle", "wasm-bindgen", "wasm-bindgen-futures", @@ -4522,15 +4561,14 @@ checksum = "57397d16646700483b67d2dd6511d79318f9d057fdbd21a4066aeac8b41d310a" [[package]] name = "ring" -version = "0.17.8" +version = "0.17.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", "cfg-if", "getrandom 0.2.15", "libc", - "spin", "untrusted", "windows-sys 0.52.0", ] @@ -4561,12 +4599,6 @@ version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - [[package]] name = "rustc-hash" version = "2.0.0" @@ -4588,7 +4620,7 @@ version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "errno", "libc", "linux-raw-sys", @@ -4712,7 +4744,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "core-foundation 0.9.4", "core-foundation-sys 0.8.7", "libc", @@ -4771,9 +4803,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.216" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" dependencies = [ "serde_derive", ] @@ -4791,9 +4823,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.216" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", @@ -4813,9 +4845,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.134" +version = "1.0.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d00f4175c42ee48b15416f6193a959ba3a0d67fc699a0db9ad12df9f83991c7d" +checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" dependencies = [ "itoa 1.0.11", "memchr", @@ -5025,10 +5057,10 @@ dependencies = [ "foreign-types 0.5.0", "js-sys", "log", - "objc2", - "objc2-app-kit", - "objc2-foundation", - "objc2-quartz-core", + "objc2 0.5.2", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", + "objc2-quartz-core 0.2.2", "raw-window-handle", "redox_syscall 0.5.3", "wasm-bindgen", @@ -5081,21 +5113,11 @@ dependencies = [ "der", ] -[[package]] -name = "sqlformat" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f895e3734318cc55f1fe66258926c9b910c124d47520339efecbb6c59cec7c1f" -dependencies = [ - "nom", - "unicode_categories", -] - [[package]] name = "sqlx" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93334716a037193fac19df402f8571269c84a00852f6a7066b5d2616dcd64d3e" +checksum = "4410e73b3c0d8442c5f99b425d7a435b5ee0ae4167b3196771dd3f7a01be745f" dependencies = [ "sqlx-core", "sqlx-macros", @@ -5106,39 +5128,33 @@ dependencies = [ [[package]] name = "sqlx-core" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4d8060b456358185f7d50c55d9b5066ad956956fddec42ee2e8567134a8936e" +checksum = "6a007b6936676aa9ab40207cde35daab0a04b823be8ae004368c0793b96a61e0" dependencies = [ - "atoi", - "byteorder", "bytes", "chrono", "crc", "crossbeam-queue", "either", "event-listener", - "futures-channel", "futures-core", "futures-intrusive", "futures-io", "futures-util", - "hashbrown 0.14.5", + "hashbrown 0.15.2", "hashlink", - "hex", "indexmap 2.3.0", "log", "memchr", "native-tls", "once_cell", - "paste", "percent-encoding", "serde", "serde_json", "sha2", "smallvec", - "sqlformat", - "thiserror 1.0.63", + "thiserror 2.0.3", "time", "tokio", "tokio-stream", @@ -5148,9 +5164,9 @@ dependencies = [ [[package]] name = "sqlx-macros" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cac0692bcc9de3b073e8d747391827297e075c7710ff6276d9f7a1f3d58c6657" +checksum = "3112e2ad78643fef903618d78cf0aec1cb3134b019730edb039b69eaf531f310" dependencies = [ "proc-macro2", "quote", @@ -5161,9 +5177,9 @@ dependencies = [ [[package]] name = "sqlx-macros-core" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1804e8a7c7865599c9c79be146dc8a9fd8cc86935fa641d3ea58e5f0688abaa5" +checksum = "4e9f90acc5ab146a99bf5061a7eb4976b573f560bc898ef3bf8435448dd5e7ad" dependencies = [ "dotenvy", "either", @@ -5187,13 +5203,13 @@ dependencies = [ [[package]] name = "sqlx-mysql" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64bb4714269afa44aef2755150a0fc19d756fb580a67db8885608cf02f47d06a" +checksum = "4560278f0e00ce64938540546f59f590d60beee33fffbd3b9cd47851e5fff233" dependencies = [ "atoi", "base64 0.22.1", - "bitflags 2.6.0", + "bitflags 2.8.0", "byteorder", "bytes", "chrono", @@ -5223,7 +5239,7 @@ dependencies = [ "smallvec", "sqlx-core", "stringprep", - "thiserror 1.0.63", + "thiserror 2.0.3", "time", "tracing", "whoami", @@ -5231,13 +5247,13 @@ dependencies = [ [[package]] name = "sqlx-postgres" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fa91a732d854c5d7726349bb4bb879bb9478993ceb764247660aee25f67c2f8" +checksum = "c5b98a57f363ed6764d5b3a12bfedf62f07aa16e1856a7ddc2a0bb190a959613" dependencies = [ "atoi", "base64 0.22.1", - "bitflags 2.6.0", + "bitflags 2.8.0", "byteorder", "chrono", "crc", @@ -5245,7 +5261,6 @@ dependencies = [ "etcetera", "futures-channel", "futures-core", - "futures-io", "futures-util", "hex", "hkdf", @@ -5263,7 +5278,7 @@ dependencies = [ "smallvec", "sqlx-core", "stringprep", - "thiserror 1.0.63", + "thiserror 2.0.3", "time", "tracing", "whoami", @@ -5271,9 +5286,9 @@ dependencies = [ [[package]] name = "sqlx-sqlite" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5b2cf34a45953bfd3daaf3db0f7a7878ab9b7a6b91b422d24a7a9e4c857b680" +checksum = "f85ca71d3a5b24e64e1d08dd8fe36c6c95c339a896cc33068148906784620540" dependencies = [ "atoi", "chrono", @@ -5351,18 +5366,18 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "strum" -version = "0.26.3" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" +checksum = "f64def088c51c9510a8579e3c5d67c65349dcf755e5479ad3d010aa6454e2c32" dependencies = [ "strum_macros", ] [[package]] name = "strum_macros" -version = "0.26.4" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" +checksum = "c77a8c5abcaf0f9ce05d62342b7d298c346515365c36b673df4ebe3ced01fde8" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -5432,9 +5447,9 @@ dependencies = [ [[package]] name = "sys-locale" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e801cf239ecd6ccd71f03d270d67dd53d13e90aab208bf4b8fe4ad957ea949b0" +checksum = "8eab9a99a024a169fe8a903cf9d4a3b3601109bcc13bd9e3c6fff259138626c4" dependencies = [ "libc", ] @@ -5445,7 +5460,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "core-foundation 0.9.4", "system-configuration-sys", ] @@ -5469,18 +5484,17 @@ dependencies = [ "cfg-expr", "heck 0.5.0", "pkg-config", - "toml 0.8.2", + "toml", "version-compare", ] [[package]] name = "tao" -version = "0.30.8" +version = "0.32.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6682a07cf5bab0b8a2bd20d0a542917ab928b5edb75ebd4eda6b05cbaab872da" +checksum = "63c8b1020610b9138dd7b1e06cf259ae91aa05c30f3bd0d6b42a03997b92dec1" dependencies = [ - "bitflags 2.6.0", - "cocoa 0.26.0", + "bitflags 2.8.0", "core-foundation 0.10.0", "core-graphics 0.24.0", "crossbeam-channel", @@ -5490,7 +5504,6 @@ dependencies = [ "gdkwayland-sys", "gdkx11-sys", "gtk", - "instant", "jni", "lazy_static", "libc", @@ -5498,7 +5511,9 @@ dependencies = [ "ndk", "ndk-context", "ndk-sys", - "objc", + "objc2 0.6.0", + "objc2-app-kit 0.3.0", + "objc2-foundation 0.3.0", "once_cell", "parking_lot", "raw-window-handle", @@ -5506,8 +5521,8 @@ dependencies = [ "tao-macros", "unicode-segmentation", "url", - "windows 0.58.0", - "windows-core 0.58.0", + "windows 0.60.0", + "windows-core 0.60.1", "windows-version", "x11-dl", ] @@ -5542,13 +5557,13 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tauri" -version = "2.1.1" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e545de0a2dfe296fa67db208266cd397c5a55ae782da77973ef4c4fac90e9f2c" +checksum = "3be747b26bf28674977fac47bdf6963fd9c7578271c3fbeb25d8686de6596f35" dependencies = [ "anyhow", "bytes", - "dirs 5.0.1", + "dirs 6.0.0", "dunce", "embed_plist", "futures-util", @@ -5563,9 +5578,9 @@ dependencies = [ "log", "mime", "muda", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "objc2 0.6.0", + "objc2-app-kit 0.3.0", + "objc2-foundation 0.3.0", "percent-encoding", "plist", "raw-window-handle", @@ -5588,18 +5603,18 @@ dependencies = [ "webkit2gtk", "webview2-com", "window-vibrancy", - "windows 0.58.0", + "windows 0.60.0", ] [[package]] name = "tauri-build" -version = "2.0.3" +version = "2.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd2a4bcfaf5fb9f4be72520eefcb61ae565038f8ccba2a497d8c28f463b8c01" +checksum = "51a2e96f3c0baa0581656bb58e6fdd0f7c9c31eaf6721a0c08689d938fe85f2d" dependencies = [ "anyhow", "cargo_toml", - "dirs 5.0.1", + "dirs 6.0.0", "glob", "heck 0.5.0", "json-patch", @@ -5609,15 +5624,15 @@ dependencies = [ "serde_json", "tauri-utils", "tauri-winres", - "toml 0.8.2", + "toml", "walkdir", ] [[package]] name = "tauri-codegen" -version = "2.0.3" +version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf79faeecf301d3e969b1fae977039edb77a4c1f25cc0a961be298b54bff97cf" +checksum = "e357ec3daf8faad1029bc7109e7f5b308ceb63b6073d110d7388923a4cce5e55" dependencies = [ "base64 0.22.1", "brotli", @@ -5652,9 +5667,9 @@ dependencies = [ [[package]] name = "tauri-macros" -version = "2.0.3" +version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c52027c8c5afb83166dacddc092ee8fff50772f9646d461d8c33ee887e447a03" +checksum = "447ee4dd94690d77f1422f2b57e783c654ba75c535ad6f6e727887330804fff2" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -5666,9 +5681,9 @@ dependencies = [ [[package]] name = "tauri-plugin" -version = "2.0.1" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2e6660a409963e4d57b9bfab4addd141eeff41bd3a7fb14e13004a832cf7ef6" +checksum = "5841b9a0200e954ef7457f8d327091424328891e267a97b641dc246cc54d0dec" dependencies = [ "anyhow", "glob", @@ -5677,19 +5692,19 @@ dependencies = [ "serde", "serde_json", "tauri-utils", - "toml 0.8.2", + "toml", "walkdir", ] [[package]] name = "tauri-plugin-aptabase" version = "0.5.1" -source = "git+https://github.com/aptabase/tauri-plugin-aptabase?branch=v2#373abe1954bf20152082e506d36be07727259bb5" +source = "git+https://github.com/aptabase/tauri-plugin-aptabase?branch=v2#8085ab1e03707236bae8865fedc5114631bdbb2f" dependencies = [ "futures", "log", "os_info", - "rand 0.8.5", + "rand 0.9.0", "reqwest", "serde", "serde_json", @@ -5765,7 +5780,7 @@ dependencies = [ "tauri-plugin", "tauri-utils", "thiserror 2.0.3", - "toml 0.8.2", + "toml", "url", "uuid", ] @@ -5787,11 +5802,11 @@ dependencies = [ [[package]] name = "tauri-plugin-os" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dda2d571a9baf0664c1f2088db227e3072f9028602fafa885deade7547c3b738" +checksum = "424f19432397850c2ddd42aa58078630c15287bbce3866eb1d90e7dbee680637" dependencies = [ - "gethostname 0.5.0", + "gethostname 1.0.0", "log", "os_info", "serde", @@ -5805,12 +5820,12 @@ dependencies = [ [[package]] name = "tauri-plugin-prevent-default" -version = "1.0.1" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce34a821424cdb5c74b390ddc8f08774d836030c07ab8dd35bd180690ef1331e" +checksum = "68c872b8d017f6f10ff5d44ce315e28c8848a302a2eff0ed6768aa80214ea5d6" dependencies = [ - "bitflags 2.6.0", - "itertools 0.13.0", + "bitflags 2.8.0", + "itertools 0.14.0", "serde", "strum", "tauri", @@ -5839,17 +5854,19 @@ dependencies = [ [[package]] name = "tauri-plugin-updater" -version = "2.3.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7351014c140906bcfff59d96e04b1170c8f602557f40eb37f7de356d4e7067b" +checksum = "67cd78a6cbd1255e989e96eedec004e9e8949e6c6359b41f861279aba64ea306" dependencies = [ "base64 0.22.1", - "dirs 5.0.1", + "dirs 6.0.0", "flate2", "futures-util", "http", "infer", + "log", "minisign-verify", + "osakit", "percent-encoding", "reqwest", "semver", @@ -5869,9 +5886,9 @@ dependencies = [ [[package]] name = "tauri-runtime" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cce18d43f80d4aba3aa8a0c953bbe835f3d0f2370aca75e8dbb14bd4bab27958" +checksum = "e758a405ab39e25f4d1235c5f06fe563f44b01ee18bbe38ddec5356d4f581908" dependencies = [ "dpi", "gtk", @@ -5883,22 +5900,23 @@ dependencies = [ "tauri-utils", "thiserror 2.0.3", "url", - "windows 0.58.0", + "windows 0.60.0", ] [[package]] name = "tauri-runtime-wry" -version = "2.2.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f442a38863e10129ffe2cec7bd09c2dcf8a098a3a27801a476a304d5bb991d2" +checksum = "8b2beb90decade4c71e8b09c9e4a9245837a8a97693f945b77e32baf13f51fec" dependencies = [ "gtk", "http", "jni", "log", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "objc2 0.6.0", + "objc2-app-kit 0.3.0", + "objc2-foundation 0.3.0", + "once_cell", "percent-encoding", "raw-window-handle", "softbuffer", @@ -5908,15 +5926,15 @@ dependencies = [ "url", "webkit2gtk", "webview2-com", - "windows 0.58.0", + "windows 0.60.0", "wry", ] [[package]] name = "tauri-utils" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9271a88f99b4adea0dc71d0baca4505475a0bbd139fb135f62958721aaa8fe54" +checksum = "107a959dbd5ff53d89a98f6f2e3e987c611334141a43630caae1d80e79446dd6" dependencies = [ "brotli", "cargo_metadata", @@ -5942,7 +5960,7 @@ dependencies = [ "serde_with", "swift-rs", "thiserror 2.0.3", - "toml 0.8.2", + "toml", "url", "urlpattern", "uuid", @@ -5951,12 +5969,12 @@ dependencies = [ [[package]] name = "tauri-winres" -version = "0.1.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5993dc129e544393574288923d1ec447c857f3f644187f4fbf7d9a875fbfc4fb" +checksum = "56eaa45f707bedf34d19312c26d350bc0f3c59a47e58e8adbeecdc850d2c13a0" dependencies = [ "embed-resource", - "toml 0.7.8", + "toml", ] [[package]] @@ -5983,6 +6001,15 @@ dependencies = [ "utf-8", ] +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + [[package]] name = "texting_robots" version = "0.2.2" @@ -6058,9 +6085,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.37" +version = "0.3.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" +checksum = "dad298b01a40a23aac4580b67e3dbedb7cc8402f3592d7f49469de2ea4aecdd8" dependencies = [ "deranged", "itoa 1.0.11", @@ -6073,15 +6100,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" +checksum = "765c97a5b985b7c11d7bc27fa927dc4fe6af3a6dfb021d28deb60d3bf51e76ef" [[package]] name = "time-macros" -version = "0.2.19" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de" +checksum = "e8093bc3e81c3bc5f7879de09619d06c9a5a5e45ca44dfeeb7225bae38005c5c" dependencies = [ "num-conv", "time-core", @@ -6114,9 +6141,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.42.0" +version = "1.44.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551" +checksum = "f382da615b842244d4b8738c82ed1275e6c5dd90c459a30941cd07080b06c91a" dependencies = [ "backtrace", "bytes", @@ -6133,9 +6160,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", @@ -6189,33 +6216,21 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.8" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.19.15", -] - -[[package]] -name = "toml" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit 0.20.2", + "toml_edit 0.22.22", ] [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] @@ -6227,10 +6242,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ "indexmap 2.3.0", - "serde", - "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.5.40", ] [[package]] @@ -6238,24 +6251,35 @@ name = "toml_edit" version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +dependencies = [ + "indexmap 2.3.0", + "toml_datetime", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.22.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ "indexmap 2.3.0", "serde", "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.6.24", ] [[package]] name = "tower" -version = "0.4.13" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" dependencies = [ "futures-core", "futures-util", - "pin-project", "pin-project-lite", + "sync_wrapper", "tokio", "tower-layer", "tower-service", @@ -6263,15 +6287,15 @@ dependencies = [ [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -6307,22 +6331,23 @@ dependencies = [ [[package]] name = "tray-icon" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "533fc2d4105e0e3d96ce1c71f2d308c9fbbe2ef9c587cab63dd627ab5bde218f" +checksum = "d433764348e7084bad2c5ea22c96c71b61b17afe3a11645710f533bd72b6a2b5" dependencies = [ - "core-graphics 0.24.0", "crossbeam-channel", - "dirs 5.0.1", + "dirs 6.0.0", "libappindicator", "muda", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "objc2 0.6.0", + "objc2-app-kit 0.3.0", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation 0.3.0", "once_cell", "png", "serde", - "thiserror 1.0.63", + "thiserror 2.0.3", "windows-sys 0.59.0", ] @@ -6429,12 +6454,6 @@ version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" -[[package]] -name = "unicode_categories" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" - [[package]] name = "untrusted" version = "0.9.0" @@ -6501,11 +6520,11 @@ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" [[package]] name = "uuid" -version = "1.11.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" +checksum = "458f7a779bf54acc9f347480ac654f68407d3aab21269a6e3c9f922acd9e2da9" dependencies = [ - "getrandom 0.2.15", + "getrandom 0.3.1", "serde", ] @@ -6589,6 +6608,15 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasi" +version = "0.13.3+wasi-0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2" +dependencies = [ + "wit-bindgen-rt", +] + [[package]] name = "wasite" version = "0.1.0" @@ -6597,23 +6625,24 @@ checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", + "once_cell", + "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", "syn 2.0.87", @@ -6634,9 +6663,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -6644,9 +6673,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", @@ -6657,9 +6686,12 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] [[package]] name = "wasm-streams" @@ -6694,7 +6726,7 @@ version = "0.31.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3f45d1222915ef1fd2057220c1d9d9624b7654443ea35c3877f7a52bd0a5a2d" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "rustix", "wayland-backend", "wayland-scanner", @@ -6706,7 +6738,7 @@ version = "0.32.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b5755d77ae9040bb872a25026555ce4cb0ae75fd923e90d25fba07d81057de0" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "wayland-backend", "wayland-client", "wayland-scanner", @@ -6799,14 +6831,14 @@ dependencies = [ [[package]] name = "webview2-com" -version = "0.33.0" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f61ff3d9d0ee4efcb461b14eb3acfda2702d10dc329f339303fc3e57215ae2c" +checksum = "b0d606f600e5272b514dbb66539dd068211cc20155be8d3958201b4b5bd79ed3" dependencies = [ "webview2-com-macros", "webview2-com-sys", - "windows 0.58.0", - "windows-core 0.58.0", + "windows 0.60.0", + "windows-core 0.60.1", "windows-implement", "windows-interface", ] @@ -6824,13 +6856,13 @@ dependencies = [ [[package]] name = "webview2-com-sys" -version = "0.33.0" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3a3e2eeb58f82361c93f9777014668eb3d07e7d174ee4c819575a9208011886" +checksum = "bfb27fccd3c27f68e9a6af1bcf48c2d82534b8675b83608a4d81446d095a17ac" dependencies = [ - "thiserror 1.0.63", - "windows 0.58.0", - "windows-core 0.58.0", + "thiserror 2.0.3", + "windows 0.60.0", + "windows-core 0.60.1", ] [[package]] @@ -6839,18 +6871,6 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" -[[package]] -name = "which" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix", -] - [[package]] name = "whoami" version = "1.5.1" @@ -6900,13 +6920,14 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "window-vibrancy" -version = "0.5.2" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ea403deff7b51fff19e261330f71608ff2cdef5721d72b64180bb95be7c4150" +checksum = "d9bec5a31f3f9362f2258fd0e9c9dd61a9ca432e7306cc78c444258f0dce9a9c" dependencies = [ - "objc2", - "objc2-app-kit", - "objc2-foundation", + "objc2 0.6.0", + "objc2-app-kit 0.3.0", + "objc2-core-foundation", + "objc2-foundation 0.3.0", "raw-window-handle", "windows-sys 0.59.0", "windows-version", @@ -6914,21 +6935,34 @@ dependencies = [ [[package]] name = "windows" -version = "0.48.0" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +checksum = "7f919aee0a93304be7f62e8e5027811bbba96bcb1de84d6618be56e43f8a32a1" dependencies = [ - "windows-targets 0.48.5", + "windows-core 0.59.0", + "windows-targets 0.53.0", ] [[package]] name = "windows" -version = "0.58.0" +version = "0.60.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" +checksum = "ddf874e74c7a99773e62b1c671427abf01a425e77c3d3fb9fb1e4883ea934529" dependencies = [ - "windows-core 0.58.0", - "windows-targets 0.52.6", + "windows-collections", + "windows-core 0.60.1", + "windows-future", + "windows-link", + "windows-numerics", +] + +[[package]] +name = "windows-collections" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5467f79cc1ba3f52ebb2ed41dbb459b8e7db636cc3429458d9a852e15bc24dec" +dependencies = [ + "windows-core 0.60.1", ] [[package]] @@ -6942,22 +6976,58 @@ dependencies = [ [[package]] name = "windows-core" -version = "0.58.0" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" +checksum = "810ce18ed2112484b0d4e15d022e5f598113e220c53e373fb31e67e21670c1ce" dependencies = [ "windows-implement", "windows-interface", "windows-result", "windows-strings", - "windows-targets 0.52.6", + "windows-targets 0.53.0", +] + +[[package]] +name = "windows-core" +version = "0.60.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca21a92a9cae9bf4ccae5cf8368dce0837100ddf6e6d57936749e85f152f6247" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-future" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a787db4595e7eb80239b74ce8babfb1363d8e343ab072f2ffe901400c03349f0" +dependencies = [ + "windows-core 0.60.1", + "windows-link", +] + +[[package]] +name = "windows-icons" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42db1b1d99853c231d69b7fdc9782e90fa3004afed14a94c2eba79cac43b5f5a" +dependencies = [ + "base64 0.22.1", + "glob", + "image", + "winapi", + "windows 0.59.0", ] [[package]] name = "windows-implement" -version = "0.58.0" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" +checksum = "83577b051e2f49a058c308f17f273b570a6a758386fc291b5f6a934dd84e48c1" dependencies = [ "proc-macro2", "quote", @@ -6966,9 +7036,9 @@ dependencies = [ [[package]] name = "windows-interface" -version = "0.58.0" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" +checksum = "cb26fd936d991781ea39e87c3a27285081e3c0da5ca0fcbc02d368cc6f52ff01" dependencies = [ "proc-macro2", "quote", @@ -6976,33 +7046,48 @@ dependencies = [ ] [[package]] -name = "windows-registry" -version = "0.2.0" +name = "windows-link" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +checksum = "6dccfd733ce2b1753b03b6d3c65edf020262ea35e20ccdf3e288043e6dd620e3" + +[[package]] +name = "windows-numerics" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "005dea54e2f6499f2cee279b8f703b3cf3b5734a2d8d21867c8f44003182eeed" +dependencies = [ + "windows-core 0.60.1", + "windows-link", +] + +[[package]] +name = "windows-registry" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4286ad90ddb45071efd1a66dfa43eb02dd0dfbae1545ad6cc3c51cf34d7e8ba3" dependencies = [ "windows-result", "windows-strings", - "windows-targets 0.52.6", + "windows-targets 0.53.0", ] [[package]] name = "windows-result" -version = "0.2.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +checksum = "06374efe858fab7e4f881500e6e86ec8bc28f9462c47e5a9941a0142ad86b189" dependencies = [ - "windows-targets 0.52.6", + "windows-link", ] [[package]] name = "windows-strings" -version = "0.1.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +checksum = "87fa48cc5d406560701792be122a10132491cff9d0aeb23583cc2dcafc847319" dependencies = [ - "windows-result", - "windows-targets 0.52.6", + "windows-link", ] [[package]] @@ -7080,13 +7165,29 @@ dependencies = [ "windows_aarch64_gnullvm 0.52.6", "windows_aarch64_msvc 0.52.6", "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm", + "windows_i686_gnullvm 0.52.6", "windows_i686_msvc 0.52.6", "windows_x86_64_gnu 0.52.6", "windows_x86_64_gnullvm 0.52.6", "windows_x86_64_msvc 0.52.6", ] +[[package]] +name = "windows-targets" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1e4c7e8ceaaf9cb7d7507c974735728ab453b67ef8f18febdd7c11fe59dca8b" +dependencies = [ + "windows_aarch64_gnullvm 0.53.0", + "windows_aarch64_msvc 0.53.0", + "windows_i686_gnu 0.53.0", + "windows_i686_gnullvm 0.53.0", + "windows_i686_msvc 0.53.0", + "windows_x86_64_gnu 0.53.0", + "windows_x86_64_gnullvm 0.53.0", + "windows_x86_64_msvc 0.53.0", +] + [[package]] name = "windows-version" version = "0.1.1" @@ -7123,6 +7224,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -7141,6 +7248,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -7159,12 +7272,24 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -7183,6 +7308,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -7201,6 +7332,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -7219,6 +7356,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -7237,6 +7380,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" + [[package]] name = "winnow" version = "0.5.40" @@ -7246,6 +7395,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "winnow" +version = "0.6.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8d71a593cc5c42ad7876e2c1fda56f314f3754c084128833e64f1345ff8a03a" +dependencies = [ + "memchr", +] + [[package]] name = "winreg" version = "0.10.1" @@ -7265,6 +7423,15 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "wit-bindgen-rt" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" +dependencies = [ + "bitflags 2.8.0", +] + [[package]] name = "write16" version = "1.0.0" @@ -7279,12 +7446,12 @@ checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" [[package]] name = "wry" -version = "0.47.0" +version = "0.50.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "553ca1ce149982123962fac2506aa75b8b76288779a77e72b12fa2fc34938647" +checksum = "804a7d1613bd699beccaa60f3b3c679acee21cebba1945a693f5eab95c08d1fa" dependencies = [ "base64 0.22.1", - "block2", + "block2 0.6.0", "cookie", "crossbeam-channel", "dpi", @@ -7298,9 +7465,10 @@ dependencies = [ "kuchikiki", "libc", "ndk", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "objc2 0.6.0", + "objc2-app-kit 0.3.0", + "objc2-core-foundation", + "objc2-foundation 0.3.0", "objc2-ui-kit", "objc2-web-kit", "once_cell", @@ -7309,13 +7477,13 @@ dependencies = [ "sha2", "soup3", "tao-macros", - "thiserror 1.0.63", + "thiserror 2.0.3", "url", "webkit2gtk", "webkit2gtk-sys", "webview2-com", - "windows 0.58.0", - "windows-core 0.58.0", + "windows 0.60.0", + "windows-core 0.60.1", "windows-version", "x11-dl", ] @@ -7369,17 +7537,6 @@ dependencies = [ "rustix", ] -[[package]] -name = "xcb" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1e2f212bb1a92cd8caac8051b829a6582ede155ccb60b5d5908b81b100952be" -dependencies = [ - "bitflags 1.3.2", - "libc", - "quick-xml 0.30.0", -] - [[package]] name = "xdg-home" version = "1.2.0" @@ -7491,7 +7648,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ "byteorder", - "zerocopy-derive", + "zerocopy-derive 0.7.35", +] + +[[package]] +name = "zerocopy" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a367f292d93d4eab890745e75a778da40909cab4d6ff8173693812f79c4a2468" +dependencies = [ + "zerocopy-derive 0.8.14", ] [[package]] @@ -7505,6 +7671,17 @@ dependencies = [ "syn 2.0.87", ] +[[package]] +name = "zerocopy-derive" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3931cb58c62c13adec22e38686b559c86a30565e16ad6e8510a337cedc611e1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "zerofrom" version = "0.1.4" @@ -7556,9 +7733,9 @@ dependencies = [ [[package]] name = "zip" -version = "2.1.6" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40dd8c92efc296286ce1fbd16657c5dbefff44f1b4ca01cc5f517d8b7b3d3e2e" +checksum = "938cc23ac49778ac8340e366ddc422b2227ea176edb447e23fc0627608dddadd" dependencies = [ "arbitrary", "crc32fast", @@ -7566,7 +7743,7 @@ dependencies = [ "displaydoc", "indexmap 2.3.0", "memchr", - "thiserror 1.0.63", + "thiserror 2.0.3", ] [[package]] diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 6045afb..d8eddea 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,53 +1,58 @@ [package] name = "qopy" -version = "0.3.1" +version = "0.4.0" description = "Qopy" authors = ["pandadev"] edition = "2021" rust-version = "1.70" [build-dependencies] -tauri-build = { version = "2.0.3", features = [] } +tauri-build = { version = "2.0.6", features = [] } [dependencies] -tauri = { version = "2.1.1", features = [ +tauri = { version = "2.3.1", features = [ "macos-private-api", "tray-icon", - "image-png" + "image-png", ] } tauri-plugin-sql = { version = "2.2.0", features = ["sqlite"] } tauri-plugin-autostart = "2.2.0" -tauri-plugin-os = "2.2.0" -tauri-plugin-updater = "2.3.0" +tauri-plugin-os = "2.2.1" +tauri-plugin-updater = "2.6.0" tauri-plugin-dialog = "2.2.0" tauri-plugin-fs = "2.2.0" tauri-plugin-clipboard = "2.1.11" -tauri-plugin-prevent-default = "1.0.1" +tauri-plugin-prevent-default = "1.2.1" tauri-plugin-global-shortcut = "2.2.0" tauri-plugin-aptabase = { git = "https://github.com/aptabase/tauri-plugin-aptabase", branch = "v2" } -sqlx = { version = "0.8.2", features = ["runtime-tokio-native-tls", "sqlite", "chrono"] } -serde = { version = "1.0.216", features = ["derive"] } -tokio = { version = "1.42.0", features = ["full"] } -serde_json = "1.0.134" +sqlx = { version = "0.8.3", features = [ + "runtime-tokio-native-tls", + "sqlite", + "chrono", +] } +serde = { version = "1.0.219", features = ["derive"] } +tokio = { version = "1.44.1", features = ["full"] } +serde_json = "1.0.140" rdev = "0.5.3" -rand = "0.8.5" +rand = "0.9.0" base64 = "0.22.1" image = "0.25.5" -reqwest = { version = "0.12.9", features = ["json", "blocking"] } +reqwest = { version = "0.12.14", features = ["json", "blocking"] } url = "2.5.4" regex = "1.11.1" sha2 = "0.10.8" lazy_static = "1.5.0" -time = "0.3.37" -global-hotkey = "0.6.3" -chrono = { version = "0.4.39", features = ["serde"] } -log = { version = "0.4.22", features = ["std"] } -uuid = "1.11.0" -active-win-pos-rs = "0.8.4" +time = "0.3.39" +global-hotkey = "0.6.4" +chrono = { version = "0.4.40", features = ["serde"] } +log = { version = "0.4.26", features = ["std"] } +uuid = "1.16.0" include_dir = "0.7.4" # hyperpolyglot = { git = "https://github.com/0pandadev/hyperpolyglot" } -applications = { git = "https://github.com/HuakunShen/applications-rs", branch = "dev" } +applications = { git = "https://github.com/HuakunShen/applications-rs", branch = "fix/win-app-detection" } +glob = "0.3.2" meta_fetcher = "0.1.1" +parking_lot = "0.12.3" [features] custom-protocol = ["tauri/custom-protocol"] diff --git a/src-tauri/src/api/clipboard.rs b/src-tauri/src/api/clipboard.rs index 59ac7b1..f06881c 100644 --- a/src-tauri/src/api/clipboard.rs +++ b/src-tauri/src/api/clipboard.rs @@ -1,14 +1,14 @@ use tauri_plugin_aptabase::EventTracker; -use base64::{engine::general_purpose::STANDARD, Engine}; +use base64::{ engine::general_purpose::STANDARD, Engine }; // use hyperpolyglot; use lazy_static::lazy_static; -use rdev::{simulate, EventType, Key}; +use rdev::{ simulate, EventType, Key }; use regex::Regex; use sqlx::SqlitePool; use std::fs; -use std::sync::atomic::{AtomicBool, Ordering}; -use std::{thread, time::Duration}; -use tauri::{AppHandle, Emitter, Listener, Manager}; +use std::sync::atomic::{ AtomicBool, Ordering }; +use std::{ thread, time::Duration }; +use tauri::{ AppHandle, Emitter, Listener, Manager }; use tauri_plugin_clipboard::Clipboard; use tokio::runtime::Runtime as TokioRuntime; use url::Url; @@ -17,7 +17,7 @@ use uuid::Uuid; use crate::db; use crate::utils::commands::get_app_info; use crate::utils::favicon::fetch_favicon_as_base64; -use crate::utils::types::{ContentType, HistoryItem}; +use crate::utils::types::{ ContentType, HistoryItem }; lazy_static! { static ref IS_PROGRAMMATIC_PASTE: AtomicBool = AtomicBool::new(false); @@ -27,16 +27,16 @@ lazy_static! { pub async fn write_and_paste( app_handle: AppHandle, content: String, - content_type: String, + content_type: String ) -> Result<(), String> { let clipboard = app_handle.state::(); match content_type.as_str() { "text" => clipboard.write_text(content).map_err(|e| e.to_string())?, + "link" => clipboard.write_text(content).map_err(|e| e.to_string())?, + "color" => clipboard.write_text(content).map_err(|e| e.to_string())?, "image" => { - clipboard - .write_image_base64(content) - .map_err(|e| e.to_string())?; + clipboard.write_image_base64(content).map_err(|e| e.to_string())?; } "files" => { clipboard @@ -44,11 +44,13 @@ pub async fn write_and_paste( content .split(", ") .map(|file| file.to_string()) - .collect::>(), + .collect::>() ) .map_err(|e| e.to_string())?; } - _ => return Err("Unsupported content type".to_string()), + _ => { + return Err("Unsupported content type".to_string()); + } } IS_PROGRAMMATIC_PASTE.store(true, Ordering::SeqCst); @@ -65,7 +67,7 @@ pub async fn write_and_paste( EventType::KeyPress(modifier_key), EventType::KeyPress(Key::KeyV), EventType::KeyRelease(Key::KeyV), - EventType::KeyRelease(modifier_key), + EventType::KeyRelease(modifier_key) ]; for event in events { @@ -81,9 +83,12 @@ pub async fn write_and_paste( IS_PROGRAMMATIC_PASTE.store(false, Ordering::SeqCst); }); - let _ = app_handle.track_event("clipboard_paste", Some(serde_json::json!({ + let _ = app_handle.track_event( + "clipboard_paste", + Some(serde_json::json!({ "content_type": content_type - }))); + })) + ); Ok(()) } @@ -92,79 +97,92 @@ pub fn setup(app: &AppHandle) { let app_handle = app.clone(); let runtime = TokioRuntime::new().expect("Failed to create Tokio runtime"); - app_handle.clone().listen( - "plugin:clipboard://clipboard-monitor/update", - move |_event| { - let app_handle = app_handle.clone(); - runtime.block_on(async move { - if IS_PROGRAMMATIC_PASTE.load(Ordering::SeqCst) { - return; - } + app_handle.clone().listen("plugin:clipboard://clipboard-monitor/update", move |_event| { + let app_handle = app_handle.clone(); + runtime.block_on(async move { + if IS_PROGRAMMATIC_PASTE.load(Ordering::SeqCst) { + return; + } - let clipboard = app_handle.state::(); - let available_types = clipboard.available_types().unwrap(); + let clipboard = app_handle.state::(); + let available_types = clipboard.available_types().unwrap(); - let (app_name, app_icon) = get_app_info(); + let (app_name, app_icon) = get_app_info(); - match get_pool(&app_handle).await { - Ok(pool) => { - if available_types.image { - println!("Handling image change"); - if let Ok(image_data) = clipboard.read_image_base64() { - let file_path = save_image_to_file(&app_handle, &image_data) - .await - .map_err(|e| e.to_string()) - .unwrap_or_else(|e| e); + match get_pool(&app_handle).await { + Ok(pool) => { + if available_types.image { + println!("Handling image change"); + if let Ok(image_data) = clipboard.read_image_base64() { + let file_path = save_image_to_file(&app_handle, &image_data).await + .map_err(|e| e.to_string()) + .unwrap_or_else(|e| e); + let _ = db::history::add_history_item( + app_handle.clone(), + pool, + HistoryItem::new( + app_name, + ContentType::Image, + file_path, + None, + app_icon, + None + ) + ).await; + } + } else if available_types.files { + println!("Handling files change"); + if let Ok(files) = clipboard.read_files() { + for file in files { let _ = db::history::add_history_item( app_handle.clone(), - pool, - HistoryItem::new(app_name, ContentType::Image, file_path, None, app_icon, None) + pool.clone(), + HistoryItem::new( + app_name.clone(), + ContentType::File, + file, + None, + app_icon.clone(), + None + ) ).await; } - } else if available_types.files { - println!("Handling files change"); - if let Ok(files) = clipboard.read_files() { - for file in files { + } + } else if available_types.text { + println!("Handling text change"); + if let Ok(text) = clipboard.read_text() { + let text = text.to_string(); + let url_regex = Regex::new( + r"^https?://(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&//=]*)$" + ).unwrap(); + + if url_regex.is_match(&text) { + if let Ok(url) = Url::parse(&text) { + let favicon = match fetch_favicon_as_base64(url).await { + Ok(Some(f)) => Some(f), + _ => None, + }; + let _ = db::history::add_history_item( app_handle.clone(), - pool.clone(), + pool, HistoryItem::new( - app_name.clone(), - ContentType::File, - file, - None, - app_icon.clone(), + app_name, + ContentType::Link, + text, + favicon, + app_icon, None - ), + ) ).await; } - } - } else if available_types.text { - println!("Handling text change"); - if let Ok(text) = clipboard.read_text() { - let text = text.to_string(); - let url_regex = Regex::new(r"^https?://(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&//=]*)$").unwrap(); + } else { + if text.is_empty() { + return; + } - if url_regex.is_match(&text) { - if let Ok(url) = Url::parse(&text) { - let favicon = match fetch_favicon_as_base64(url).await { - Ok(Some(f)) => Some(f), - _ => None, - }; - - let _ = db::history::add_history_item( - app_handle.clone(), - pool, - HistoryItem::new(app_name, ContentType::Link, text, favicon, app_icon, None) - ).await; - } - } else { - if text.is_empty() { - return; - } - - // Temporarily disabled code detection - /*if let Some(detection) = hyperpolyglot::detect_from_text(&text) { + // Temporarily disabled code detection + /*if let Some(detection) = hyperpolyglot::detect_from_text(&text) { let language = match detection { hyperpolyglot::Detection::Heuristics(lang) => lang.to_string(), _ => detection.language().to_string(), @@ -175,43 +193,61 @@ pub fn setup(app: &AppHandle) { HistoryItem::new(app_name, ContentType::Code, text, None, app_icon, Some(language)) ).await; } else*/ if crate::utils::commands::detect_color(&text) { - let _ = db::history::add_history_item( - app_handle.clone(), - pool, - HistoryItem::new(app_name, ContentType::Color, text, None, app_icon, None) - ).await; - } else { - let _ = db::history::add_history_item( - app_handle.clone(), - pool, - HistoryItem::new(app_name, ContentType::Text, text.clone(), None, app_icon, None) - ).await; - } + let _ = db::history::add_history_item( + app_handle.clone(), + pool, + HistoryItem::new( + app_name, + ContentType::Color, + text, + None, + app_icon, + None + ) + ).await; + } else { + let _ = db::history::add_history_item( + app_handle.clone(), + pool, + HistoryItem::new( + app_name, + ContentType::Text, + text.clone(), + None, + app_icon, + None + ) + ).await; } } - } else { - println!("Unknown clipboard content type"); } - } - Err(e) => { - println!("Failed to get database pool: {}", e); + } else { + println!("Unknown clipboard content type"); } } + Err(e) => { + println!("Failed to get database pool: {}", e); + } + } - let _ = app_handle.emit("clipboard-content-updated", ()); - let _ = app_handle.track_event("clipboard_copied", Some(serde_json::json!({ + let _ = app_handle.emit("clipboard-content-updated", ()); + let _ = app_handle.track_event( + "clipboard_copied", + Some( + serde_json::json!({ "content_type": if available_types.image { "image" } else if available_types.files { "files" } else if available_types.text { "text" } else { "unknown" } - }))); - }); - }, - ); + }) + ) + ); + }); + }); } async fn get_pool( - app_handle: &AppHandle, + app_handle: &AppHandle ) -> Result, Box> { Ok(app_handle.state::()) } @@ -219,9 +255,7 @@ async fn get_pool( #[tauri::command] pub fn start_monitor(app_handle: AppHandle) -> Result<(), String> { let clipboard = app_handle.state::(); - clipboard - .start_monitor(app_handle.clone()) - .map_err(|e| e.to_string())?; + clipboard.start_monitor(app_handle.clone()).map_err(|e| e.to_string())?; app_handle .emit("plugin:clipboard://clipboard-monitor/status", true) .map_err(|e| e.to_string())?; @@ -230,7 +264,7 @@ pub fn start_monitor(app_handle: AppHandle) -> Result<(), String> { async fn save_image_to_file( app_handle: &AppHandle, - base64_data: &str, + base64_data: &str ) -> Result> { let app_data_dir = app_handle.path().app_data_dir().unwrap(); let images_dir = app_data_dir.join("images"); diff --git a/src-tauri/src/api/hotkeys.rs b/src-tauri/src/api/hotkeys.rs index 0470e24..6152ea0 100644 --- a/src-tauri/src/api/hotkeys.rs +++ b/src-tauri/src/api/hotkeys.rs @@ -1,128 +1,128 @@ -use tauri_plugin_aptabase::EventTracker; use crate::utils::commands::center_window_on_current_monitor; +use crate::utils::keys::KeyCode; use global_hotkey::{ - hotkey::{Code, HotKey, Modifiers}, - GlobalHotKeyEvent, GlobalHotKeyManager, HotKeyState, + hotkey::{ Code, HotKey, Modifiers }, + GlobalHotKeyEvent, + GlobalHotKeyManager, + HotKeyState, }; -use std::cell::RefCell; +use parking_lot::Mutex; use std::str::FromStr; -use tauri::{AppHandle, Listener, Manager}; +use std::sync::Arc; +use tauri::{ AppHandle, Manager, Listener }; +use tauri_plugin_aptabase::EventTracker; -thread_local! { - static HOTKEY_MANAGER: RefCell> = RefCell::new(None); +#[derive(Default)] +struct HotkeyState { + manager: Option, + registered_hotkey: Option, } -pub fn setup(app_handle: tauri::AppHandle) { - let app_handle_clone = app_handle.clone(); +unsafe impl Send for HotkeyState {} - let manager = GlobalHotKeyManager::new().expect("Failed to initialize hotkey manager"); - HOTKEY_MANAGER.with(|m| *m.borrow_mut() = Some(manager)); +pub fn setup(app_handle: tauri::AppHandle) { + let state = Arc::new(Mutex::new(HotkeyState::default())); + let manager = match GlobalHotKeyManager::new() { + Ok(manager) => manager, + Err(err) => { + eprintln!("Failed to initialize hotkey manager: {:?}", err); + return; + } + }; + + { + let mut hotkey_state = state.lock(); + hotkey_state.manager = Some(manager); + } let rt = app_handle.state::(); let initial_keybind = rt - .block_on(crate::db::settings::get_keybind(app_handle_clone.clone())) + .block_on(crate::db::settings::get_keybind(app_handle.clone())) .expect("Failed to get initial keybind"); - let initial_shortcut = initial_keybind.join("+"); - let initial_shortcut_for_update = initial_shortcut.clone(); - let initial_shortcut_for_save = initial_shortcut.clone(); - - if let Err(e) = register_shortcut(&initial_shortcut) { + if let Err(e) = register_shortcut(&state, &initial_keybind) { eprintln!("Error registering initial shortcut: {:?}", e); } + let state_clone = Arc::clone(&state); app_handle.listen("update-shortcut", move |event| { - let payload_str = event.payload().to_string(); - - if let Ok(old_hotkey) = parse_hotkey(&initial_shortcut_for_update) { - HOTKEY_MANAGER.with(|manager| { - if let Some(manager) = manager.borrow().as_ref() { - let _ = manager.unregister(old_hotkey); - } - }); - } - - if let Err(e) = register_shortcut(&payload_str) { + let payload_str = event.payload().replace("\\\"", "\""); + let trimmed_str = payload_str.trim_matches('"'); + unregister_current_hotkey(&state_clone); + + let payload: Vec = serde_json::from_str(trimmed_str).unwrap_or_default(); + if let Err(e) = register_shortcut(&state_clone, &payload) { eprintln!("Error re-registering shortcut: {:?}", e); } }); + let state_clone = Arc::clone(&state); app_handle.listen("save_keybind", move |event| { let payload_str = event.payload().to_string(); - - if let Ok(old_hotkey) = parse_hotkey(&initial_shortcut_for_save) { - HOTKEY_MANAGER.with(|manager| { - if let Some(manager) = manager.borrow().as_ref() { - let _ = manager.unregister(old_hotkey); - } - }); - } - - if let Err(e) = register_shortcut(&payload_str) { + unregister_current_hotkey(&state_clone); + + let payload: Vec = serde_json::from_str(&payload_str).unwrap_or_default(); + if let Err(e) = register_shortcut(&state_clone, &payload) { eprintln!("Error registering saved shortcut: {:?}", e); } }); - let app_handle_for_hotkey = app_handle.clone(); - tauri::async_runtime::spawn(async move { + setup_hotkey_receiver(app_handle); +} + +fn setup_hotkey_receiver(app_handle: AppHandle) { + std::thread::spawn(move || { loop { match GlobalHotKeyEvent::receiver().recv() { Ok(event) => { if event.state == HotKeyState::Released { continue; } - handle_hotkey_event(&app_handle_for_hotkey); - } - Err(e) => { - eprintln!("Error receiving hotkey event: {:?}", e); + handle_hotkey_event(&app_handle); } + Err(e) => eprintln!("Error receiving hotkey event: {:?}", e), } } }); } -fn register_shortcut(shortcut: &str) -> Result<(), Box> { - let hotkey = parse_hotkey(shortcut)?; - HOTKEY_MANAGER.with(|manager| { - if let Some(manager) = manager.borrow().as_ref() { - manager.register(hotkey)?; +fn unregister_current_hotkey(state: &Arc>) { + let mut hotkey_state = state.lock(); + if let Some(old_hotkey) = hotkey_state.registered_hotkey.take() { + if let Some(manager) = &hotkey_state.manager { + let _ = manager.unregister(old_hotkey); } - Ok(()) - }) + } } -fn parse_hotkey(shortcut: &str) -> Result> { +fn register_shortcut(state: &Arc>, shortcut: &[String]) -> Result<(), Box> { + let hotkey = parse_hotkey(shortcut)?; + let mut hotkey_state = state.lock(); + + if let Some(manager) = &hotkey_state.manager { + manager.register(hotkey.clone())?; + hotkey_state.registered_hotkey = Some(hotkey); + Ok(()) + } else { + Err("Hotkey manager not initialized".into()) + } +} + +fn parse_hotkey(shortcut: &[String]) -> Result> { let mut modifiers = Modifiers::empty(); let mut code = None; - let shortcut = shortcut.replace("\"", ""); - - for part in shortcut.split('+') { - let part = part.trim().to_lowercase(); + for part in shortcut { match part.as_str() { - "ctrl" | "control" | "controlleft" => modifiers |= Modifiers::CONTROL, - "alt" | "altleft" | "optionleft" => modifiers |= Modifiers::ALT, - "shift" | "shiftleft" => modifiers |= Modifiers::SHIFT, - "super" | "meta" | "cmd" | "metaleft" => modifiers |= Modifiers::META, - key => { - let key_code = if key.starts_with("key") { - "Key".to_string() + &key[3..].to_uppercase() - } else if key.len() == 1 && key.chars().next().unwrap().is_alphabetic() { - "Key".to_string() + &key.to_uppercase() - } else { - key.to_string() - }; - - code = Some( - Code::from_str(&key_code) - .map_err(|_| format!("Invalid key code: {}", key_code))?, - ); - } + "ControlLeft" => modifiers |= Modifiers::CONTROL, + "AltLeft" => modifiers |= Modifiers::ALT, + "ShiftLeft" => modifiers |= Modifiers::SHIFT, + "MetaLeft" => modifiers |= Modifiers::META, + key => code = Some(Code::from(KeyCode::from_str(key)?)), } } - let key_code = - code.ok_or_else(|| format!("No valid key code found in shortcut: {}", shortcut))?; + let key_code = code.ok_or_else(|| "No valid key code found".to_string())?; Ok(HotKey::new(Some(modifiers), key_code)) } @@ -144,7 +144,12 @@ fn handle_hotkey_event(app_handle: &AppHandle) { center_window_on_current_monitor(&window); } - let _ = app_handle.track_event("hotkey_triggered", Some(serde_json::json!({ - "action": if window.is_visible().unwrap() { "hide" } else { "show" } - }))); -} + let _ = app_handle.track_event( + "hotkey_triggered", + Some( + serde_json::json!({ + "action": if window.is_visible().unwrap() { "hide" } else { "show" } + }) + ) + ); +} \ No newline at end of file diff --git a/src-tauri/src/api/tray.rs b/src-tauri/src/api/tray.rs index 8c3d9bc..2ae2bfa 100644 --- a/src-tauri/src/api/tray.rs +++ b/src-tauri/src/api/tray.rs @@ -1,16 +1,15 @@ -use tauri::{ - menu::{MenuBuilder, MenuItemBuilder}, - tray::TrayIconBuilder, - Emitter, Manager, -}; +use tauri::{ menu::{ MenuBuilder, MenuItemBuilder }, tray::TrayIconBuilder, Emitter, Manager }; use tauri_plugin_aptabase::EventTracker; pub fn setup(app: &mut tauri::App) -> Result<(), Box> { let window = app.get_webview_window("main").unwrap(); let is_visible = window.is_visible().unwrap(); - let _ = app.track_event("tray_toggle", Some(serde_json::json!({ + let _ = app.track_event( + "tray_toggle", + Some(serde_json::json!({ "action": if is_visible { "hide" } else { "show" } - }))); + })) + ); let icon_bytes = include_bytes!("../../icons/Square71x71Logo.png"); let icon = tauri::image::Image::from_bytes(icon_bytes).unwrap(); @@ -18,37 +17,42 @@ pub fn setup(app: &mut tauri::App) -> Result<(), Box> { let _tray = TrayIconBuilder::new() .menu( &MenuBuilder::new(app) - .items(&[&MenuItemBuilder::with_id("app_name", "Qopy") - .enabled(false) - .build(app)?]) + .items(&[&MenuItemBuilder::with_id("app_name", "Qopy").enabled(false).build(app)?]) .items(&[&MenuItemBuilder::with_id("show", "Show/Hide").build(app)?]) - .items(&[&MenuItemBuilder::with_id("keybind", "Change keybind").build(app)?]) + .items(&[&MenuItemBuilder::with_id("settings", "Settings").build(app)?]) .items(&[&MenuItemBuilder::with_id("quit", "Quit").build(app)?]) - .build()?, + .build()? ) - .on_menu_event(move |_app, event| match event.id().as_ref() { - "quit" => { - let _ = _app.track_event("app_quit", None); - std::process::exit(0); - } - "show" => { - let _ = _app.track_event("tray_toggle", Some(serde_json::json!({ - "action": if is_visible { "hide" } else { "show" } - }))); - let is_visible = window.is_visible().unwrap(); - if is_visible { - window.hide().unwrap(); - } else { - window.show().unwrap(); - window.set_focus().unwrap(); + .on_menu_event(move |_app, event| { + match event.id().as_ref() { + "quit" => { + let _ = _app.track_event("app_quit", None); + std::process::exit(0); } - window.emit("main_route", ()).unwrap(); + "show" => { + let _ = _app.track_event( + "tray_toggle", + Some( + serde_json::json!({ + "action": if is_visible { "hide" } else { "show" } + }) + ) + ); + let is_visible = window.is_visible().unwrap(); + if is_visible { + window.hide().unwrap(); + } else { + window.show().unwrap(); + window.set_focus().unwrap(); + } + window.emit("main_route", ()).unwrap(); + } + "settings" => { + let _ = _app.track_event("tray_settings", None); + window.emit("settings", ()).unwrap(); + } + _ => (), } - "keybind" => { - let _ = _app.track_event("tray_keybind_change", None); - window.emit("change_keybind", ()).unwrap(); - } - _ => (), }) .icon(icon) .build(app)?; diff --git a/src-tauri/src/api/updater.rs b/src-tauri/src/api/updater.rs index a5e16f9..da8737e 100644 --- a/src-tauri/src/api/updater.rs +++ b/src-tauri/src/api/updater.rs @@ -1,8 +1,8 @@ -use tauri::{async_runtime, AppHandle}; -use tauri_plugin_dialog::{DialogExt, MessageDialogButtons, MessageDialogKind}; +use tauri::{ async_runtime, AppHandle, Manager }; +use tauri_plugin_dialog::{ DialogExt, MessageDialogButtons, MessageDialogKind }; use tauri_plugin_updater::UpdaterExt; -pub async fn check_for_updates(app: AppHandle) { +pub async fn check_for_updates(app: AppHandle, prompted: bool) { println!("Checking for updates..."); let updater = app.updater().unwrap(); @@ -18,21 +18,42 @@ pub async fn check_for_updates(app: AppHandle) { "Would you like to install it now?", ]); + let window = app.get_webview_window("main").unwrap(); + window.show().unwrap(); + window.set_focus().unwrap(); + app.dialog() .message(msg) .title("Qopy Update Available") - .buttons(MessageDialogButtons::OkCancelCustom(String::from("Install"), String::from("Cancel"))) + .buttons( + MessageDialogButtons::OkCancelCustom( + String::from("Install"), + String::from("Cancel") + ) + ) .show(move |response| { if !response { return; } async_runtime::spawn(async move { - match update.download_and_install(|_, _| {}, || {}).await { + match + update.download_and_install( + |_, _| {}, + || {} + ).await + { Ok(_) => { app.dialog() - .message("Update installed successfully. The application needs to restart to apply the changes.") + .message( + "Update installed successfully. The application needs to restart to apply the changes." + ) .title("Qopy Update Installed") - .buttons(MessageDialogButtons::OkCancelCustom(String::from("Restart"), String::from("Cancel"))) + .buttons( + MessageDialogButtons::OkCancelCustom( + String::from("Restart"), + String::from("Cancel") + ) + ) .show(move |response| { if response { app.restart(); @@ -42,7 +63,9 @@ pub async fn check_for_updates(app: AppHandle) { Err(e) => { println!("Error installing new update: {:?}", e); app.dialog() - .message("Failed to install new update. The new update can be downloaded from Github") + .message( + "Failed to install new update. The new update can be downloaded from Github" + ) .kind(MessageDialogKind::Error) .show(|_| {}); } @@ -50,9 +73,22 @@ pub async fn check_for_updates(app: AppHandle) { }); }); } - Ok(None) => println!("No updates available."), + Ok(None) => { + println!("No updates available."); + } Err(e) => { - println!("Failed to check for updates: {:?}", e); + if prompted { + let window = app.get_webview_window("main").unwrap(); + window.show().unwrap(); + window.set_focus().unwrap(); + + app.dialog() + .message("No updates available.") + .title("Qopy Update Check") + .show(|_| {}); + } + + println!("No updates available. {}", e.to_string()); } } } diff --git a/src-tauri/src/db/database.rs b/src-tauri/src/db/database.rs index 4a3468d..264d308 100644 --- a/src-tauri/src/db/database.rs +++ b/src-tauri/src/db/database.rs @@ -1,5 +1,5 @@ -use include_dir::{include_dir, Dir}; -use sqlx::sqlite::{SqlitePool, SqlitePoolOptions}; +use include_dir::{ include_dir, Dir }; +use sqlx::sqlite::{ SqlitePool, SqlitePoolOptions }; use std::fs; use tauri::Manager; use tokio::runtime::Runtime as TokioRuntime; @@ -25,8 +25,7 @@ pub fn setup(app: &mut tauri::App) -> Result<(), Box> { let pool = rt.block_on(async { SqlitePoolOptions::new() .max_connections(5) - .connect(&db_url) - .await + .connect(&db_url).await .expect("Failed to create pool") }); @@ -49,29 +48,27 @@ pub fn setup(app: &mut tauri::App) -> Result<(), Box> { } async fn apply_migrations(pool: &SqlitePool) -> Result<(), Box> { - sqlx::query( - "CREATE TABLE IF NOT EXISTS schema_version ( + sqlx + ::query( + "CREATE TABLE IF NOT EXISTS schema_version ( version INTEGER PRIMARY KEY, applied_at DATETIME DEFAULT CURRENT_TIMESTAMP - );", - ) - .execute(pool) - .await?; + );" + ) + .execute(pool).await?; - let current_version: Option = - sqlx::query_scalar("SELECT MAX(version) FROM schema_version") - .fetch_one(pool) - .await?; + let current_version: Option = sqlx + ::query_scalar("SELECT MAX(version) FROM schema_version") + .fetch_one(pool).await?; let current_version = current_version.unwrap_or(0); - let mut migration_files: Vec<(i64, &str)> = MIGRATIONS_DIR - .files() + let mut migration_files: Vec<(i64, &str)> = MIGRATIONS_DIR.files() .filter_map(|file| { let file_name = file.path().file_name()?.to_str()?; - if file_name.ends_with(".sql") && file_name.starts_with("migration") { + if file_name.ends_with(".sql") && file_name.starts_with("v") { let version: i64 = file_name - .trim_start_matches("migration") + .trim_start_matches("v") .trim_end_matches(".sql") .parse() .ok()?; @@ -93,16 +90,16 @@ async fn apply_migrations(pool: &SqlitePool) -> Result<(), Box Result<(), Box> { - let id: String = thread_rng() + let id: String = rng() .sample_iter(&Alphanumeric) .take(16) .map(char::from) @@ -20,20 +20,19 @@ pub async fn initialize_history(pool: &SqlitePool) -> Result<(), Box) -> Result, String> { - let rows = sqlx::query( - "SELECT id, source, source_icon, content_type, content, favicon, timestamp, language FROM history ORDER BY timestamp DESC", - ) - .fetch_all(&*pool) - .await - .map_err(|e| e.to_string())?; + let rows = sqlx + ::query( + "SELECT id, source, source_icon, content_type, content, favicon, timestamp, language FROM history ORDER BY timestamp DESC" + ) + .fetch_all(&*pool).await + .map_err(|e| e.to_string())?; let items = rows .iter() @@ -56,50 +55,53 @@ pub async fn get_history(pool: tauri::State<'_, SqlitePool>) -> Result, - item: HistoryItem, + item: HistoryItem ) -> Result<(), String> { let (id, source, source_icon, content_type, content, favicon, timestamp, language) = item.to_row(); - let existing = sqlx::query("SELECT id FROM history WHERE content = ? AND content_type = ?") + let existing = sqlx + ::query("SELECT id FROM history WHERE content = ? AND content_type = ?") .bind(&content) .bind(&content_type) - .fetch_optional(&*pool) - .await + .fetch_optional(&*pool).await .map_err(|e| e.to_string())?; match existing { Some(_) => { - sqlx::query( - "UPDATE history SET timestamp = strftime('%Y-%m-%dT%H:%M:%f+00:00', 'now') WHERE content = ? AND content_type = ?" - ) - .bind(&content) - .bind(&content_type) - .execute(&*pool) - .await - .map_err(|e| e.to_string())?; + sqlx + ::query( + "UPDATE history SET timestamp = strftime('%Y-%m-%dT%H:%M:%f+00:00', 'now') WHERE content = ? AND content_type = ?" + ) + .bind(&content) + .bind(&content_type) + .execute(&*pool).await + .map_err(|e| e.to_string())?; } None => { - sqlx::query( - "INSERT INTO history (id, source, source_icon, content_type, content, favicon, timestamp, language) VALUES (?, ?, ?, ?, ?, ?, ?, ?)" - ) - .bind(id) - .bind(source) - .bind(source_icon) - .bind(content_type) - .bind(content) - .bind(favicon) - .bind(timestamp) - .bind(language) - .execute(&*pool) - .await - .map_err(|e| e.to_string())?; + sqlx + ::query( + "INSERT INTO history (id, source, source_icon, content_type, content, favicon, timestamp, language) VALUES (?, ?, ?, ?, ?, ?, ?, ?)" + ) + .bind(id) + .bind(source) + .bind(source_icon) + .bind(content_type) + .bind(content) + .bind(favicon) + .bind(timestamp) + .bind(language) + .execute(&*pool).await + .map_err(|e| e.to_string())?; } } - let _ = app_handle.track_event("history_item_added", Some(serde_json::json!({ + let _ = app_handle.track_event( + "history_item_added", + Some(serde_json::json!({ "content_type": item.content_type.to_string() - }))); + })) + ); Ok(()) } @@ -107,20 +109,29 @@ pub async fn add_history_item( #[tauri::command] pub async fn search_history( pool: tauri::State<'_, SqlitePool>, - query: String, + query: String ) -> Result, String> { - let query = format!("%{}%", query); - let rows = sqlx::query( - "SELECT id, source, source_icon, content_type, content, favicon, timestamp, language FROM history WHERE content LIKE ? ORDER BY timestamp DESC" - ) - .bind(query) - .fetch_all(&*pool) - .await - .map_err(|e| e.to_string())?; + if query.trim().is_empty() { + return Ok(Vec::new()); + } - let items = rows - .iter() - .map(|row| HistoryItem { + let query = format!("%{}%", query); + + let rows = sqlx + ::query( + "SELECT id, source, source_icon, content_type, content, favicon, timestamp, language + FROM history + WHERE content LIKE ? + ORDER BY timestamp DESC + LIMIT 100" + ) + .bind(query) + .fetch_all(&*pool).await + .map_err(|e| e.to_string())?; + + let mut items = Vec::with_capacity(rows.len()); + for row in rows.iter() { + items.push(HistoryItem { id: row.get("id"), source: row.get("source"), source_icon: row.get("source_icon"), @@ -129,8 +140,8 @@ pub async fn search_history( favicon: row.get("favicon"), timestamp: row.get("timestamp"), language: row.get("language"), - }) - .collect(); + }); + } Ok(items) } @@ -139,16 +150,16 @@ pub async fn search_history( pub async fn load_history_chunk( pool: tauri::State<'_, SqlitePool>, offset: i64, - limit: i64, + limit: i64 ) -> Result, String> { - let rows = sqlx::query( - "SELECT id, source, source_icon, content_type, content, favicon, timestamp, language FROM history ORDER BY timestamp DESC LIMIT ? OFFSET ?" - ) - .bind(limit) - .bind(offset) - .fetch_all(&*pool) - .await - .map_err(|e| e.to_string())?; + let rows = sqlx + ::query( + "SELECT id, source, source_icon, content_type, content, favicon, timestamp, language FROM history ORDER BY timestamp DESC LIMIT ? OFFSET ?" + ) + .bind(limit) + .bind(offset) + .fetch_all(&*pool).await + .map_err(|e| e.to_string())?; let items = rows .iter() @@ -171,12 +182,12 @@ pub async fn load_history_chunk( pub async fn delete_history_item( app_handle: tauri::AppHandle, pool: tauri::State<'_, SqlitePool>, - id: String, + id: String ) -> Result<(), String> { - sqlx::query("DELETE FROM history WHERE id = ?") + sqlx + ::query("DELETE FROM history WHERE id = ?") .bind(id) - .execute(&*pool) - .await + .execute(&*pool).await .map_err(|e| e.to_string())?; let _ = app_handle.track_event("history_item_deleted", None); @@ -189,9 +200,9 @@ pub async fn clear_history( app_handle: tauri::AppHandle, pool: tauri::State<'_, SqlitePool> ) -> Result<(), String> { - sqlx::query("DELETE FROM history") - .execute(&*pool) - .await + sqlx + ::query("DELETE FROM history") + .execute(&*pool).await .map_err(|e| e.to_string())?; let _ = app_handle.track_event("history_cleared", None); diff --git a/src-tauri/src/db/migrations/migration1.sql b/src-tauri/src/db/migrations/v1.sql similarity index 100% rename from src-tauri/src/db/migrations/migration1.sql rename to src-tauri/src/db/migrations/v1.sql diff --git a/src-tauri/src/db/migrations/migration2.sql b/src-tauri/src/db/migrations/v2.sql similarity index 100% rename from src-tauri/src/db/migrations/migration2.sql rename to src-tauri/src/db/migrations/v2.sql diff --git a/src-tauri/src/db/migrations/v3.sql b/src-tauri/src/db/migrations/v3.sql new file mode 100644 index 0000000..e299cae --- /dev/null +++ b/src-tauri/src/db/migrations/v3.sql @@ -0,0 +1 @@ +INSERT INTO settings (key, value) VALUES ('autostart', 'true'); diff --git a/src-tauri/src/db/settings.rs b/src-tauri/src/db/settings.rs index bdd6f58..2539ab7 100644 --- a/src-tauri/src/db/settings.rs +++ b/src-tauri/src/db/settings.rs @@ -1,8 +1,8 @@ -use serde::{Deserialize, Serialize}; +use serde::{ Deserialize, Serialize }; use serde_json; use sqlx::Row; use sqlx::SqlitePool; -use tauri::{Emitter, Manager}; +use tauri::{ Emitter, Manager }; use tauri_plugin_aptabase::EventTracker; #[derive(Deserialize, Serialize)] @@ -16,38 +16,10 @@ pub async fn initialize_settings(pool: &SqlitePool) -> Result<(), Box, - keybind: Vec, -) -> Result<(), String> { - let keybind_str = keybind.join("+"); - let keybind_clone = keybind_str.clone(); - - app_handle - .emit("update-shortcut", &keybind_str) - .map_err(|e| e.to_string())?; - - let json = serde_json::to_string(&keybind).map_err(|e| e.to_string())?; - - sqlx::query("INSERT OR REPLACE INTO settings (key, value) VALUES ('keybind', ?)") - .bind(json) - .execute(&*pool) - .await - .map_err(|e| e.to_string())?; - - let _ = app_handle.track_event("keybind_saved", Some(serde_json::json!({ - "keybind": keybind_clone - }))); + .execute(pool).await?; Ok(()) } @@ -55,12 +27,12 @@ pub async fn save_keybind( #[tauri::command] pub async fn get_setting( pool: tauri::State<'_, SqlitePool>, - key: String, + key: String ) -> Result { - let row = sqlx::query("SELECT value FROM settings WHERE key = ?") + let row = sqlx + ::query("SELECT value FROM settings WHERE key = ?") .bind(key) - .fetch_optional(&*pool) - .await + .fetch_optional(&*pool).await .map_err(|e| e.to_string())?; Ok(row.map(|r| r.get("value")).unwrap_or_default()) @@ -71,18 +43,25 @@ pub async fn save_setting( app_handle: tauri::AppHandle, pool: tauri::State<'_, SqlitePool>, key: String, - value: String, + value: String ) -> Result<(), String> { - sqlx::query("INSERT OR REPLACE INTO settings (key, value) VALUES (?, ?)") + sqlx + ::query("INSERT OR REPLACE INTO settings (key, value) VALUES (?, ?)") .bind(key.clone()) - .bind(value) - .execute(&*pool) - .await + .bind(value.clone()) + .execute(&*pool).await .map_err(|e| e.to_string())?; - let _ = app_handle.track_event("setting_saved", Some(serde_json::json!({ + let _ = app_handle.track_event( + "setting_saved", + Some(serde_json::json!({ "key": key - }))); + })) + ); + + if key == "keybind" { + let _ = app_handle.emit("update-shortcut", &value).map_err(|e| e.to_string())?; + } Ok(()) } @@ -91,15 +70,18 @@ pub async fn save_setting( pub async fn get_keybind(app_handle: tauri::AppHandle) -> Result, String> { let pool = app_handle.state::(); - let row = sqlx::query("SELECT value FROM settings WHERE key = 'keybind'") - .fetch_optional(&*pool) - .await + let row = sqlx + ::query("SELECT value FROM settings WHERE key = 'keybind'") + .fetch_optional(&*pool).await .map_err(|e| e.to_string())?; - let json = row.map(|r| r.get::("value")).unwrap_or_else(|| { - serde_json::to_string(&vec!["Meta".to_string(), "V".to_string()]) - .expect("Failed to serialize default keybind") - }); + let json = row + .map(|r| r.get::("value")) + .unwrap_or_else(|| { + serde_json + ::to_string(&vec!["MetaLeft".to_string(), "KeyV".to_string()]) + .expect("Failed to serialize default keybind") + }); serde_json::from_str::>(&json).map_err(|e| e.to_string()) } diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index c6aed37..3629212 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -1,58 +1,68 @@ -#![cfg_attr( - all(not(debug_assertions), target_os = "windows"), - windows_subsystem = "windows" -)] +#![cfg_attr(all(not(debug_assertions), target_os = "windows"), windows_subsystem = "windows")] mod api; mod db; mod utils; +use sqlx::sqlite::SqlitePoolOptions; use std::fs; use tauri::Manager; -use tauri::WebviewUrl; -use tauri::WebviewWindow; -use sqlx::sqlite::SqlitePoolOptions; +use tauri_plugin_aptabase::{ EventTracker, InitOptions }; use tauri_plugin_autostart::MacosLauncher; use tauri_plugin_prevent_default::Flags; -use tauri_plugin_aptabase::{EventTracker, InitOptions}; fn main() { let runtime = tokio::runtime::Runtime::new().expect("Failed to create Tokio runtime"); let _guard = runtime.enter(); - tauri::Builder::default() + tauri::Builder + ::default() .plugin(tauri_plugin_clipboard::init()) .plugin(tauri_plugin_os::init()) .plugin(tauri_plugin_sql::Builder::default().build()) .plugin(tauri_plugin_dialog::init()) .plugin(tauri_plugin_fs::init()) .plugin(tauri_plugin_updater::Builder::default().build()) - .plugin(tauri_plugin_aptabase::Builder::new("A-SH-8937252746") - .with_options(InitOptions { - host: Some("https://aptabase.pandadev.net".to_string()), - flush_interval: None, - }) - .with_panic_hook(Box::new(|client, info, msg| { - let location = info.location().map(|loc| format!("{}:{}:{}", loc.file(), loc.line(), loc.column())).unwrap_or_else(|| "".to_string()); - - let _ = client.track_event("panic", Some(serde_json::json!({ - "info": format!("{} ({})", msg, location), - }))); - })) - .build()) - .plugin(tauri_plugin_autostart::init( - MacosLauncher::LaunchAgent, - Some(vec![]), - )) .plugin( - tauri_plugin_prevent_default::Builder::new() + tauri_plugin_aptabase::Builder + ::new("A-SH-8937252746") + .with_options(InitOptions { + host: Some("https://aptabase.pandadev.net".to_string()), + flush_interval: None, + }) + .with_panic_hook( + Box::new(|client, info, msg| { + let location = info + .location() + .map(|loc| format!("{}:{}:{}", loc.file(), loc.line(), loc.column())) + .unwrap_or_else(|| "".to_string()); + + let _ = client.track_event( + "panic", + Some( + serde_json::json!({ + "info": format!("{} ({})", msg, location), + }) + ) + ); + }) + ) + .build() + ) + .plugin(tauri_plugin_autostart::init(MacosLauncher::LaunchAgent, Some(vec![]))) + .plugin( + tauri_plugin_prevent_default::Builder + ::new() .with_flags(Flags::all().difference(Flags::CONTEXT_MENU)) - .build(), + .build() ) .setup(|app| { + #[cfg(target_os = "macos")] + app.set_activation_policy(tauri::ActivationPolicy::Accessory); + let app_data_dir = app.path().app_data_dir().unwrap(); utils::logger::init_logger(&app_data_dir).expect("Failed to initialize logger"); - + fs::create_dir_all(&app_data_dir).expect("Failed to create app data directory"); let db_path = app_data_dir.join("data.db"); @@ -69,29 +79,13 @@ fn main() { tauri::async_runtime::spawn(async move { let pool = SqlitePoolOptions::new() .max_connections(5) - .connect(&db_url) - .await + .connect(&db_url).await .expect("Failed to create pool"); app_handle_clone.manage(pool); }); - let main_window = if let Some(window) = app.get_webview_window("main") { - window - } else { - WebviewWindow::builder(app.handle(), "main", WebviewUrl::App("index.html".into())) - .title("Qopy") - .resizable(false) - .fullscreen(false) - .inner_size(750.0, 474.0) - .focused(true) - .skip_taskbar(true) - .visible(false) - .decorations(false) - .transparent(true) - .always_on_top(false) - .build()? - }; + let main_window = app.get_webview_window("main"); let _ = db::database::setup(app); api::hotkeys::setup(app_handle.clone()); @@ -99,13 +93,16 @@ fn main() { api::clipboard::setup(app.handle()); let _ = api::clipboard::start_monitor(app_handle.clone()); - utils::commands::center_window_on_current_monitor(&main_window); - main_window.hide()?; + utils::commands::center_window_on_current_monitor(main_window.as_ref().unwrap()); + main_window + .as_ref() + .map(|w| w.hide()) + .unwrap_or(Ok(()))?; let _ = app.track_event("app_started", None); tauri::async_runtime::spawn(async move { - api::updater::check_for_updates(app_handle).await; + api::updater::check_for_updates(app_handle, false).await; }); Ok(()) @@ -118,21 +115,21 @@ fn main() { } } }) - .invoke_handler(tauri::generate_handler![ - api::clipboard::write_and_paste, - db::history::get_history, - db::history::add_history_item, - db::history::search_history, - db::history::load_history_chunk, - db::history::delete_history_item, - db::history::clear_history, - db::history::read_image, - db::settings::get_setting, - db::settings::save_setting, - db::settings::save_keybind, - db::settings::get_keybind, - utils::commands::fetch_page_meta, - ]) + .invoke_handler( + tauri::generate_handler![ + api::clipboard::write_and_paste, + db::history::get_history, + db::history::add_history_item, + db::history::search_history, + db::history::load_history_chunk, + db::history::delete_history_item, + db::history::clear_history, + db::history::read_image, + db::settings::get_setting, + db::settings::save_setting, + utils::commands::fetch_page_meta + ] + ) .run(tauri::generate_context!()) .expect("error while running tauri application"); -} +} \ No newline at end of file diff --git a/src-tauri/src/utils/commands.rs b/src-tauri/src/utils/commands.rs index f87a866..ebf71b1 100644 --- a/src-tauri/src/utils/commands.rs +++ b/src-tauri/src/utils/commands.rs @@ -1,45 +1,68 @@ -use active_win_pos_rs::get_active_window; -use base64::{engine::general_purpose::STANDARD, Engine}; +use applications::{AppInfoContext, AppInfo, AppTrait, utils::image::RustImage}; +use base64::{ engine::general_purpose::STANDARD, Engine }; use image::codecs::png::PngEncoder; use tauri::PhysicalPosition; use meta_fetcher; pub fn center_window_on_current_monitor(window: &tauri::WebviewWindow) { - if let Some(monitor) = window.available_monitors().unwrap().iter().find(|m| { - let primary_monitor = window - .primary_monitor() + if + let Some(monitor) = window + .available_monitors() .unwrap() - .expect("Failed to get primary monitor"); - let mouse_position = primary_monitor.position(); - let monitor_position = m.position(); - let monitor_size = m.size(); - mouse_position.x >= monitor_position.x - && mouse_position.x < monitor_position.x + monitor_size.width as i32 - && mouse_position.y >= monitor_position.y - && mouse_position.y < monitor_position.y + monitor_size.height as i32 - }) { + .iter() + .find(|m| { + let primary_monitor = window + .primary_monitor() + .unwrap() + .expect("Failed to get primary monitor"); + let mouse_position = primary_monitor.position(); + let monitor_position = m.position(); + let monitor_size = m.size(); + mouse_position.x >= monitor_position.x && + mouse_position.x < monitor_position.x + (monitor_size.width as i32) && + mouse_position.y >= monitor_position.y && + mouse_position.y < monitor_position.y + (monitor_size.height as i32) + }) + { let monitor_size = monitor.size(); let window_size = window.outer_size().unwrap(); - let x = (monitor_size.width as i32 - window_size.width as i32) / 2; - let y = (monitor_size.height as i32 - window_size.height as i32) / 2; + let x = ((monitor_size.width as i32) - (window_size.width as i32)) / 2; + let y = ((monitor_size.height as i32) - (window_size.height as i32)) / 2; window - .set_position(PhysicalPosition::new( - monitor.position().x + x, - monitor.position().y + y, - )) + .set_position(PhysicalPosition::new(monitor.position().x + x, monitor.position().y + y)) .unwrap(); } } pub fn get_app_info() -> (String, Option) { - match get_active_window() { + println!("Getting app info"); + let mut ctx = AppInfoContext::new(vec![]); + println!("Created AppInfoContext"); + ctx.refresh_apps().unwrap(); + println!("Refreshed apps"); + match ctx.get_frontmost_application() { Ok(window) => { - let app_name = window.app_name; - (app_name, None) + println!("Found frontmost application: {}", window.name); + let name = window.name.clone(); + let icon = window + .load_icon() + .ok() + .map(|i| { + println!("Loading icon for {}", name); + let png = i.to_png().unwrap(); + let encoded = STANDARD.encode(png.get_bytes()); + println!("Icon encoded successfully"); + encoded + }); + println!("Returning app info: {} with icon: {}", name, icon.is_some()); + (name, icon) + } + Err(e) => { + println!("Failed to get frontmost application: {:?}", e); + ("System".to_string(), None) } - Err(_) => ("System".to_string(), None), } } @@ -51,59 +74,64 @@ fn _process_icon_to_base64(path: &str) -> Result bool { let color = color.trim().to_lowercase(); - + // hex if color.starts_with('#') && color.len() == color.trim_end_matches(char::is_whitespace).len() { let hex = &color[1..]; return match hex.len() { 3 | 6 | 8 => hex.chars().all(|c| c.is_ascii_hexdigit()), - _ => false + _ => false, }; } - + // rgb/rgba - if (color.starts_with("rgb(") || color.starts_with("rgba(")) && color.ends_with(")") && !color[..color.len()-1].contains(")") { + if + (color.starts_with("rgb(") || color.starts_with("rgba(")) && + color.ends_with(")") && + !color[..color.len() - 1].contains(")") + { let values = color .trim_start_matches("rgba(") .trim_start_matches("rgb(") .trim_end_matches(')') .split(',') .collect::>(); - + return match values.len() { 3 | 4 => values.iter().all(|v| v.trim().parse::().is_ok()), - _ => false + _ => false, }; } - - // hsl/hsla - if (color.starts_with("hsl(") || color.starts_with("hsla(")) && color.ends_with(")") && !color[..color.len()-1].contains(")") { + + // hsl/hsla + if + (color.starts_with("hsl(") || color.starts_with("hsla(")) && + color.ends_with(")") && + !color[..color.len() - 1].contains(")") + { let values = color .trim_start_matches("hsla(") .trim_start_matches("hsl(") .trim_end_matches(')') .split(',') .collect::>(); - + return match values.len() { 3 | 4 => values.iter().all(|v| v.trim().parse::().is_ok()), - _ => false + _ => false, }; } - + false } #[tauri::command] pub async fn fetch_page_meta(url: String) -> Result<(String, Option), String> { - let metadata = meta_fetcher::fetch_metadata(&url) + let metadata = meta_fetcher + ::fetch_metadata(&url) .map_err(|e| format!("Failed to fetch metadata: {}", e))?; - - Ok(( - metadata.title.unwrap_or_else(|| "No title found".to_string()), - metadata.image - )) -} \ No newline at end of file + + Ok((metadata.title.unwrap_or_else(|| "No title found".to_string()), metadata.image)) +} diff --git a/src-tauri/src/utils/favicon.rs b/src-tauri/src/utils/favicon.rs index 38321f3..45568dc 100644 --- a/src-tauri/src/utils/favicon.rs +++ b/src-tauri/src/utils/favicon.rs @@ -5,7 +5,7 @@ use reqwest; use url::Url; pub async fn fetch_favicon_as_base64( - url: Url, + url: Url ) -> Result, Box> { let client = reqwest::Client::new(); let favicon_url = format!("https://favicone.com/{}", url.host_str().unwrap()); diff --git a/src-tauri/src/utils/keys.rs b/src-tauri/src/utils/keys.rs new file mode 100644 index 0000000..01b6836 --- /dev/null +++ b/src-tauri/src/utils/keys.rs @@ -0,0 +1,120 @@ +use global_hotkey::hotkey::Code; +use std::str::FromStr; + +pub struct KeyCode(Code); + +impl FromStr for KeyCode { + type Err = String; + + fn from_str(s: &str) -> Result { + let code = match s { + "Backquote" => Code::Backquote, + "Backslash" => Code::Backslash, + "BracketLeft" => Code::BracketLeft, + "BracketRight" => Code::BracketRight, + "Comma" => Code::Comma, + "Digit0" => Code::Digit0, + "Digit1" => Code::Digit1, + "Digit2" => Code::Digit2, + "Digit3" => Code::Digit3, + "Digit4" => Code::Digit4, + "Digit5" => Code::Digit5, + "Digit6" => Code::Digit6, + "Digit7" => Code::Digit7, + "Digit8" => Code::Digit8, + "Digit9" => Code::Digit9, + "Equal" => Code::Equal, + "KeyA" => Code::KeyA, + "KeyB" => Code::KeyB, + "KeyC" => Code::KeyC, + "KeyD" => Code::KeyD, + "KeyE" => Code::KeyE, + "KeyF" => Code::KeyF, + "KeyG" => Code::KeyG, + "KeyH" => Code::KeyH, + "KeyI" => Code::KeyI, + "KeyJ" => Code::KeyJ, + "KeyK" => Code::KeyK, + "KeyL" => Code::KeyL, + "KeyM" => Code::KeyM, + "KeyN" => Code::KeyN, + "KeyO" => Code::KeyO, + "KeyP" => Code::KeyP, + "KeyQ" => Code::KeyQ, + "KeyR" => Code::KeyR, + "KeyS" => Code::KeyS, + "KeyT" => Code::KeyT, + "KeyU" => Code::KeyU, + "KeyV" => Code::KeyV, + "KeyW" => Code::KeyW, + "KeyX" => Code::KeyX, + "KeyY" => Code::KeyY, + "KeyZ" => Code::KeyZ, + "Minus" => Code::Minus, + "Period" => Code::Period, + "Quote" => Code::Quote, + "Semicolon" => Code::Semicolon, + "Slash" => Code::Slash, + "Backspace" => Code::Backspace, + "CapsLock" => Code::CapsLock, + "Delete" => Code::Delete, + "Enter" => Code::Enter, + "Space" => Code::Space, + "Tab" => Code::Tab, + "End" => Code::End, + "Home" => Code::Home, + "Insert" => Code::Insert, + "PageDown" => Code::PageDown, + "PageUp" => Code::PageUp, + "ArrowDown" => Code::ArrowDown, + "ArrowLeft" => Code::ArrowLeft, + "ArrowRight" => Code::ArrowRight, + "ArrowUp" => Code::ArrowUp, + "NumLock" => Code::NumLock, + "Numpad0" => Code::Numpad0, + "Numpad1" => Code::Numpad1, + "Numpad2" => Code::Numpad2, + "Numpad3" => Code::Numpad3, + "Numpad4" => Code::Numpad4, + "Numpad5" => Code::Numpad5, + "Numpad6" => Code::Numpad6, + "Numpad7" => Code::Numpad7, + "Numpad8" => Code::Numpad8, + "Numpad9" => Code::Numpad9, + "NumpadAdd" => Code::NumpadAdd, + "NumpadDecimal" => Code::NumpadDecimal, + "NumpadDivide" => Code::NumpadDivide, + "NumpadMultiply" => Code::NumpadMultiply, + "NumpadSubtract" => Code::NumpadSubtract, + "Escape" => Code::Escape, + "PrintScreen" => Code::PrintScreen, + "ScrollLock" => Code::ScrollLock, + "Pause" => Code::Pause, + "AudioVolumeDown" => Code::AudioVolumeDown, + "AudioVolumeMute" => Code::AudioVolumeMute, + "AudioVolumeUp" => Code::AudioVolumeUp, + "F1" => Code::F1, + "F2" => Code::F2, + "F3" => Code::F3, + "F4" => Code::F4, + "F5" => Code::F5, + "F6" => Code::F6, + "F7" => Code::F7, + "F8" => Code::F8, + "F9" => Code::F9, + "F10" => Code::F10, + "F11" => Code::F11, + "F12" => Code::F12, + _ => { + return Err(format!("Unknown key code: {}", s)); + } + }; + Ok(KeyCode(code)) + } +} + +impl From for Code { + fn from(key_code: KeyCode) -> Self { + key_code.0 + } +} diff --git a/src-tauri/src/utils/logger.rs b/src-tauri/src/utils/logger.rs index d2f1442..d0e95c6 100644 --- a/src-tauri/src/utils/logger.rs +++ b/src-tauri/src/utils/logger.rs @@ -1,7 +1,8 @@ use chrono; -use log::{LevelFilter, SetLoggerError}; -use std::fs::{File, OpenOptions}; +use log::{ LevelFilter, SetLoggerError }; +use std::fs::{ File, OpenOptions }; use std::io::Write; +use std::panic; pub struct FileLogger { file: File, @@ -15,14 +16,17 @@ impl log::Log for FileLogger { fn log(&self, record: &log::Record) { if self.enabled(record.metadata()) { let mut file = self.file.try_clone().expect("Failed to clone file handle"); + writeln!( file, - "{} - {}: {}", + "{} [{:<5}] {}: {} ({}:{})", chrono::Local::now().format("%Y-%m-%d %H:%M:%S"), record.level(), - record.args() - ) - .expect("Failed to write to log file"); + record.target(), + record.args(), + record.file().unwrap_or("unknown"), + record.line().unwrap_or(0) + ).expect("Failed to write to log file"); } } @@ -39,11 +43,42 @@ pub fn init_logger(app_data_dir: &std::path::Path) -> Result<(), SetLoggerError> let file = OpenOptions::new() .create(true) .append(true) - .open(log_path) + .open(&log_path) .expect("Failed to open log file"); + let panic_file = file.try_clone().expect("Failed to clone file handle"); + panic::set_hook( + Box::new(move |panic_info| { + let mut file = panic_file.try_clone().expect("Failed to clone file handle"); + + let location = panic_info + .location() + .map(|loc| format!("{}:{}:{}", loc.file(), loc.line(), loc.column())) + .unwrap_or_else(|| "unknown location".to_string()); + + let message = match panic_info.payload().downcast_ref::<&str>() { + Some(s) => *s, + None => + match panic_info.payload().downcast_ref::() { + Some(s) => s.as_str(), + None => "Unknown panic message", + } + }; + + let _ = writeln!( + file, + "{} [PANIC] rust_panic: {} ({})", + chrono::Local::now().format("%Y-%m-%d %H:%M:%S"), + message, + location + ); + }) + ); + let logger = Box::new(FileLogger { file }); - unsafe { log::set_logger_racy(Box::leak(logger))? }; + unsafe { + log::set_logger_racy(Box::leak(logger))?; + } log::set_max_level(LevelFilter::Debug); Ok(()) } diff --git a/src-tauri/src/utils/mod.rs b/src-tauri/src/utils/mod.rs index b888b1f..78e50cb 100644 --- a/src-tauri/src/utils/mod.rs +++ b/src-tauri/src/utils/mod.rs @@ -2,3 +2,4 @@ pub mod commands; pub mod favicon; pub mod types; pub mod logger; +pub mod keys; diff --git a/src-tauri/src/utils/types.rs b/src-tauri/src/utils/types.rs index 76c846e..4e6886f 100644 --- a/src-tauri/src/utils/types.rs +++ b/src-tauri/src/utils/types.rs @@ -1,5 +1,5 @@ -use chrono::{DateTime, Utc}; -use serde::{Deserialize, Serialize}; +use chrono::{ DateTime, Utc }; +use serde::{ Deserialize, Serialize }; use std::fmt; use uuid::Uuid; @@ -115,7 +115,7 @@ impl HistoryItem { content: String, favicon: Option, source_icon: Option, - language: Option, + language: Option ) -> Self { Self { id: Uuid::new_v4().to_string(), @@ -130,7 +130,7 @@ impl HistoryItem { } pub fn to_row( - &self, + &self ) -> ( String, String, diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index dd53dd9..c6acd3e 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,6 +1,6 @@ { "productName": "Qopy", - "version": "0.3.1", + "version": "0.4.0", "identifier": "net.pandadev.qopy", "build": { "frontendDist": "../dist", @@ -51,9 +51,7 @@ "plugins": { "updater": { "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDExNDIzNjA1QjE0NjU1OTkKUldTWlZVYXhCVFpDRWNvNmt0UE5lQmZkblEyZGZiZ2tHelJvT2YvNVpLU1RIM1RKZFQrb2tzWWwK", - "endpoints": [ - "https://qopy.pandadev.net/" - ] + "endpoints": ["https://qopy.pandadev.net/"] } }, "$schema": "../node_modules/@tauri-apps/cli/schema.json" diff --git a/styles/index.scss b/styles/index.scss new file mode 100644 index 0000000..20a154d --- /dev/null +++ b/styles/index.scss @@ -0,0 +1,186 @@ +$primary: #2e2d2b; +$accent: #feb453; +$divider: #ffffff0d; + +$text: #e5dfd5; +$text2: #ada9a1; +$mutedtext: #78756f; + +$search-height: 56px; +$sidebar-width: 286px; +$bottom-bar-height: 39px; +$info-panel-height: 160px; +$content-view-height: calc( + 100% - $search-height - $info-panel-height - $bottom-bar-height +); + +main { + width: 100vw; + height: 100vh; + background-color: $primary; + border: 1px solid $divider; + display: flex; + flex-direction: column; + border-radius: 12px; + justify-content: space-between; +} + +.container { + height: 376px; + width: 100%; + display: flex; +} + +.results { + display: flex; + flex-direction: column; + padding: 14px 8px; + gap: 8px; + min-width: 286px; + border-right: 1px solid var(--border); + + .time-separator { + font-size: 12px; + color: $text2; + font-family: SFRoundedSemiBold; + padding-left: 8px; + } + + .group { + & + .group { + margin-top: 16px; + } + + .time-separator { + margin-bottom: 8px; + } + + .results-group { + display: flex; + flex-direction: column; + } + } + + .favicon, + .image, + .icon { + width: 18px; + height: 18px; + } +} + +.right { + display: flex; + flex-direction: column; + width: 100%; +} + +.content { + height: 100%; + font-family: CommitMono !important; + font-size: 12px; + letter-spacing: 1; + border-radius: 10px; + width: 462px; + display: flex; + flex-direction: column; + align-items: flex-start; + overflow: hidden; + z-index: 2; + color: $text; + + &:not(:has(.image)) { + padding: 8px; + } + + span.content-text { + font-family: CommitMono !important; + white-space: pre-wrap; + word-wrap: break-word; + word-break: break-word; + max-width: 100%; + } + + .image { + width: 100%; + height: 100%; + object-fit: contain; + object-position: center; + } +} + +.information { + min-height: 160px; + width: 462px; + border-top: 1px solid $divider; + padding: 14px; + z-index: 1; + display: flex; + flex-direction: column; + gap: 14px; + + .title { + font-family: SFRoundedSemiBold; + font-size: 12px; + letter-spacing: 0.6px; + color: $text; + } + + .info-content { + display: flex; + gap: 0; + flex-direction: column; + + .info-row { + display: flex; + width: 100%; + font-size: 12px; + justify-content: space-between; + padding: 8px 0; + border-bottom: 1px solid $divider; + line-height: 1; + + &:last-child { + border-bottom: none; + padding-bottom: 0; + } + + &:first-child { + padding-top: 22px; + } + + p { + font-family: SFRoundedMedium; + color: $text2; + font-weight: 500; + flex-shrink: 0; + } + + span { + font-family: CommitMono; + color: $text; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + margin-left: 32px; + display: flex; + align-items: center; + gap: 4px; + + img { + width: 13px; + height: 13px; + object-fit: contain; + } + } + } + } +} + +.search-loading { + display: flex; + justify-content: center; + padding: 20px; + font-size: 16px; + color: var(--text-secondary); +} \ No newline at end of file diff --git a/styles/settings.scss b/styles/settings.scss new file mode 100644 index 0000000..1f0b682 --- /dev/null +++ b/styles/settings.scss @@ -0,0 +1,235 @@ +$primary: #2e2d2b; +$accent: #feb453; +$divider: #ffffff0d; + +$text: #e5dfd5; +$text2: #ada9a1; +$mutedtext: #78756f; + +main { + width: 100vw; + height: 100vh; + background-color: $primary; + border: 1px solid $divider; + display: flex; + flex-direction: column; + border-radius: 12px; + justify-content: space-between; +} + +.back { + position: absolute; + top: 16px; + left: 16px; + display: flex; + gap: 8px; + align-items: center; + + img { + background-color: $divider; + border-radius: 6px; + padding: 8px 6px; + } + + p { + color: $text2; + } +} + +p { + font-family: SFRoundedMedium; +} + +.settings-container { + width: 100%; + height: 100%; + margin-top: 26px; + position: relative; + font-size: 12px; + font-family: SFRoundedMedium; + + .settings { + position: absolute; + left: 50%; + transform: translateX(-50%); + margin-left: -26px; + display: flex; + gap: 24px; + + .names { + display: flex; + flex-direction: column; + gap: 16px; + + p { + font-family: SFRoundedSemiBold; + color: $text2; + display: flex; + justify-content: right; + } + } + + .actions { + display: flex; + flex-direction: column; + gap: 16px; + color: $mutedtext; + } + } +} + +.launch { + display: flex; + align-items: center; + gap: 6px; + + input[type="checkbox"] { + appearance: none; + width: 14px; + height: 14px; + background-color: transparent; + border-radius: 5px; + border: 1px solid $mutedtext; + position: relative; + cursor: pointer; + transition: background-color 0.2s; + + &:checked { + ~ .checkmark { + opacity: 1; + } + } + } + + .checkmark { + height: 14px; + width: 14px; + position: absolute; + opacity: 0; + transition: opacity 0.2s; + } + + p { + color: $text2; + } +} + +.keybind-input { + width: min-content; + white-space: nowrap; + padding: 6px; + border: 1px solid $divider; + color: $text2; + display: flex; + border-radius: 10px; + outline: none; + gap: 4px; + + .key { + color: $text2; + font-family: SFRoundedMedium; + background-color: $divider; + padding: 2px 6px; + border-radius: 6px; + font-size: 14px; + } +} + +.keybind-input:focus { + border: 1px solid rgba(255, 255, 255, 0.2); +} + +.empty-keybind { + border-color: rgba(255, 82, 82, 0.298); +} + +.top-bar { + width: 100%; + min-height: 56px; + border-bottom: 1px solid $divider; +} + +.bottom-bar { + height: 40px; + width: calc(100vw - 2px); + backdrop-filter: blur(18px); + background-color: hsla(40, 3%, 16%, 0.8); + position: fixed; + bottom: 1px; + left: 1px; + z-index: 100; + border-radius: 0 0 12px 12px; + display: flex; + flex-direction: row; + justify-content: space-between; + padding-inline: 12px; + padding-right: 6px; + padding-top: 1px; + align-items: center; + font-size: 14px; + border-top: 1px solid $divider; + + p { + color: $text2; + } + + .left { + display: flex; + align-items: center; + gap: 8px; + + .logo { + width: 18px; + height: 18px; + } + } + + .right { + display: flex; + align-items: center; + + .actions div { + display: flex; + align-items: center; + gap: 2px; + } + + .divider { + width: 2px; + height: 12px; + background-color: $divider; + margin-left: 8px; + margin-right: 4px; + transition: all 0.2s; + } + + .actions { + padding: 4px; + padding-left: 8px; + display: flex; + align-items: center; + gap: 8px; + border-radius: 7px; + background-color: transparent; + transition: all 0.2s; + cursor: pointer; + + p { + color: $text; + } + + &.disabled { + pointer-events: none; + opacity: 0.5; + } + } + + .actions:hover { + background-color: $divider; + } + + &:hover .actions:hover ~ .divider { + opacity: 0; + } + } +} diff --git a/types/keys.ts b/types/keys.ts new file mode 100644 index 0000000..d81454f --- /dev/null +++ b/types/keys.ts @@ -0,0 +1,217 @@ +export enum KeyValues { + Backquote = 'Backquote', + Backslash = 'Backslash', + BracketLeft = 'BracketLeft', + BracketRight = 'BracketRight', + Comma = 'Comma', + Digit0 = 'Digit0', + Digit1 = 'Digit1', + Digit2 = 'Digit2', + Digit3 = 'Digit3', + Digit4 = 'Digit4', + Digit5 = 'Digit5', + Digit6 = 'Digit6', + Digit7 = 'Digit7', + Digit8 = 'Digit8', + Digit9 = 'Digit9', + Equal = 'Equal', + KeyA = 'KeyA', + KeyB = 'KeyB', + KeyC = 'KeyC', + KeyD = 'KeyD', + KeyE = 'KeyE', + KeyF = 'KeyF', + KeyG = 'KeyG', + KeyH = 'KeyH', + KeyI = 'KeyI', + KeyJ = 'KeyJ', + KeyK = 'KeyK', + KeyL = 'KeyL', + KeyM = 'KeyM', + KeyN = 'KeyN', + KeyO = 'KeyO', + KeyP = 'KeyP', + KeyQ = 'KeyQ', + KeyR = 'KeyR', + KeyS = 'KeyS', + KeyT = 'KeyT', + KeyU = 'KeyU', + KeyV = 'KeyV', + KeyW = 'KeyW', + KeyX = 'KeyX', + KeyY = 'KeyY', + KeyZ = 'KeyZ', + Minus = 'Minus', + Period = 'Period', + Quote = 'Quote', + Semicolon = 'Semicolon', + Slash = 'Slash', + AltLeft = 'AltLeft', + AltRight = 'AltRight', + Backspace = 'Backspace', + CapsLock = 'CapsLock', + ContextMenu = 'ContextMenu', + ControlLeft = 'ControlLeft', + ControlRight = 'ControlRight', + Enter = 'Enter', + MetaLeft = 'MetaLeft', + MetaRight = 'MetaRight', + ShiftLeft = 'ShiftLeft', + ShiftRight = 'ShiftRight', + Space = 'Space', + Tab = 'Tab', + Delete = 'Delete', + End = 'End', + Home = 'Home', + Insert = 'Insert', + PageDown = 'PageDown', + PageUp = 'PageUp', + ArrowDown = 'ArrowDown', + ArrowLeft = 'ArrowLeft', + ArrowRight = 'ArrowRight', + ArrowUp = 'ArrowUp', + NumLock = 'NumLock', + Numpad0 = 'Numpad0', + Numpad1 = 'Numpad1', + Numpad2 = 'Numpad2', + Numpad3 = 'Numpad3', + Numpad4 = 'Numpad4', + Numpad5 = 'Numpad5', + Numpad6 = 'Numpad6', + Numpad7 = 'Numpad7', + Numpad8 = 'Numpad8', + Numpad9 = 'Numpad9', + NumpadAdd = 'NumpadAdd', + NumpadDecimal = 'NumpadDecimal', + NumpadDivide = 'NumpadDivide', + NumpadMultiply = 'NumpadMultiply', + NumpadSubtract = 'NumpadSubtract', + Escape = 'Escape', + PrintScreen = 'PrintScreen', + ScrollLock = 'ScrollLock', + Pause = 'Pause', + AudioVolumeDown = 'AudioVolumeDown', + AudioVolumeMute = 'AudioVolumeMute', + AudioVolumeUp = 'AudioVolumeUp', + F1 = 'F1', + F2 = 'F2', + F3 = 'F3', + F4 = 'F4', + F5 = 'F5', + F6 = 'F6', + F7 = 'F7', + F8 = 'F8', + F9 = 'F9', + F10 = 'F10', + F11 = 'F11', + F12 = 'F12', +} + +export enum KeyLabels { + Backquote = '`', + Backslash = '\\', + BracketLeft = '[', + BracketRight = ']', + Comma = ',', + Digit0 = '0', + Digit1 = '1', + Digit2 = '2', + Digit3 = '3', + Digit4 = '4', + Digit5 = '5', + Digit6 = '6', + Digit7 = '7', + Digit8 = '8', + Digit9 = '9', + Equal = '=', + KeyA = 'A', + KeyB = 'B', + KeyC = 'C', + KeyD = 'D', + KeyE = 'E', + KeyF = 'F', + KeyG = 'G', + KeyH = 'H', + KeyI = 'I', + KeyJ = 'J', + KeyK = 'K', + KeyL = 'L', + KeyM = 'M', + KeyN = 'N', + KeyO = 'O', + KeyP = 'P', + KeyQ = 'Q', + KeyR = 'R', + KeyS = 'S', + KeyT = 'T', + KeyU = 'U', + KeyV = 'V', + KeyW = 'W', + KeyX = 'X', + KeyY = 'Y', + KeyZ = 'Z', + Minus = '-', + Period = '.', + Quote = "'", + Semicolon = ';', + Slash = '/', + AltLeft = 'Alt', + AltRight = 'Alt (Right)', + Backspace = 'Backspace', + CapsLock = 'Caps Lock', + ContextMenu = 'Context Menu', + ControlLeft = 'Ctrl', + ControlRight = 'Ctrl (Right)', + Enter = 'Enter', + MetaLeft = 'Meta', + MetaRight = 'Meta (Right)', + ShiftLeft = 'Shift', + ShiftRight = 'Shift (Right)', + Space = 'Space', + Tab = 'Tab', + Delete = 'Delete', + End = 'End', + Home = 'Home', + Insert = 'Insert', + PageDown = 'Page Down', + PageUp = 'Page Up', + ArrowDown = '↓', + ArrowLeft = '←', + ArrowRight = '→', + ArrowUp = '↑', + NumLock = 'Num Lock', + Numpad0 = 'Numpad 0', + Numpad1 = 'Numpad 1', + Numpad2 = 'Numpad 2', + Numpad3 = 'Numpad 3', + Numpad4 = 'Numpad 4', + Numpad5 = 'Numpad 5', + Numpad6 = 'Numpad 6', + Numpad7 = 'Numpad 7', + Numpad8 = 'Numpad 8', + Numpad9 = 'Numpad 9', + NumpadAdd = 'Numpad +', + NumpadDecimal = 'Numpad .', + NumpadDivide = 'Numpad /', + NumpadMultiply = 'Numpad *', + NumpadSubtract = 'Numpad -', + Escape = 'Esc', + PrintScreen = 'Print Screen', + ScrollLock = 'Scroll Lock', + Pause = 'Pause', + AudioVolumeDown = 'Volume Down', + AudioVolumeMute = 'Volume Mute', + AudioVolumeUp = 'Volume Up', + F1 = 'F1', + F2 = 'F2', + F3 = 'F3', + F4 = 'F4', + F5 = 'F5', + F6 = 'F6', + F7 = 'F7', + F8 = 'F8', + F9 = 'F9', + F10 = 'F10', + F11 = 'F11', + F12 = 'F12', +} \ No newline at end of file