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,462 +0,0 @@
|
|
|
1
|
-
<style lang="scss" scoped>
|
|
2
|
-
@import '../css/style';
|
|
3
|
-
|
|
4
|
-
.history-container {
|
|
5
|
-
display: flex;
|
|
6
|
-
align-items: stretch;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.chat-history {
|
|
10
|
-
@include column-container;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
@media screen and (max-width: 600px) {
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.chat-new-day {
|
|
17
|
-
@include center;
|
|
18
|
-
color: white;
|
|
19
|
-
height: 32px;
|
|
20
|
-
font-size: 24px;
|
|
21
|
-
text-shadow: none;
|
|
22
|
-
font-weight: bold;
|
|
23
|
-
text-align: center;
|
|
24
|
-
background-color: $br-bg-header;
|
|
25
|
-
margin-bottom: 8px;
|
|
26
|
-
margin-right: 8px;
|
|
27
|
-
top: 0;
|
|
28
|
-
position: sticky;
|
|
29
|
-
text-transform: uppercase;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.calendar-container {
|
|
33
|
-
@include column;
|
|
34
|
-
margin-right: 8px;
|
|
35
|
-
z-index: 100;
|
|
36
|
-
min-height: 32px;
|
|
37
|
-
align-items: flex-end;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.calendar {
|
|
41
|
-
background-color: $br-element-footer-bg;
|
|
42
|
-
min-width: 200px;
|
|
43
|
-
|
|
44
|
-
.year,
|
|
45
|
-
.month {
|
|
46
|
-
@include center;
|
|
47
|
-
background-color: $br-bg-header;
|
|
48
|
-
justify-content: space-between;
|
|
49
|
-
padding: 0 8px;
|
|
50
|
-
padding-bottom: 8px;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.year {
|
|
54
|
-
padding-top: 8px;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.calendar-days {
|
|
58
|
-
font-size: 24px;
|
|
59
|
-
display: grid;
|
|
60
|
-
grid-template-columns: repeat(7, 40px);
|
|
61
|
-
grid-auto-rows: 40px;
|
|
62
|
-
text-align: center;
|
|
63
|
-
|
|
64
|
-
.days {
|
|
65
|
-
@include center;
|
|
66
|
-
color: $br-boring-button-fg;
|
|
67
|
-
|
|
68
|
-
&.header {
|
|
69
|
-
background-color: $br-bg-header;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
&.available {
|
|
73
|
-
color: white;
|
|
74
|
-
background-color: $br-button-normal;
|
|
75
|
-
border-radius: 0;
|
|
76
|
-
cursor: pointer;
|
|
77
|
-
|
|
78
|
-
&:hover {
|
|
79
|
-
background-color: $br-element-hover;
|
|
80
|
-
}
|
|
81
|
-
&:active {
|
|
82
|
-
background-color: $br-element-pressed;
|
|
83
|
-
}
|
|
84
|
-
&.today:hover {
|
|
85
|
-
background-color: $br-info-hover;
|
|
86
|
-
}
|
|
87
|
-
&.today:active {
|
|
88
|
-
background-color: $br-info-pressed;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
&.today {
|
|
93
|
-
color: white;
|
|
94
|
-
border: 2px solid $br-info-normal;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
&:not(.today):not(.available) {
|
|
98
|
-
pointer-events: none;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
</style>
|
|
104
|
-
|
|
105
|
-
<template>
|
|
106
|
-
<page>
|
|
107
|
-
<nav-header title="History">
|
|
108
|
-
<div class="calendar-container">
|
|
109
|
-
<br-button
|
|
110
|
-
normal
|
|
111
|
-
boxy
|
|
112
|
-
style="margin-right: 0"
|
|
113
|
-
data-tooltip="Show a calendar previewing days"
|
|
114
|
-
@click="showCalendar = !showCalendar"
|
|
115
|
-
>
|
|
116
|
-
<CalendarIcon />
|
|
117
|
-
Calendar
|
|
118
|
-
</br-button>
|
|
119
|
-
<div class="calendar" v-if="showCalendar">
|
|
120
|
-
<div class="year">
|
|
121
|
-
<br-button
|
|
122
|
-
icon
|
|
123
|
-
normal
|
|
124
|
-
:disabled="!getPrevYear()"
|
|
125
|
-
@click="setDate(getPrevYear())"
|
|
126
|
-
>
|
|
127
|
-
<ArrowLeftIcon />
|
|
128
|
-
</br-button>
|
|
129
|
-
{{ year }}
|
|
130
|
-
<br-button
|
|
131
|
-
icon
|
|
132
|
-
normal
|
|
133
|
-
:disabled="!getNextYear()"
|
|
134
|
-
@click="setDate(getNextYear())"
|
|
135
|
-
>
|
|
136
|
-
<ArrowRightIcon />
|
|
137
|
-
</br-button>
|
|
138
|
-
</div>
|
|
139
|
-
<div class="month">
|
|
140
|
-
<br-button
|
|
141
|
-
icon
|
|
142
|
-
normal
|
|
143
|
-
:disabled="!hasPrevMonth"
|
|
144
|
-
@click="setDate(getPrevMonth())"
|
|
145
|
-
>
|
|
146
|
-
<ArrowLeftIcon />
|
|
147
|
-
</br-button>
|
|
148
|
-
{{ MONTHS[month] }}
|
|
149
|
-
<br-button
|
|
150
|
-
icon
|
|
151
|
-
normal
|
|
152
|
-
:disabled="!hasNextMonth"
|
|
153
|
-
@click="setDate(getNextMonth())"
|
|
154
|
-
>
|
|
155
|
-
<ArrowRightIcon />
|
|
156
|
-
</br-button>
|
|
157
|
-
</div>
|
|
158
|
-
<div class="calendar-days">
|
|
159
|
-
<div class="header days">S</div>
|
|
160
|
-
<div class="header days">M</div>
|
|
161
|
-
<div class="header days">T</div>
|
|
162
|
-
<div class="header days">W</div>
|
|
163
|
-
<div class="header days">T</div>
|
|
164
|
-
<div class="header days">F</div>
|
|
165
|
-
<div class="header days">S</div>
|
|
166
|
-
<div v-for="d in startDay" :key="'empty' + d"></div>
|
|
167
|
-
<div
|
|
168
|
-
v-for="d in numDays"
|
|
169
|
-
:key="d"
|
|
170
|
-
:class="{
|
|
171
|
-
days: true,
|
|
172
|
-
today: nowMonth === month && nowYear === year && nowDay === d,
|
|
173
|
-
available:
|
|
174
|
-
!(nowMonth === month && nowYear === year && d > nowDay) &&
|
|
175
|
-
calendar[year] &&
|
|
176
|
-
calendar[year][month] &&
|
|
177
|
-
calendar[year][month][d],
|
|
178
|
-
}"
|
|
179
|
-
@click="focusDay(year, month, d)"
|
|
180
|
-
>
|
|
181
|
-
{{ d }}
|
|
182
|
-
</div>
|
|
183
|
-
</div>
|
|
184
|
-
</div>
|
|
185
|
-
</div>
|
|
186
|
-
</nav-header>
|
|
187
|
-
<page-content>
|
|
188
|
-
<side-nav :active="$route.name" />
|
|
189
|
-
<div class="generic-container history-container">
|
|
190
|
-
<div class="chat-history">
|
|
191
|
-
<div class="scroll-container">
|
|
192
|
-
<v-infinite-scroll
|
|
193
|
-
:loading="loading"
|
|
194
|
-
@top="prevPage"
|
|
195
|
-
@bottom="nextPage"
|
|
196
|
-
@scroll="ev => logDir(ev)"
|
|
197
|
-
:on-top-scrolls-to-bottom="false"
|
|
198
|
-
:offset="offset"
|
|
199
|
-
class="scroll-scroller"
|
|
200
|
-
>
|
|
201
|
-
<template v-for="log in chats">
|
|
202
|
-
<div
|
|
203
|
-
v-if="log.newDay"
|
|
204
|
-
class="chat-new-day"
|
|
205
|
-
:key="log._id + 'day'"
|
|
206
|
-
>
|
|
207
|
-
{{ log.newDay }}
|
|
208
|
-
</div>
|
|
209
|
-
<br-chat-entry :log="log" :key="log._id" />
|
|
210
|
-
</template>
|
|
211
|
-
</v-infinite-scroll>
|
|
212
|
-
</div>
|
|
213
|
-
<br-loader :active="loading && firstLoad" size="huge"
|
|
214
|
-
>Loading Chat</br-loader
|
|
215
|
-
>
|
|
216
|
-
</div>
|
|
217
|
-
</div>
|
|
218
|
-
</page-content>
|
|
219
|
-
</page>
|
|
220
|
-
</template>
|
|
221
|
-
|
|
222
|
-
<script>
|
|
223
|
-
import CalendarIcon from 'vue-tabler-icons/icons/CalendarIcon';
|
|
224
|
-
import ArrowLeftIcon from 'vue-tabler-icons/icons/ArrowLeftIcon';
|
|
225
|
-
import ArrowRightIcon from 'vue-tabler-icons/icons/ArrowRightIcon';
|
|
226
|
-
|
|
227
|
-
const MONTHS = [
|
|
228
|
-
'January',
|
|
229
|
-
'February',
|
|
230
|
-
'March',
|
|
231
|
-
'April',
|
|
232
|
-
'May',
|
|
233
|
-
'June',
|
|
234
|
-
'July',
|
|
235
|
-
'August',
|
|
236
|
-
'September',
|
|
237
|
-
'October',
|
|
238
|
-
'November',
|
|
239
|
-
'December',
|
|
240
|
-
];
|
|
241
|
-
|
|
242
|
-
const sorted = (obj, reverse = false) =>
|
|
243
|
-
Object.keys(obj)
|
|
244
|
-
.map(Number)
|
|
245
|
-
.sort((a, b) => (reverse ? b - a : a - b));
|
|
246
|
-
|
|
247
|
-
export default {
|
|
248
|
-
components: { CalendarIcon, ArrowLeftIcon, ArrowRightIcon },
|
|
249
|
-
async created() {
|
|
250
|
-
await this.getCalendar();
|
|
251
|
-
const paramTime = this.$route.params.time;
|
|
252
|
-
const time =
|
|
253
|
-
paramTime &&
|
|
254
|
-
new Date(paramTime.match(/^\d+$/) ? Number(paramTime) : paramTime);
|
|
255
|
-
// valid time passed into route param
|
|
256
|
-
if (time && time.getTime() === time.getTime()) {
|
|
257
|
-
await this.getChats({ before: time.getTime() - 1 });
|
|
258
|
-
await this.getChats({ after: time.getTime() - 1 });
|
|
259
|
-
this.focused = time.getTime();
|
|
260
|
-
const focused = this.$el.querySelector('.focused');
|
|
261
|
-
focused.scrollIntoView({ block: 'center' });
|
|
262
|
-
} else {
|
|
263
|
-
await this.getChats({ before: Date.now() });
|
|
264
|
-
this.scroll();
|
|
265
|
-
}
|
|
266
|
-
},
|
|
267
|
-
beforeDestroy() {},
|
|
268
|
-
destroyed() {},
|
|
269
|
-
mounted() {},
|
|
270
|
-
methods: {
|
|
271
|
-
// get the chat calendar (days messages have been sent)
|
|
272
|
-
async getCalendar() {
|
|
273
|
-
this.loading = true;
|
|
274
|
-
this.calendar = await this.$$request('chat.calendar');
|
|
275
|
-
this.loading = false;
|
|
276
|
-
},
|
|
277
|
-
scroll() {
|
|
278
|
-
return new Promise(resolve => {
|
|
279
|
-
const container = this.$el.querySelector('.scroll-scroller');
|
|
280
|
-
window.requestAnimationFrame(() => {
|
|
281
|
-
container.scrollTop = container.scrollHeight;
|
|
282
|
-
resolve();
|
|
283
|
-
});
|
|
284
|
-
});
|
|
285
|
-
},
|
|
286
|
-
async focusDay(year, month, day) {
|
|
287
|
-
if (this.loading) return false;
|
|
288
|
-
this.chats = [];
|
|
289
|
-
const time = new Date(year, month, day).getTime();
|
|
290
|
-
await this.getChats({ after: time });
|
|
291
|
-
},
|
|
292
|
-
|
|
293
|
-
handleChats(chats, { before: _b, after: _a }, _dir) {
|
|
294
|
-
if (!chats.length) return;
|
|
295
|
-
|
|
296
|
-
// add new chats and sort by create time
|
|
297
|
-
this.chats = this.chats.concat(chats);
|
|
298
|
-
this.chats.sort((a, b) => a.created - b.created);
|
|
299
|
-
|
|
300
|
-
// find the min and max times for message creation
|
|
301
|
-
const min = this.chats[0].created;
|
|
302
|
-
const max = this.chats[this.chats.length - 1].created;
|
|
303
|
-
|
|
304
|
-
for (let i = 0; i < this.chats.length; i++) {
|
|
305
|
-
const c = this.chats[i];
|
|
306
|
-
const date = new Date(c.created);
|
|
307
|
-
c.date = date.getDate();
|
|
308
|
-
|
|
309
|
-
// determine if the date between chat messages is a different day and insert that date
|
|
310
|
-
if (i === 0 || c.date !== this.chats[i - 1].date) {
|
|
311
|
-
c.newDay = `${MONTHS[date.getMonth()]} ${
|
|
312
|
-
c.date
|
|
313
|
-
}, ${date.getFullYear()}`;
|
|
314
|
-
} else {
|
|
315
|
-
c.newDay = undefined;
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
this.min = min;
|
|
320
|
-
this.max = max;
|
|
321
|
-
},
|
|
322
|
-
|
|
323
|
-
async prevPage() {
|
|
324
|
-
// check if this is absolute min pages (no results)
|
|
325
|
-
if (this.absMin && this.min <= this.absMin) return;
|
|
326
|
-
const chats = await this.getChats({ before: this.min }, 'top');
|
|
327
|
-
if (chats.length === 0) {
|
|
328
|
-
this.absMin = this.min;
|
|
329
|
-
}
|
|
330
|
-
},
|
|
331
|
-
|
|
332
|
-
async nextPage() {
|
|
333
|
-
// check if this is absolute max pages (no results)
|
|
334
|
-
if (this.absMax && this.max >= this.absMax) return;
|
|
335
|
-
const chats = await this.getChats({ after: this.max }, 'bottom');
|
|
336
|
-
if (chats.length === 0) this.absMax = this.max;
|
|
337
|
-
},
|
|
338
|
-
|
|
339
|
-
async getChats({ before, after }, dir) {
|
|
340
|
-
this.loading = true;
|
|
341
|
-
const chats = await this.$$request('chat.history', { before, after });
|
|
342
|
-
this.handleChats(chats, { before, after }, dir);
|
|
343
|
-
|
|
344
|
-
// remove chats that our off screen
|
|
345
|
-
requestAnimationFrame(() => {
|
|
346
|
-
if (dir === 'bottom' && this.chats.length > 200)
|
|
347
|
-
this.chats.splice(0, this.chats.length - 200).map(m => m.message);
|
|
348
|
-
|
|
349
|
-
if (dir === 'top' && this.chats.length > 200)
|
|
350
|
-
this.chats.splice(200, this.chats.length - 200).map(m => m.message);
|
|
351
|
-
});
|
|
352
|
-
|
|
353
|
-
this.loading = false;
|
|
354
|
-
this.firstLoad = false;
|
|
355
|
-
return chats;
|
|
356
|
-
},
|
|
357
|
-
|
|
358
|
-
// find the next selectable year
|
|
359
|
-
getNextYear() {
|
|
360
|
-
const year = sorted(this.calendar).find(y => y > this.year);
|
|
361
|
-
if (!year) return;
|
|
362
|
-
return [year, sorted(this.calendar[year])[0]];
|
|
363
|
-
},
|
|
364
|
-
|
|
365
|
-
// find the previous selectable year
|
|
366
|
-
getPrevYear() {
|
|
367
|
-
const year = sorted(this.calendar, true).find(y => y < this.year);
|
|
368
|
-
if (!year) return;
|
|
369
|
-
return [year, sorted(this.calendar[year], true)[0]];
|
|
370
|
-
},
|
|
371
|
-
|
|
372
|
-
// set the selected month and year
|
|
373
|
-
setDate([year, month]) {
|
|
374
|
-
this.month = month;
|
|
375
|
-
this.year = year;
|
|
376
|
-
},
|
|
377
|
-
|
|
378
|
-
// find the next selectable month
|
|
379
|
-
getNextMonth() {
|
|
380
|
-
// if this isn't the last month and there are things for this year
|
|
381
|
-
if (this.month !== 11 && this.calendar[this.year]) {
|
|
382
|
-
// find the first month from this year greater than this month
|
|
383
|
-
const month = sorted(this.calendar[this.year]).find(
|
|
384
|
-
m => m > this.month
|
|
385
|
-
);
|
|
386
|
-
if (typeof month == 'number') return [this.year, month];
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
// find the next largest year
|
|
390
|
-
const year = sorted(this.calendar).find(y => y > this.year);
|
|
391
|
-
if (!year) return;
|
|
392
|
-
|
|
393
|
-
// find the first month
|
|
394
|
-
const month = sorted(this.calendar[year])[0];
|
|
395
|
-
if (typeof month !== 'number') return;
|
|
396
|
-
return [year, month];
|
|
397
|
-
},
|
|
398
|
-
|
|
399
|
-
// find the previous selectable month
|
|
400
|
-
getPrevMonth() {
|
|
401
|
-
// if this isn't the first month and there are things for this year
|
|
402
|
-
if (this.month !== 0 && this.calendar[this.year]) {
|
|
403
|
-
// find the first month from this year greater than this month
|
|
404
|
-
const month = sorted(this.calendar[this.year], true).find(
|
|
405
|
-
m => m < this.month
|
|
406
|
-
);
|
|
407
|
-
if (typeof month == 'number') return [this.year, month];
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
// find the next smallest year
|
|
411
|
-
const year = sorted(this.calendar, true).find(y => y < this.year);
|
|
412
|
-
if (!year) return;
|
|
413
|
-
|
|
414
|
-
// find the last month
|
|
415
|
-
const month = sorted(this.calendar[year], true)[0];
|
|
416
|
-
if (typeof month !== 'number') return;
|
|
417
|
-
return [year, month];
|
|
418
|
-
},
|
|
419
|
-
},
|
|
420
|
-
sockets: {},
|
|
421
|
-
computed: {
|
|
422
|
-
numDays() {
|
|
423
|
-
return new Date(this.year, this.month + 1, 0).getDate();
|
|
424
|
-
},
|
|
425
|
-
startDay() {
|
|
426
|
-
return new Date(this.year, this.month, 1).getDay();
|
|
427
|
-
},
|
|
428
|
-
hasNextMonth() {
|
|
429
|
-
return !!this.getNextMonth();
|
|
430
|
-
},
|
|
431
|
-
hasPrevMonth() {
|
|
432
|
-
return !!this.getPrevMonth();
|
|
433
|
-
},
|
|
434
|
-
},
|
|
435
|
-
data() {
|
|
436
|
-
const date = new Date();
|
|
437
|
-
const month = date.getMonth();
|
|
438
|
-
const year = date.getFullYear();
|
|
439
|
-
const day = date.getDate();
|
|
440
|
-
return {
|
|
441
|
-
MONTHS,
|
|
442
|
-
|
|
443
|
-
// how close to the edge the user has to scroll before loading new messages
|
|
444
|
-
offset: 500,
|
|
445
|
-
|
|
446
|
-
date,
|
|
447
|
-
month,
|
|
448
|
-
year,
|
|
449
|
-
day,
|
|
450
|
-
nowYear: year,
|
|
451
|
-
nowMonth: month,
|
|
452
|
-
nowDay: day,
|
|
453
|
-
|
|
454
|
-
loading: true,
|
|
455
|
-
showCalendar: false,
|
|
456
|
-
firstLoad: true,
|
|
457
|
-
calendar: {},
|
|
458
|
-
chats: [],
|
|
459
|
-
};
|
|
460
|
-
},
|
|
461
|
-
};
|
|
462
|
-
</script>
|
|
@@ -1,251 +0,0 @@
|
|
|
1
|
-
<style lang="scss">
|
|
2
|
-
@import '../css/style';
|
|
3
|
-
|
|
4
|
-
.grid-container {
|
|
5
|
-
position: relative;
|
|
6
|
-
max-height: calc(100vh - 24px * 2 - 8px * 2 - 113px);
|
|
7
|
-
width: 100%;
|
|
8
|
-
overflow-y: scroll;
|
|
9
|
-
overflow-x: hidden;
|
|
10
|
-
z-index: 10;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.vue-grid-layout {
|
|
14
|
-
position: absolute;
|
|
15
|
-
left: 0;
|
|
16
|
-
margin-top: -8px;
|
|
17
|
-
top: 0;
|
|
18
|
-
width: 100%;
|
|
19
|
-
height: 100%;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.vue-grid-item:not(.vue-grid-placeholder) {
|
|
23
|
-
background-color: $br-element-popout-bg;
|
|
24
|
-
}
|
|
25
|
-
.vue-grid-item .resizing {
|
|
26
|
-
opacity: 0.9;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.vue-grid-item {
|
|
30
|
-
display: flex;
|
|
31
|
-
flex-direction: column;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.vue-draggable-dragging .drag-handle {
|
|
35
|
-
background-color: $br-element-footer-bg;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.vue-resizable-handle {
|
|
39
|
-
opacity: 0;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.resize-handle {
|
|
43
|
-
color: $br-boring-button-fg;
|
|
44
|
-
font-size: 24px;
|
|
45
|
-
position: absolute;
|
|
46
|
-
right: -4px;
|
|
47
|
-
bottom: -4px;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.vue-grid-item.vue-grid-placeholder {
|
|
51
|
-
background-color: $br-button-normal !important;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.drag-contents {
|
|
55
|
-
position: relative;
|
|
56
|
-
display: flex;
|
|
57
|
-
align-items: stretch;
|
|
58
|
-
flex: 1;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
@media screen and (max-width: 600px) {
|
|
62
|
-
.vue-grid-layout {
|
|
63
|
-
margin: -8px;
|
|
64
|
-
width: calc(100% + 16px);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.grid-container {
|
|
68
|
-
margin-top: 0;
|
|
69
|
-
max-height: none;
|
|
70
|
-
overflow: hidden;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
</style>
|
|
74
|
-
|
|
75
|
-
<template>
|
|
76
|
-
<page :loading="loading">
|
|
77
|
-
<nav-header title="Dashboard">
|
|
78
|
-
<div class="widgets-container">
|
|
79
|
-
<br-button
|
|
80
|
-
normal
|
|
81
|
-
boxy
|
|
82
|
-
data-tooltip="Add more widgets to the dashboard"
|
|
83
|
-
@click="showWidgets = !showWidgets"
|
|
84
|
-
>
|
|
85
|
-
<AppsIcon />
|
|
86
|
-
Widgets
|
|
87
|
-
</br-button>
|
|
88
|
-
<div
|
|
89
|
-
class="widgets-list"
|
|
90
|
-
:style="{ display: showWidgets ? 'block' : 'none' }"
|
|
91
|
-
>
|
|
92
|
-
<div v-for="(widget, k) in widgetList" :key="k" class="widget-item">
|
|
93
|
-
<div class="name" :data-tooltip="widget.tooltip">
|
|
94
|
-
<component :is="widget.icon" />
|
|
95
|
-
{{ k }}
|
|
96
|
-
</div>
|
|
97
|
-
<br-button
|
|
98
|
-
main
|
|
99
|
-
icon
|
|
100
|
-
v-if="!hasWidget[k]"
|
|
101
|
-
:data-tooltip="'Add ' + k + ' widget'"
|
|
102
|
-
@click="addWidget(k)"
|
|
103
|
-
>
|
|
104
|
-
<PlusIcon />
|
|
105
|
-
</br-button>
|
|
106
|
-
<br-button
|
|
107
|
-
warn
|
|
108
|
-
icon
|
|
109
|
-
v-else
|
|
110
|
-
:data-tooltip="'Remove ' + k + ' widget'"
|
|
111
|
-
@click="removeWidget(k)"
|
|
112
|
-
>
|
|
113
|
-
<MinusIcon />
|
|
114
|
-
</br-button>
|
|
115
|
-
</div>
|
|
116
|
-
</div>
|
|
117
|
-
</div>
|
|
118
|
-
</nav-header>
|
|
119
|
-
<page-content>
|
|
120
|
-
<side-nav :active="$route.name" />
|
|
121
|
-
<div class="grid-container">
|
|
122
|
-
<grid-layout
|
|
123
|
-
:layout="layout"
|
|
124
|
-
:colNum="5"
|
|
125
|
-
:row-height="100"
|
|
126
|
-
:is-draggable="true"
|
|
127
|
-
:is-resizable="true"
|
|
128
|
-
:vertical-compact="false"
|
|
129
|
-
:margin="[8, 8]"
|
|
130
|
-
:responsive="true"
|
|
131
|
-
:use-css-transforms="true"
|
|
132
|
-
@layout-updated="layoutUpdated"
|
|
133
|
-
>
|
|
134
|
-
<grid-item
|
|
135
|
-
v-for="item in layout"
|
|
136
|
-
:x="item.x"
|
|
137
|
-
:y="item.y"
|
|
138
|
-
:w="item.w"
|
|
139
|
-
:h="item.h"
|
|
140
|
-
:i="item.i"
|
|
141
|
-
:key="item.i"
|
|
142
|
-
:minW="2"
|
|
143
|
-
:maxW="10"
|
|
144
|
-
:minH="2"
|
|
145
|
-
:maxH="10"
|
|
146
|
-
drag-allow-from=".drag-handle"
|
|
147
|
-
drag-ignore-from=".no-drag"
|
|
148
|
-
>
|
|
149
|
-
<br-header class="drag-handle">
|
|
150
|
-
<span style="flex: 1">{{ item.i }}</span>
|
|
151
|
-
<br-button
|
|
152
|
-
icon
|
|
153
|
-
error
|
|
154
|
-
class="no-drag"
|
|
155
|
-
data-tooltip="Close widget"
|
|
156
|
-
@click="removeWidget(item.i)"
|
|
157
|
-
>
|
|
158
|
-
<XIcon />
|
|
159
|
-
</br-button>
|
|
160
|
-
</br-header>
|
|
161
|
-
<div class="drag-contents">
|
|
162
|
-
<component v-if="item.component" :is="item.component"></component>
|
|
163
|
-
</div>
|
|
164
|
-
<ChevronDownRightIcon class="resize-handle" />
|
|
165
|
-
</grid-item>
|
|
166
|
-
</grid-layout>
|
|
167
|
-
</div>
|
|
168
|
-
</page-content>
|
|
169
|
-
</page>
|
|
170
|
-
</template>
|
|
171
|
-
|
|
172
|
-
<script>
|
|
173
|
-
import { GridLayout, GridItem } from 'vue-grid-layout';
|
|
174
|
-
|
|
175
|
-
import AppsIcon from 'vue-tabler-icons/icons/AppsIcon';
|
|
176
|
-
import PlusIcon from 'vue-tabler-icons/icons/PlusIcon';
|
|
177
|
-
import MinusIcon from 'vue-tabler-icons/icons/MinusIcon';
|
|
178
|
-
import MessageDotsIcon from 'vue-tabler-icons/icons/MessageDotsIcon';
|
|
179
|
-
import ListIcon from 'vue-tabler-icons/icons/ListIcon';
|
|
180
|
-
import XIcon from 'vue-tabler-icons/icons/XIcon';
|
|
181
|
-
import ChevronDownRightIcon from 'vue-tabler-icons/icons/ChevronDownRightIcon';
|
|
182
|
-
|
|
183
|
-
export default {
|
|
184
|
-
created() {},
|
|
185
|
-
methods: {
|
|
186
|
-
layoutUpdated(layout) {
|
|
187
|
-
localStorage.omeggaDashLayout = JSON.stringify(layout);
|
|
188
|
-
},
|
|
189
|
-
removeWidget(id) {
|
|
190
|
-
this.layout = this.layout.filter(l => l.i !== id);
|
|
191
|
-
},
|
|
192
|
-
addWidget(id) {
|
|
193
|
-
this.layout.push({
|
|
194
|
-
x: 0,
|
|
195
|
-
y: 0,
|
|
196
|
-
w: 2,
|
|
197
|
-
h: 2,
|
|
198
|
-
i: id,
|
|
199
|
-
component: this.widgetList[id].component,
|
|
200
|
-
});
|
|
201
|
-
},
|
|
202
|
-
},
|
|
203
|
-
sockets: {},
|
|
204
|
-
computed: {
|
|
205
|
-
hasWidget() {
|
|
206
|
-
return Object.fromEntries(this.layout.map(l => [l.i, true]));
|
|
207
|
-
},
|
|
208
|
-
},
|
|
209
|
-
data() {
|
|
210
|
-
// default layout
|
|
211
|
-
let layout = [
|
|
212
|
-
{ x: 0, y: 0, w: 2, h: 2, i: 'chat', component: 'br-chat-widget' },
|
|
213
|
-
{ x: 2, y: 0, w: 2, h: 2, i: 'status', component: 'br-status-widget' },
|
|
214
|
-
];
|
|
215
|
-
|
|
216
|
-
if (localStorage.omeggaDashLayout) {
|
|
217
|
-
layout = JSON.parse(localStorage.omeggaDashLayout);
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
/* this.$route.name */
|
|
221
|
-
return {
|
|
222
|
-
loading: false,
|
|
223
|
-
showWidgets: false,
|
|
224
|
-
widgetList: {
|
|
225
|
-
chat: {
|
|
226
|
-
component: 'br-chat-widget',
|
|
227
|
-
icon: 'MessageDotsIcon',
|
|
228
|
-
tooltip: 'Chat with online players',
|
|
229
|
-
},
|
|
230
|
-
status: {
|
|
231
|
-
component: 'br-status-widget',
|
|
232
|
-
icon: 'ListIcon',
|
|
233
|
-
tooltip: 'View current online players and server status',
|
|
234
|
-
},
|
|
235
|
-
},
|
|
236
|
-
layout,
|
|
237
|
-
};
|
|
238
|
-
},
|
|
239
|
-
components: {
|
|
240
|
-
AppsIcon,
|
|
241
|
-
PlusIcon,
|
|
242
|
-
MinusIcon,
|
|
243
|
-
MessageDotsIcon,
|
|
244
|
-
ListIcon,
|
|
245
|
-
XIcon,
|
|
246
|
-
ChevronDownRightIcon,
|
|
247
|
-
GridLayout,
|
|
248
|
-
GridItem,
|
|
249
|
-
},
|
|
250
|
-
};
|
|
251
|
-
</script>
|