Skip to content

Commit f03524b

Browse files
authored
Merge branch 'main' into addon-as-folder
2 parents c84363b + 92fd100 commit f03524b

27 files changed

+445
-219
lines changed

i18n/en-US.messages.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1390,7 +1390,7 @@ export declare const messages: {
13901390
*
13911391
* ### Definition
13921392
* ```text
1393-
* Custom Title Bar
1393+
* Native Title Bar
13941394
* ```
13951395
*
13961396
* ### Problems
@@ -1403,7 +1403,7 @@ export declare const messages: {
14031403
*
14041404
* ### Definition
14051405
* ```text
1406-
* Use Discord's custom title bar instead of the system title bar. **Requires restart**.
1406+
* Use the system native title bar instead of Discord's custom title bar. **Requires restart**.
14071407
* ```
14081408
*
14091409
* ### Problems

i18n/en-US.messages.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,8 @@ export default defineMessages({
192192
"REPLUGGED_SETTINGS_TRANSPARENT_ISSUES_LINUX": "**Hardware acceleration** may need to be turned **off**. In some cases, you may experience a black background, such as when the window is cut off at the top or bottom due to the monitor resolution, or when the development tools are open and docked.",
193193
"REPLUGGED_SETTINGS_ERROR_PLUGIN_NAME": "Plugin: {name}",
194194
"REPLUGGED_STORE": "Store",
195-
"REPLUGGED_SETTINGS_CUSTOM_TITLE_BAR": "Custom Title Bar",
196-
"REPLUGGED_SETTINGS_CUSTOM_TITLE_BAR_DESC": "Use Discord's custom title bar instead of the system title bar. **Requires restart**.",
195+
"REPLUGGED_SETTINGS_CUSTOM_TITLE_BAR": "Native Title Bar",
196+
"REPLUGGED_SETTINGS_CUSTOM_TITLE_BAR_DESC": "Use the system native title bar instead of Discord's custom title bar. **Requires restart**.",
197197
"REPLUGGED_SETTINGS_DISCORD_DEVTOOLS": "Enable Discord Internal DevTools",
198198
"REPLUGGED_SETTINGS_DISCORD_DEVTOOLS_DESC": "Replaces the help button in the title bar with Discord's internal developer tools (different from Chrome DevTools). This setting requires Discord experiments to be enabled first. **Requires restart**.",
199199
"REPLUGGED_SETTINGS_QUICKCSS_ENABLE": "Enable Quick CSS",

i18n/messages/de.messages.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,5 +185,5 @@
185185
"REPLUGGED_STORE": "Speichern",
186186
"REPLUGGED_TOAST_ADDON_DISABLE_FAILED": "{name} konnte nicht deaktiviert werden",
187187
"REPLUGGED_TOAST_ADDON_ENABLE_FAILED": "{name} konnte nicht aktiviert werden",
188-
"REPLUGGED_SETTINGS_CUSTOM_TITLE_BAR": "Benutzerdefinierte titelleiste"
188+
"REPLUGGED_SETTINGS_CUSTOM_TITLE_BAR": "Native titelleiste"
189189
}

i18n/messages/en-GB.messages.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,9 @@
183183
"REPLUGGED_COMMAND_INSTALL_OPTION_ID_NAME": "id",
184184
"REPLUGGED_COMMAND_INSTALL_OPTION_ID_DESC": "If the source has multiple addons, specify which one to install",
185185
"REPLUGGED_STORE": "Store",
186-
"REPLUGGED_SETTINGS_CUSTOM_TITLE_BAR": "Custom Title Bar",
186+
"REPLUGGED_SETTINGS_CUSTOM_TITLE_BAR": "Native Title Bar",
187187
"REPLUGGED_TOAST_ADDON_DISABLE_FAILED": "Failed to disable {name}",
188-
"REPLUGGED_SETTINGS_CUSTOM_TITLE_BAR_DESC": "Use Discord's custom title bar instead of the system title bar. **Requires restart**.",
188+
"REPLUGGED_SETTINGS_CUSTOM_TITLE_BAR_DESC": "Use the system native title bar instead of Discord's custom title bar. **Requires restart**.",
189189
"REPLUGGED_TOAST_ADDON_ENABLE_FAILED": "Failed to enable {name}",
190190
"REPLUGGED_SETTINGS_DISCORD_DEVTOOLS": "Enable Discord Internal DevTools",
191191
"REPLUGGED_SETTINGS_DISCORD_DEVTOOLS_DESC": "Replaces the help button in the title bar with Discord's internal developer tools (different from Chrome DevTools). This setting requires Discord experiments to be enabled first. **Requires restart**.",

i18n/messages/en-US.messages.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@
187187
"REPLUGGED_SETTINGS_TRANSPARENT_ISSUES_LINUX": "**Hardware acceleration** may need to be turned **off**. In some cases, you may experience a black background, such as when the window is cut off at the top or bottom due to the monitor resolution, or when the development tools are open and docked.",
188188
"REPLUGGED_SETTINGS_ERROR_PLUGIN_NAME": "Plugin: {name}",
189189
"REPLUGGED_STORE": "Store",
190-
"REPLUGGED_SETTINGS_CUSTOM_TITLE_BAR": "Custom Title Bar",
191-
"REPLUGGED_SETTINGS_CUSTOM_TITLE_BAR_DESC": "Use Discord's custom title bar instead of the system title bar. **Requires restart**.",
190+
"REPLUGGED_SETTINGS_CUSTOM_TITLE_BAR": "Native Title Bar",
191+
"REPLUGGED_SETTINGS_CUSTOM_TITLE_BAR_DESC": "Use the system native title bar instead of Discord's custom title bar. **Requires restart**.",
192192
"REPLUGGED_SETTINGS_DISCORD_DEVTOOLS": "Enable Discord Internal DevTools",
193193
"REPLUGGED_SETTINGS_DISCORD_DEVTOOLS_DESC": "Replaces the help button in the title bar with Discord's internal developer tools (different from Chrome DevTools). This setting requires Discord experiments to be enabled first. **Requires restart**.",
194194
"REPLUGGED_SETTINGS_QUICKCSS_ENABLE": "Enable Quick CSS",

i18n/messages/it.messages.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,9 @@
184184
"REPLUGGED_COMMAND_INSTALL_OPTION_ID_DESC": "Se la sorgente ha più addon, specifica quale installare",
185185
"REPLUGGED_STORE": "Store",
186186
"REPLUGGED_TOAST_ADDON_ENABLE_FAILED": "Impossibile abilitare {name}",
187-
"REPLUGGED_SETTINGS_CUSTOM_TITLE_BAR": "Barra del titolo personalizzata",
187+
"REPLUGGED_SETTINGS_CUSTOM_TITLE_BAR": "Barra del titolo nativa",
188188
"REPLUGGED_TOAST_ADDON_DISABLE_FAILED": "Impossibile disabilitare {name}",
189-
"REPLUGGED_SETTINGS_CUSTOM_TITLE_BAR_DESC": "Utilizza la barra del titolo personalizzata di Discord invece della barra del titolo di sistema. **Necessita di un riavvio**.",
189+
"REPLUGGED_SETTINGS_CUSTOM_TITLE_BAR_DESC": "Utilizza la barra del titolo nativa del sistema invece della barra del titolo personalizzata di Discord. **Necessita di un riavvio**.",
190190
"REPLUGGED_SETTINGS_DISCORD_DEVTOOLS": "Attiva i DevTools interni di Discord",
191191
"REPLUGGED_SETTINGS_DISCORD_DEVTOOLS_DESC": "Sostituisce il pulsante di aiuto nella barra del titolo con gli strumenti di sviluppo interni di Discord (diversi da Chrome DevTools). Questa impostazione richiede che gli esperimenti su Discord siano prima attivati. **Necessita di un riavvio**.",
192192
"REPLUGGED_SETTINGS_DISCORD_EXPERIMENTS_DESC": "Sblocca la scheda degli esperimenti di Discord e le opzioni sviluppatore nelle impostazioni. **Necessita di un riavvio**.",

i18n/messages/pl.messages.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,6 @@
185185
"REPLUGGED_STORE": "Sklep",
186186
"REPLUGGED_TOAST_ADDON_DISABLE_FAILED": "Nie udało się wyłączyć {name}",
187187
"REPLUGGED_TOAST_ADDON_ENABLE_FAILED": "Nie udało się włączyć {name}",
188-
"REPLUGGED_SETTINGS_CUSTOM_TITLE_BAR": "Niestandardowy pasek tytułu",
189-
"REPLUGGED_SETTINGS_CUSTOM_TITLE_BAR_DESC": "Użyj niestandardowego paska tytułu Discorda zamiast systemowego paska tytułu. **Wymaga ponownego uruchomienia**."
188+
"REPLUGGED_SETTINGS_CUSTOM_TITLE_BAR": "Natywny pasek tytułu",
189+
"REPLUGGED_SETTINGS_CUSTOM_TITLE_BAR_DESC": "Użyj natywnego paska tytułu systemu zamiast paska tytułu Discorda. **Wymaga ponownego uruchomienia**."
190190
}

src/main/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class BrowserWindow extends electron.BrowserWindow {
3636
const generalSettings = getAllSettings("dev.replugged.Settings");
3737
const originalPreload = opts.webPreferences?.preload;
3838

39-
if (opts.frame && process.platform === "linux" && generalSettings.titleBar) opts.frame = void 0;
39+
if (opts.title && !opts.frame && generalSettings.titleBar) opts.frame = true;
4040

4141
// Load our preload script if it's the main window or the splash screen
4242
if (

src/renderer/coremods/badges/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ const badgeElements = [
9999

100100
export async function start(): Promise<void> {
101101
const useBadgesMod = await waitForModule<Record<string, UseBadges>>(
102-
filters.bySource(/:\i\.getBadges\(\)/),
102+
filters.bySource(/\i\?\.getBadges\(\)\?\?\[\]/),
103103
);
104104
const useBadgesKey = getFunctionKeyBySource(useBadgesMod, "")!;
105105

@@ -177,7 +177,7 @@ export async function start(): Promise<void> {
177177
});
178178

179179
const userProfileConstantsMod = await waitForModule<Record<string, GetBadgeAsset>>(
180-
filters.bySource(/concat\(\i,"\/badge-icons\/"/),
180+
filters.bySource(/https:\/\/\${\i}\/badge-icons\/\${\i}\.png/),
181181
);
182182
const getBadgeAssetKey = getFunctionKeyBySource(userProfileConstantsMod, "badge-icons")!;
183183

src/renderer/coremods/badges/plaintextPatches.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,11 @@ export default [
55
// Edit the ProfileBadges component
66
find: /action:"PRESS_BADGE"/,
77
replacements: [
8-
// Add the "replugged-badge" class if it's our custom badge
8+
// Add the "replugged-badge" class and render a div with children for custom badges
99
{
10-
match: /src:null!=\(\i=(\i)\.iconSrc\).{15,30}?,className:\i\(\)\(\i\.\i,\i/,
11-
replace: `$&,{["replugged-badge"]:$1.component}`,
12-
},
13-
// Change to a div and add a children for our custom badge
14-
{
15-
match: /"img",(.{20,50}?src:null!=\(\i=(\i)\.iconSrc.{15,30}?,)/,
16-
replace: `$2.component?"div":"img",$1children:$2.component,`,
10+
match:
11+
/("img",.{20,50}?src:(\i)\.iconSrc\?\?\(0,\i\.\i\)\(\i\.icon\),className:\i\(\)\(\i\.\i,\i)\)/,
12+
replace: `$2.component?"div":$1,{["replugged-badge"]:$2.component}),children:$2.component`,
1713
},
1814
],
1915
},

0 commit comments

Comments
 (0)