Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Settings #29

Merged
merged 16 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 30 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -234,30 +234,41 @@ jobs:
with:
fetch-depth: 0

- 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 "Release v$VERSION already exists. Skipping release creation."
echo "SKIP_RELEASE=true" >> $GITHUB_ENV
else
echo "Release v$VERSION does not exist. Proceeding with release creation."
echo "SKIP_RELEASE=false" >> $GITHUB_ENV
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- 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 }}"

# Get the most recent release tag (v* tags only)
LAST_TAG=$(git describe --match "v*" --abbrev=0 --tags `git rev-list --tags --skip=1 --max-count=1` 2>/dev/null || echo "")

if [ -n "$LAST_TAG" ]; then
echo "Debug: Found last release tag: $LAST_TAG"
CHANGES=$(git log ${LAST_TAG}..HEAD --pretty=format:"- %s")
else
echo "Debug: No previous release tag found, using first commit"
CHANGES=$(git log --pretty=format:"- %s")
fi

echo "Debug: Changelog content:"
echo "$CHANGES"


# 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 }')
Expand All @@ -278,10 +289,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}
Expand All @@ -299,6 +309,7 @@ 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 }}
Expand Down
4 changes: 2 additions & 2 deletions GET_STARTED.md
Original file line number Diff line number Diff line change
@@ -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.

Expand All @@ -12,7 +12,7 @@ All the data of Qopy is stored inside of a SQLite database.

## Disable Windows+V for default clipboard manager

https://github.com/user-attachments/assets/723f9e07-3190-46ec-9bb7-15dfc112f620
<video src="https://github.com/user-attachments/assets/723f9e07-3190-46ec-9bb7-15dfc112f620" controls title="Disable Windows+V for default clipboard manager"></video>

To disable the default clipboard manager popup from windows open Command prompt and run this command

Expand Down
44 changes: 26 additions & 18 deletions app.vue
Original file line number Diff line number Diff line change
@@ -1,27 +1,36 @@
<template>
<div style="pointer-events: auto;">
<div style="pointer-events: auto">
<NuxtPage />
</div>
</template>

<script setup lang="ts">
import { listen } from '@tauri-apps/api/event'
import { app, window } from '@tauri-apps/api';
import { onMounted } from 'vue'
import { listen } from "@tauri-apps/api/event";
import { app, window } from "@tauri-apps/api";
import { disable, enable } from "@tauri-apps/plugin-autostart";
import { onMounted } from "vue";

const keyboard = useKeyboard();
const { $settings } = useNuxtApp();

onMounted(async () => {
await listen('change_keybind', async () => {
console.log("change_keybind");
await navigateTo('/settings')
await listen("settings", async () => {
keyboard.unregisterAll();
await navigateTo("/settings");
await app.show();
await window.getCurrentWindow().show();
})
});

if ((await $settings.getSetting("autostart")) === "true") {
await enable();
} else {
await disable();
}

await listen('main_route', async () => {
console.log("main_route");
await navigateTo('/')
})
})
await listen("main_route", async () => {
await navigateTo("/");
});
});
</script>

<style lang="scss">
Expand Down Expand Up @@ -53,7 +62,6 @@ onMounted(async () => {
margin: 0;
padding: 0;
box-sizing: border-box;
color: #E5DFD5;
text-decoration: none;
font-family: SFRoundedRegular;
scroll-behavior: smooth;
Expand All @@ -62,9 +70,9 @@ onMounted(async () => {
position: relative;
z-index: 1;

--os-handle-bg: #ADA9A1;
--os-handle-bg-hover: #78756F;
--os-handle-bg-active: #78756F;
--os-handle-bg: #ada9a1;
--os-handle-bg-hover: #78756f;
--os-handle-bg-active: #78756f;
}

html,
Expand All @@ -79,4 +87,4 @@ body {
.os-scrollbar-horizontal {
display: none;
}
</style>
</style>
30 changes: 18 additions & 12 deletions assets/css/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ $mutedtext: #78756f;
position: fixed;
top: 0;
left: 0;
height: 54px;
height: 56px;
background-color: transparent;
outline: none;
border: none;
Expand All @@ -35,17 +35,18 @@ $mutedtext: #78756f;

.results {
position: absolute;
width: 284px;
top: 53px;
width: 286px;
top: 55px;
left: 0;
height: calc(100vh - 95px);
height: 417px;
border-right: 1px solid $divider;
display: flex;
flex-direction: column;
padding-inline: 8px;
padding-bottom: 8px;
overflow-y: auto;
overflow-x: hidden;
z-index: 3;

.result {
height: 40px;
Expand All @@ -59,6 +60,7 @@ $mutedtext: #78756f;
overflow: hidden;
text-overflow: clip;
white-space: nowrap;
color: $text;
}

.result {
Expand Down Expand Up @@ -96,20 +98,22 @@ $mutedtext: #78756f;

.content {
position: absolute;
top: 53px;
left: 284px;
height: calc(100vh - 254px);
top: 55px;
left: 285px;
height: 220px;
font-family: CommitMono !important;
font-size: 12px;
letter-spacing: 1;
border-radius: 10px;
width: calc(100vw - 286px);
width: 465px;
white-space: pre-wrap;
word-wrap: break-word;
display: flex;
flex-direction: column;
align-items: center;
overflow: hidden;
z-index: 2;
color: $text;

&:not(:has(.image)) {
padding: 8px;
Expand All @@ -128,7 +132,7 @@ $mutedtext: #78756f;
}

.bottom-bar {
height: 40px;
height: 39px;
width: calc(100vw - 2px);
backdrop-filter: blur(18px);
background-color: hsla(40, 3%, 16%, 0.8);
Expand Down Expand Up @@ -215,18 +219,20 @@ $mutedtext: #78756f;
display: flex;
flex-direction: column;
gap: 14px;
bottom: 40px;
left: 284px;
bottom: 39px;
left: 285px;
height: 160px;
width: calc(100vw - 286px);
width: 465px;
border-top: 1px solid $divider;
background-color: $primary;
padding: 14px;
z-index: 1;

.title {
font-family: SFRoundedSemiBold;
font-size: 12px;
letter-spacing: 0.6px;
color: $text;
}

.info-content {
Expand Down
Loading
Loading