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

Finder window #72

Open
wants to merge 47 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
ae4650a
Update README.md
jaswch Dec 24, 2022
77a8a88
Update apps.store.ts
jaswch Dec 25, 2022
e89fed1
Update apps-config.ts
jaswch Dec 25, 2022
bde2d81
Update AppNexus.svelte
jaswch Dec 25, 2022
f9978d4
Create Notes.svelte
jaswch Dec 25, 2022
bfedc3e
Create count.svelte
jaswch Dec 25, 2022
58fcf90
Create stores.js
jaswch Dec 25, 2022
a7dbd7e
Update README.md
jaswch Dec 25, 2022
de3a3d4
Update apps-config.ts
jaswch Dec 25, 2022
1b07714
Delete count.svelte
jaswch Dec 27, 2022
8a0bd12
Update Notes.svelte
jaswch Dec 27, 2022
7cd7bf3
Update AppNexus.svelte
jaswch Dec 27, 2022
4d2e874
Update and rename stores.js to store.ts
jaswch Dec 28, 2022
a4ac47e
Update Notes.svelte
jaswch Dec 28, 2022
c4dad30
Delete 256.png
jaswch Dec 28, 2022
91580be
Add files via upload
jaswch Dec 28, 2022
d65ebfa
Update Notes.svelte
jaswch Dec 28, 2022
f68b6e5
Update Notes.svelte
jaswch Dec 30, 2022
19c2c20
Update Notes.svelte
jaswch Dec 30, 2022
7717cf5
Update Notes.svelte
jaswch Dec 30, 2022
845657c
Update Notes.svelte
jaswch Jan 22, 2023
1d1abbc
Update Notes.svelte
jaswch Mar 21, 2023
11703b0
Add files via upload
jaswch Mar 21, 2023
4956615
Update Notes.svelte
jaswch Mar 21, 2023
d817456
Delete public/Notes-icons directory
jaswch Mar 22, 2023
23a6b2e
Add files via upload
jaswch Mar 22, 2023
99567a1
Update Notes.svelte
jaswch Mar 22, 2023
b741a0a
Add files via upload
jaswch May 7, 2023
0df429d
Update apps.store.ts
jaswch May 7, 2023
fed2bc0
Update AppNexus.svelte
jaswch May 7, 2023
efbef61
Add files via upload
jaswch May 7, 2023
a8bbb3c
Update apps-config.ts
jaswch May 7, 2023
225f3d4
Update apps.store.ts
jaswch Jul 14, 2023
1575e17
Update apps-config.ts
jaswch Jul 14, 2023
4477485
Update AppNexus.svelte
jaswch Jul 14, 2023
7d1fa3f
Delete Finder.svelte
jaswch Jul 14, 2023
195abe1
Delete public/Finder-side-bar-icons directory
jaswch Jul 14, 2023
28b08eb
Update apps-config.ts
jaswch Jul 15, 2023
1118ff1
Update apps-config.ts
jaswch Jul 15, 2023
816d358
Update apps.store.ts
jaswch Jul 15, 2023
cb8b45c
Update AppNexus.svelte
jaswch Jul 15, 2023
df3e253
Delete src/components/apps/Notes directory
jaswch Jul 15, 2023
f69b14a
Update apps.store.ts
jaswch Jul 15, 2023
a8b22b0
Add files via upload
jaswch Jul 15, 2023
bd21bab
Add files via upload
jaswch Jul 15, 2023
c7cd4de
Update AppNexus.svelte
jaswch Jul 15, 2023
32e4f87
Update apps-config.ts
jaswch Jul 15, 2023
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
Binary file added public/Finder-side-bar-icons/AirDrop.webp
Binary file not shown.
Binary file added public/Finder-side-bar-icons/Desktop.webp
Binary file not shown.
Binary file added public/Finder-side-bar-icons/Documents.webp
Binary file not shown.
Binary file added public/Finder-side-bar-icons/Downloads.webp
Binary file not shown.
Binary file added public/Finder-side-bar-icons/Drive.webp
Binary file not shown.
Binary file added public/Finder-side-bar-icons/Folder.webp
Binary file not shown.
Binary file added public/Finder-side-bar-icons/Home.webp
Binary file not shown.
Binary file added public/Finder-side-bar-icons/Pictures.webp
Binary file not shown.
Binary file added public/Finder-side-bar-icons/Recent.webp
Binary file not shown.
Binary file added public/Notes-icons/New.webp
Binary file not shown.
Binary file added public/Notes-icons/delete.webp
Binary file not shown.
Binary file added public/Notes-icons/edit.webp
Binary file not shown.
Binary file removed public/app-icons/notes/256.png
Binary file not shown.
Binary file added public/app-icons/notes/256.webp
Binary file not shown.
4 changes: 4 additions & 0 deletions src/components/apps/AppNexus.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
{#await import('./VSCode/VSCode.svelte') then { default: VSCode }}
<VSCode {isBeingDragged} />
{/await}
{:else if appID === 'finder'}
{#await import('./Finder/Finder.svelte') then { default: Finder }}
<Finder />
{/await}
{:else if appID === 'calculator'}
{#await import('./Calculator/Calculator.svelte') then { default: Calculator }}
<Calculator />
Expand Down
182 changes: 182 additions & 0 deletions src/components/apps/Finder/Finder.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
<script lang="ts">
import { theme } from '🍎/stores/theme.store';


</script>

<section class="container">
<header class="titlebar app-window-drag-handle">
<span>
Finder
</span>
</header>

<aside class:light={$theme.scheme === 'light'}>
<nav>
<p>Favourites</p>
<!-- svelte-ignore a11y-missing-attribute -->
<a><img src="/Finder-side-bar-icons/Recent.webp" alt="recent"> Recent </a>
<!-- svelte-ignore a11y-missing-attribute -->
<a><img src="/Finder-side-bar-icons/AirDrop.webp" alt="airdrop"> AirDrop </a>
<!-- svelte-ignore a11y-missing-attribute -->
<a><img src="/Finder-side-bar-icons/Desktop.webp" alt="desktop"> Desktop </a>
<!-- svelte-ignore a11y-missing-attribute -->
<a><img src="/Finder-side-bar-icons/Documents.webp" alt="documents"> Documents </a>
<!-- svelte-ignore a11y-missing-attribute -->
<a><img src="/Finder-side-bar-icons/Pictures.webp" alt="pictures"> Pictures </a>
<!-- svelte-ignore a11y-missing-attribute -->
<a><img src="/Finder-side-bar-icons/Downloads.webp" alt="downloads"> Downloads </a>

<hr />
<p>Locations</p>
<!-- svelte-ignore a11y-missing-attribute -->
<a><img src="/Finder-side-bar-icons/Drive.webp" alt="drive"> Macintosh HD </a>
<!-- svelte-ignore a11y-missing-attribute -->
<a><img src="/Finder-side-bar-icons/Folder.webp" alt="folder"> macOS Web </a>
</nav>
</aside>
<section class="content">
</section>
</section>

<style lang="scss">
.container {
--color: var(--system-color-light-hsl);

display: grid;
grid-template-columns: 12rem 1fr;
grid-template-rows: 3rem 1fr;

border-radius: inherit;

background-image: linear-gradient(
to right,
hsla(var(--color), 0.7) 12rem,
hsla(var(--color), 1) 12rem 100%
);

transition: --color 200ms ease-in;

color: var(--system-color-dark);
}

.titlebar {
grid-area: 1 / 1 / span 1 / span 2;

display: flex;
justify-content: center;

z-index: 1;

padding: 0.9rem 1rem;

width: 100%;

border-top-left-radius: inherit;
border-top-right-radius: inherit;

user-select: none;

span {
color: gray;
font-weight: 550;
font-size: 1.5rem;
letter-spacing: 0.3px;
}
}

aside {
grid-area: 1 / 1 / span 2 / span 1;

transform: translateZ(0);

height: calc(100% - 2.7px);
width: calc(12rem - 2.27px);

margin: 1.8px 0 0px 1.8px;

border-top-left-radius: 0.5rem;
border-bottom-left-radius: inherit;

&::before {
content: '';

width: inherit;
height: inherit;

border-radius: inherit;

position: fixed;
left: 0;
top: 0;

z-index: -1;
backdrop-filter: blur(12px);
}

&.light {
height: calc(100% - 3px);
width: calc(12rem - 2.5px);

margin: 1.7px 0 0px 1.7px;

border-top-left-radius: 0.5rem;
border-bottom-left-radius: 0.5rem;
}

nav {
display: flex;
flex-direction: column;
gap: 0.2rem;

margin: 3rem 0.6rem;

hr {
display: block;

width: 100%;
height: 1px;

background-color: hsla(var(--system-color-dark-hsl), 0.2);

border: none;
}

a {
display: flex;
gap: 0.4rem;
align-items: center;

color: hsla(var(--system-color-dark-hsl), 0.9);
text-decoration: none;
font-weight: 400;

padding: 0.5rem 0.5rem;

border-radius: 0.4rem;

transition: background-color 100ms ease;

&:hover {
background-color: hsla(var(--system-color-dark-hsl), 0.2);
}
}
}
}

.content {
border-top: solid 0.9px hsla(var(--system-color-dark-hsl), 0.3);
grid-area: 2 / 2 / span 1 / span 1;

display: flex;
flex-direction: row;
align-items: left;

padding: 1rem;
}

p {
color: gray;
}

</style>
12 changes: 1 addition & 11 deletions src/configs/apps/apps-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,7 @@ const finder = createAppConfig({
resizable: true,

// dockBreaksBefore: true,
shouldOpenWindow: false,
});

const safari = createAppConfig({
title: 'Safari',
resizable: true,
});

const systemPreferences = createAppConfig({
title: 'System Preferences',
resizable: true,
shouldOpenWindow: true,
});

const purusTwitter = createAppConfig({
Expand Down
2 changes: 1 addition & 1 deletion src/stores/apps.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export type AppID = keyof typeof appsConfig;
/** Which apps are currently open */
export const openApps = writable<Record<AppID, boolean>>({
wallpapers: false,
finder: true,
finder: false,
vscode: false,
calculator: false,
// safari: false,
Expand Down