diff --git a/package-lock.json b/package-lock.json
index 5b537f5ad..dff579bf4 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -10,9 +10,9 @@
"dependencies": {
"-": "^0.0.1",
"@crowdin/cli": "^3.7.8",
- "@fortawesome/fontawesome-svg-core": "^1.2.36",
- "@fortawesome/free-regular-svg-icons": "^5.15.4",
- "@fortawesome/free-solid-svg-icons": "^5.15.4",
+ "@fortawesome/fontawesome-svg-core": "^6.1.1",
+ "@fortawesome/free-regular-svg-icons": "^6.1.1",
+ "@fortawesome/free-solid-svg-icons": "^6.1.1",
"@fortawesome/react-fontawesome": "^0.1.18",
"@sentry/react": "^6.19.6",
"@sentry/tracing": "^6.19.6",
@@ -2063,45 +2063,45 @@
}
},
"node_modules/@fortawesome/fontawesome-common-types": {
- "version": "0.2.36",
- "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.36.tgz",
- "integrity": "sha512-a/7BiSgobHAgBWeN7N0w+lAhInrGxksn13uK7231n2m8EDPE3BMCl9NZLTGrj9ZXfCmC6LM0QLqXidIizVQ6yg==",
+ "version": "6.1.1",
+ "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.1.1.tgz",
+ "integrity": "sha512-wVn5WJPirFTnzN6tR95abCx+ocH+3IFLXAgyavnf9hUmN0CfWoDjPT/BAWsUVwSlYYVBeCLJxaqi7ZGe4uSjBA==",
"hasInstallScript": true,
"engines": {
"node": ">=6"
}
},
"node_modules/@fortawesome/fontawesome-svg-core": {
- "version": "1.2.36",
- "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-1.2.36.tgz",
- "integrity": "sha512-YUcsLQKYb6DmaJjIHdDWpBIGCcyE/W+p/LMGvjQem55Mm2XWVAP5kWTMKWLv9lwpCVjpLxPyOMOyUocP1GxrtA==",
+ "version": "6.1.1",
+ "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-6.1.1.tgz",
+ "integrity": "sha512-NCg0w2YIp81f4V6cMGD9iomfsIj7GWrqmsa0ZsPh59G7PKiGN1KymZNxmF00ssuAlo/VZmpK6xazsGOwzKYUMg==",
"hasInstallScript": true,
"dependencies": {
- "@fortawesome/fontawesome-common-types": "^0.2.36"
+ "@fortawesome/fontawesome-common-types": "6.1.1"
},
"engines": {
"node": ">=6"
}
},
"node_modules/@fortawesome/free-regular-svg-icons": {
- "version": "5.15.4",
- "resolved": "https://registry.npmjs.org/@fortawesome/free-regular-svg-icons/-/free-regular-svg-icons-5.15.4.tgz",
- "integrity": "sha512-9VNNnU3CXHy9XednJ3wzQp6SwNwT3XaM26oS4Rp391GsxVYA+0oDR2J194YCIWf7jNRCYKjUCOduxdceLrx+xw==",
+ "version": "6.1.1",
+ "resolved": "https://registry.npmjs.org/@fortawesome/free-regular-svg-icons/-/free-regular-svg-icons-6.1.1.tgz",
+ "integrity": "sha512-xXiW7hcpgwmWtndKPOzG+43fPH7ZjxOaoeyooptSztGmJxCAflHZxXNK0GcT0uEsR4jTGQAfGklDZE5NHoBhKg==",
"hasInstallScript": true,
"dependencies": {
- "@fortawesome/fontawesome-common-types": "^0.2.36"
+ "@fortawesome/fontawesome-common-types": "6.1.1"
},
"engines": {
"node": ">=6"
}
},
"node_modules/@fortawesome/free-solid-svg-icons": {
- "version": "5.15.4",
- "resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-5.15.4.tgz",
- "integrity": "sha512-JLmQfz6tdtwxoihXLg6lT78BorrFyCf59SAwBM6qV/0zXyVeDygJVb3fk+j5Qat+Yvcxp1buLTY5iDh1ZSAQ8w==",
+ "version": "6.1.1",
+ "resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-6.1.1.tgz",
+ "integrity": "sha512-0/5exxavOhI/D4Ovm2r3vxNojGZioPwmFrKg0ZUH69Q68uFhFPs6+dhAToh6VEQBntxPRYPuT5Cg1tpNa9JUPg==",
"hasInstallScript": true,
"dependencies": {
- "@fortawesome/fontawesome-common-types": "^0.2.36"
+ "@fortawesome/fontawesome-common-types": "6.1.1"
},
"engines": {
"node": ">=6"
@@ -16436,32 +16436,32 @@
}
},
"@fortawesome/fontawesome-common-types": {
- "version": "0.2.36",
- "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.36.tgz",
- "integrity": "sha512-a/7BiSgobHAgBWeN7N0w+lAhInrGxksn13uK7231n2m8EDPE3BMCl9NZLTGrj9ZXfCmC6LM0QLqXidIizVQ6yg=="
+ "version": "6.1.1",
+ "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.1.1.tgz",
+ "integrity": "sha512-wVn5WJPirFTnzN6tR95abCx+ocH+3IFLXAgyavnf9hUmN0CfWoDjPT/BAWsUVwSlYYVBeCLJxaqi7ZGe4uSjBA=="
},
"@fortawesome/fontawesome-svg-core": {
- "version": "1.2.36",
- "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-1.2.36.tgz",
- "integrity": "sha512-YUcsLQKYb6DmaJjIHdDWpBIGCcyE/W+p/LMGvjQem55Mm2XWVAP5kWTMKWLv9lwpCVjpLxPyOMOyUocP1GxrtA==",
+ "version": "6.1.1",
+ "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-6.1.1.tgz",
+ "integrity": "sha512-NCg0w2YIp81f4V6cMGD9iomfsIj7GWrqmsa0ZsPh59G7PKiGN1KymZNxmF00ssuAlo/VZmpK6xazsGOwzKYUMg==",
"requires": {
- "@fortawesome/fontawesome-common-types": "^0.2.36"
+ "@fortawesome/fontawesome-common-types": "6.1.1"
}
},
"@fortawesome/free-regular-svg-icons": {
- "version": "5.15.4",
- "resolved": "https://registry.npmjs.org/@fortawesome/free-regular-svg-icons/-/free-regular-svg-icons-5.15.4.tgz",
- "integrity": "sha512-9VNNnU3CXHy9XednJ3wzQp6SwNwT3XaM26oS4Rp391GsxVYA+0oDR2J194YCIWf7jNRCYKjUCOduxdceLrx+xw==",
+ "version": "6.1.1",
+ "resolved": "https://registry.npmjs.org/@fortawesome/free-regular-svg-icons/-/free-regular-svg-icons-6.1.1.tgz",
+ "integrity": "sha512-xXiW7hcpgwmWtndKPOzG+43fPH7ZjxOaoeyooptSztGmJxCAflHZxXNK0GcT0uEsR4jTGQAfGklDZE5NHoBhKg==",
"requires": {
- "@fortawesome/fontawesome-common-types": "^0.2.36"
+ "@fortawesome/fontawesome-common-types": "6.1.1"
}
},
"@fortawesome/free-solid-svg-icons": {
- "version": "5.15.4",
- "resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-5.15.4.tgz",
- "integrity": "sha512-JLmQfz6tdtwxoihXLg6lT78BorrFyCf59SAwBM6qV/0zXyVeDygJVb3fk+j5Qat+Yvcxp1buLTY5iDh1ZSAQ8w==",
+ "version": "6.1.1",
+ "resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-6.1.1.tgz",
+ "integrity": "sha512-0/5exxavOhI/D4Ovm2r3vxNojGZioPwmFrKg0ZUH69Q68uFhFPs6+dhAToh6VEQBntxPRYPuT5Cg1tpNa9JUPg==",
"requires": {
- "@fortawesome/fontawesome-common-types": "^0.2.36"
+ "@fortawesome/fontawesome-common-types": "6.1.1"
}
},
"@fortawesome/react-fontawesome": {
diff --git a/package.json b/package.json
index be6d30889..162832886 100644
--- a/package.json
+++ b/package.json
@@ -7,9 +7,9 @@
"dependencies": {
"-": "^0.0.1",
"@crowdin/cli": "^3.7.8",
- "@fortawesome/fontawesome-svg-core": "^1.2.36",
- "@fortawesome/free-regular-svg-icons": "^5.15.4",
- "@fortawesome/free-solid-svg-icons": "^5.15.4",
+ "@fortawesome/fontawesome-svg-core": "^6.1.1",
+ "@fortawesome/free-regular-svg-icons": "^6.1.1",
+ "@fortawesome/free-solid-svg-icons": "^6.1.1",
"@fortawesome/react-fontawesome": "^0.1.18",
"@sentry/react": "^6.19.6",
"@sentry/tracing": "^6.19.6",
diff --git a/src/App.js b/src/App.js
index ac359d555..4960c29ac 100644
--- a/src/App.js
+++ b/src/App.js
@@ -103,7 +103,7 @@ function App() {
left: e.clientX
}
- if (e.target.dataset.menu != null) {
+ if (e.target.dataset.menu !== null) {
data.menu = e.target.dataset.menu
data.attr = e.target.attributes
data.dataset = e.target.dataset
diff --git a/src/App.js.bak b/src/App.js.bak
index 05ed8ff5b..688bf2187 100644
--- a/src/App.js.bak
+++ b/src/App.js.bak
@@ -103,7 +103,7 @@ function App() {
left: e.clientX
}
- if (e.target.dataset.menu != null) {
+ if (e.target.dataset.menu !== null) {
data.menu = e.target.dataset.menu
data.attr = e.target.attributes
data.dataset = e.target.dataset
diff --git a/src/components/menu/index.js b/src/components/menu/index.js
index b7fb6c442..6483a6b63 100644
--- a/src/components/menu/index.js
+++ b/src/components/menu/index.js
@@ -48,7 +48,7 @@ export const ActMenu = () => {
};
if (action.type) {
- if (action.type != action.type.toUpperCase()) {
+ if (action.type !== action.type.toUpperCase()) {
Actions[action.type](action.payload, menu);
} else {
dispatch(action);
@@ -60,7 +60,7 @@ export const ActMenu = () => {
const menuobj = (data) => {
var mnode = [];
data.map((opt,i) => {
- if (opt.type == "hr") {
+ if (opt.type === "hr") {
mnode.push(
);
} else {
mnode.push(
diff --git a/src/components/start/index.js b/src/components/start/index.js
index 2ec572cd0..95b2e8013 100644
--- a/src/components/start/index.js
+++ b/src/components/start/index.js
@@ -17,9 +17,9 @@ export const DesktopApp = () => {
var arr = { ...state.desktop };
var tmpApps = [...arr.apps];
- if (arr.sort == "name") {
+ if (arr.sort === "name") {
tmpApps.sort((a, b) => (a.name > b.name ? 1 : b.name > a.name ? -1 : 0));
- } else if (arr.sort == "size") {
+ } else if (arr.sort === "size") {
tmpApps.sort((a, b) => {
var anm = a.name,
bnm = b.name;
@@ -29,7 +29,7 @@ export const DesktopApp = () => {
? 1
: -1;
});
- } else if (arr.sort == "date") {
+ } else if (arr.sort === "date") {
tmpApps.sort((a, b) => {
var anm = a.name,
bnm = b.name;
@@ -116,7 +116,7 @@ export const SidePane = () => {
};
if (action.type) {
- if (action.type != action.type.toUpperCase()) {
+ if (action.type !== action.type.toUpperCase()) {
Actions[action.type](action.payload);
} else dispatch(action);
}
@@ -129,7 +129,7 @@ export const SidePane = () => {
var aud = 3;
if (e.target.value < 70) aud = 2;
if (e.target.value < 30) aud = 1;
- if (e.target.value == 0) aud = 0;
+ if (e.target.value === 0) aud = 0;
dispatch({ type: "TASKAUDO", payload: aud });
@@ -158,7 +158,7 @@ export const SidePane = () => {
useEffect(() => {
sidepane.quicks.map((item, i) => {
- if (item.src == "nightlight") {
+ if (item.src === "nightlight") {
if (pnstates[i]) document.body.dataset.sepia = true;
else document.body.dataset.sepia = false;
}
@@ -170,7 +170,7 @@ export const SidePane = () => {
var tmp = [];
for (var i = 0; i < sidepane.quicks.length; i++) {
var val = getTreeValue(setting, sidepane.quicks[i].state);
- if (sidepane.quicks[i].name == "Theme") val = val == "dark";
+ if (sidepane.quicks[i].name === "Theme") val = val === "dark";
tmp.push(val);
}
diff --git a/src/components/start/start.js b/src/components/start/start.js
index a3784197e..5467655f3 100644
--- a/src/components/start/start.js
+++ b/src/components/start/start.js
@@ -28,7 +28,7 @@ export const StartMenu = () => {
var allApps = [],
tmpApps = Object.keys(state.apps)
- .filter((x) => x != "hz")
+ .filter((x) => x !== "hz")
.map((key) => {
return state.apps[key];
});
@@ -73,13 +73,13 @@ export const StartMenu = () => {
dispatch(action);
}
- if (action.type && (action.payload == "full" || action.type == "EDGELINK")) {
+ if (action.type && (action.payload === "full" || action.type === "EDGELINK")) {
dispatch({
type: "STARTHID",
});
}
- if (action.type == "STARTALPHA") {
+ if (action.type === "STARTALPHA") {
var target = document.getElementById("char" + action.payload);
if (target) {
target.parentNode.scrollTop = target.offsetTop;
@@ -120,7 +120,7 @@ export const StartMenu = () => {
return app.empty ? (
) : (
-
+
@@ -139,7 +139,7 @@ export const StartMenu = () => {
{start.rcApps.slice(0, 6).map((app, i) => {
return app.name ? (
-
+
{app.name}
@@ -163,12 +163,12 @@ export const StartMenu = () => {
{start.contApps.map((ldx, i) => {
- if (ldx.length == 0) return null;
+ if (ldx.length === 0) return null;
var tpApps = [];
tpApps.push(
-
-
{i == 0 ? "#" : String.fromCharCode(i + 64)}
+
+
{i === 0 ? "#" : String.fromCharCode(i + 64)}
);
@@ -191,8 +191,8 @@ export const StartMenu = () => {
{start.contApps.map((ldx, i) => {
return (
-
-
{i == 0 ? "#" : String.fromCharCode(i + 64)}
+
+
{i === 0 ? "#" : String.fromCharCode(i + 64)}
);
})}
@@ -240,25 +240,25 @@ export const StartMenu = () => {
-
+
All
-
+
Apps
-
+
Documents
-
-
+
{query.length ? "Best match" : "Top apps"}
{query.length ? (
diff --git a/src/components/start/widget.js b/src/components/start/widget.js
index e8b0f187c..a305a11db 100644
--- a/src/components/start/widget.js
+++ b/src/components/start/widget.js
@@ -8,8 +8,8 @@ export const WidPane = () => {
const widget = useSelector((state) => state.widpane);
const theme = useSelector((state) => state.setting.person.theme);
const getRandom = (x = 0) => {
- if (theme == "light") return `hsl(${Math.floor(Math.random() * 360)}deg 36% 84%)`;
- if (theme == "dark") return `hsl(${Math.floor(Math.random() * 360)}deg 36% 16%)`;
+ if (theme === "light") return `hsl(${Math.floor(Math.random() * 360)}deg 36% 84%)`;
+ if (theme === "dark") return `hsl(${Math.floor(Math.random() * 360)}deg 36% 16%)`;
};
return (
@@ -59,7 +59,7 @@ export const WidPane = () => {
{widget.data.weather.days.map((item, i) => {
return (
-
{i == 0 ? "Today" : item.day}
+
{i === 0 ? "Today" : item.day}
{item.min}ยบ
@@ -79,7 +79,7 @@ export const WidPane = () => {
{widget.data.stock[0][0]}
-
+
{widget.data.stock[0][2] ? "+" : "-"}
{widget.data.stock[0][1]}%
@@ -92,7 +92,7 @@ export const WidPane = () => {
{widget.data.stock[1][0]}
-
+
{widget.data.stock[1][2] ? "+" : "-"}
{widget.data.stock[1][1]}%
@@ -154,7 +154,7 @@ export const WidPane = () => {
{article.source.name}
{article.title}
- {i % 5 == 4 ?
{article.content}
: null}
+ {i % 5 === 4 ?
{article.content}
: null}
);
diff --git a/src/components/taskbar/index.js b/src/components/taskbar/index.js
index c9091e63d..04562cd89 100644
--- a/src/components/taskbar/index.js
+++ b/src/components/taskbar/index.js
@@ -21,7 +21,7 @@ const Taskbar = () => {
const showPrev = (event) => {
var ele = event.target;
- while (ele && ele.getAttribute("value") == null) {
+ while (ele && ele.getAttribute("value") === null) {
ele = ele.parentElement;
}
@@ -95,7 +95,7 @@ const Taskbar = () => {
{tasks.widgets ?
: null}
{tasks.apps.map((task, i) => {
var isHidden = apps[task.icon].hide;
- var isActive = apps[task.icon].z == apps.hz;
+ var isActive = apps[task.icon].z === apps.hz;
return (
@@ -103,10 +103,10 @@ const Taskbar = () => {
);
})}
{Object.keys(apps).map((key, i) => {
- if (key != "hz") {
- var isActive = apps[key].z == apps.hz;
+ if (key !== "hz") {
+ var isActive = apps[key].z === apps.hz;
}
- return key != "hz"&& key != "undefined"&& !apps[key].task && !apps[key].hide ? (
+ return key !== "hz"&& key !== "undefined"&& !apps[key].task && !apps[key].hide ? (
diff --git a/src/containers/applications/apps/about.js b/src/containers/applications/apps/about.js
index 81bf3b764..784fdabf4 100644
--- a/src/containers/applications/apps/about.js
+++ b/src/containers/applications/apps/about.js
@@ -7,8 +7,8 @@ import { useTranslation } from 'react-i18next';
export const AboutWin = () => {
const { abOpen } = useSelector((state) => state.desktop);
const { locked, booted } = useSelector((state) => state.wallpaper);
- const [open, setOpen] = useState(true && process.env.REACT_APP_ENV != "development");
- const [timer, setTimer] = useState(localStorage.getItem("closeAbout") == "true" ? 0 : 5);
+ const [open, setOpen] = useState(true && process.env.REACT_APP_ENV !== "development");
+ const [timer, setTimer] = useState(localStorage.getItem("closeAbout") === "true" ? 0 : 5);
const dispatch = useDispatch();
const { t, i18n } = useTranslation();
@@ -56,7 +56,7 @@ export const AboutWin = () => {
{t('about.microsoftcopywrite')}.
-
+
{t('about.understand')} {timer > 0 ? {`( ${timer} )`} : null}
diff --git a/src/containers/applications/apps/assets/jiosaavn.js b/src/containers/applications/apps/assets/jiosaavn.js
index 5d4c45d52..0407aba8f 100644
--- a/src/containers/applications/apps/assets/jiosaavn.js
+++ b/src/containers/applications/apps/assets/jiosaavn.js
@@ -52,7 +52,7 @@ class JioSaavn {
}
fetchSong(pids) {
- if (typeof(pids) != "object") pids = [pids];
+ if (typeof(pids) !== "object") pids = [pids];
return new Promise((resolve, reject) => {
this.fetch(song_url + pids.join(",")).then(res => {
resolve(res[0]);
@@ -61,7 +61,7 @@ class JioSaavn {
}
fetchSongs(pids) {
- if (typeof(pids) != "object") pids = [pids];
+ if (typeof(pids) !== "object") pids = [pids];
return new Promise((resolve, reject) => {
this.fetch(song_url + pids.join(",")).then(res => {
resolve(res);
diff --git a/src/containers/applications/apps/calculator.js b/src/containers/applications/apps/calculator.js
index 793937522..9f7c3a1f2 100644
--- a/src/containers/applications/apps/calculator.js
+++ b/src/containers/applications/apps/calculator.js
@@ -13,7 +13,7 @@ export const Calculator = ()=>{
const getIdx = (node)=>{
var i = 0;
- while( (node = node.previousSibling) != null ){
+ while( (node = node.previousSibling) !== null ){
i++;
}
diff --git a/src/containers/applications/apps/explorer.js b/src/containers/applications/apps/explorer.js
index 5a0bcd49b..a343636d0 100644
--- a/src/containers/applications/apps/explorer.js
+++ b/src/containers/applications/apps/explorer.js
@@ -191,7 +191,7 @@ const ContentArea = ({searchtxt})=>{
}
const handleKey = (e)=>{
- if(e.key == "Backspace"){
+ if(e.key === "Backspace"){
dispatch({type: "FILEPREV"})
}
}
diff --git a/src/containers/applications/apps/notepad.js b/src/containers/applications/apps/notepad.js
index e68e8aee1..a98cbd46f 100644
--- a/src/containers/applications/apps/notepad.js
+++ b/src/containers/applications/apps/notepad.js
@@ -13,7 +13,7 @@ export const Notepad = () => {
data-size={wnapp.size}
data-max={wnapp.max}
style={{
- ...(wnapp.size == "cstm" ? wnapp.dim : null),
+ ...(wnapp.size === "cstm" ? wnapp.dim : null),
zIndex: wnapp.z,
}}
data-hide={wnapp.hide}
diff --git a/src/containers/applications/apps/settings.js b/src/containers/applications/apps/settings.js
index 8643ca9cf..2a7730b33 100644
--- a/src/containers/applications/apps/settings.js
+++ b/src/containers/applications/apps/settings.js
@@ -40,7 +40,7 @@ export const Settings = () => {
var theme_nxt = themechecker[payload.split("/")[0]],
src = payload;
- if (theme_nxt != theme) {
+ if (theme_nxt !== theme) {
changeTheme();
}
@@ -56,7 +56,7 @@ export const Settings = () => {
data-size={wnapp.size}
data-max={wnapp.max}
style={{
- ...(wnapp.size == "cstm" ? wnapp.dim : null),
+ ...(wnapp.size === "cstm" ? wnapp.dim : null),
zIndex: wnapp.z,
}}
data-hide={wnapp.hide}
diff --git a/src/containers/applications/apps/store.js b/src/containers/applications/apps/store.js
index 9f362d70a..107e61cb7 100644
--- a/src/containers/applications/apps/store.js
+++ b/src/containers/applications/apps/store.js
@@ -61,7 +61,7 @@ export const MicroStore = ()=>{
if(act=="page1") setPage(act[4])
else if (act=="page2"){
for (var i = 0; i < storeapps.length; i++) {
- if(storeapps[i].data.url == payload){
+ if(storeapps[i].data.url === payload){
setOpapp(storeapps[i])
setPage(2)
break
diff --git a/src/containers/background/index.js b/src/containers/background/index.js
index f44bc3766..1bf5874d1 100644
--- a/src/containers/background/index.js
+++ b/src/containers/background/index.js
@@ -35,7 +35,7 @@ export const BootScreen = (props) => {
useEffect(() => {
if (props.dir < 0) {
if (blackout) {
- if (wall.act == "restart") {
+ if (wall.act === "restart") {
setTimeout(() => {
setBlackOut(false);
setTimeout(() => {
@@ -74,8 +74,8 @@ export const LockScreen = (props) => {
var act = e.target.dataset.action,
payload = e.target.dataset.payload;
- if (act == "splash") setLock(true);
- else if (act == "inpass") {
+ if (act === "splash") setLock(true);
+ else if (act === "inpass") {
var val = e.target.value;
if (!passType) {
val = val.substring(0, 4);
@@ -83,11 +83,11 @@ export const LockScreen = (props) => {
}
setPass(val);
- } else if (act == "forgot") setForget(true);
- else if (act == "pinlock") setType(0);
- else if (act == "passkey") setType(1);
+ } else if (act === "forgot") setForget(true);
+ else if (act === "pinlock") setType(0);
+ else if (act === "passkey") setType(1);
- if (act == "pinlock" || act == "passkey") setPass("");
+ if (act === "pinlock" || act === "passkey") setPass("");
};
const proceed = () => {
@@ -98,12 +98,12 @@ export const LockScreen = (props) => {
};
const action2 = (e) => {
- if (e.key == "Enter") proceed();
+ if (e.key === "Enter") proceed();
};
return (
{
var keys = Object.keys(state);
for (var i = 0; i < keys.length; i++) {
var obj = state[keys[i]];
- if(obj.action == action.type){
+ if(obj.action === action.type){
tmpState = {...state};
var topIcon = findMax(tmpState);
switch(action.payload){
diff --git a/src/reducers/menu.js b/src/reducers/menu.js
index b34f38f13..fb89eda16 100644
--- a/src/reducers/menu.js
+++ b/src/reducers/menu.js
@@ -250,16 +250,16 @@ const menusReducer = (state = defState, action) => {
var tmpState = {
...state,
};
- if (action.type == "MENUHIDE") {
+ if (action.type === "MENUHIDE") {
tmpState.hide = true;
- } else if (action.type == "MENUSHOW") {
+ } else if (action.type === "MENUSHOW") {
tmpState.hide = false;
tmpState.top = (action.payload && action.payload.top) || 272;
tmpState.left = (action.payload && action.payload.left) || 430;
tmpState.opts = (action.payload && action.payload.menu) || "desk";
tmpState.attr = action.payload && action.payload.attr;
tmpState.dataset = action.payload && action.payload.dataset;
- } else if (action.type == "MENUCHNG") {
+ } else if (action.type === "MENUCHNG") {
tmpState = {
...action.payload,
};
diff --git a/src/reducers/sidepane.js b/src/reducers/sidepane.js
index d9fbccf0d..93ee95d13 100644
--- a/src/reducers/sidepane.js
+++ b/src/reducers/sidepane.js
@@ -42,17 +42,17 @@ const defState = {
};
const paneReducer = (state = defState, action) => {
- if (action.type == "PANETHEM") {
+ if (action.type === "PANETHEM") {
var tmpState = { ...state };
tmpState.quicks[4].src = action.payload;
return tmpState;
- } else if (action.type == "PANETOGG") {
+ } else if (action.type === "PANETOGG") {
return { ...state, hide: !state.hide };
- } else if (action.type == "PANEHIDE") {
+ } else if (action.type === "PANEHIDE") {
return { ...state, hide: true };
- } else if (action.type == "CALNTOGG") {
+ } else if (action.type === "CALNTOGG") {
return { ...state, calhide: !state.calhide };
- } else if (action.type == "CALNHIDE") {
+ } else if (action.type === "CALNHIDE") {
return { ...state, calhide: true };
} else {
return state;
diff --git a/src/reducers/taskbar.js b/src/reducers/taskbar.js
index 286e7c941..c6c146814 100644
--- a/src/reducers/taskbar.js
+++ b/src/reducers/taskbar.js
@@ -29,7 +29,7 @@ const taskReducer = (state = defState, action) => {
};
case 'TASKTOG':
return {
- ...state, align: state.align == 'left' ? 'center' : 'left'
+ ...state, align: state.align === 'left' ? 'center' : 'left'
};
case 'TASKPSHOW':
return {
@@ -43,11 +43,11 @@ const taskReducer = (state = defState, action) => {
};
case 'TASKSRCH':
return {
- ...state, search: action.payload == "true"
+ ...state, search: action.payload === "true"
};
case 'TASKWIDG':
return {
- ...state, widgets: action.payload == "true"
+ ...state, widgets: action.payload === "true"
};
case 'TASKAUDO':
return {
diff --git a/src/reducers/wallpaper.js b/src/reducers/wallpaper.js
index 45675517f..2dff93fd1 100644
--- a/src/reducers/wallpaper.js
+++ b/src/reducers/wallpaper.js
@@ -35,8 +35,8 @@ const defState = {
themes: themes,
wps: wps,
src: walls[wps],
- locked: !(locked == 'false'),
- booted: false || process.env.REACT_APP_ENV == "development",
+ locked: !(locked === 'false'),
+ booted: false || process.env.REACT_APP_ENV === "development",
act: '',
dir: 0
}
diff --git a/src/utils/bin.js b/src/utils/bin.js
index 7bbf2148a..0985e80ac 100644
--- a/src/utils/bin.js
+++ b/src/utils/bin.js
@@ -81,7 +81,7 @@ export class Bin {
if(curr){
var i = 1, l = cpath.length
- while (curr.type == "folder" && i recent.includes(x.name)).sort((a, b)
});
export const allApps = icons.filter(app => {
- return app.type == 'app'
+ return app.type === 'app'
});
export const dfApps = {