Skip to content

Commit

Permalink
adjustment in prettier & added format check cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
Sir-Thom committed Nov 2, 2023
1 parent 18d5b28 commit b533556
Show file tree
Hide file tree
Showing 25 changed files with 837 additions and 812 deletions.
17 changes: 16 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,17 @@
node_modules/**
vite.config.ts
vite.config.ts
src-tauri/target/**
src-tauri/tauri.conf.json
src-tauri/Cargo.toml
src-tauri/Cargo.lock
src-tauri/.gitignore
docker/**
.vscode/**
public/**
.eslintrc
.github/workflows/dependency-review.yml
.github/workflows/format.yml
.prettierrc
package.json
postcss.config.cjs
vite-env.d.ts
83 changes: 50 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,17 @@
<br>

# Note this is a rework to make it into a tauri web app.

## Table of Contents
- [Dependancies](#dependancies)
- [Installation](#installation)
- [Uninstall](#uninstall)
- [Update](#update)
- [Patterns](#patterns)

- [Dependancies](#dependancies)
- [Installation](#installation)
- [Uninstall](#uninstall)
- [Update](#update)
- [Patterns](#patterns)

## Dependancies

```
python3
gtk3
Expand All @@ -35,66 +38,80 @@ gst-rtsp-server
pyinstaller
pip3
```

if pyinstaller is not in your distribution repository
you can install it with this command **note: execute them whit sudo**
you can install it with this command **note: execute them whit sudo**

```
pip install -U pyinstaller
```

## Installation

for x86_64 architecture

```
git clone https://github.com/Thomas-Toulouse/Magic-Eye.git
cd Magic-Eye
make
```

for ARM_64 architecture

```
git clone https://github.com/Thomas-Toulouse/Magic-Eye.git
cd Magic-Eye
make installArm
```

## Uninstall

```
cd Magic-Eye
make uninstall
```

## Update

for x86_64 architecture

```
cd Magic-Eye
make update
```

for ARM_64 architecture

```
cd Magic-Eye
make updateArm
```
## Patterns

| Patterns | config arguments |
|-----------------------------------------------------------------------------------------------------|------------------------------------------------------------|
| <img src="/.asset/pattern/Preview_Magic_Eye_Client.png" width="120" heigth=120> |<p align="center">smpte-rp-219</p> |
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_smpte.png" width="120" heigth=120> |<p align="center">smpte</p>
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_snow.png" width="120" heigth=120> |<p align="center">snow</p>
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_black.png" width="120" heigth=120> |<p align="center">black</p>
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_red.png" width="120" heigth=120> |<p align="center">red</p>
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_blue.png" width="120" heigth=120> |<p align="center">blue</p>
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_green.png" width="120" heigth=120> |<p align="center">green</p>
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_checker1.png" width="120" heigth=120> |<p align="center">checkers-1</p>
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_checker2.png" width="120" heigth=120> |<p align="center">checkers-2</p>
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_checker4.png" width="120" heigth=120> |<p align="center">checkers-4</p>
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_checker8.png" width="120" heigth=120> |<p align="center">checkers-8</p>
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_circular.png" width="120" heigth=120> |<p align="center">circular</p>
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_smpte75.png" width="120" heigth=120> |<p align="center">smpte75</p>
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_zoneplate.png" width="120" heigth=120> |<p align="center">zone-plate kx2=20 ky2=20 kt=1</p>
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_gamut.png" width="120" heigth=120> |<p align="center">gamut</p>
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_chromazoneplate.png" width="120" heigth=120> |<p align="center">chroma-zone-plate kx2=20 ky2=20 kt=1</p>
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_solidcolor.png" width="120" heigth=120> |<p align="center">solid-color</p>
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_ball.png" width="120" heigth=120> |<p align="center">ball</p>
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_smpte100.png" width="120" heigth=120> |<p align="center">smpte100</p>
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_bar.png" width="120" heigth=120> |<p align="center">bar</p>
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_pinwheel.png" width="120" heigth=120> |<p align="center">pinwheel</p>
| <img src="/.asset/pattern/Preview_Magic_Eye_Client_spokes.png" width="120" heigth=120> |<p align="center">spokes</p>
| <img src="/.asset/pattern/Preview_Magic_Eye_Client_gradient.png" width="120" heigth=120> |<p align="center">gradient</p>
| <img src="/.asset/pattern/Preview_Magic_Eye_Client_color.png" width="120" heigth=120> |<p align="center">colors</p>
## Patterns

| Patterns | config arguments |
| ----------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
| <img src="/.asset/pattern/Preview_Magic_Eye_Client.png" width="120" heigth=120> | <p align="center">smpte-rp-219</p> |
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_smpte.png" width="120" heigth=120> | <p align="center">smpte</p> |
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_snow.png" width="120" heigth=120> | <p align="center">snow</p> |
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_black.png" width="120" heigth=120> | <p align="center">black</p> |
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_red.png" width="120" heigth=120> | <p align="center">red</p> |
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_blue.png" width="120" heigth=120> | <p align="center">blue</p> |
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_green.png" width="120" heigth=120> | <p align="center">green</p> |
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_checker1.png" width="120" heigth=120> | <p align="center">checkers-1</p> |
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_checker2.png" width="120" heigth=120> | <p align="center">checkers-2</p> |
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_checker4.png" width="120" heigth=120> | <p align="center">checkers-4</p> |
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_checker8.png" width="120" heigth=120> | <p align="center">checkers-8</p> |
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_circular.png" width="120" heigth=120> | <p align="center">circular</p> |
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_smpte75.png" width="120" heigth=120> | <p align="center">smpte75</p> |
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_zoneplate.png" width="120" heigth=120> | <p align="center">zone-plate kx2=20 ky2=20 kt=1</p> |
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_gamut.png" width="120" heigth=120> | <p align="center">gamut</p> |
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_chromazoneplate.png" width="120" heigth=120> | <p align="center">chroma-zone-plate kx2=20 ky2=20 kt=1</p> |
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_solidcolor.png" width="120" heigth=120> | <p align="center">solid-color</p> |
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_ball.png" width="120" heigth=120> | <p align="center">ball</p> |
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_smpte100.png" width="120" heigth=120> | <p align="center">smpte100</p> |
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_bar.png" width="120" heigth=120> | <p align="center">bar</p> |
| <img src="/.asset/pattern/Preview-Magic_Eye_Client_pinwheel.png" width="120" heigth=120> | <p align="center">pinwheel</p> |
| <img src="/.asset/pattern/Preview_Magic_Eye_Client_spokes.png" width="120" heigth=120> | <p align="center">spokes</p> |
| <img src="/.asset/pattern/Preview_Magic_Eye_Client_gradient.png" width="120" heigth=120> | <p align="center">gradient</p> |
| <img src="/.asset/pattern/Preview_Magic_Eye_Client_color.png" width="120" heigth=120> | <p align="center">colors</p> |
28 changes: 14 additions & 14 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />

<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="stylesheet" href="/src/styles.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Magic-Eye</title>
</head>
<head>
<meta charset="UTF-8" />

<body>
<div id="root"></div>

<script type="module" src="/src/main.tsx"></script>
</body>
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="stylesheet" href="/src/styles.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Magic-Eye</title>
</head>

<body>
<div id="root"></div>

<script type="module" src="/src/main.tsx"></script>
</body>
</html>
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
"version": "0.0.1",
"type": "module",
"scripts": {
"format": "prettier --config .prettierrc 'src/**/*.tsx' --write",
"check-format": "prettier . --check",
"format": "prettier . --write --log-level silent",
"lint": "eslint . --ext .tsx",
"dev": "prettier --config .prettierrc 'src/**/*.tsx' --write && eslint . --ext .tsx && vite --host",
"dev": "prettier . ---check && eslint . --ext .tsx && vite --host",
"build": "tsc && vite build",
"preview": "vite preview",
"tauri": "tauri"
Expand Down
10 changes: 5 additions & 5 deletions postcss.config.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
plugins: {
tailwindcss: {},
autoprefixer: {}
}
};
99 changes: 50 additions & 49 deletions splashscreen.html
Original file line number Diff line number Diff line change
@@ -1,53 +1,54 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
<head>
<meta charset="UTF-8" />

<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="stylesheet" href="/src/styles.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="stylesheet" href="/src/styles.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<title>Loading Screen</title>
<style>
:root {
background-color: #1c1c1c;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
50% {
transform: rotate(180deg);
}
}
</style>
</head>
<body>

<svg
style="position: fixed;
left: 45%;
top: 35%;
-webkit-transform: translateY(25%);
-ms-transform: translateY(25%);
-webkit-transform: translateX(25%);
-ms-transform: translateX(-45%);
transform: translateX(-45%);
transform: translateY(25%);
animation: spin 2s linear infinite;"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
width="120"
height="120"
preserveAspectRatio="xMaxYMax meet"
>
<path
d="M18.364 5.63604L16.9497 7.05025C15.683 5.7835 13.933 5 12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19C15.866 19 19 15.866 19 12H21C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C14.4853 3 16.7353 4.00736 18.364 5.63604Z"
fill="rgba(0,123,255,1)"
></path>
</svg>
</body>
<title>Loading Screen</title>
<style>
:root {
background-color: #1c1c1c;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
50% {
transform: rotate(180deg);
}
}
</style>
</head>
<body>
<svg
style="
position: fixed;
left: 45%;
top: 35%;
-webkit-transform: translateY(25%);
-ms-transform: translateY(25%);
-webkit-transform: translateX(25%);
-ms-transform: translateX(-45%);
transform: translateX(-45%);
transform: translateY(25%);
animation: spin 2s linear infinite;
"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
width="120"
height="120"
preserveAspectRatio="xMaxYMax meet"
>
<path
d="M18.364 5.63604L16.9497 7.05025C15.683 5.7835 13.933 5 12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19C15.866 19 19 15.866 19 12H21C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C14.4853 3 16.7353 4.00736 18.364 5.63604Z"
fill="rgba(0,123,255,1)"
></path>
</svg>
</body>
</html>
6 changes: 3 additions & 3 deletions src/interfaces/IAlert.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export interface IAlert {
message: string;
timer: number;
OnClose: () => void;
message: string;
timer: number;
OnClose: () => void;
}
7 changes: 3 additions & 4 deletions src/interfaces/ICheckbox.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
export default interface ICheckbox {
checked: boolean;

onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
value: any
value: any;
className?: string;

}
}
8 changes: 4 additions & 4 deletions src/interfaces/IDropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
type Event = (event: React.ChangeEvent<HTMLSelectElement>) => void;

export interface IDropdown {
options: (string | number)[];
value: string | number;
onChange: Event;
className?: string;
options: (string | number)[];
value: string | number;
onChange: Event;
className?: string;
}
5 changes: 2 additions & 3 deletions src/interfaces/IListbox.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
interface ListBoxProps {
data: Array<{ [key: string]: any }>;

}
data: Array<{ [key: string]: any }>;
}
2 changes: 1 addition & 1 deletion src/interfaces/IMenuItem.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export interface IMenuItem {
label: string;
label: string;
}
6 changes: 3 additions & 3 deletions src/interfaces/IModal.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export interface IModal {
isOpen: boolean;
onClose: () => void;
children: React.ReactNode;
isOpen: boolean;
onClose: () => void;
children: React.ReactNode;
}
Loading

0 comments on commit b533556

Please sign in to comment.