Skip to content
This repository has been archived by the owner on Jan 14, 2025. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
raisfeld-ori committed Mar 14, 2024
2 parents dcc0650 + 54f7bac commit b4f7435
Show file tree
Hide file tree
Showing 9 changed files with 60 additions and 26 deletions.
Binary file added src/pages/main_page/assets/Terminal-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions src/pages/main_page/assets/Terminal-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
1 change: 0 additions & 1 deletion src/pages/main_page/assets/folder-line-icon.svg

This file was deleted.

Binary file added src/pages/main_page/assets/folder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/pages/main_page/assets/search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 6 additions & 11 deletions src/pages/main_page/internal_apps/file_system.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@ import App from './App';
import { invoke } from '@tauri-apps/api';
import { useState } from 'react';

function ContextMenu(){

return <div>
text here
</div>
}

function file_system(set_fs_html: React.Dispatch<React.SetStateAction<JSX.Element>>){
const [location, set_location] = useState("Home");
const [files, set_files] = useState([]);

Check failure on line 7 in src/pages/main_page/internal_apps/file_system.tsx

View workflow job for this annotation

GitHub Actions / build (windows-latest)

'files' is declared but its value is never read.
Expand All @@ -26,12 +19,14 @@ function file_system(set_fs_html: React.Dispatch<React.SetStateAction<JSX.Elemen
}
document.addEventListener('contextmenu', right_click);
return () => {
let app_html = <div className='frametest2'>
<div className='ApplicationDirectory'>
<h1 className='filesystemtxt2'>/{location}/</h1>
let Application = <div className='ApplicationDirectory'>
<h1 className='filesystemtxt2'>/{location}/</h1>
</div>

let app_html = <div className='frametest2'>
{Application}


{menu_open && <ContextMenu />}
</div>;
let app = <App element={app_html} name='feet pics'/>;
set_fs_html(app);
Expand Down
33 changes: 26 additions & 7 deletions src/pages/main_page/main_page.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,20 @@
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
}
.name{
color: white;
}
.navbar {
background-color: #3333338b;
overflow: hidden;
display: flex;
flex-flow: row wrap;
justify-content: flex-start;
flex-flow: row wrap;
justify-content: flex-end; /* Align items to the right */
position: fixed;
bottom: 0;
height: 5svh;
width: 100%;
}
}

.navbar *{
margin-left: 5px;
Expand All @@ -31,14 +35,16 @@
}

.navbar img{
width: 5svh;
height: 5svh;
width: 4.7svh;
height: 4.7svh;
margin-left: 2svh;
}

.time {
flex-flow: row wrap;
justify-content: flex-end;
justify-content: right;
padding-right: 1svh;
margin-left: 2svh;
}


Expand All @@ -58,7 +64,6 @@
position: absolute;
top: 0;
left: 0;
width: 10svw;
}

.selected{
Expand All @@ -82,4 +87,18 @@
pointer-events: none;
user-select: none;
height: 5svh;
}
.homeimg {
margin-right: auto;
}

.time{
color: white;
}

.draggable {
margin-left: 1svh;
margin-top: 1svh;
margin-bottom: 1svh;
margin-right: 1svh;
}
15 changes: 8 additions & 7 deletions src/pages/main_page/main_page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,26 @@ import './main_page.css';
import './main_page.css';
import { desktop_app } from './Grid';
import Grid from './Grid';
import folder from './assets/folder-line-icon.svg';
import menu_icon from './assets/laptop-icon.svg';
import search from './assets/search-icon.svg';
import folder from './assets/folder.png';
import menu_icon from './assets/computer-laptop-color-icon.webp';
import search from './assets/search.png';
import terminal from './assets/Terminal-icon.png';
import file_system from './internal_apps/file_system';
import { useState } from 'react';

export default function main_page(){
const [fs, set_fs] = useState(<></>);
const example_app = desktop_app("Dolphin", folder, file_system(set_fs));
const not_example_app = desktop_app("not example app", search, () => {console.log("test");});
const example_app = desktop_app( "Dolphin", folder, file_system(set_fs));
const not_example_app = desktop_app("Search", search, () => {console.log("test");});

return <div id='background'>
{fs}
<Grid apps={[example_app, not_example_app]} gridSize={50} margin={100}/>
<nav className='navbar'>
<img className='homeimg' src={menu_icon} alt="" />
<img className='searchimg' src={search} alt="" />
<p className='time'>12:09 AM</p>
<p className='time'>12/10/2027</p>
<img className='terminalimg' src={terminal} alt="" />
<p className='time'>12:09 AM <br /> 12/10/2027</p>
</nav>
</div>
}

0 comments on commit b4f7435

Please sign in to comment.