Commit Graph

452 Commits

Author SHA1 Message Date
Jiiks bd5ded7333 Renaming 2018-03-15 13:39:09 -03:00
Jiiks 6d1dbfad1e add logging for patches 2018-03-15 13:20:13 -03:00
Jiiks 30c57cf998 Give plugins everything and auto refactor 2018-03-14 14:19:46 +02:00
Jiiks 81941bb140 Lint 2018-03-14 11:06:54 +02:00
Jiiks b3ed044408 add copyright headers 2018-03-14 11:01:10 +02:00
Jiiks e73ac58ff3 Go back to did-finish-load 2018-03-14 09:25:48 +02:00
Jiiks bcc856bc6b Don't need separate displayName 2018-03-14 09:17:58 +02:00
Jiiks 6473ddaf9f add important component scanner through reflection 2018-03-14 09:12:00 +02:00
Jiiks ce9a4c6b3d Fix channel member render 2018-03-14 02:36:34 +02:00
Jiiks ae6b745e68 Partially fix autocomplete and use patches 2018-03-14 00:34:03 +02:00
Jiiks 7116efe207 Replay exports 2018-03-12 17:46:55 +02:00
Jiiks 6a854ab070 Patcher 2018-03-12 17:46:20 +02:00
Zack Rauen fd68da9566 update discord api 2018-03-11 22:42:06 -04:00
Zack Rauen 6917724700 update to master 2018-03-11 22:38:03 -04:00
Samuel Elliott b24e0ef178
Fix error on keypress
Uncaught TypeError: Cannot assign to read only property 'ignoreNextKeypress' of object '[object Object]'
    at ../node_modules/combokeys/Combokeys/index.js.module.exports.../node_modules/combokeys/Combokeys/prototype/handleKey.js.module.exports [as handleKey] (/Users/Samuel/Documents/BetterDiscord/2018-01-19/betterdiscordapp/client/dist/betterdiscord.client.…:4703)
    at ../node_modules/combokeys/Combokeys/index.js.module.exports.../node_modules/combokeys/Combokeys/prototype/handleKeyEvent.js.module.exports (/Users/Samuel/Documents/BetterDiscord/2018-01-19/betterdiscordapp/client/dist/betterdiscord.client.…:4752)
    at HTMLDocument.r (721226c….js:25)
