-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bffd530
commit a7635b6
Showing
33 changed files
with
315 additions
and
299 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,4 +51,4 @@ jobs: | |
ssh: true | ||
directory: ./wiki | ||
repository: SteamDeckHomebrew/wiki | ||
branch: main | ||
branch: main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"type": "npm", | ||
"script": "dev", | ||
"problemMatcher": [ | ||
"$tsc-watch" | ||
], | ||
"label": "npm: dev", | ||
"detail": "tsc -b -w", | ||
"isBackground": true | ||
} | ||
] | ||
} | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"type": "npm", | ||
"script": "dev", | ||
"problemMatcher": ["$tsc-watch"], | ||
"label": "npm: dev", | ||
"detail": "tsc -b -w", | ||
"isBackground": true | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module.exports = { | ||
presets: [['@babel/preset-env', { targets: { node: 'current' } }], '@babel/preset-typescript',], | ||
presets: [['@babel/preset-env', { targets: { node: 'current' } }], '@babel/preset-typescript'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
declare global { | ||
interface Window { | ||
SP_REACT: typeof React; | ||
} | ||
} | ||
interface Window { | ||
SP_REACT: typeof React; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
import { Module, findAllModules } from "./webpack"; | ||
import { Module, findAllModules } from './webpack'; | ||
|
||
export interface ClassModule { | ||
[name: string]: string | ||
}; | ||
[name: string]: string; | ||
} | ||
|
||
export const classMap: ClassModule[] = findAllModules((m: Module) => { | ||
if (typeof m == "object" && !m.__esModule) { | ||
const keys = Object.keys(m); | ||
// special case some libraries | ||
if (keys.length == 1 && m.version) return false; | ||
// special case localization | ||
if (keys.length > 1000 && m.AboutSettings) return false; | ||
return keys.length > 0 && keys.every(k => !Object.getOwnPropertyDescriptor(m, k)?.get && typeof m[k] == "string") | ||
} | ||
return false; | ||
if (typeof m == 'object' && !m.__esModule) { | ||
const keys = Object.keys(m); | ||
// special case some libraries | ||
if (keys.length == 1 && m.version) return false; | ||
// special case localization | ||
if (keys.length > 1000 && m.AboutSettings) return false; | ||
|
||
return keys.length > 0 && keys.every((k) => !Object.getOwnPropertyDescriptor(m, k)?.get && typeof m[k] == 'string'); | ||
} | ||
return false; | ||
}); | ||
|
||
export function findClass(name: string): string | void { | ||
return classMap.find(m => m?.[name])?.[name]; | ||
return classMap.find((m) => m?.[name])?.[name]; | ||
} | ||
export function findClassModule(filter: (module: any) => boolean) : ClassModule | void { | ||
return classMap.find(m => filter(m)); | ||
|
||
export function findClassModule(filter: (module: any) => boolean): ClassModule | void { | ||
return classMap.find((m) => filter(m)); | ||
} | ||
|
||
export function unminifyClass(minifiedClass: string): string | void { | ||
for (let m of classMap) { | ||
for (let className of Object.keys(m)) { | ||
if (m[className] == minifiedClass) return className; | ||
} | ||
for (let m of classMap) { | ||
for (let className of Object.keys(m)) { | ||
if (m[className] == minifiedClass) return className; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
import { Export, findModuleExport } from '../webpack'; | ||
import { FC } from 'react'; | ||
|
||
import { Export, findModuleExport } from '../webpack'; | ||
|
||
export interface ControlsListProps { | ||
alignItems?: 'left' | 'right' | 'center'; | ||
spacing?: 'standard' | 'extra'; | ||
} | ||
|
||
export const ControlsList: FC<ControlsListProps> = findModuleExport((e: Export) => e?.toString && e.toString().includes('().ControlsListChild') && e.toString().includes('().ControlsListOuterPanel')); | ||
export const ControlsList: FC<ControlsListProps> = findModuleExport( | ||
(e: Export) => | ||
e?.toString && e.toString().includes('().ControlsListChild') && e.toString().includes('().ControlsListOuterPanel'), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.