omegga 0.1.85 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +142 -62
- package/bin/omegga +10 -4
- package/dist/brickadia/config.d.ts +3 -0
- package/dist/brickadia/config.d.ts.map +1 -0
- package/dist/brickadia/config.js +61 -0
- package/dist/brickadia/config.js.map +1 -0
- package/dist/brickadia/presets.d.ts +65 -0
- package/dist/brickadia/presets.js +3 -0
- package/dist/brickadia/presets.js.map +1 -0
- package/dist/brickadia/server.d.ts +20 -0
- package/dist/brickadia/server.d.ts.map +1 -0
- package/dist/brickadia/server.js +188 -0
- package/dist/brickadia/server.js.map +1 -0
- package/dist/brickadia/types.d.ts +45 -0
- package/dist/brickadia/types.d.ts.map +1 -0
- package/dist/brickadia/types.js +3 -0
- package/dist/brickadia/types.js.map +1 -0
- package/dist/cli/auth.d.ts +20 -0
- package/dist/cli/auth.d.ts.map +1 -0
- package/dist/cli/auth.js +115 -0
- package/dist/cli/auth.js.map +1 -0
- package/dist/cli/config.d.ts +10 -0
- package/dist/cli/config.d.ts.map +1 -0
- package/dist/cli/config.js +72 -0
- package/dist/cli/config.js.map +1 -0
- package/dist/cli/index.d.ts +20 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +15 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/installer.d.ts +1 -0
- package/dist/cli/installer.d.ts.map +1 -0
- package/dist/cli/installer.js +55 -0
- package/dist/cli/installer.js.map +1 -0
- package/dist/cli/plugin.d.ts +11 -0
- package/dist/cli/plugin.d.ts.map +1 -0
- package/dist/cli/plugin.js +598 -0
- package/dist/cli/plugin.js.map +1 -0
- package/dist/cli/terminal.d.ts +34 -0
- package/dist/cli/terminal.d.ts.map +1 -0
- package/dist/cli/terminal.js +395 -0
- package/dist/cli/terminal.js.map +1 -0
- package/dist/config/authorizer.d.ts +2 -0
- package/dist/config/authorizer.d.ts.map +1 -0
- package/dist/config/authorizer.js +38 -0
- package/dist/config/authorizer.js.map +1 -0
- package/dist/config/formats/format_js.d.ts +3 -0
- package/dist/config/formats/format_js.d.ts.map +1 -0
- package/dist/config/formats/format_js.js +10 -0
- package/dist/config/formats/format_js.js.map +1 -0
- package/dist/config/formats/format_yml.d.ts +3 -0
- package/dist/config/formats/format_yml.d.ts.map +1 -0
- package/dist/config/formats/format_yml.js +14 -0
- package/dist/config/formats/format_yml.js.map +1 -0
- package/dist/config/index.d.ts +18 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +86 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/reader.d.ts +3 -0
- package/dist/config/reader.d.ts.map +1 -0
- package/dist/config/reader.js +30 -0
- package/dist/config/reader.js.map +1 -0
- package/dist/config/types.d.ts +37 -0
- package/dist/config/types.d.ts.map +1 -0
- package/dist/config/types.js +3 -0
- package/dist/config/types.js.map +1 -0
- package/dist/config/validator.d.ts +6 -0
- package/dist/config/validator.d.ts.map +1 -0
- package/dist/config/validator.js +26 -0
- package/dist/config/validator.js.map +1 -0
- package/dist/config/writer.d.ts +3 -0
- package/dist/config/writer.d.ts.map +1 -0
- package/dist/config/writer.js +25 -0
- package/dist/config/writer.js.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.js +55 -0
- package/dist/index.js.map +1 -0
- package/dist/info/default_commands.json +28 -0
- package/dist/lib.d.ts +21 -0
- package/dist/lib.d.ts.map +1 -0
- package/dist/lib.js +54 -0
- package/dist/lib.js.map +1 -0
- package/dist/logger.d.ts +41 -0
- package/dist/logger.js +67 -0
- package/dist/logger.js.map +1 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +284 -0
- package/dist/main.js.map +1 -0
- package/dist/omegga/auth.d.ts +6 -0
- package/dist/omegga/auth.d.ts.map +1 -0
- package/dist/omegga/auth.js +139 -0
- package/dist/omegga/auth.js.map +1 -0
- package/dist/omegga/commandInjector.d.ts +35 -0
- package/dist/omegga/commandInjector.d.ts.map +1 -0
- package/dist/omegga/commandInjector.js +234 -0
- package/dist/omegga/commandInjector.js.map +1 -0
- package/dist/omegga/index.d.ts +7 -0
- package/dist/omegga/index.d.ts.map +1 -0
- package/dist/omegga/index.js +43 -0
- package/dist/omegga/index.js.map +1 -0
- package/dist/omegga/logWrangler.d.ts +32 -0
- package/dist/omegga/logWrangler.d.ts.map +1 -0
- package/dist/omegga/logWrangler.js +279 -0
- package/dist/omegga/logWrangler.js.map +1 -0
- package/dist/omegga/matchers/auth.d.ts +9 -0
- package/dist/omegga/matchers/auth.d.ts.map +1 -0
- package/dist/omegga/matchers/auth.js +53 -0
- package/dist/omegga/matchers/auth.js.map +1 -0
- package/dist/omegga/matchers/chat.d.ts +9 -0
- package/dist/omegga/matchers/chat.d.ts.map +1 -0
- package/dist/omegga/matchers/chat.js +68 -0
- package/dist/omegga/matchers/chat.js.map +1 -0
- package/dist/omegga/matchers/command.d.ts +7 -0
- package/dist/omegga/matchers/command.d.ts.map +1 -0
- package/dist/omegga/matchers/command.js +39 -0
- package/dist/omegga/matchers/command.js.map +1 -0
- package/dist/omegga/matchers/exit.d.ts +3 -0
- package/dist/omegga/matchers/exit.d.ts.map +1 -0
- package/dist/omegga/matchers/exit.js +21 -0
- package/dist/omegga/matchers/exit.js.map +1 -0
- package/dist/omegga/matchers/index.d.ts +3 -0
- package/dist/omegga/matchers/index.d.ts.map +1 -0
- package/dist/omegga/matchers/index.js +39 -0
- package/dist/omegga/matchers/index.js.map +1 -0
- package/dist/omegga/matchers/init.d.ts +3 -0
- package/dist/omegga/matchers/init.d.ts.map +1 -0
- package/dist/omegga/matchers/init.js +26 -0
- package/dist/omegga/matchers/init.js.map +1 -0
- package/dist/omegga/matchers/interact.d.ts +4 -0
- package/dist/omegga/matchers/interact.js +39 -0
- package/dist/omegga/matchers/interact.js.map +1 -0
- package/dist/omegga/matchers/join.d.ts +4 -0
- package/dist/omegga/matchers/join.d.ts.map +1 -0
- package/dist/omegga/matchers/join.js +95 -0
- package/dist/omegga/matchers/join.js.map +1 -0
- package/dist/omegga/matchers/leave.d.ts +4 -0
- package/dist/omegga/matchers/leave.d.ts.map +1 -0
- package/dist/omegga/matchers/leave.js +59 -0
- package/dist/omegga/matchers/leave.js.map +1 -0
- package/dist/omegga/matchers/mapChange.d.ts +3 -0
- package/dist/omegga/matchers/mapChange.d.ts.map +1 -0
- package/dist/omegga/matchers/mapChange.js +38 -0
- package/dist/omegga/matchers/mapChange.js.map +1 -0
- package/dist/omegga/matchers/types.d.ts +5 -0
- package/dist/omegga/matchers/types.d.ts.map +1 -0
- package/dist/omegga/matchers/types.js +7 -0
- package/dist/omegga/matchers/types.js.map +1 -0
- package/dist/omegga/matchers/version.d.ts +3 -0
- package/dist/omegga/matchers/version.d.ts.map +1 -0
- package/dist/omegga/matchers/version.js +45 -0
- package/dist/omegga/matchers/version.js.map +1 -0
- package/dist/omegga/player.d.ts +71 -0
- package/dist/omegga/player.d.ts.map +1 -0
- package/dist/omegga/player.js +442 -0
- package/dist/omegga/player.js.map +1 -0
- package/dist/omegga/plugin/plugin_jsonrpc_stdio.d.ts +23 -0
- package/dist/omegga/plugin/plugin_jsonrpc_stdio.d.ts.map +1 -0
- package/dist/omegga/plugin/plugin_jsonrpc_stdio.js +441 -0
- package/dist/omegga/plugin/plugin_jsonrpc_stdio.js.map +1 -0
- package/dist/omegga/plugin/plugin_node_safe/proxyOmegga.d.ts +129 -0
- package/dist/omegga/plugin/plugin_node_safe/proxyOmegga.d.ts.map +1 -0
- package/dist/omegga/plugin/plugin_node_safe/proxyOmegga.js +260 -0
- package/dist/omegga/plugin/plugin_node_safe/proxyOmegga.js.map +1 -0
- package/dist/omegga/plugin/plugin_node_safe/worker.d.ts +1 -0
- package/dist/omegga/plugin/plugin_node_safe/worker.d.ts.map +1 -0
- package/dist/omegga/plugin/plugin_node_safe/worker.js +289 -0
- package/dist/omegga/plugin/plugin_node_safe/worker.js.map +1 -0
- package/dist/omegga/plugin/plugin_node_safe.d.ts +24 -0
- package/dist/omegga/plugin/plugin_node_safe.d.ts.map +1 -0
- package/dist/omegga/plugin/plugin_node_safe.js +397 -0
- package/dist/omegga/plugin/plugin_node_safe.js.map +1 -0
- package/dist/omegga/plugin/plugin_node_unsafe.d.ts +13 -0
- package/dist/omegga/plugin/plugin_node_unsafe.d.ts.map +1 -0
- package/dist/omegga/plugin/plugin_node_unsafe.js +178 -0
- package/dist/omegga/plugin/plugin_node_unsafe.js.map +1 -0
- package/dist/omegga/plugin.d.ts +86 -0
- package/dist/omegga/plugin.d.ts.map +1 -0
- package/dist/omegga/plugin.js +458 -0
- package/dist/omegga/plugin.js.map +1 -0
- package/dist/omegga/server.d.ts +149 -0
- package/dist/omegga/server.d.ts.map +1 -0
- package/dist/omegga/server.js +601 -0
- package/dist/omegga/server.js.map +1 -0
- package/dist/omegga/types.d.ts +48 -0
- package/dist/omegga/types.d.ts.map +1 -0
- package/dist/omegga/types.js +3 -0
- package/dist/omegga/types.js.map +1 -0
- package/dist/omegga/wrapper.d.ts +22 -0
- package/dist/omegga/wrapper.d.ts.map +1 -0
- package/dist/omegga/wrapper.js +75 -0
- package/dist/omegga/wrapper.js.map +1 -0
- package/dist/omeggaplugin.d.ts +1 -0
- package/dist/omeggaplugin.js +4 -0
- package/dist/omeggaplugin.js.map +1 -0
- package/dist/plugin.d.ts +781 -0
- package/dist/plugin.js +41 -0
- package/dist/plugin.js.map +1 -0
- package/dist/softconfig.d.ts +51 -0
- package/dist/softconfig.d.ts.map +1 -0
- package/dist/softconfig.js +82 -0
- package/dist/softconfig.js.map +1 -0
- package/dist/util/brick/checkBounds.d.ts +8 -0
- package/dist/util/brick/checkBounds.d.ts.map +1 -0
- package/dist/util/brick/checkBounds.js +22 -0
- package/dist/util/brick/checkBounds.js.map +1 -0
- package/dist/util/brick/constants.d.ts +18 -0
- package/dist/util/brick/constants.d.ts.map +1 -0
- package/dist/util/brick/constants.js +184 -0
- package/dist/util/brick/constants.js.map +1 -0
- package/dist/util/brick/getBounds.d.ts +4 -0
- package/dist/util/brick/getBounds.d.ts.map +1 -0
- package/dist/util/brick/getBounds.js +39 -0
- package/dist/util/brick/getBounds.js.map +1 -0
- package/dist/util/brick/getBrickSize.d.ts +3 -0
- package/dist/util/brick/getBrickSize.d.ts.map +1 -0
- package/dist/util/brick/getBrickSize.js +12 -0
- package/dist/util/brick/getBrickSize.js.map +1 -0
- package/dist/util/brick/getScaleAxis.d.ts +3 -0
- package/dist/util/brick/getScaleAxis.d.ts.map +1 -0
- package/dist/util/brick/getScaleAxis.js +38 -0
- package/dist/util/brick/getScaleAxis.js.map +1 -0
- package/dist/util/brick/index.d.ts +13 -0
- package/dist/util/brick/index.d.ts.map +1 -0
- package/dist/util/brick/index.js +29 -0
- package/dist/util/brick/index.js.map +1 -0
- package/dist/util/brick/rotate.d.ts +17 -0
- package/dist/util/brick/rotate.d.ts.map +1 -0
- package/dist/util/brick/rotate.js +38 -0
- package/dist/util/brick/rotate.js.map +1 -0
- package/dist/util/brick/setOwnership.d.ts +12 -0
- package/dist/util/brick/setOwnership.d.ts.map +1 -0
- package/dist/util/brick/setOwnership.js +21 -0
- package/dist/util/brick/setOwnership.js.map +1 -0
- package/dist/util/chat.d.ts +23 -0
- package/dist/util/chat.d.ts.map +1 -0
- package/dist/util/chat.js +50 -0
- package/dist/util/chat.js.map +1 -0
- package/dist/util/color.d.ts +13 -0
- package/dist/util/color.d.ts.map +1 -0
- package/dist/util/color.js +130 -0
- package/dist/util/color.js.map +1 -0
- package/dist/util/file.d.ts +5 -0
- package/dist/util/file.d.ts.map +1 -0
- package/dist/util/file.js +114 -0
- package/dist/util/file.js.map +1 -0
- package/dist/util/index.d.ts +162 -0
- package/dist/util/index.d.ts.map +1 -0
- package/dist/util/index.js +92 -0
- package/dist/util/index.js.map +1 -0
- package/dist/util/map.d.ts +6 -0
- package/dist/util/map.d.ts.map +1 -0
- package/dist/util/map.js +26 -0
- package/dist/util/map.js.map +1 -0
- package/dist/util/pattern.d.ts +1 -0
- package/dist/util/pattern.d.ts.map +1 -0
- package/dist/util/pattern.js +11 -0
- package/dist/util/pattern.js.map +1 -0
- package/dist/util/time.d.ts +4 -0
- package/dist/util/time.d.ts.map +1 -0
- package/dist/util/time.js +41 -0
- package/dist/util/time.js.map +1 -0
- package/dist/util/uuid.d.ts +2 -0
- package/dist/util/uuid.d.ts.map +1 -0
- package/dist/util/uuid.js +8 -0
- package/dist/util/uuid.js.map +1 -0
- package/dist/util/wsl.d.ts +1 -0
- package/dist/util/wsl.d.ts.map +1 -0
- package/dist/util/wsl.js +14 -0
- package/dist/util/wsl.js.map +1 -0
- package/dist/webserver/backend/api.d.ts +3 -0
- package/dist/webserver/backend/api.d.ts.map +1 -0
- package/dist/webserver/backend/api.js +685 -0
- package/dist/webserver/backend/api.js.map +1 -0
- package/dist/webserver/backend/calendar.d.ts +5 -0
- package/dist/webserver/backend/calendar.d.ts.map +1 -0
- package/dist/webserver/backend/calendar.js +21 -0
- package/dist/webserver/backend/calendar.js.map +1 -0
- package/dist/webserver/backend/database.d.ts +149 -0
- package/dist/webserver/backend/database.d.ts.map +1 -0
- package/dist/webserver/backend/database.js +575 -0
- package/dist/webserver/backend/database.js.map +1 -0
- package/dist/webserver/backend/index.d.ts +31 -0
- package/dist/webserver/backend/index.d.ts.map +1 -0
- package/dist/webserver/backend/index.js +189 -0
- package/dist/webserver/backend/index.js.map +1 -0
- package/dist/webserver/backend/metrics.d.ts +3 -0
- package/dist/webserver/backend/metrics.d.ts.map +1 -0
- package/dist/webserver/backend/metrics.js +203 -0
- package/dist/webserver/backend/metrics.js.map +1 -0
- package/dist/webserver/backend/types.d.ts +115 -0
- package/dist/webserver/backend/types.d.ts.map +1 -0
- package/dist/webserver/backend/types.js +3 -0
- package/dist/webserver/backend/types.js.map +1 -0
- package/dist/webserver/backend/util.d.ts +2 -0
- package/dist/webserver/backend/util.d.ts.map +1 -0
- package/dist/webserver/backend/util.js +78 -0
- package/dist/webserver/backend/util.js.map +1 -0
- package/dist/webserver/index.d.ts +2 -0
- package/dist/webserver/index.d.ts.map +1 -0
- package/dist/webserver/index.js +9 -0
- package/dist/webserver/index.js.map +1 -0
- package/{src/webserver/frontend → frontend}/app.html +0 -0
- package/{src/webserver/frontend → frontend}/assets/fonts/GlacialIndifferenceBold.ttf +0 -0
- package/{src/webserver/frontend → frontend}/assets/fonts/GlacialIndifferenceItalic.otf +0 -0
- package/{src/webserver/frontend → frontend}/assets/fonts/GlacialIndifferenceMedium.otf +0 -0
- package/{src/webserver/frontend → frontend}/assets/fonts/GlacialIndifferenceRegular.ttf +0 -0
- package/{src/webserver/frontend → frontend}/assets/fonts/RobotoBold.ttf +0 -0
- package/{src/webserver/frontend → frontend}/assets/fonts/RobotoItalic.ttf +0 -0
- package/{src/webserver/frontend → frontend}/assets/fonts/RobotoRegular.ttf +0 -0
- package/{src/webserver/frontend → frontend}/assets/img/auth_bg.webp +0 -0
- package/{src/webserver/frontend → frontend}/assets/img/dark_bg.webp +0 -0
- package/{src/webserver/frontend → frontend}/assets/img/turkey.webp +0 -0
- package/{src/webserver/frontend → frontend}/auth.html +0 -0
- package/index.js +10 -2
- package/package.json +44 -16
- package/public/app.bundle.js +537 -73
- package/public/app.bundle.js.map +1 -1
- package/public/app.css +727 -2
- package/public/app.css.map +1 -1
- package/public/auth.bundle.js +18 -18
- package/public/auth.bundle.js.map +1 -1
- package/public/auth.css +364 -2
- package/public/auth.css.map +1 -1
- package/templates/rpc/README.md +29 -0
- package/templates/rpc/doc.json +7 -0
- package/templates/rpc/omegga_plugin +0 -0
- package/templates/rpc/plugin.json +4 -0
- package/templates/rpc/setup.sh +3 -0
- package/templates/safe/README.md +29 -0
- package/templates/safe/access.json +1 -0
- package/templates/safe/doc.json +7 -0
- package/templates/safe/omegga.plugin.js +20 -0
- package/templates/safe/plugin.json +4 -0
- package/templates/safe/setup.sh +4 -0
- package/templates/safe-ts/.gitignore.rename +3 -0
- package/templates/safe-ts/README.md +29 -0
- package/templates/safe-ts/access.json +1 -0
- package/templates/safe-ts/doc.json +7 -0
- package/templates/safe-ts/omegga.d.ts +1311 -0
- package/templates/safe-ts/omegga.plugin.ts +29 -0
- package/templates/safe-ts/plugin.json +4 -0
- package/templates/safe-ts/setup.sh +4 -0
- package/templates/safe-ts/tsconfig.json +10 -0
- package/templates/unsafe/README.md +29 -0
- package/templates/unsafe/doc.json +7 -0
- package/templates/unsafe/omegga.main.js +15 -0
- package/templates/unsafe/plugin.json +4 -0
- package/templates/unsafe/setup.sh +4 -0
- package/.babelrc.json +0 -5
- package/.github/workflows/lint.yml +0 -26
- package/.prettierrc +0 -7
- package/.vscode/extensions.json +0 -5
- package/src/OMEGGA_LEGACY_INSTALL +0 -44
- package/src/brickadia/config.js +0 -42
- package/src/brickadia/server.js +0 -227
- package/src/cli/auth.js +0 -104
- package/src/cli/config.js +0 -77
- package/src/cli/index.js +0 -6
- package/src/cli/installer.js +0 -65
- package/src/cli/plugin.js +0 -575
- package/src/cli/terminal.js +0 -466
- package/src/config/authorizer.js +0 -37
- package/src/config/formats/format_js.js +0 -6
- package/src/config/formats/format_yml.js +0 -8
- package/src/config/index.js +0 -81
- package/src/config/reader.js +0 -27
- package/src/config/validator.js +0 -32
- package/src/config/writer.js +0 -20
- package/src/info/default_commands.json +0 -26
- package/src/lib.js +0 -23
- package/src/main.js +0 -332
- package/src/omegga/auth.js +0 -138
- package/src/omegga/commandInjector.js +0 -228
- package/src/omegga/index.js +0 -22
- package/src/omegga/logWrangler.js +0 -323
- package/src/omegga/matchers/auth.js +0 -49
- package/src/omegga/matchers/chat.js +0 -73
- package/src/omegga/matchers/command.js +0 -39
- package/src/omegga/matchers/exit.js +0 -19
- package/src/omegga/matchers/init.js +0 -23
- package/src/omegga/matchers/join.js +0 -115
- package/src/omegga/matchers/leave.js +0 -58
- package/src/omegga/matchers/mapChange.js +0 -37
- package/src/omegga/matchers/version.js +0 -45
- package/src/omegga/player.js +0 -585
- package/src/omegga/plugin/plugin_jsonrpc_stdio.js +0 -526
- package/src/omegga/plugin/plugin_node_safe/proxyOmegga.js +0 -117
- package/src/omegga/plugin/plugin_node_safe/worker.js +0 -238
- package/src/omegga/plugin/plugin_node_safe.js +0 -473
- package/src/omegga/plugin/plugin_node_unsafe.js +0 -177
- package/src/omegga/plugin.js +0 -565
- package/src/omegga/server.js +0 -658
- package/src/omegga/wrapper.js +0 -62
- package/src/softconfig.js +0 -64
- package/src/util/brick/checkBounds.js +0 -22
- package/src/util/brick/constants.js +0 -185
- package/src/util/brick/getBounds.js +0 -36
- package/src/util/brick/getBrickSize.js +0 -9
- package/src/util/brick/getScaleAxis.js +0 -31
- package/src/util/brick/index.js +0 -9
- package/src/util/brick/rotate.js +0 -43
- package/src/util/brick/setOwnership.js +0 -20
- package/src/util/chat.js +0 -28
- package/src/util/color.js +0 -143
- package/src/util/file.js +0 -119
- package/src/util/index.js +0 -28
- package/src/util/map.js +0 -28
- package/src/util/pattern.js +0 -14
- package/src/util/time.js +0 -46
- package/src/util/uuid.js +0 -8
- package/src/util/wsl.js +0 -9
- package/src/webserver/backend/api.js +0 -795
- package/src/webserver/backend/calendar.js +0 -15
- package/src/webserver/backend/database.js +0 -725
- package/src/webserver/backend/index.js +0 -206
- package/src/webserver/backend/metrics.js +0 -148
- package/src/webserver/backend/util.js +0 -75
- package/src/webserver/frontend/.eslintrc.yml +0 -26
- package/src/webserver/frontend/app.js +0 -78
- package/src/webserver/frontend/auth.js +0 -16
- package/src/webserver/frontend/components/Background.vue +0 -83
- package/src/webserver/frontend/components/Button.vue +0 -105
- package/src/webserver/frontend/components/ChatEntry.vue +0 -107
- package/src/webserver/frontend/components/ChatTime.vue +0 -40
- package/src/webserver/frontend/components/Dimmer.vue +0 -43
- package/src/webserver/frontend/components/Dropdown.vue +0 -145
- package/src/webserver/frontend/components/Footer.vue +0 -29
- package/src/webserver/frontend/components/Header.vue +0 -27
- package/src/webserver/frontend/components/InfiniteScroll.vue +0 -51
- package/src/webserver/frontend/components/Input.vue +0 -93
- package/src/webserver/frontend/components/ListInput.vue +0 -105
- package/src/webserver/frontend/components/Loader.vue +0 -98
- package/src/webserver/frontend/components/MainMenuButton.vue +0 -83
- package/src/webserver/frontend/components/Modal.vue +0 -44
- package/src/webserver/frontend/components/NavBar.vue +0 -24
- package/src/webserver/frontend/components/PlayerDropdown.vue +0 -210
- package/src/webserver/frontend/components/PopoutContent.vue +0 -32
- package/src/webserver/frontend/components/RoleDropdown.vue +0 -157
- package/src/webserver/frontend/components/Scroll.vue +0 -33
- package/src/webserver/frontend/components/Toggle.vue +0 -91
- package/src/webserver/frontend/components/index.js +0 -33
- package/src/webserver/frontend/css/font.scss +0 -53
- package/src/webserver/frontend/css/mixins.scss +0 -49
- package/src/webserver/frontend/css/style.scss +0 -166
- package/src/webserver/frontend/css/theme.scss +0 -64
- package/src/webserver/frontend/partials/NavHeader.vue +0 -55
- package/src/webserver/frontend/partials/Page.vue +0 -40
- package/src/webserver/frontend/partials/PageContent.vue +0 -31
- package/src/webserver/frontend/partials/SideNav.vue +0 -115
- package/src/webserver/frontend/partials/index.js +0 -4
- package/src/webserver/frontend/router.js +0 -83
- package/src/webserver/frontend/views/Auth.vue +0 -190
- package/src/webserver/frontend/views/History.vue +0 -462
- package/src/webserver/frontend/views/Home.vue +0 -251
- package/src/webserver/frontend/views/Main.vue +0 -69
- package/src/webserver/frontend/views/NotFound.vue +0 -10
- package/src/webserver/frontend/views/Players.vue +0 -425
- package/src/webserver/frontend/views/PlayersInspector.vue +0 -538
- package/src/webserver/frontend/views/Plugins.vue +0 -217
- package/src/webserver/frontend/views/PluginsInspector.vue +0 -418
- package/src/webserver/frontend/views/Server.vue +0 -167
- package/src/webserver/frontend/views/Users.vue +0 -538
- package/src/webserver/frontend/widgets/Chat.vue +0 -124
- package/src/webserver/frontend/widgets/Status.vue +0 -91
- package/src/webserver/frontend/widgets/index.js +0 -2
- package/src/webserver/frontend/widgets/tooltip.js +0 -108
- package/src/webserver/index.js +0 -4
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
<style lang="scss" scoped>
|
|
2
|
-
@import '../css/style';
|
|
3
|
-
|
|
4
|
-
.plugins-container {
|
|
5
|
-
display: flex;
|
|
6
|
-
align-items: stretch;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.plugins-list-container, .plugin-inspector-container {
|
|
10
|
-
@include column-container;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.plugins-list-container {
|
|
14
|
-
margin-right: 16px;
|
|
15
|
-
|
|
16
|
-
.input {
|
|
17
|
-
max-width: 300px;
|
|
18
|
-
margin-right: 8px;
|
|
19
|
-
flex: 1;
|
|
20
|
-
width: 100%;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.plugins-list {
|
|
25
|
-
@include column-container;
|
|
26
|
-
margin-top: 8px;
|
|
27
|
-
|
|
28
|
-
.plugin-item {
|
|
29
|
-
background-color: $br-button-normal;
|
|
30
|
-
margin-bottom: 8px;
|
|
31
|
-
margin-right: 8px;
|
|
32
|
-
display: flex;
|
|
33
|
-
align-items: center;
|
|
34
|
-
height: 48px;
|
|
35
|
-
font-size: 20px;
|
|
36
|
-
color: white;
|
|
37
|
-
cursor: pointer;
|
|
38
|
-
font-weight: bold;
|
|
39
|
-
text-decoration: none;
|
|
40
|
-
|
|
41
|
-
&:hover, .router-link-active { background-color: $br-element-hover; }
|
|
42
|
-
&:active, &.disabled { background-color: $br-element-pressed; }
|
|
43
|
-
|
|
44
|
-
.icon {
|
|
45
|
-
@include center;
|
|
46
|
-
height: 32px;
|
|
47
|
-
width: 32px;
|
|
48
|
-
margin-left: 8px;
|
|
49
|
-
margin-right: 8px;
|
|
50
|
-
|
|
51
|
-
&.running { background-color: $br-main-normal; }
|
|
52
|
-
&.bugged { background-color: $br-warn-normal; }
|
|
53
|
-
&.broken { background-color: $br-error-normal; }
|
|
54
|
-
&.disabled { background-color: $br-bg-primary; }
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
.plugin-inspector {
|
|
61
|
-
@include column;
|
|
62
|
-
background-color: $br-element-popout-bg;
|
|
63
|
-
flex: 1;
|
|
64
|
-
position: relative;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
@media screen and (max-width: 600px) {
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
</style>
|
|
72
|
-
|
|
73
|
-
<template>
|
|
74
|
-
<page>
|
|
75
|
-
<nav-header title="Plugins">
|
|
76
|
-
<span style="flex: 1"/>
|
|
77
|
-
<br-button warn
|
|
78
|
-
:disabled="reloading"
|
|
79
|
-
@click="reloadPlugins"
|
|
80
|
-
data-tooltip="Reload all plugins, this may clear current plugin progress"
|
|
81
|
-
>
|
|
82
|
-
<RefreshAlertIcon />
|
|
83
|
-
Reload Plugins
|
|
84
|
-
</br-button>
|
|
85
|
-
</nav-header>
|
|
86
|
-
<page-content>
|
|
87
|
-
<side-nav :active="$route.name" />
|
|
88
|
-
<div class="generic-container plugins-container">
|
|
89
|
-
<div class="plugins-list-container">
|
|
90
|
-
<br-navbar>
|
|
91
|
-
<br-input placeholder="Search Plugins..." v-model="search" />
|
|
92
|
-
<span style="flex: 1"/>
|
|
93
|
-
<br-button icon normal
|
|
94
|
-
data-tooltip="Refresh plugin list"
|
|
95
|
-
@click="getPlugins"
|
|
96
|
-
>
|
|
97
|
-
<RotateIcon />
|
|
98
|
-
</br-button>
|
|
99
|
-
</br-navbar>
|
|
100
|
-
<div class="plugins-list">
|
|
101
|
-
<br-scroll>
|
|
102
|
-
<div is="router-link" v-for="plugin in plugins"
|
|
103
|
-
v-if="matches(plugin)"
|
|
104
|
-
:to="'/plugins/' + plugin.path"
|
|
105
|
-
:key="plugin.path"
|
|
106
|
-
:data-tooltip="plugin.documentation && plugin.documentation.description"
|
|
107
|
-
class="plugin-item"
|
|
108
|
-
>
|
|
109
|
-
<component :is="plugin.icon" :class="[plugin.status]" :data-tooltip="plugin.tooltip" />
|
|
110
|
-
{{plugin.name}}
|
|
111
|
-
</div>
|
|
112
|
-
</br-scroll>
|
|
113
|
-
<br-loader :active="loading" size="huge">Loading Plugins</br-loader>
|
|
114
|
-
</div>
|
|
115
|
-
</div>
|
|
116
|
-
<div class="plugin-inspector-container">
|
|
117
|
-
<br-navbar>
|
|
118
|
-
{{selectedPlugin}}
|
|
119
|
-
</br-navbar>
|
|
120
|
-
<div class="plugin-inspector">
|
|
121
|
-
<router-view :key="$route.params.id" />
|
|
122
|
-
</div>
|
|
123
|
-
</div>
|
|
124
|
-
</div>
|
|
125
|
-
</page-content>
|
|
126
|
-
</page>
|
|
127
|
-
</template>
|
|
128
|
-
|
|
129
|
-
<script>
|
|
130
|
-
import RotateIcon from 'vue-tabler-icons/icons/RotateIcon';
|
|
131
|
-
import PowerIcon from 'vue-tabler-icons/icons/PowerIcon';
|
|
132
|
-
import AlertCircleIcon from 'vue-tabler-icons/icons/AlertCircleIcon';
|
|
133
|
-
import BugIcon from 'vue-tabler-icons/icons/BugIcon';
|
|
134
|
-
import CircleCheckIcon from 'vue-tabler-icons/icons/CircleCheckIcon';
|
|
135
|
-
import RefreshAlertIcon from 'vue-tabler-icons/icons/RefreshAlertIcon';
|
|
136
|
-
|
|
137
|
-
const updatePluginState = p => {
|
|
138
|
-
p.state = (p.isLoaded ? 2 : 0) + (p.isEnabled ? 1 : 0);
|
|
139
|
-
p.status = [
|
|
140
|
-
'disabled',
|
|
141
|
-
'broken',
|
|
142
|
-
'bugged',
|
|
143
|
-
'running',
|
|
144
|
-
][p.state];
|
|
145
|
-
p.tooltip = [
|
|
146
|
-
'Plugin is disabled',
|
|
147
|
-
'Plugin is enabled but not running',
|
|
148
|
-
'Plugin is running but not enabled',
|
|
149
|
-
'Plugin is running',
|
|
150
|
-
][p.state];
|
|
151
|
-
p.icon = [
|
|
152
|
-
'PowerIcon',
|
|
153
|
-
'AlertCircleIcon',
|
|
154
|
-
'BugIcon',
|
|
155
|
-
'CircleCheckIcon',
|
|
156
|
-
][p.state];
|
|
157
|
-
};
|
|
158
|
-
|
|
159
|
-
export default {
|
|
160
|
-
components: { RotateIcon, PowerIcon, AlertCircleIcon, BugIcon, CircleCheckIcon, RefreshAlertIcon },
|
|
161
|
-
created() {
|
|
162
|
-
this.$$emit('subscribe', 'plugins');
|
|
163
|
-
this.getPlugins();
|
|
164
|
-
},
|
|
165
|
-
beforeDestroy() {
|
|
166
|
-
this.$$emit('unsubscribe', 'plugins');
|
|
167
|
-
},
|
|
168
|
-
methods: {
|
|
169
|
-
matches(p) {
|
|
170
|
-
return p.name.includes(this.search);
|
|
171
|
-
},
|
|
172
|
-
|
|
173
|
-
// get a list of plugins, build some ui related info
|
|
174
|
-
async getPlugins() {
|
|
175
|
-
this.loading = true;
|
|
176
|
-
const plugins = await this.$$request('plugins.list');
|
|
177
|
-
this.loading = false;
|
|
178
|
-
for (const p of plugins) {
|
|
179
|
-
updatePluginState(p);
|
|
180
|
-
}
|
|
181
|
-
this.plugins = plugins;
|
|
182
|
-
},
|
|
183
|
-
|
|
184
|
-
// reload all plugins
|
|
185
|
-
async reloadPlugins() {
|
|
186
|
-
this.reloading = true;
|
|
187
|
-
await this.$$request('plugins.reload');
|
|
188
|
-
this.reloading = false;
|
|
189
|
-
}
|
|
190
|
-
},
|
|
191
|
-
sockets: {
|
|
192
|
-
plugin([path, info]) {
|
|
193
|
-
const plugin = this.plugins.find(p => p.path === path);
|
|
194
|
-
if (plugin) {
|
|
195
|
-
Object.assign(plugin, info);
|
|
196
|
-
updatePluginState(plugin);
|
|
197
|
-
}
|
|
198
|
-
},
|
|
199
|
-
},
|
|
200
|
-
computed: {
|
|
201
|
-
selectedPlugin() {
|
|
202
|
-
const plugin = this.plugins.find(p => p.path === this.$route.params.id);
|
|
203
|
-
if (plugin) return plugin.name;
|
|
204
|
-
return 'SELECT A PLUGIN';
|
|
205
|
-
}
|
|
206
|
-
},
|
|
207
|
-
data() {
|
|
208
|
-
return {
|
|
209
|
-
search: '',
|
|
210
|
-
loading: true,
|
|
211
|
-
reloading: false,
|
|
212
|
-
plugins: [],
|
|
213
|
-
};
|
|
214
|
-
},
|
|
215
|
-
};
|
|
216
|
-
|
|
217
|
-
</script>
|
|
@@ -1,418 +0,0 @@
|
|
|
1
|
-
<style lang="scss">
|
|
2
|
-
@import '../css/style';
|
|
3
|
-
|
|
4
|
-
.plugin-view,
|
|
5
|
-
.plugin-info {
|
|
6
|
-
@include column-container;
|
|
7
|
-
|
|
8
|
-
.scroll-scroller {
|
|
9
|
-
background-color: $br-bg-primary;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.plugin-info {
|
|
14
|
-
.section-header {
|
|
15
|
-
@include center;
|
|
16
|
-
color: white;
|
|
17
|
-
height: 32px;
|
|
18
|
-
font-size: 24px;
|
|
19
|
-
text-shadow: none;
|
|
20
|
-
font-weight: bold;
|
|
21
|
-
text-align: center;
|
|
22
|
-
background-color: $br-bg-header;
|
|
23
|
-
top: 0;
|
|
24
|
-
position: sticky;
|
|
25
|
-
text-transform: uppercase;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.option-item {
|
|
30
|
-
@include alternate(background-color, $br-bg-secondary, $br-bg-secondary-alt);
|
|
31
|
-
font-size: 20px;
|
|
32
|
-
color: $br-boring-button-fg;
|
|
33
|
-
min-height: 50px;
|
|
34
|
-
overflow: visible;
|
|
35
|
-
white-space: nowrap;
|
|
36
|
-
display: flex;
|
|
37
|
-
align-items: center;
|
|
38
|
-
|
|
39
|
-
&.config {
|
|
40
|
-
min-height: 80px;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.option-name,
|
|
44
|
-
.option-input {
|
|
45
|
-
margin-left: 8px;
|
|
46
|
-
margin-right: 8px;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.option-name {
|
|
50
|
-
font-size: 24px;
|
|
51
|
-
font-weight: bold;
|
|
52
|
-
cursor: default;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.option-input {
|
|
56
|
-
@include column;
|
|
57
|
-
width: 100%;
|
|
58
|
-
|
|
59
|
-
.option-label {
|
|
60
|
-
font-weight: bold;
|
|
61
|
-
margin-bottom: 4px;
|
|
62
|
-
|
|
63
|
-
.saved-note {
|
|
64
|
-
color: $br-info-normal;
|
|
65
|
-
display: inline-flex;
|
|
66
|
-
align-items: center;
|
|
67
|
-
font-weight: normal;
|
|
68
|
-
font-size: 12px;
|
|
69
|
-
opacity: 0;
|
|
70
|
-
transition: 0.2s ease;
|
|
71
|
-
|
|
72
|
-
&.show {
|
|
73
|
-
opacity: 1;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.option-value {
|
|
79
|
-
@include row;
|
|
80
|
-
justify-content: space-between;
|
|
81
|
-
|
|
82
|
-
.reset-button {
|
|
83
|
-
color: white;
|
|
84
|
-
cursor: pointer;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.option-args {
|
|
90
|
-
display: flex;
|
|
91
|
-
flex-flow: row wrap;
|
|
92
|
-
|
|
93
|
-
.option-arg {
|
|
94
|
-
@include center;
|
|
95
|
-
background-color: $br-button-normal;
|
|
96
|
-
height: 16px;
|
|
97
|
-
margin: 4px;
|
|
98
|
-
font-size: 16px;
|
|
99
|
-
padding: 4px 8px;
|
|
100
|
-
border-radius: 16px;
|
|
101
|
-
cursor: default;
|
|
102
|
-
color: white;
|
|
103
|
-
|
|
104
|
-
&.required {
|
|
105
|
-
background-color: $br-main-pressed;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
</style>
|
|
111
|
-
|
|
112
|
-
<template>
|
|
113
|
-
<div class="plugin-view">
|
|
114
|
-
<br-loader :active="loading" size="huge">Loading Plugin</br-loader>
|
|
115
|
-
<div class="plugin-info">
|
|
116
|
-
<br-scroll v-if="!loading">
|
|
117
|
-
<div class="stats">
|
|
118
|
-
<div class="stat">
|
|
119
|
-
<b data-tooltip="Plugin name">Name:</b> {{ plugin.name }}
|
|
120
|
-
</div>
|
|
121
|
-
<div class="stat">
|
|
122
|
-
<b data-tooltip="Plugin creator">Author:</b>
|
|
123
|
-
{{ plugin.documentation && plugin.documentation.author }}
|
|
124
|
-
</div>
|
|
125
|
-
<div class="stat">
|
|
126
|
-
<b>Description:</b>
|
|
127
|
-
{{
|
|
128
|
-
(plugin.documentation && plugin.documentation.description) ||
|
|
129
|
-
'none'
|
|
130
|
-
}}
|
|
131
|
-
</div>
|
|
132
|
-
<div class="stat">
|
|
133
|
-
<b data-tooltip="The folder this plugin runs in">Folder:</b>
|
|
134
|
-
{{ plugin.path }}
|
|
135
|
-
</div>
|
|
136
|
-
<div class="stat">
|
|
137
|
-
<b data-tooltip="The type of plugin this is">Format:</b>
|
|
138
|
-
{{ plugin.format }}
|
|
139
|
-
</div>
|
|
140
|
-
<div class="stat">
|
|
141
|
-
<b data-tooltip="Number of objects in the plugin's storage"
|
|
142
|
-
>Stored Objects:</b
|
|
143
|
-
>
|
|
144
|
-
{{ plugin.objCount }}
|
|
145
|
-
</div>
|
|
146
|
-
<div class="stat">
|
|
147
|
-
<b data-tooltip="Plugin can be started">Enabled:</b>
|
|
148
|
-
{{ plugin.isEnabled ? 'Yes' : 'No' }}
|
|
149
|
-
</div>
|
|
150
|
-
<div class="stat">
|
|
151
|
-
<b data-tooltip="Plugin is running">Loaded:</b>
|
|
152
|
-
{{ plugin.isLoaded ? 'Yes' : 'No' }}
|
|
153
|
-
</div>
|
|
154
|
-
</div>
|
|
155
|
-
<div
|
|
156
|
-
class="section-header"
|
|
157
|
-
data-tooltip="Ways to configure the plugin. Changes take place the next time a plugin is loaded."
|
|
158
|
-
>
|
|
159
|
-
Configs
|
|
160
|
-
</div>
|
|
161
|
-
<div class="option-list">
|
|
162
|
-
<div
|
|
163
|
-
class="option-item"
|
|
164
|
-
v-if="Object.keys(plugin.documentation.config || {}).length === 0"
|
|
165
|
-
>
|
|
166
|
-
<i class="option-name">None</i>
|
|
167
|
-
</div>
|
|
168
|
-
<div
|
|
169
|
-
v-for="(conf, c) in plugin.documentation.config || {}"
|
|
170
|
-
class="option-item config"
|
|
171
|
-
:key="c"
|
|
172
|
-
>
|
|
173
|
-
<div class="option-input">
|
|
174
|
-
<div class="option-label" :data-tooltip="conf.description">
|
|
175
|
-
{{ c }}
|
|
176
|
-
<span :class="['saved-note', { show: showSave[c] }]">
|
|
177
|
-
SAVED <CheckIcon size="20" />
|
|
178
|
-
</span>
|
|
179
|
-
</div>
|
|
180
|
-
<div class="option-value">
|
|
181
|
-
<br-input
|
|
182
|
-
v-if="['string', 'password', 'number'].includes(conf.type)"
|
|
183
|
-
:type="conf.type"
|
|
184
|
-
:value="config[c]"
|
|
185
|
-
@input="value => updateConfig(c, value)"
|
|
186
|
-
/>
|
|
187
|
-
<br-list-input
|
|
188
|
-
v-if="conf.type === 'list'"
|
|
189
|
-
:options="conf.options"
|
|
190
|
-
:type="conf.itemType"
|
|
191
|
-
:value="config[c]"
|
|
192
|
-
@input="value => updateConfig(c, value)"
|
|
193
|
-
/>
|
|
194
|
-
<br-player-list
|
|
195
|
-
v-if="conf.type === 'players'"
|
|
196
|
-
:value="config[c]"
|
|
197
|
-
@input="value => updateConfig(c, value)"
|
|
198
|
-
/>
|
|
199
|
-
<br-role-dropdown
|
|
200
|
-
v-if="conf.type === 'role'"
|
|
201
|
-
:value="config[c]"
|
|
202
|
-
@input="value => updateConfig(c, value)"
|
|
203
|
-
/>
|
|
204
|
-
<br-dropdown
|
|
205
|
-
v-if="conf.type === 'enum'"
|
|
206
|
-
:options="conf.options"
|
|
207
|
-
:value="config[c]"
|
|
208
|
-
@input="value => updateConfig(c, value)"
|
|
209
|
-
/>
|
|
210
|
-
<br-toggle
|
|
211
|
-
v-if="conf.type === 'boolean'"
|
|
212
|
-
@input="value => updateConfig(c, value)"
|
|
213
|
-
:value="config[c]"
|
|
214
|
-
/>
|
|
215
|
-
<ArrowBackUpIcon
|
|
216
|
-
v-if="!eq(conf.default, config[c])"
|
|
217
|
-
@click="updateConfig(c, conf.default)"
|
|
218
|
-
class="reset-button"
|
|
219
|
-
data-tooltip="Reset to default value"
|
|
220
|
-
/>
|
|
221
|
-
</div>
|
|
222
|
-
</div>
|
|
223
|
-
</div>
|
|
224
|
-
</div>
|
|
225
|
-
<div class="section-header" data-tooltip="Ways to control the plugin">
|
|
226
|
-
Commands
|
|
227
|
-
</div>
|
|
228
|
-
<div class="option-list">
|
|
229
|
-
<div
|
|
230
|
-
class="option-item"
|
|
231
|
-
v-if="(plugin.documentation.commands || []).length === 0"
|
|
232
|
-
>
|
|
233
|
-
<i class="option-name">None</i>
|
|
234
|
-
</div>
|
|
235
|
-
<div
|
|
236
|
-
v-for="c in plugin.documentation.commands || []"
|
|
237
|
-
class="option-item"
|
|
238
|
-
:key="c.name"
|
|
239
|
-
>
|
|
240
|
-
<div class="option-name" :data-tooltip="c.description">
|
|
241
|
-
{{ c.name }}
|
|
242
|
-
</div>
|
|
243
|
-
<div class="option-args">
|
|
244
|
-
<div
|
|
245
|
-
v-for="a in c.args || []"
|
|
246
|
-
:key="a.name"
|
|
247
|
-
:class="['option-arg', { required: a.required }]"
|
|
248
|
-
:data-tooltip="
|
|
249
|
-
(a.required ? '(required) ' : '') + a.description
|
|
250
|
-
"
|
|
251
|
-
>
|
|
252
|
-
{{ a.name }}
|
|
253
|
-
</div>
|
|
254
|
-
</div>
|
|
255
|
-
</div>
|
|
256
|
-
</div>
|
|
257
|
-
</br-scroll>
|
|
258
|
-
</div>
|
|
259
|
-
<br-footer>
|
|
260
|
-
<br-button
|
|
261
|
-
main
|
|
262
|
-
v-if="plugin.isEnabled && !plugin.isLoaded"
|
|
263
|
-
:disabled="waiting"
|
|
264
|
-
data-tooltip="Start the plugin"
|
|
265
|
-
@click="loadPlugin()"
|
|
266
|
-
>
|
|
267
|
-
<PlayerPlayIcon />
|
|
268
|
-
Load
|
|
269
|
-
</br-button>
|
|
270
|
-
<br-button
|
|
271
|
-
warn
|
|
272
|
-
v-if="plugin.isEnabled && plugin.isLoaded"
|
|
273
|
-
data-tooltip="Stop, then start the plugin"
|
|
274
|
-
:disabled="waiting"
|
|
275
|
-
@click="reloadPlugin()"
|
|
276
|
-
>
|
|
277
|
-
<RefreshIcon />
|
|
278
|
-
Reload
|
|
279
|
-
</br-button>
|
|
280
|
-
<span style="flex: 1" />
|
|
281
|
-
<br-button
|
|
282
|
-
error
|
|
283
|
-
v-if="plugin.isEnabled && plugin.isLoaded"
|
|
284
|
-
:disabled="waiting"
|
|
285
|
-
data-tooltip="Stop the plugin"
|
|
286
|
-
@click="unloadPlugin()"
|
|
287
|
-
>
|
|
288
|
-
<PlayerStopIcon />
|
|
289
|
-
Unload
|
|
290
|
-
</br-button>
|
|
291
|
-
<br-button
|
|
292
|
-
main
|
|
293
|
-
v-if="!plugin.isEnabled"
|
|
294
|
-
data-tooltip="Allow the plugin to be started"
|
|
295
|
-
:disabled="waiting"
|
|
296
|
-
@click="togglePlugin(true)"
|
|
297
|
-
>
|
|
298
|
-
<PlusIcon />
|
|
299
|
-
Enable
|
|
300
|
-
</br-button>
|
|
301
|
-
<br-button
|
|
302
|
-
error
|
|
303
|
-
v-if="plugin.isEnabled && !plugin.isLoaded"
|
|
304
|
-
data-tooltip="Prevent the plugin from being started"
|
|
305
|
-
:disabled="waiting"
|
|
306
|
-
@click="togglePlugin(false)"
|
|
307
|
-
>
|
|
308
|
-
<MinusIcon />
|
|
309
|
-
Disable
|
|
310
|
-
</br-button>
|
|
311
|
-
</br-footer>
|
|
312
|
-
</div>
|
|
313
|
-
</template>
|
|
314
|
-
<script>
|
|
315
|
-
import PlayerPlayIcon from 'vue-tabler-icons/icons/PlayerPlayIcon';
|
|
316
|
-
import PlayerStopIcon from 'vue-tabler-icons/icons/PlayerStopIcon';
|
|
317
|
-
import RefreshIcon from 'vue-tabler-icons/icons/RefreshIcon';
|
|
318
|
-
import PlusIcon from 'vue-tabler-icons/icons/PlusIcon';
|
|
319
|
-
import MinusIcon from 'vue-tabler-icons/icons/MinusIcon';
|
|
320
|
-
import ArrowBackUpIcon from 'vue-tabler-icons/icons/ArrowBackUpIcon';
|
|
321
|
-
import CheckIcon from 'vue-tabler-icons/icons/CheckIcon';
|
|
322
|
-
|
|
323
|
-
import debounce from 'lodash/debounce';
|
|
324
|
-
|
|
325
|
-
export default {
|
|
326
|
-
components: {
|
|
327
|
-
PlayerPlayIcon,
|
|
328
|
-
PlayerStopIcon,
|
|
329
|
-
RefreshIcon,
|
|
330
|
-
PlusIcon,
|
|
331
|
-
MinusIcon,
|
|
332
|
-
ArrowBackUpIcon,
|
|
333
|
-
CheckIcon,
|
|
334
|
-
},
|
|
335
|
-
sockets: {
|
|
336
|
-
plugin([path, info]) {
|
|
337
|
-
if (path === this.plugin.path) Object.assign(this.plugin, info);
|
|
338
|
-
},
|
|
339
|
-
},
|
|
340
|
-
methods: {
|
|
341
|
-
saveConfig: debounce(async function() {
|
|
342
|
-
const diff = {};
|
|
343
|
-
for (const c in this.plugin.config) {
|
|
344
|
-
if (this.plugin.config[c] !== this.config[c]) diff[c] = true;
|
|
345
|
-
}
|
|
346
|
-
const config = this.config;
|
|
347
|
-
const ok = await this.$$request(
|
|
348
|
-
'plugin.config',
|
|
349
|
-
this.$route.params.id,
|
|
350
|
-
config
|
|
351
|
-
);
|
|
352
|
-
if (ok) {
|
|
353
|
-
this.showSave = diff;
|
|
354
|
-
setTimeout(() => {
|
|
355
|
-
this.showSave = {};
|
|
356
|
-
this.plugin.config = config;
|
|
357
|
-
}, 1000);
|
|
358
|
-
}
|
|
359
|
-
}, 2000),
|
|
360
|
-
updateConfig(key, val) {
|
|
361
|
-
// update the object
|
|
362
|
-
this.config = { ...this.config, [key]: val };
|
|
363
|
-
// save the config
|
|
364
|
-
this.saveConfig();
|
|
365
|
-
},
|
|
366
|
-
async getPlugin() {
|
|
367
|
-
this.loading = true;
|
|
368
|
-
this.plugin =
|
|
369
|
-
(await this.$$request('plugin.get', this.$route.params.id)) || {};
|
|
370
|
-
if (this.plugin) this.config = this.plugin.config;
|
|
371
|
-
this.loading = false;
|
|
372
|
-
},
|
|
373
|
-
async unloadPlugin() {
|
|
374
|
-
this.waiting = true;
|
|
375
|
-
await this.$$request('plugin.unload', this.$route.params.id);
|
|
376
|
-
await this.getPlugin();
|
|
377
|
-
this.waiting = false;
|
|
378
|
-
},
|
|
379
|
-
async loadPlugin() {
|
|
380
|
-
this.waiting = true;
|
|
381
|
-
await this.$$request('plugin.load', this.$route.params.id);
|
|
382
|
-
await this.getPlugin();
|
|
383
|
-
this.waiting = false;
|
|
384
|
-
},
|
|
385
|
-
async reloadPlugin() {
|
|
386
|
-
this.waiting = true;
|
|
387
|
-
const ok = await this.$$request('plugin.unload', this.$route.params.id);
|
|
388
|
-
if (ok) {
|
|
389
|
-
await this.$$request('plugin.load', this.$route.params.id);
|
|
390
|
-
}
|
|
391
|
-
await this.getPlugin();
|
|
392
|
-
this.waiting = false;
|
|
393
|
-
},
|
|
394
|
-
async togglePlugin(enabled) {
|
|
395
|
-
this.waiting = true;
|
|
396
|
-
await this.$$request('plugin.toggle', this.$route.params.id, enabled);
|
|
397
|
-
await this.getPlugin();
|
|
398
|
-
this.waiting = false;
|
|
399
|
-
},
|
|
400
|
-
eq(a, b) {
|
|
401
|
-
// super stupidly not performant equality but it's okay because it doesn't happen often
|
|
402
|
-
return JSON.stringify(a) === JSON.stringify(b);
|
|
403
|
-
},
|
|
404
|
-
},
|
|
405
|
-
created() {
|
|
406
|
-
this.getPlugin();
|
|
407
|
-
},
|
|
408
|
-
data() {
|
|
409
|
-
return {
|
|
410
|
-
plugin: {},
|
|
411
|
-
config: {},
|
|
412
|
-
showSave: {},
|
|
413
|
-
loading: true,
|
|
414
|
-
waiting: false,
|
|
415
|
-
};
|
|
416
|
-
},
|
|
417
|
-
};
|
|
418
|
-
</script>
|