2018-03-09 01:57:27 +00:00
Samuel Elliott 3578698a86
Fix deleting all injected styles 2018-03-09 01:26:45 +00:00
Samuel Elliott 47c786a98a
Can’t freeze internals as then Vue can’t make any plugin/theme’s info and enabled state reactive 2018-03-09 00:18:05 +00:00
Samuel Elliott bc1f93dd89
Store patched functions in a weakmap, move events wrapper and prevent plugins from modifying the plugin and content prototypes and their internals object 2018-03-08 23:43:26 +00:00
Samuel Elliott e7b0acb5a0
Fix plugin API basic modals 2018-03-08 13:59:19 +00:00
Samuel Elliott dfd0208394
Fix theme loading 2018-03-08 02:41:47 +00:00
Samuel Elliott e78089a509
Add menu items to the plugin API 2018-03-07 20:32:04 +00:00
Samuel Elliott 5e259f50f8
Refactor settings menu
Adds support for dynamically adding items
2018-03-07 20:19:02 +00:00
Jiiks 2e512e61b2 Push the data in generic events as well 2018-03-07 12:33:56 +02:00
Jiiks 37ecd7ec4e Simply emit everything we have instead of anything fancy 2018-03-07 12:32:58 +02:00
Alexei Stukov 67747f85eb
Merge pull request #161 from JsSucks/emote-module
Emote module
2018-03-07 11:43:20 +02:00
Jiiks 8d33d80e1c Convert content to use database instead of individual configs 2018-03-07 10:28:14 +02:00
Jiiks 30a886d84a Database wrappers 2018-03-07 10:12:44 +02:00
Jiiks aa3226ce43 New message event 2018-03-07 07:04:52 +02:00
Samuel Elliott d122e27578
Add extmodules and webpack modules to plugin API 2018-03-07 02:07:17 +00:00
Samuel Elliott 7e82ae8a85
Add comments 2018-03-07 02:05:38 +00:00
Samuel Elliott a8d60582d0
Update plugin API modals 2018-03-07 01:10:06 +00:00
Samuel Elliott a89d186730
Add comments 2018-03-06 21:58:09 +00:00
Samuel Elliott b7a769e883
Fixes 2018-03-06 01:59:53 +00:00
Samuel Elliott 07dde5b1fa
Add live adding schemes and fix PluginApi.Settings 2018-03-06 01:15:11 +00:00
Samuel Elliott 3ab4fd8a9a
Added base content class 2018-03-06 00:24:14 +00:00
Samuel Elliott 47637eca75
Fix settingsset.findSetting and arraysetting.items not being populated
- Changed plugin/theme event emitters to AsyncEventEmitter
2018-03-04 21:51:04 +00:00
Samuel Elliott 88b063ca8e
Add monkeypatch utility function 2018-03-04 20:21:18 +00:00
Samuel Elliott 1dffb1f40b
Add comments 2018-03-04 01:33:06 +00:00
Samuel Elliott 00d909f16c
Async setting and category events
- Async setting and category events
- Added deepfreeze utility
- Fix dropdown staying open after selecting an option
2018-03-04 00:22:05 +00:00
Samuel Elliott 91275f4332
CSS editor improvements 2018-03-03 23:36:17 +00:00
Samuel Elliott 976aecd8f2
Fix “css is not defined” 2018-03-03 01:47:50 +00:00
Samuel Elliott 9bc29cc66e
Add automatic recompile of SCSS in themes and the CSS editor when any file is changed 2018-03-03 01:44:39 +00:00
Samuel Elliott dc1acf140f
Recompile themes when settings have changed 2018-03-02 22:28:17 +00:00
Samuel Elliott bd72246715
Fix for eslint-plugin-vue and some things eslint detected 2018-03-02 21:24:55 +00:00
Samuel Elliott 2060a41f5d
Fix plugin API modal manager 2018-03-02 20:48:29 +00:00
Samuel Elliott fdc9330195
Add modal manager to plugin API 2018-03-02 20:19:59 +00:00
Samuel Elliott e94a7c50a4
Merge remote-tracking branch 'upstream/master' into settings
# Conflicts:
#	client/src/modules/thememanager.js
#	client/src/ui/components/BdSettings.vue
2018-03-02 19:47:29 +00:00
Samuel Elliott f9e278cc75
Updated plugin API
- Renamed Settings to InternalSettings
- Renamed getPlugins/getThemes to listPlugins/listThemes
- Add Utils to the plugin API
- Add CssUtils to the plugin API
- Add error handling on plugin start
- Changed ThemeManager.getConfigAsSCSS[Map] to accept a SettingsSet instead of an array of SettingsCategory objects
- Add examples to the example plugin
2018-03-02 19:42:17 +00:00
Samuel Elliott 3168012fde
Fix internal settings 2018-03-02 19:34:53 +00:00
Samuel Elliott 7954ebd764
Cleanup 2018-03-01 19:26:44 +00:00
Samuel Elliott 3437c36b87
Use settings structs 2018-03-01 19:00:24 +00:00
Samuel Elliott 5707da5f72
Fix plugin/theme descriptions 2018-03-01 01:52:08 +00:00
Samuel Elliott bff6057e0c
Add an animation when closing the settings menu content panel 2018-03-01 00:25:40 +00:00
Alexei Stukov ecf7f872cb
Merge pull request #150 from JsSucks/plugin-permissions
Initial plugin permissions
2018-02-28 21:39:23 +02:00
Jiiks deaa680aae Initial plugin permissions 2018-02-28 21:34:12 +02:00
Samuel Elliott cfdf3e0b4a Add relative file path resolution for themes 2018-02-28 18:14:35 +00:00
Jiiks 1e977fb407 Return raw colour value for colour picker 2018-02-28 07:46:48 +02:00
Samuel Elliott df0f823f1d
Fixes 2018-02-22 16:19:35 +00:00
Samuel Elliott ff3ef34784
Show error modal when reloading content 2018-02-21 18:06:44 +00:00
Samuel Elliott 4cfa4ee466
Content reloading 2018-02-21 17:46:27 +00:00
Samuel Elliott b9145b5b85
Add custom settings 2018-02-21 16:00:49 +00:00
Samuel Elliott eae9d67649
Add support for file settings in themes
Files are added to the SCSS variables as a list of maps like (data: [base64 encoded file contents], type: [file MIME type], url: [data uri]), …
2018-02-21 01:16:41 +00:00
Samuel Elliott 2eaafdb1ac
Async SCSS configuration 2018-02-21 00:14:06 +00:00
Samuel Elliott 7123f5f100
Add support for array settings in themes 2018-02-20 00:01:23 +00:00
Samuel Elliott 522e798669
Remove scss_raw setting option 2018-02-19 23:54:37 +00:00
Alexei Stukov d1d2610416
Merge pull request #139 from samuelthomas2774/add-object-logging
Add object logging handler
2018-02-15 23:02:02 +02:00
Samuel Elliott fadd0574ac
Fixed clearing compiler error when empty 2018-02-15 19:27:44 +00:00
Samuel Elliott c9a20b7fcf
Fix CSS editor not updating when empty 2018-02-15 19:14:08 +00:00
Samuel Elliott 48ee29b621
Indent with spaces 2018-02-15 17:09:06 +00:00
Jiiks 3a09dfb066 Store interval 2018-02-15 01:05:12 +02:00
Jiiks 877b59d0d3 k 2018-02-15 01:04:25 +02:00
Jiiks 5df556f96e add updater events 2018-02-15 01:01:52 +02:00
Jiiks 7ba43f8763 Emit update check end event 2018-02-14 22:28:55 +02:00
Jiiks 666960a9bd use rawgit foir now 2018-02-14 22:26:26 +02:00
Jiiks eb9e3dd4c6 Updater runs every 30 minutes 2018-02-14 22:15:27 +02:00
Samuel Elliott 9fb914fb70
Add settings schemes 2018-02-14 17:55:10 +00:00
Samuel Elliott 0cfb6d36ca
Rename new Settings.saveSettings to Settings.mergeSettings 2018-02-14 16:32:12 +00:00
Samuel Elliott dcb2704a28
Merge Modals.pluginSettings and Modals.themeSettings to a single function for both 2018-02-14 16:22:48 +00:00
Samuel Elliott 41b7906612
Use Utils.compare for internal settings 2018-02-14 16:11:26 +00:00
Samuel Elliott 1dd01e186b
Use Plugin/Theme.config 2018-02-14 15:45:10 +00:00
Samuel Elliott 0af22b21d4
Merge remote-tracking branch 'upstream/master' into add-generic-settings-modal
# Conflicts:
#	client/src/modules/plugin.js
#	tests/plugins/Example/config.json
2018-02-14 15:40:22 +00:00
Jiiks 16763c4a3e Some apis 2018-02-14 17:26:48 +02:00
Jiiks 57e73050cd User const 2018-02-14 15:36:18 +02:00
Jiiks df7d9fa0da User ContentConfig and bug fix 2018-02-14 15:35:35 +02:00
Jiiks b1f4fb637e add a base for content config object 2018-02-14 15:32:19 +02:00
Jiiks a37bccfbb2 Some commenting 2018-02-14 15:00:15 +02:00
Jiiks 287e2c9cd2 Some commenting 2018-02-14 14:55:06 +02:00
Jiiks b23a5ba7ac Pass deps to plugins directly. Should be used when a plugin must have a module to function. 2018-02-14 10:05:34 +02:00
Jiiks 4fba4049e1 Check that plugin dependencies exist 2018-02-14 09:56:55 +02:00
Samuel Elliott 8e71ee5a5c
Undo stuff from samuelthomas2774/add-setting-events 2018-02-14 01:49:23 +00:00
Samuel Elliott 145df5e7cc
Add Plugin.config 2018-02-14 01:45:41 +00:00
Samuel Elliott 4b9084bee4
Add generic settings modal and recursive compare 2018-02-14 01:40:47 +00:00
Samuel Elliott 227b2cc0d8
Fix events for themes and extmodules 2018-02-13 23:36:40 +00:00
Samuel Elliott 08271deea1
Add plugin settings events
- Moved the Theme class to it’s own file
2018-02-13 23:26:39 +00:00
Samuel Elliott d3c3de5a79
Merge remote-tracking branch 'upstream/master' into add-setting-events
# Conflicts:
#	client/src/modules/pluginapi.js
2018-02-13 23:07:46 +00:00
Samuel Elliott 9b9162346b
Add internal settings access to the plugin API 2018-02-13 22:37:24 +00:00
Samuel Elliott 210d085caf
Fix “cannot read property ‘width’ of undefined” 2018-02-13 22:33:17 +00:00
Samuel Elliott 8b85c829d6
Add setting updated event 2018-02-13 22:30:58 +00:00
Samuel Elliott 79af725f7f
Move error event struct 2018-02-13 22:28:58 +00:00
Jiiks 728aab8e95 Import modulemanager, add modules path to config, requires core rebuild 2018-02-14 00:24:04 +02:00
Jiiks 44832fb11a Exports 2018-02-14 00:15:46 +02:00
Jiiks fca1d49506 add class name to Plugin 2018-02-14 00:14:50 +02:00
Jiiks 842f0d6229 Move module stuff to it's own module 2018-02-14 00:14:26 +02:00
Jiiks 0ac1cf240d Ext module base and ext module manager base 2018-02-14 00:10:22 +02:00
Alexei Stukov 13e9c53520
Merge pull request #128 from samuelthomas2774/css-editor
Add SCSS and saving support to the CSS editor
2018-02-14 00:06:00 +02:00
Samuel Elliott c581ba1b75
Add save/restore of CSS editor window bounds 2018-02-13 21:03:48 +00:00
Samuel Elliott 729657f345
Add saving to the CSS editor 2018-02-13 20:06:04 +00:00
Samuel Elliott 5ca04f0652
Add SCSS support to the CSS editor 2018-02-13 19:56:01 +00:00
Samuel Elliott 1f85d4d2f4 Added Plugin/Theme.showSettingsModal 2018-02-13 17:39:31 +00:00
Samuel Elliott 8706e9ef0f Merge plugin/theme manager errors 2018-02-13 17:39:31 +00:00
Samuel Elliott 64ac3677b1 Add modal manager 2018-02-13 17:39:31 +00:00
Jiiks 66721d80b5 Rename require to bridge 2018-02-13 18:43:44 +02:00
Jiiks ebeae46991 Wait for all plugins to load before starting them 2018-02-13 18:22:48 +02:00
Jiiks 9a652e3748 add import to api 2018-02-13 18:18:01 +02:00
Jiiks 1f1d748687 Module loading 2018-02-13 18:06:36 +02:00
Samuel Elliott 7664266dfe
Add plugin exports 2018-02-12 22:51:22 +00:00
Alexei Stukov 663af3ca83
Merge pull request #123 from samuelthomas2774/add-core-settings-storage
Fixed setting loading
2018-02-12 22:12:06 +02:00
Samuel Elliott e793a8d380
Change Settings.get to return undefined when a setting isn’t found 2018-02-12 19:48:36 +00:00
Samuel Elliott 61c913b55b
Renamed Settings.getSetting to Settings.get 2018-02-12 19:31:50 +00:00
Samuel Elliott cc1aee6842
Fixed setting loading 2018-02-12 19:23:35 +00:00
Alexei Stukov 80ce233e6d
Merge pull request #122 from samuelthomas2774/add-core-settings-storage
Add core settings storage
2018-02-12 21:22:10 +02:00
Samuel Elliott 1f4c2df3ae
Add functions to get a set, category and setting value 2018-02-12 19:01:07 +00:00
Samuel Elliott 7e2fca9059
Add update hook 2018-02-12 17:54:40 +00:00
Samuel Elliott 09cff282cb
Update internal settings format and use a generic settings panel 2018-02-12 17:33:32 +00:00
Samuel Elliott 15f683d4c9
Fix Plugin.getSetting 2018-02-12 15:20:27 +00:00
Samuel Elliott 4dfe349802
Add core settings storage 2018-02-12 15:19:11 +00:00
Jiiks 194c1c1ff8 Change dropdown/radio structure 2018-02-12 04:54:15 +02:00
Jiiks f37058779a Radio functional 2018-02-12 02:48:44 +02:00
Jiiks 44b9450efa Dropdown functional 2018-02-12 02:44:12 +02:00
Jiiks 4e46675f94 add events for plugins 2018-02-12 01:04:07 +02:00
Jiiks 4a7a9ae1db add base plugin api and pass vendor to plugins 2018-02-12 00:07:23 +02:00
Samuel Elliott 14822ab51a Don't save unnecessary information with plugin/theme configuration 2018-02-11 21:30:35 +00:00
Jiiks 2453797400 add slider theme setting 2018-02-11 22:35:29 +02:00
Jiiks da702bd40a Ensure forward slashes 2018-02-11 22:25:15 +02:00
Samuel Elliott 8d70e9cd54 Add theme reloading 2018-02-11 20:12:15 +00:00
Samuel Elliott 9301ad627c Add SCSS theme configuration and compile caching 2018-02-11 19:31:24 +00:00
Jiiks fa9c0d2f94 Compile theme scss 2018-02-11 17:42:24 +02:00
Samuel Elliott d4c71452bc
Enable theme on start if enabled 2018-02-08 23:53:39 +00:00
Samuel Elliott 08b791e547
Add theme configuration and saving 2018-02-08 20:19:26 +00:00
Jiiks 0ec190612b add socket event structs 2018-02-08 00:03:39 +02:00
Jiiks 67f7111f66 Content manager error modal 2018-02-07 18:02:27 +02:00
Jiiks bf0c74b516 add error struct 2018-02-07 16:41:10 +02:00
Jiiks 51f5a93da2 add modal footer, styling and error modal on plugin load fail 2018-02-07 14:15:46 +02:00
Alexei Stukov 18c71fe7da
Merge pull request #100 from JsSucks/theme-manager
Theme manager
2018-02-05 19:02:31 +02:00
Jiiks e7b488316b Initial themes view with enable/disable functional 2018-02-05 18:48:03 +02:00
Samuel Elliott 6e4d6307e8
Save plugin config when enabled/disabled 2018-02-05 14:33:30 +00:00
Jiiks 2472743660 Theme manager base 2018-02-05 16:19:24 +02:00
Samuel Elliott 4c414e80d4
Removed 2s timeout before saving plugin config 2018-02-05 01:12:16 +00:00
Jiiks c73346292e Give plugins an option to set an icon 2018-02-04 23:19:05 +02:00
Samuel Elliott 1a95a7db4b
Fixed merging user config into default config 2018-02-04 20:17:22 +00:00
Jiiks a706e6f2fc Plugin setting saving 2018-02-04 21:06:08 +02:00
Jiiks 39da2ffdb8 Change how plugin config works and set z index for modals 2018-02-03 11:25:34 +02:00
Jiiks fe06db3d3c Functional plugin settings(almost) 2018-02-02 19:52:38 +02:00
Jiiks fce24e6a6a Eventhook base, structures, add lodash 2018-02-02 14:45:06 +02:00
Jiiks 600eed9dbc Eventlistener module base 2018-02-01 05:00:28 +02:00
Jiiks c92a293d31 Module manager 2018-02-01 04:36:47 +02:00
Jiiks 14de558305 Profilebadges. Implements #55 2018-01-31 17:45:25 +02:00
Jiiks 7d09b38963 Logger imports 2018-01-31 14:17:40 +02:00
Jiiks 235b373f1a Plugin Start/Stop switch 2018-01-31 10:32:20 +02:00
Jiiks e0df52b6ab Plugin reloading 2018-01-31 10:17:15 +02:00
Jiiks 1896a0d558 Content refresh 2018-01-31 00:21:06 +02:00
Jiiks 5ad5eeff64 New util functions and pluginmanager 2018-01-30 17:59:27 +02:00
Jiiks 2a8c6189e4 WebpackModules 2018-01-30 15:48:25 +02:00
Jiiks 9d7bc8a058 Utils 2018-01-30 15:38:34 +02:00
Jiiks cb8b448da9 params 2018-01-30 15:27:39 +02:00
Jiiks ca8a421a9c Globals module 2018-01-30 15:25:35 +02:00
Jiiks 85db5af655 Module resolves and base pluginmanager 2018-01-30 15:20:24 +02:00
Jiiks 6385c15236 Css editor view 2018-01-30 13:20:42 +02:00
Jiiks 031e93185a Css editor and ipc module 2018-01-30 13:14:16 +02:00
Jiiks 9c14b44d22 add settings and consistency 2018-01-30 12:01:24 +02:00
Jiiks 5cdd9948e8 Consistency, add settings component, trigger ready 2018-01-29 20:15:58 +02:00
Jiiks 88ad25ecc7 add events module 2018-01-29 19:46:24 +02:00
Jiiks 4c5ff964e6 Refactor base, add DOM 2018-01-29 19:34:31 +02:00
Alexei Stukov 28c573e5c5
Merge pull request #52 from samuelthomas2774/check-plugin-directory
Make sure plugins are directories
2018-01-28 19:10:22 +02:00
samogot e41b289eb5 Fix The "components" property should be above the "template" property [Error/vue/order-in-components] ESLint error
FYI: https://vuejs.org/v2/style-guide/#Component-instance-options-order-recommended
2018-01-27 16:58:48 +02:00
samogot 8e7c6b45b8 Fix 'reject' is not defined. [Error/no-undef] ESLint error
Fix Unnecessary semicolon. [Error/no-extra-semi] ESLint error
2018-01-27 16:58:37 +02:00
samogot 63c239f36f Extract global BetterDiscord.vendor into separate module, so it can be used through require 2018-01-27 16:40:35 +02:00
Samuel Elliott a27d586d38
Check if plugin directory is a directory 2018-01-25 16:49:02 +00:00
Samuel Elliott d11cfbcdaa
Fix FileUtils promises 2018-01-25 16:47:13 +00:00
Jiiks 7bd1fc2eea add tooltips 2018-01-25 15:26:42 +02:00
Jiiks 366deb02fc Remove test timeout 2018-01-25 14:54:02 +02:00
Jiiks 271101ba0b Open plugin dir when edit is clicked 2018-01-25 14:53:37 +02:00
Jiiks e66c1ce447 Hide settings button if plugin doesn't have any settings 2018-01-25 14:50:07 +02:00
Jiiks 5faaaa0276 add todo 2018-01-25 14:47:26 +02:00
Jiiks a509495b9f Functional plugin reload 2018-01-25 14:46:53 +02:00
Jiiks 0a05c0d68a Styles 2018-01-25 13:11:36 +02:00
Jiiks 88a89bbe4f add a loading animation to button 2018-01-25 13:03:12 +02:00
Jiiks a3f9b50c8c Plugin settings modal 2018-01-25 12:48:41 +02:00
Jiiks 9a8f2eddef Textinput for plugin settings 2018-01-25 11:21:48 +02:00
Jiiks 14a5331ecc Missing styles and base for text input 2018-01-25 11:01:20 +02:00
Jiiks cb542acbd0 Remove any inline styles 2018-01-25 09:52:15 +02:00
Jiiks d934bc4aff Up to date with master 2018-01-25 09:50:28 +02:00
Jiiks 38783631c5 Modal plugin settings, use [] instead of {} for plugin configs 2018-01-25 07:13:40 +02:00
Jiiks 87b07d0a0e Change how plugins are reloaded 2018-01-24 12:35:43 +02:00
Jiiks 71ac54911a Styling 2018-01-24 08:42:10 +02:00
Jiiks b3218d636a Styling, common components and add buttons to plugin card 2018-01-24 07:47:04 +02:00
Zack Rauen ff818d721d correct casing hopefully fixes #38 2018-01-23 19:05:03 -05:00
Jiiks 098ac8fb17 Make plugin switch actually do something 2018-01-23 18:19:45 +02:00
Jiiks 19b88b4be0 Fix plugin start/stop 2018-01-23 15:19:55 +02:00
Jiiks e9b15a33b1 add a version thing and fix css editor import 2018-01-23 13:58:04 +02:00