Right click, whiteboard and calender
No files matched your search
@@ -0,0 +1,121 @@
|
||||
Creative Commons Legal Code
|
||||
|
||||
CC0 1.0 Universal
|
||||
|
||||
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
||||
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
|
||||
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
||||
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
||||
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
|
||||
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
|
||||
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
|
||||
HEREUNDER.
|
||||
|
||||
Statement of Purpose
|
||||
|
||||
The laws of most jurisdictions throughout the world automatically confer
|
||||
exclusive Copyright and Related Rights (defined below) upon the creator
|
||||
and subsequent owner(s) (each and all, an "owner") of an original work of
|
||||
authorship and/or a database (each, a "Work").
|
||||
|
||||
Certain owners wish to permanently relinquish those rights to a Work for
|
||||
the purpose of contributing to a commons of creative, cultural and
|
||||
scientific works ("Commons") that the public can reliably and without fear
|
||||
of later claims of infringement build upon, modify, incorporate in other
|
||||
works, reuse and redistribute as freely as possible in any form whatsoever
|
||||
and for any purposes, including without limitation commercial purposes.
|
||||
These owners may contribute to the Commons to promote the ideal of a free
|
||||
culture and the further production of creative, cultural and scientific
|
||||
works, or to gain reputation or greater distribution for their Work in
|
||||
part through the use and efforts of others.
|
||||
|
||||
For these and/or other purposes and motivations, and without any
|
||||
expectation of additional consideration or compensation, the person
|
||||
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
|
||||
is an owner of Copyright and Related Rights in the Work, voluntarily
|
||||
elects to apply CC0 to the Work and publicly distribute the Work under its
|
||||
terms, with knowledge of his or her Copyright and Related Rights in the
|
||||
Work and the meaning and intended legal effect of CC0 on those rights.
|
||||
|
||||
1. Copyright and Related Rights. A Work made available under CC0 may be
|
||||
protected by copyright and related or neighboring rights ("Copyright and
|
||||
Related Rights"). Copyright and Related Rights include, but are not
|
||||
limited to, the following:
|
||||
|
||||
i. the right to reproduce, adapt, distribute, perform, display,
|
||||
communicate, and translate a Work;
|
||||
ii. moral rights retained by the original author(s) and/or performer(s);
|
||||
iii. publicity and privacy rights pertaining to a person's image or
|
||||
likeness depicted in a Work;
|
||||
iv. rights protecting against unfair competition in regards to a Work,
|
||||
subject to the limitations in paragraph 4(a), below;
|
||||
v. rights protecting the extraction, dissemination, use and reuse of data
|
||||
in a Work;
|
||||
vi. database rights (such as those arising under Directive 96/9/EC of the
|
||||
European Parliament and of the Council of 11 March 1996 on the legal
|
||||
protection of databases, and under any national implementation
|
||||
thereof, including any amended or successor version of such
|
||||
directive); and
|
||||
vii. other similar, equivalent or corresponding rights throughout the
|
||||
world based on applicable law or treaty, and any national
|
||||
implementations thereof.
|
||||
|
||||
2. Waiver. To the greatest extent permitted by, but not in contravention
|
||||
of, applicable law, Affirmer hereby overtly, fully, permanently,
|
||||
irrevocably and unconditionally waives, abandons, and surrenders all of
|
||||
Affirmer's Copyright and Related Rights and associated claims and causes
|
||||
of action, whether now known or unknown (including existing as well as
|
||||
future claims and causes of action), in the Work (i) in all territories
|
||||
worldwide, (ii) for the maximum duration provided by applicable law or
|
||||
treaty (including future time extensions), (iii) in any current or future
|
||||
medium and for any number of copies, and (iv) for any purpose whatsoever,
|
||||
including without limitation commercial, advertising or promotional
|
||||
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
|
||||
member of the public at large and to the detriment of Affirmer's heirs and
|
||||
successors, fully intending that such Waiver shall not be subject to
|
||||
revocation, rescission, cancellation, termination, or any other legal or
|
||||
equitable action to disrupt the quiet enjoyment of the Work by the public
|
||||
as contemplated by Affirmer's express Statement of Purpose.
|
||||
|
||||
3. Public License Fallback. Should any part of the Waiver for any reason
|
||||
be judged legally invalid or ineffective under applicable law, then the
|
||||
Waiver shall be preserved to the maximum extent permitted taking into
|
||||
account Affirmer's express Statement of Purpose. In addition, to the
|
||||
extent the Waiver is so judged Affirmer hereby grants to each affected
|
||||
person a royalty-free, non transferable, non sublicensable, non exclusive,
|
||||
irrevocable and unconditional license to exercise Affirmer's Copyright and
|
||||
Related Rights in the Work (i) in all territories worldwide, (ii) for the
|
||||
maximum duration provided by applicable law or treaty (including future
|
||||
time extensions), (iii) in any current or future medium and for any number
|
||||
of copies, and (iv) for any purpose whatsoever, including without
|
||||
limitation commercial, advertising or promotional purposes (the
|
||||
"License"). The License shall be deemed effective as of the date CC0 was
|
||||
applied by Affirmer to the Work. Should any part of the License for any
|
||||
reason be judged legally invalid or ineffective under applicable law, such
|
||||
partial invalidity or ineffectiveness shall not invalidate the remainder
|
||||
of the License, and in such case Affirmer hereby affirms that he or she
|
||||
will not (i) exercise any of his or her remaining Copyright and Related
|
||||
Rights in the Work or (ii) assert any associated claims and causes of
|
||||
action with respect to the Work, in either case contrary to Affirmer's
|
||||
express Statement of Purpose.
|
||||
|
||||
4. Limitations and Disclaimers.
|
||||
|
||||
a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
||||
surrendered, licensed or otherwise affected by this document.
|
||||
b. Affirmer offers the Work as-is and makes no representations or
|
||||
warranties of any kind concerning the Work, express, implied,
|
||||
statutory or otherwise, including without limitation warranties of
|
||||
title, merchantability, fitness for a particular purpose, non
|
||||
infringement, or the absence of latent or other defects, accuracy, or
|
||||
the present or absence of errors, whether or not discoverable, all to
|
||||
the greatest extent permissible under applicable law.
|
||||
c. Affirmer disclaims responsibility for clearing rights of other persons
|
||||
that may apply to the Work or any use thereof, including without
|
||||
limitation any person's Copyright and Related Rights in the Work.
|
||||
Further, Affirmer disclaims responsibility for obtaining any necessary
|
||||
consents, permissions or other rights required for any use of the
|
||||
Work.
|
||||
d. Affirmer understands and acknowledges that Creative Commons is not a
|
||||
party to this document and has no duty or obligation with respect to
|
||||
this CC0 or use of the Work.
|
||||
@@ -26,8 +26,8 @@
|
||||
<img align=top src="./public/img/widgets.png"/>
|
||||
|
||||
|
||||
### site: [win11.blueedge.me](https://win11.blueedge.me)
|
||||
### visit: [win11.blueedge.me](https://win11.blueedge.me)
|
||||
|
||||
Check out the game 🎮 , **UNESCAPE** , I am working on [blueedge.me/unescape](https://blueedge.me/unescape)
|
||||
|
||||
[contact me](mailto:blueedgetechno@gmail.com) if you want to collab or make an issue for any upcoming update you want
|
||||
[contact me](mailto:blueedgetechno@gmail.com) if you want to collab or make an issue for any upcoming update you want
|
||||
@@ -3921,6 +3921,11 @@
|
||||
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
|
||||
"integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
|
||||
},
|
||||
"catenary-curve": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/catenary-curve/-/catenary-curve-1.0.1.tgz",
|
||||
"integrity": "sha512-vSHQtYFjItV4wxUH5OkicA3Kmln6thBBWlJLiw2f4apfvkKw4BVe8bTbG6lnbJe60CIr8PyHzjSX27blSJ07Ww=="
|
||||
},
|
||||
"chalk": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
|
||||
@@ -8881,6 +8886,11 @@
|
||||
"webpack-sources": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"lazy-brush": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/lazy-brush/-/lazy-brush-1.0.1.tgz",
|
||||
"integrity": "sha512-xT/iSClTVi7vLoF8dCWTBhCuOWqsLXCMPa6ucVmVAk6hyNCM5JeS1NLhXqIrJktUg+caEYKlqSOUU4u3cpXzKg=="
|
||||
},
|
||||
"leven": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz",
|
||||
@@ -11909,6 +11919,17 @@
|
||||
"whatwg-fetch": "^3.4.1"
|
||||
}
|
||||
},
|
||||
"react-canvas-draw": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/react-canvas-draw/-/react-canvas-draw-1.1.1.tgz",
|
||||
"integrity": "sha512-PvZc7g21bYSGebsi73qMgQUV1QQXC464/FouTACwffdytUcMhZM77Jlbj6sOJnctKY9x0IRlJIF2cZj3UVPWGg==",
|
||||
"requires": {
|
||||
"catenary-curve": "^1.0.1",
|
||||
"lazy-brush": "^1.0.1",
|
||||
"prop-types": "^15.6.2",
|
||||
"resize-observer-polyfill": "^1.5.0"
|
||||
}
|
||||
},
|
||||
"react-dev-utils": {
|
||||
"version": "11.0.4",
|
||||
"resolved": "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-11.0.4.tgz",
|
||||
@@ -12582,6 +12603,11 @@
|
||||
"resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
|
||||
"integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8="
|
||||
},
|
||||
"resize-observer-polyfill": {
|
||||
"version": "1.5.1",
|
||||
"resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
|
||||
"integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=="
|
||||
},
|
||||
"resolve": {
|
||||
"version": "1.18.1",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.18.1.tgz",
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
"axios": "^0.21.1",
|
||||
"node-sass": "^6.0.1",
|
||||
"react": "^17.0.2",
|
||||
"react-canvas-draw": "^1.1.1",
|
||||
"react-dom": "^17.0.2",
|
||||
"react-redux": "^7.2.4",
|
||||
"react-scripts": "4.0.3",
|
||||
|
||||
@@ -0,0 +1,353 @@
|
||||
/*!
|
||||
* dyCalendar is a JavaScript library for creating Calendar.
|
||||
*
|
||||
* Author: Yusuf Shakeel
|
||||
* https://github.com/yusufshakeel
|
||||
*
|
||||
* GitHub Link: https://github.com/yusufshakeel/dyCalendarJS
|
||||
*
|
||||
* MIT license
|
||||
* Copyright (c) 2016 Yusuf Shakeel
|
||||
*
|
||||
* Date: 2014-08-17 sunday
|
||||
*/
|
||||
.dycalendar-container {
|
||||
display: inline-block;
|
||||
border: 1px solid #eee;
|
||||
}
|
||||
|
||||
.dycalendar-container.round-edge {
|
||||
border-radius: 5%;
|
||||
-o-border-radius: 5%;
|
||||
-moz-border-radius: 5%;
|
||||
-webkit-border-radius: 5%;
|
||||
}
|
||||
|
||||
/*================================== DAY CALENDAR ========================*/
|
||||
/*
|
||||
* day calendar style
|
||||
*-------------------------------------------------*/
|
||||
.dycalendar-day-container {
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
font-family: Arial;
|
||||
}
|
||||
|
||||
.dycalendar-day-container div {
|
||||
padding: 0;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.dycalendar-day-container .dycalendar-span-day {
|
||||
font-size: 110%;
|
||||
}
|
||||
|
||||
.dycalendar-day-container .dycalendar-span-date {
|
||||
font-size: 250%;
|
||||
}
|
||||
|
||||
.dycalendar-day-container .dycalendar-span-month-year {
|
||||
font-size: 90%
|
||||
}
|
||||
|
||||
/*================================== DAY CALENDAR ENDS HERE ===============*/
|
||||
/*================================== MONTH CALENDAR DEFAULT ========================*/
|
||||
/*
|
||||
* month calendar style
|
||||
*-------------------------------------------------*/
|
||||
.dycalendar-month-container {
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
font-family: Arial;
|
||||
}
|
||||
|
||||
.dycalendar-month-container div {
|
||||
padding: 0;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.dycalendar-month-container .dycalendar-header {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.dycalendar-month-container .dycalendar-header .dycalendar-prev-next-btn {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.dycalendar-month-container .dycalendar-header .dycalendar-prev-next-btn.prev-btn {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.dycalendar-month-container .dycalendar-header .dycalendar-prev-next-btn.next-btn {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.dycalendar-month-container .dycalendar-span-month-year {
|
||||
margin: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.dycalendar-month-container .dycalendar-body table tr td {
|
||||
padding: 12px;
|
||||
font-size: 0.64em;
|
||||
cursor: pointer;
|
||||
transition: all 200ms ease-in-out;
|
||||
}
|
||||
|
||||
.dycalendar-month-container .dycalendar-body table tr td:hover {
|
||||
border-radius: 4px;
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.dycalendar-month-container .dycalendar-body table tr:first-child td {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.dycalendar-today-date {
|
||||
background-color: #246ff2;
|
||||
color: #fff;
|
||||
border-radius: 24px;
|
||||
}
|
||||
|
||||
/*================================== MONTH CALENDAR ENS HERE ===============*/
|
||||
/*================================== DYCALENDAR SKIN =======================*/
|
||||
/*
|
||||
* calendar skin (default skin)
|
||||
*-------------------------------------------------*/
|
||||
.dycalendar-container.gradient {
|
||||
background: #fff;
|
||||
background: linear-gradient(#fff, #d3d3d3);
|
||||
background: -o-linear-gradient(#fff, #d3d3d3);
|
||||
background: -moz-linear-gradient(#fff, #d3d3d3);
|
||||
background: -webkit-linear-gradient(#fff, #d3d3d3);
|
||||
}
|
||||
|
||||
/*
|
||||
* calendar skin (skin-black)
|
||||
*-------------------------------------------------*/
|
||||
.dycalendar-container.skin-black {
|
||||
color: #fff;
|
||||
background-color: #111;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.dycalendar-container.skin-black.gradient {
|
||||
background: #111;
|
||||
background: linear-gradient(#555, #111);
|
||||
background: -o-linear-gradient(#555, #111);
|
||||
background: -moz-linear-gradient(#555, #111);
|
||||
background: -webkit-linear-gradient(#555, #111);
|
||||
}
|
||||
|
||||
.dycalendar-container.skin-black .dycalendar-today-date,
|
||||
.dycalendar-container.skin-black .dycalendar-target-date {
|
||||
background-color: #fff;
|
||||
color: #111;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
/*
|
||||
* calendar skin (skin-blue)
|
||||
*-------------------------------------------------*/
|
||||
.dycalendar-container.skin-blue {
|
||||
color: #fff;
|
||||
background-color: #3c99d3;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.dycalendar-container.skin-blue.gradient {
|
||||
background: #3c99d3;
|
||||
background: linear-gradient(#5ebbf5, #3c99d3);
|
||||
background: -o-linear-gradient(#5ebbf5, #3c99d3);
|
||||
background: -moz-linear-gradient(#5ebbf5, #3c99d3);
|
||||
background: -webkit-linear-gradient(#5ebbf5, #3c99d3);
|
||||
}
|
||||
|
||||
.dycalendar-container.skin-blue .dycalendar-today-date,
|
||||
.dycalendar-container.skin-blue .dycalendar-target-date {
|
||||
background-color: #fff;
|
||||
color: #3c99d3;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
/*
|
||||
* calendar skin (skin-green)
|
||||
*-------------------------------------------------*/
|
||||
.dycalendar-container.skin-green {
|
||||
color: #fff;
|
||||
background-color: #2bb063;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.dycalendar-container.skin-green.gradient {
|
||||
background: #2bb063;
|
||||
background: linear-gradient(#3dd175, #2bb063);
|
||||
background: -o-linear-gradient(#3dd175, #2bb063);
|
||||
background: -moz-linear-gradient(#3dd175, #2bb063);
|
||||
background: -webkit-linear-gradient(#3dd175, #2bb063);
|
||||
}
|
||||
|
||||
.dycalendar-container.skin-green .dycalendar-today-date,
|
||||
.dycalendar-container.skin-green .dycalendar-target-date {
|
||||
background-color: #fff;
|
||||
color: #2bb063;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
/*
|
||||
* calendar skin (skin-purple)
|
||||
*-------------------------------------------------*/
|
||||
.dycalendar-container.skin-purple {
|
||||
color: #fff;
|
||||
background-color: #975ea4;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.dycalendar-container.skin-purple.gradient {
|
||||
background: #975ea4;
|
||||
background: linear-gradient(#ca82d7, #975ea4);
|
||||
background: -o-linear-gradient(#ca82d7, #975ea4);
|
||||
background: -moz-linear-gradient(#ca82d7, #975ea4);
|
||||
background: -webkit-linear-gradient(#ca82d7, #975ea4);
|
||||
}
|
||||
|
||||
.dycalendar-container.skin-purple .dycalendar-today-date,
|
||||
.dycalendar-container.skin-purple .dycalendar-target-date {
|
||||
background-color: #fff;
|
||||
color: #975ea4;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
/*
|
||||
* calendar skin (skin-red)
|
||||
*-------------------------------------------------*/
|
||||
.dycalendar-container.skin-red {
|
||||
color: #fff;
|
||||
background-color: #e94d40;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.dycalendar-container.skin-red.gradient {
|
||||
background: #e94d40;
|
||||
background: linear-gradient(#fb6f62, #e94d40);
|
||||
background: -o-linear-gradient(#fb6f62, #e94d40);
|
||||
background: -moz-linear-gradient(#fb6f62, #e94d40);
|
||||
background: -webkit-linear-gradient(#fb6f62, #e94d40);
|
||||
}
|
||||
|
||||
.dycalendar-container.skin-red .dycalendar-today-date,
|
||||
.dycalendar-container.skin-red .dycalendar-target-date {
|
||||
background-color: #fff;
|
||||
color: #e94d40;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
/*
|
||||
* calendar skin (skin-spacegray)
|
||||
*-------------------------------------------------*/
|
||||
.dycalendar-container.skin-spacegray {
|
||||
color: #fff;
|
||||
background-color: #343d46;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.dycalendar-container.skin-spacegray.gradient {
|
||||
background: #343d46;
|
||||
background: linear-gradient(#454e57, #343d46);
|
||||
background: -o-linear-gradient(#454e57, #343d46);
|
||||
background: -moz-linear-gradient(#454e57, #343d46);
|
||||
background: -webkit-linear-gradient(#454e57, #343d46);
|
||||
}
|
||||
|
||||
.dycalendar-container.skin-spacegray .dycalendar-today-date,
|
||||
.dycalendar-container.skin-spacegray .dycalendar-target-date {
|
||||
background-color: #fff;
|
||||
color: #343d46;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
/*================================== DYCALENDAR SKIN ENDS HERE =============*/
|
||||
/*================================== DYCALENDAR SHADOW =====================*/
|
||||
/*
|
||||
* calendar shadow (shadow-default)
|
||||
*-------------------------------------------------*/
|
||||
.dycalendar-container.shadow-default {
|
||||
-o-box-shadow: 0 4px 4px 0 rgba(50, 50, 50, 0.4);
|
||||
-moz-box-shadow: 0 4px 4px 0 rgba(50, 50, 50, 0.4);
|
||||
-webkit-box-shadow: 0 4px 4px 0 rgba(50, 50, 50, 0.4);
|
||||
box-shadow: 0 4px 4px 0 rgba(50, 50, 50, 0.4);
|
||||
}
|
||||
|
||||
/*
|
||||
* calendar shadow (shadow-black)
|
||||
*-------------------------------------------------*/
|
||||
.dycalendar-container.shadow-black {
|
||||
-o-box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.4);
|
||||
-moz-box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.4);
|
||||
-webkit-box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.4);
|
||||
box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
/*
|
||||
* calendar shadow (shadow-blue)
|
||||
*-------------------------------------------------*/
|
||||
.dycalendar-container.shadow-blue {
|
||||
-o-box-shadow: 0 4px 4px 0 rgba(60, 153, 211, 0.4);
|
||||
-moz-box-shadow: 0 4px 4px 0 rgba(60, 153, 211, 0.4);
|
||||
-webkit-box-shadow: 0 4px 4px 0 rgba(60, 153, 211, 0.4);
|
||||
box-shadow: 0 4px 4px 0 rgba(60, 153, 211, 0.4);
|
||||
}
|
||||
|
||||
/*
|
||||
* calendar shadow (shadow-green)
|
||||
*-------------------------------------------------*/
|
||||
.dycalendar-container.shadow-green {
|
||||
-o-box-shadow: 0 4px 4px 0 rgba(43, 176, 99, 0.4);
|
||||
-moz-box-shadow: 0 4px 4px 0 rgba(43, 176, 99, 0.4);
|
||||
-webkit-box-shadow: 0 4px 4px 0 rgba(43, 176, 99, 0.4);
|
||||
box-shadow: 0 4px 4px 0 rgba(43, 176, 99, 0.4);
|
||||
}
|
||||
|
||||
/*
|
||||
* calendar shadow (shadow-purple)
|
||||
*-------------------------------------------------*/
|
||||
.dycalendar-container.shadow-purple {
|
||||
-o-box-shadow: 0 4px 4px 0 rgba(151, 94, 164, 0.4);
|
||||
-moz-box-shadow: 0 4px 4px 0 rgba(151, 94, 164, 0.4);
|
||||
-webkit-box-shadow: 0 4px 4px 0 rgba(151, 94, 164, 0.4);
|
||||
box-shadow: 0 4px 4px 0 rgba(151, 94, 164, 0.4);
|
||||
}
|
||||
|
||||
/*
|
||||
* calendar shadow (shadow-red)
|
||||
*-------------------------------------------------*/
|
||||
.dycalendar-container.shadow-red {
|
||||
-o-box-shadow: 0 4px 4px 0 rgba(233, 77, 64, 0.4);
|
||||
-moz-box-shadow: 0 4px 4px 0 rgba(233, 77, 64, 0.4);
|
||||
-webkit-box-shadow: 0 4px 4px 0 rgba(233, 77, 64, 0.4);
|
||||
box-shadow: 0 4px 4px 0 rgba(233, 77, 64, 0.4);
|
||||
}
|
||||
|
||||
/*
|
||||
* calendar shadow (shadow-spacegray)
|
||||
*-------------------------------------------------*/
|
||||
.dycalendar-container.shadow-spacegray {
|
||||
-o-box-shadow: 0 4px 4px 0 rgba(52, 61, 70, 1);
|
||||
-moz-box-shadow: 0 4px 4px 0 rgba(52, 61, 70, 1);
|
||||
-webkit-box-shadow: 0 4px 4px 0 rgba(52, 61, 70, 1);
|
||||
box-shadow: 0 4px 4px 0 rgba(52, 61, 70, 1);
|
||||
}
|
||||
|
||||
.dycalendar-span-month-year {
|
||||
font-size: 0.8em;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.dycalendar-prev-next-btn {
|
||||
font-size: 0.8em;
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
||||
/*================================== DYCALENDAR SHADOW ENDS HERE ===========*/
|
||||
@@ -0,0 +1,566 @@
|
||||
/*!
|
||||
* dyCalendar is a JavaScript library for creating Calendar.
|
||||
*
|
||||
* Author: Yusuf Shakeel
|
||||
* https://github.com/yusufshakeel
|
||||
*
|
||||
* GitHub Link: https://github.com/yusufshakeel/dyCalendarJS
|
||||
*
|
||||
* MIT license
|
||||
* Copyright (c) 2016 Yusuf Shakeel
|
||||
*
|
||||
* Date: 2014-08-17 sunday
|
||||
*/
|
||||
/*! dyCalendarJS | (c) 2016 Yusuf Shakeel | https://github.com/yusufshakeel/dyCalendarJS */
|
||||
(function(global) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var
|
||||
//this will be used by the user.
|
||||
dycalendar = {},
|
||||
|
||||
//window document
|
||||
document = global.document,
|
||||
|
||||
//starting year
|
||||
START_YEAR = 1900,
|
||||
|
||||
//end year
|
||||
END_YEAR = 9999,
|
||||
|
||||
//name of the months
|
||||
monthName = {
|
||||
full: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
|
||||
mmm: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
|
||||
},
|
||||
|
||||
//name of the days
|
||||
dayName = {
|
||||
full: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
||||
d: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],
|
||||
dd: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
|
||||
ddd: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
|
||||
};
|
||||
|
||||
/**
|
||||
* this function will create month table.
|
||||
*
|
||||
* @param object data this contains the calendar data
|
||||
* @param object option this is the settings object
|
||||
* @return html
|
||||
*/
|
||||
function createMonthTable(data, option) {
|
||||
|
||||
var
|
||||
table, tr, td,
|
||||
r, c, count;
|
||||
|
||||
table = document.createElement("table");
|
||||
tr = document.createElement("tr");
|
||||
|
||||
//create 1st row for the day letters
|
||||
for (c = 0; c <= 6; c = c + 1) {
|
||||
td = document.createElement("td");
|
||||
// td.innerHTML = "SMTWTFS"[c];
|
||||
td.innerHTML = dayName.dd[c];
|
||||
tr.appendChild(td);
|
||||
}
|
||||
table.appendChild(tr);
|
||||
|
||||
//create 2nd row for dates
|
||||
tr = document.createElement("tr");
|
||||
|
||||
//blank td
|
||||
for (c = 0; c <= 6; c = c + 1) {
|
||||
if (c === data.firstDayIndex) {
|
||||
break;
|
||||
}
|
||||
td = document.createElement("td");
|
||||
tr.appendChild(td);
|
||||
}
|
||||
|
||||
//remaing td of dates for the 2nd row
|
||||
count = 1;
|
||||
while (c <= 6) {
|
||||
td = document.createElement("td");
|
||||
td.innerHTML = count;
|
||||
if (option.date === count && option.month === data.monthIndex && option.highlighttargetdate === true) {
|
||||
td.setAttribute("class", "dycalendar-target-date");
|
||||
}
|
||||
|
||||
if (data.today.date === count && data.today.monthIndex === data.monthIndex && option.highlighttoday === true) {
|
||||
td.setAttribute("class", "dycalendar-today-date");
|
||||
}
|
||||
|
||||
tr.appendChild(td);
|
||||
count = count + 1;
|
||||
c = c + 1;
|
||||
}
|
||||
table.appendChild(tr);
|
||||
|
||||
//create remaining rows
|
||||
for (r = 3; r <= 7; r = r + 1) {
|
||||
tr = document.createElement("tr");
|
||||
for (c = 0; c <= 6; c = c + 1) {
|
||||
if (count > data.totaldays) {
|
||||
table.appendChild(tr);
|
||||
return table;
|
||||
}
|
||||
td = document.createElement('td');
|
||||
td.innerHTML = count;
|
||||
if (option.date === count && option.month === data.monthIndex && option.highlighttargetdate === true) {
|
||||
td.setAttribute("class", "dycalendar-target-date");
|
||||
}
|
||||
|
||||
if (data.today.date === count && data.today.monthIndex === data.monthIndex && option.highlighttoday === true) {
|
||||
td.setAttribute("class", "dycalendar-today-date");
|
||||
}
|
||||
|
||||
count = count + 1;
|
||||
tr.appendChild(td);
|
||||
}
|
||||
table.appendChild(tr);
|
||||
}
|
||||
|
||||
return table;
|
||||
}
|
||||
|
||||
/**
|
||||
* this function will draw Calendar Month Table
|
||||
*
|
||||
* @param object data this contains the calendar data
|
||||
* @param object option this is the settings object
|
||||
* @return html
|
||||
*/
|
||||
function drawCalendarMonthTable(data, option) {
|
||||
|
||||
var
|
||||
table,
|
||||
div, container, elem;
|
||||
|
||||
//get table
|
||||
table = createMonthTable(data, option);
|
||||
|
||||
//calendar container
|
||||
container = document.createElement("div");
|
||||
container.setAttribute("class", "dycalendar-month-container");
|
||||
|
||||
//-------------------------- Header ------------------
|
||||
|
||||
//header div
|
||||
div = document.createElement("div");
|
||||
div.setAttribute("class", "dycalendar-header");
|
||||
div.setAttribute("data-option", JSON.stringify(option));
|
||||
|
||||
//month span
|
||||
elem = document.createElement("span");
|
||||
elem.setAttribute("class", "dycalendar-span-month-year");
|
||||
if (option.monthformat === "mmm") {
|
||||
elem.innerHTML = data.monthName + " " + data.year;
|
||||
} else if (option.monthformat === "full") {
|
||||
elem.innerHTML = data.monthNameFull + " " + data.year;
|
||||
}
|
||||
|
||||
//add month span to header div
|
||||
div.appendChild(elem);
|
||||
|
||||
//prev button
|
||||
if (option.prevnextbutton === "show") {
|
||||
elem = document.createElement("span");
|
||||
elem.setAttribute("class", "dycalendar-prev-next-btn prev-btn");
|
||||
elem.setAttribute("data-date", option.date);
|
||||
elem.setAttribute("data-month", option.month);
|
||||
elem.setAttribute("data-year", option.year);
|
||||
elem.setAttribute("data-btn", "prev");
|
||||
elem.innerHTML = "◁";
|
||||
//add prev button span to header div
|
||||
div.appendChild(elem);
|
||||
|
||||
elem = document.createElement("span");
|
||||
elem.setAttribute("class", "dycalendar-prev-next-btn next-btn");
|
||||
elem.setAttribute("data-date", option.date);
|
||||
elem.setAttribute("data-month", option.month);
|
||||
elem.setAttribute("data-year", option.year);
|
||||
elem.setAttribute("data-btn", "next");
|
||||
elem.innerHTML = "▷";
|
||||
//add prev button span to header div
|
||||
div.appendChild(elem);
|
||||
}
|
||||
|
||||
//add header div to container
|
||||
container.appendChild(div);
|
||||
|
||||
//-------------------------- Body ------------------
|
||||
|
||||
//body div
|
||||
div = document.createElement("div");
|
||||
div.setAttribute("class", "dycalendar-body");
|
||||
div.appendChild(table);
|
||||
|
||||
//add body div to container div
|
||||
container.appendChild(div);
|
||||
|
||||
//return container
|
||||
return container;
|
||||
}
|
||||
|
||||
/**
|
||||
* this function will draw Calendar Day
|
||||
*
|
||||
* @param object data this contains the calendar data
|
||||
* @param object option this is the settings object
|
||||
* @return html
|
||||
*/
|
||||
function drawCalendarDay(data, option) {
|
||||
|
||||
var
|
||||
div, container, elem;
|
||||
|
||||
//calendar container
|
||||
container = document.createElement("div");
|
||||
container.setAttribute("class", "dycalendar-day-container");
|
||||
|
||||
//-------------------------- Header ------------------
|
||||
|
||||
//header div
|
||||
div = document.createElement("div");
|
||||
div.setAttribute("class", "dycalendar-header");
|
||||
|
||||
//day span
|
||||
elem = document.createElement("span");
|
||||
elem.setAttribute("class", "dycalendar-span-day");
|
||||
if (option.dayformat === "ddd") {
|
||||
elem.innerHTML = dayName.ddd[data.targetedDayIndex];
|
||||
} else if (option.dayformat === "full") {
|
||||
elem.innerHTML = dayName.full[data.targetedDayIndex];
|
||||
}
|
||||
|
||||
//add day span to footer div
|
||||
div.appendChild(elem);
|
||||
|
||||
//add header div to container
|
||||
container.appendChild(div);
|
||||
|
||||
//-------------------------- Body ------------------
|
||||
|
||||
//body div
|
||||
div = document.createElement("div");
|
||||
div.setAttribute("class", "dycalendar-body");
|
||||
|
||||
//date span
|
||||
elem = document.createElement("span");
|
||||
elem.setAttribute("class", "dycalendar-span-date");
|
||||
elem.innerHTML = data.date;
|
||||
|
||||
//add date span to body div
|
||||
div.appendChild(elem);
|
||||
|
||||
//add body div to container
|
||||
container.appendChild(div);
|
||||
|
||||
//-------------------------- Footer ------------------
|
||||
|
||||
//footer div
|
||||
div = document.createElement("div");
|
||||
div.setAttribute("class", "dycalendar-footer");
|
||||
|
||||
//add footer div to container
|
||||
container.appendChild(div);
|
||||
|
||||
//return container
|
||||
return container;
|
||||
}
|
||||
|
||||
/**
|
||||
* this function will extend source object with defaults object.
|
||||
*
|
||||
* @param object source this is the source object
|
||||
* @param object defaults this is the default object
|
||||
* @return object
|
||||
*/
|
||||
function extendSource(source, defaults) {
|
||||
var property;
|
||||
for (property in defaults) {
|
||||
if (source.hasOwnProperty(property) === false) {
|
||||
source[property] = defaults[property];
|
||||
}
|
||||
}
|
||||
return source;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function will return calendar detail.
|
||||
*
|
||||
* @param integer year 1900-9999 (optional) if not set will consider
|
||||
* the current year.
|
||||
* @param integer month 0-11 (optional) 0 = Jan, 1 = Feb, ... 11 = Dec,
|
||||
* if not set will consider the current month.
|
||||
* @param integer date 1-31 (optional)
|
||||
* @return boolean|object if error return false, else calendar detail
|
||||
*/
|
||||
function getCalendar(year, month, date) {
|
||||
|
||||
var
|
||||
dateObj = new Date(),
|
||||
dateString,
|
||||
result = {},
|
||||
idx;
|
||||
|
||||
if (year < START_YEAR || year > END_YEAR) {
|
||||
global.console.error("Invalid Year");
|
||||
return false;
|
||||
}
|
||||
if (month > 11 || month < 0) {
|
||||
global.console.error("Invalid Month");
|
||||
return false;
|
||||
}
|
||||
if (date > 31 || date < 1) {
|
||||
global.console.error("Invalid Date");
|
||||
return false;
|
||||
}
|
||||
|
||||
result.year = year;
|
||||
result.month = month;
|
||||
result.date = date;
|
||||
|
||||
//today
|
||||
result.today = {};
|
||||
dateString = dateObj.toString().split(" ");
|
||||
|
||||
idx = dayName.ddd.indexOf(dateString[0]);
|
||||
result.today.dayIndex = idx;
|
||||
result.today.dayName = dateString[0];
|
||||
result.today.dayFullName = dayName.full[idx];
|
||||
|
||||
idx = monthName.mmm.indexOf(dateString[1]);
|
||||
result.today.monthIndex = idx;
|
||||
result.today.monthName = dateString[1];
|
||||
result.today.monthNameFull = monthName.full[idx];
|
||||
|
||||
result.today.date = dateObj.getDate();
|
||||
|
||||
result.today.year = dateString[3];
|
||||
|
||||
//get month-year first day
|
||||
dateObj.setDate(1);
|
||||
dateObj.setMonth(month);
|
||||
dateObj.setFullYear(year);
|
||||
dateString = dateObj.toString().split(" ");
|
||||
|
||||
idx = dayName.ddd.indexOf(dateString[0]);
|
||||
result.firstDayIndex = idx;
|
||||
result.firstDayName = dateString[0];
|
||||
result.firstDayFullName = dayName.full[idx];
|
||||
|
||||
idx = monthName.mmm.indexOf(dateString[1]);
|
||||
result.monthIndex = idx;
|
||||
result.monthName = dateString[1];
|
||||
result.monthNameFull = monthName.full[idx];
|
||||
|
||||
//get total days for the month-year
|
||||
dateObj.setFullYear(year);
|
||||
dateObj.setMonth(month + 1);
|
||||
dateObj.setDate(0);
|
||||
result.totaldays = dateObj.getDate();
|
||||
|
||||
//get month-year targeted date
|
||||
dateObj.setFullYear(year);
|
||||
dateObj.setMonth(month);
|
||||
dateObj.setDate(date);
|
||||
dateString = dateObj.toString().split(" ");
|
||||
|
||||
idx = dayName.ddd.indexOf(dateString[0]);
|
||||
result.targetedDayIndex = idx;
|
||||
result.targetedDayName = dateString[0];
|
||||
result.targetedDayFullName = dayName.full[idx];
|
||||
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* this function will handle the on click event.
|
||||
*/
|
||||
function onClick() {
|
||||
|
||||
document.body.onclick = function(e) {
|
||||
|
||||
//get event object (window.event for IE compatibility)
|
||||
e = global.event || e;
|
||||
|
||||
var
|
||||
//get target dom object reference
|
||||
targetDomObject = e.target || e.srcElement,
|
||||
|
||||
//other variables
|
||||
date, month, year, btn, option, dateObj;
|
||||
|
||||
//prev-next button click
|
||||
//extra checks to make sure object exists and contains the class of interest
|
||||
if ((targetDomObject) && (targetDomObject.classList) && (targetDomObject.classList.contains("dycalendar-prev-next-btn"))) {
|
||||
date = parseInt(targetDomObject.getAttribute("data-date"));
|
||||
month = parseInt(targetDomObject.getAttribute("data-month"));
|
||||
year = parseInt(targetDomObject.getAttribute("data-year"));
|
||||
btn = targetDomObject.getAttribute("data-btn");
|
||||
option = JSON.parse(targetDomObject.parentElement.getAttribute("data-option"));
|
||||
|
||||
if (btn === "prev") {
|
||||
month = month - 1;
|
||||
if (month < 0) {
|
||||
year = year - 1;
|
||||
month = 11;
|
||||
}
|
||||
}
|
||||
else if (btn === "next") {
|
||||
month = month + 1;
|
||||
if (month > 11) {
|
||||
year = year + 1;
|
||||
month = 0;
|
||||
}
|
||||
}
|
||||
|
||||
option.date = date;
|
||||
option.month = month;
|
||||
option.year = year;
|
||||
|
||||
drawCalendar(option);
|
||||
}
|
||||
|
||||
//month click
|
||||
//extra checks to make sure object exists and contains the class of interest
|
||||
if ((targetDomObject) && (targetDomObject.classList) && (targetDomObject.classList.contains("dycalendar-span-month-year"))) {
|
||||
option = JSON.parse(targetDomObject.parentElement.getAttribute("data-option"));
|
||||
dateObj = new Date();
|
||||
|
||||
option.date = dateObj.getDate();
|
||||
option.month = dateObj.getMonth();
|
||||
option.year = dateObj.getFullYear();
|
||||
|
||||
drawCalendar(option);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
//------------------------------ dycalendar.draw() ----------------------
|
||||
|
||||
/**
|
||||
* this function will draw the calendar based on user preferences.
|
||||
*
|
||||
* option = {
|
||||
* target : "#id|.class" //(mandatory) for id use #id | for class use .class
|
||||
* type : "calendar-type" //(optional) values: "day|month" (default "day")
|
||||
* month : "integer" //(optional) value 0-11, where 0 = January, ... 11 = December (default current month)
|
||||
* year : "integer" //(optional) example 1990. (default current year)
|
||||
* date : "integer" //(optional) example 1-31. (default current date)
|
||||
* monthformat : "full" //(optional) values: "mmm|full" (default "full")
|
||||
* dayformat : "full" //(optional) values: "ddd|full" (default "full")
|
||||
* highlighttoday : boolean //(optional) (default false) if true will highlight today's date
|
||||
* highlighttargetdate : boolean //(optional) (default false) if true will highlight targeted date of the month year
|
||||
* prevnextbutton : "hide" //(optional) (default "hide") (values: "show|hide") if set to "show" it will show the nav button (prev|next)
|
||||
* }
|
||||
*
|
||||
* @param object option user preferences
|
||||
* @return boolean true if success, false otherwise
|
||||
*/
|
||||
dycalendar.draw = function(option) {
|
||||
|
||||
//check if option is passed or not
|
||||
if (typeof option === "undefined") {
|
||||
global.console.error("Option missing");
|
||||
return false;
|
||||
}
|
||||
|
||||
var
|
||||
self = this, //pointing at dycalendar object
|
||||
|
||||
dateObj = new Date(),
|
||||
|
||||
//default settings
|
||||
defaults = {
|
||||
type: "day",
|
||||
month: dateObj.getMonth(),
|
||||
year: dateObj.getFullYear(),
|
||||
date: dateObj.getDate(),
|
||||
monthformat: "full",
|
||||
dayformat: "full",
|
||||
highlighttoday: false,
|
||||
highlighttargetdate: false,
|
||||
prevnextbutton: "hide"
|
||||
};
|
||||
|
||||
//extend user options with predefined options
|
||||
option = extendSource(option, defaults);
|
||||
|
||||
drawCalendar(option);
|
||||
|
||||
};
|
||||
|
||||
//------------------------------ dycalendar.draw() ends here ------------
|
||||
|
||||
/**
|
||||
* this function will draw the calendar inside the target container.
|
||||
*/
|
||||
function drawCalendar(option) {
|
||||
|
||||
var
|
||||
//variables for creating calendar
|
||||
calendar,
|
||||
calendarHTML,
|
||||
targetedElementBy = "id",
|
||||
targetElem,
|
||||
|
||||
//other variables
|
||||
i, len, elemArr;
|
||||
|
||||
//find target element by
|
||||
if (option.target[0] === "#") {
|
||||
targetedElementBy = "id";
|
||||
} else if (option.target[0] === ".") {
|
||||
targetedElementBy = "class";
|
||||
}
|
||||
targetElem = option.target.substring(1);
|
||||
|
||||
//get calendar HTML
|
||||
switch (option.type) {
|
||||
case "day":
|
||||
//get calendar detail
|
||||
calendar = getCalendar(option.year, option.month, option.date);
|
||||
//get calendar html
|
||||
calendarHTML = drawCalendarDay(calendar, option);
|
||||
break;
|
||||
|
||||
case "month":
|
||||
//get calendar detail
|
||||
calendar = getCalendar(option.year, option.month, option.date);
|
||||
//get calendar html
|
||||
calendarHTML = drawCalendarMonthTable(calendar, option);
|
||||
break;
|
||||
|
||||
default:
|
||||
global.console.error("Invalid type");
|
||||
return false;
|
||||
}
|
||||
|
||||
//draw calendar
|
||||
if (targetedElementBy === "id") {
|
||||
|
||||
document.getElementById(targetElem).innerHTML = calendarHTML.outerHTML;
|
||||
|
||||
} else if (targetedElementBy === "class") {
|
||||
|
||||
elemArr = document.getElementsByClassName(targetElem);
|
||||
for (i = 0, len = elemArr.length; i < len; i = i + 1) {
|
||||
elemArr[i].innerHTML = calendarHTML.outerHTML;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//events
|
||||
onClick();
|
||||
|
||||
//attach to global window object
|
||||
global.dycalendar = dycalendar;
|
||||
|
||||
}(typeof window !== "undefined" ? window : this));
|
||||
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 3.5 MiB After Width: | Height: | Size: 874 KiB |
|
After Width: | Height: | Size: 7.4 KiB |
@@ -12,9 +12,11 @@
|
||||
<!-- <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" /> -->
|
||||
<!-- <link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> -->
|
||||
<title>Win 11 in react</title>
|
||||
<link rel="stylesheet" href="dycalendar.css">
|
||||
</head>
|
||||
<body>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
<div id="root"></div>
|
||||
<script type="text/javascript" src="dycalendar.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,16 +1,17 @@
|
||||
import React from 'react';
|
||||
import {useSelector, useDispatch} from 'react-redux';
|
||||
import {increment, decrement} from './actions';
|
||||
import './index.css';
|
||||
import './short.css';
|
||||
|
||||
import Background from './containers/background';
|
||||
import Taskbar from './components/taskbar';
|
||||
import ActMenu from './components/menu';
|
||||
import {
|
||||
StartMenu,
|
||||
DesktopApp,
|
||||
SidePane,
|
||||
WidPane
|
||||
WidPane,
|
||||
CalnWid
|
||||
} from './components/start';
|
||||
|
||||
import * as Applications from './containers/applications';
|
||||
@@ -20,13 +21,19 @@ function App() {
|
||||
const apps = useSelector(state => state.apps);
|
||||
const dispatch = useDispatch();
|
||||
|
||||
// window.addEventListener("contextmenu", e => e. preventDefault());
|
||||
window.addEventListener("contextmenu", e => {
|
||||
e. preventDefault();
|
||||
dispatch({ type: 'GARBAGE'});
|
||||
});
|
||||
|
||||
window.addEventListener("click", event => {
|
||||
// console.log(event.target);
|
||||
var ess = [
|
||||
["START","STARTHID"],
|
||||
["PANE","PANEHIDE"],
|
||||
["WIDG","WIDGHIDE"]
|
||||
["WIDG","WIDGHIDE"],
|
||||
["CALN","CALNHIDE"],
|
||||
["MENU","MENUHIDE"]
|
||||
];
|
||||
|
||||
try{
|
||||
@@ -44,10 +51,22 @@ function App() {
|
||||
});
|
||||
});
|
||||
|
||||
const rightClick = (e)=>{
|
||||
if(e.target.getAttribute('class')=="desktop"){
|
||||
dispatch({
|
||||
type: 'MENUSHOW',
|
||||
payload: {
|
||||
top: e.clientY,
|
||||
left: e.clientX
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="App">
|
||||
<Background/>
|
||||
<div className="desktop">
|
||||
<div className="desktop" onContextMenu={rightClick}>
|
||||
<DesktopApp/>
|
||||
{Object.keys(Applications).map((key,idx)=>{
|
||||
var WinApp = Applications[key];
|
||||
@@ -56,8 +75,10 @@ function App() {
|
||||
<StartMenu/>
|
||||
<SidePane/>
|
||||
<WidPane/>
|
||||
<CalnWid/>
|
||||
</div>
|
||||
<Taskbar/>
|
||||
<ActMenu/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export const decrement = ()=>{
|
||||
return {
|
||||
type: 'DECREMENT'
|
||||
}
|
||||
export const refresh = (dispatch) =>{
|
||||
dispatch({type: 'MENUHIDE'});
|
||||
dispatch({type: 'DESKHIDE'});
|
||||
setTimeout(()=>dispatch({type: 'DESKSHOW'}), 100);
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
import React, {useState, useEffect} from 'react';
|
||||
import {useSelector, useDispatch} from 'react-redux';
|
||||
import {Icon} from '../../utils/general';
|
||||
import './menu.scss';
|
||||
|
||||
import * as Actions from '../../actions';
|
||||
|
||||
export const ActMenu = ()=>{
|
||||
const menu = useSelector(state=>state.menus);
|
||||
const dispatch = useDispatch();
|
||||
|
||||
const clickDispatch = (event)=>{
|
||||
event.stopPropagation();
|
||||
var action = {
|
||||
type: event.target.dataset.action,
|
||||
payload: event.target.dataset.payload
|
||||
};
|
||||
|
||||
if(action.type){
|
||||
if(action.type==action.type.toLowerCase()){
|
||||
Actions[action.type](dispatch,action.payload);
|
||||
}else{
|
||||
dispatch(action);
|
||||
}
|
||||
dispatch({type: "MENUHIDE"});
|
||||
}
|
||||
}
|
||||
|
||||
const menuobj = (data)=>{
|
||||
var mnode = [];
|
||||
data.map(opt=>{
|
||||
if(opt.type=="hr"){
|
||||
mnode.push(<div className="menuhr"></div>);
|
||||
}else{
|
||||
mnode.push(<div className="menuopt" data-dsb={opt.dsb}
|
||||
onClick={clickDispatch} data-action={opt.action}
|
||||
data-payload={opt.payload}>
|
||||
{opt.name}
|
||||
{opt.icon?<Icon src={opt.icon} width={14}/>:null}
|
||||
{opt.opts?<Icon fafa="faChevronRight" width={10} color="#999"/>:null}
|
||||
{opt.opts?(
|
||||
<div className="minimenu">
|
||||
{menuobj(opt.opts)}
|
||||
</div>
|
||||
):null}
|
||||
</div>)
|
||||
}
|
||||
});
|
||||
|
||||
return mnode;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="actmenu" style={{
|
||||
'top': menu.top,
|
||||
'left': menu.left,
|
||||
'--prefix':'MENU'}} data-hide={menu.hide}>
|
||||
{menuobj(menu.opts)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default ActMenu;
|
||||
@@ -0,0 +1,71 @@
|
||||
.actmenu{
|
||||
position: absolute;
|
||||
width: 200px;
|
||||
// min-height: 280px;
|
||||
background: #f7f7f7;
|
||||
z-index: 9998;
|
||||
animation: fadein 200ms ease-in-out;
|
||||
padding: 4px 0;
|
||||
border: solid 1px #aaa;
|
||||
|
||||
&[data-hide="true"]{
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.minimenu{
|
||||
position: absolute;
|
||||
display: none;
|
||||
top: 0;
|
||||
left: 98%;
|
||||
min-width: 160px;
|
||||
// min-height: 280px;
|
||||
background: #f7f7f7;
|
||||
z-index: 9999;
|
||||
padding: 4px 0;
|
||||
border: solid 1px #aaa;
|
||||
animation: fadein 50ms ease-in-out;
|
||||
}
|
||||
|
||||
.menuopt{
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
padding: 3px 24px;
|
||||
font-weight: 500;
|
||||
font-size: 9.6px;
|
||||
cursor: default;
|
||||
|
||||
&:hover{
|
||||
background: rgba(0, 0, 0, 0.08);
|
||||
|
||||
.minimenu{
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
&[data-dsb="true"]{
|
||||
color: #aaa;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.uicon{
|
||||
position: absolute;
|
||||
top: 3px;
|
||||
left: 4px;
|
||||
}
|
||||
|
||||
.prtclk{
|
||||
left: unset;
|
||||
right: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.menuhr{
|
||||
position: relative;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
background: #ccc;
|
||||
margin: 4px 0;
|
||||
}
|
||||
@@ -1,35 +1,46 @@
|
||||
import React, {useState, useEffect} from 'react';
|
||||
import {useSelector, useDispatch} from 'react-redux';
|
||||
import {Icon} from '../../utils/general';
|
||||
import React, {
|
||||
useState,
|
||||
useEffect
|
||||
} from 'react';
|
||||
import {
|
||||
useSelector,
|
||||
useDispatch
|
||||
} from 'react-redux';
|
||||
import {
|
||||
Icon
|
||||
} from '../../utils/general';
|
||||
import './startmenu.scss';
|
||||
import './sidepane.scss';
|
||||
import './searchpane.scss';
|
||||
|
||||
import axios from 'axios';
|
||||
|
||||
export const StartMenu = ()=>{
|
||||
const start = useSelector(state=>{
|
||||
export const StartMenu = () => {
|
||||
const start = useSelector(state => {
|
||||
var arr = state.startmenu,
|
||||
ln = (6-arr.pnApps.length%6)%6;
|
||||
ln = (6 - arr.pnApps.length % 6) % 6;
|
||||
|
||||
for (var i = 0; i < ln; i++) {
|
||||
arr.pnApps.push({empty: true});
|
||||
arr.pnApps.push({
|
||||
empty: true
|
||||
});
|
||||
}
|
||||
|
||||
for (var i = 0; i < arr.rcApps.length; i++) {
|
||||
if(arr.rcApps[i].lastUsed<0){
|
||||
if (arr.rcApps[i].lastUsed < 0) {
|
||||
arr.rcApps[i].lastUsed = "Recently Added"
|
||||
}else if(arr.rcApps[i].lastUsed<10){
|
||||
} else if (arr.rcApps[i].lastUsed < 10) {
|
||||
arr.rcApps[i].lastUsed = "Just Now"
|
||||
}else if(arr.rcApps[i].lastUsed<60){
|
||||
} else if (arr.rcApps[i].lastUsed < 60) {
|
||||
arr.rcApps[i].lastUsed += "m ago"
|
||||
}else if(arr.rcApps[i].lastUsed<360){
|
||||
arr.rcApps[i].lastUsed = Math.floor(arr.rcApps[i].lastUsed/60)+ "h ago"
|
||||
} else if (arr.rcApps[i].lastUsed < 360) {
|
||||
arr.rcApps[i].lastUsed = Math.floor(arr.rcApps[i].lastUsed / 60) + "h ago"
|
||||
}
|
||||
}
|
||||
|
||||
var tmpApps = [...arr.allApps], allApps=[];
|
||||
tmpApps.sort((a,b) => (a.name > b.name) ? 1 : ((b.name > a.name) ? -1 : 0));
|
||||
var tmpApps = [...arr.allApps],
|
||||
allApps = [];
|
||||
tmpApps.sort((a, b) => (a.name > b.name) ? 1 : ((b.name > a.name) ? -1 : 0));
|
||||
|
||||
for (var i = 0; i < 27; i++) {
|
||||
allApps[i] = [];
|
||||
@@ -37,9 +48,9 @@ export const StartMenu = ()=>{
|
||||
|
||||
for (var i = 0; i < tmpApps.length; i++) {
|
||||
var t1 = tmpApps[i].name.trim().toUpperCase().charCodeAt(0);
|
||||
if(t1>64 && t1<91){
|
||||
allApps[t1-64].push(tmpApps[i]);
|
||||
}else{
|
||||
if (t1 > 64 && t1 < 91) {
|
||||
allApps[t1 - 64].push(tmpApps[i]);
|
||||
} else {
|
||||
allApps[0].push(tmpApps[i]);
|
||||
}
|
||||
}
|
||||
@@ -52,41 +63,43 @@ export const StartMenu = ()=>{
|
||||
const [match, setMatch] = useState({});
|
||||
|
||||
const dispatch = useDispatch();
|
||||
const clickDispatch = (event)=>{
|
||||
const clickDispatch = (event) => {
|
||||
var action = {
|
||||
type: event.target.dataset.action,
|
||||
payload: event.target.dataset.payload
|
||||
};
|
||||
|
||||
if(action.type){
|
||||
if (action.type) {
|
||||
dispatch(action);
|
||||
}
|
||||
|
||||
if(action.type && (action.payload=="full" || action.type=="EDGELINK")){
|
||||
dispatch({type: "STARTHID"});
|
||||
if (action.type && (action.payload == "full" || action.type == "EDGELINK")) {
|
||||
dispatch({
|
||||
type: "STARTHID"
|
||||
});
|
||||
}
|
||||
|
||||
if(action.type=="STARTALPHA"){
|
||||
var target = document.getElementById("char"+action.payload);
|
||||
if(target){
|
||||
if (action.type == "STARTALPHA") {
|
||||
var target = document.getElementById("char" + action.payload);
|
||||
if (target) {
|
||||
target.parentNode.scrollTop = target.offsetTop;
|
||||
}else{
|
||||
} else {
|
||||
var target = document.getElementById("charA");
|
||||
target.parentNode.scrollTop = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
useEffect(()=>{
|
||||
if(query.length){
|
||||
useEffect(() => {
|
||||
if (query.length) {
|
||||
for (var i = 0; i < start.allApps.length; i++) {
|
||||
if(start.allApps[i].name.toLowerCase().includes(query.toLowerCase())){
|
||||
if (start.allApps[i].name.toLowerCase().includes(query.toLowerCase())) {
|
||||
setMatch(start.allApps[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
},[query])
|
||||
}, [query])
|
||||
|
||||
return (
|
||||
<div className="startMenu dpShad" data-hide={start.hide} style={{'--prefix':'START'}}>
|
||||
@@ -109,7 +122,7 @@ export const StartMenu = ()=>{
|
||||
<div key={i} className="pnApp">
|
||||
<Icon className="pnIcon" src={app.icon} width={24}
|
||||
onClick={clickDispatch} click={app.action}
|
||||
payload={app.payload?app.payload:"full"}/>
|
||||
payload={app.payload || "full"}/>
|
||||
<div className="appName">{app.name}</div>
|
||||
</div>
|
||||
);
|
||||
@@ -167,7 +180,7 @@ export const StartMenu = ()=>{
|
||||
ldx.forEach((app,j) => {
|
||||
tpApps.push(
|
||||
<div key={j} className="allApp prtclk" onClick={clickDispatch}
|
||||
data-action={app.action} data-payload={app.payload?app.payload:"full"}>
|
||||
data-action={app.action} data-payload={app.payload || "full"}>
|
||||
<Icon className="pnIcon" src={app.icon} width={20}/>
|
||||
<div className="appName">{app.name}</div>
|
||||
</div>
|
||||
@@ -238,7 +251,7 @@ export const StartMenu = ()=>{
|
||||
<div className="text-xss">App</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="smatch flex my-2 bg-gray-100 p-3 rounded prtclk"
|
||||
<div className="smatch flex my-2 bg-gray-100 p-3 rounded handcr prtclk"
|
||||
onClick={clickDispatch} data-action="EDGELINK"
|
||||
data-payload={query}>
|
||||
<Icon src="search" ui width={20}/>
|
||||
@@ -255,7 +268,7 @@ export const StartMenu = ()=>{
|
||||
return(
|
||||
<div className="topApp pt-4 py-2 bg-gray-100 ltShad">
|
||||
<Icon onClick={clickDispatch} click={app.action}
|
||||
payload={app.payload?app.payload:"full"}
|
||||
payload={app.payload || "full"}
|
||||
src={app.icon} width={24} />
|
||||
<div className="text-xs mt-2">{app.name}</div>
|
||||
</div>
|
||||
@@ -288,7 +301,7 @@ export const StartMenu = ()=>{
|
||||
<div className="hline mt-8"></div>
|
||||
<div className="openlink w-4/5 flex prtclk handcr pt-3"
|
||||
onClick={clickDispatch} data-action={match.action}
|
||||
data-payload="full">
|
||||
data-payload={match.payload?match.payload:"full"}>
|
||||
<Icon src="link" ui width={16}/>
|
||||
<div className="text-xss ml-3">Open</div>
|
||||
</div>
|
||||
@@ -303,17 +316,20 @@ export const StartMenu = ()=>{
|
||||
);
|
||||
}
|
||||
|
||||
export const DesktopApp = ()=>{
|
||||
const deskApps = useSelector(state=>state.desktop);
|
||||
export const DesktopApp = () => {
|
||||
const deskApps = useSelector(state => state.desktop);
|
||||
const dispatch = useDispatch();
|
||||
|
||||
return (
|
||||
<div className="desktopCont">
|
||||
{deskApps.apps.map((app,i)=>{
|
||||
<div className="desktopCont" style={{
|
||||
gridTemplateColumns: `repeat(auto-fit, ${Math.round(deskApps.size*90)}px)`,
|
||||
gridTemplateRows: `repeat(auto-fit, ${Math.round(deskApps.size*98)}px)`
|
||||
}}>
|
||||
{!deskApps.hide && deskApps.apps.map((app,i)=>{
|
||||
return (
|
||||
<div key={i} className="dskApp">
|
||||
<Icon click={app.action} payload="full" className="dskIcon"
|
||||
src={app.icon} width={36}/>
|
||||
<Icon click={app.action} width={Math.round(deskApps.size*36)}
|
||||
className="dskIcon" src={app.icon} payload={app.payload || "full"}/>
|
||||
<div className="appName">{app.name}</div>
|
||||
</div>
|
||||
)
|
||||
@@ -322,11 +338,11 @@ export const DesktopApp = ()=>{
|
||||
);
|
||||
}
|
||||
|
||||
export const SidePane = ()=>{
|
||||
const paneApps = useSelector(state=>state.sidepane);
|
||||
export const SidePane = () => {
|
||||
const paneApps = useSelector(state => state.sidepane);
|
||||
const dispatch = useDispatch();
|
||||
|
||||
const clickDispatch = (event)=>{
|
||||
const clickDispatch = (event) => {
|
||||
var action = {
|
||||
type: event.target.dataset.action,
|
||||
payload: event.target.dataset.payload
|
||||
@@ -370,21 +386,21 @@ export const SidePane = ()=>{
|
||||
);
|
||||
}
|
||||
|
||||
export const WidPane = ()=>{
|
||||
export const WidPane = () => {
|
||||
const dispatch = useDispatch();
|
||||
const widget = useSelector(state=>state.widpane);
|
||||
const widget = useSelector(state => state.widpane);
|
||||
|
||||
const getRandom = (x=0) => {
|
||||
const getRandom = (x = 0) => {
|
||||
return `hsl(${Math.floor(Math.random()*360)}deg 36% 84%)`;
|
||||
}
|
||||
|
||||
useEffect(async ()=>{
|
||||
console.log(process.env.REACT_APP_DEVELOPEMENT);
|
||||
if(process.env.REACT_APP_DEVELOPEMENT!="development"){
|
||||
if(!widget.updated){
|
||||
useEffect(async () => {
|
||||
// console.log(process.env.REACT_APP_DEVELOPEMENT);
|
||||
if (process.env.REACT_APP_DEVELOPEMENT != "development") {
|
||||
if (!widget.updated) {
|
||||
var tmpWdgt = await fetchApi(widget);
|
||||
console.log("Fetching Api's");
|
||||
if(tmpWdgt.updated){
|
||||
if (tmpWdgt.updated) {
|
||||
dispatch({
|
||||
type: "WIDGREST",
|
||||
payload: tmpWdgt
|
||||
@@ -548,31 +564,59 @@ export const WidPane = ()=>{
|
||||
);
|
||||
}
|
||||
|
||||
const fetchApi = async (widget)=>{
|
||||
var tmpWdgt = {...widget};
|
||||
export const CalnWid = () => {
|
||||
const sidepane = useSelector(state => state.sidepane);
|
||||
const [loaded, setLoad] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
if (!loaded) {
|
||||
setLoad(true);
|
||||
window.dycalendar.draw({
|
||||
target: '#dycalendar',
|
||||
type: 'month',
|
||||
dayformat: 'ddd',
|
||||
monthformat: "full",
|
||||
prevnextbutton: 'show',
|
||||
highlighttoday: true
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
return (
|
||||
<div className="calnpane dpShad" data-hide={sidepane.calhide}
|
||||
style={{'--prefix':'CALN'}}>
|
||||
<div id="dycalendar"></div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
const fetchApi = async (widget) => {
|
||||
var tmpWdgt = {
|
||||
...widget
|
||||
};
|
||||
var date = new Date();
|
||||
|
||||
console.log('fetching ON THIS DAY');
|
||||
await axios.get(`https://en.wikipedia.org/api/rest_v1/feed/onthisday/events/${date.getMonth()}/${date.getDay()}`)
|
||||
.then(res=>res.data).then(data => {
|
||||
.then(res => res.data).then(data => {
|
||||
console.log("Fetched");
|
||||
var event = data.events.[Math.floor(Math.random() * data.events.length)];
|
||||
var event = data.events. [Math.floor(Math.random() * data.events.length)];
|
||||
date.setYear(event.year);
|
||||
|
||||
tmpWdgt.data.date = date.toLocaleDateString("en-US", {
|
||||
year: "numeric",
|
||||
month: "short",
|
||||
day: "numeric"
|
||||
});
|
||||
tmpWdgt.data.date = date.toLocaleDateString("en-US", {
|
||||
year: "numeric",
|
||||
month: "short",
|
||||
day: "numeric"
|
||||
});
|
||||
|
||||
tmpWdgt.data.event = event;
|
||||
}).catch((error) => {
|
||||
console.log("Fetch failed");
|
||||
});
|
||||
tmpWdgt.data.event = event;
|
||||
}).catch((error) => {
|
||||
console.log("Fetch failed");
|
||||
});
|
||||
|
||||
console.log('fetching NEWS');
|
||||
await axios.get(`https://saurav.tech/NewsAPI/top-headlines/category/general/in.json`)
|
||||
.then(res=>res.data).then(data => {
|
||||
.then(res => res.data).then(data => {
|
||||
console.log('NEWS Fetched');
|
||||
var newsList = [];
|
||||
for (var i = 0; i < data.totalResults; i++) {
|
||||
@@ -584,9 +628,9 @@ const fetchApi = async (widget)=>{
|
||||
}
|
||||
|
||||
tmpWdgt.data.news = newsList;
|
||||
}).catch((error) => {
|
||||
console.log("Fetch failed");
|
||||
});
|
||||
}).catch((error) => {
|
||||
console.log("Fetch failed");
|
||||
});
|
||||
|
||||
tmpWdgt.updated = true;
|
||||
return tmpWdgt;
|
||||
|
||||
@@ -69,3 +69,22 @@
|
||||
.qksrch svg{
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.calnpane{
|
||||
position: absolute;
|
||||
bottom: 12px;
|
||||
right: 12px;
|
||||
// width: 280px;
|
||||
min-height: 300px;
|
||||
background: rgba(255, 255, 255, 0.88);
|
||||
-webkit-backdrop-filter: blur(10px);
|
||||
backdrop-filter: blur(10px);
|
||||
overflow: hidden;
|
||||
transition: all ease-in-out 200ms;
|
||||
z-index: 9999;
|
||||
border-radius: 6px;
|
||||
|
||||
&[data-hide="true"] {
|
||||
bottom: -330px;
|
||||
}
|
||||
}
|
||||
@@ -1,21 +1,17 @@
|
||||
.desktopCont {
|
||||
width: 100%;
|
||||
width: fit-content;
|
||||
height: 100%;
|
||||
display: grid;
|
||||
grid-auto-flow: column;
|
||||
grid-template-columns: repeat(auto-fit, 90px);
|
||||
grid-template-rows: repeat(auto-fit, 98px);
|
||||
align-content: space-evenly;
|
||||
}
|
||||
|
||||
.dskApp {
|
||||
width: 48px;
|
||||
height: 66px;
|
||||
margin: 4px;
|
||||
padding: 12px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 0.8em;
|
||||
transition: all ease-in-out 200ms;
|
||||
|
||||
|
||||
@@ -35,6 +35,17 @@ const Taskbar = ()=>{
|
||||
dispatch({type: "TASKPHIDE"})
|
||||
}
|
||||
|
||||
const clickDispatch = (event)=>{
|
||||
var action = {
|
||||
type: event.target.dataset.action,
|
||||
payload: event.target.dataset.payload
|
||||
};
|
||||
|
||||
if(action.type){
|
||||
dispatch(action);
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="taskbar">
|
||||
<div className="taskcont">
|
||||
@@ -78,11 +89,12 @@ const Taskbar = ()=>{
|
||||
<Icon className="taskIcon" src="wifi" ui width={14}/>
|
||||
<Icon className="taskIcon" src="battery" ui width={16}/>
|
||||
<Icon className="taskIcon" src='audio' ui width={22}/>
|
||||
<div className="taskDate">
|
||||
<div className="taskDate handcr prtclk hvdark" onClick={clickDispatch}
|
||||
data-action="CALNTOGG">
|
||||
<div>{new Date().toLocaleDateString("en-US",{year:"2-digit", month:"2-digit",day: "numeric" })}</div>
|
||||
<div>{new Date().toLocaleTimeString("en-US",{hour: 'numeric', minute: 'numeric'})}</div>
|
||||
</div>
|
||||
<Icon className="taskIcon mr-2" ui src='sidepane' width={16} invert click='PANETOGG'/>
|
||||
<Icon className="taskIcon mr-2 hvdark" ui src='sidepane' width={16} invert click='PANETOGG'/>
|
||||
<Icon className="graybd" ui width={6} click='SHOWDSK' pr/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -37,9 +37,8 @@
|
||||
width: 44px;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
padding: 6px 0;
|
||||
padding: 6px 8px 6px 6px;
|
||||
font-size: 0.64em;
|
||||
margin: 0 8px 0 6px;
|
||||
flex-direction: column;
|
||||
|
||||
div{
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
import React, {useState, useEffect} from 'react';
|
||||
import {useSelector, useDispatch} from 'react-redux';
|
||||
import {Icon, Image, ToolBar} from '../../../utils/general';
|
||||
|
||||
export const AboutWin = ()=>{
|
||||
const [open, setOpen] = useState(!true);
|
||||
|
||||
return open?(
|
||||
<div className="aboutApp floatTab dpShad">
|
||||
<div className="py-1 px-2 bg-gray-100 text-xss">
|
||||
<div className="">About Windows</div>
|
||||
</div>
|
||||
<div className="windowScreen flex flex-col" data-dock="true">
|
||||
<div className="restWindow h-full flex-grow flex flex-col items-center p-4">
|
||||
<Image src="windows11" free/>
|
||||
<div className="w-88 h-px bg-gray-400 my-4">
|
||||
</div>
|
||||
<div className="abCont">
|
||||
<div>Microsoft Windows (in React)</div>
|
||||
<div>Version 21H2 (OS Build 22000.51)</div>
|
||||
<div>© Blue Edge. All rights reserved.</div>
|
||||
<br/>
|
||||
<div>
|
||||
The Windows 11 Home Single Language Operating System and its user
|
||||
interface are protected by the trademark and other pending or
|
||||
existing intellectual property rights in the United States and other
|
||||
countries/regions.
|
||||
</div>
|
||||
<br/>
|
||||
<br/>
|
||||
<div>
|
||||
This product is licensed with <a target="_blank" href="https://github.com/blueedgetechno/windows11/blob/master/LICENSE">Creative Commons</a>.
|
||||
</div>
|
||||
<div className="mt-1">
|
||||
|
||||
|
||||
contact: <a href="mailto:blueedgetechno@gmail.com">blueedgetechno@gmail.com</a>
|
||||
</div>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<div className="okbtn">
|
||||
<div className="bg-gray-100" onClick={()=>{
|
||||
setOpen(false);
|
||||
}}>Ok</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
):null;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import React from 'react';
|
||||
|
||||
export const Mark = (props) => {
|
||||
return (
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width={76}
|
||||
height={95}
|
||||
viewBox="0 0 760 950"
|
||||
{...props}>
|
||||
<path
|
||||
d="M120 881c0-155 96-575 144-630 7-9 25-48 40-88 31-82 50-104 71-82 14 15 81 162 120 264 51 136 105 412 105 542v63h-30c-30 0-30-1-30-55v-55H180v55c0 54 0 55-30 55h-30v-69zm343-98l107-6v-44c0-84-95-447-122-464-15-10-148-12-172-3-27 10-114 328-123 452l-6 72h105c58 0 153-3 211-7zm-89-588c-4-8-10-15-15-15s-9 7-9 15 7 15 15 15c9 0 12-6 9-15z"
|
||||
fill="#020202"
|
||||
/>
|
||||
<path
|
||||
fill={props.color || "#111"}
|
||||
d="M150 880v-70h420v140H150v-70zM305 213c10-42 47-123 55-123 9 0 60 112 60 134 0 13-11 16-61 16h-61l7-27z" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,232 @@
|
||||
import React, {useState, useEffect} from 'react';
|
||||
import {useSelector, useDispatch} from 'react-redux';
|
||||
import {Icon, Image, ToolBar} from '../../../utils/general';
|
||||
|
||||
export const Calculator = ()=>{
|
||||
const apps = useSelector(state => state.apps);
|
||||
const wnapp = useSelector(state => state.apps.calculator);
|
||||
const dispatch = useDispatch();
|
||||
const [equa, setEqua] = useState([]);
|
||||
const [cval, setCval] = useState("0");
|
||||
const [err, setErr] = useState(null);
|
||||
const [hist, setHist] = useState([]);
|
||||
|
||||
const getIdx = (node)=>{
|
||||
var i = 0;
|
||||
while( (node = node.previousSibling) != null ){
|
||||
i++;
|
||||
}
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
const action = (event)=>{
|
||||
var btn = event.target.dataset.ch,
|
||||
idx = getIdx(event.target);
|
||||
|
||||
var val = cval;
|
||||
if (idx==2) {
|
||||
setCval("0");
|
||||
setEqua([]);
|
||||
setErr(null);
|
||||
}else if(val=="Infinity" || val=="NaN"){
|
||||
setErr(val);
|
||||
}else if(idx==1){
|
||||
setCval("0");
|
||||
}else if (idx==3) {
|
||||
val = val.substring(0,val.length-1);
|
||||
if(val.length==0 || val=="-") val="0";
|
||||
setCval(val);
|
||||
}else if (idx<7 && idx>3) {
|
||||
if(btn=="inv"){
|
||||
var num = parseFloat(val);
|
||||
|
||||
if(num!=0){
|
||||
var inv = 1/num;
|
||||
}else{
|
||||
setErr("Cannot divide by zero");
|
||||
return;
|
||||
}
|
||||
setCval(inv.toString());
|
||||
}else if (btn=="sq") {
|
||||
var num = parseFloat(val),
|
||||
sq = num**2;
|
||||
setCval(sq.toString());
|
||||
}else if(btn=="sqrt"){
|
||||
var num = parseFloat(val);
|
||||
if(val[0]!="-"){
|
||||
var sqrt = Math.sqrt(num);
|
||||
}else{
|
||||
setErr("Invalid Input");
|
||||
return;
|
||||
}
|
||||
setCval(sqrt.toString());
|
||||
}
|
||||
}else if(idx>7 && (idx+1)%4!=0){
|
||||
if(btn.length==1){
|
||||
var tpq = [...equa];
|
||||
|
||||
if(tpq[3]!=null){
|
||||
if(btn=="."){
|
||||
val="0";
|
||||
}else{
|
||||
val="";
|
||||
}
|
||||
|
||||
setEqua([]);
|
||||
}
|
||||
|
||||
val += btn;
|
||||
if(cval=="0" && btn!="."){
|
||||
val = btn;
|
||||
}
|
||||
|
||||
if(val.length<17 &&
|
||||
val.match(/^-?[0-9]+([.][0-9]*)?$/)!=null
|
||||
){
|
||||
setCval(val);
|
||||
}
|
||||
|
||||
}else if(cval!="0"){
|
||||
if(cval[0]=="-"){
|
||||
setCval(cval.substring(1));
|
||||
}else{
|
||||
setCval("-"+cval);
|
||||
}
|
||||
}
|
||||
}else if (idx>3 && idx%4==3) {
|
||||
var tpq = [...equa];
|
||||
if(btn!="="){
|
||||
if(tpq[2]==null){
|
||||
if(tpq[0]==null){
|
||||
tpq[0] = parseFloat(cval);
|
||||
}
|
||||
tpq[1] = btn;
|
||||
}else{
|
||||
tpq = [cval,btn];
|
||||
}
|
||||
|
||||
setCval("0");
|
||||
setEqua(tpq);
|
||||
}else{
|
||||
if(tpq[1]!=null){
|
||||
if(tpq[2]==null){
|
||||
tpq[2]=parseFloat(cval);
|
||||
}
|
||||
|
||||
tpq[3]="=";
|
||||
if(tpq[1]=="/"){
|
||||
if(tpq[2]!=0){
|
||||
tpq[4] = tpq[0]/tpq[2];
|
||||
}else{
|
||||
setErr("Cannot divide by zero");
|
||||
return;
|
||||
}
|
||||
}else if (tpq[1]=="x") {
|
||||
tpq[4] = tpq[0]*tpq[2];
|
||||
}else if (tpq[1]=="-") {
|
||||
tpq[4] = tpq[0]-tpq[2];
|
||||
}else{
|
||||
tpq[4] = tpq[0]+tpq[2];
|
||||
}
|
||||
|
||||
var tmpHist = [...hist];
|
||||
setEqua(tpq);
|
||||
setCval(tpq[4]);
|
||||
tmpHist.push(tpq);
|
||||
setHist(tmpHist);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
className="calcApp floatTab dpShad" data-size={wnapp.size}
|
||||
data-max={wnapp.max} style={{
|
||||
...(wnapp.size=="cstm"?wnapp.dim:null),
|
||||
zIndex: wnapp.z
|
||||
}} data-hide={wnapp.hide} id={wnapp.icon+"App"}>
|
||||
<ToolBar app={wnapp.action} icon={wnapp.icon}
|
||||
name="Calculator"/>
|
||||
<div className="windowScreen flex flex-col" data-dock="true">
|
||||
<div className="flex pt-2">
|
||||
<div className="flex pl-2 items-center">
|
||||
<Icon fafa="faBars" color="#222" width={14}/>
|
||||
<div className="mx-4 font-semibold pb-1">Standard</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="restWindow h-full flex-grow flex">
|
||||
<div className="w-full flex-grow flex flex-col relative">
|
||||
<div className="valCont w-full">
|
||||
<div className="eqCont">
|
||||
{equa[0]}{" "}{equa[1]}{" "}{equa[2]}
|
||||
{" "}{equa[3]}{" "}{equa[4]}
|
||||
</div>
|
||||
<div className="vlcCont">{err==null?cval:err}</div>
|
||||
</div>
|
||||
<div className="msrVal">
|
||||
<div>MC</div>
|
||||
<div>MR</div>
|
||||
<div>M+</div>
|
||||
<div>M-</div>
|
||||
<div>MS</div>
|
||||
</div>
|
||||
<div className="opcont" data-err={err!=null}>
|
||||
<div onClick={action} className="oper" data-ch="%">%</div>
|
||||
<div onClick={action} className="oper" data-ch="CE">CE</div>
|
||||
<div onClick={action} className="oper" data-ch="C">C</div>
|
||||
<div onClick={action} className="oper" data-ch="back">
|
||||
<Icon fafa="faBackspace"/>
|
||||
</div>
|
||||
<div onClick={action} className="oper" data-ch="inv">1/x</div>
|
||||
<div onClick={action} className="oper opow" data-ch="sq">
|
||||
x
|
||||
<sup className="text-xss">2</sup>
|
||||
</div>
|
||||
<div onClick={action} className="oper opow" data-ch="sqrt">
|
||||
<sup className="text-xss">2</sup>
|
||||
√x
|
||||
</div>
|
||||
<div onClick={action} className="oper" data-ch="/">/</div>
|
||||
<div onClick={action} className="oper" data-ch="7">7</div>
|
||||
<div onClick={action} className="oper" data-ch="8">8</div>
|
||||
<div onClick={action} className="oper" data-ch="9">9</div>
|
||||
<div onClick={action} className="oper" data-ch="x">x</div>
|
||||
<div onClick={action} className="oper" data-ch="4">4</div>
|
||||
<div onClick={action} className="oper" data-ch="5">5</div>
|
||||
<div onClick={action} className="oper" data-ch="6">6</div>
|
||||
<div onClick={action} className="oper" data-ch="-">-</div>
|
||||
<div onClick={action} className="oper" data-ch="1">1</div>
|
||||
<div onClick={action} className="oper" data-ch="2">2</div>
|
||||
<div onClick={action} className="oper" data-ch="3">3</div>
|
||||
<div onClick={action} className="oper" data-ch="+">+</div>
|
||||
<div onClick={action} className="oper" data-ch="+-">+/-</div>
|
||||
<div onClick={action} className="oper" data-ch="0">0</div>
|
||||
<div onClick={action} className="oper" data-ch=".">.</div>
|
||||
<div onClick={action} className="oper" data-ch="=">=</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="calcHis flex flex-col">
|
||||
<div className="text-sm font-semibold">History</div>
|
||||
{hist.length!=0?null:
|
||||
<div className="text-xs mt-4">There's no history yet</div>
|
||||
}
|
||||
<div className="histCont thinScroll">
|
||||
<div className="hct h-max flex-grow">
|
||||
{hist.map(his=>{
|
||||
return (
|
||||
<div className="flex flex-col items-end mb-6 text-gray-500">
|
||||
{his[0]}{" "}{his[1]}{" "}{his[2]}{" "}{his[3]}
|
||||
<div className="text-2xl text-gray-800">{his[4]}</div>
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
import React, {useState, useEffect} from 'react';
|
||||
import {useSelector, useDispatch} from 'react-redux';
|
||||
import {Icon, Image, ToolBar} from '../../../utils/general';
|
||||
|
||||
export const EdgeMenu = ()=>{
|
||||
const apps = useSelector(state => state.apps);
|
||||
const wnapp = useSelector(state => state.apps.edge);
|
||||
const [url, setUrl] = useState("https://bing.com");
|
||||
const [hist, setHist] = useState(["https://bing.com","https://bing.com"]);
|
||||
const dispatch = useDispatch();
|
||||
|
||||
const clickDispatch = (event)=>{
|
||||
var action = {
|
||||
type: event.target.dataset.action,
|
||||
payload: event.target.dataset.payload
|
||||
};
|
||||
if(action.type) dispatch(action);
|
||||
}
|
||||
|
||||
const isValidURL = (string)=>{
|
||||
var res = string.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g);
|
||||
return (res !== null)
|
||||
};
|
||||
|
||||
const action = (e)=>{
|
||||
var iframe = document.getElementById('isite');
|
||||
var x = e.target && e.target.dataset.payload;
|
||||
|
||||
if(iframe && x==0){
|
||||
iframe.src = iframe.src;
|
||||
}else if(iframe && x==1){
|
||||
setHist([url, "https://www.bing.com" ])
|
||||
setUrl("https://www.bing.com");
|
||||
}else if(iframe && x==2){
|
||||
setHist([url, "https://www.google.com/webhp?igu=1"])
|
||||
setUrl("https://www.google.com/webhp?igu=1");
|
||||
}else if(iframe && x==3){
|
||||
if(e.key==="Enter"){
|
||||
console.log("Wow");
|
||||
var qry = e.target.value;
|
||||
|
||||
if(isValidURL(qry)){
|
||||
if(!qry.startsWith("http")){
|
||||
qry = "https://"+qry
|
||||
}
|
||||
|
||||
}else{
|
||||
qry = "https://www.bing.com/search?q="+qry;
|
||||
}
|
||||
|
||||
e.target.value = qry;
|
||||
|
||||
setHist([url, qry])
|
||||
setUrl(qry);
|
||||
}
|
||||
}else if(x==4){
|
||||
setUrl(hist[0])
|
||||
}else if(x==5){
|
||||
setUrl(hist[1])
|
||||
}
|
||||
}
|
||||
|
||||
useEffect(()=>{
|
||||
if(wnapp.url){
|
||||
setUrl(wnapp.url);
|
||||
dispatch({type: "EDGELINK"});
|
||||
}
|
||||
})
|
||||
|
||||
return (
|
||||
<div
|
||||
className="edgeBrowser floatTab dpShad" data-size={wnapp.size}
|
||||
data-max={wnapp.max} style={{
|
||||
...(wnapp.size=="cstm"?wnapp.dim:null),
|
||||
zIndex: wnapp.z
|
||||
}} data-hide={wnapp.hide} id={wnapp.icon+"App"}>
|
||||
<ToolBar app={wnapp.action} icon={wnapp.icon}
|
||||
name="Microsoft Edge" float/>
|
||||
<div className="windowScreen flex flex-col">
|
||||
<div className="overTool flex">
|
||||
<Icon src={wnapp.icon} width={14} margin="0 6px"/>
|
||||
<div className="btab bg-gray-100">
|
||||
<div>New Tab</div>
|
||||
<Icon fafa="faTimes" click={wnapp.action} payload="close" width={10}/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="restWindow flex-grow flex flex-col">
|
||||
<div
|
||||
className="addressBar w-full bg-gray-100 h-10 flex items-center">
|
||||
<Icon src="left" onClick={action} payload={4} width={14} ui margin="0 8px"/>
|
||||
<Icon src="right" onClick={action} payload={5} width={14} ui margin="0 8px"/>
|
||||
<Icon fafa="faRedo" onClick={action} payload={0} width={14} color="#343434" margin="0 8px"/>
|
||||
<Icon fafa="faHome" onClick={action} payload={1} width={18} color="#343434" margin="0 16px"/>
|
||||
<div className="addCont relative">
|
||||
<input
|
||||
className="ltShad w-full bg-gray-0 h-6 px-4 text-gray-900"
|
||||
onKeyDown={action}
|
||||
data-payload={3}
|
||||
defaultValue={url}
|
||||
placeholder="Type url or a query to search"
|
||||
type="text"/>
|
||||
<Icon className="absolute top-0 right-0 z-1 handcr"
|
||||
src="google" ui onClick={action}
|
||||
payload={2} width={16} margin="7px 10px"/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="siteFrame flex-grow overflow-hidden">
|
||||
{wnapp.hide?null:(
|
||||
<iframe src={url} id="isite" className="w-full h-full"
|
||||
frameborder="0">
|
||||
</iframe>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
import React, {useState, useEffect} from 'react';
|
||||
import {useSelector, useDispatch} from 'react-redux';
|
||||
import {Icon, Image, ToolBar} from '../../../utils/general';
|
||||
|
||||
import dirs from './dir.json';
|
||||
|
||||
export const Explorer = ()=>{
|
||||
const apps = useSelector(state => state.apps);
|
||||
const wnapp = useSelector(state => state.apps.explorer);
|
||||
const [dpath, setPath] = useState("");
|
||||
const dispatch = useDispatch();
|
||||
|
||||
return (
|
||||
<div
|
||||
className="msfiles floatTab dpShad" data-size={wnapp.size}
|
||||
data-max={wnapp.max} style={{
|
||||
...(wnapp.size=="cstm"?wnapp.dim:null),
|
||||
zIndex: wnapp.z
|
||||
}} data-hide={wnapp.hide} id={wnapp.icon+"App"}>
|
||||
<ToolBar app={wnapp.action} icon={wnapp.icon}
|
||||
name="File Explorer" bg="#f0f0f0"/>
|
||||
<div className="windowScreen flex flex-col" data-dock="true">
|
||||
<div className="restWindow flex-grow flex flex-col">
|
||||
<div className="flex-grow grid place-items-center text-4xl font-semibold text-gray-600">
|
||||
Coming soon
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
import React, {useState, useEffect} from 'react';
|
||||
import {useSelector, useDispatch} from 'react-redux';
|
||||
import {Icon, Image, ToolBar} from '../../../utils/general';
|
||||
|
||||
export const Notepad = ()=>{
|
||||
const apps = useSelector(state => state.apps);
|
||||
const wnapp = useSelector(state => state.apps.notepad);
|
||||
const dispatch = useDispatch();
|
||||
|
||||
return (
|
||||
<div
|
||||
className="notepad floatTab dpShad" data-size={wnapp.size}
|
||||
data-max={wnapp.max} style={{
|
||||
...(wnapp.size=="cstm"?wnapp.dim:null),
|
||||
zIndex: wnapp.z
|
||||
}} data-hide={wnapp.hide} id={wnapp.icon+"App"}>
|
||||
<ToolBar app={wnapp.action} icon={wnapp.icon}
|
||||
name="Untitled - Notepad"/>
|
||||
<div className="windowScreen flex flex-col" data-dock="true">
|
||||
<div className="flex text-xss pb-1 border-gray-200 border-0 border-b-2 border-solid">
|
||||
<div className="mx-2">File</div>
|
||||
<div className="mx-2">Edit</div>
|
||||
<div className="mx-2">Format</div>
|
||||
<div className="mx-2">View</div>
|
||||
<div className="mx-2">Help</div>
|
||||
</div>
|
||||
<div className="restWindow h-full flex-grow text-gray-100">
|
||||
<div className="w-full h-full overflow-hidden">
|
||||
<textarea className="noteText thinScroll" id="textpad"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,157 @@
|
||||
import React, {useState, useEffect} from 'react';
|
||||
import {useSelector, useDispatch} from 'react-redux';
|
||||
import {Icon, Image, ToolBar} from '../../../utils/general';
|
||||
|
||||
export const MicroStore = ()=>{
|
||||
const apps = useSelector(state => state.apps);
|
||||
const wnapp = useSelector(state => state.apps.store);
|
||||
const dispatch = useDispatch();
|
||||
const ribbon = useSelector(state => state.globals.ribbon);
|
||||
const apprib = useSelector(state => state.globals.apprib);
|
||||
const gamerib = useSelector(state => state.globals.gamerib);
|
||||
const movrib = useSelector(state => state.globals.movrib);
|
||||
const [tab, setTab] = useState("sthome");
|
||||
|
||||
const clickDispatch = (event)=>{
|
||||
var action = {
|
||||
type: event.target.dataset.action,
|
||||
payload: event.target.dataset.payload
|
||||
};
|
||||
if(action.type) dispatch(action);
|
||||
}
|
||||
|
||||
const action = (e)=>{
|
||||
var x = e.target && e.target.dataset.action;
|
||||
if(x){
|
||||
var target = document.getElementById(x);
|
||||
if(target){
|
||||
setTab(x);
|
||||
target.parentNode.parentNode.scrollTop = target.offsetTop;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
className="wnstore floatTab dpShad" data-size={wnapp.size}
|
||||
data-max={wnapp.max} style={{
|
||||
...(wnapp.size=="cstm"?wnapp.dim:null),
|
||||
zIndex: wnapp.z
|
||||
}} data-hide={wnapp.hide} id={wnapp.icon+"App"}>
|
||||
<ToolBar app={wnapp.action} icon={wnapp.icon}
|
||||
name="Microsoft Store"/>
|
||||
<div className="windowScreen flex">
|
||||
<div className="storeNav h-full w-16 flex flex-col">
|
||||
<Icon fafa="faHome" onClick={action} click="sthome" width={20} payload={tab=="sthome"}/>
|
||||
<Icon fafa="faThLarge" onClick={action} click="apprib" width={18} payload={tab=="apprib"}/>
|
||||
<Icon fafa="faGamepad" onClick={action} click="gamerib" width={20} payload={tab=="gamerib"}/>
|
||||
<Icon fafa="faFilm" onClick={action} click="movrib" width={20} payload={tab=="movrib"}/>
|
||||
</div>
|
||||
<div className="restWindow msfull thinScroll">
|
||||
<div className="storeSection w-full absolute top-0">
|
||||
<Image id="sthome" className="frontPage w-full" src="store/lucacover"/>
|
||||
<div className="panelName absolute m-6 text-xl top-0">Home</div>
|
||||
<div className="w-full overflow-x-scroll noscroll overflow-y-hidden -mt-16">
|
||||
<div className="storeRibbon">
|
||||
{ribbon && ribbon.map(x=>{
|
||||
return x=="unescape"?(
|
||||
<a href="https://blueedge.me/unescape" target="_blank">
|
||||
<Image className="mx-1 dpShad rounded overflow-hidden"
|
||||
var={x} h={100} dir="store/float" src={x}/>
|
||||
</a>
|
||||
):(
|
||||
<Image className="mx-1 dpShad rounded overflow-hidden"
|
||||
var={x} h={100} dir="store/float" src={x}/>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
<div id="apprib" className="frontCont amzApps my-8 py-20 w-auto mx-8 flex justify-between noscroll overflow-x-scroll overflow-y-hidden">
|
||||
<div className="flex w-64 flex-col text-gray-100 h-full px-8">
|
||||
<div className="text-xl">Windows Apps</div>
|
||||
<div className="text-xs mt-2">Take your windows experience to new heights with these must-have apps</div>
|
||||
</div>
|
||||
<div className="flex w-max pr-8">
|
||||
{apprib && apprib.map(x=>{
|
||||
var stars = 3 + (x.charCodeAt(0)+x.charCodeAt(1))%3;
|
||||
return (
|
||||
<div className="ribcont rounded my-auto p-2 pb-2">
|
||||
<Image className="mx-1 py-1 mb-2 rounded overflow-hidden"
|
||||
w={120} dir="store/apps" src={x}/>
|
||||
<div className="capitalize text-xs font-semibold">{x}</div>
|
||||
<div className="flex mt-2 items-center">
|
||||
<Icon className="bluestar" fafa="faStar" width={6}/>
|
||||
<Icon className="bluestar" fafa="faStar" width={6}/>
|
||||
<Icon className="bluestar" fafa="faStar" width={6}/>
|
||||
<Icon className={stars>3?"bluestar":""} fafa="faStar" width={6}/>
|
||||
<Icon className={stars>4?"bluestar":""} fafa="faStar" width={6}/>
|
||||
<div className="text-xss text-gray-800">{1+x.charCodeAt(3)%5}k</div>
|
||||
</div>
|
||||
<div className="text-xss mt-8">{x.charCodeAt(4)%2?"Free":"Owned"}</div>
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="gamerib" className="frontCont amzGames my-8 py-20 w-auto mx-8 flex justify-between noscroll overflow-x-scroll overflow-y-hidden">
|
||||
<div className="flex w-64 flex-col text-gray-100 h-full px-8">
|
||||
<div className="text-xl">Featured Games</div>
|
||||
<div className="text-xs mt-2">Explore fun to play xbox games and find a new favorite</div>
|
||||
</div>
|
||||
<div className="flex w-max pr-8">
|
||||
{gamerib && gamerib.map(x=>{
|
||||
var stars = 3 + (x.charCodeAt(0)+x.charCodeAt(1))%3;
|
||||
return (
|
||||
<div className="ribcont rounded my-auto p-2 pb-2">
|
||||
<Image className="mx-1 py-1 mb-2 rounded overflow-hidden"
|
||||
w={120} dir="store/games" src={x}/>
|
||||
<div className="capitalize text-xs font-semibold">{x}</div>
|
||||
<div className="flex mt-2 items-center">
|
||||
<Icon className="bluestar" fafa="faStar" width={6}/>
|
||||
<Icon className="bluestar" fafa="faStar" width={6}/>
|
||||
<Icon className="bluestar" fafa="faStar" width={6}/>
|
||||
<Icon className={stars>3?"bluestar":""} fafa="faStar" width={6}/>
|
||||
<Icon className={stars>4?"bluestar":""} fafa="faStar" width={6}/>
|
||||
<div className="text-xss text-gray-800">{1+x.charCodeAt(3)%5}k</div>
|
||||
</div>
|
||||
<div className="text-xss mt-8">{x.charCodeAt(4)%2?"Free":"Owned"}</div>
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="movrib" className="frontCont amzMovies my-8 py-20 w-auto mx-8 flex justify-between noscroll overflow-x-scroll overflow-y-hidden">
|
||||
<div className="flex w-64 flex-col text-gray-100 h-full px-8">
|
||||
<div className="text-xl">Featured Films</div>
|
||||
<div className="text-xs mt-2">Rent or buy the latest hit films and watch them at home or on the go</div>
|
||||
</div>
|
||||
<div className="flex w-max pr-8">
|
||||
{movrib && movrib.map(x=>{
|
||||
var stars = 3 + (x.charCodeAt(0)+x.charCodeAt(1))%3;
|
||||
return (
|
||||
<div className="ribcont rounded my-auto p-2 pb-2">
|
||||
<Image className="mx-1 py-1 mb-2 rounded overflow-hidden"
|
||||
w={120} dir="store/movies" src={x}/>
|
||||
<div className="capitalize text-xs font-semibold">{x}</div>
|
||||
<div className="flex mt-2 items-center">
|
||||
<Icon className="bluestar" fafa="faStar" width={6}/>
|
||||
<Icon className="bluestar" fafa="faStar" width={6}/>
|
||||
<Icon className="bluestar" fafa="faStar" width={6}/>
|
||||
<Icon className={stars>3?"bluestar":""} fafa="faStar" width={6}/>
|
||||
<Icon className={stars>4?"bluestar":""} fafa="faStar" width={6}/>
|
||||
<div className="text-xss text-gray-800">{1+x.charCodeAt(3)%5}k</div>
|
||||
</div>
|
||||
<div className="text-xss mt-8">{x.charCodeAt(4)%2?"Free":"Owned"}</div>
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,287 @@
|
||||
import React, {useState, useEffect} from 'react';
|
||||
import {useSelector, useDispatch} from 'react-redux';
|
||||
import {Icon, Image, ToolBar} from '../../../utils/general';
|
||||
|
||||
import dirs from './dir.json';
|
||||
|
||||
export const WnTerminal = ()=>{
|
||||
const apps = useSelector(state => state.apps);
|
||||
const wnapp = useSelector(state => state.apps.terminal);
|
||||
const [stack, setStack] = useState([
|
||||
"Microsoft Windows [Version 10.0.22000.51]",
|
||||
"(c) Microsoft Corporation. All rights reserved.",
|
||||
""
|
||||
]);
|
||||
const [pwd, setPwd] = useState("C:\\Users\\Blue");
|
||||
const [lastCmd, setLsc] = useState(0);
|
||||
const [wntitle, setWntitle] = useState("Windows Terminal");
|
||||
|
||||
const dispatch = useDispatch();
|
||||
|
||||
const dirFolders = (isFile="")=>{
|
||||
var tdir = {...dirs},
|
||||
curr = pwd=="C:\\"?[]:pwd.replace("C:\\","").split("\\");
|
||||
|
||||
|
||||
if(pwd!="C:\\"){
|
||||
for (var i = 0; i < curr.length; i++) {
|
||||
console.log(tdir);
|
||||
tdir = tdir[curr[i]];
|
||||
}
|
||||
}
|
||||
|
||||
if(isFile==""){
|
||||
return Object.keys(tdir);
|
||||
}else{
|
||||
return tdir[isFile] || {};
|
||||
}
|
||||
}
|
||||
|
||||
const cmdTool = (cmd)=>{
|
||||
var tmpStack = [...stack];
|
||||
tmpStack.push(pwd+">"+cmd);
|
||||
var arr = cmd.split(" "),
|
||||
type = arr[0].trim(), arg = arr.splice(1,arr.length).join(" ") || "";
|
||||
|
||||
arg = arg.trim();
|
||||
|
||||
if(type=="echo"){
|
||||
if(arg.length){
|
||||
tmpStack.push(arg);
|
||||
}else{
|
||||
tmpStack.push("ECHO is on.");
|
||||
}
|
||||
}else if(type=="cd"){
|
||||
if(arg.length){
|
||||
var errp = true;
|
||||
var curr = pwd=="C:\\"?[]:pwd.replace("C:\\","").split("\\");
|
||||
|
||||
if(arg=="."){
|
||||
errp = false;
|
||||
}else if (arg=="..") {
|
||||
errp = false;
|
||||
curr.pop();
|
||||
setPwd("C:\\"+curr.join("\\"));
|
||||
}else if(!arg.includes(".")){
|
||||
var tdir = dirFolders();
|
||||
|
||||
for (var i = 0; i < tdir.length; i++) {
|
||||
if(arg==tdir[i] && errp){
|
||||
curr.push(tdir[i]);
|
||||
errp = false;
|
||||
setPwd("C:\\"+curr.join("\\"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
errp = false;
|
||||
tmpStack.push("The directory name is invalid.");
|
||||
}
|
||||
|
||||
if(errp){
|
||||
tmpStack.push("The system cannot find the path specified.");
|
||||
}
|
||||
}else{
|
||||
tmpStack.push(pwd);
|
||||
}
|
||||
}else if (type=="dir") {
|
||||
tmpStack.push(" Directory of "+pwd);
|
||||
tmpStack.push("");
|
||||
tmpStack.push("<DIR> .")
|
||||
tmpStack.push("<DIR> ..")
|
||||
|
||||
var tdir = dirFolders();
|
||||
for (var i = 0; i < tdir.length; i++) {
|
||||
if(!tdir[i].includes(".")){
|
||||
tmpStack.push("<DIR>..."+tdir[i])
|
||||
}else{
|
||||
tmpStack.push("FILE...."+tdir[i])
|
||||
}
|
||||
}
|
||||
}else if (type=="cls") {
|
||||
tmpStack = [];
|
||||
}else if (type=="type") {
|
||||
var errp = true;
|
||||
|
||||
if(arg.includes(".")){
|
||||
var tdir = dirFolders();
|
||||
|
||||
for (var i = 0; i < tdir.length; i++) {
|
||||
if(arg==tdir[i] && errp){
|
||||
errp = false;
|
||||
var file = dirFolders(tdir[i]);
|
||||
var content = file.content || "";
|
||||
content = content.split("\n");
|
||||
for (var i = 0; i < content.length; i++) {
|
||||
tmpStack.push(content[i]);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(errp){
|
||||
tmpStack.push("The system cannot find the file specified.");
|
||||
}
|
||||
}else if (type=="start") {
|
||||
dispatch({type: "EDGELINK", payload: arg});
|
||||
}else if (type=="date") {
|
||||
tmpStack.push("The current date is: " + new Date().toLocaleDateString());
|
||||
}else if (type=="time") {
|
||||
tmpStack.push("The current time is: " +
|
||||
new Date().toLocaleTimeString("en-GB",{
|
||||
hour: '2-digit',
|
||||
minute: '2-digit',
|
||||
second: '2-digit'}).replaceAll(":",".") + "." +
|
||||
Math.floor(Math.random()*100));
|
||||
}else if (type=="exit") {
|
||||
tmpStack = [
|
||||
"Microsoft Windows [Version 10.0.22000.51]",
|
||||
"(c) Microsoft Corporation. All rights reserved.",
|
||||
""
|
||||
];
|
||||
dispatch({type: wnapp.action, payload: "close"})
|
||||
}else if (type=="title") {
|
||||
setWntitle(arg.length?arg:"Windows Terminal");
|
||||
}else if (type=="hostname") {
|
||||
tmpStack.push("Blue");
|
||||
}else if (type=="ver") {
|
||||
tmpStack.push("Microsoft Windows [Version 10.0.22000.51]");
|
||||
}else if (type=="systeminfo") {
|
||||
var dvInfo = [
|
||||
"Host Name: BLUE",
|
||||
"OS Name: Microsoft Windows 11 Home Single Language",
|
||||
"OS Version: 10.0.22000 N/A Build 22000.51",
|
||||
"OS Manufacturer: Microsoft Corporation",
|
||||
"OS Configuration: Standalone Workstation",
|
||||
"OS Build Type: Multiprocessor Free",
|
||||
"Registered Owner: Blue",
|
||||
"Registered Organization: N/A",
|
||||
"Product ID: 7H1S1-5AP1R-473DV-3R5I0N"
|
||||
];
|
||||
|
||||
for (var i = 0; i < dvInfo.length; i++) {
|
||||
tmpStack.push(dvInfo[i]);
|
||||
}
|
||||
}else if (type=="help") {
|
||||
var helpArr = [
|
||||
"CD Displays the name of or changes the current directory.",
|
||||
"CLS Clears the screen.",
|
||||
"DATE Displays or sets the date.",
|
||||
"DIR Displays a list of files and subdirectories in a directory.",
|
||||
"ECHO Displays messages, or turns command echoing on or off.",
|
||||
"EXIT Quits the CMD.EXE program (command interpreter).",
|
||||
"HELP Provides Help information for Windows commands.",
|
||||
"START Starts a separate window to run a specified program or command.",
|
||||
"SYSTEMINFO Displays machine specific properties and configuration.",
|
||||
"TIME Displays or sets the system time.",
|
||||
"TITLE Sets the window title for a CMD.EXE session.",
|
||||
"TYPE Displays the contents of a text file.",
|
||||
"VER Displays the Windows version."
|
||||
];
|
||||
|
||||
for (var i = 0; i < helpArr.length; i++) {
|
||||
tmpStack.push(helpArr[i]);
|
||||
}
|
||||
}else{
|
||||
tmpStack.push(`'${type}' is not recognized as an internal or external command,`);
|
||||
tmpStack.push("operable program or batch file.")
|
||||
tmpStack.push("")
|
||||
tmpStack.push("Type \"help\" for available commands")
|
||||
}
|
||||
|
||||
tmpStack.push("");
|
||||
setStack(tmpStack);
|
||||
}
|
||||
|
||||
const action = (event)=>{
|
||||
var cmdline = document.getElementById('curcmd');
|
||||
var action = event.target.dataset.action;
|
||||
|
||||
if(cmdline){
|
||||
if(action=="hover"){
|
||||
var crline = cmdline.parentNode;
|
||||
var cmdcont = document.getElementById('cmdcont');
|
||||
if(crline && cmdcont){
|
||||
cmdcont.scrollTop = crline.offsetTop;
|
||||
}
|
||||
cmdline.focus();
|
||||
}else if (action=="enter") {
|
||||
if(event.key=="Enter"){
|
||||
event.preventDefault();
|
||||
var tmpStack = [...stack];
|
||||
var cmd = event.target.innerText.trim();
|
||||
event.target.innerText = "";
|
||||
setLsc(tmpStack.length+1);
|
||||
cmdTool(cmd);
|
||||
}else if (event.key=="ArrowUp" || event.key=="ArrowDown") {
|
||||
event.preventDefault();
|
||||
var i = lastCmd + [1,-1][Number(event.key=="ArrowUp")];
|
||||
|
||||
while( i>=0 && i<stack.length){
|
||||
if(stack[i].startsWith("C:\\") && stack[i].includes(">")){
|
||||
var tp = stack[i].split(">");
|
||||
event.target.innerText = tp[1] || "";
|
||||
setLsc(i);
|
||||
break;
|
||||
}
|
||||
|
||||
i+=[1,-1][Number(event.key=="ArrowUp")];
|
||||
}
|
||||
|
||||
cmdline.focus();
|
||||
}else if(event.key=="Tab"){
|
||||
event.preventDefault();
|
||||
var cmd = event.target.innerText.trim(),
|
||||
arr = cmd.split(" ");
|
||||
var arg = arr.splice(1,arr.length).join(" ") || "";
|
||||
|
||||
var tdir = dirFolders();
|
||||
for (var i = 0; i < tdir.length; i++) {
|
||||
if(arg.length &&
|
||||
tdir[i].toLowerCase().startsWith(arg.toLowerCase())){
|
||||
event.target.innerText = arr[0]+" "+tdir[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
cmdline.focus();
|
||||
}
|
||||
}
|
||||
|
||||
useEffect(()=>{
|
||||
if(wnapp.dir && wnapp.dir!=pwd){
|
||||
setPwd(wnapp.dir);
|
||||
dispatch({type: "OPENTERM", payload: null});
|
||||
}
|
||||
})
|
||||
|
||||
return (
|
||||
<div
|
||||
className="wnterm floatTab dpShad" data-size={wnapp.size}
|
||||
data-max={wnapp.max} style={{
|
||||
...(wnapp.size=="cstm"?wnapp.dim:null),
|
||||
zIndex: wnapp.z
|
||||
}} data-hide={wnapp.hide} id={wnapp.icon+"App"}>
|
||||
<ToolBar app={wnapp.action} icon={wnapp.icon}
|
||||
name={wntitle} invert bg="#060606"/>
|
||||
<div className="windowScreen flex" data-dock="true">
|
||||
<div className="restWindow h-full flex-grow text-gray-100">
|
||||
<div className="cmdcont w-full box-border overflow-y-scroll thinScroll prtclk"
|
||||
id="cmdcont" onMouseOver={action} onClick={action} data-action="hover">
|
||||
<div className="w-full h-max pb-12">
|
||||
{stack.map(x=> <div className="cmdLine">{x}</div>)}
|
||||
<div className="cmdLine actmd">
|
||||
{pwd}>
|
||||
<div className="ipcmd" id="curcmd" contentEditable
|
||||
data-action="enter" onKeyDown={action}></div>
|
||||
{/* <input id="curcmd" className="ipcmd" type="text" defaultValue="tyler"/> */}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
import React, {useState, useEffect} from 'react';
|
||||
import {useSelector, useDispatch} from 'react-redux';
|
||||
import {Icon, Image, ToolBar} from '../../../utils/general';
|
||||
|
||||
export const VsCode = ()=>{
|
||||
const apps = useSelector(state => state.apps);
|
||||
const wnapp = useSelector(state => state.apps.code);
|
||||
const [url, setUrl] = useState(null);
|
||||
const dispatch = useDispatch();
|
||||
|
||||
useEffect(()=>{
|
||||
if(url==null){
|
||||
setUrl(process.env.REACT_APP_VSCODE|| "https://github1s.com/blueedgetechno/blueweb")
|
||||
}
|
||||
})
|
||||
|
||||
return (
|
||||
<div
|
||||
className="vscodeWn floatTab dpShad" data-size={wnapp.size}
|
||||
data-max={wnapp.max} style={{
|
||||
...(wnapp.size=="cstm"?wnapp.dim:null),
|
||||
zIndex: wnapp.z
|
||||
}} data-hide={wnapp.hide} id={wnapp.icon+"App"}>
|
||||
<ToolBar app={wnapp.action} icon={wnapp.icon}
|
||||
name="VS Code" bg="#1c1c1c" invert/>
|
||||
<div className="windowScreen flex flex-col" data-dock="true">
|
||||
<div className="restWindow flex-grow flex flex-col">
|
||||
<div className="flex-grow overflow-hidden">
|
||||
{wnapp.hide?null:(
|
||||
<iframe src={url} id="isite" className="w-full h-full"
|
||||
frameborder="0"></iframe>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
import React, {useState, useEffect} from 'react';
|
||||
import {useSelector, useDispatch} from 'react-redux';
|
||||
import {Icon, Image, ToolBar} from '../../../utils/general';
|
||||
|
||||
import CanvasDraw from "react-canvas-draw";
|
||||
import {Mark} from './assets';
|
||||
|
||||
export const WhiteBoard = ()=>{
|
||||
const apps = useSelector(state => state.apps);
|
||||
const wnapp = useSelector(state => state.apps.board);
|
||||
const [color, setColor] = useState("#222222");
|
||||
const [radii, setRadii] = useState(4);
|
||||
const [eraze, setErz] = useState(false);
|
||||
const [reset, setRst] = useState(false);
|
||||
const [tools, setTools] = useState([
|
||||
"#222222",
|
||||
"#e92a2a",
|
||||
"#2a52e9",
|
||||
"#12c629",
|
||||
"#e9a21e",
|
||||
"#911ee9",
|
||||
"erazer",
|
||||
"reset"
|
||||
]);
|
||||
const dispatch = useDispatch();
|
||||
|
||||
const action = (e)=>{
|
||||
var act = e.target.getAttribute("value");
|
||||
if(act=="erz"){
|
||||
setErz(true);
|
||||
}else if (act=="rst") {
|
||||
setErz(false);
|
||||
setColor("#222");
|
||||
setRst(true);
|
||||
setTimeout(()=>{
|
||||
setRst(false);
|
||||
},50)
|
||||
}else{
|
||||
setErz(false);
|
||||
setColor(act);
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
className="whiteBoard floatTab dpShad" data-size={wnapp.size}
|
||||
data-max={wnapp.max} style={{
|
||||
...(wnapp.size=="cstm"?wnapp.dim:null),
|
||||
zIndex: wnapp.z
|
||||
}} data-hide={wnapp.hide} id={wnapp.icon+"App"}>
|
||||
<ToolBar app={wnapp.action} icon={wnapp.icon}
|
||||
name="Microsoft Whiteboard" bg="#f9f9f9"/>
|
||||
<div className="windowScreen flex flex-col" data-dock="true">
|
||||
<div className="restWindow flex-grow flex flex-col">
|
||||
<div className="clickCont">
|
||||
<div className="paintTool">
|
||||
{tools.map(tool=>{
|
||||
if(tool=="erazer"){
|
||||
return (
|
||||
<div className="ptool prtclk" onClick={action}
|
||||
value="erz" data-active={eraze}>
|
||||
<Image src="icon/ui/marker"/>
|
||||
</div>
|
||||
)
|
||||
}else if(tool=="reset"){
|
||||
return (
|
||||
<div className="ptool prtclk" onClick={action} value="rst">
|
||||
<Image src="icon/ui/dustbin"/>
|
||||
</div>
|
||||
)
|
||||
}else{
|
||||
return (
|
||||
<div className="ptool prtclk" onClick={action}
|
||||
data-active={color==tool && !eraze} value={tool}>
|
||||
<Mark color={tool}/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
<div className="canvaCont">
|
||||
{!wnapp.hide && !reset?(
|
||||
<CanvasDraw
|
||||
id="drawingArea"
|
||||
brushColor={eraze?"#fff":color}
|
||||
hideInterface={!eraze}
|
||||
hideGrid={true}
|
||||
lazyRadius={0}
|
||||
catenaryColor="#aaa"
|
||||
brushRadius={eraze?48:radii}
|
||||
canvasWidth={"100%"}
|
||||
canvasHeight={"100%"}
|
||||
/>
|
||||
):null}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -1,902 +1,19 @@
|
||||
import React, {useState, useEffect} from 'react';
|
||||
import {useSelector, useDispatch} from 'react-redux';
|
||||
import {Icon, Image, ToolBar} from '../../utils/general';
|
||||
|
||||
import './tabs.scss';
|
||||
import './tabs2.scss';
|
||||
import './wnapp.css';
|
||||
|
||||
import dirs from './dir.json';
|
||||
|
||||
export const EdgeMenu = ()=>{
|
||||
const apps = useSelector(state => state.apps);
|
||||
const wnapp = useSelector(state => state.apps.edge);
|
||||
const [url, setUrl] = useState("https://bing.com");
|
||||
const [hist, setHist] = useState(["https://bing.com","https://bing.com"]);
|
||||
const dispatch = useDispatch();
|
||||
|
||||
const clickDispatch = (event)=>{
|
||||
var action = {
|
||||
type: event.target.dataset.action,
|
||||
payload: event.target.dataset.payload
|
||||
};
|
||||
if(action.type) dispatch(action);
|
||||
}
|
||||
|
||||
const isValidURL = (string)=>{
|
||||
var res = string.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g);
|
||||
return (res !== null)
|
||||
};
|
||||
|
||||
const action = (e)=>{
|
||||
var iframe = document.getElementById('isite');
|
||||
var x = e.target && e.target.dataset.payload;
|
||||
|
||||
if(iframe && x==0){
|
||||
iframe.src = iframe.src;
|
||||
}else if(iframe && x==1){
|
||||
setHist([url, "https://www.bing.com" ])
|
||||
setUrl("https://www.bing.com");
|
||||
}else if(iframe && x==2){
|
||||
setHist([url, "https://www.google.com/webhp?igu=1"])
|
||||
setUrl("https://www.google.com/webhp?igu=1");
|
||||
}else if(iframe && x==3){
|
||||
if(e.key==="Enter"){
|
||||
console.log("Wow");
|
||||
var qry = e.target.value;
|
||||
|
||||
if(isValidURL(qry)){
|
||||
if(!qry.startsWith("http")){
|
||||
qry = "https://"+qry
|
||||
}
|
||||
|
||||
}else{
|
||||
qry = "https://www.bing.com/search?q="+qry;
|
||||
}
|
||||
|
||||
e.target.value = qry;
|
||||
|
||||
setHist([url, qry])
|
||||
setUrl(qry);
|
||||
}
|
||||
}else if(x==4){
|
||||
setUrl(hist[0])
|
||||
}else if(x==5){
|
||||
setUrl(hist[1])
|
||||
}
|
||||
}
|
||||
|
||||
useEffect(()=>{
|
||||
if(wnapp.url){
|
||||
setUrl(wnapp.url);
|
||||
dispatch({type: "EDGELINK"});
|
||||
}
|
||||
})
|
||||
|
||||
return (
|
||||
<div
|
||||
className="edgeBrowser floatTab dpShad" data-size={wnapp.size}
|
||||
data-max={wnapp.max} style={{
|
||||
...(wnapp.size=="cstm"?wnapp.dim:null),
|
||||
zIndex: wnapp.z
|
||||
}} data-hide={wnapp.hide} id={wnapp.icon+"App"}>
|
||||
<ToolBar app={wnapp.action} icon={wnapp.icon}
|
||||
name="Microsoft Edge" float/>
|
||||
<div className="windowScreen flex flex-col">
|
||||
<div className="overTool flex">
|
||||
<Icon src={wnapp.icon} width={14} margin="0 6px"/>
|
||||
<div className="btab bg-gray-100">
|
||||
<div>New Tab</div>
|
||||
<Icon fafa="faTimes" click={wnapp.action} payload="close" width={10}/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="restWindow flex-grow flex flex-col">
|
||||
<div
|
||||
className="addressBar w-full bg-gray-100 h-10 flex items-center">
|
||||
<Icon src="left" onClick={action} payload={4} width={14} ui margin="0 8px"/>
|
||||
<Icon src="right" onClick={action} payload={5} width={14} ui margin="0 8px"/>
|
||||
<Icon fafa="faRedo" onClick={action} payload={0} width={14} color="#343434" margin="0 8px"/>
|
||||
<Icon fafa="faHome" onClick={action} payload={1} width={18} color="#343434" margin="0 16px"/>
|
||||
<div className="addCont relative">
|
||||
<input
|
||||
className="ltShad w-full bg-gray-0 h-6 px-4 text-gray-900"
|
||||
onKeyDown={action}
|
||||
data-payload={3}
|
||||
defaultValue={url}
|
||||
placeholder="Type url or a query to search"
|
||||
type="text"/>
|
||||
<Icon className="absolute top-0 right-0 z-1 handcr"
|
||||
src="google" ui onClick={action}
|
||||
payload={2} width={16} margin="7px 10px"/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="siteFrame flex-grow overflow-hidden">
|
||||
{wnapp.hide?null:(
|
||||
<iframe src={url} id="isite" className="w-full h-full"
|
||||
frameborder="0">
|
||||
</iframe>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export const MicroStore = ()=>{
|
||||
const apps = useSelector(state => state.apps);
|
||||
const wnapp = useSelector(state => state.apps.store);
|
||||
const dispatch = useDispatch();
|
||||
const ribbon = useSelector(state => state.globals.ribbon);
|
||||
const apprib = useSelector(state => state.globals.apprib);
|
||||
const gamerib = useSelector(state => state.globals.gamerib);
|
||||
const movrib = useSelector(state => state.globals.movrib);
|
||||
const [tab, setTab] = useState("sthome");
|
||||
|
||||
const clickDispatch = (event)=>{
|
||||
var action = {
|
||||
type: event.target.dataset.action,
|
||||
payload: event.target.dataset.payload
|
||||
};
|
||||
if(action.type) dispatch(action);
|
||||
}
|
||||
|
||||
const action = (e)=>{
|
||||
var x = e.target && e.target.dataset.action;
|
||||
if(x){
|
||||
var target = document.getElementById(x);
|
||||
if(target){
|
||||
setTab(x);
|
||||
target.parentNode.parentNode.scrollTop = target.offsetTop;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
className="wnstore floatTab dpShad" data-size={wnapp.size}
|
||||
data-max={wnapp.max} style={{
|
||||
...(wnapp.size=="cstm"?wnapp.dim:null),
|
||||
zIndex: wnapp.z
|
||||
}} data-hide={wnapp.hide} id={wnapp.icon+"App"}>
|
||||
<ToolBar app={wnapp.action} icon={wnapp.icon}
|
||||
name="Microsoft Store"/>
|
||||
<div className="windowScreen flex">
|
||||
<div className="storeNav h-full w-16 flex flex-col">
|
||||
<Icon fafa="faHome" onClick={action} click="sthome" width={20} payload={tab=="sthome"}/>
|
||||
<Icon fafa="faThLarge" onClick={action} click="apprib" width={18} payload={tab=="apprib"}/>
|
||||
<Icon fafa="faGamepad" onClick={action} click="gamerib" width={20} payload={tab=="gamerib"}/>
|
||||
<Icon fafa="faFilm" onClick={action} click="movrib" width={20} payload={tab=="movrib"}/>
|
||||
</div>
|
||||
<div className="restWindow msfull thinScroll">
|
||||
<div className="storeSection w-full absolute top-0">
|
||||
<Image id="sthome" className="frontPage w-full" src="store/lucacover"/>
|
||||
<div className="panelName absolute m-6 text-xl top-0">Home</div>
|
||||
<div className="w-full overflow-x-scroll noscroll overflow-y-hidden -mt-16">
|
||||
<div className="storeRibbon">
|
||||
{ribbon && ribbon.map(x=>{
|
||||
return x=="unescape"?(
|
||||
<a href="https://blueedge.me/unescape" target="_blank">
|
||||
<Image className="mx-1 dpShad rounded overflow-hidden"
|
||||
var={x} h={100} dir="store/float" src={x}/>
|
||||
</a>
|
||||
):(
|
||||
<Image className="mx-1 dpShad rounded overflow-hidden"
|
||||
var={x} h={100} dir="store/float" src={x}/>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
<div id="apprib" className="frontCont amzApps my-8 py-20 w-auto mx-8 flex justify-between noscroll overflow-x-scroll overflow-y-hidden">
|
||||
<div className="flex w-64 flex-col text-gray-100 h-full px-8">
|
||||
<div className="text-xl">Windows Apps</div>
|
||||
<div className="text-xs mt-2">Take your windows experience to new heights with these must-have apps</div>
|
||||
</div>
|
||||
<div className="flex w-max pr-8">
|
||||
{apprib && apprib.map(x=>{
|
||||
var stars = 3 + (x.charCodeAt(0)+x.charCodeAt(1))%3;
|
||||
return (
|
||||
<div className="ribcont rounded my-auto p-2 pb-2">
|
||||
<Image className="mx-1 py-1 mb-2 rounded overflow-hidden"
|
||||
w={120} dir="store/apps" src={x}/>
|
||||
<div className="capitalize text-xs font-semibold">{x}</div>
|
||||
<div className="flex mt-2 items-center">
|
||||
<Icon className="bluestar" fafa="faStar" width={6}/>
|
||||
<Icon className="bluestar" fafa="faStar" width={6}/>
|
||||
<Icon className="bluestar" fafa="faStar" width={6}/>
|
||||
<Icon className={stars>3?"bluestar":""} fafa="faStar" width={6}/>
|
||||
<Icon className={stars>4?"bluestar":""} fafa="faStar" width={6}/>
|
||||
<div className="text-xss text-gray-800">{1+x.charCodeAt(3)%5}k</div>
|
||||
</div>
|
||||
<div className="text-xss mt-8">{x.charCodeAt(4)%2?"Free":"Owned"}</div>
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="gamerib" className="frontCont amzGames my-8 py-20 w-auto mx-8 flex justify-between noscroll overflow-x-scroll overflow-y-hidden">
|
||||
<div className="flex w-64 flex-col text-gray-100 h-full px-8">
|
||||
<div className="text-xl">Featured Games</div>
|
||||
<div className="text-xs mt-2">Explore fun to play xbox games and find a new favorite</div>
|
||||
</div>
|
||||
<div className="flex w-max pr-8">
|
||||
{gamerib && gamerib.map(x=>{
|
||||
var stars = 3 + (x.charCodeAt(0)+x.charCodeAt(1))%3;
|
||||
return (
|
||||
<div className="ribcont rounded my-auto p-2 pb-2">
|
||||
<Image className="mx-1 py-1 mb-2 rounded overflow-hidden"
|
||||
w={120} dir="store/games" src={x}/>
|
||||
<div className="capitalize text-xs font-semibold">{x}</div>
|
||||
<div className="flex mt-2 items-center">
|
||||
<Icon className="bluestar" fafa="faStar" width={6}/>
|
||||
<Icon className="bluestar" fafa="faStar" width={6}/>
|
||||
<Icon className="bluestar" fafa="faStar" width={6}/>
|
||||
<Icon className={stars>3?"bluestar":""} fafa="faStar" width={6}/>
|
||||
<Icon className={stars>4?"bluestar":""} fafa="faStar" width={6}/>
|
||||
<div className="text-xss text-gray-800">{1+x.charCodeAt(3)%5}k</div>
|
||||
</div>
|
||||
<div className="text-xss mt-8">{x.charCodeAt(4)%2?"Free":"Owned"}</div>
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="movrib" className="frontCont amzMovies my-8 py-20 w-auto mx-8 flex justify-between noscroll overflow-x-scroll overflow-y-hidden">
|
||||
<div className="flex w-64 flex-col text-gray-100 h-full px-8">
|
||||
<div className="text-xl">Featured Films</div>
|
||||
<div className="text-xs mt-2">Rent or buy the latest hit films and watch them at home or on the go</div>
|
||||
</div>
|
||||
<div className="flex w-max pr-8">
|
||||
{movrib && movrib.map(x=>{
|
||||
var stars = 3 + (x.charCodeAt(0)+x.charCodeAt(1))%3;
|
||||
return (
|
||||
<div className="ribcont rounded my-auto p-2 pb-2">
|
||||
<Image className="mx-1 py-1 mb-2 rounded overflow-hidden"
|
||||
w={120} dir="store/movies" src={x}/>
|
||||
<div className="capitalize text-xs font-semibold">{x}</div>
|
||||
<div className="flex mt-2 items-center">
|
||||
<Icon className="bluestar" fafa="faStar" width={6}/>
|
||||
<Icon className="bluestar" fafa="faStar" width={6}/>
|
||||
<Icon className="bluestar" fafa="faStar" width={6}/>
|
||||
<Icon className={stars>3?"bluestar":""} fafa="faStar" width={6}/>
|
||||
<Icon className={stars>4?"bluestar":""} fafa="faStar" width={6}/>
|
||||
<div className="text-xss text-gray-800">{1+x.charCodeAt(3)%5}k</div>
|
||||
</div>
|
||||
<div className="text-xss mt-8">{x.charCodeAt(4)%2?"Free":"Owned"}</div>
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export const WnTerminal = ()=>{
|
||||
const apps = useSelector(state => state.apps);
|
||||
const wnapp = useSelector(state => state.apps.terminal);
|
||||
const [stack, setStack] = useState([
|
||||
"Microsoft Windows [Version 10.0.22000.51]",
|
||||
"(c) Microsoft Corporation. All rights reserved.",
|
||||
""
|
||||
]);
|
||||
const [pwd, setPwd] = useState("C:\\Users\\Blue");
|
||||
const [lastCmd, setLsc] = useState(0);
|
||||
const [wntitle, setWntitle] = useState("Windows Terminal");
|
||||
|
||||
const dispatch = useDispatch();
|
||||
|
||||
const dirFolders = (isFile="")=>{
|
||||
var tdir = {...dirs},
|
||||
curr = pwd=="C:\\"?[]:pwd.replace("C:\\","").split("\\");
|
||||
|
||||
|
||||
if(pwd!="C:\\"){
|
||||
for (var i = 0; i < curr.length; i++) {
|
||||
console.log(tdir);
|
||||
tdir = tdir[curr[i]];
|
||||
}
|
||||
}
|
||||
|
||||
if(isFile==""){
|
||||
return Object.keys(tdir);
|
||||
}else{
|
||||
return tdir[isFile] || {};
|
||||
}
|
||||
}
|
||||
|
||||
const cmdTool = (cmd)=>{
|
||||
var tmpStack = [...stack];
|
||||
tmpStack.push(pwd+">"+cmd);
|
||||
var arr = cmd.split(" "),
|
||||
type = arr[0].trim(), arg = arr.splice(1,arr.length).join(" ") || "";
|
||||
|
||||
arg = arg.trim();
|
||||
|
||||
if(type=="echo"){
|
||||
if(arg.length){
|
||||
tmpStack.push(arg);
|
||||
}else{
|
||||
tmpStack.push("ECHO is on.");
|
||||
}
|
||||
}else if(type=="cd"){
|
||||
if(arg.length){
|
||||
var errp = true;
|
||||
var curr = pwd=="C:\\"?[]:pwd.replace("C:\\","").split("\\");
|
||||
|
||||
if(arg=="."){
|
||||
errp = false;
|
||||
}else if (arg=="..") {
|
||||
errp = false;
|
||||
curr.pop();
|
||||
setPwd("C:\\"+curr.join("\\"));
|
||||
}else if(!arg.includes(".")){
|
||||
var tdir = dirFolders();
|
||||
|
||||
for (var i = 0; i < tdir.length; i++) {
|
||||
if(arg==tdir[i] && errp){
|
||||
curr.push(tdir[i]);
|
||||
errp = false;
|
||||
setPwd("C:\\"+curr.join("\\"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
errp = false;
|
||||
tmpStack.push("The directory name is invalid.");
|
||||
}
|
||||
|
||||
if(errp){
|
||||
tmpStack.push("The system cannot find the path specified.");
|
||||
}
|
||||
}else{
|
||||
tmpStack.push(pwd);
|
||||
}
|
||||
}else if (type=="dir") {
|
||||
tmpStack.push(" Directory of "+pwd);
|
||||
tmpStack.push("");
|
||||
tmpStack.push("<DIR> .")
|
||||
tmpStack.push("<DIR> ..")
|
||||
|
||||
var tdir = dirFolders();
|
||||
for (var i = 0; i < tdir.length; i++) {
|
||||
if(!tdir[i].includes(".")){
|
||||
tmpStack.push("<DIR>..."+tdir[i])
|
||||
}else{
|
||||
tmpStack.push("FILE...."+tdir[i])
|
||||
}
|
||||
}
|
||||
}else if (type=="cls") {
|
||||
tmpStack = [];
|
||||
}else if (type=="type") {
|
||||
var errp = true;
|
||||
|
||||
if(arg.includes(".")){
|
||||
var tdir = dirFolders();
|
||||
|
||||
for (var i = 0; i < tdir.length; i++) {
|
||||
if(arg==tdir[i] && errp){
|
||||
errp = false;
|
||||
var file = dirFolders(tdir[i]);
|
||||
var content = file.content || "";
|
||||
content = content.split("\n");
|
||||
for (var i = 0; i < content.length; i++) {
|
||||
tmpStack.push(content[i]);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(errp){
|
||||
tmpStack.push("The system cannot find the file specified.");
|
||||
}
|
||||
}else if (type=="start") {
|
||||
dispatch({type: "EDGELINK", payload: arg});
|
||||
}else if (type=="date") {
|
||||
tmpStack.push("The current date is: " + new Date().toLocaleDateString());
|
||||
}else if (type=="time") {
|
||||
tmpStack.push("The current time is: " +
|
||||
new Date().toLocaleTimeString("en-GB",{
|
||||
hour: '2-digit',
|
||||
minute: '2-digit',
|
||||
second: '2-digit'}).replaceAll(":",".") + "." +
|
||||
Math.floor(Math.random()*100));
|
||||
}else if (type=="exit") {
|
||||
tmpStack = [
|
||||
"Microsoft Windows [Version 10.0.22000.51]",
|
||||
"(c) Microsoft Corporation. All rights reserved.",
|
||||
""
|
||||
];
|
||||
dispatch({type: wnapp.action, payload: "close"})
|
||||
}else if (type=="title") {
|
||||
setWntitle(arg.length?arg:"Windows Terminal");
|
||||
}else if (type=="hostname") {
|
||||
tmpStack.push("Blue");
|
||||
}else if (type=="ver") {
|
||||
tmpStack.push("Microsoft Windows [Version 10.0.22000.51]");
|
||||
}else if (type=="systeminfo") {
|
||||
var dvInfo = [
|
||||
"Host Name: BLUE",
|
||||
"OS Name: Microsoft Windows 11 Home Single Language",
|
||||
"OS Version: 10.0.22000 N/A Build 22000.51",
|
||||
"OS Manufacturer: Microsoft Corporation",
|
||||
"OS Configuration: Standalone Workstation",
|
||||
"OS Build Type: Multiprocessor Free",
|
||||
"Registered Owner: Blue",
|
||||
"Registered Organization: N/A",
|
||||
"Product ID: 7H1S1-5AP1R-473DV-3R5I0N"
|
||||
];
|
||||
|
||||
for (var i = 0; i < dvInfo.length; i++) {
|
||||
tmpStack.push(dvInfo[i]);
|
||||
}
|
||||
}else if (type=="help") {
|
||||
var helpArr = [
|
||||
"CD Displays the name of or changes the current directory.",
|
||||
"CLS Clears the screen.",
|
||||
"DATE Displays or sets the date.",
|
||||
"DIR Displays a list of files and subdirectories in a directory.",
|
||||
"ECHO Displays messages, or turns command echoing on or off.",
|
||||
"EXIT Quits the CMD.EXE program (command interpreter).",
|
||||
"HELP Provides Help information for Windows commands.",
|
||||
"START Starts a separate window to run a specified program or command.",
|
||||
"SYSTEMINFO Displays machine specific properties and configuration.",
|
||||
"TIME Displays or sets the system time.",
|
||||
"TITLE Sets the window title for a CMD.EXE session.",
|
||||
"TYPE Displays the contents of a text file.",
|
||||
"VER Displays the Windows version."
|
||||
];
|
||||
|
||||
for (var i = 0; i < helpArr.length; i++) {
|
||||
tmpStack.push(helpArr[i]);
|
||||
}
|
||||
}else{
|
||||
tmpStack.push(`'${type}' is not recognized as an internal or external command,`);
|
||||
tmpStack.push("operable program or batch file.")
|
||||
tmpStack.push("")
|
||||
tmpStack.push("Type \"help\" for available commands")
|
||||
}
|
||||
|
||||
tmpStack.push("");
|
||||
setStack(tmpStack);
|
||||
}
|
||||
|
||||
const action = (event)=>{
|
||||
var cmdline = document.getElementById('curcmd');
|
||||
var action = event.target.dataset.action;
|
||||
|
||||
if(cmdline){
|
||||
if(action=="hover"){
|
||||
var crline = cmdline.parentNode;
|
||||
var cmdcont = document.getElementById('cmdcont');
|
||||
if(crline && cmdcont){
|
||||
cmdcont.scrollTop = crline.offsetTop;
|
||||
}
|
||||
cmdline.focus();
|
||||
}else if (action=="enter") {
|
||||
if(event.key=="Enter"){
|
||||
event.preventDefault();
|
||||
var tmpStack = [...stack];
|
||||
var cmd = event.target.innerText.trim();
|
||||
event.target.innerText = "";
|
||||
setLsc(tmpStack.length+1);
|
||||
cmdTool(cmd);
|
||||
}else if (event.key=="ArrowUp" || event.key=="ArrowDown") {
|
||||
event.preventDefault();
|
||||
var i = lastCmd + [1,-1][Number(event.key=="ArrowUp")];
|
||||
|
||||
while( i>=0 && i<stack.length){
|
||||
if(stack[i].startsWith("C:\\") && stack[i].includes(">")){
|
||||
var tp = stack[i].split(">");
|
||||
event.target.innerText = tp[1] || "";
|
||||
setLsc(i);
|
||||
break;
|
||||
}
|
||||
|
||||
i+=[1,-1][Number(event.key=="ArrowUp")];
|
||||
}
|
||||
|
||||
cmdline.focus();
|
||||
}else if(event.key=="Tab"){
|
||||
event.preventDefault();
|
||||
var cmd = event.target.innerText.trim(),
|
||||
arr = cmd.split(" ");
|
||||
var arg = arr.splice(1,arr.length).join(" ") || "";
|
||||
|
||||
var tdir = dirFolders();
|
||||
for (var i = 0; i < tdir.length; i++) {
|
||||
if(arg.length &&
|
||||
tdir[i].toLowerCase().startsWith(arg.toLowerCase())){
|
||||
event.target.innerText = arr[0]+" "+tdir[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
cmdline.focus();
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
className="wnterm floatTab dpShad" data-size={wnapp.size}
|
||||
data-max={wnapp.max} style={{
|
||||
...(wnapp.size=="cstm"?wnapp.dim:null),
|
||||
zIndex: wnapp.z
|
||||
}} data-hide={wnapp.hide} id={wnapp.icon+"App"}>
|
||||
<ToolBar app={wnapp.action} icon={wnapp.icon}
|
||||
name={wntitle} invert bg="#060606"/>
|
||||
<div className="windowScreen flex" data-dock="true">
|
||||
<div className="restWindow h-full flex-grow text-gray-100">
|
||||
<div className="cmdcont w-full box-border overflow-y-scroll thinScroll prtclk"
|
||||
id="cmdcont" onMouseOver={action} onClick={action} data-action="hover">
|
||||
<div className="w-full h-max pb-12">
|
||||
{stack.map(x=> <div className="cmdLine">{x}</div>)}
|
||||
<div className="cmdLine actmd">
|
||||
{pwd}>
|
||||
<div className="ipcmd" id="curcmd" contentEditable
|
||||
data-action="enter" onKeyDown={action}></div>
|
||||
{/* <input id="curcmd" className="ipcmd" type="text" defaultValue="tyler"/> */}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export const Notepad = ()=>{
|
||||
const apps = useSelector(state => state.apps);
|
||||
const wnapp = useSelector(state => state.apps.notepad);
|
||||
const dispatch = useDispatch();
|
||||
|
||||
return (
|
||||
<div
|
||||
className="notepad floatTab dpShad" data-size={wnapp.size}
|
||||
data-max={wnapp.max} style={{
|
||||
...(wnapp.size=="cstm"?wnapp.dim:null),
|
||||
zIndex: wnapp.z
|
||||
}} data-hide={wnapp.hide} id={wnapp.icon+"App"}>
|
||||
<ToolBar app={wnapp.action} icon={wnapp.icon}
|
||||
name="Untitled - Notepad"/>
|
||||
<div className="windowScreen flex flex-col" data-dock="true">
|
||||
<div className="flex text-xss pb-1 border-gray-200 border-0 border-b-2 border-solid">
|
||||
<div className="mx-2">File</div>
|
||||
<div className="mx-2">Edit</div>
|
||||
<div className="mx-2">Format</div>
|
||||
<div className="mx-2">View</div>
|
||||
<div className="mx-2">Help</div>
|
||||
</div>
|
||||
<div className="restWindow h-full flex-grow text-gray-100">
|
||||
<div className="w-full h-full overflow-hidden">
|
||||
<textarea className="noteText thinScroll" id="textpad"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export const Calculator = ()=>{
|
||||
const apps = useSelector(state => state.apps);
|
||||
const wnapp = useSelector(state => state.apps.calculator);
|
||||
const dispatch = useDispatch();
|
||||
const [equa, setEqua] = useState([]);
|
||||
const [cval, setCval] = useState("0");
|
||||
const [err, setErr] = useState(null);
|
||||
const [hist, setHist] = useState([]);
|
||||
|
||||
const getIdx = (node)=>{
|
||||
var i = 0;
|
||||
while( (node = node.previousSibling) != null ){
|
||||
i++;
|
||||
}
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
const action = (event)=>{
|
||||
var btn = event.target.dataset.ch,
|
||||
idx = getIdx(event.target);
|
||||
|
||||
var val = cval;
|
||||
if (idx==2) {
|
||||
setCval("0");
|
||||
setEqua([]);
|
||||
setErr(null);
|
||||
}else if(val=="Infinity" || val=="NaN"){
|
||||
setErr(val);
|
||||
}else if(idx==1){
|
||||
setCval("0");
|
||||
}else if (idx==3) {
|
||||
val = val.substring(0,val.length-1);
|
||||
if(val.length==0 || val=="-") val="0";
|
||||
setCval(val);
|
||||
}else if (idx<7 && idx>3) {
|
||||
if(btn=="inv"){
|
||||
var num = parseFloat(val);
|
||||
|
||||
if(num!=0){
|
||||
var inv = 1/num;
|
||||
}else{
|
||||
setErr("Cannot divide by zero");
|
||||
return;
|
||||
}
|
||||
setCval(inv.toString());
|
||||
}else if (btn=="sq") {
|
||||
var num = parseFloat(val),
|
||||
sq = num**2;
|
||||
setCval(sq.toString());
|
||||
}else if(btn=="sqrt"){
|
||||
var num = parseFloat(val);
|
||||
if(val[0]!="-"){
|
||||
var sqrt = Math.sqrt(num);
|
||||
}else{
|
||||
setErr("Invalid Input");
|
||||
return;
|
||||
}
|
||||
setCval(sqrt.toString());
|
||||
}
|
||||
}else if(idx>7 && (idx+1)%4!=0){
|
||||
if(btn.length==1){
|
||||
var tpq = [...equa];
|
||||
|
||||
if(tpq[3]!=null){
|
||||
if(btn=="."){
|
||||
val="0";
|
||||
}else{
|
||||
val="";
|
||||
}
|
||||
|
||||
setEqua([]);
|
||||
}
|
||||
|
||||
val += btn;
|
||||
if(cval=="0" && btn!="."){
|
||||
val = btn;
|
||||
}
|
||||
|
||||
if(val.length<17 &&
|
||||
val.match(/^-?[0-9]+([.][0-9]*)?$/)!=null
|
||||
){
|
||||
setCval(val);
|
||||
}
|
||||
|
||||
}else if(cval!="0"){
|
||||
if(cval[0]=="-"){
|
||||
setCval(cval.substring(1));
|
||||
}else{
|
||||
setCval("-"+cval);
|
||||
}
|
||||
}
|
||||
}else if (idx>3 && idx%4==3) {
|
||||
var tpq = [...equa];
|
||||
if(btn!="="){
|
||||
if(tpq[2]==null){
|
||||
if(tpq[0]==null){
|
||||
tpq[0] = parseFloat(cval);
|
||||
}
|
||||
tpq[1] = btn;
|
||||
}else{
|
||||
tpq = [cval,btn];
|
||||
}
|
||||
|
||||
setCval("0");
|
||||
setEqua(tpq);
|
||||
}else{
|
||||
if(tpq[1]!=null){
|
||||
if(tpq[2]==null){
|
||||
tpq[2]=parseFloat(cval);
|
||||
}
|
||||
|
||||
tpq[3]="=";
|
||||
if(tpq[1]=="/"){
|
||||
if(tpq[2]!=0){
|
||||
tpq[4] = tpq[0]/tpq[2];
|
||||
}else{
|
||||
setErr("Cannot divide by zero");
|
||||
return;
|
||||
}
|
||||
}else if (tpq[1]=="x") {
|
||||
tpq[4] = tpq[0]*tpq[2];
|
||||
}else if (tpq[1]=="-") {
|
||||
tpq[4] = tpq[0]-tpq[2];
|
||||
}else{
|
||||
tpq[4] = tpq[0]+tpq[2];
|
||||
}
|
||||
|
||||
var tmpHist = [...hist];
|
||||
setEqua(tpq);
|
||||
setCval(tpq[4]);
|
||||
tmpHist.push(tpq);
|
||||
setHist(tmpHist);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
className="calcApp floatTab dpShad" data-size={wnapp.size}
|
||||
data-max={wnapp.max} style={{
|
||||
...(wnapp.size=="cstm"?wnapp.dim:null),
|
||||
zIndex: wnapp.z
|
||||
}} data-hide={wnapp.hide} id={wnapp.icon+"App"}>
|
||||
<ToolBar app={wnapp.action} icon={wnapp.icon}
|
||||
name="Calculator"/>
|
||||
<div className="windowScreen flex flex-col" data-dock="true">
|
||||
<div className="flex pt-2">
|
||||
<div className="flex pl-2 items-center">
|
||||
<Icon fafa="faBars" color="#222" width={14}/>
|
||||
<div className="mx-4 font-semibold pb-1">Standard</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="restWindow h-full flex-grow flex">
|
||||
<div className="w-full flex-grow flex flex-col relative">
|
||||
<div className="valCont w-full">
|
||||
<div className="eqCont">
|
||||
{equa[0]}{" "}{equa[1]}{" "}{equa[2]}
|
||||
{" "}{equa[3]}{" "}{equa[4]}
|
||||
</div>
|
||||
<div className="vlcCont">{err==null?cval:err}</div>
|
||||
</div>
|
||||
<div className="msrVal">
|
||||
<div>MC</div>
|
||||
<div>MR</div>
|
||||
<div>M+</div>
|
||||
<div>M-</div>
|
||||
<div>MS</div>
|
||||
</div>
|
||||
<div className="opcont" data-err={err!=null}>
|
||||
<div onClick={action} className="oper" data-ch="%">%</div>
|
||||
<div onClick={action} className="oper" data-ch="CE">CE</div>
|
||||
<div onClick={action} className="oper" data-ch="C">C</div>
|
||||
<div onClick={action} className="oper" data-ch="back">
|
||||
<Icon fafa="faBackspace"/>
|
||||
</div>
|
||||
<div onClick={action} className="oper" data-ch="inv">1/x</div>
|
||||
<div onClick={action} className="oper opow" data-ch="sq">
|
||||
x
|
||||
<sup className="text-xss">2</sup>
|
||||
</div>
|
||||
<div onClick={action} className="oper opow" data-ch="sqrt">
|
||||
<sup className="text-xss">2</sup>
|
||||
√x
|
||||
</div>
|
||||
<div onClick={action} className="oper" data-ch="/">/</div>
|
||||
<div onClick={action} className="oper" data-ch="7">7</div>
|
||||
<div onClick={action} className="oper" data-ch="8">8</div>
|
||||
<div onClick={action} className="oper" data-ch="9">9</div>
|
||||
<div onClick={action} className="oper" data-ch="x">x</div>
|
||||
<div onClick={action} className="oper" data-ch="4">4</div>
|
||||
<div onClick={action} className="oper" data-ch="5">5</div>
|
||||
<div onClick={action} className="oper" data-ch="6">6</div>
|
||||
<div onClick={action} className="oper" data-ch="-">-</div>
|
||||
<div onClick={action} className="oper" data-ch="1">1</div>
|
||||
<div onClick={action} className="oper" data-ch="2">2</div>
|
||||
<div onClick={action} className="oper" data-ch="3">3</div>
|
||||
<div onClick={action} className="oper" data-ch="+">+</div>
|
||||
<div onClick={action} className="oper" data-ch="+-">+/-</div>
|
||||
<div onClick={action} className="oper" data-ch="0">0</div>
|
||||
<div onClick={action} className="oper" data-ch=".">.</div>
|
||||
<div onClick={action} className="oper" data-ch="=">=</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="calcHis flex flex-col">
|
||||
<div className="text-sm font-semibold">History</div>
|
||||
{hist.length!=0?null:
|
||||
<div className="text-xs mt-4">There's no history yet</div>
|
||||
}
|
||||
<div className="histCont thinScroll">
|
||||
<div className="hct h-max flex-grow">
|
||||
{hist.map(his=>{
|
||||
return (
|
||||
<div className="flex flex-col items-end mb-6 text-gray-500">
|
||||
{his[0]}{" "}{his[1]}{" "}{his[2]}{" "}{his[3]}
|
||||
<div className="text-2xl text-gray-800">{his[4]}</div>
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export const VsCode = ()=>{
|
||||
const apps = useSelector(state => state.apps);
|
||||
const wnapp = useSelector(state => state.apps.code);
|
||||
const [url, setUrl] = useState(null);
|
||||
const dispatch = useDispatch();
|
||||
|
||||
useEffect(()=>{
|
||||
if(url==null){
|
||||
setUrl(process.env.REACT_APP_VSCODE|| "https://github1s.com/blueedgetechno/blueweb")
|
||||
}
|
||||
})
|
||||
|
||||
return (
|
||||
<div
|
||||
className="vscodeWn floatTab dpShad" data-size={wnapp.size}
|
||||
data-max={wnapp.max} style={{
|
||||
...(wnapp.size=="cstm"?wnapp.dim:null),
|
||||
zIndex: wnapp.z
|
||||
}} data-hide={wnapp.hide} id={wnapp.icon+"App"}>
|
||||
<ToolBar app={wnapp.action} icon={wnapp.icon}
|
||||
name="VS Code" bg="#1c1c1c" invert/>
|
||||
<div className="windowScreen flex flex-col" data-dock="true">
|
||||
<div className="restWindow flex-grow flex flex-col">
|
||||
<div className="flex-grow overflow-hidden">
|
||||
{wnapp.hide?null:(
|
||||
<iframe src={url} id="isite" className="w-full h-full"
|
||||
frameborder="0"></iframe>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export const Explorer = ()=>{
|
||||
const apps = useSelector(state => state.apps);
|
||||
const wnapp = useSelector(state => state.apps.explorer);
|
||||
const [dpath, setPath] = useState("");
|
||||
const dispatch = useDispatch();
|
||||
|
||||
return (
|
||||
<div
|
||||
className="msfiles floatTab dpShad" data-size={wnapp.size}
|
||||
data-max={wnapp.max} style={{
|
||||
...(wnapp.size=="cstm"?wnapp.dim:null),
|
||||
zIndex: wnapp.z
|
||||
}} data-hide={wnapp.hide} id={wnapp.icon+"App"}>
|
||||
<ToolBar app={wnapp.action} icon={wnapp.icon}
|
||||
name="File Explorer" bg="#f0f0f0"/>
|
||||
<div className="windowScreen flex flex-col" data-dock="true">
|
||||
<div className="restWindow flex-grow flex flex-col">
|
||||
<div className="flex-grow grid place-items-center text-4xl font-semibold text-gray-600">
|
||||
Coming soon
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export const WhiteBoard = ()=>{
|
||||
const apps = useSelector(state => state.apps);
|
||||
const wnapp = useSelector(state => state.apps.board);
|
||||
const dispatch = useDispatch();
|
||||
|
||||
return (
|
||||
<div
|
||||
className="whiteBoard floatTab dpShad" data-size={wnapp.size}
|
||||
data-max={wnapp.max} style={{
|
||||
...(wnapp.size=="cstm"?wnapp.dim:null),
|
||||
zIndex: wnapp.z
|
||||
}} data-hide={wnapp.hide} id={wnapp.icon+"App"}>
|
||||
<ToolBar app={wnapp.action} icon={wnapp.icon}
|
||||
name="Microsoft Whiteboard" bg="#f0f0f0"/>
|
||||
<div className="windowScreen flex flex-col" data-dock="true">
|
||||
<div className="restWindow flex-grow flex flex-col">
|
||||
<div className="flex-grow grid place-items-center text-4xl font-semibold text-gray-600">
|
||||
Coming soon
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
export * from './apps/whiteboard';
|
||||
export * from './apps/edge';
|
||||
export * from './apps/store';
|
||||
export * from './apps/terminal';
|
||||
export * from './apps/notepad';
|
||||
export * from './apps/calculator';
|
||||
export * from './apps/vscode';
|
||||
export * from './apps/explorer';
|
||||
export * from './apps/about';
|
||||
|
||||
export const ScreenPreview = ()=>{
|
||||
const tasks = useSelector(state=>state.taskbar);
|
||||
|
||||
@@ -5,6 +5,15 @@
|
||||
height: 50%;
|
||||
}
|
||||
|
||||
.aboutApp{
|
||||
top: 8%;
|
||||
left: 10%;
|
||||
width: auto;
|
||||
height: auto;
|
||||
border-radius: 4px;
|
||||
background: #eee;
|
||||
}
|
||||
|
||||
.calcHis{
|
||||
display: none;
|
||||
transition: all ease-in-out 200ms;
|
||||
@@ -167,3 +176,88 @@
|
||||
font-size: 0.88em;
|
||||
}
|
||||
}
|
||||
|
||||
.canvaCont{
|
||||
position: relative;
|
||||
flex-grow: 1;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.clickCont{
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
z-index: 10;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.paintTool{
|
||||
min-width: 60px;
|
||||
height: 60px;
|
||||
background: #fefefe;
|
||||
display: flex;
|
||||
box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.25);
|
||||
padding: 0 12px;
|
||||
}
|
||||
|
||||
.ptool{
|
||||
position: relative;
|
||||
width: 48px;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 0 4px;
|
||||
transition: all 50ms ease-in-out;
|
||||
|
||||
&[data-active="true"]{
|
||||
background: #ddd;
|
||||
&::before{
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
right: 8px;
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
border-radius: 10px;
|
||||
background: #222;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover{
|
||||
background: #eee;
|
||||
}
|
||||
|
||||
svg{
|
||||
margin-top: 36%;
|
||||
max-height: 72%;
|
||||
}
|
||||
|
||||
img{
|
||||
margin-top: 36%;
|
||||
width: 56%;
|
||||
}
|
||||
}
|
||||
|
||||
.abCont{
|
||||
font-size: 9px;
|
||||
width: 19rem;
|
||||
color: #000;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.okbtn{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
|
||||
div{
|
||||
border: solid 1px #007efb;
|
||||
padding: 2px 24px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,6 @@
|
||||
background: #eee;
|
||||
}
|
||||
|
||||
.msfiles{
|
||||
.msfiles, .whiteBoard{
|
||||
background: #fefefe;
|
||||
}
|
||||
@@ -2,6 +2,10 @@
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
*{
|
||||
scrollbar-width: none;
|
||||
}
|
||||
|
||||
*::selection{
|
||||
background: initial;
|
||||
}
|
||||
@@ -156,3 +160,8 @@ img[data-flip='true'], svg[data-flip='true']{
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.hvdark:hover{
|
||||
background: rgba(0, 0, 0, 0.08);
|
||||
transition: all 200ms ease-in-out;
|
||||
}
|
||||
@@ -106,6 +106,18 @@ const appReducer = (state = defState, action) => {
|
||||
|
||||
}else if (action.type=="EXTERNAL") {
|
||||
window.open(action.payload, '_blank');
|
||||
}else if (action.type=="OPENTERM") {
|
||||
var tmpState = {...state};
|
||||
var obj = {...tmpState["terminal"]};
|
||||
obj.dir = action.payload;
|
||||
|
||||
obj.size = "full";
|
||||
obj.hide = false;
|
||||
obj.max = true;
|
||||
tmpState.hz+=1;
|
||||
obj.z = tmpState.hz;
|
||||
tmpState["terminal"] = obj;
|
||||
return tmpState;
|
||||
}else{
|
||||
var keys = Object.keys(state);
|
||||
for (var i = 0; i < keys.length; i++) {
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
import {desktopApps} from '../utils';
|
||||
import {
|
||||
desktopApps
|
||||
} from '../utils';
|
||||
|
||||
const defState = {
|
||||
apps: desktopApps,
|
||||
hide: false
|
||||
hide: false,
|
||||
size: 1
|
||||
};
|
||||
|
||||
const deskReducer = (state = defState, action) => {
|
||||
@@ -13,15 +16,19 @@ const deskReducer = (state = defState, action) => {
|
||||
return state;
|
||||
case 'DESKHIDE':
|
||||
return {
|
||||
apps: state.apps, hide: true
|
||||
...state, hide: true
|
||||
};
|
||||
case 'DESKSHOW':
|
||||
return {
|
||||
apps: state.apps, hide: false
|
||||
...state, hide: false
|
||||
};
|
||||
case 'DESKTOGG':
|
||||
return {
|
||||
apps: state.apps, hide: !state.hide
|
||||
...state, hide: !state.hide
|
||||
};
|
||||
case 'DESKSIZE':
|
||||
return {
|
||||
...state, size: action.payload
|
||||
};
|
||||
default:
|
||||
return state;
|
||||
|
||||
@@ -7,6 +7,7 @@ import menuReducer from './startmenu';
|
||||
import paneReducer from './sidepane';
|
||||
import widReducer from './widpane';
|
||||
import appReducer from './apps';
|
||||
import menusReducer from './menu';
|
||||
import globalReducer from './globals'
|
||||
|
||||
const allReducers = combineReducers({
|
||||
@@ -17,6 +18,7 @@ const allReducers = combineReducers({
|
||||
sidepane: paneReducer,
|
||||
widpane: widReducer,
|
||||
apps: appReducer,
|
||||
menus: menusReducer,
|
||||
globals: globalReducer
|
||||
});
|
||||
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
const menuStates = {
|
||||
desk: [{
|
||||
name: "View",
|
||||
opts: [{
|
||||
name: "Large icons",
|
||||
action: "DESKSIZE",
|
||||
payload: 1.5
|
||||
},{
|
||||
name: "Medium icons",
|
||||
action: "DESKSIZE",
|
||||
payload: 1.2
|
||||
},{
|
||||
name: "Small icons",
|
||||
action: "DESKSIZE",
|
||||
payload: 1
|
||||
},{
|
||||
type: "hr"
|
||||
},{
|
||||
name: "Show desktop icons",
|
||||
action: "DESKTOGG"
|
||||
}
|
||||
]
|
||||
},{
|
||||
name: "Sort by",
|
||||
dsb: true
|
||||
},{
|
||||
name: "Refresh",
|
||||
action: "refresh"
|
||||
},{
|
||||
type: "hr"
|
||||
},{
|
||||
name: "Paste",
|
||||
dsb: true
|
||||
},{
|
||||
name: "Paste Shortcut",
|
||||
dsb: true
|
||||
},{
|
||||
name: "Open in Windows Terminal",
|
||||
icon: 'terminal',
|
||||
action: "OPENTERM",
|
||||
payload: "C:\\Users\\Blue\\Desktop"
|
||||
},{
|
||||
type: "hr"
|
||||
},{
|
||||
name: "New",
|
||||
dsb: true
|
||||
},{
|
||||
type: "hr"
|
||||
},{
|
||||
name: "Personalize",
|
||||
icon: 'win/themes',
|
||||
dsb: true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
const defState = {
|
||||
hide: true,
|
||||
top: 272,
|
||||
left: 430,
|
||||
opts: menuStates.desk,
|
||||
};
|
||||
|
||||
const menusReducer = (state = defState, action) => {
|
||||
var tmpState = {...state};
|
||||
if(action.type=="MENUHIDE"){
|
||||
tmpState.hide = true;
|
||||
}else if (action.type=="MENUSHOW") {
|
||||
tmpState.hide = false;
|
||||
tmpState.top = (action.payload && action.payload.top) || 272;
|
||||
tmpState.left = (action.payload && action.payload.left) || 430;
|
||||
}
|
||||
|
||||
return tmpState;
|
||||
}
|
||||
|
||||
export default menusReducer;
|
||||
@@ -73,7 +73,8 @@ const defState = {
|
||||
state: false
|
||||
}
|
||||
],
|
||||
hide: true
|
||||
hide: true,
|
||||
calhide: true
|
||||
};
|
||||
|
||||
const paneReducer = (state = defState, action) => {
|
||||
@@ -85,6 +86,10 @@ const paneReducer = (state = defState, action) => {
|
||||
return {...state, hide: !state.hide};
|
||||
}else if (action.type=="PANEHIDE") {
|
||||
return {...state, hide: true};
|
||||
}else if (action.type=="CALNTOGG") {
|
||||
return {...state, calhide: !state.calhide};
|
||||
}else if (action.type=="CALNHIDE") {
|
||||
return {...state, calhide: true};
|
||||
}else{
|
||||
return state;
|
||||
}
|
||||
|
||||
@@ -17900,6 +17900,10 @@
|
||||
width: 16rem
|
||||
}
|
||||
|
||||
.w-88 {
|
||||
width: 22rem
|
||||
}
|
||||
|
||||
.w-auto {
|
||||
width: auto
|
||||
}
|
||||
|
||||
@@ -83,6 +83,7 @@ export const Image = (props)=>{
|
||||
{!props.back?<img
|
||||
width={props.w}
|
||||
height={props.h}
|
||||
data-free={props.free!=null}
|
||||
data-var={props.var}
|
||||
src={src} alt=""/>:null}
|
||||
</div>
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
img{
|
||||
img[data-free="false"]{
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
@@ -136,7 +136,9 @@ export default [
|
||||
idx: 21,
|
||||
name: 'Mail',
|
||||
icon: 'mail',
|
||||
type: 'app'
|
||||
type: 'app',
|
||||
action: 'EXTERNAL',
|
||||
payload: 'mailto:blueedgetechno@gmail.com'
|
||||
},
|
||||
{
|
||||
idx: 22,
|
||||
@@ -346,4 +348,13 @@ export default [
|
||||
type: 'app',
|
||||
action: 'EXTERNAL',
|
||||
payload: "https://github.com/blueedgetechno/windows11"
|
||||
}];
|
||||
},
|
||||
{
|
||||
idx: 55,
|
||||
name: 'Unescape',
|
||||
icon: 'unescape',
|
||||
type: 'action',
|
||||
action: 'EXTERNAL',
|
||||
payload: 'https://blueedge.me/unescape'
|
||||
}
|
||||
];
|
||||
@@ -2,7 +2,7 @@ import icons from './icons';
|
||||
|
||||
var iconIdx = {
|
||||
taskbar: [3,4,5,6],
|
||||
desktop: [8,7,4,6,5],
|
||||
desktop: [8,7,4,6,5,54,55],
|
||||
pinned: [5,51,37,31,21,48,6,35,15,28,52,10,11,44,39,13,46,54],
|
||||
recent: [21,44,46,54,13,39,5]
|
||||
};
|
||||
|
||||