diff --git a/.gitignore b/.gitignore index db61fdc..4ba7535 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,5 @@ npm-debug.log* yarn-debug.log* yarn-error.log* *.ini + +/tmp \ No newline at end of file diff --git a/deploy.sh b/deploy.sh index 570bbe1..36a596a 100644 --- a/deploy.sh +++ b/deploy.sh @@ -1,7 +1,7 @@ #!/bin/bash # Edit these variables before deploying -DOMAIN=os.prozilla.dev +DOMAIN="os.prozilla.dev" COMMIT_MESSAGE="Deployed build to GitHub Pages" REPO_URL="https://github.com/Prozilla/ProzillaOS" @@ -11,7 +11,29 @@ echo -e "Domain: \e[0;36m$DOMAIN\e[0m" echo -e "Commit message: \e[0;36m$COMMIT_MESSAGE\e[0m" echo -e "Repository: \e[0;36m$REPO_URL\e[0m\n" +echo -e "\e[0;33mConfiguring routing...\e[0m" echo $DOMAIN > dist/CNAME +cp dist/index.html dist/404.html + +# Use template and pages data to generate index.html files +input="tmp/pages.csv" +template="tmp/template.html" +while IFS=";" read -r app_id app_name app_description +do + path="dist/$app_id/index.html" + echo -e "- dist/\e[0;36m$app_id/index.html\e[0m" + + mkdir -p "dist/$app_id" + cp $template $path + + # Fill template + sed -i "s/_APP_NAME/$app_name/g" $path + sed -i "s/_APP_DESCRIPTION/$app_description/g" $path + sed -i "s/_APP_ID/$app_id/g" $path +done < <(tail -n +2 $input) +rm -r tmp +echo "" + echo -e "\e[0;33mDeploying to GitHub Pages...\e[0m" if gh-pages -d dist -m $COMMIT_MESSAGE -r $REPO_URL ; then echo -e "\e[0;32m✓ Successfully deployed to \e[0;36mhttps://$DOMAIN/\e[0m" diff --git a/index.html b/index.html index 65cc7a8..3d27366 100644 --- a/index.html +++ b/index.html @@ -18,7 +18,7 @@ - + diff --git a/package.json b/package.json index 5ce2899..46165b6 100644 --- a/package.json +++ b/package.json @@ -10,9 +10,9 @@ "start": "vite --port 3000 --host", "build": "tsc && vite build", "serve": "vite preview", - "predeploy": "npm run sitemap && npm run build", + "predeploy": "npm run build && npm run prep", "deploy": "sh deploy.sh", - "sitemap": "node --experimental-specifier-resolution=node --loader ts-node/esm ./src/tools/sitemapGenerator.js" + "prep": "node --no-warnings --loader ts-node/esm ./src/tools/prep" }, "dependencies": { "@fortawesome/fontawesome-svg-core": "^6.4.0", diff --git a/public/assets/banner-logo-title.png b/public/assets/banner-logo-title.png index ec78795..e58817c 100644 Binary files a/public/assets/banner-logo-title.png and b/public/assets/banner-logo-title.png differ diff --git a/public/assets/icon-mask.svg b/public/assets/icon-mask.svg new file mode 100644 index 0000000..8f3d79c --- /dev/null +++ b/public/assets/icon-mask.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/sitemap.xml b/public/sitemap.xml deleted file mode 100644 index 1aa9836..0000000 --- a/public/sitemap.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - - https://os.prozilla.dev/ - 2024-6-9 - - - https://os.prozilla.dev/assets/wallpapers/vibrant-wallpaper-blue-purple-red.png - - - https://os.prozilla.dev/assets/wallpapers/abstract-mesh-gradient-orange-red-purple.png - - - https://os.prozilla.dev/assets/wallpapers/vibrant-wallpaper-purple-yellow.png - - - https://os.prozilla.dev/assets/wallpapers/abstract-wallpaper-mesh-gradient-cyan.png - - - https://os.prozilla.dev/assets/wallpapers/colorful-abstract-wallpaper-blue-red-green.png - - - https://os.prozilla.dev/assets/wallpapers/mesh-gradient-wallpaper-red-purple.png - - - https://os.prozilla.dev/assets/wallpapers/colorful-mesh-gradient-red-green.png - - - https://os.prozilla.dev/assets/wallpapers/flame-abstract-wallpaper-orange.png - - - https://os.prozilla.dev/assets/wallpapers/wave-abstract-wallpaper-teal.png - - - - - https://os.prozilla.dev/terminal - 2024-6-9 - - - https://os.prozilla.dev/settings - 2024-6-9 - - - https://os.prozilla.dev/media-viewer - 2024-6-9 - - - https://os.prozilla.dev/text-editor - 2024-6-9 - - - https://os.prozilla.dev/file-explorer - 2024-6-9 - - - https://os.prozilla.dev/calculator - 2024-6-9 - - - https://os.prozilla.dev/browser - 2024-6-9 - - - https://os.prozilla.dev/logic-sim - 2024-6-9 - - \ No newline at end of file diff --git a/src/components/_utils/button/Button.module.css b/src/components/_utils/button/Button.module.css index 0dc34d2..289a9b0 100644 --- a/src/components/_utils/button/Button.module.css +++ b/src/components/_utils/button/Button.module.css @@ -20,6 +20,6 @@ text-decoration: none; } -.ButtonLink > svg { +.Button > svg { margin-left: 0.5rem; } \ No newline at end of file diff --git a/src/components/_utils/button/Button.tsx b/src/components/_utils/button/Button.tsx index c5bb499..e407eff 100644 --- a/src/components/_utils/button/Button.tsx +++ b/src/components/_utils/button/Button.tsx @@ -40,6 +40,10 @@ export function Button(props: ButtonProps) { className={className} > {children} + {icon != null + ? + : null + } ); } } \ No newline at end of file diff --git a/src/components/desktop/Desktop.tsx b/src/components/desktop/Desktop.tsx index d25585c..0f8ced8 100644 --- a/src/components/desktop/Desktop.tsx +++ b/src/components/desktop/Desktop.tsx @@ -71,7 +71,7 @@ export const Desktop = memo(() => { { openWindowedModal({ - size: new Vector2(350, 350), + size: new Vector2(350, 400), Modal: (props) => }); }}/> diff --git a/src/components/modals/ModalView.tsx b/src/components/modals/ModalView.tsx index 2e2713b..b65796e 100644 --- a/src/components/modals/ModalView.tsx +++ b/src/components/modals/ModalView.tsx @@ -11,6 +11,7 @@ export interface ModalProps { fullscreen?: boolean; iconUrl?: string; title?: string; + standalone?: boolean; [key: string]: unknown; }; children?: ReactNode; diff --git a/src/components/modals/share/Share.module.css b/src/components/modals/share/Share.module.css index f89182f..809dbdb 100644 --- a/src/components/modals/share/Share.module.css +++ b/src/components/modals/share/Share.module.css @@ -73,6 +73,10 @@ select.Input > * { font-size: inherit; } +.Input:disabled + div { + opacity: 0.5; +} + .Input[type=checkbox] { display: none; } diff --git a/src/components/modals/share/Share.tsx b/src/components/modals/share/Share.tsx index 4b83a1d..246e93c 100644 --- a/src/components/modals/share/Share.tsx +++ b/src/components/modals/share/Share.tsx @@ -37,6 +37,7 @@ const APP_OPTIONS: Record[]> = { export function Share({ modal, params, ...props }: ModalProps) { const [appId, setAppId] = useState(params.appId ?? ""); const [fullscreen, setFullscreen] = useState(params.fullscreen ?? false); + const [standalone, setStandalone] = useState(params.standalone ?? false); const [options, setOptions] = useState({}); const [url, setUrl] = useState(null); const { alert } = useAlert(); @@ -45,9 +46,10 @@ export function Share({ modal, params, ...props }: ModalProps) { setUrl(generateUrl({ appId: appId !== "" ? appId : null, fullscreen, + standalone, ...options })); - }, [appId, fullscreen, options]); + }, [appId, fullscreen, standalone, options]); const onAppIdChange = (event: Event) => { const newAppId = (event.target as HTMLInputElement).value; @@ -74,6 +76,11 @@ export function Share({ modal, params, ...props }: ModalProps) { setFullscreen(newFullscreen); }; + const onStandaloneChange = (event: Event) => { + const newStandalone = (event.target as HTMLInputElement).checked; + setStandalone(newStandalone); + }; + const setOption = (name: string, value: string) => { setOptions((options = {}) => { options = { ...options }; @@ -99,6 +106,23 @@ export function Share({ modal, params, ...props }: ModalProps) { )} + {appId !== "" ? : null} {appId !== "" ?