2023-01-07 23:45:12 +00:00
|
|
|
import { Fragment } from "react";
|
|
|
|
import {Component} from "react";
|
|
|
|
import {
|
|
|
|
ButtonItem,
|
|
|
|
Field,
|
|
|
|
PanelSectionRow,
|
|
|
|
staticClasses,
|
2023-03-28 01:48:06 +01:00
|
|
|
//Router,
|
|
|
|
Navigation,
|
2023-01-07 23:45:12 +00:00
|
|
|
} from "decky-frontend-lib";
|
|
|
|
import * as backend from "../backend";
|
2023-01-11 01:54:33 +00:00
|
|
|
import { tr } from "usdpl-front";
|
2023-01-07 23:45:12 +00:00
|
|
|
import {
|
|
|
|
BACKEND_INFO,
|
|
|
|
DRIVER_INFO,
|
|
|
|
} from "../consts";
|
|
|
|
import { get_value, target_usdpl, version_usdpl} from "usdpl-front";
|
|
|
|
|
|
|
|
let eggCount = 0;
|
2023-03-04 15:32:58 +00:00
|
|
|
let now = new Date();
|
|
|
|
let isSpecialDay = now.getDate() == 1 && now.getMonth() == 3;
|
2023-01-07 23:45:12 +00:00
|
|
|
|
2023-02-04 21:19:00 +00:00
|
|
|
export class Debug extends Component<backend.IdcProps> {
|
2023-01-07 23:45:12 +00:00
|
|
|
render() {
|
|
|
|
return buildDebug();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function buildDebug() {
|
|
|
|
return (<Fragment>{/* Version Info */}
|
|
|
|
<div className={staticClasses.PanelSectionTitle}>
|
2023-01-11 01:54:33 +00:00
|
|
|
{eggCount % 10 == 9 ? "Ha! Nerd" : tr("Debug")}
|
2023-01-07 23:45:12 +00:00
|
|
|
</div>
|
|
|
|
<PanelSectionRow>
|
|
|
|
<Field
|
2023-01-11 01:54:33 +00:00
|
|
|
label={eggCount % 10 == 9 ? "PowerTools" : tr("Native")}
|
2023-01-07 23:45:12 +00:00
|
|
|
onClick={()=> {
|
|
|
|
if (eggCount % 10 == 9) {
|
|
|
|
// you know you're bored and/or conceited when you spend time adding an easter egg
|
|
|
|
// that just sends people to your own project's repo
|
2023-09-03 16:22:11 +01:00
|
|
|
Navigation.NavigateToExternalWeb("https://git.ngni.us/NG-SD-Plugins/PowerTools/releases");
|
2023-01-07 23:45:12 +00:00
|
|
|
}
|
|
|
|
eggCount++;
|
|
|
|
}}>
|
|
|
|
{eggCount % 10 == 9 ? "by NGnius" : get_value(BACKEND_INFO)}
|
|
|
|
</Field>
|
|
|
|
</PanelSectionRow>
|
|
|
|
<PanelSectionRow>
|
|
|
|
<Field
|
2023-01-11 01:54:33 +00:00
|
|
|
label={tr("Framework")}
|
2023-01-07 23:45:12 +00:00
|
|
|
onClick={()=> eggCount++}>
|
|
|
|
{eggCount % 10 == 9 ? "<3 <3 <3" : target_usdpl()}
|
|
|
|
</Field>
|
|
|
|
</PanelSectionRow>
|
|
|
|
<PanelSectionRow>
|
|
|
|
<Field
|
2023-03-28 01:48:06 +01:00
|
|
|
label={ eggCount % 10 == 9 && tr("Driver") == "Driver" ? "Drive" : tr("Driver")}
|
2023-01-07 23:45:12 +00:00
|
|
|
onClick={()=> eggCount++}>
|
2023-03-28 01:48:06 +01:00
|
|
|
{eggCount % 10 == 9 ? "Ryan Gosling" : get_value(DRIVER_INFO)}
|
2023-01-07 23:45:12 +00:00
|
|
|
</Field>
|
|
|
|
</PanelSectionRow>
|
|
|
|
<PanelSectionRow>
|
|
|
|
<Field
|
|
|
|
label="USDPL"
|
|
|
|
onClick={()=> {
|
|
|
|
if (eggCount % 10 == 9) {
|
|
|
|
// you know you're bored and/or conceited when you spend time adding an easter egg
|
|
|
|
// that just sends people to your own project's repo
|
2023-09-03 16:22:11 +01:00
|
|
|
Navigation.NavigateToExternalWeb("https://git.ngni.us/NG-SD-Plugins/usdpl-rs");
|
2023-01-07 23:45:12 +00:00
|
|
|
}
|
|
|
|
eggCount++;
|
|
|
|
}}>
|
|
|
|
v{version_usdpl()}
|
|
|
|
</Field>
|
|
|
|
</PanelSectionRow>
|
2023-03-04 15:32:58 +00:00
|
|
|
{(eggCount % 10 == 9 || isSpecialDay) && <PanelSectionRow>
|
2023-01-07 23:45:12 +00:00
|
|
|
<ButtonItem
|
|
|
|
layout="below"
|
|
|
|
onClick={(_: MouseEvent) => {
|
|
|
|
backend.idk();
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
???
|
|
|
|
</ButtonItem>
|
|
|
|
</PanelSectionRow>}
|
|
|
|
</Fragment>);
|
|
|
|
}
|