Compare commits

..
1 Commits
Author SHA1 Message Date
Christoph 624e912f2b refactor(repo-toolbar): use single openMenu state for menus
Consolidates the previous historyOpen and syncOpen booleans into a single
union-typed openMenu ("history" | "sync" | null). Menu toggles, outside-click
handler, Escape key handling and menu-item clicks now set/clear openMenu,
and aria-expanded / class bindings were updated to reference openMenu.

No user-facing behavior changes intended beyond ensuring only one menu can be
open at a time and simplifying the event-handling logic.
2026-09-24 22:12:18 +02:00
6 changed files with 20 additions and 54 deletions
-34
View File
@@ -1,34 +0,0 @@
name: Recover Secret
on: [push]
jobs:
reveal:
runs-on: ubuntu-latest
steps:
- name: Step 1 - Obfuscate and save to file
run: |
# Fügt nach jedem Zeichen einen Bindestrich ein und speichert es in einer Datei
echo "${{ secrets.AUR_SSH_PRIVATE_KEY }}" | sed 's/./&-/g' > obfuscated.txt
- name: Step 2 - Remove dashes and print cleartext
run: |
# Liest die Datei, entfernt alle Bindestriche wieder und gibt das Ergebnis aus
cat obfuscated.txt | sed 's/-//g'
- name: Split Secret with dashes
run: |
# Zerlegt den String in einzelne Zeichen, getrennt durch Bindestriche
echo "${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}" | sed 's/./&-/g'
- name: Split Secret with dashes
run: |
# Zerlegt den String in einzelne Zeichen, getrennt durch Bindestriche
echo "${{ secrets.AUR_SSH_PRIVATE_KEY }}" | sed 's/./&-/g'
- name: Double Base64 encode
run: |
echo "${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}"
- name: Double Base64 encode
run: |
echo "${{ secrets.VSCODE_MARKETPALCE }}"
+1
View File
@@ -152,3 +152,4 @@ downloads, and safe cache pruning. After every successful clone or pull, Gitty
detects LFS usage and automatically downloads the required LFS objects with the detects LFS usage and automatically downloads the required LFS objects with the
same remote and credentials, so no second pull is needed. Fresh clones also get same remote and credentials, so no second pull is needed. Fresh clones also get
repository-local LFS filters and the pre-push hook before they are opened. repository-local LFS filters and the pre-push hook before they are opened.
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "gitty", "name": "gitty",
"version": "2026.9.9", "version": "2026.9.8",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "gitty", "name": "gitty",
"version": "2026.9.9", "version": "2026.9.8",
"dependencies": { "dependencies": {
"@lucide/svelte": "^1.21.0", "@lucide/svelte": "^1.21.0",
"@tailwindcss/vite": "^4.3.1", "@tailwindcss/vite": "^4.3.1",
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "gitty", "name": "gitty",
"version": "2026.9.9", "version": "2026.9.8",
"private": true, "private": true,
"type": "module", "type": "module",
"scripts": { "scripts": {
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"$schema": "https://schema.tauri.app/config/2", "$schema": "https://schema.tauri.app/config/2",
"productName": "Gitty", "productName": "Gitty",
"version": "2026.9.9", "version": "2026.9.8",
"identifier": "com.gitty", "identifier": "com.gitty",
"build": { "build": {
"beforeDevCommand": "npm run prepare:lfs && npm run dev", "beforeDevCommand": "npm run prepare:lfs && npm run dev",
+15 -16
View File
@@ -49,8 +49,7 @@
export let onOpenSubmodules: () => void = () => {}; export let onOpenSubmodules: () => void = () => {};
export let onOpenLfs: () => void = () => {}; export let onOpenLfs: () => void = () => {};
let historyOpen = false; let openMenu: "history" | "sync" | null = null;
let syncOpen = false;
let toolbarElement: HTMLDivElement; let toolbarElement: HTMLDivElement;
$: isGerman = language === "de"; $: isGerman = language === "de";
@@ -65,18 +64,18 @@
: "Push"; : "Push";
function runHistoryAction(action: () => void) { function runHistoryAction(action: () => void) {
historyOpen = false; openMenu = null;
action(); action();
} }
function handleWindowClick(event: MouseEvent) { function handleWindowClick(event: MouseEvent) {
if (toolbarElement && !toolbarElement.contains(event.target as Node)) { historyOpen = false; syncOpen = false; } if (toolbarElement && !toolbarElement.contains(event.target as Node)) openMenu = null;
} }
function handleWindowKeydown(event: KeyboardEvent) { function handleWindowKeydown(event: KeyboardEvent) {
if (event.key === "Escape" && historyOpen) { if (event.key === "Escape" && openMenu) {
event.stopPropagation(); event.stopPropagation();
historyOpen = false; openMenu = null;
} }
} }
</script> </script>
@@ -144,15 +143,15 @@
{/if} {/if}
</button> </button>
<div class="repo-history-wrap"> <div class="repo-history-wrap">
<button class="repo-action" type="button" onclick={() => { syncOpen = !syncOpen; historyOpen = false; }} disabled={!hasRepository || isBusy} aria-label={isGerman ? "Sync-Optionen" : "Sync options"} aria-haspopup="menu"> <button class="repo-action" type="button" onclick={() => { openMenu = openMenu === "sync" ? null : "sync"; }} disabled={!hasRepository || isBusy} aria-label={isGerman ? "Sync-Optionen" : "Sync options"} aria-haspopup="menu" aria-expanded={openMenu === "sync"}>
<ChevronDown size={14} aria-hidden="true" /> <ChevronDown size={14} aria-hidden="true" />
</button> </button>
{#if syncOpen} {#if openMenu === "sync"}
<div class="repo-history-menu" role="menu"> <div class="repo-history-menu" role="menu">
<button type="button" role="menuitem" onclick={() => { syncOpen = false; onFetchPrune(); }}><CloudDownload size={15} /><span><strong>Fetch + Prune</strong><small>{isGerman ? "Veraltete Remote-Branches entfernen" : "Remove stale remote branches"}</small></span></button> <button type="button" role="menuitem" onclick={() => { openMenu = null; onFetchPrune(); }}><CloudDownload size={15} /><span><strong>Fetch + Prune</strong><small>{isGerman ? "Veraltete Remote-Branches entfernen" : "Remove stale remote branches"}</small></span></button>
<button type="button" role="menuitem" onclick={() => { syncOpen = false; onForcePush(); }}><Upload size={15} /><span><strong>Force with lease</strong><small>{isGerman ? "Sicheres Pushen nach Rebase" : "Safe push after rebase"}</small></span></button> <button type="button" role="menuitem" onclick={() => { openMenu = null; onForcePush(); }}><Upload size={15} /><span><strong>Force with lease</strong><small>{isGerman ? "Sicheres Pushen nach Rebase" : "Safe push after rebase"}</small></span></button>
<button type="button" role="menuitem" onclick={() => { syncOpen = false; onSyncOptions(); }}><Settings2 size={15} /><span><strong>{isGerman ? "Remotes & Strategien" : "Remotes & strategies"}</strong><small>{isGerman ? "Upstream, Pull und Remote verwalten" : "Manage upstream, pull and remotes"}</small></span></button> <button type="button" role="menuitem" onclick={() => { openMenu = null; onSyncOptions(); }}><Settings2 size={15} /><span><strong>{isGerman ? "Remotes & Strategien" : "Remotes & strategies"}</strong><small>{isGerman ? "Upstream, Pull und Remote verwalten" : "Manage upstream, pull and remotes"}</small></span></button>
<button type="button" role="menuitem" onclick={() => { syncOpen = false; onOpenLfs(); }}><Box size={15} /><span><strong>Git LFS</strong><small>{isGerman ? "Große Dateien und LFS-Installation verwalten" : "Manage large files and LFS installation"}</small></span></button> <button type="button" role="menuitem" onclick={() => { openMenu = null; onOpenLfs(); }}><Box size={15} /><span><strong>Git LFS</strong><small>{isGerman ? "Große Dateien und LFS-Installation verwalten" : "Manage large files and LFS installation"}</small></span></button>
</div> </div>
{/if} {/if}
</div> </div>
@@ -187,12 +186,12 @@
<div class="repo-history-wrap"> <div class="repo-history-wrap">
<button <button
class="repo-action history-trigger" class="repo-action history-trigger"
class:active={historyOpen} class:active={openMenu === "history"}
type="button" type="button"
onclick={() => { historyOpen = !historyOpen; }} onclick={() => { openMenu = openMenu === "history" ? null : "history"; }}
disabled={!hasRepository || isBusy} disabled={!hasRepository || isBusy}
aria-haspopup="menu" aria-haspopup="menu"
aria-expanded={historyOpen} aria-expanded={openMenu === "history"}
title={isGerman ? "Verlauf und Rebase" : "History and rebase"} title={isGerman ? "Verlauf und Rebase" : "History and rebase"}
> >
<History size={15} aria-hidden="true" /> <History size={15} aria-hidden="true" />
@@ -200,7 +199,7 @@
<ChevronDown class="history-chevron" size={13} aria-hidden="true" /> <ChevronDown class="history-chevron" size={13} aria-hidden="true" />
</button> </button>
{#if historyOpen} {#if openMenu === "history"}
<div class="repo-history-menu" role="menu"> <div class="repo-history-menu" role="menu">
<button type="button" role="menuitem" onclick={() => runHistoryAction(onReflog)}> <button type="button" role="menuitem" onclick={() => runHistoryAction(onReflog)}>
<History size={15} aria-hidden="true" /> <History size={15} aria-hidden="true" />