change browser icon
This commit is contained in:
parent
62d9e42106
commit
772f1145d3
2 changed files with 27 additions and 11 deletions
|
|
@ -3,7 +3,7 @@ import DesktopIcon from './components/DesktopIcon';
|
||||||
import Window from './components/Window';
|
import Window from './components/Window';
|
||||||
import Sidebar from './components/Sidebar';
|
import Sidebar from './components/Sidebar';
|
||||||
import './App.css';
|
import './App.css';
|
||||||
import VScodeApp from './apps/vscode/vscode';
|
// import VScodeApp from './apps/vscode/vscode';
|
||||||
import YandexApp from './apps/yandex/Yandex';
|
import YandexApp from './apps/yandex/Yandex';
|
||||||
import TerminalApp from './apps/terminal/Terminal';
|
import TerminalApp from './apps/terminal/Terminal';
|
||||||
|
|
||||||
|
|
@ -49,12 +49,26 @@ const MainApp: React.FC = () => {
|
||||||
));
|
));
|
||||||
};
|
};
|
||||||
|
|
||||||
const openVS = () => {
|
// const openVS = () => {
|
||||||
openWindow('VS Code', <VScodeApp />, '💻', 'https://code.visualstudio.com');
|
// openWindow('VS Code', <VScodeApp />, '💻', 'https://code.visualstudio.com');
|
||||||
};
|
// };
|
||||||
|
|
||||||
|
const YandexIcon = () => (
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64" fill="none">
|
||||||
|
<rect width="64" height="64" rx="32" fill="white" />
|
||||||
|
<rect x="0.5" y="0.5" width="63" height="63" rx="31.5" stroke="black" stroke-opacity="0.1" />
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M52.8937 19.4244C52.8001 19.1802 52.6373 18.8832 52.4257 18.5616C52.0024 17.9146 51.3635 17.121 50.6554 16.3721V16.3681C49.8984 15.607 49.1252 14.9477 48.4985 14.5123C48.1851 14.2966 47.9002 14.1257 47.6642 14.0321C47.5462 13.9832 47.4281 13.9507 47.3142 13.9425C47.2043 13.9344 47.0659 13.9547 46.9601 14.0605L32.2849 28.3534C32.1221 28.5121 31.8576 28.5121 31.6948 28.3534L17.0195 14.0605C16.9137 13.9588 16.7753 13.9385 16.6655 13.9425C16.5556 13.9507 16.4335 13.9832 16.3155 14.0321C16.0794 14.1257 15.7905 14.2966 15.4812 14.5123C14.8545 14.9477 14.0812 15.6111 13.3243 16.3681V16.3721C12.6161 17.121 11.9772 17.9146 11.554 18.5616C11.3423 18.8832 11.1755 19.1802 11.0859 19.4244C11.0412 19.5465 11.0086 19.6686 11.0005 19.7785C10.9964 19.8884 11.0168 20.0308 11.1266 20.1366L27.5234 36.094C27.6699 36.2364 27.7513 36.4317 27.7513 36.6352L27.735 56.1536C27.735 56.3001 27.8204 56.41 27.8937 56.4791C27.971 56.5524 28.0728 56.6134 28.1867 56.6663C28.4146 56.7762 28.728 56.878 29.0983 56.9634C29.8471 57.1344 30.8686 57.2565 32 57.2565C33.1314 57.2565 34.1529 57.1344 34.9017 56.9634C35.272 56.878 35.5854 56.7762 35.8133 56.6663C35.9272 56.6134 36.029 56.5483 36.1063 56.4791C36.1796 56.41 36.265 56.3001 36.265 56.1536L36.2487 36.6352C36.2487 36.4317 36.3301 36.2364 36.4766 36.094L52.8734 20.1366C52.9832 20.0308 53.0036 19.8884 52.9995 19.7785C52.9954 19.6645 52.9588 19.5424 52.9141 19.4244H52.8937Z" fill="url(#paint0_linear_14620_7506)" />
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="paint0_linear_14620_7506" x1="11" y1="36.4172" x2="52.6048" y2="32.821" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0.3" stop-color="#FF6A16" />
|
||||||
|
<stop offset="0.542948" stop-color="#FF3227" />
|
||||||
|
<stop offset="0.89" stop-color="#FF66DD" />
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
||||||
|
);
|
||||||
const openYandex = () => {
|
const openYandex = () => {
|
||||||
openWindow('Yandex', <YandexApp />, '🌐', 'https://yandex.ru');
|
openWindow('Yandex', <YandexApp />, 'Я', 'https://yandex.ru');
|
||||||
};
|
};
|
||||||
|
|
||||||
const openTerminal = () => {
|
const openTerminal = () => {
|
||||||
|
|
@ -68,13 +82,15 @@ const MainApp: React.FC = () => {
|
||||||
backgroundPosition: 'center',
|
backgroundPosition: 'center',
|
||||||
width: '100%',
|
width: '100%',
|
||||||
height: '100%',
|
height: '100%',
|
||||||
position: 'relative',
|
position: 'absolute',
|
||||||
|
// position: 'relative',
|
||||||
overflow: 'hidden'
|
overflow: 'hidden'
|
||||||
}}>
|
}}>
|
||||||
<div className="icons-container">
|
<div className="icons-container">
|
||||||
<DesktopIcon icon="💻" name="VS Code" onClick={openVS} />
|
{/* <DesktopIcon icon="💻" name="VS Code" onClick={openVS} /> */}
|
||||||
<DesktopIcon icon="🌐" name="Yandex" onClick={openYandex} />
|
<DesktopIcon icon={YandexIcon()} name="Яндекс.Браузер" onClick={openYandex} />
|
||||||
<DesktopIcon icon="T" name="Terminal" onClick={openTerminal} />
|
{/* <DesktopIcon icon="🌐" name="Yandex" onClick={openYandex} /> */}
|
||||||
|
{/* <DesktopIcon icon="T" name="Terminal" onClick={openTerminal} /> */}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{windows.map(window => !window.isMinimized && (
|
{windows.map(window => !window.isMinimized && (
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
interface DesktopIconProps {
|
interface DesktopIconProps {
|
||||||
icon: string;
|
icon: string | any;
|
||||||
name: string;
|
name: string;
|
||||||
onClick: () => void;
|
onClick: () => void;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue