mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-04-28 10:28:09 -04:00
Merge branch 'main' of github.com:spacedriveapp/spacedrive into eng-1828-migration-to-new-cloud-api-system
This commit is contained in:
@@ -270,7 +270,11 @@ export const QuickPreview = () => {
|
||||
useShortcut('closeQuickPreview', (e) => {
|
||||
if (explorerStore.isCMDPOpen) return;
|
||||
e.preventDefault();
|
||||
getQuickPreviewStore().open = false;
|
||||
e.stopPropagation();
|
||||
// set timeout is to move the state change to the next event loop
|
||||
setTimeout(() => {
|
||||
getQuickPreviewStore().open = false;
|
||||
}, 0);
|
||||
});
|
||||
|
||||
// Toggle metadata
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import { FunnelSimple, Icon, Plus } from '@phosphor-icons/react';
|
||||
import { IconTypes } from '@sd/assets/util';
|
||||
import clsx from 'clsx';
|
||||
import { use } from 'i18next';
|
||||
import { memo, PropsWithChildren, useDeferredValue, useMemo, useState } from 'react';
|
||||
import { get } from 'react-hook-form';
|
||||
import { useFeatureFlag, useLibraryMutation } from '@sd/client';
|
||||
import {
|
||||
Button,
|
||||
@@ -10,11 +12,13 @@ import {
|
||||
Input,
|
||||
Popover,
|
||||
RadixCheckbox,
|
||||
toast,
|
||||
tw,
|
||||
usePopover
|
||||
} from '@sd/ui';
|
||||
import { useIsDark, useKeybind, useLocale } from '~/hooks';
|
||||
import { useIsDark, useKeybind, useLocale, useShortcut } from '~/hooks';
|
||||
|
||||
import { getQuickPreviewStore, useQuickPreviewStore } from '../Explorer/QuickPreview/store';
|
||||
import { AppliedFilters, InteractiveSection } from './AppliedFilters';
|
||||
import { useSearchContext } from './context';
|
||||
import { filterRegistry, SearchFilterCRUD, useToggleOptionSelected } from './Filters';
|
||||
@@ -334,6 +338,7 @@ function SaveSearchButton() {
|
||||
|
||||
function EscapeButton() {
|
||||
const search = useSearchContext();
|
||||
let { open: isQpOpen } = useQuickPreviewStore();
|
||||
|
||||
function escape() {
|
||||
search.setSearch?.(undefined);
|
||||
@@ -341,7 +346,16 @@ function EscapeButton() {
|
||||
search.setSearchBarFocused(false);
|
||||
}
|
||||
|
||||
useKeybind(['Escape'], escape);
|
||||
useShortcut('explorerEscape', (e) => {
|
||||
isQpOpen = getQuickPreviewStore().open;
|
||||
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
// Check the open state from the store
|
||||
if (!isQpOpen) {
|
||||
escape();
|
||||
}
|
||||
});
|
||||
|
||||
return (
|
||||
<kbd
|
||||
|
||||
@@ -174,7 +174,7 @@ function KeybindTable({ data }: { data: ShortcutCategory['shortcuts'] }) {
|
||||
|
||||
return symbols.map((symbol) => (
|
||||
<div key={symbol} className="inline-flex items-center">
|
||||
<kbd className="ml-2 rounded-lg border border-app-line bg-app-box px-2 py-1 text-[10.5px] tracking-widest shadow">
|
||||
<kbd className="ml-2 rounded-lg border border-app-line bg-app-box px-1.5 py-0.5 text-sm tracking-widest shadow">
|
||||
{symbol}
|
||||
</kbd>
|
||||
</div>
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
--color-accent-faint: 208, 100%, 64%;
|
||||
--color-accent-deep: 208, 100%, 47%;
|
||||
// text
|
||||
--color-ink: var(--dark-hue), 0%, 100%;
|
||||
--color-ink: var(--dark-hue), 35%, 92%;
|
||||
--color-ink-dull: var(--dark-hue), 10%, 70%;
|
||||
--color-ink-faint: var(--dark-hue), 10%, 55%;
|
||||
// sidebar
|
||||
--color-sidebar: var(--dark-hue), 15%, 7%;
|
||||
--color-sidebar-box: var(--dark-hue), 15%, 16%;
|
||||
--color-sidebar-line: var(--dark-hue), 15%, 23%;
|
||||
--color-sidebar-ink: var(--dark-hue), 0%, 100%;
|
||||
--color-sidebar-ink: var(--dark-hue), 15%, 92%;
|
||||
--color-sidebar-ink-dull: var(--dark-hue), 10%, 70%;
|
||||
--color-sidebar-ink-faint: var(--dark-hue), 10%, 55%;
|
||||
--color-sidebar-divider: var(--dark-hue), 15%, 17%;
|
||||
@@ -47,7 +47,7 @@
|
||||
// menu
|
||||
--color-menu: var(--dark-hue), 15%, 10%;
|
||||
--color-menu-line: var(--dark-hue), 15%, 14%;
|
||||
--color-menu-ink: var(--dark-hue), 10%, 100%;
|
||||
--color-menu-ink: var(--dark-hue), 25%, 92%;
|
||||
--color-menu-faint: var(--dark-hue), 5%, 80%;
|
||||
--color-menu-hover: var(--dark-hue), 15%, 30%;
|
||||
--color-menu-selected: var(--dark-hue), 5%, 30%;
|
||||
|
||||
@@ -130,6 +130,8 @@ curl -LSs 'https://gist.githubusercontent.com/HeavenVolkoff/0993c42bdb0b952eb5bf
|
||||
|
||||
# Fill the Categories entry in .desktop file
|
||||
sed -i 's/^Categories=.*/Categories=System;FileTools;FileManager;/' "${_tmp}/data/usr/share/applications/spacedrive.desktop"
|
||||
# Rename sd-desktop to spacedrive
|
||||
sed -i 's/=sd-desktop/=spacedrive/' "${_tmp}/data/usr/share/applications/spacedrive.desktop"
|
||||
|
||||
# Fix data permissions
|
||||
find "${_tmp}/data" -type d -exec chmod 755 {} +
|
||||
|
||||
Reference in New Issue
Block a user