DiscordDevBanner: Cleanup
This commit is contained in:
parent
14b59146eb
commit
ec575062b9
3 changed files with 4 additions and 13 deletions
|
|
@ -30,9 +30,7 @@ export function transform(state?: string): string | JSX.Element {
|
|||
const { RELEASE_CHANNEL, BUILD_NUMBER, VERSION_HASH } = window.GLOBAL_ENV;
|
||||
const buildChannel = names[RELEASE_CHANNEL] || RELEASE_CHANNEL.charAt(0).toUpperCase() + RELEASE_CHANNEL.slice(1);
|
||||
const { chromiumVersion, electronVersion } = SettingsPlugin;
|
||||
const format =
|
||||
settings.store.format ??
|
||||
"{devBannerIcon} {buildChannel} {buildNumber} ({buildHash}) | {equicordIcon} {equicordName} {equicordVersion} ({equicordHash})";
|
||||
const format = settings.store.format ?? "{devBannerIcon} {buildChannel} {buildNumber} ({buildHash}) | {equicordIcon} {equicordName} {equicordVersion} ({equicordHash})";
|
||||
const baseFormat = state ?? format;
|
||||
|
||||
const replaced = baseFormat
|
||||
|
|
@ -95,10 +93,6 @@ export default definePlugin({
|
|||
match: '"staging"===window.GLOBAL_ENV.RELEASE_CHANNEL',
|
||||
replace: "true"
|
||||
},
|
||||
{
|
||||
match: /(\i=\(\)=>)\(.*?\}\);/,
|
||||
replace: "$1null;"
|
||||
},
|
||||
{
|
||||
match: /children:\[.*?\{\}\)\]/g,
|
||||
replace: "children:$self.transform()"
|
||||
|
|
|
|||
|
|
@ -59,15 +59,14 @@ function FormatSetting(setValue) {
|
|||
|
||||
return (
|
||||
<Forms.FormSection>
|
||||
<Forms.FormTitle>Custom Format</Forms.FormTitle>
|
||||
<Forms.FormText className={"vc-discord-dev-banner"}>
|
||||
<Forms.FormText className={"vc-discord-dev-banner-text"}>
|
||||
The format to transform the build number to. You can use the following placeholders:
|
||||
{"\n\n"}
|
||||
{placeholderInfo.join("\n")}
|
||||
{"\n\n"}
|
||||
</Forms.FormText>
|
||||
|
||||
<Forms.FormText className="vc-discord-dev-banner">Preview:</Forms.FormText>
|
||||
<Forms.FormText className="vc-discord-dev-banner-text">Preview:</Forms.FormText>
|
||||
<Forms.FormText style={{ padding: "2px" }}>{preview}</Forms.FormText>
|
||||
<textarea
|
||||
className="vc-discord-dev-banner-input"
|
||||
|
|
@ -88,8 +87,6 @@ function FormatSetting(setValue) {
|
|||
}}
|
||||
/>
|
||||
|
||||
|
||||
|
||||
{error && (
|
||||
<Forms.FormText className={"vc-discord-dev-banner-error"}>{error}</Forms.FormText>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.vc-discord-dev-banner {
|
||||
.vc-discord-dev-banner-text {
|
||||
white-space: pre-wrap;
|
||||
padding: 2px;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue