its shiggy season
This commit is contained in:
parent
48af94224b
commit
585a1035c0
1 changed files with 28 additions and 2 deletions
30
index.ts
30
index.ts
|
@ -101,10 +101,34 @@ function humanFileSize(bytes, si = false, dp = 1) {
|
||||||
return bytes.toFixed(dp) + " " + units[u];
|
return bytes.toFixed(dp) + " " + units[u];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let BUILD_NUMBER;
|
||||||
|
let VERSION_HASH;
|
||||||
|
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "venfetch",
|
name: "venfetch",
|
||||||
description: "neofetch for vencord",
|
description: "neofetch for vencord",
|
||||||
authors: [Devs.nin0dev],
|
authors: [Devs.nin0dev],
|
||||||
|
patches: [
|
||||||
|
{
|
||||||
|
find: /.log\("[BUILD INFO]/,
|
||||||
|
replacement: [
|
||||||
|
{
|
||||||
|
match: /Build Number: "\).concat\(("\d+")/,
|
||||||
|
replace: "Build Number: \").concat($self.setBuildNumber($1)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
match: /Version Hash: \"\).concat\(("\w+")/,
|
||||||
|
replace: "Version Hash: \").concat($self.setVersionHash($1)"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
setBuildNumber(buildNumber) {
|
||||||
|
return BUILD_NUMBER = buildNumber;
|
||||||
|
},
|
||||||
|
setVersionHash(versionHash) {
|
||||||
|
return VERSION_HASH = versionHash;
|
||||||
|
},
|
||||||
commands: [
|
commands: [
|
||||||
{
|
{
|
||||||
name: "venfetch",
|
name: "venfetch",
|
||||||
|
@ -115,8 +139,10 @@ export default definePlugin({
|
||||||
const info: Record<string, string | null> = {
|
const info: Record<string, string | null> = {
|
||||||
version: `${VERSION} ~ ${gitHash}${SettingsPlugin.additionalInfo} - ${Intl.DateTimeFormat(navigator.language, { dateStyle: "medium" }).format(BUILD_TIMESTAMP)}`,
|
version: `${VERSION} ~ ${gitHash}${SettingsPlugin.additionalInfo} - ${Intl.DateTimeFormat(navigator.language, { dateStyle: "medium" }).format(BUILD_TIMESTAMP)}`,
|
||||||
client: `${t(window.GLOBAL_ENV.RELEASE_CHANNEL)} ~ ${clientVersion()}`,
|
client: `${t(window.GLOBAL_ENV.RELEASE_CHANNEL)} ~ ${clientVersion()}`,
|
||||||
|
// TODO: fix this
|
||||||
|
// build: `${BUILD_NUMBER ?? "Unknown"} (${VERSION_HASH?.slice(0, 7) ?? 'unknown'})`,
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
platform: navigator.userAgentData?.platform ?? navigator.platform,
|
platform: navigator.userAgentData?.platform ? `${navigator.userAgentData?.platform} (${navigator.platform})` : navigator.platform,
|
||||||
plugins: getEnabledPlugins(),
|
plugins: getEnabledPlugins(),
|
||||||
uptime: `${~~((Date.now() - uptime) / 1000)}s`,
|
uptime: `${~~((Date.now() - uptime) / 1000)}s`,
|
||||||
// TODO: pr to vencord real and add to vencordnative
|
// TODO: pr to vencord real and add to vencordnative
|
||||||
|
@ -124,7 +150,7 @@ export default definePlugin({
|
||||||
_: null,
|
_: null,
|
||||||
|
|
||||||
donor: getDonorStatus() ? "yes" : "no",
|
donor: getDonorStatus() ? "yes" : "no",
|
||||||
contributor: getContribStatus() ? "yes" : null,
|
contributor: getContribStatus() ? "yes" : "no",
|
||||||
|
|
||||||
__: null,
|
__: null,
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue