Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Commit

Permalink
fontawesome v6 (#404)
Browse files Browse the repository at this point in the history
* Bump @fortawesome/fontawesome-svg-core from 1.2.36 to 6.1.1 (#1)

* Bump @fortawesome/free-solid-svg-icons from 5.15.4 to 6.1.1 (#2)

* Bump @fortawesome/free-regular-svg-icons from 5.15.4 to 6.1.1 (#3)

* fix few === warnings

unfortunately not all

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
yashash-pugalia and dependabot[bot] authored Apr 22, 2022
1 parent 54d9b4d commit aa4997e
Show file tree
Hide file tree
Showing 24 changed files with 111 additions and 111 deletions.
66 changes: 33 additions & 33 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/App.js.bak
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/components/menu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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(<div key={i} className="menuhr"></div>);
} else {
mnode.push(
Expand Down
14 changes: 7 additions & 7 deletions src/components/start/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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);
}
Expand All @@ -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 });

Expand Down Expand Up @@ -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;
}
Expand All @@ -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);
}

Expand Down
32 changes: 16 additions & 16 deletions src/components/start/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
});
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -120,7 +120,7 @@ export const StartMenu = () => {
return app.empty ? (
<div key={i} className="pnApp pnEmpty"></div>
) : (
<div key={i} className="prtclk pnApp" value={app.action != null} onClick={clickDispatch} data-action={app.action} data-payload={app.payload || "full"}>
<div key={i} className="prtclk pnApp" value={app.action !== null} onClick={clickDispatch} data-action={app.action} data-payload={app.payload || "full"}>
<Icon className="pnIcon" src={app.icon} width={32} />
<div className="appName">{app.name}</div>
</div>
Expand All @@ -139,7 +139,7 @@ export const StartMenu = () => {
<div className="reApps">
{start.rcApps.slice(0, 6).map((app, i) => {
return app.name ? (
<div key={i} className="rnApp" value={app.action != null} onClick={clickDispatch} data-action={app.action} data-payload={app.payload || "full"}>
<div key={i} className="rnApp" value={app.action !== null} onClick={clickDispatch} data-action={app.action} data-payload={app.payload || "full"}>
<Icon className="pnIcon" src={app.icon} width={32} />
<div className="acInfo">
<div className="appName">{app.name}</div>
Expand All @@ -163,12 +163,12 @@ export const StartMenu = () => {
</div>
<div className="allApps win11Scroll" data-alpha={start.alpha}>
{start.contApps.map((ldx, i) => {
if (ldx.length == 0) return null;
if (ldx.length === 0) return null;

var tpApps = [];
tpApps.push(
<div key={i} className="allApp prtclk" data-action="STARTALPHA" onClick={clickDispatch} id={`char${i == 0 ? "#" : String.fromCharCode(i + 64)}`}>
<div className="ltName">{i == 0 ? "#" : String.fromCharCode(i + 64)}</div>
<div key={i} className="allApp prtclk" data-action="STARTALPHA" onClick={clickDispatch} id={`char${i === 0 ? "#" : String.fromCharCode(i + 64)}`}>
<div className="ltName">{i === 0 ? "#" : String.fromCharCode(i + 64)}</div>
</div>
);

Expand All @@ -191,8 +191,8 @@ export const StartMenu = () => {
</div>
{start.contApps.map((ldx, i) => {
return (
<div key={i} className={ldx.length == 0 ? "dullApp allApp" : "allApp prtclk"} data-action="STARTALPHA" onClick={ldx.length == 0 ? null : clickDispatch} data-payload={i == 0 ? "#" : String.fromCharCode(i + 64)}>
<div className="ltName">{i == 0 ? "#" : String.fromCharCode(i + 64)}</div>
<div key={i} className={ldx.length === 0 ? "dullApp allApp" : "allApp prtclk"} data-action="STARTALPHA" onClick={ldx.length === 0 ? null : clickDispatch} data-payload={i === 0 ? "#" : String.fromCharCode(i + 64)}>
<div className="ltName">{i === 0 ? "#" : String.fromCharCode(i + 64)}</div>
</div>
);
})}
Expand Down Expand Up @@ -240,25 +240,25 @@ export const StartMenu = () => {
</div>
<div className="flex py-4 px-1 text-xs">
<div className="opts w-1/2 flex justify-between">
<div value={atab == "All"} onClick={tabSw}>
<div value={atab === "All"} onClick={tabSw}>
All
</div>
<div value={atab == "Apps"} onClick={tabSw}>
<div value={atab === "Apps"} onClick={tabSw}>
Apps
</div>
<div value={atab == "Documents"} onClick={tabSw}>
<div value={atab === "Documents"} onClick={tabSw}>
Documents
</div>
<div value={atab == "Web"} onClick={tabSw}>
<div value={atab === "Web"} onClick={tabSw}>
Web
</div>
<div value={atab == "More"} onClick={tabSw}>
<div value={atab === "More"} onClick={tabSw}>
More
</div>
</div>
</div>
<div className="shResult w-full flex justify-between">
<div className="leftSide flex-col px-1" data-width={query.length != 0}>
<div className="leftSide flex-col px-1" data-width={query.length !== 0}>
<div className="text-sm font-semibold mb-4">{query.length ? "Best match" : "Top apps"}</div>
{query.length ? (
<div className="textResult h-16">
Expand Down
12 changes: 6 additions & 6 deletions src/components/start/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -59,7 +59,7 @@ export const WidPane = () => {
{widget.data.weather.days.map((item, i) => {
return (
<div key={i} className="weekDay">
<div>{i == 0 ? "Today" : item.day}</div>
<div>{i === 0 ? "Today" : item.day}</div>
<Icon src={`https://www.metaweather.com/static/img/weather/png/64/${item.icon}.png`} ext width={24} />

<div className="tempCont">{item.min}º</div>
Expand All @@ -79,7 +79,7 @@ export const WidPane = () => {
</div>
<div className="stockValue">
<div>{widget.data.stock[0][0]}</div>
<div className="stRes" data-pos={widget.data.stock[0][2] == 1}>
<div className="stRes" data-pos={widget.data.stock[0][2] === 1}>
{widget.data.stock[0][2] ? "+" : "-"}
{widget.data.stock[0][1]}%
</div>
Expand All @@ -92,7 +92,7 @@ export const WidPane = () => {
</div>
<div className="stockValue">
<div>{widget.data.stock[1][0]}</div>
<div className="stRes" data-pos={widget.data.stock[1][2] == 1}>
<div className="stRes" data-pos={widget.data.stock[1][2] === 1}>
{widget.data.stock[1][2] ? "+" : "-"}
{widget.data.stock[1][1]}%
</div>
Expand Down Expand Up @@ -154,7 +154,7 @@ export const WidPane = () => {
<div className="tpNews">
<div className="tpSource">{article.source.name}</div>
<div className="tpArticle">{article.title}</div>
{i % 5 == 4 ? <div className="tpdesc">{article.content}</div> : null}
{i % 5 === 4 ? <div className="tpdesc">{article.content}</div> : null}
</div>
</a>
);
Expand Down
Loading

0 comments on commit aa4997e

Please sign in to comment.