diff --git a/interface/app/$libraryId/Layout/Sidebar/JobManager/index.tsx b/interface/app/$libraryId/Layout/Sidebar/JobManager/index.tsx index f65cddc6fb89..be31193c0d3d 100644 --- a/interface/app/$libraryId/Layout/Sidebar/JobManager/index.tsx +++ b/interface/app/$libraryId/Layout/Sidebar/JobManager/index.tsx @@ -1,4 +1,4 @@ -import { Check, Trash, X } from '@phosphor-icons/react'; +import { Check, PushPin, Trash, X } from '@phosphor-icons/react'; import { useQueryClient } from '@tanstack/react-query'; import dayjs from 'dayjs'; import { useState } from 'react'; @@ -11,6 +11,7 @@ import { import { Button, PopoverClose, toast, Tooltip } from '@sd/ui'; import { useIsDark, useLocale } from '~/hooks'; +import { getSidebarStore, useSidebarStore } from '../store'; import IsRunningJob from './IsRunningJob'; import JobGroup from './JobGroup'; @@ -46,6 +47,7 @@ function sortJobData(jobs: IJobGroup[]) { export function JobManager() { const queryClient = useQueryClient(); const [toggleConfirmation, setToggleConfirmation] = useState(false); + const store = useSidebarStore(); const jobGroups = useLibraryQuery(['jobs.reports']); @@ -79,7 +81,17 @@ export function JobManager() { return (
- {t('recent_jobs')} + + + + {t('recent_jobs')}
{toggleConfirmation ? (
@@ -103,14 +115,18 @@ export function JobManager() { size="icon" > - + )} - diff --git a/interface/app/$libraryId/Layout/Sidebar/SidebarLayout/Footer.tsx b/interface/app/$libraryId/Layout/Sidebar/SidebarLayout/Footer.tsx index 1fb27e2e9833..dc2d23240f0b 100644 --- a/interface/app/$libraryId/Layout/Sidebar/SidebarLayout/Footer.tsx +++ b/interface/app/$libraryId/Layout/Sidebar/SidebarLayout/Footer.tsx @@ -10,19 +10,22 @@ import { } from '@sd/client'; import { Button, ButtonLink, Popover, Tooltip, usePopover } from '@sd/ui'; import { useKeysMatcher, useLocale, useShortcut } from '~/hooks'; +import { useRoutingContext } from '~/RoutingContext'; import { usePlatform } from '~/util/Platform'; import DebugPopover from '../DebugPopover'; import { IsRunningJob, JobManager } from '../JobManager'; +import { useSidebarStore } from '../store'; import FeedbackButton from './FeedbackButton'; export default () => { const { library } = useClientContext(); + const { visible } = useRoutingContext(); + const { t } = useLocale(); const debugState = useDebugState(); const navigate = useNavigate(); const symbols = useKeysMatcher(['Meta', 'Shift']); - - const { t } = useLocale(); + const store = useSidebarStore(); useShortcut('navToSettings', (e) => { e.stopPropagation(); @@ -74,7 +77,10 @@ export default () => { useSnapshot(store); +export const getSidebarStore = () => store; diff --git a/interface/app/$libraryId/TopBar/index.tsx b/interface/app/$libraryId/TopBar/index.tsx index 1bf062c84d33..c9416eaba584 100644 --- a/interface/app/$libraryId/TopBar/index.tsx +++ b/interface/app/$libraryId/TopBar/index.tsx @@ -165,9 +165,7 @@ function useTabKeybinds(props: { addTab(): void; removeTab(index: number): void useShortcut('newTab', (e) => { if (!visible) return; - e.stopPropagation(); - props.addTab(); }); diff --git a/interface/locales/by/common.json b/interface/locales/by/common.json index 020f39ecb028..691b0acf8357 100644 --- a/interface/locales/by/common.json +++ b/interface/locales/by/common.json @@ -450,5 +450,6 @@ "go_to_tag": "Ir para marcação", "no_labels": "Sem etiquetas", "search_for_files_and_actions": "Pesquisar por arquivos e ações...", - "toggle_command_palette": "Alternar paleta de comandos" + "toggle_command_palette": "Alternar paleta de comandos", + "pin": "шпілька" } diff --git a/interface/locales/de/common.json b/interface/locales/de/common.json index 46cd18b8e158..29de3c16d023 100644 --- a/interface/locales/de/common.json +++ b/interface/locales/de/common.json @@ -450,5 +450,6 @@ "go_to_tag": "Gehe zum Markieren", "no_labels": "Keine Etiketten", "search_for_files_and_actions": "Nach Dateien und Aktionen suchen...", - "toggle_command_palette": "Befehlspalette umschalten" + "toggle_command_palette": "Befehlspalette umschalten", + "pin": "Stift" } diff --git a/interface/locales/en/common.json b/interface/locales/en/common.json index f6de94fe9f21..c8a0fb79cf6c 100644 --- a/interface/locales/en/common.json +++ b/interface/locales/en/common.json @@ -450,5 +450,6 @@ "your_account": "Your account", "your_account_description": "Spacedrive account and information.", "your_local_network": "Your Local Network", - "your_privacy": "Your Privacy" + "your_privacy": "Your Privacy", + "pin": "Pin" } diff --git a/interface/locales/es/common.json b/interface/locales/es/common.json index 79ad4dcf8163..a0947d64e870 100644 --- a/interface/locales/es/common.json +++ b/interface/locales/es/common.json @@ -450,5 +450,6 @@ "go_to_tag": "Ir a la etiqueta", "no_labels": "Sin etiquetas", "search_for_files_and_actions": "Buscar archivos y acciones...", - "toggle_command_palette": "Alternar paleta de comandos" + "toggle_command_palette": "Alternar paleta de comandos", + "pin": "Alfiler" } diff --git a/interface/locales/fr/common.json b/interface/locales/fr/common.json index 104dff954712..92c717bab6cf 100644 --- a/interface/locales/fr/common.json +++ b/interface/locales/fr/common.json @@ -450,5 +450,6 @@ "go_to_tag": "Aller au tag", "no_labels": "Pas d'étiquettes", "search_for_files_and_actions": "Rechercher des fichiers et des actions...", - "toggle_command_palette": "Basculer la palette de commandes" + "toggle_command_palette": "Basculer la palette de commandes", + "pin": "Épingle" } diff --git a/interface/locales/it/common.json b/interface/locales/it/common.json index 623a855a97a8..691a3c736d69 100644 --- a/interface/locales/it/common.json +++ b/interface/locales/it/common.json @@ -450,5 +450,6 @@ "update_downloaded": "Aggiornamento scaricato. Riavvia Spacedrive per eseguire l'installazione", "updated_successfully": "Aggiornato con successo, sei sulla versione {{version}}", "version": "Versione {{versione}}", - "view_changes": "Visualizza modifiche" + "view_changes": "Visualizza modifiche", + "pin": "Spillo" } diff --git a/interface/locales/ja/common.json b/interface/locales/ja/common.json index b3c722aa298c..d7a25f76ce85 100644 --- a/interface/locales/ja/common.json +++ b/interface/locales/ja/common.json @@ -450,5 +450,6 @@ "go_to_tag": "タグに移動", "no_labels": "ラベルなし", "search_for_files_and_actions": "ファイルとアクションを検索します...", - "toggle_command_palette": "コマンドパレットの切り替え" + "toggle_command_palette": "コマンドパレットの切り替え", + "pin": "ピン" } diff --git a/interface/locales/nl/common.json b/interface/locales/nl/common.json index 0996e784aa00..ec0ce0456038 100644 --- a/interface/locales/nl/common.json +++ b/interface/locales/nl/common.json @@ -450,5 +450,6 @@ "go_to_tag": "Ga naar taggen", "no_labels": "Geen etiketten", "search_for_files_and_actions": "Zoeken naar bestanden en acties...", - "toggle_command_palette": "Schakel het opdrachtpalet in of uit" + "toggle_command_palette": "Schakel het opdrachtpalet in of uit", + "pin": "Pin" } diff --git a/interface/locales/ru/common.json b/interface/locales/ru/common.json index 9e829a5ca3b1..6da81a82d7fb 100644 --- a/interface/locales/ru/common.json +++ b/interface/locales/ru/common.json @@ -450,5 +450,6 @@ "go_to_tag": "Перейти к тегу", "no_labels": "Нет ярлыков", "search_for_files_and_actions": "Поиск файлов и действий...", - "toggle_command_palette": "Переключить палитру команд" + "toggle_command_palette": "Переключить палитру команд", + "pin": "приколоть" } diff --git a/interface/locales/tr/common.json b/interface/locales/tr/common.json index 84c89c591ee2..870241345d55 100644 --- a/interface/locales/tr/common.json +++ b/interface/locales/tr/common.json @@ -450,5 +450,6 @@ "go_to_tag": "Etikete git", "no_labels": "Etiket yok", "search_for_files_and_actions": "Dosyaları ve eylemleri arayın...", - "toggle_command_palette": "Komut paletini değiştir" + "toggle_command_palette": "Komut paletini değiştir", + "pin": "Toplu iğne" } diff --git a/interface/locales/zh-CN/common.json b/interface/locales/zh-CN/common.json index c1b4e972ec29..75aea489f1f9 100644 --- a/interface/locales/zh-CN/common.json +++ b/interface/locales/zh-CN/common.json @@ -450,5 +450,6 @@ "go_to_tag": "转到标签", "no_labels": "无标签", "search_for_files_and_actions": "搜索文件和操作...", - "toggle_command_palette": "切换命令面板" + "toggle_command_palette": "切换命令面板", + "pin": "别针" } diff --git a/interface/locales/zh-TW/common.json b/interface/locales/zh-TW/common.json index c02515dedc36..80415242eaa1 100644 --- a/interface/locales/zh-TW/common.json +++ b/interface/locales/zh-TW/common.json @@ -450,5 +450,6 @@ "go_to_tag": "轉到標籤", "no_labels": "無標籤", "search_for_files_and_actions": "搜尋文件和操作...", - "toggle_command_palette": "切換命令面板" + "toggle_command_palette": "切換命令面板", + "pin": "別針" } diff --git a/packages/ui/src/Popover.tsx b/packages/ui/src/Popover.tsx index a1c2a6a8f761..32363a7486e2 100644 --- a/packages/ui/src/Popover.tsx +++ b/packages/ui/src/Popover.tsx @@ -47,7 +47,7 @@ export const Popover = ({ popover, trigger, children, disabled, className, ...pr }, [setOpen]); return ( - + {trigger} @@ -64,7 +64,7 @@ export const Popover = ({ popover, trigger, children, disabled, className, ...pr 'bg-app-overlay', 'border border-app-line', 'shadow-2xl', - 'animate-in fade-in', + 'radix-state-closed:animate-out radix-state-closed:fade-out-0', className )} {...props}