diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..a91c5fd9 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,68 @@ +# BetterDiscord Changelog + +This changelog starts with the restructured 1.0.0 release that happened after context isolation changes. The changelogs here should more-or-less mirror the ones that get shown in the client but probably with less formatting and pizzazz. + +## Unreleased + +### Added +- Added an option to prevent Discord from hijacking the media keys. +- Added command line flag to launch a vanilla version of Discord `--vanilla` +- Added an option for app-wide `ctrl+shift+c` shortcut for inspect element. +- Added emote blocklist to `BdApi` via `BdApi.Emotes.blocklist`. +- Added the ability to remove Discord's forced minimum window size. +- Added a basic core updater to hopefully prevent the need for future installs. +- Added an option to log out all console logs to file for developers. +- Added an option to disable Discord's console warning. + +### Removed +- Class normalizer was removed as it does more harm than good. + +### Changed +- Addon error modals got a makeover thanks to [Strencher](https://github.com/Strencher) and [Tropical](https://github.com/Tropix126) +- Emotes are now downloaded as a single asar bundle as opposed to individual JSON files. +- Strings are now bundles with the main payload, but may move to a separate asar like the emotes. +- `BdApi` functions related to window preferences no longer work and are deprecated. +- Guild classes are obtained later from webpack in case it's not loaded in fast enough. +- DataStore now has additional protections (`try..catch`). + +### Fixed +- Fixed an issue with old METAs used in themes cause the css to render invalid. +- Fixed crashing issues with plugins using `Buffer`. +- Fixed a bug for manual and 3rd party installations that don't create the BD folder. +- Fixed incorrect path usage for some Mac devices. +- Fixed colored text not doing anything. +- Fixed detached css window not loading saved css. +- Fixed an issue where toggling settings collections would remove incorrect panels. +- Fixed the file watchers not properly matching duplicate files. +- Fixed Hide GIF and Hide Gift options for Discord's changes +- Fixed public servers button not showing. +- Fixed multiple error modals showing on startup if multiple plugins had errors. +- Fixed incorrect styling on emotes. +- Fixed system editor edit buttons using an old Electron API (`openItem` vs `openPath`) + + +## 1.0.0 + +### Added +- **Everything** is entirely rewritten, for better or worse. +- **Emotes and Custom CSS** can be completely turned off for those not interested. It saves on memory too by not loading those components. +- **Floating editors** for both custom css and plugins/themes are now available. +- **Monaco** is now used as the main CSS editor, in place of Ace. +- **Settings panels** are completely new and sleek. They are also highly extensible for potential future features :eyes: +- **Translations** are now integrated starting with only a couple languages, but feel free to contribute your own! +- **Public servers** got a new makeover thanks to some design help from Tropical and Gibbu! +We added settings to hide the **Gif Picker** and the **Nitro Gift** buttons in the textarea. + +### Changed +- **Patcher API** was added to `BdApi` under `BdApi.Patcher`. The old `BdApi.monkeyPatch` was patched to use the Patcher as well. This allows plugins and patches to play nice with one another. +- **jQuery** was removed from dependencies. +- **General performance** improvements throughout the app, from startup to emotes to addons. +- **Exporting** by plugins is now highly encouraged over trying to match your meta name and class name. +- **Plugins and Themes** pages have more options for sorting, views and more. The entire panel got a facelift! +- **Blankslates** have been added all over for that added UX. +- **Several unused UI features** have been removed for a more performant and usable experience. +- **Debugger Hotkey** is now a built-in feature! + +### Fixed +- **Minimal mode** has been redesigned from the ground up and now works as intended. +- **Emote menus** are fixed and now use React Patching to properly integrate into the new Emoji Picker. (Thanks Strencher#1044!) diff --git a/assets/locales/bg.json b/assets/locales/bg.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/assets/locales/bg.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/assets/locales/cs.json b/assets/locales/cs.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/assets/locales/cs.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/assets/locales/da.json b/assets/locales/da.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/assets/locales/da.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/assets/locales/el.json b/assets/locales/el.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/assets/locales/el.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/assets/locales/en-gb.json b/assets/locales/en-gb.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/assets/locales/en-gb.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/assets/locales/en.json b/assets/locales/en-us.json similarity index 100% rename from assets/locales/en.json rename to assets/locales/en-us.json diff --git a/assets/locales/es-es.json b/assets/locales/es-es.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/assets/locales/es-es.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/assets/locales/fi.json b/assets/locales/fi.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/assets/locales/fi.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/assets/locales/hi.json b/assets/locales/hi.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/assets/locales/hi.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/assets/locales/hr.json b/assets/locales/hr.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/assets/locales/hr.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/assets/locales/hu.json b/assets/locales/hu.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/assets/locales/hu.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/assets/locales/index.js b/assets/locales/index.js index 775fd840..01a80003 100644 --- a/assets/locales/index.js +++ b/assets/locales/index.js @@ -1,6 +1,82 @@ +/* eslint-disable no-multi-spaces */ + module.exports = { - en: require("./en.json"), - de: require("./de.json"), - ja: require("./ja.json"), - sv: require("./sv.json") -}; \ No newline at end of file + "en-US": require("./en-us.json"), // English, US + "en-GB": require("./en-gb.json"), // English, UK + "zh-CN": require("./zh-cn.json"), // Chinese, Simplified + "zh-TW": require("./zh-tw.json"), // Chinese, Traditional + "cs": require("./cs.json"), // Czech + "da": require("./da.json"), // Danish + "nl": require("./nl.json"), // Dutch + "fr": require("./fr.json"), // French + "de": require("./de.json"), // German + "el": require("./el.json"), // Greek + "hu": require("./hu.json"), // Hungarian + "it": require("./it.json"), // Italian + "ja": require("./ja.json"), // Japanese + "ko": require("./ko.json"), // Korean + "pl": require("./pl.json"), // Polish + "pt-PT": require("./pt-pt.json"), // Portuguese, Portugal + "pt-BR": require("./pt-br.json"), // Protuguese, Brazil + "ru": require("./ru.json"), // Russian + "sk": require("./sk.json"), // Slovak + "es-ES": require("./es-es.json"), // Spanish (Spain) + "sv-SE": require("./sv-se.json"), // Swedish + "tr": require("./tr.json"), // Turkish + "bg": require("./bg.json"), // Bulgarian + "uk": require("./uk.json"), // Ukrainian + "fi": require("./fi.json"), // Finnish + "no": require("./no.json"), // Norwegian + "hr": require("./hr.json"), // Croation + "ro": require("./ro.json"), // Romanian + "lt": require("./lt.json"), // Lithuanian + "th": require("./th.json"), // Thai + "vi": require("./vi.json"), // Vietnamese + "hi": require("./hi.json"), // Hindi +}; + + +/* + +The following is the list of Discord's available locales as of April 15th 2021 + +English, US: en-US +English, UK: en-GB +Chinese Simplified: +Traditional Chinese: zh-TW +Czech: cs +Danish: da +Dutch: nl +French: fr +German: de +Greek: el +Hungarian: hu +Italian: it +Japanese: ja +Korean: ko +Polish: pl +Portuguese: pt-PT +Portuguese, Brazilian: pt-BR +Russian: ru +Slovak: sk +Spanish: es-ES +Swedish: sv-SE +Turkish: tr +Bulgarian: bg +Ukrainian: uk +Finnish: fi +Norwegian: no +Croatian: hr +Romanian: ro +Lithuanian: lt +Thai: th +Vietnamese: vi +Hindi: hi + +List was retrieved using: DiscordModules.LocaleManager.getLanguages().map(l => `${l.englishName}: ${l.code}`) + +This means that the above list includes locales that exist in their current system, but are not yet available to select via UI. + +That list can be checked with DiscordModules.LocaleManager.getAvailableLocales() + +*/ \ No newline at end of file diff --git a/assets/locales/it.json b/assets/locales/it.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/assets/locales/it.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/assets/locales/ko.json b/assets/locales/ko.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/assets/locales/ko.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/assets/locales/lt.json b/assets/locales/lt.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/assets/locales/lt.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/assets/locales/nl.json b/assets/locales/nl.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/assets/locales/nl.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/assets/locales/no.json b/assets/locales/no.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/assets/locales/no.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/assets/locales/pl.json b/assets/locales/pl.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/assets/locales/pl.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/assets/locales/pt-br.json b/assets/locales/pt-br.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/assets/locales/pt-br.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/assets/locales/pt-pt.json b/assets/locales/pt-pt.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/assets/locales/pt-pt.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/assets/locales/ro.json b/assets/locales/ro.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/assets/locales/ro.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/assets/locales/ru.json b/assets/locales/ru.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/assets/locales/ru.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/assets/locales/sk.json b/assets/locales/sk.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/assets/locales/sk.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/assets/locales/sv.json b/assets/locales/sv-se.json similarity index 100% rename from assets/locales/sv.json rename to assets/locales/sv-se.json diff --git a/assets/locales/th.json b/assets/locales/th.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/assets/locales/th.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/assets/locales/tr.json b/assets/locales/tr.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/assets/locales/tr.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/assets/locales/uk.json b/assets/locales/uk.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/assets/locales/uk.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/assets/locales/vi.json b/assets/locales/vi.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/assets/locales/vi.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/assets/locales/zh-cn.json b/assets/locales/zh-cn.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/assets/locales/zh-cn.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/assets/locales/zh-tw.json b/assets/locales/zh-tw.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/assets/locales/zh-tw.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/renderer/src/modules/localemanager.js b/renderer/src/modules/localemanager.js index 9e7b0099..85aef7e9 100644 --- a/renderer/src/modules/localemanager.js +++ b/renderer/src/modules/localemanager.js @@ -6,8 +6,8 @@ import Events from "./emitter"; const {Dispatcher, DiscordConstants, UserSettingsStore} = DiscordModules; export default new class LocaleManager { - get discordLocale() {return UserSettingsStore.locale.split("-")[0];} - get defaultLocale() {return "en";} + get discordLocale() {return UserSettingsStore.locale;} + get defaultLocale() {return "en-US";} constructor() { this.locale = ""; @@ -18,7 +18,7 @@ export default new class LocaleManager { this.setLocale(this.discordLocale); Dispatcher.subscribe(DiscordConstants.ActionTypes.USER_SETTINGS_UPDATE, ({settings}) => { const newLocale = settings.locale; - if (newLocale && newLocale != this.locale) this.setLocale(newLocale.split("-")[0]); + if (newLocale && newLocale != this.locale) this.setLocale(newLocale); }); } diff --git a/renderer/src/styles/ui/switch.css b/renderer/src/styles/ui/switch.css index fe460aa4..8a9230cf 100644 --- a/renderer/src/styles/ui/switch.css +++ b/renderer/src/styles/ui/switch.css @@ -8,11 +8,12 @@ --switch-color: rgb(114, 118, 125); --symbol1path: path('M5.13231 6.72963L6.7233 5.13864L14.855 13.2704L13.264 14.8614L5.13231 6.72963Z'); --symbol2path: path('M13.2704 5.13864L14.8614 6.72963L6.72963 14.8614L5.13864 13.2704L13.2704 5.13864Z'); + border-radius: 14px; width: 40px; height: 24px; background-color: var(--switch-color); - transition: 250ms cubic-bezier(0, .3, .7, 1) background-color; + transition: 250ms cubic-bezier(0, 0.3, 0.7, 1) background-color; position: relative; } @@ -20,17 +21,17 @@ --switch-color: rgba(100, 137, 126); } -.full-motion .bd-switch input:active + .bd-switch-body { - --symbol1path: path('M6.56666 11.0013L6.56666 8.96683L13.5667 8.96683L13.5667 11.0013L6.56666 11.0013Z'); - --symbol2path: path('M13.5582 8.96683L13.5582 11.0013L6.56192 11.0013L6.56192 8.96683L13.5582 8.96683Z'); -} - .bd-switch input:checked + .bd-switch-body { --switch-color: rgb(67, 181, 129); --symbol1path: path('M7.89561 14.8538L6.30462 13.2629L14.3099 5.25755L15.9009 6.84854L7.89561 14.8538Z'); --symbol2path: path('M4.08643 11.0903L5.67742 9.49929L9.4485 13.2704L7.85751 14.8614L4.08643 11.0903Z'); } +.full-motion .bd-switch input:active + .bd-switch-body { + --symbol1path: path('M6.56666 11.0013L6.56666 8.96683L13.5667 8.96683L13.5667 11.0013L6.56666 11.0013Z'); + --symbol2path: path('M13.5582 8.96683L13.5582 11.0013L6.56192 11.0013L6.56192 8.96683L13.5582 8.96683Z'); +} + .bd-switch input:checked:active + .bd-switch-body { --switch-color: rgba(81, 162, 128); } @@ -42,7 +43,7 @@ .bd-switch .bd-switch-symbol path { fill: var(--switch-color); - transition: 250ms cubic-bezier(0, .3, .7, 1); + transition: 250ms cubic-bezier(0, 0.3, 0.7, 1); } .bd-switch .bd-switch-symbol path:first-child { @@ -71,7 +72,7 @@ width: 28px; height: 18px; margin: 3px; - transition: 250ms cubic-bezier(0, .3, .7, 1); + transition: 250ms cubic-bezier(0, 0.3, 0.7, 1); } .bd-switch input:active + .bd-switch-body .bd-switch-slider { @@ -87,7 +88,7 @@ } .bd-switch-body .bd-switch-slider .bd-switch-handle { - transition: 250ms cubic-bezier(0, .3, .7, 1); + transition: 250ms cubic-bezier(0, 0.3, 0.7, 1); position: relative; } diff --git a/renderer/src/styles/ui/tabbar.css b/renderer/src/styles/ui/tabbar.css index 87cd2172..dcad79fa 100644 --- a/renderer/src/styles/ui/tabbar.css +++ b/renderer/src/styles/ui/tabbar.css @@ -45,4 +45,4 @@ .bd-tab-item:active { background-color: var(--background-modifier-active); -} \ No newline at end of file +} diff --git a/renderer/src/ui/settings/components/switch.jsx b/renderer/src/ui/settings/components/switch.jsx index b9e977e2..05602789 100644 --- a/renderer/src/ui/settings/components/switch.jsx +++ b/renderer/src/ui/settings/components/switch.jsx @@ -16,8 +16,8 @@ export default class Switch extends React.Component { render() { const enabledClass = this.props.disabled ? " bd-switch-disabled" : ""; const checkedClass = this.state.checked ? " bd-switch-checked" : ""; - return
- + return
+