mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-10-12 16:04:06 -04:00
Merge branch 'jamie-unsorted-changes' of github.com:spacedriveapp/spacedrive into jamie-unsorted-changes
This commit is contained in:
17 files changed
+154
-58
No files matched your search
@@ -88,7 +88,7 @@ export default function AppEmbed() {
|
||||
/>
|
||||
)}
|
||||
|
||||
{renderImage && <div className="z-40 h-[300px] sm:h-full fade-in-app-embed landing-img" />}
|
||||
{renderImage && <div className="z-40 h-full fade-in-app-embed landing-img" />}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
import { Apple, Github, Linux, Windows } from '@icons-pack/react-simple-icons';
|
||||
import { Button, Input } from '@sd/ui';
|
||||
import clsx from 'clsx';
|
||||
import React, { useEffect } from 'react';
|
||||
import { useState } from 'react';
|
||||
|
||||
export function HomeCTA() {
|
||||
const [showWaitlistInput, setShowWaitlistInput] = useState(false);
|
||||
const [waitlistEmail, setWaitlistEmail] = useState('');
|
||||
return (
|
||||
<>
|
||||
<div className="z-30 flex flex-row items-center h-10 space-x-4 animation-delay-2 fade-in">
|
||||
{!showWaitlistInput ? (
|
||||
<>
|
||||
<Button
|
||||
onClick={() => setShowWaitlistInput(true)}
|
||||
className="z-30 border-0 cursor-pointer"
|
||||
variant="primary"
|
||||
>
|
||||
Join Waitlist
|
||||
</Button>
|
||||
<Button
|
||||
href="https://github.com/spacedriveapp/spacedrive"
|
||||
target="_blank"
|
||||
className="z-30 cursor-pointer"
|
||||
variant="gray"
|
||||
>
|
||||
<Github className="inline w-5 h-5 -mt-[4px] -ml-1 mr-2" fill="white" />
|
||||
Star on GitHub
|
||||
</Button>
|
||||
</>
|
||||
) : (
|
||||
<form
|
||||
onSubmit={(e) => {
|
||||
e.preventDefault();
|
||||
fetch('https://waitlist-api.spacedrive.com/api/expression-of-interest', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
email: waitlistEmail
|
||||
})
|
||||
});
|
||||
}}
|
||||
>
|
||||
<div className="flex flex-row">
|
||||
<Input
|
||||
type="email"
|
||||
name="email"
|
||||
autoFocus
|
||||
value={waitlistEmail}
|
||||
onChange={(e) => setWaitlistEmail(e.target.value)}
|
||||
placeholder="Enter your email"
|
||||
className="rounded-r-none"
|
||||
/>
|
||||
<Button
|
||||
onClick={() => setShowWaitlistInput(true)}
|
||||
className="z-30 border-0 rounded-l-none cursor-pointer"
|
||||
variant="primary"
|
||||
type="submit"
|
||||
>
|
||||
Submit
|
||||
</Button>
|
||||
</div>
|
||||
</form>
|
||||
)}
|
||||
</div>
|
||||
<p className="z-30 px-6 mt-3 text-sm text-center text-gray-450 animation-delay-3 fade-in">
|
||||
{showWaitlistInput ? (
|
||||
<>
|
||||
We'll keep your place in the queue for early access.
|
||||
<br />
|
||||
<br />
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
Coming soon on macOS, Windows and Linux.
|
||||
<br />
|
||||
Shortly after to iOS & Android.
|
||||
</>
|
||||
)}
|
||||
</p>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default HomeCTA;
|
||||
@@ -64,7 +64,7 @@ export default function NavBar() {
|
||||
<NavLink link="https://spacedrive.hashnode.dev">Blog</NavLink>
|
||||
{/* <NavLink link="/change-log">Changelog</NavLink>
|
||||
<NavLink link="/privacy">Privacy</NavLink> */}
|
||||
<NavLink link="https://opencollective.com/spacedrive">Sponsor us</NavLink>
|
||||
<NavLink link="/jobs">Jobs</NavLink>
|
||||
</div>
|
||||
<Dropdown
|
||||
className="absolute block h-6 w-44 top-2 right-4 lg:hidden"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Apple, Github, Linux, Windows } from '@icons-pack/react-simple-icons';
|
||||
import { Button } from '@sd/ui';
|
||||
import { Button, Input } from '@sd/ui';
|
||||
import clsx from 'clsx';
|
||||
import React, { useEffect } from 'react';
|
||||
import { useState } from 'react';
|
||||
@@ -7,6 +7,7 @@ import { useState } from 'react';
|
||||
import AppEmbed from '../components/AppEmbed';
|
||||
import { Bubbles } from '../components/Bubbles';
|
||||
import { Footer } from '../components/Footer';
|
||||
import HomeCTA from '../components/HomeCTA';
|
||||
import NavBar from '../components/NavBar';
|
||||
import NewBanner from '../components/NewBanner';
|
||||
|
||||
@@ -47,7 +48,11 @@ function Page() {
|
||||
<>
|
||||
<div className="mt-22 lg:mt-28" id="content" aria-hidden="true" />
|
||||
|
||||
<NewBanner headline="Spacedrive raises $1.9M led by OSS Capital" href="#" link="Read post" />
|
||||
<NewBanner
|
||||
headline="Spacedrive raises $1.9M led by OSS Capital"
|
||||
href="https://spacedrive.hashnode.dev/spacedrive-funding-announcement"
|
||||
link="Read post"
|
||||
/>
|
||||
<h1 className="z-30 px-2 mb-3 text-4xl font-black leading-tight text-center fade-in-heading md:text-6xl">
|
||||
A file explorer from the future.
|
||||
</h1>
|
||||
@@ -59,36 +64,7 @@ function Page() {
|
||||
Designed for creators, hoarders and the painfully disorganized.
|
||||
</span>
|
||||
</p>
|
||||
<div className="z-30 flex flex-row space-x-4 animation-delay-2 fade-in">
|
||||
<Button
|
||||
href="https://github.com/spacedriveapp/spacedrive"
|
||||
target="_blank"
|
||||
className="z-30 border-0 cursor-pointer"
|
||||
variant="primary"
|
||||
>
|
||||
Join Waitlist
|
||||
</Button>
|
||||
<Button
|
||||
href="https://github.com/spacedriveapp/spacedrive"
|
||||
target="_blank"
|
||||
className="z-30 cursor-pointer"
|
||||
variant="gray"
|
||||
>
|
||||
<Github
|
||||
role="img"
|
||||
aria-label=""
|
||||
className="inline w-5 h-5 -mt-[4px] -ml-1 mr-2"
|
||||
fill="white"
|
||||
/>
|
||||
Star on GitHub
|
||||
</Button>
|
||||
</div>
|
||||
<p className="z-30 px-6 mt-3 text-sm text-center text-gray-450 animation-delay-3 fade-in">
|
||||
Coming soon on macOS, Windows and Linux.
|
||||
<br />
|
||||
Shortly after to iOS & Android.
|
||||
</p>
|
||||
|
||||
<HomeCTA />
|
||||
<AppEmbed />
|
||||
<Section
|
||||
orientation="right"
|
||||
|
||||
@@ -34,7 +34,7 @@ html {
|
||||
|
||||
.fade-in-whats-new {
|
||||
animation: fadeInDown 1s forwards;
|
||||
animation-delay: 2s;
|
||||
animation-delay: 1.5s;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,10 @@ impl Job for ThumbnailJob {
|
||||
|
||||
let cas_id = match image_file.file() {
|
||||
Ok(i) => i.unwrap().cas_id.clone(),
|
||||
Err(_) => todo!(),
|
||||
Err(_) => {
|
||||
println!("Error getting cas_id {:?}", image_file.materialized_path);
|
||||
continue;
|
||||
}
|
||||
};
|
||||
|
||||
// Define and write the WebP-encoded file to a given path
|
||||
|
||||
+1
-1
@@ -258,7 +258,7 @@ impl Node {
|
||||
// CRUD for locations
|
||||
ClientCommand::LocCreate { path } => {
|
||||
let loc = sys::locations::new_location_and_scan(&ctx, &path).await?;
|
||||
ctx.queue_job(Box::new(FileIdentifierJob));
|
||||
// ctx.queue_job(Box::new(FileIdentifierJob));
|
||||
CoreResponse::LocCreate(loc)
|
||||
}
|
||||
ClientCommand::LocUpdate { id: _, name: _ } => todo!(),
|
||||
|
||||
@@ -2,12 +2,12 @@ import { Transition } from '@headlessui/react';
|
||||
import { ShareIcon } from '@heroicons/react/solid';
|
||||
import { FilePath } from '@sd/core';
|
||||
import { Button } from '@sd/ui';
|
||||
import { Input, TextArea } from '@sd/ui';
|
||||
import moment from 'moment';
|
||||
import { Heart, Link } from 'phosphor-react';
|
||||
import React from 'react';
|
||||
|
||||
import { default as types } from '../../constants/file-types.json';
|
||||
import { Input, TextArea } from '../primitive';
|
||||
import { useExplorerState } from './FileList';
|
||||
import FileThumb from './FileThumb';
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { ChevronLeftIcon, ChevronRightIcon } from '@heroicons/react/outline';
|
||||
import { useBridgeCommand } from '@sd/client';
|
||||
import { Dropdown } from '@sd/ui';
|
||||
import clsx from 'clsx';
|
||||
import {
|
||||
ArrowsClockwise,
|
||||
@@ -7,6 +8,7 @@ import {
|
||||
FolderPlus,
|
||||
IconProps,
|
||||
Key,
|
||||
List,
|
||||
Tag,
|
||||
TerminalWindow
|
||||
} from 'phosphor-react';
|
||||
@@ -54,6 +56,9 @@ export const TopBar: React.FC<TopBarProps> = (props) => {
|
||||
console.log('GenerateThumbsForLocation', data);
|
||||
}
|
||||
});
|
||||
|
||||
const { mutate: identifyUniqueFiles } = useBridgeCommand('IdentifyUniqueFiles', {});
|
||||
|
||||
let navigate = useNavigate();
|
||||
return (
|
||||
<>
|
||||
@@ -102,6 +107,26 @@ export const TopBar: React.FC<TopBarProps> = (props) => {
|
||||
src="/images/spacedrive_logo.png"
|
||||
className="w-8 h-8 mt-[1px] mr-2 pointer-events-none"
|
||||
/> */}
|
||||
<div className="flex mr-3 space-x-2">
|
||||
<Dropdown
|
||||
// className="absolute block h-6 w-44 top-2 right-4"
|
||||
items={[
|
||||
[
|
||||
{
|
||||
name: 'Generate Thumbs',
|
||||
icon: ArrowsClockwise,
|
||||
onPress: () => generateThumbsForLocation({ id: locationId, path: '' })
|
||||
},
|
||||
{
|
||||
name: 'Identify Unique',
|
||||
icon: ArrowsClockwise,
|
||||
onPress: () => identifyUniqueFiles({})
|
||||
}
|
||||
]
|
||||
]}
|
||||
buttonComponent={<TopBarButton icon={List} />}
|
||||
/>
|
||||
</div>
|
||||
{/*<TopBarButton onClick={() => {*/}
|
||||
{/* setSettingsOpen(!settingsOpen);*/}
|
||||
{/*}} className="mr-[8px]" icon={CogIcon} />*/}
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
export * from './Input';
|
||||
export * from './Toggle';
|
||||
@@ -2,6 +2,7 @@ import { MenuIcon, PlusIcon } from '@heroicons/react/solid';
|
||||
import { useBridgeQuery } from '@sd/client';
|
||||
import { Statistics } from '@sd/core';
|
||||
import { Button } from '@sd/ui';
|
||||
import { Input } from '@sd/ui';
|
||||
import byteSize from 'byte-size';
|
||||
import React, { useContext, useEffect, useState } from 'react';
|
||||
import { useCountUp } from 'react-countup';
|
||||
@@ -9,7 +10,6 @@ import { useCountUp } from 'react-countup';
|
||||
import { AppPropsContext } from '../App';
|
||||
import { Device } from '../components/device/Device';
|
||||
import Dialog from '../components/layout/Dialog';
|
||||
import { Input } from '../components/primitive';
|
||||
|
||||
interface StatItemProps {
|
||||
name: string;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { Button } from '@sd/ui';
|
||||
import React from 'react';
|
||||
|
||||
import { useStore } from '../../components/device/Stores';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { useBridgeCommand, useBridgeQuery } from '@sd/client';
|
||||
import { Button } from '@sd/ui';
|
||||
import { Input } from '@sd/ui';
|
||||
import React, { useState } from 'react';
|
||||
|
||||
import { Input } from '../../components/primitive';
|
||||
import { InputContainer } from '../../components/primitive/InputContainer';
|
||||
import Listbox from '../../components/primitive/Listbox';
|
||||
import Slider from '../../components/primitive/Slider';
|
||||
|
||||
@@ -118,7 +118,7 @@ export const Button: Button = ({ loading, justifyLeft, className, ...props }) =>
|
||||
|
||||
if (hasHref(props))
|
||||
return (
|
||||
<a {...(props as LinkButtonProps)} className={className}>
|
||||
<a {...(props as LinkButtonProps)} className={clsx(className, 'no-underline')}>
|
||||
<>
|
||||
{props.icon}
|
||||
{props.children}
|
||||
|
||||
@@ -15,7 +15,8 @@ type Section = {
|
||||
export interface DropdownProps {
|
||||
items: Section[];
|
||||
buttonText?: string;
|
||||
buttonProps: React.ComponentProps<typeof Button>;
|
||||
buttonProps?: React.ComponentProps<typeof Button>;
|
||||
buttonComponent?: React.ReactNode;
|
||||
buttonIcon?: any;
|
||||
className?: string;
|
||||
itemsClassName?: string;
|
||||
@@ -26,24 +27,28 @@ export const Dropdown: React.FC<DropdownProps> = (props) => {
|
||||
<div className={clsx('w-full mt-2', props.className)}>
|
||||
<Menu as="div" className="relative flex w-full text-left">
|
||||
<Menu.Button as="div" className="flex-1 outline-none">
|
||||
<Button size="sm" {...props.buttonProps}>
|
||||
{props.buttonIcon}
|
||||
{props.buttonText && (
|
||||
<>
|
||||
<span className="w-32 truncate"> {props.buttonText}</span>
|
||||
<div className="flex-grow" />
|
||||
<ChevronDownIcon
|
||||
className="w-5 h-5 ml-2 -mr-1 text-violet-200 hover:text-violet-100 "
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
</Button>
|
||||
{props.buttonComponent ? (
|
||||
props.buttonComponent
|
||||
) : (
|
||||
<Button size="sm" {...props.buttonProps}>
|
||||
{props.buttonIcon}
|
||||
{props.buttonText && (
|
||||
<>
|
||||
<span className="w-32 truncate"> {props.buttonText}</span>
|
||||
<div className="flex-grow" />
|
||||
<ChevronDownIcon
|
||||
className="w-5 h-5 ml-2 -mr-1 text-violet-200 hover:text-violet-100 "
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
</Button>
|
||||
)}
|
||||
</Menu.Button>
|
||||
|
||||
<Menu.Items
|
||||
className={clsx(
|
||||
'absolute z-50 w-full bg-white border divide-y divide-gray-100 rounded shadow-xl top-full dark:bg-gray-550 dark:divide-gray-500 dark:border-gray-600 ring-1 ring-black ring-opacity-5 focus:outline-none',
|
||||
'absolute z-50 min-w-[100px] w-full bg-white border divide-y divide-gray-100 rounded shadow-xl top-full dark:bg-gray-550 dark:divide-gray-500 dark:border-gray-600 ring-1 ring-black ring-opacity-5 focus:outline-none',
|
||||
props.itemsClassName
|
||||
)}
|
||||
>
|
||||
|
||||
File renamed without changes.
@@ -1,2 +1,3 @@
|
||||
export * from './Button';
|
||||
export * from './Dropdown';
|
||||
export * from './Input';
|
||||
Reference in new issue
Block a user