├── logs └── .gitkeep ├── app ├── cache │ └── .gitkeep ├── luclient │ └── .gitkeep ├── static │ ├── css │ │ └── .gitkeep │ ├── bootstrap-4.2.1 │ │ └── scss │ │ │ ├── utilities │ │ │ ├── _clearfix.scss │ │ │ ├── _overflow.scss │ │ │ ├── _screenreaders.scss │ │ │ ├── _visibility.scss │ │ │ ├── _shadows.scss │ │ │ ├── _float.scss │ │ │ ├── _align.scss │ │ │ ├── _background.scss │ │ │ ├── _sizing.scss │ │ │ ├── _position.scss │ │ │ ├── _embed.scss │ │ │ ├── _display.scss │ │ │ ├── _borders.scss │ │ │ ├── _text.scss │ │ │ ├── _spacing.scss │ │ │ └── _flex.scss │ │ │ ├── _media.scss │ │ │ ├── mixins │ │ │ ├── _box-shadow.scss │ │ │ ├── _size.scss │ │ │ ├── _clearfix.scss │ │ │ ├── _visibility.scss │ │ │ ├── _lists.scss │ │ │ ├── _text-truncate.scss │ │ │ ├── _resize.scss │ │ │ ├── _float.scss │ │ │ ├── _badge.scss │ │ │ ├── _alert.scss │ │ │ ├── _nav-divider.scss │ │ │ ├── _text-emphasis.scss │ │ │ ├── _transition.scss │ │ │ ├── _text-hide.scss │ │ │ ├── _list-group.scss │ │ │ ├── _pagination.scss │ │ │ ├── _background-variant.scss │ │ │ ├── _reset-text.scss │ │ │ ├── _border-radius.scss │ │ │ ├── _screen-reader.scss │ │ │ ├── _hover.scss │ │ │ ├── _table-row.scss │ │ │ ├── _image.scss │ │ │ ├── _caret.scss │ │ │ ├── _grid.scss │ │ │ ├── _grid-framework.scss │ │ │ ├── _gradients.scss │ │ │ └── _buttons.scss │ │ │ ├── _transitions.scss │ │ │ ├── _jumbotron.scss │ │ │ ├── bootstrap-reboot.scss │ │ │ ├── _utilities.scss │ │ │ ├── _root.scss │ │ │ ├── bootstrap-grid.scss │ │ │ ├── _progress.scss │ │ │ ├── bootstrap.scss │ │ │ ├── _mixins.scss │ │ │ ├── _toasts.scss │ │ │ ├── _code.scss │ │ │ ├── _spinners.scss │ │ │ ├── _close.scss │ │ │ ├── _grid.scss │ │ │ ├── _badge.scss │ │ │ ├── _images.scss │ │ │ ├── _alert.scss │ │ │ ├── _breadcrumb.scss │ │ │ ├── _pagination.scss │ │ │ ├── _nav.scss │ │ │ ├── _type.scss │ │ │ ├── _functions.scss │ │ │ ├── _tooltip.scss │ │ │ ├── _buttons.scss │ │ │ ├── _list-group.scss │ │ │ └── _print.scss │ ├── logo │ │ ├── logo.png │ │ └── favicon.ico │ ├── font-awesome │ │ ├── webfonts │ │ │ ├── fa-brands-400.eot │ │ │ ├── fa-brands-400.ttf │ │ │ ├── fa-solid-900.eot │ │ │ ├── fa-solid-900.ttf │ │ │ ├── fa-solid-900.woff │ │ │ ├── fa-brands-400.woff │ │ │ ├── fa-brands-400.woff2 │ │ │ ├── fa-regular-400.eot │ │ │ ├── fa-regular-400.ttf │ │ │ ├── fa-regular-400.woff │ │ │ ├── fa-solid-900.woff2 │ │ │ └── fa-regular-400.woff2 │ │ ├── attribution.js │ │ └── LICENSE.txt │ ├── lddviewer │ │ ├── main.css │ │ └── base64-binary.js │ └── scss │ │ └── site.scss ├── templates │ ├── partials │ │ ├── _mail.html.j2 │ │ ├── charxml │ │ │ ├── _inventory.html.j2 │ │ │ ├── _zone_stats.html.j2 │ │ │ ├── _inv_grid.html.j2 │ │ │ ├── _stats.html.j2 │ │ │ └── _item_tooltip.html.j2 │ │ ├── _loading.html │ │ ├── _gm_level.html.j2 │ │ └── _property_content.html.j2 │ ├── logs │ │ ├── system.html.j2 │ │ ├── command.html.j2 │ │ ├── audit.html.j2 │ │ └── activity.html.j2 │ ├── flask_user │ │ ├── _common_base.html │ │ ├── _macros.html │ │ ├── register.html │ │ ├── login_or_register.html │ │ └── login.html │ ├── status_codes │ │ └── 500.html.j2 │ ├── character │ │ ├── rescue.html.j2 │ │ ├── upload.html.j2 │ │ ├── view.html.j2 │ │ └── index.html.j2 │ ├── accounts │ │ ├── edit_email.html.j2 │ │ ├── edit_gm_level.html.j2 │ │ ├── view.html.j2 │ │ └── index.html.j2 │ ├── play_keys │ │ ├── bulk.html.j2 │ │ ├── edit.html.j2 │ │ ├── index.html.j2 │ │ └── view.html.j2 │ ├── properties │ │ ├── reject.html.j2 │ │ ├── view.html.j2 │ │ └── index.html.j2 │ ├── bug_reports │ │ ├── index.html.j2 │ │ ├── resolve.html.j2 │ │ └── view.html.j2 │ ├── reports │ │ ├── uscore │ │ │ └── by_date.html.j2 │ │ ├── currency │ │ │ └── by_date.html.j2 │ │ ├── index.html.j2 │ │ ├── items │ │ │ └── by_date.html.j2 │ │ └── graph.html.j2 │ ├── main │ │ ├── index.html.j2 │ │ ├── data_download.html.j2 │ │ ├── about.html.j2 │ │ └── account_creation.html.j2 │ ├── mail │ │ └── send.html.j2 │ ├── _formhelpers.jinja2 │ ├── moderation │ │ └── index.html.j2 │ └── base.html.j2 ├── api.py ├── main.py ├── settings_example.py └── mail.py ├── property_files └── .gitkeep ├── migrations ├── README ├── script.py.mako ├── versions │ ├── b470795db8e1_make_pet_owner_not_a_forein_key.py │ ├── 8a2966b9f7ee_add_column_to_track_times_key_uses.py │ ├── e3e8e05f27ee_pet_owners.py │ ├── aee4c6c24811_reports.py │ ├── a6e42ef03da7_force_play_key_id_to_be_nullable.py │ ├── bd908969d8fe_add_audit_log_table.py │ ├── 3132aaef7413_fix_nullables.py │ ├── 8e52b5c7568a_reporter_id.py │ └── fa97b0d0c351_property_performance_index.py ├── alembic.ini └── env.py ├── entrypoint.bat ├── .dockerignore ├── pylama.ini ├── .gitattributes ├── entrypoint.sh ├── .gitignore ├── requirements.txt ├── Dockerfile ├── wsgi.py ├── .editorconfig ├── .github └── workflows │ └── ci.yml └── Jenkinsfile /logs/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/cache/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/luclient/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/static/css/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /property_files/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/templates/partials/_mail.html.j2: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /migrations/README: -------------------------------------------------------------------------------- 1 | Single-database configuration for Flask. 2 | -------------------------------------------------------------------------------- /entrypoint.bat: -------------------------------------------------------------------------------- 1 | python3 -m flask db upgrade 2 | python3 wsgi.py 3 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | credentials.py 2 | .idea/ 3 | __pycache__/ 4 | venv/ 5 | .git/ -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/utilities/_clearfix.scss: -------------------------------------------------------------------------------- 1 | .clearfix { 2 | @include clearfix(); 3 | } 4 | -------------------------------------------------------------------------------- /app/static/logo/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DarkflameUniverse/NexusDashboard/HEAD/app/static/logo/logo.png -------------------------------------------------------------------------------- /app/static/logo/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DarkflameUniverse/NexusDashboard/HEAD/app/static/logo/favicon.ico -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/_media.scss: -------------------------------------------------------------------------------- 1 | .media { 2 | display: flex; 3 | align-items: flex-start; 4 | } 5 | 6 | .media-body { 7 | flex: 1; 8 | } 9 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/mixins/_box-shadow.scss: -------------------------------------------------------------------------------- 1 | @mixin box-shadow($shadow...) { 2 | @if $enable-shadows { 3 | box-shadow: $shadow; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /app/static/font-awesome/webfonts/fa-brands-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DarkflameUniverse/NexusDashboard/HEAD/app/static/font-awesome/webfonts/fa-brands-400.eot -------------------------------------------------------------------------------- /app/static/font-awesome/webfonts/fa-brands-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DarkflameUniverse/NexusDashboard/HEAD/app/static/font-awesome/webfonts/fa-brands-400.ttf -------------------------------------------------------------------------------- /app/static/font-awesome/webfonts/fa-solid-900.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DarkflameUniverse/NexusDashboard/HEAD/app/static/font-awesome/webfonts/fa-solid-900.eot -------------------------------------------------------------------------------- /app/static/font-awesome/webfonts/fa-solid-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DarkflameUniverse/NexusDashboard/HEAD/app/static/font-awesome/webfonts/fa-solid-900.ttf -------------------------------------------------------------------------------- /app/static/font-awesome/webfonts/fa-solid-900.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DarkflameUniverse/NexusDashboard/HEAD/app/static/font-awesome/webfonts/fa-solid-900.woff -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/mixins/_size.scss: -------------------------------------------------------------------------------- 1 | // Sizing shortcuts 2 | 3 | @mixin size($width, $height: $width) { 4 | width: $width; 5 | height: $height; 6 | } 7 | -------------------------------------------------------------------------------- /app/static/font-awesome/webfonts/fa-brands-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DarkflameUniverse/NexusDashboard/HEAD/app/static/font-awesome/webfonts/fa-brands-400.woff -------------------------------------------------------------------------------- /app/static/font-awesome/webfonts/fa-brands-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DarkflameUniverse/NexusDashboard/HEAD/app/static/font-awesome/webfonts/fa-brands-400.woff2 -------------------------------------------------------------------------------- /app/static/font-awesome/webfonts/fa-regular-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DarkflameUniverse/NexusDashboard/HEAD/app/static/font-awesome/webfonts/fa-regular-400.eot -------------------------------------------------------------------------------- /app/static/font-awesome/webfonts/fa-regular-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DarkflameUniverse/NexusDashboard/HEAD/app/static/font-awesome/webfonts/fa-regular-400.ttf -------------------------------------------------------------------------------- /app/static/font-awesome/webfonts/fa-regular-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DarkflameUniverse/NexusDashboard/HEAD/app/static/font-awesome/webfonts/fa-regular-400.woff -------------------------------------------------------------------------------- /app/static/font-awesome/webfonts/fa-solid-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DarkflameUniverse/NexusDashboard/HEAD/app/static/font-awesome/webfonts/fa-solid-900.woff2 -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/mixins/_clearfix.scss: -------------------------------------------------------------------------------- 1 | @mixin clearfix() { 2 | &::after { 3 | display: block; 4 | clear: both; 5 | content: ""; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /app/static/font-awesome/webfonts/fa-regular-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DarkflameUniverse/NexusDashboard/HEAD/app/static/font-awesome/webfonts/fa-regular-400.woff2 -------------------------------------------------------------------------------- /pylama.ini: -------------------------------------------------------------------------------- 1 | [pylama] 2 | ignore = D203, D212, D213, D406, D407, D408, D409, D100, D104, D401, F722 3 | max_line_length = 160 4 | 5 | [pylama:mccabe] 6 | max-complexity = 35 7 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/utilities/_overflow.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | @each $value in $overflows { 4 | .overflow-#{$value} { overflow: $value !important; } 5 | } 6 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/mixins/_visibility.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // Visibility 4 | 5 | @mixin invisible($visibility) { 6 | visibility: $visibility !important; 7 | } 8 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | app/static/bootstrap-4.2.1/* linguist-vendored=true 2 | app/static/datatables/* linguist-vendored=true 3 | app/static/font-awesome/* linguist-vendored=true 4 | app/static/chartjs/* linguist-vendored=true 5 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/utilities/_screenreaders.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Screenreaders 3 | // 4 | 5 | .sr-only { 6 | @include sr-only(); 7 | } 8 | 9 | .sr-only-focusable { 10 | @include sr-only-focusable(); 11 | } 12 | -------------------------------------------------------------------------------- /app/static/font-awesome/attribution.js: -------------------------------------------------------------------------------- 1 | console.log(`Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com 2 | License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) 3 | `) -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/utilities/_visibility.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Visibility utilities 3 | // 4 | 5 | .visible { 6 | @include invisible(visible); 7 | } 8 | 9 | .invisible { 10 | @include invisible(hidden); 11 | } 12 | -------------------------------------------------------------------------------- /entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # TODO: preconvert images options 4 | # TODO: preconvery models options 5 | 6 | # update the DB 7 | flask db upgrade 8 | 9 | # RUNNNNNNNNNNNNN 10 | gunicorn -b :8000 -w 4 wsgi:app 11 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/mixins/_lists.scss: -------------------------------------------------------------------------------- 1 | // Lists 2 | 3 | // Unstyled keeps list items block level, just removes default browser padding and list-style 4 | @mixin list-unstyled { 5 | padding-left: 0; 6 | list-style: none; 7 | } 8 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/mixins/_text-truncate.scss: -------------------------------------------------------------------------------- 1 | // Text truncate 2 | // Requires inline-block or block for proper styling 3 | 4 | @mixin text-truncate() { 5 | overflow: hidden; 6 | text-overflow: ellipsis; 7 | white-space: nowrap; 8 | } 9 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/mixins/_resize.scss: -------------------------------------------------------------------------------- 1 | // Resize anything 2 | 3 | @mixin resizable($direction) { 4 | overflow: auto; // Per CSS3 UI, `resize` only applies when `overflow` isn't `visible` 5 | resize: $direction; // Options: horizontal, vertical, both 6 | } 7 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/mixins/_float.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | @mixin float-left { 4 | float: left !important; 5 | } 6 | @mixin float-right { 7 | float: right !important; 8 | } 9 | @mixin float-none { 10 | float: none !important; 11 | } 12 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/mixins/_badge.scss: -------------------------------------------------------------------------------- 1 | @mixin badge-variant($bg) { 2 | color: color-yiq($bg); 3 | background-color: $bg; 4 | 5 | @at-root a#{&} { 6 | @include hover-focus { 7 | color: color-yiq($bg); 8 | background-color: darken($bg, 10%); 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/utilities/_shadows.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | .shadow-sm { box-shadow: $box-shadow-sm !important; } 4 | .shadow { box-shadow: $box-shadow !important; } 5 | .shadow-lg { box-shadow: $box-shadow-lg !important; } 6 | .shadow-none { box-shadow: none !important; } 7 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/mixins/_alert.scss: -------------------------------------------------------------------------------- 1 | @mixin alert-variant($background, $border, $color) { 2 | color: $color; 3 | @include gradient-bg($background); 4 | border-color: $border; 5 | 6 | hr { 7 | border-top-color: darken($border, 5%); 8 | } 9 | 10 | .alert-link { 11 | color: darken($color, 10%); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/mixins/_nav-divider.scss: -------------------------------------------------------------------------------- 1 | // Horizontal dividers 2 | // 3 | // Dividers (basically an hr) within dropdowns and nav lists 4 | 5 | @mixin nav-divider($color: $nav-divider-color, $margin-y: $nav-divider-margin-y) { 6 | height: 0; 7 | margin: $margin-y 0; 8 | overflow: hidden; 9 | border-top: 1px solid $color; 10 | } 11 | -------------------------------------------------------------------------------- /app/templates/logs/system.html.j2: -------------------------------------------------------------------------------- 1 | {% extends 'base.html.j2' %} 2 | 3 | {% block title %}LOGS{% endblock %} 4 | 5 | {% block content_before %} 6 | LOGS - {{ config.APP_NAME }} 7 | {% endblock %} 8 | 9 | {% block content_override %} 10 |
11 | 12 | {{ logs }} 13 | 14 |
15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/utilities/_float.scss: -------------------------------------------------------------------------------- 1 | @each $breakpoint in map-keys($grid-breakpoints) { 2 | @include media-breakpoint-up($breakpoint) { 3 | $infix: breakpoint-infix($breakpoint, $grid-breakpoints); 4 | 5 | .float#{$infix}-left { @include float-left; } 6 | .float#{$infix}-right { @include float-right; } 7 | .float#{$infix}-none { @include float-none; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/mixins/_text-emphasis.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // Typography 4 | 5 | @mixin text-emphasis-variant($parent, $color) { 6 | #{$parent} { 7 | color: $color !important; 8 | } 9 | a#{$parent} { 10 | @include hover-focus { 11 | color: darken($color, $emphasized-link-hover-darken-percentage) !important; 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | credentials.py 2 | resources.py 3 | .idea/ 4 | __pycache__/ 5 | venv/ 6 | static/policy/ 7 | app/static/css/site.css 8 | app/static/.webassets-cache/**/* 9 | app/static/brickdb/* 10 | locale.json 11 | app/static/ldddb/* 12 | .vscode/settings.json 13 | locale.xml 14 | app/luclient/* 15 | app/cache/* 16 | property_files/* 17 | *.log 18 | app/settings.py 19 | *.exe 20 | *.csv 21 | *.sql 22 | bin 23 | lib 24 | include 25 | -------------------------------------------------------------------------------- /app/templates/partials/charxml/_inventory.html.j2: -------------------------------------------------------------------------------- 1 | {% if inventory.i is iterable and (inventory.i is not string and inventory.i is not mapping) %} 2 | {% for inv_item in inventory.i %} 3 | {% include 'partials/charxml/_inv_grid.html.j2' %} 4 | {% endfor %} 5 | {% else %} 6 | {% with inv_item=inventory.i %} 7 | {% include 'partials/charxml/_inv_grid.html.j2' %} 8 | {% endwith %} 9 | {% endif %} 10 | -------------------------------------------------------------------------------- /app/templates/flask_user/_common_base.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html.j2' %} 2 | 3 | {% block content_override %} 4 |
5 |
6 |
7 | {% block content %} 8 | {% endblock %} 9 |
10 |
11 |
12 | {% endblock %} 13 | 14 | {% block footer %}{% endblock %} 15 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/_transitions.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable selector-no-qualifying-type 2 | 3 | .fade { 4 | @include transition($transition-fade); 5 | 6 | &:not(.show) { 7 | opacity: 0; 8 | } 9 | } 10 | 11 | .collapse { 12 | &:not(.show) { 13 | display: none; 14 | } 15 | } 16 | 17 | .collapsing { 18 | position: relative; 19 | height: 0; 20 | overflow: hidden; 21 | @include transition($transition-collapse); 22 | } 23 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | alembic==1.7.5 2 | autopep8==1.6.0 3 | bcrypt==4.0.1 4 | email-validator==1.1.3 5 | Flask==3.0.0 6 | Flask-APScheduler==1.12.3 7 | Flask-Assets==2.1.0 8 | Flask-Migrate==3.1.0 9 | Flask-SQLAlchemy==3.1.1 10 | Flask-User==1.0.2.2 11 | Flask-WTF==1.2.1 12 | gunicorn==21.2.0 13 | libsass==0.21.0 14 | PyMySQL==1.0.2 15 | SQLAlchemy==2.0.40 16 | sqlalchemy-datatables==2.0.1 17 | Wand==0.6.7 18 | webassets==2.0 19 | Werkzeug==3.0.1 20 | WTForms==3.0.0 21 | xmltodict==0.12.0 22 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/_jumbotron.scss: -------------------------------------------------------------------------------- 1 | .jumbotron { 2 | padding: $jumbotron-padding ($jumbotron-padding / 2); 3 | margin-bottom: $jumbotron-padding; 4 | background-color: $jumbotron-bg; 5 | @include border-radius($border-radius-lg); 6 | 7 | @include media-breakpoint-up(sm) { 8 | padding: ($jumbotron-padding * 2) $jumbotron-padding; 9 | } 10 | } 11 | 12 | .jumbotron-fluid { 13 | padding-right: 0; 14 | padding-left: 0; 15 | @include border-radius(0); 16 | } 17 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/utilities/_align.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | .align-baseline { vertical-align: baseline !important; } // Browser default 4 | .align-top { vertical-align: top !important; } 5 | .align-middle { vertical-align: middle !important; } 6 | .align-bottom { vertical-align: bottom !important; } 7 | .align-text-bottom { vertical-align: text-bottom !important; } 8 | .align-text-top { vertical-align: text-top !important; } 9 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/mixins/_transition.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable property-blacklist 2 | @mixin transition($transition...) { 3 | @if $enable-transitions { 4 | @if length($transition) == 0 { 5 | transition: $transition-base; 6 | } @else { 7 | transition: $transition; 8 | } 9 | } 10 | 11 | @if $enable-prefers-reduced-motion-media-query { 12 | @media screen and (prefers-reduced-motion: reduce) { 13 | transition: none; 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/mixins/_text-hide.scss: -------------------------------------------------------------------------------- 1 | // CSS image replacement 2 | @mixin text-hide($ignore-warning: false) { 3 | // stylelint-disable-next-line font-family-no-missing-generic-family-keyword 4 | font: 0/0 a; 5 | color: transparent; 6 | text-shadow: none; 7 | background-color: transparent; 8 | border: 0; 9 | 10 | @if ($ignore-warning != true) { 11 | @warn "The `text-hide()` mixin has been deprecated as of v4.1.0. It will be removed entirely in v5."; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax=docker/dockerfile:1 2 | 3 | FROM python:3.11-slim-bookworm 4 | 5 | RUN apt update 6 | RUN apt -y install zip 7 | RUN apt -y install imagemagick 8 | 9 | COPY requirements.txt requirements.txt 10 | 11 | RUN pip install -r requirements.txt 12 | RUN pip install gunicorn 13 | 14 | COPY wsgi.py wsgi.py 15 | COPY entrypoint.sh entrypoint.sh 16 | COPY ./app /app 17 | COPY ./migrations /migrations 18 | 19 | EXPOSE 8000 20 | RUN chmod +x entrypoint.sh 21 | ENTRYPOINT ["/entrypoint.sh"] 22 | -------------------------------------------------------------------------------- /app/templates/status_codes/500.html.j2: -------------------------------------------------------------------------------- 1 | {% extends 'base.html.j2' %} 2 | 3 | {% block title %}ERROR{% endblock %} 4 | 5 | {% block content_before %} 6 | ERROR - {{ config.APP_NAME }} 7 | {% endblock %} 8 | 9 | {% block content %} 10 | {% if current_user.gm_level == 9 %} 11 | 12 | {{ exception }} 13 | 14 | {% else %} 15 |

An Error has Occurred!!!

16 |
Please Report this to an Admin
17 | {% endif %} 18 | {% endblock %} 19 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/bootstrap-reboot.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Reboot v4.2.1 (https://getbootstrap.com/) 3 | * Copyright 2011-2018 The Bootstrap Authors 4 | * Copyright 2011-2018 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) 7 | */ 8 | 9 | @import "functions"; 10 | @import "variables"; 11 | @import "mixins"; 12 | @import "reboot"; 13 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/utilities/_background.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | @each $color, $value in $theme-colors { 4 | @include bg-variant(".bg-#{$color}", $value); 5 | } 6 | 7 | @if $enable-gradients { 8 | @each $color, $value in $theme-colors { 9 | @include bg-gradient-variant(".bg-gradient-#{$color}", $value); 10 | } 11 | } 12 | 13 | .bg-white { 14 | background-color: $white !important; 15 | } 16 | 17 | .bg-transparent { 18 | background-color: transparent !important; 19 | } 20 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/mixins/_list-group.scss: -------------------------------------------------------------------------------- 1 | // List Groups 2 | 3 | @mixin list-group-item-variant($state, $background, $color) { 4 | .list-group-item-#{$state} { 5 | color: $color; 6 | background-color: $background; 7 | 8 | &.list-group-item-action { 9 | @include hover-focus { 10 | color: $color; 11 | background-color: darken($background, 5%); 12 | } 13 | 14 | &.active { 15 | color: $white; 16 | background-color: $color; 17 | border-color: $color; 18 | } 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/_utilities.scss: -------------------------------------------------------------------------------- 1 | @import "utilities/align"; 2 | @import "utilities/background"; 3 | @import "utilities/borders"; 4 | @import "utilities/clearfix"; 5 | @import "utilities/display"; 6 | @import "utilities/embed"; 7 | @import "utilities/flex"; 8 | @import "utilities/float"; 9 | @import "utilities/overflow"; 10 | @import "utilities/position"; 11 | @import "utilities/screenreaders"; 12 | @import "utilities/shadows"; 13 | @import "utilities/sizing"; 14 | @import "utilities/spacing"; 15 | @import "utilities/text"; 16 | @import "utilities/visibility"; 17 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/mixins/_pagination.scss: -------------------------------------------------------------------------------- 1 | // Pagination 2 | 3 | @mixin pagination-size($padding-y, $padding-x, $font-size, $line-height, $border-radius) { 4 | .page-link { 5 | padding: $padding-y $padding-x; 6 | font-size: $font-size; 7 | line-height: $line-height; 8 | } 9 | 10 | .page-item { 11 | &:first-child { 12 | .page-link { 13 | @include border-left-radius($border-radius); 14 | } 15 | } 16 | &:last-child { 17 | .page-link { 18 | @include border-right-radius($border-radius); 19 | } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/mixins/_background-variant.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // Contextual backgrounds 4 | 5 | @mixin bg-variant($parent, $color) { 6 | #{$parent} { 7 | background-color: $color !important; 8 | } 9 | a#{$parent}, 10 | button#{$parent} { 11 | @include hover-focus { 12 | background-color: darken($color, 10%) !important; 13 | } 14 | } 15 | } 16 | 17 | @mixin bg-gradient-variant($parent, $color) { 18 | #{$parent} { 19 | background: $color linear-gradient(180deg, mix($body-bg, $color, 15%), $color) repeat-x !important; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /migrations/script.py.mako: -------------------------------------------------------------------------------- 1 | """${message} 2 | 3 | Revision ID: ${up_revision} 4 | Revises: ${down_revision | comma,n} 5 | Create Date: ${create_date} 6 | 7 | """ 8 | from alembic import op 9 | import sqlalchemy as sa 10 | ${imports if imports else ""} 11 | 12 | # revision identifiers, used by Alembic. 13 | revision = ${repr(up_revision)} 14 | down_revision = ${repr(down_revision)} 15 | branch_labels = ${repr(branch_labels)} 16 | depends_on = ${repr(depends_on)} 17 | 18 | 19 | def upgrade(): 20 | ${upgrades if upgrades else "pass"} 21 | 22 | 23 | def downgrade(): 24 | ${downgrades if downgrades else "pass"} 25 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/utilities/_sizing.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // Width and height 4 | 5 | @each $prop, $abbrev in (width: w, height: h) { 6 | @each $size, $length in $sizes { 7 | .#{$abbrev}-#{$size} { #{$prop}: $length !important; } 8 | } 9 | } 10 | 11 | .mw-100 { max-width: 100% !important; } 12 | .mh-100 { max-height: 100% !important; } 13 | 14 | // Viewport additional helpers 15 | 16 | .min-vw-100 { min-width: 100vw !important; } 17 | .min-vh-100 { min-height: 100vh !important; } 18 | 19 | .vw-100 { width: 100vw !important; } 20 | .vh-100 { height: 100vh !important; } 21 | -------------------------------------------------------------------------------- /app/templates/character/rescue.html.j2: -------------------------------------------------------------------------------- 1 | {% extends 'base.html.j2' %} 2 | 3 | {% block title %} 4 | Character Rescue 5 | {% endblock title %} 6 | 7 | {% block content_before %} 8 | Character Rescue 9 | {% endblock content_before %} 10 | 11 | {% block content %} 12 |
13 | {{ form.csrf_token }} 14 |
15 |
16 | {{ helper.render_field(form.save_world) }} 17 | {{ helper.render_submit_field(form.submit) }} 18 |
19 |
20 |
21 | {% endblock %} 22 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/mixins/_reset-text.scss: -------------------------------------------------------------------------------- 1 | @mixin reset-text { 2 | font-family: $font-family-base; 3 | // We deliberately do NOT reset font-size or word-wrap. 4 | font-style: normal; 5 | font-weight: $font-weight-normal; 6 | line-height: $line-height-base; 7 | text-align: left; // Fallback for where `start` is not supported 8 | text-align: start; // stylelint-disable-line declaration-block-no-duplicate-properties 9 | text-decoration: none; 10 | text-shadow: none; 11 | text-transform: none; 12 | letter-spacing: normal; 13 | word-break: normal; 14 | word-spacing: normal; 15 | white-space: normal; 16 | line-break: auto; 17 | } 18 | -------------------------------------------------------------------------------- /app/templates/accounts/edit_email.html.j2: -------------------------------------------------------------------------------- 1 | {% extends 'base.html.j2' %} 2 | 3 | {% block title %} 4 | Edit E-mail for User {{ username }} 5 | {% endblock title %} 6 | 7 | {% block content_before %} 8 | Edit E-mail for User {{ username }} 9 | {% endblock content_before %} 10 | 11 | {% block content %} 12 |
13 | {{ form.csrf_token }} 14 |
15 |
16 | {{ helper.render_field(form.email) }} 17 | {{ helper.render_submit_field(form.submit) }} 18 |
19 |
20 |
21 | {% endblock content %} 22 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/utilities/_position.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // Common values 4 | @each $position in $positions { 5 | .position-#{$position} { position: $position !important; } 6 | } 7 | 8 | // Shorthand 9 | 10 | .fixed-top { 11 | position: fixed; 12 | top: 0; 13 | right: 0; 14 | left: 0; 15 | z-index: $zindex-fixed; 16 | } 17 | 18 | .fixed-bottom { 19 | position: fixed; 20 | right: 0; 21 | bottom: 0; 22 | left: 0; 23 | z-index: $zindex-fixed; 24 | } 25 | 26 | .sticky-top { 27 | @supports (position: sticky) { 28 | position: sticky; 29 | top: 0; 30 | z-index: $zindex-sticky; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/templates/accounts/edit_gm_level.html.j2: -------------------------------------------------------------------------------- 1 | {% extends 'base.html.j2' %} 2 | 3 | {% block title %} 4 | Edit GM Level for User {{ username }} 5 | {% endblock title %} 6 | 7 | {% block content_before %} 8 | Edit GM Level for User {{ username }} 9 | {% endblock content_before %} 10 | 11 | {% block content %} 12 |
13 | {{ form.csrf_token }} 14 |
15 |
16 | {{ helper.render_field(form.gm_level) }} 17 | {{ helper.render_submit_field(form.submit) }} 18 |
19 |
20 |
21 | {% endblock content %} 22 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/_root.scss: -------------------------------------------------------------------------------- 1 | :root { 2 | // Custom variable values only support SassScript inside `#{}`. 3 | @each $color, $value in $colors { 4 | --#{$color}: #{$value}; 5 | } 6 | 7 | @each $color, $value in $theme-colors { 8 | --#{$color}: #{$value}; 9 | } 10 | 11 | @each $bp, $value in $grid-breakpoints { 12 | --breakpoint-#{$bp}: #{$value}; 13 | } 14 | 15 | // Use `inspect` for lists so that quoted items keep the quotes. 16 | // See https://github.com/sass/sass/issues/2383#issuecomment-336349172 17 | --font-family-sans-serif: #{inspect($font-family-sans-serif)}; 18 | --font-family-monospace: #{inspect($font-family-monospace)}; 19 | } 20 | -------------------------------------------------------------------------------- /app/templates/play_keys/bulk.html.j2: -------------------------------------------------------------------------------- 1 | {% extends 'base.html.j2' %} 2 | 3 | {% block title %} 4 | Bulk Play Key Creation 5 | {% endblock title %} 6 | 7 | {% block content_before %} 8 | Bulk Play Key Creation 9 | {% endblock content_before %} 10 | 11 | {% block content %} 12 |
13 | {{ form.csrf_token }} 14 |
15 |
16 | {{ helper.render_field(form.count) }} 17 | {{ helper.render_field(form.uses) }} 18 | {{ helper.render_submit_field(form.submit) }} 19 |
20 |
21 |
22 | {% endblock content %} 23 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/bootstrap-grid.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Grid v4.2.1 (https://getbootstrap.com/) 3 | * Copyright 2011-2018 The Bootstrap Authors 4 | * Copyright 2011-2018 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | */ 7 | 8 | html { 9 | box-sizing: border-box; 10 | -ms-overflow-style: scrollbar; 11 | } 12 | 13 | *, 14 | *::before, 15 | *::after { 16 | box-sizing: inherit; 17 | } 18 | 19 | @import "functions"; 20 | @import "variables"; 21 | 22 | @import "mixins/breakpoints"; 23 | @import "mixins/grid-framework"; 24 | @import "mixins/grid"; 25 | 26 | @import "grid"; 27 | @import "utilities/display"; 28 | @import "utilities/flex"; 29 | @import "utilities/spacing"; 30 | -------------------------------------------------------------------------------- /app/templates/play_keys/edit.html.j2: -------------------------------------------------------------------------------- 1 | {% extends 'base.html.j2' %} 2 | 3 | {% block title %} 4 | Edit Play Key {{ key.key_string }} 5 | {% endblock title %} 6 | 7 | {% block content_before %} 8 | Edit Play Key {{ key.key_string }} 9 | {% endblock content_before %} 10 | 11 | {% block content %} 12 |
13 | {{ form.csrf_token }} 14 |
15 |
16 | {{ helper.render_field(form.uses) }} 17 | {{ helper.render_checkbox_field(form.active) }} 18 | {{ helper.render_field(form.notes) }} 19 | {{ helper.render_submit_field(form.submit) }} 20 |
21 |
22 |
23 | {% endblock content %} 24 | -------------------------------------------------------------------------------- /app/templates/accounts/view.html.j2: -------------------------------------------------------------------------------- 1 | {% extends 'base.html.j2' %} 2 | 3 | {% block title %} 4 | Viewing {{ account_data.username }} 5 | {% endblock %} 6 | 7 | {% block content_before %} 8 | Viewing {{ account_data.username }} 9 | {% if current_user.id == account_data.id %} 10 |
11 | Hey, this is you! 12 | {% endif %} 13 | {% endblock %} 14 | 15 | {% block content %} 16 | {% include 'partials/_account.html.j2' %} 17 | {% endblock content %} 18 | 19 | 20 | {% block content_after %} 21 |
22 |
23 |

Characters

24 |
25 |
26 | {% for character in account_data.charinfo %} 27 | {% include 'partials/_character.html.j2' %} 28 | {% endfor %} 29 |
30 | {% endblock content_after %} 31 | -------------------------------------------------------------------------------- /app/api.py: -------------------------------------------------------------------------------- 1 | from flask import Blueprint, current_app, request 2 | 3 | api_blueprint = Blueprint('api', __name__) 4 | 5 | 6 | @api_blueprint.route('/web', methods=['GET', 'POST']) 7 | def web(): 8 | current_app.logger.info(f"API::WEB [DATA] {request.data}") 9 | return 10 | 11 | 12 | @api_blueprint.route('/game', methods=['GET', 'POST']) 13 | def game(): 14 | current_app.logger.info(f"API::GAME [DATA] {request.data}") 15 | return 16 | 17 | 18 | @api_blueprint.route('/game_content', methods=['GET', 'POST']) 19 | def game_content(): 20 | current_app.logger.info(f"API::GAME CONTENT [DATA] {request.data}") 21 | return 22 | 23 | 24 | @api_blueprint.route('/metrics_data_service', methods=['GET', 'POST']) 25 | def metrics_data_service(): 26 | current_app.logger.info(f"API::METRICS DATA SERVICE [DATA] {request.data}") 27 | return 28 | -------------------------------------------------------------------------------- /wsgi.py: -------------------------------------------------------------------------------- 1 | 2 | from app import create_app 3 | 4 | app = create_app() 5 | 6 | 7 | @app.shell_context_processor 8 | def make_shell_context(): 9 | """Extend the Flask shell context.""" 10 | return {'app': app} 11 | 12 | 13 | if __name__ == '__main__': 14 | with app.app_context(): 15 | app.run(host='0.0.0.0') 16 | else: 17 | import logging 18 | from logging.handlers import RotatingFileHandler 19 | gunicorn_logger = logging.getLogger('gunicorn.error') 20 | app.logger.handlers = gunicorn_logger.handlers 21 | file_handler = RotatingFileHandler('logs/nexus_dashboard.log', maxBytes=1024 * 1024 * 100, backupCount=20) 22 | formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s") 23 | file_handler.setFormatter(formatter) 24 | app.logger.addHandler(file_handler) 25 | app.logger.setLevel(gunicorn_logger.level) 26 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Unix-style newlines with a newline ending every file 7 | [*] 8 | end_of_line = lf 9 | insert_final_newline = true 10 | 11 | # Matches multiple files with brace expansion notation 12 | # Set default charset 13 | [*.{js,py}] 14 | charset = utf-8 15 | 16 | # 4 space indentation 17 | [*.py] 18 | indent_style = space 19 | indent_size = 4 20 | 21 | [{*.jinja2,*.html.j2}] 22 | indent_style = space 23 | indent_size = 2 24 | 25 | # Tab indentation (no size specified) 26 | [Makefile] 27 | indent_style = tab 28 | 29 | # Indentation override for all JS under lib directory 30 | [lib/**.js] 31 | indent_style = space 32 | indent_size = 2 33 | 34 | # Matches the exact files either package.json or .travis.yml 35 | [{package.json,.travis.yml}] 36 | indent_style = space 37 | indent_size = 2 38 | -------------------------------------------------------------------------------- /migrations/versions/b470795db8e1_make_pet_owner_not_a_forein_key.py: -------------------------------------------------------------------------------- 1 | """make pet owner not a forein key 2 | 3 | Revision ID: b470795db8e1 4 | Revises: e3e8e05f27ee 5 | Create Date: 2022-02-12 20:51:12.318782 6 | 7 | """ 8 | from alembic import op 9 | import sqlalchemy as sa 10 | 11 | 12 | # revision identifiers, used by Alembic. 13 | revision = 'b470795db8e1' 14 | down_revision = 'e3e8e05f27ee' 15 | branch_labels = None 16 | depends_on = None 17 | 18 | 19 | def upgrade(): 20 | # ### commands auto generated by Alembic - please adjust! ### 21 | op.drop_constraint('pet_names_ibfk_1', 'pet_names', type_='foreignkey') 22 | # ### end Alembic commands ### 23 | 24 | 25 | def downgrade(): 26 | # ### commands auto generated by Alembic - please adjust! ### 27 | op.create_foreign_key('pet_names_ibfk_1', 'pet_names', 'charinfo', ['owner_id'], ['id'], ondelete='CASCADE') 28 | # ### end Alembic commands ### 29 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/mixins/_border-radius.scss: -------------------------------------------------------------------------------- 1 | // Single side border-radius 2 | 3 | @mixin border-radius($radius: $border-radius) { 4 | @if $enable-rounded { 5 | border-radius: $radius; 6 | } 7 | } 8 | 9 | @mixin border-top-radius($radius) { 10 | @if $enable-rounded { 11 | border-top-left-radius: $radius; 12 | border-top-right-radius: $radius; 13 | } 14 | } 15 | 16 | @mixin border-right-radius($radius) { 17 | @if $enable-rounded { 18 | border-top-right-radius: $radius; 19 | border-bottom-right-radius: $radius; 20 | } 21 | } 22 | 23 | @mixin border-bottom-radius($radius) { 24 | @if $enable-rounded { 25 | border-bottom-right-radius: $radius; 26 | border-bottom-left-radius: $radius; 27 | } 28 | } 29 | 30 | @mixin border-left-radius($radius) { 31 | @if $enable-rounded { 32 | border-top-left-radius: $radius; 33 | border-bottom-left-radius: $radius; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/mixins/_screen-reader.scss: -------------------------------------------------------------------------------- 1 | // Only display content to screen readers 2 | // 3 | // See: https://a11yproject.com/posts/how-to-hide-content/ 4 | // See: https://hugogiraudel.com/2016/10/13/css-hide-and-seek/ 5 | 6 | @mixin sr-only { 7 | position: absolute; 8 | width: 1px; 9 | height: 1px; 10 | padding: 0; 11 | overflow: hidden; 12 | clip: rect(0, 0, 0, 0); 13 | white-space: nowrap; 14 | border: 0; 15 | } 16 | 17 | // Use in conjunction with .sr-only to only display content when it's focused. 18 | // 19 | // Useful for "Skip to main content" links; see https://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1 20 | // 21 | // Credit: HTML5 Boilerplate 22 | 23 | @mixin sr-only-focusable { 24 | &:active, 25 | &:focus { 26 | position: static; 27 | width: auto; 28 | height: auto; 29 | overflow: visible; 30 | clip: auto; 31 | white-space: normal; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /migrations/versions/8a2966b9f7ee_add_column_to_track_times_key_uses.py: -------------------------------------------------------------------------------- 1 | """add column to track times key uses 2 | 3 | Revision ID: 8a2966b9f7ee 4 | Revises: 712d42956a47 5 | Create Date: 2021-12-10 14:59:21.787133 6 | 7 | """ 8 | from alembic import op 9 | import sqlalchemy as sa 10 | from sqlalchemy.dialects import mysql 11 | 12 | # revision identifiers, used by Alembic. 13 | revision = '8a2966b9f7ee' 14 | down_revision = '712d42956a47' 15 | branch_labels = None 16 | depends_on = None 17 | 18 | 19 | def upgrade(): 20 | # ### commands auto generated by Alembic - please adjust! ### 21 | op.add_column('play_keys', sa.Column('times_used', mysql.INTEGER(), server_default='0', nullable=False)) 22 | # ### end Alembic commands ### 23 | 24 | 25 | def downgrade(): 26 | # ### commands auto generated by Alembic - please adjust! ### 27 | op.drop_column('play_keys', 'times_used') 28 | # ### end Alembic commands ### 29 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/mixins/_hover.scss: -------------------------------------------------------------------------------- 1 | // Hover mixin and `$enable-hover-media-query` are deprecated. 2 | // 3 | // Originally added during our alphas and maintained during betas, this mixin was 4 | // designed to prevent `:hover` stickiness on iOS-an issue where hover styles 5 | // would persist after initial touch. 6 | // 7 | // For backward compatibility, we've kept these mixins and updated them to 8 | // always return their regular pseudo-classes instead of a shimmed media query. 9 | // 10 | // Issue: https://github.com/twbs/bootstrap/issues/25195 11 | 12 | @mixin hover { 13 | &:hover { @content; } 14 | } 15 | 16 | @mixin hover-focus { 17 | &:hover, 18 | &:focus { 19 | @content; 20 | } 21 | } 22 | 23 | @mixin plain-hover-focus { 24 | &, 25 | &:hover, 26 | &:focus { 27 | @content; 28 | } 29 | } 30 | 31 | @mixin hover-focus-active { 32 | &:hover, 33 | &:focus, 34 | &:active { 35 | @content; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/templates/character/upload.html.j2: -------------------------------------------------------------------------------- 1 | {% extends 'base.html.j2' %} 2 | 3 | {% block title %} 4 | Character XML Upload 5 | {% endblock title %} 6 | 7 | {% block content_before %} 8 | Character XML Upload 9 | {% endblock content_before %} 10 | 11 | {% block content %} 12 | 24 | 25 |
26 | {{ form.csrf_token }} 27 |
28 |
29 | {{ helper.render_field(form.char_xml) }} 30 | {{ helper.render_submit_field(form.submit) }} 31 |
32 |
33 |
34 | {% endblock %} 35 | -------------------------------------------------------------------------------- /app/templates/properties/reject.html.j2: -------------------------------------------------------------------------------- 1 | {% extends 'base.html.j2' %} 2 | 3 | {% block title %} 4 | Viewing {{property_data.owner.name}}'s 5 | {% if property_data.name %} 6 | {{ property_data.name }} 7 | {% else %} 8 | {{ property_data.zone_id|get_zone_name }} 9 | {% endif %} 10 | {% endblock %} 11 | 12 | {% block content_before %} 13 | Viewing {{property_data.owner.name}}'s 14 | {% if property_data.name %} 15 | {{ property_data.name }} 16 | {% else %} 17 | {{ property_data.zone_id|get_zone_name }} 18 | {% endif %} 19 | {% endblock %} 20 | 21 | {% block content %} 22 |
23 | {{ form.csrf_token }} 24 |
25 |
26 | {{ helper.render_field(form.rejection_reason) }} 27 | {{ helper.render_submit_field(form.submit) }} 28 |
29 |
30 |
31 | {% endblock content %} 32 | 33 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/mixins/_table-row.scss: -------------------------------------------------------------------------------- 1 | // Tables 2 | 3 | @mixin table-row-variant($state, $background, $border: null) { 4 | // Exact selectors below required to override `.table-striped` and prevent 5 | // inheritance to nested tables. 6 | .table-#{$state} { 7 | &, 8 | > th, 9 | > td { 10 | background-color: $background; 11 | } 12 | 13 | @if $border != null { 14 | th, 15 | td, 16 | thead th, 17 | tbody + tbody { 18 | border-color: $border; 19 | } 20 | } 21 | } 22 | 23 | // Hover states for `.table-hover` 24 | // Note: this is not available for cells or rows within `thead` or `tfoot`. 25 | .table-hover { 26 | $hover-background: darken($background, 5%); 27 | 28 | .table-#{$state} { 29 | @include hover { 30 | background-color: $hover-background; 31 | 32 | > td, 33 | > th { 34 | background-color: $hover-background; 35 | } 36 | } 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /migrations/versions/e3e8e05f27ee_pet_owners.py: -------------------------------------------------------------------------------- 1 | """pet owners 2 | 3 | Revision ID: e3e8e05f27ee 4 | Revises: 3132aaef7413 5 | Create Date: 2022-02-11 23:18:20.978203 6 | 7 | """ 8 | from alembic import op 9 | import sqlalchemy as sa 10 | from sqlalchemy.dialects import mysql 11 | 12 | # revision identifiers, used by Alembic. 13 | revision = 'e3e8e05f27ee' 14 | down_revision = '3132aaef7413' 15 | branch_labels = None 16 | depends_on = None 17 | 18 | 19 | def upgrade(): 20 | # ### commands auto generated by Alembic - please adjust! ### 21 | op.add_column('pet_names', sa.Column('owner_id', mysql.BIGINT(), nullable=True)) 22 | op.create_foreign_key(None, 'pet_names', 'charinfo', ['owner_id'], ['id'], ondelete='CASCADE') 23 | # ### end Alembic commands ### 24 | 25 | 26 | def downgrade(): 27 | # ### commands auto generated by Alembic - please adjust! ### 28 | op.drop_constraint(None, 'pet_names', type_='foreignkey') 29 | op.drop_column('pet_names', 'owner_id') 30 | # ### end Alembic commands ### 31 | -------------------------------------------------------------------------------- /migrations/versions/aee4c6c24811_reports.py: -------------------------------------------------------------------------------- 1 | """reports 2 | 3 | Revision ID: aee4c6c24811 4 | Revises: 8a2966b9f7ee 5 | Create Date: 2022-01-16 20:12:39.816567 6 | 7 | """ 8 | from alembic import op 9 | import sqlalchemy as sa 10 | 11 | 12 | # revision identifiers, used by Alembic. 13 | revision = 'aee4c6c24811' 14 | down_revision = '8a2966b9f7ee' 15 | branch_labels = None 16 | depends_on = None 17 | 18 | 19 | def upgrade(): 20 | # ### commands auto generated by Alembic - please adjust! ### 21 | op.create_table('reports', 22 | sa.Column('data', sa.JSON(), nullable=False), 23 | sa.Column('report_type', sa.VARCHAR(length=35), autoincrement=False, nullable=False), 24 | sa.Column('date', sa.Date(), autoincrement=False, nullable=False), 25 | sa.PrimaryKeyConstraint('report_type', 'date') 26 | ) 27 | # ### end Alembic commands ### 28 | 29 | 30 | def downgrade(): 31 | # ### commands auto generated by Alembic - please adjust! ### 32 | op.drop_table('reports') 33 | # ### end Alembic commands ### 34 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/_progress.scss: -------------------------------------------------------------------------------- 1 | @keyframes progress-bar-stripes { 2 | from { background-position: $progress-height 0; } 3 | to { background-position: 0 0; } 4 | } 5 | 6 | .progress { 7 | display: flex; 8 | height: $progress-height; 9 | overflow: hidden; // force rounded corners by cropping it 10 | font-size: $progress-font-size; 11 | background-color: $progress-bg; 12 | @include border-radius($progress-border-radius); 13 | @include box-shadow($progress-box-shadow); 14 | } 15 | 16 | .progress-bar { 17 | display: flex; 18 | flex-direction: column; 19 | justify-content: center; 20 | color: $progress-bar-color; 21 | text-align: center; 22 | white-space: nowrap; 23 | background-color: $progress-bar-bg; 24 | @include transition($progress-bar-transition); 25 | } 26 | 27 | .progress-bar-striped { 28 | @include gradient-striped(); 29 | background-size: $progress-height $progress-height; 30 | } 31 | 32 | .progress-bar-animated { 33 | animation: progress-bar-stripes $progress-bar-animation-timing; 34 | } 35 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/utilities/_embed.scss: -------------------------------------------------------------------------------- 1 | // Credit: Nicolas Gallagher and SUIT CSS. 2 | 3 | .embed-responsive { 4 | position: relative; 5 | display: block; 6 | width: 100%; 7 | padding: 0; 8 | overflow: hidden; 9 | 10 | &::before { 11 | display: block; 12 | content: ""; 13 | } 14 | 15 | .embed-responsive-item, 16 | iframe, 17 | embed, 18 | object, 19 | video { 20 | position: absolute; 21 | top: 0; 22 | bottom: 0; 23 | left: 0; 24 | width: 100%; 25 | height: 100%; 26 | border: 0; 27 | } 28 | } 29 | 30 | @each $embed-responsive-aspect-ratio in $embed-responsive-aspect-ratios { 31 | $embed-responsive-aspect-ratio-x: nth($embed-responsive-aspect-ratio, 1); 32 | $embed-responsive-aspect-ratio-y: nth($embed-responsive-aspect-ratio, 2); 33 | 34 | .embed-responsive-#{$embed-responsive-aspect-ratio-x}by#{$embed-responsive-aspect-ratio-y} { 35 | &::before { 36 | padding-top: percentage($embed-responsive-aspect-ratio-y / $embed-responsive-aspect-ratio-x); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /migrations/versions/a6e42ef03da7_force_play_key_id_to_be_nullable.py: -------------------------------------------------------------------------------- 1 | """force play_key_id to be nullable 2 | 3 | Revision ID: a6e42ef03da7 4 | Revises: 8e52b5c7568a 5 | Create Date: 2022-11-29 19:14:22.645911 6 | 7 | """ 8 | from alembic import op 9 | import sqlalchemy as sa 10 | from sqlalchemy.dialects import mysql 11 | 12 | # revision identifiers, used by Alembic. 13 | revision = 'a6e42ef03da7' 14 | down_revision = '8e52b5c7568a' 15 | branch_labels = None 16 | depends_on = None 17 | 18 | 19 | def upgrade(): 20 | # ### commands auto generated by Alembic - please adjust! ### 21 | op.alter_column('accounts', 'play_key_id', 22 | existing_type=mysql.INTEGER(display_width=11), 23 | nullable=True) 24 | # ### end Alembic commands ### 25 | 26 | 27 | def downgrade(): 28 | # ### commands auto generated by Alembic - please adjust! ### 29 | op.alter_column('accounts', 'play_key_id', 30 | existing_type=mysql.INTEGER(display_width=11), 31 | nullable=False) 32 | # ### end Alembic commands ### 33 | 34 | -------------------------------------------------------------------------------- /app/templates/partials/charxml/_zone_stats.html.j2: -------------------------------------------------------------------------------- 1 |
2 |
3 | {{ zone.attr_map|get_zone_name }} 4 |
5 |
6 | 7 |
8 |
9 | Achievements Collected: 10 |
11 |
12 | {{ zone.attr_ac }} 13 |
14 |
15 | 16 |
17 |
18 | Bricks Collected: 19 |
20 |
21 | {{ zone.attr_bc }} 22 |
23 |
24 | 25 |
26 |
27 | Coins Collected: 28 |
29 |
30 | {{ zone.attr_cc }} 31 |
32 |
33 | 34 |
35 |
36 | Enemies Smashed: 37 |
38 |
39 | {{ zone.attr_es }} 40 |
41 |
42 | 43 |
44 |
45 | Quick Builds Collected: 46 |
47 |
48 | {{ zone.attr_qbc }} 49 |
50 |
51 | 52 | -------------------------------------------------------------------------------- /migrations/alembic.ini: -------------------------------------------------------------------------------- 1 | # A generic, single database configuration. 2 | 3 | [alembic] 4 | # template used to generate migration files 5 | # file_template = %%(rev)s_%%(slug)s 6 | 7 | # set to 'true' to run the environment during 8 | # the 'revision' command, regardless of autogenerate 9 | # revision_environment = false 10 | 11 | 12 | # Logging configuration 13 | [loggers] 14 | keys = root,sqlalchemy,alembic,flask_migrate 15 | 16 | [handlers] 17 | keys = console 18 | 19 | [formatters] 20 | keys = generic 21 | 22 | [logger_root] 23 | level = WARN 24 | handlers = console 25 | qualname = 26 | 27 | [logger_sqlalchemy] 28 | level = WARN 29 | handlers = 30 | qualname = sqlalchemy.engine 31 | 32 | [logger_alembic] 33 | level = INFO 34 | handlers = 35 | qualname = alembic 36 | 37 | [logger_flask_migrate] 38 | level = INFO 39 | handlers = 40 | qualname = flask_migrate 41 | 42 | [handler_console] 43 | class = StreamHandler 44 | args = (sys.stderr,) 45 | level = NOTSET 46 | formatter = generic 47 | 48 | [formatter_generic] 49 | format = %(levelname)-5.5s [%(name)s] %(message)s 50 | datefmt = %H:%M:%S 51 | -------------------------------------------------------------------------------- /app/templates/properties/view.html.j2: -------------------------------------------------------------------------------- 1 | {% extends 'base.html.j2' %} 2 | 3 | {% block title %} 4 | Viewing {{property_data.owner.name}}'s 5 | {% if property_data.name %} 6 | {{ property_data.name }} 7 | {% else %} 8 | {{ property_data.zone_id|get_zone_name }} 9 | {% endif %} 10 | {% endblock %} 11 | 12 | {% block content_before %} 13 | Viewing {{property_data.owner.name}}'s 14 | {% if property_data.name %} 15 | {{ property_data.name }} 16 | {% else %} 17 | {{ property_data.zone_id|get_zone_name }} 18 | {% endif %} 19 | {% endblock %} 20 | 21 | {% block content %} 22 | {% with property=property_data%} 23 | {% include 'partials/_property.html.j2' %} 24 | {% endwith %} 25 | {% endblock content %} 26 | 27 | {% block content_after %} 28 |
29 |
30 |

Property Content

31 |
32 |
33 | {% for item in property_data.properties_contents %} 34 | {% include 'partials/_property_content.html.j2' %} 35 | {% endfor %} 36 |
37 | 38 | {% endblock content_after %} 39 | 40 | -------------------------------------------------------------------------------- /app/templates/partials/charxml/_inv_grid.html.j2: -------------------------------------------------------------------------------- 1 |
2 | {{ inv_item.attr_l|get_lot_name }} 16 | {% if 'attr_c' in inv_item %} 17 | 18 | {%if inv_item.attr_c|int > 999 %} 19 | +999 20 | {% elif inv_item.attr_c|int > 1 %} 21 | {{ inv_item.attr_c }} 22 | {% endif %} 23 | 24 | {% endif %} 25 | {% if 'attr_b' in inv_item %} 26 | {% if inv_item.attr_b == "true" %} 27 | 28 | 29 | 30 | {% endif %} 31 | {% endif %} 32 |
33 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/bootstrap.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v4.2.1 (https://getbootstrap.com/) 3 | * Copyright 2011-2018 The Bootstrap Authors 4 | * Copyright 2011-2018 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | */ 7 | 8 | @import "functions"; 9 | @import "variables"; 10 | @import "mixins"; 11 | @import "root"; 12 | @import "reboot"; 13 | @import "type"; 14 | @import "images"; 15 | @import "code"; 16 | @import "grid"; 17 | @import "tables"; 18 | @import "forms"; 19 | @import "buttons"; 20 | @import "transitions"; 21 | @import "dropdown"; 22 | @import "button-group"; 23 | @import "input-group"; 24 | @import "custom-forms"; 25 | @import "nav"; 26 | @import "navbar"; 27 | @import "card"; 28 | @import "breadcrumb"; 29 | @import "pagination"; 30 | @import "badge"; 31 | @import "jumbotron"; 32 | @import "alert"; 33 | @import "progress"; 34 | @import "media"; 35 | @import "list-group"; 36 | @import "close"; 37 | @import "toasts"; 38 | @import "modal"; 39 | @import "tooltip"; 40 | @import "popover"; 41 | @import "carousel"; 42 | @import "spinners"; 43 | @import "utilities"; 44 | @import "print"; 45 | -------------------------------------------------------------------------------- /app/templates/partials/_loading.html: -------------------------------------------------------------------------------- 1 |
2 | Loading 0 3 |
4 |
5 | Loading 1 6 |
7 |
8 | Loading 2 9 |
10 |
11 | Loading 3 12 |
13 |
14 | Loading 4 15 |
16 |
17 | Loading 5 18 |
19 |
20 | Loading 6 21 |
-------------------------------------------------------------------------------- /app/templates/logs/command.html.j2: -------------------------------------------------------------------------------- 1 | {% extends 'base.html.j2' %} 2 | 3 | {% block title %} 4 | Command Log 5 | {% endblock title %} 6 | 7 | {% block content_before %} 8 | Command Log 9 | {% endblock content_before %} 10 | 11 | {% block content %} 12 | {% if message %} 13 |
14 |
15 |

{{ message }}

16 |
17 |
18 |
19 | {% endif %} 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 |
IDAccount:CharacterCommand
30 | {% endblock %} 31 | 32 | 33 | {% block js %} 34 | {{ super () }} 35 | 45 | {% endblock %} 46 | -------------------------------------------------------------------------------- /app/templates/logs/audit.html.j2: -------------------------------------------------------------------------------- 1 | {% extends 'base.html.j2' %} 2 | 3 | {% block title %} 4 | Audit Log 5 | {% endblock title %} 6 | 7 | {% block content_before %} 8 | Audit Log 9 | {% endblock content_before %} 10 | 11 | {% block content %} 12 | {% if message %} 13 |
14 |
15 |

{{ message }}

16 |
17 |
18 |
19 | {% endif %} 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 |
IDAccountCommandDate
31 | {% endblock %} 32 | 33 | 34 | {% block js %} 35 | {{ super () }} 36 | 46 | {% endblock %} 47 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/_mixins.scss: -------------------------------------------------------------------------------- 1 | // Toggles 2 | // 3 | // Used in conjunction with global variables to enable certain theme features. 4 | 5 | // Utilities 6 | @import "mixins/breakpoints"; 7 | @import "mixins/hover"; 8 | @import "mixins/image"; 9 | @import "mixins/badge"; 10 | @import "mixins/resize"; 11 | @import "mixins/screen-reader"; 12 | @import "mixins/size"; 13 | @import "mixins/reset-text"; 14 | @import "mixins/text-emphasis"; 15 | @import "mixins/text-hide"; 16 | @import "mixins/text-truncate"; 17 | @import "mixins/visibility"; 18 | 19 | // // Components 20 | @import "mixins/alert"; 21 | @import "mixins/buttons"; 22 | @import "mixins/caret"; 23 | @import "mixins/pagination"; 24 | @import "mixins/lists"; 25 | @import "mixins/list-group"; 26 | @import "mixins/nav-divider"; 27 | @import "mixins/forms"; 28 | @import "mixins/table-row"; 29 | 30 | // // Skins 31 | @import "mixins/background-variant"; 32 | @import "mixins/border-radius"; 33 | @import "mixins/box-shadow"; 34 | @import "mixins/gradients"; 35 | @import "mixins/transition"; 36 | 37 | // // Layout 38 | @import "mixins/clearfix"; 39 | @import "mixins/grid-framework"; 40 | @import "mixins/grid"; 41 | @import "mixins/float"; 42 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/_toasts.scss: -------------------------------------------------------------------------------- 1 | .toast { 2 | max-width: $toast-max-width; 3 | overflow: hidden; // cheap rounded corners on nested items 4 | font-size: $toast-font-size; // knock it down to 14px 5 | background-color: $toast-background-color; 6 | background-clip: padding-box; 7 | border: $toast-border-width solid $toast-border-color; 8 | border-radius: $toast-border-radius; 9 | box-shadow: $toast-box-shadow; 10 | backdrop-filter: blur(10px); 11 | opacity: 0; 12 | 13 | &:not(:last-child) { 14 | margin-bottom: $toast-padding-x; 15 | } 16 | 17 | &.showing { 18 | opacity: 1; 19 | } 20 | 21 | &.show { 22 | display: block; 23 | opacity: 1; 24 | } 25 | 26 | &.hide { 27 | display: none; 28 | } 29 | } 30 | 31 | .toast-header { 32 | display: flex; 33 | align-items: center; 34 | padding: $toast-padding-y $toast-padding-x; 35 | color: $toast-header-color; 36 | background-color: $toast-header-background-color; 37 | background-clip: padding-box; 38 | border-bottom: $toast-border-width solid $toast-header-border-color; 39 | } 40 | 41 | .toast-body { 42 | padding: $toast-padding-x; // apply to both vertical and horizontal 43 | } 44 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/_code.scss: -------------------------------------------------------------------------------- 1 | // Inline code 2 | code { 3 | font-size: $code-font-size; 4 | color: $code-color; 5 | word-break: break-word; 6 | 7 | // Streamline the style when inside anchors to avoid broken underline and more 8 | a > & { 9 | color: inherit; 10 | } 11 | } 12 | 13 | // User input typically entered via keyboard 14 | kbd { 15 | padding: $kbd-padding-y $kbd-padding-x; 16 | font-size: $kbd-font-size; 17 | color: $kbd-color; 18 | background-color: $kbd-bg; 19 | @include border-radius($border-radius-sm); 20 | @include box-shadow($kbd-box-shadow); 21 | 22 | kbd { 23 | padding: 0; 24 | font-size: 100%; 25 | font-weight: $nested-kbd-font-weight; 26 | @include box-shadow(none); 27 | } 28 | } 29 | 30 | // Blocks of code 31 | pre { 32 | display: block; 33 | font-size: $code-font-size; 34 | color: $pre-color; 35 | 36 | // Account for some code outputs that place code tags in pre tags 37 | code { 38 | font-size: inherit; 39 | color: inherit; 40 | word-break: normal; 41 | } 42 | } 43 | 44 | // Enable scrollable blocks of code 45 | .pre-scrollable { 46 | max-height: $pre-scrollable-max-height; 47 | overflow-y: scroll; 48 | } 49 | -------------------------------------------------------------------------------- /migrations/versions/bd908969d8fe_add_audit_log_table.py: -------------------------------------------------------------------------------- 1 | """Add audit_log table 2 | 3 | Revision ID: bd908969d8fe 4 | Revises: aee4c6c24811 5 | Create Date: 2022-02-11 21:48:03.798474 6 | 7 | """ 8 | from alembic import op 9 | import sqlalchemy as sa 10 | from sqlalchemy.dialects import mysql 11 | 12 | # revision identifiers, used by Alembic. 13 | revision = 'bd908969d8fe' 14 | down_revision = 'aee4c6c24811' 15 | branch_labels = None 16 | depends_on = None 17 | 18 | 19 | def upgrade(): 20 | # ### commands auto generated by Alembic - please adjust! ### 21 | op.create_table('audit_logs', 22 | sa.Column('id', mysql.INTEGER(), nullable=False), 23 | sa.Column('account_id', sa.Integer(), nullable=True), 24 | sa.Column('action', mysql.TEXT(), nullable=True), 25 | sa.Column('date', mysql.TIMESTAMP(), server_default=sa.text('now()'), nullable=False), 26 | sa.ForeignKeyConstraint(['account_id'], ['accounts.id'], ondelete='CASCADE'), 27 | sa.PrimaryKeyConstraint('id') 28 | ) 29 | # ### end Alembic commands ### 30 | 31 | 32 | def downgrade(): 33 | # ### commands auto generated by Alembic - please adjust! ### 34 | op.drop_table('audit_logs') 35 | # ### end Alembic commands ### 36 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/_spinners.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Rotating border 3 | // 4 | 5 | @keyframes spinner-border { 6 | to { transform: rotate(360deg); } 7 | } 8 | 9 | .spinner-border { 10 | display: inline-block; 11 | width: $spinner-width; 12 | height: $spinner-height; 13 | vertical-align: text-bottom; 14 | border: $spinner-border-width solid currentColor; 15 | border-right-color: transparent; 16 | border-radius: 50%; 17 | animation: spinner-border .75s linear infinite; 18 | } 19 | 20 | .spinner-border-sm { 21 | width: $spinner-width-sm; 22 | height: $spinner-height-sm; 23 | border-width: $spinner-border-width-sm; 24 | } 25 | 26 | // 27 | // Growing circle 28 | // 29 | 30 | @keyframes spinner-grow { 31 | 0% { 32 | transform: scale(0); 33 | } 34 | 50% { 35 | opacity: 1; 36 | } 37 | } 38 | 39 | .spinner-grow { 40 | display: inline-block; 41 | width: $spinner-width; 42 | height: $spinner-height; 43 | vertical-align: text-bottom; 44 | background-color: currentColor; 45 | border-radius: 50%; 46 | opacity: 0; 47 | animation: spinner-grow .75s linear infinite; 48 | } 49 | 50 | .spinner-grow-sm { 51 | width: $spinner-width-sm; 52 | height: $spinner-height-sm; 53 | } 54 | -------------------------------------------------------------------------------- /app/templates/logs/activity.html.j2: -------------------------------------------------------------------------------- 1 | {% extends 'base.html.j2' %} 2 | 3 | {% block title %} 4 | Activity Log 5 | {% endblock title %} 6 | 7 | {% block content_before %} 8 | Activity Log 9 | {% endblock content_before %} 10 | 11 | {% block content %} 12 | {% if message %} 13 |
14 |
15 |

{{ message }}

16 |
17 |
18 |
19 | {% endif %} 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
IDAccount:CharacterActivityTimeMap
32 | {% endblock %} 33 | 34 | 35 | {% block js %} 36 | {{ super () }} 37 | 47 | {% endblock %} 48 | -------------------------------------------------------------------------------- /app/templates/partials/charxml/_stats.html.j2: -------------------------------------------------------------------------------- 1 | {% if stat.life > 0 %} 2 | + {{ stat.life }} 3 | Health: 7 | {% endif %} 8 | 9 | {% if stat.armor > 0 %} 10 | + {{ stat.armor }} 11 | Armor: 15 | {% endif %} 16 | 17 | {% if stat.im > 0 %} 18 | + {{ stat.im }} 19 | Imagination: 23 | {% endif %} 24 | 25 | {% if stat.skill|length > 0 %} 26 | {% for skill in stat.skill %} 27 | {% set skill_desc = skill[0]|get_skill_desc %} 28 | {% if "IP" not in skill_desc and "AP" not in skill_desc and "LP" not in skill_desc and skill[0]|string not in skill_desc %} 29 |
30 | {% if skill[1]%} 31 | Skill: 35 | {% endif %} 36 | {{ skill[0]|get_skill_desc }} 37 |
38 | {% endif %} 39 | {% endfor %} 40 | {% endif %} 41 | -------------------------------------------------------------------------------- /app/templates/bug_reports/index.html.j2: -------------------------------------------------------------------------------- 1 | {% extends 'base.html.j2' %} 2 | 3 | {% block title %} 4 | {{ status|capitalize }} Bug Reports 5 | {% endblock title %} 6 | 7 | {% block content_before %} 8 | {{ status|capitalize }} Bug Reports 9 | {% endblock content_before %} 10 | 11 | {% block content_override %} 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
ActionsReporterBodyClient VersionOther PlayerTypeSubmittedResolved
28 |
29 | {% endblock %} 30 | 31 | 32 | {% block js %} 33 | {{ super () }} 34 | 43 | {% endblock %} 44 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/_close.scss: -------------------------------------------------------------------------------- 1 | .close { 2 | float: right; 3 | font-size: $close-font-size; 4 | font-weight: $close-font-weight; 5 | line-height: 1; 6 | color: $close-color; 7 | text-shadow: $close-text-shadow; 8 | opacity: .5; 9 | 10 | // Override 's hover style 11 | @include hover { 12 | color: $close-color; 13 | text-decoration: none; 14 | } 15 | 16 | &:not(:disabled):not(.disabled) { 17 | @include hover-focus { 18 | opacity: .75; 19 | } 20 | 21 | // Opinionated: add "hand" cursor to non-disabled .close elements 22 | cursor: pointer; 23 | } 24 | } 25 | 26 | // Additional properties for button version 27 | // iOS requires the button element instead of an anchor tag. 28 | // If you want the anchor version, it requires `href="#"`. 29 | // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile 30 | 31 | // stylelint-disable-next-line selector-no-qualifying-type 32 | button.close { 33 | padding: 0; 34 | background-color: transparent; 35 | border: 0; 36 | appearance: none; 37 | } 38 | 39 | // Future-proof disabling of clicks on `` elements 40 | 41 | // stylelint-disable-next-line selector-no-qualifying-type 42 | a.close.disabled { 43 | pointer-events: none; 44 | } 45 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/_grid.scss: -------------------------------------------------------------------------------- 1 | // Container widths 2 | // 3 | // Set the container width, and override it for fixed navbars in media queries. 4 | 5 | @if $enable-grid-classes { 6 | .container { 7 | @include make-container(); 8 | @include make-container-max-widths(); 9 | } 10 | } 11 | 12 | // Fluid container 13 | // 14 | // Utilizes the mixin meant for fixed width containers, but with 100% width for 15 | // fluid, full width layouts. 16 | 17 | @if $enable-grid-classes { 18 | .container-fluid { 19 | @include make-container(); 20 | } 21 | } 22 | 23 | // Row 24 | // 25 | // Rows contain and clear the floats of your columns. 26 | 27 | @if $enable-grid-classes { 28 | .row { 29 | @include make-row(); 30 | } 31 | 32 | // Remove the negative margin from default .row, then the horizontal padding 33 | // from all immediate children columns (to prevent runaway style inheritance). 34 | .no-gutters { 35 | margin-right: 0; 36 | margin-left: 0; 37 | 38 | > .col, 39 | > [class*="col-"] { 40 | padding-right: 0; 41 | padding-left: 0; 42 | } 43 | } 44 | } 45 | 46 | // Columns 47 | // 48 | // Common styles for small and large grid columns 49 | 50 | @if $enable-grid-classes { 51 | @include make-grid-columns(); 52 | } 53 | -------------------------------------------------------------------------------- /migrations/versions/3132aaef7413_fix_nullables.py: -------------------------------------------------------------------------------- 1 | """fix nullables 2 | 3 | Revision ID: 3132aaef7413 4 | Revises: bd908969d8fe 5 | Create Date: 2022-02-11 21:51:58.479066 6 | 7 | """ 8 | from alembic import op 9 | import sqlalchemy as sa 10 | from sqlalchemy.dialects import mysql 11 | 12 | # revision identifiers, used by Alembic. 13 | revision = '3132aaef7413' 14 | down_revision = 'bd908969d8fe' 15 | branch_labels = None 16 | depends_on = None 17 | 18 | 19 | def upgrade(): 20 | # ### commands auto generated by Alembic - please adjust! ### 21 | op.alter_column('audit_logs', 'account_id', 22 | existing_type=mysql.INTEGER(display_width=11), 23 | nullable=False) 24 | op.alter_column('audit_logs', 'action', 25 | existing_type=mysql.TEXT(), 26 | nullable=False) 27 | # ### end Alembic commands ### 28 | 29 | 30 | def downgrade(): 31 | # ### commands auto generated by Alembic - please adjust! ### 32 | op.alter_column('audit_logs', 'action', 33 | existing_type=mysql.TEXT(), 34 | nullable=True) 35 | op.alter_column('audit_logs', 'account_id', 36 | existing_type=mysql.INTEGER(display_width=11), 37 | nullable=True) 38 | # ### end Alembic commands ### 39 | -------------------------------------------------------------------------------- /app/templates/reports/uscore/by_date.html.j2: -------------------------------------------------------------------------------- 1 | {% extends 'base.html.j2' %} 2 | 3 | {% block title %} 4 | U-Score on {{ date }} 5 | {% endblock title %} 6 | 7 | {% block content_before %} 8 | U-Score on {{ date }} 9 | {% endblock content_before %} 10 | 11 | {% block content %} 12 |
13 | 16 | 17 | 20 | 23 | 24 | 25 | {% for name, uscore in data.items() %} 26 | 27 | 30 | 33 | 34 | 35 | {% endfor %} 36 | 37 |
18 | Character 19 | 21 | U-Score 22 |
28 | {{ name }} 29 | 31 | {{ uscore }} 32 |
38 |
39 | {% endblock %} 40 | 41 | {% block js %} 42 | {{ super () }} 43 | 51 | {% endblock %} 52 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/_badge.scss: -------------------------------------------------------------------------------- 1 | // Base class 2 | // 3 | // Requires one of the contextual, color modifier classes for `color` and 4 | // `background-color`. 5 | 6 | .badge { 7 | display: inline-block; 8 | padding: $badge-padding-y $badge-padding-x; 9 | font-size: $badge-font-size; 10 | font-weight: $badge-font-weight; 11 | line-height: 1; 12 | text-align: center; 13 | white-space: nowrap; 14 | vertical-align: baseline; 15 | @include border-radius($badge-border-radius); 16 | 17 | @at-root a#{&} { 18 | @include hover-focus { 19 | text-decoration: none; 20 | } 21 | } 22 | 23 | // Empty badges collapse automatically 24 | &:empty { 25 | display: none; 26 | } 27 | } 28 | 29 | // Quick fix for badges in buttons 30 | .btn .badge { 31 | position: relative; 32 | top: -1px; 33 | } 34 | 35 | // Pill badges 36 | // 37 | // Make them extra rounded with a modifier to replace v3's badges. 38 | 39 | .badge-pill { 40 | padding-right: $badge-pill-padding-x; 41 | padding-left: $badge-pill-padding-x; 42 | @include border-radius($badge-pill-border-radius); 43 | } 44 | 45 | // Colors 46 | // 47 | // Contextual variations (linked badges get darker on :hover). 48 | 49 | @each $color, $value in $theme-colors { 50 | .badge-#{$color} { 51 | @include badge-variant($value); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /app/templates/character/view.html.j2: -------------------------------------------------------------------------------- 1 | {% extends 'base.html.j2' %} 2 | 3 | {% block title %} 4 | Viewing {{ character_data.name }} 5 | {% endblock %} 6 | 7 | {% block content_before %} 8 | Viewing {{ character_data.name }} 9 | {% endblock %} 10 | 11 | {% block content %} 12 |
13 |
14 | {% with character=character_data%} 15 | {% include 'partials/_character.html.j2' %} 16 | {% endwith %} 17 |
18 |
19 | Loading Character Data 20 | {% include 'partials/_loading.html' %} 21 |
22 |
23 | {% endblock content %} 24 | 25 | {% block content_after %} 26 |
27 |
28 |

Properties

29 |
30 |
31 | {% for property in character_data.properties_owner %} 32 | {% include 'partials/_property.html.j2' %} 33 | {% endfor %} 34 |
35 | {% endblock content_after %} 36 | 37 | {% block js %} 38 | {{ super() }} 39 | 46 | {% endblock js %} 47 | -------------------------------------------------------------------------------- /app/templates/reports/currency/by_date.html.j2: -------------------------------------------------------------------------------- 1 | {% extends 'base.html.j2' %} 2 | 3 | {% block title %} 4 | Currency on {{ date }} 5 | {% endblock title %} 6 | 7 | {% block content_before %} 8 | Currency on {{ date }} 9 | {% endblock content_before %} 10 | 11 | {% block content %} 12 |
13 | 16 | 17 | 20 | 23 | 24 | 25 | {% for name, currency in data.items() %} 26 | 27 | 30 | 33 | 34 | 35 | {% endfor %} 36 | 37 |
18 | Character 19 | 21 | Currency 22 |
28 | {{ name }} 29 | 31 | {{ currency }} 32 |
38 |
39 | {% endblock %} 40 | 41 | {% block js %} 42 | {{ super () }} 43 | 51 | {% endblock %} 52 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/_images.scss: -------------------------------------------------------------------------------- 1 | // Responsive images (ensure images don't scale beyond their parents) 2 | // 3 | // This is purposefully opt-in via an explicit class rather than being the default for all ``s. 4 | // We previously tried the "images are responsive by default" approach in Bootstrap v2, 5 | // and abandoned it in Bootstrap v3 because it breaks lots of third-party widgets (including Google Maps) 6 | // which weren't expecting the images within themselves to be involuntarily resized. 7 | // See also https://github.com/twbs/bootstrap/issues/18178 8 | .img-fluid { 9 | @include img-fluid; 10 | } 11 | 12 | 13 | // Image thumbnails 14 | .img-thumbnail { 15 | padding: $thumbnail-padding; 16 | background-color: $thumbnail-bg; 17 | border: $thumbnail-border-width solid $thumbnail-border-color; 18 | @include border-radius($thumbnail-border-radius); 19 | @include box-shadow($thumbnail-box-shadow); 20 | 21 | // Keep them at most 100% wide 22 | @include img-fluid; 23 | } 24 | 25 | // 26 | // Figures 27 | // 28 | 29 | .figure { 30 | // Ensures the caption's text aligns with the image. 31 | display: inline-block; 32 | } 33 | 34 | .figure-img { 35 | margin-bottom: $spacer / 2; 36 | line-height: 1; 37 | } 38 | 39 | .figure-caption { 40 | font-size: $figure-caption-font-size; 41 | color: $figure-caption-color; 42 | } 43 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/mixins/_image.scss: -------------------------------------------------------------------------------- 1 | // Image Mixins 2 | // - Responsive image 3 | // - Retina image 4 | 5 | 6 | // Responsive image 7 | // 8 | // Keep images from scaling beyond the width of their parents. 9 | 10 | @mixin img-fluid { 11 | // Part 1: Set a maximum relative to the parent 12 | max-width: 100%; 13 | // Part 2: Override the height to auto, otherwise images will be stretched 14 | // when setting a width and height attribute on the img element. 15 | height: auto; 16 | } 17 | 18 | 19 | // Retina image 20 | // 21 | // Short retina mixin for setting background-image and -size. 22 | 23 | // stylelint-disable indentation, media-query-list-comma-newline-after 24 | @mixin img-retina($file-1x, $file-2x, $width-1x, $height-1x) { 25 | background-image: url($file-1x); 26 | 27 | // Autoprefixer takes care of adding -webkit-min-device-pixel-ratio and -o-min-device-pixel-ratio, 28 | // but doesn't convert dppx=>dpi. 29 | // There's no such thing as unprefixed min-device-pixel-ratio since it's nonstandard. 30 | // Compatibility info: https://caniuse.com/#feat=css-media-resolution 31 | @media only screen and (min-resolution: 192dpi), // IE9-11 don't support dppx 32 | only screen and (min-resolution: 2dppx) { // Standardized 33 | background-image: url($file-2x); 34 | background-size: $width-1x $height-1x; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/templates/partials/_gm_level.html.j2: -------------------------------------------------------------------------------- 1 | {# 2 | GAME_MASTER_LEVEL_CIVILIAN = 0, // Normal player. 3 | GAME_MASTER_LEVEL_FORUM_MODERATOR = 1, // No permissions on live servers. 4 | GAME_MASTER_LEVEL_JUNIOR_MODERATOR = 2, // Can kick/mute and pull chat logs. 5 | GAME_MASTER_LEVEL_MODERATOR = 3, // Can return lost items. 6 | GAME_MASTER_LEVEL_SENIOR_MODERATOR = 4, // Can ban. 7 | GAME_MASTER_LEVEL_LEAD_MODERATOR = 5, // Can approve properties. 8 | GAME_MASTER_LEVEL_JUNIOR_DEVELOPER = 6, // Junior developer & future content team. Civilan on live. 9 | GAME_MASTER_LEVEL_INACTIVE_DEVELOPER = 7, // Inactive developer, limited permissions. 10 | GAME_MASTER_LEVEL_DEVELOPER = 8, // Active developer, full permissions on live. 11 | GAME_MASTER_LEVEL_OPERATOR = 9 12 | #} 13 | 14 | {% if gm_level==0 %} 15 | Player 16 | {% elif gm_level==1 %} 17 | Elevevated Civilan {# Unused #} 18 | {% elif gm_level==2 %} 19 | Junior Moderator 20 | {% elif gm_level==3 %} 21 | Moderator 22 | {% elif gm_level==4 %} 23 | Senior Moderator 24 | {% elif gm_level==5 %} 25 | Lead Moderator 26 | {% elif gm_level==5 %} 27 | Junior Developer 28 | {% elif gm_level==7 %} 29 | Inactive Developer 30 | {% elif gm_level==8 %} 31 | Developer 32 | {% else %} 33 | Operator 34 | {% endif %} 35 | (GM Level: {{ gm_level }}) 36 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/_alert.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Base styles 3 | // 4 | 5 | .alert { 6 | position: relative; 7 | padding: $alert-padding-y $alert-padding-x; 8 | margin-bottom: $alert-margin-bottom; 9 | border: $alert-border-width solid transparent; 10 | @include border-radius($alert-border-radius); 11 | } 12 | 13 | // Headings for larger alerts 14 | .alert-heading { 15 | // Specified to prevent conflicts of changing $headings-color 16 | color: inherit; 17 | } 18 | 19 | // Provide class for links that match alerts 20 | .alert-link { 21 | font-weight: $alert-link-font-weight; 22 | } 23 | 24 | 25 | // Dismissible alerts 26 | // 27 | // Expand the right padding and account for the close button's positioning. 28 | 29 | .alert-dismissible { 30 | padding-right: $close-font-size + $alert-padding-x * 2; 31 | 32 | // Adjust close link position 33 | .close { 34 | position: absolute; 35 | top: 0; 36 | right: 0; 37 | padding: $alert-padding-y $alert-padding-x; 38 | color: inherit; 39 | } 40 | } 41 | 42 | 43 | // Alternate styles 44 | // 45 | // Generate contextual modifier classes for colorizing the alert. 46 | 47 | @each $color, $value in $theme-colors { 48 | .alert-#{$color} { 49 | @include alert-variant(theme-color-level($color, $alert-bg-level), theme-color-level($color, $alert-border-level), theme-color-level($color, $alert-color-level)); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /app/templates/main/index.html.j2: -------------------------------------------------------------------------------- 1 | {% extends 'base.html.j2' %} 2 | 3 | {% block title %}Home{% endblock %} 4 | 5 | {% block content_before %} 6 | {% if current_user.is_authenticated %} 7 | Welcome back {{ current_user.username }}! 8 | {% else %} 9 | Welcome Explorer! 10 | {% endif %} 11 | {% endblock %} 12 | 13 | {% block content %} 14 | {% if current_user.is_authenticated %} 15 | {% include 'partials/_account.html.j2' %} 16 | {% else %} 17 |
18 |
19 | 21 | Login 22 | 23 |
24 | {% if config.USER_ENABLE_REGISTER %} 25 |
26 | 28 | Register 29 | 30 |
31 | {% endif %} 32 |
33 | {% endif %} 34 | {% endblock content %} 35 | 36 | {% block content_after %} 37 | {% if current_user.is_authenticated %} 38 |
39 |
40 |

Characters

41 |
42 |
43 | {% for character in account_data.charinfo %} 44 | {% include 'partials/_character.html.j2' %} 45 | {% endfor %} 46 |
47 | {% endif %} 48 | {% endblock content_after %} 49 | 50 | -------------------------------------------------------------------------------- /app/static/bootstrap-4.2.1/scss/_breadcrumb.scss: -------------------------------------------------------------------------------- 1 | .breadcrumb { 2 | display: flex; 3 | flex-wrap: wrap; 4 | padding: $breadcrumb-padding-y $breadcrumb-padding-x; 5 | margin-bottom: $breadcrumb-margin-bottom; 6 | list-style: none; 7 | background-color: $breadcrumb-bg; 8 | @include border-radius($breadcrumb-border-radius); 9 | } 10 | 11 | .breadcrumb-item { 12 | // The separator between breadcrumbs (by default, a forward-slash: "/") 13 | + .breadcrumb-item { 14 | padding-left: $breadcrumb-item-padding; 15 | 16 | &::before { 17 | display: inline-block; // Suppress underlining of the separator in modern browsers 18 | padding-right: $breadcrumb-item-padding; 19 | color: $breadcrumb-divider-color; 20 | content: $breadcrumb-divider; 21 | } 22 | } 23 | 24 | // IE9-11 hack to properly handle hyperlink underlines for breadcrumbs built 25 | // without `