diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index dc6a3f74..da5aef3a 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -11,6 +11,8 @@ and this project adheres to https://semver.org/spec/v2.0.0.html[Semantic Version - Migrated config to use `utils.config.Config` from `settings.py` (#117) - Added `user.fetch_attacks_runner` and `user.stat_db_attacks_user` - Added auto-cancellation of vault withdrawals + - Added color theme support + - Added account settings endpoint === Fixed - Fixed Tox CI runs (due to broken dependency installation) diff --git a/controllers/__init__.py b/controllers/__init__.py index fc94b693..7acab0fa 100644 --- a/controllers/__init__.py +++ b/controllers/__init__.py @@ -29,9 +29,13 @@ def index(): return render_template("index.html", extensions=extensions) +@mod.route("/settings") +def settings(): + return render_template("settings.html") + + @mod.route("/static/toast.js") @mod.route("/static/favicon.svg") -@mod.route("/static/login.css") @mod.route("/static/utils.js") @mod.route("/static/bot/oc.js") @mod.route("/static/bot/stakeouts.js") @@ -43,6 +47,7 @@ def index(): @mod.route("/static/faction/bankingaa.js") @mod.route("/static/faction/chain.js") @mod.route("/static/faction/members.js") +@mod.route("/static/fonts/JetBrainsMono-Light.woff2") @mod.route("/static/stats/db.js") @mod.route("/static/stats/list.js") @mod.route("/static/torn/factions.js") diff --git a/controllers/errors.py b/controllers/errors.py index e1cbffd4..42bdc73e 100644 --- a/controllers/errors.py +++ b/controllers/errors.py @@ -66,17 +66,6 @@ def error404(e): ) -@mod.app_errorhandler(422) -def error422(e): - """ - Returns the 422 error page - - :param e: HTTP error - """ - - return render_template("/errors/422.html"), 422 - - @mod.app_errorhandler(500) def error500(e): """ diff --git a/models/server.py b/models/server.py index 4f9d1769..09417e88 100644 --- a/models/server.py +++ b/models/server.py @@ -35,6 +35,7 @@ def __init__(self, sid): self.name = server.name self.admins = server.admins self.config = server.config + self.icon = server.icon self.factions = server.factions diff --git a/models/servermodel.py b/models/servermodel.py index ba7f7f8e..cdc284a8 100644 --- a/models/servermodel.py +++ b/models/servermodel.py @@ -21,6 +21,7 @@ class ServerModel(DynamicDocument): name = StringField(default="") admins = ListField(default=[]) # List of admin ids config = DictField(default={"stakeouts": 0, "verify": 0}) # Dictionary of server configurations + icon = StringField(default="") # icon hash factions = ListField(default=[]) # List of factions in server diff --git a/skynet/commands/bot/verify.py b/skynet/commands/bot/verify.py index 1e56d9b7..ad0cccfb 100644 --- a/skynet/commands/bot/verify.py +++ b/skynet/commands/bot/verify.py @@ -141,7 +141,7 @@ def verify(interaction, *args, **kwargs): { "title": "Verification Failed", "description": "No Discord ID found. Please verify that you are officially verified by Torn. " - "Otherwise, try forcing the verification.", + "Otherwise, try forcing the verification.", "color": SKYNET_ERROR, } ], diff --git a/static/base.css b/static/base.css index 94ec4b6c..f6cca4f5 100644 --- a/static/base.css +++ b/static/base.css @@ -1,3 +1,12 @@ -a:link { - text-decoration: none; +@font-face { + font-family: "JetBrains Mono"; + src: url("/static/fonts/JetBrainsMono-Light.woff2") format("woff"); +} + +body { + font-family: "JetBrains Mono", serif; +} + +.vertical-navbar { + min-height: 100vh; } \ No newline at end of file diff --git a/static/fonts/JetBrainsMono-Light.woff2 b/static/fonts/JetBrainsMono-Light.woff2 new file mode 100644 index 00000000..65384987 Binary files /dev/null and b/static/fonts/JetBrainsMono-Light.woff2 differ diff --git a/static/global/modeSelector.js b/static/global/modeSelector.js new file mode 100644 index 00000000..1f90a9ab --- /dev/null +++ b/static/global/modeSelector.js @@ -0,0 +1,35 @@ +/*! + * Color mode toggler for Bootstrap's docs (https://getbootstrap.com/) + * Copyright 2011-2022 The Bootstrap Authors + * Licensed under the Creative Commons Attribution 3.0 Unported License. + */ + +(() => { + 'use strict'; + + const storedTheme = localStorage.getItem('theme'); + + const getPreferredTheme = function () { + if (storedTheme) { + return storedTheme; + } + + return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'custom-dark' : 'light'; + } + + const setTheme = function (theme) { + if (theme === 'auto' && window.matchMedia('(prefers-color-scheme: dark)').matches) { + document.documentElement.setAttribute('data-bs-theme', 'custom-dark'); + } else { + document.documentElement.setAttribute('data-bs-theme', theme); + } + } + + setTheme(getPreferredTheme()); + + window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () => { + if (storedTheme !== 'light' || storedTheme !== 'custom-dark') { + setTheme(getPreferredTheme()); + } + }); +})() \ No newline at end of file diff --git a/static/login.css b/static/login.css deleted file mode 100644 index 98f5c41b..00000000 --- a/static/login.css +++ /dev/null @@ -1,29 +0,0 @@ -html, -body { - height: 100%; -} - -body { - display: flex; - align-items: center; - padding-top: 40px; - padding-bottom: 40px; - background-color: #f5f5f5; -} - -.form-signin { - width: 100%; - max-width: 330px; - padding: 15px; - margin: auto; -} - -.form-signin .form-floating:focus-within { - z-index: 2; -} - -.form-signin input[type="password"] { - margin-bottom: 10px; - border-top-left-radius: 0; - border-top-right-radius: 0; -} diff --git a/static/themes/dark.css b/static/themes/dark.css new file mode 100644 index 00000000..15fe8228 --- /dev/null +++ b/static/themes/dark.css @@ -0,0 +1,114 @@ +[data-bs-theme=custom-dark] a { + color: rgb(229, 229, 229); + text-decoration: none; +} +[data-bs-theme=custom-dark] a:visited { + color: rgb(229, 229, 229); + text-decoration: none; +} +[data-bs-theme=custom-dark] a:hover { + color: rgb(255, 255, 255); + text-decoration: none; +} +[data-bs-theme=custom-dark] a:active { + color: rgb(229, 229, 229); + text-decoration: none; +} +[data-bs-theme=custom-dark] .breadcrumb-item::before { + color: rgb(229, 229, 229); +} +[data-bs-theme=custom-dark] .card { + border-color: rgb(229, 229, 229); +} +@media (max-height: 992px) { + [data-bs-theme=custom-dark] .secondary { + height: fit-content; + } +} +@media (min-height: 992px) { + [data-bs-theme=custom-dark] #verticalNavContainer { + border-right-color: rgb(229, 229, 229); + border-right-style: solid; + border-right-width: 1px; + } +} +[data-bs-theme=custom-dark] .primary { + background-color: rgb(35, 35, 35); + color: rgb(229, 229, 229); +} +[data-bs-theme=custom-dark] .primary .card { + background-color: rgb(35, 35, 35); +} +[data-bs-theme=custom-dark] .primary .list-group-item { + background-color: rgb(35, 35, 35); + color: rgb(229, 229, 229); +} +[data-bs-theme=custom-dark] .primary .form-control { + background-color: rgb(35, 35, 35); + color: rgb(229, 229, 229); +} +[data-bs-theme=custom-dark] .primary .form-text { + color: rgb(229, 229, 229); +} +[data-bs-theme=custom-dark] .primary p { + color: rgb(229, 229, 229); +} +[data-bs-theme=custom-dark] .primary a { + color: rgb(229, 229, 229); + background-color: rgb(35, 35, 35); +} +[data-bs-theme=custom-dark] .primary li .paginate-button { + color: rgb(229, 229, 229); + background-color: rgb(35, 35, 35); + border-color: rgb(229, 229, 229); +} +[data-bs-theme=custom-dark] .primary thead th { + color: rgb(229, 229, 229); +} +[data-bs-theme=custom-dark] .primary tbody td { + color: rgb(229, 229, 229); +} +[data-bs-theme=custom-dark] .primary tbody th { + color: rgb(229, 229, 229); +} +[data-bs-theme=custom-dark] .primary tbody th a { + color: rgb(229, 229, 229); +} +[data-bs-theme=custom-dark] .primary i [class^=fa-] { + color: rgb(229, 229, 229); +} +[data-bs-theme=custom-dark] .primary input { + border-color: rgb(229, 229, 229); +} +[data-bs-theme=custom-dark] .primary input::placeholder { + color: rgb(229, 229, 229); +} +[data-bs-theme=custom-dark] .primary select { + color: rgb(229, 229, 229); + background-color: rgb(35, 35, 35); + border-color: rgb(229, 229, 229); +} +[data-bs-theme=custom-dark] .primary .form-text { + color: rgb(175, 175, 175); +} +[data-bs-theme=custom-dark] .primary .card-text { + color: rgb(175, 175, 175); +} +[data-bs-theme=custom-dark] .secondary { + background-color: rgb(25, 25, 25); + color: rgb(229, 229, 229); +} +[data-bs-theme=custom-dark] .secondary a { + color: rgb(229, 229, 229); + background-color: rgb(25, 25, 25); +} +[data-bs-theme=custom-dark] .modal-content { + background-color: rgb(35, 35, 35); + color: rgb(229, 229, 229); + border-color: rgb(229, 229, 229); +} +[data-bs-theme=custom-dark] .modal-content tr th { + color: rgb(229, 229, 229); +} + +/*# sourceMappingURL=dark.css.map */ diff --git a/static/themes/dark.css.map b/static/themes/dark.css.map new file mode 100644 index 00000000..67f6b6f6 --- /dev/null +++ b/static/themes/dark.css.map @@ -0,0 +1 @@ +{"version":3,"sourceRoot":"","sources":["dark.scss"],"names":[],"mappings":"AAOI;EACI,OAPK;EAQL;;AAEA;EACI,OAXC;EAYD;;AAEJ;EACI;EACA;;AAEJ;EACI,OAnBC;EAoBD;;AAIR;EACI,OAzBK;;AA4BT;EACI,cA7BK;;AAgCT;EACI;IACI;;;AAGR;EACI;IACI,oBAvCC;IAwCD;IACA;;;AAIR;EACI,kBA7CW;EA8CX,OA/CK;;AAiDL;EACI,kBAjDO;;AAoDX;EACI,kBArDO;EAsDP,OAvDC;;AA0DL;EACI,kBA1DO;EA2DP,OA5DC;;AA+DL;EACI,OAhEC;;AAmEL;EACI,OApEC;;AAuEL;EACI,OAxEC;EAyED,kBAxEO;;AA2EX;EACI,OA7EC;EA8ED,kBA7EO;EA8EP,cA/EC;;AAkFL;EACI,OAnFC;;AAsFL;EACI,OAvFC;;AA0FL;EACI,OA3FC;;AA6FD;EACI,OA9FH;;AAkGL;EACI,OAnGC;;AAsGL;EACI,cAvGC;;AA0GL;EACI,OA3GC;;AA8GL;EACI,OA/GC;EAgHD,kBA/GO;EAgHP,cAjHC;;AAoHL;EACI,OAlHI;;AAqHR;EACI,OAtHI;;AA0HZ;EACI,kBA5Ha;EA6Hb,OA/HK;;AAiIL;EACI,OAlIC;EAmID,kBAjIS;;AAqIjB;EACI,kBAvIW;EAwIX,OAzIK;EA0IL,cA1IK;;AA4IL;EACI,OA7IC","file":"dark.css"} \ No newline at end of file diff --git a/static/themes/dark.scss b/static/themes/dark.scss new file mode 100644 index 00000000..a23b7801 --- /dev/null +++ b/static/themes/dark.scss @@ -0,0 +1,146 @@ +[data-bs-theme="custom-dark"] { + $white : rgb(229, 229, 229); + $primary-grey: rgb(35, 35, 35); + $secondary-grey: rgb(25, 25, 25); + $off-white: rgb(175, 175, 175); + $error: rgb(225, 10, 10); + + a { + color: $white; + text-decoration: none; + + &:visited { + color: $white; + text-decoration: none; + } + &:hover { + color: rgb(320, 320, 320); + text-decoration: none; + } + &:active { + color: $white; + text-decoration: none; + } + } + + .breadcrumb-item::before { + color: $white; + } + + .card { + border-color: $white; + } + + @media (max-height: 992px) { + .secondary { + height: fit-content; + } + } + @media (min-height: 992px) { + #verticalNavContainer { + border-right-color: $white; + border-right-style: solid; + border-right-width: 1px; + } + } + + .primary { + background-color: $primary-grey; + color: $white; + + & .card { + background-color: $primary-grey; + } + + & .list-group-item { + background-color: $primary-grey; + color: $white; + } + + & .form-control { + background-color: $primary-grey; + color: $white; + } + + & .form-text { + color: $white; // TODO: change to a slightly different color + } + + & p { + color: $white; + } + + & a { + color: $white; + background-color: $primary-grey; + } + + & li .paginate-button { + color: $white; + background-color: $primary-grey; + border-color: $white; + } + + & thead th { + color: $white; + } + + & tbody td { + color: $white; + } + + & tbody th { + color: $white; + + & a { + color: $white; + } + } + + & i [class^="fa-"] { + color: $white; + } + + & input { + border-color: $white; + } + + & input::placeholder { + color: $white; + } + + & select { + color: $white; + background-color: $primary-grey; + border-color: $white; + } + + & .form-text { + color: $off-white; + } + + & .card-text { + color: $off-white; + } + } + + .secondary { + background-color: $secondary-grey; + color: $white; + + & a { + color: $white; + background-color: $secondary-grey; + } + } + + .modal-content { + background-color: $primary-grey; + color: $white; + border-color: $white; + + & tr th { + color: $white; + } + } +} \ No newline at end of file diff --git a/static/themes/light.css b/static/themes/light.css new file mode 100644 index 00000000..54d8779b --- /dev/null +++ b/static/themes/light.css @@ -0,0 +1,9 @@ +@media (min-height: 992px) { + [data-bs-theme=light] #verticalNavContainer { + border-right-color: rgb(226, 226, 230); + border-right-style: solid; + border-right-width: 1px; + } +} + +/*# sourceMappingURL=light.css.map */ diff --git a/static/themes/light.css.map b/static/themes/light.css.map new file mode 100644 index 00000000..513dde0a --- /dev/null +++ b/static/themes/light.css.map @@ -0,0 +1 @@ +{"version":3,"sourceRoot":"","sources":["light.scss"],"names":[],"mappings":"AACI;EACI;IACI;IACA;IACA","file":"light.css"} \ No newline at end of file diff --git a/static/themes/light.scss b/static/themes/light.scss new file mode 100644 index 00000000..2f3c8c80 --- /dev/null +++ b/static/themes/light.scss @@ -0,0 +1,9 @@ +[data-bs-theme="light"] { + @media (min-height: 992px) { + #verticalNavContainer { + border-right-color: rgb(226, 226, 230); + border-right-style: solid; + border-right-width: 1px; + } + } +} \ No newline at end of file diff --git a/static/themes/neon-dark.css b/static/themes/neon-dark.css new file mode 100644 index 00000000..c9aab7e8 --- /dev/null +++ b/static/themes/neon-dark.css @@ -0,0 +1,117 @@ +[data-bs-theme=neon-dark] { + border-color: rgb(229, 229, 229); +} +[data-bs-theme=neon-dark] a { + color: rgb(57, 255, 20); + text-decoration: none; +} +[data-bs-theme=neon-dark] a:visited { + color: rgb(57, 255, 20); + text-decoration: none; +} +[data-bs-theme=neon-dark] a:hover { + color: rgb(255, 255, 255); + text-decoration: none; +} +[data-bs-theme=neon-dark] a:active { + color: rgb(57, 255, 20); + text-decoration: none; +} +[data-bs-theme=neon-dark] .breadcrumb-item::before { + color: rgb(57, 255, 20); +} +[data-bs-theme=neon-dark] .card { + border-color: rgb(229, 229, 229); +} +@media (max-height: 992px) { + [data-bs-theme=neon-dark] .secondary { + height: fit-content; + } +} +@media (min-height: 992px) { + [data-bs-theme=neon-dark] #verticalNavContainer { + border-right-color: rgb(229, 229, 229); + border-right-style: solid; + border-right-width: 1px; + } +} +[data-bs-theme=neon-dark] .primary { + background-color: rgb(35, 35, 35); + color: rgb(57, 255, 20); +} +[data-bs-theme=neon-dark] .primary .card { + background-color: rgb(35, 35, 35); +} +[data-bs-theme=neon-dark] .primary .list-group-item { + background-color: rgb(35, 35, 35); + color: rgb(57, 255, 20); +} +[data-bs-theme=neon-dark] .primary .form-control { + background-color: rgb(35, 35, 35); + color: rgb(57, 255, 20); +} +[data-bs-theme=neon-dark] .primary .form-text { + color: rgb(57, 255, 20); +} +[data-bs-theme=neon-dark] .primary p { + color: rgb(57, 255, 20); +} +[data-bs-theme=neon-dark] .primary a { + color: rgb(57, 255, 20); + background-color: rgb(35, 35, 35); +} +[data-bs-theme=neon-dark] .primary li .paginate-button { + color: rgb(57, 255, 20); + background-color: rgb(35, 35, 35); + border-color: rgb(229, 229, 229); +} +[data-bs-theme=neon-dark] .primary thead th { + color: rgb(57, 255, 20); +} +[data-bs-theme=neon-dark] .primary tbody td { + color: rgb(57, 255, 20); +} +[data-bs-theme=neon-dark] .primary tbody th { + color: rgb(57, 255, 20); +} +[data-bs-theme=neon-dark] .primary tbody th a { + color: rgb(57, 255, 20); +} +[data-bs-theme=neon-dark] .primary i [class^=fa-] { + color: rgb(57, 255, 20); +} +[data-bs-theme=neon-dark] .primary input { + border-color: rgb(229, 229, 229); +} +[data-bs-theme=neon-dark] .primary input::placeholder { + color: rgb(57, 255, 20); +} +[data-bs-theme=neon-dark] .primary select { + color: rgb(57, 255, 20); + background-color: rgb(35, 35, 35); + border-color: rgb(229, 229, 229); +} +[data-bs-theme=neon-dark] .primary .form-text { + color: rgb(57, 255, 20); +} +[data-bs-theme=neon-dark] .primary .card-text { + color: rgb(57, 255, 20); +} +[data-bs-theme=neon-dark] .secondary { + background-color: rgb(25, 25, 25); + color: rgb(57, 255, 20); +} +[data-bs-theme=neon-dark] .secondary a { + color: rgb(57, 255, 20); + background-color: rgb(25, 25, 25); +} +[data-bs-theme=neon-dark] .modal-content { + background-color: rgb(35, 35, 35); + color: rgb(57, 255, 20); + border-color: rgb(229, 229, 229); +} +[data-bs-theme=neon-dark] .modal-content tr th { + color: rgb(57, 255, 20); +} + +/*# sourceMappingURL=neon-dark.css.map */ diff --git a/static/themes/neon-dark.css.map b/static/themes/neon-dark.css.map new file mode 100644 index 00000000..50291415 --- /dev/null +++ b/static/themes/neon-dark.css.map @@ -0,0 +1 @@ +{"version":3,"sourceRoot":"","sources":["neon-dark.scss"],"names":[],"mappings":"AAAA;EAOI,cANS;;AAQT;EACI,OARG;EASH;;AAEA;EACI,OAZD;EAaC;;AAEJ;EACI;EACA;;AAEJ;EACI,OApBD;EAqBC;;AAIR;EACI,OA1BG;;AA6BP;EACI,cA/BK;;AAkCT;EACI;IACI;;;AAGR;EACI;IACI,oBAzCC;IA0CD;IACA;;;AAIR;EACI,kBA9CW;EA+CX,OAhDG;;AAkDH;EACI,kBAlDO;;AAqDX;EACI,kBAtDO;EAuDP,OAxDD;;AA2DH;EACI,kBA3DO;EA4DP,OA7DD;;AAgEH;EACI,OAjED;;AAoEH;EACI,OArED;;AAwEH;EACI,OAzED;EA0EC,kBAzEO;;AA4EX;EACI,OA9ED;EA+EC,kBA9EO;EA+EP,cAjFC;;AAoFL;EACI,OApFD;;AAuFH;EACI,OAxFD;;AA2FH;EACI,OA5FD;;AA8FC;EACI,OA/FL;;AAmGH;EACI,OApGD;;AAuGH;EACI,cAzGC;;AA4GL;EACI,OA5GD;;AA+GH;EACI,OAhHD;EAiHC,kBAhHO;EAiHP,cAnHC;;AAsHL;EACI,OAtHD;;AAyHH;EACI,OA1HD;;AA8HP;EACI,kBA7Ha;EA8Hb,OAhIG;;AAkIH;EACI,OAnID;EAoIC,kBAlIS;;AAsIjB;EACI,kBAxIW;EAyIX,OA1IG;EA2IH,cA5IK;;AA8IL;EACI,OA9ID","file":"neon-dark.css"} \ No newline at end of file diff --git a/static/themes/neon-dark.scss b/static/themes/neon-dark.scss new file mode 100644 index 00000000..194ccc12 --- /dev/null +++ b/static/themes/neon-dark.scss @@ -0,0 +1,148 @@ +[data-bs-theme="neon-dark"] { + $white : rgb(229, 229, 229); + $neon: rgb(57, 255, 20); + $primary-grey: rgb(35, 35, 35); + $secondary-grey: rgb(25, 25, 25); + $error: rgb(225, 10, 10); + + border-color: $white; + + a { + color: $neon; + text-decoration: none; + + &:visited { + color: $neon; + text-decoration: none; + } + &:hover { + color: rgb(320, 320, 320); + text-decoration: none; + } + &:active { + color: $neon; + text-decoration: none; + } + } + + .breadcrumb-item::before { + color: $neon; + } + + .card { + border-color: $white; + } + + @media (max-height: 992px) { + .secondary { + height: fit-content; + } + } + @media (min-height: 992px) { + #verticalNavContainer { + border-right-color: $white; + border-right-style: solid; + border-right-width: 1px; + } + } + + .primary { + background-color: $primary-grey; + color: $neon; + + & .card { + background-color: $primary-grey; + } + + & .list-group-item { + background-color: $primary-grey; + color: $neon; + } + + & .form-control { + background-color: $primary-grey; + color: $neon; + } + + & .form-text { + color: $neon; // TODO: change to a slightly different color + } + + & p { + color: $neon; + } + + & a { + color: $neon; + background-color: $primary-grey; + } + + & li .paginate-button { + color: $neon; + background-color: $primary-grey; + border-color: $white; + } + + & thead th { + color: $neon; + } + + & tbody td { + color: $neon; + } + + & tbody th { + color: $neon; + + & a { + color: $neon; + } + } + + & i [class^="fa-"] { + color: $neon; + } + + & input { + border-color: $white; + } + + & input::placeholder { + color: $neon; + } + + & select { + color: $neon; + background-color: $primary-grey; + border-color: $white; + } + + & .form-text { + color: $neon; + } + + & .card-text { + color: $neon; + } + } + + .secondary { + background-color: $secondary-grey; + color: $neon; + + & a { + color: $neon; + background-color: $secondary-grey; + } + } + + .modal-content { + background-color: $primary-grey; + color: $neon; + border-color: $white; + + & tr th { + color: $neon; + } + } +} \ No newline at end of file diff --git a/static/torn/factions.js b/static/torn/factions.js index 0a18dfef..430ae0b2 100644 --- a/static/torn/factions.js +++ b/static/torn/factions.js @@ -55,15 +55,22 @@ $(document).ready(function() { xhttp = new XMLHttpRequest(); xhttp.onload = function() { - console.log(typeof(xhttp.response)) - xhttp.response.forEach(function(member) { - membersTable.row.add([ - member["username"], - member["level"], - `${member["status"]}`, - `${member["discord_id"]}` - ]).draw(); + if(member["discord_id"] == 0) { + membersTable.row.add([ + member["username"], + member["level"], + `${member["status"]}`, + `Unknown` + ]).draw(); + } else { + membersTable.row.add([ + member["username"], + member["level"], + `${member["status"]}`, + `${member["discord_id"]}` + ]).draw(); + } }); modal.show(); diff --git a/tasks/guild.py b/tasks/guild.py index a2b31b5b..159ff159 100644 --- a/tasks/guild.py +++ b/tasks/guild.py @@ -46,6 +46,7 @@ def refresh_guilds(): name=guild["name"], admins=[], config={"stakeouts": 0, "verify": 0}, + icon=guild["icon"], factions=[], stakeoutconfig={"category": 0}, userstakeouts=[], @@ -92,6 +93,7 @@ def refresh_guilds(): admins = list(set(admins)) guild_db.admins = admins + guild_db.icon = guild["icon"] guild_db.save() for factiontid, faction_data in guild_db.faction_verify.items(): diff --git a/templates/admin/dashboard.html b/templates/admin/dashboard.html deleted file mode 100644 index 24bd3024..00000000 --- a/templates/admin/dashboard.html +++ /dev/null @@ -1,55 +0,0 @@ -{% extends 'base.html' %} - -{% block title %} -Tornium - Admin Dashboard -{% endblock %} - -{% block content %} - -{% include 'navbar.html' %} -{% include 'admin/navbar.html' %} - -
-
-
-
Scheduled Tasks
- -
-
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
- -
-
- -
-
-
-
-
-
-{% endblock %} diff --git a/templates/admin/database.html b/templates/admin/database.html deleted file mode 100644 index 6f8b2673..00000000 --- a/templates/admin/database.html +++ /dev/null @@ -1,23 +0,0 @@ -{% extends 'base.html' %} - -{% block title %} -Tornium - Admin Database -{% endblock %} - -{% block content %} - -{% include 'navbar.html' %} -{% include 'admin/navbar.html' %} - -
-
-
-
Admin Database
- - User Database - Faction Database - Server Database -
-
-
-{% endblock %} diff --git a/templates/admin/faction.html b/templates/admin/faction.html deleted file mode 100644 index d3a63b9f..00000000 --- a/templates/admin/faction.html +++ /dev/null @@ -1,62 +0,0 @@ -{% extends 'base.html' %} - -{% block title %} -Tornium - Admin Faction -{% endblock %} - -{% block content %} - -{% include 'navbar.html' %} -{% include 'admin/navbar.html' %} - -
-
-
- User: {{ faction.name }}[{{ faction.tid }}] -
- - -
-
- -{% endblock %} diff --git a/templates/admin/factiondb.html b/templates/admin/factiondb.html deleted file mode 100644 index 57ecbb4b..00000000 --- a/templates/admin/factiondb.html +++ /dev/null @@ -1,31 +0,0 @@ -{% extends 'base.html' %} - -{% block title %} -Tornium - Admin Faction Database -{% endblock %} - -{% block content %} - -{% include 'navbar.html' %} -{% include 'admin/navbar.html' %} - -
-
-
-
Faction Database
- - - - - - - - - -
Faction IDFaction Name
-
-
-
- - -{% endblock %} diff --git a/templates/admin/index.html b/templates/admin/index.html deleted file mode 100644 index 18816403..00000000 --- a/templates/admin/index.html +++ /dev/null @@ -1,10 +0,0 @@ -{% extends 'base.html' %} - -{% block title %} -Tornium - Admin -{% endblock %} - -{% block content %} -{% include 'navbar.html' %} -{% include 'admin/navbar.html' %} -{% endblock %} diff --git a/templates/admin/navbar.html b/templates/admin/navbar.html deleted file mode 100644 index dd0eb451..00000000 --- a/templates/admin/navbar.html +++ /dev/null @@ -1,30 +0,0 @@ - diff --git a/templates/admin/server.html b/templates/admin/server.html deleted file mode 100644 index 5534bea6..00000000 --- a/templates/admin/server.html +++ /dev/null @@ -1,77 +0,0 @@ -{% extends 'base.html' %} - -{% block title %} -Tornium - Admin Server -{% endblock %} - -{% block content %} - -{% include 'navbar.html' %} -{% include 'admin/navbar.html' %} - -
-
-
- Server: {{ server.name }} [{{ server.sid }}] -
- - -
-
- -{% endblock %} diff --git a/templates/admin/serverdb.html b/templates/admin/serverdb.html deleted file mode 100644 index 1d44e5ed..00000000 --- a/templates/admin/serverdb.html +++ /dev/null @@ -1,31 +0,0 @@ -{% extends 'base.html' %} - -{% block title %} -Tornium - Admin User Database -{% endblock %} - -{% block content %} - -{% include 'navbar.html' %} -{% include 'admin/navbar.html' %} - -
-
-
-
Server Database
- - - - - - - - - -
Server IDServer Name
-
-
-
- - -{% endblock %} diff --git a/templates/admin/user.html b/templates/admin/user.html deleted file mode 100644 index 838c66f2..00000000 --- a/templates/admin/user.html +++ /dev/null @@ -1,36 +0,0 @@ -{% extends 'base.html' %} - -{% block title %} -Tornium - Admin User -{% endblock %} - -{% block content %} - -{% include 'navbar.html' %} -{% include 'admin/navbar.html' %} - -
-
-
- User: {{ user.name }}[{{ user.tid }}] -
- - -
-
- -{% endblock %} diff --git a/templates/admin/userdb.html b/templates/admin/userdb.html deleted file mode 100644 index f2ebadf5..00000000 --- a/templates/admin/userdb.html +++ /dev/null @@ -1,32 +0,0 @@ -{% extends 'base.html' %} - -{% block title %} -Tornium - Admin User Database -{% endblock %} - -{% block content %} - -{% include 'navbar.html' %} -{% include 'admin/navbar.html' %} - -
-
-
-
User Database
- - - - - - - - - - -
User IDUser NameDiscord ID
-
-
-
- - -{% endblock %} diff --git a/templates/api/index.html b/templates/api/index.html index 634710a3..b77ca4ec 100644 --- a/templates/api/index.html +++ b/templates/api/index.html @@ -4,29 +4,26 @@ Tornium - API {% endblock %} -{% block content %} - -{% include 'navbar.html' %} -{% include 'api/navbar.html' %} - -
-
-
-
- - Tornium API -
-
-

- The Tornium API is currently under construction. -

+{% block breadcrumbs %} + +{% endblock %} -

- For more information, check out the documentation or contact - tiksan on Discord. -

-
-
+{% block content %} +
+
+
Tornium API
+

+ The Tornium API is currently under construction and is un-documented. For more information, look at the + source code or contact tiksan [2383326] on + Discord. +

-{% endblock %} +{% endblock %} \ No newline at end of file diff --git a/templates/api/navbar.html b/templates/api/navbar.html deleted file mode 100644 index e61696a1..00000000 --- a/templates/api/navbar.html +++ /dev/null @@ -1,18 +0,0 @@ - \ No newline at end of file diff --git a/templates/base.html b/templates/base.html index 77950805..5a07cf25 100644 --- a/templates/base.html +++ b/templates/base.html @@ -2,62 +2,150 @@ - + {% block title %}{% endblock %} - - + + + - - + + - - + + + + + + + + - {% block scripts %}{% endblock %} - {% with messages = get_flashed_messages(with_categories=true) %} - {% if messages %} - {% for category, message in messages %} - {% if category == 'error' %} - - {% elif category == 'warning' %} - - {% else %} - {% endblock %} diff --git a/templates/bot/guild.html b/templates/bot/guild.html index d942553c..449600c8 100644 --- a/templates/bot/guild.html +++ b/templates/bot/guild.html @@ -4,11 +4,36 @@ Tornium - Bot Dashboard {% endblock %} -{% block content %} +{% block breadcrumbs %} + +{% endblock %} -{% include 'navbar.html' %} -{% include 'bot/navbar.html' %} +{% block subnav %} + +{% endblock %} +{% block content %}
{% if server.config['stakeouts'] == 0 %} diff --git a/templates/bot/host.html b/templates/bot/host.html index 7730c16b..d92ac320 100644 --- a/templates/bot/host.html +++ b/templates/bot/host.html @@ -5,7 +5,7 @@ {% endblock %} {% block content %} -{% include 'navbar.html' %} + {% include 'bot/navbar.html' %}
diff --git a/templates/bot/index.html b/templates/bot/index.html index 15c4ce52..32de7d7d 100644 --- a/templates/bot/index.html +++ b/templates/bot/index.html @@ -4,11 +4,30 @@ Tornium - Bot {% endblock %} -{% block content %} +{% block breadcrumbs %} + +{% endblock %} -{% include 'navbar.html' %} -{% include 'bot/navbar.html' %} +{% block subnav %} + +{% endblock %} +{% block content %}
diff --git a/templates/bot/navbar.html b/templates/bot/navbar.html deleted file mode 100644 index 823f82c5..00000000 --- a/templates/bot/navbar.html +++ /dev/null @@ -1,24 +0,0 @@ - \ No newline at end of file diff --git a/templates/bot/oc.html b/templates/bot/oc.html index c76efd99..12dd54f5 100644 --- a/templates/bot/oc.html +++ b/templates/bot/oc.html @@ -4,19 +4,39 @@ Tornium - OCs {% endblock %} -{% block content %} - -{% include 'navbar.html' %} -{% include 'bot/navbar.html' %} +{% block breadcrumbs %} + +{% endblock %} -
-
- +{% block subnav %} + +{% endblock %} +{% block content %}
{% endblock %} diff --git a/templates/bot/stakeouts.html b/templates/bot/stakeouts.html index 3a42a65c..29a333a1 100644 --- a/templates/bot/stakeouts.html +++ b/templates/bot/stakeouts.html @@ -4,19 +4,39 @@ Tornium - Stakeouts {% endblock %} -{% block content %} - -{% include 'navbar.html' %} -{% include 'bot/navbar.html' %} +{% block breadcrumbs %} + +{% endblock %} -
-
- +{% block subnav %} + +{% endblock %} +{% block content %}
diff --git a/templates/bot/verify.html b/templates/bot/verify.html index fc113035..08c3900a 100644 --- a/templates/bot/verify.html +++ b/templates/bot/verify.html @@ -4,19 +4,39 @@ Tornium - Verification {% endblock %} -{% block content %} - -{% include 'navbar.html' %} -{% include 'bot/navbar.html' %} +{% block breadcrumbs %} + +{% endblock %} -
-
- +{% block subnav %} + +{% endblock %} +{% block content %}
@@ -29,17 +49,17 @@
Basic Verification Configuration
{% if guild.config.get("verify") %} - - {% else %} - - {% endif %} @@ -158,17 +178,17 @@
Faction Verification
{% if guild.faction_verify[faction]["enabled"] %} - - {% else %} - - {% endif %} diff --git a/templates/errors/400.html b/templates/errors/400.html index 665624ea..7e64ff11 100644 --- a/templates/errors/400.html +++ b/templates/errors/400.html @@ -1,86 +1,48 @@ - + + - - 400 | Bad request - - + - - -

400

-

Bad request.

- -

We’re sorry but something appears to be wrong with the request you made, please try again.

- - Go back -
- + +
+
+
+
+
+

Error: HTTP 400 | Bad Request

+ +

+ The server will not process this request due to a client issue. +

+ +

+ This error has likely been caught by Tornium's automated logging tool. However, if you need + help or this error continues occuring, please contact tiksan on + Discord. +

+ + Go back +
+
+
+
+
\ No newline at end of file diff --git a/templates/errors/402.html b/templates/errors/402.html deleted file mode 100644 index 4647daf6..00000000 --- a/templates/errors/402.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - 400 | Payment Required - - - - - -

402

-

Payment Required.

- -

A payment is required to access Tornium Pro, a paid section of Tornium. Please contact tiksan for more details.

- - Go back -
- - - \ No newline at end of file diff --git a/templates/errors/403.html b/templates/errors/403.html index 91e93005..57eff6e3 100644 --- a/templates/errors/403.html +++ b/templates/errors/403.html @@ -1,87 +1,58 @@ - + + - - 403 | Forbidden - - + - - -
-

403

-

Forbidden.

- -

You are not allowed access to this page.

- - Go back -
- + +
+
+
+
+
+

Error: HTTP 403 | Forbidden

+ +

+ The server has received the request but will not authorize it. This is frequently due to + insufficient permissions to access and modify data for Discord servers and factions. For + factions, this can be resolved by being granted API Access (AA) through the faction + permissions page. For Discord servers, this can be resolved by being made an administrator + on the server. The automated task that detects and adds server admins runs every hour. +

+ +

+ This error has likely been caught by Tornium's automated logging tool. However, if you need + help or this error continues occuring, please contact tiksan on + Discord. +

+ + Go back +
+
+
+
+
+ + \ No newline at end of file diff --git a/templates/errors/404.html b/templates/errors/404.html index c1739132..d5f15dd4 100644 --- a/templates/errors/404.html +++ b/templates/errors/404.html @@ -1,87 +1,49 @@ - + + - - 404 | Page not found - - + - - -
-

404

-

Page not found.

- -

We’re sorry, but it appears that we can’t find the page you were looking for. Usually this occurs because of a page that previously existed was removed or you’ve mistyped the address.

- - Go back -
- + +
+
+
+
+
+

Error: HTTP 404 | Not Found

+ +

+ The server has received the request but can not find the resource. Make sure that the URL + entered is correct. +

+ + Go back +
+
+
+
+
+ + \ No newline at end of file diff --git a/templates/errors/405.html b/templates/errors/405.html index 9033deab..e560879c 100644 --- a/templates/errors/405.html +++ b/templates/errors/405.html @@ -1,87 +1,48 @@ - + + - - 405 | Method Not Allowed - - + - - -
-

405

-

Method Not Allowed.

- -

We’re sorry, but it appears that there has been an issue loading this page.

- - Go back -
- + +
+
+
+
+
+

Error: HTTP 405 | Method Not Allowed

+ +

+ The server will not accept this HTTP request method for this resource. +

+ +

+ This error has likely been caught by Tornium's automated logging tool. However, if you need + help or this error continues occuring, please contact tiksan on + Discord. +

+ + Go back +
+
+
+
+
\ No newline at end of file diff --git a/templates/errors/422.html b/templates/errors/422.html deleted file mode 100644 index bb51b02f..00000000 --- a/templates/errors/422.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - 422 | The change you wanted was rejected - - - - - -

422

-

The change you wanted was rejected.

- -

Maybe you tried to change something you didn't have access to.

- - Go back -
- - - \ No newline at end of file diff --git a/templates/errors/500.html b/templates/errors/500.html index b1b6f95f..1827184d 100644 --- a/templates/errors/500.html +++ b/templates/errors/500.html @@ -1,88 +1,48 @@ - + + - - 500 | Internal server error - - + - - -

500

-

Internal Server Error.

- -

Something went wrong. Our technical team have been notified of the issue and we are looking into it. Please try again shortly.

- -

{{ error }}

- - Go back -
- + +
+
+
+
+
+

Error: HTTP 500 | Internal Server Error

+ +

+ The server has encountered an unexpected issue that has prevented a successful response. +

+ +

+ This error has likely been caught by Tornium's automated logging tool. However, if you need + help or this error continues occuring, please contact tiksan on + Discord. +

+ + Go back +
+
+
+
+
- + \ No newline at end of file diff --git a/templates/errors/501.html b/templates/errors/501.html index 052f67f4..8b70b1ef 100644 --- a/templates/errors/501.html +++ b/templates/errors/501.html @@ -1,86 +1,43 @@ - + + - - 500 | Internal server error - - + - - -

501

-

Not Implemented.

- -

Something went wrong. The route has not yet been implemented yet. Our development team is in the process of developing this route. Please try again later once this route has been implemented.

- - Go back -
- + +
+
+
+
+
+

Error: HTTP 501 | Not Implemented

+ +

+ The server will not accept this request as the functionality to support this has not yet + been implemented. +

+ + Go back +
+
+
+
+
\ No newline at end of file diff --git a/templates/errors/503.html b/templates/errors/503.html index 4da30526..c7b3d72f 100644 --- a/templates/errors/503.html +++ b/templates/errors/503.html @@ -1,86 +1,49 @@ - + + - - 503 | Service unavailable - - + - - -

503

-

Service Unavailable.

- -

Something went wrong. The route has not yet been implemented yet. Our development team is in the process of developing this route. Please try again later once this route has been implemented.

- - Go back -
- + +
+
+
+
+
+

Error: HTTP 503 | Service Unavailable

+ +

+ The server is not able to ready to handle this request. This error often originates from + the server is down for maintenance or is overloaded. +

+ +

+ This error has likely been caught by Tornium's automated logging tool. However, if you need + help or this error continues occuring, please contact tiksan on + Discord. +

+ + Go back +
+
+
+
+
\ No newline at end of file diff --git a/templates/errors/error.html b/templates/errors/error.html index b27b7404..ca155134 100644 --- a/templates/errors/error.html +++ b/templates/errors/error.html @@ -1,86 +1,48 @@ - - - - - Error | {% block title %}{% endblock %} - - + - - -

{{ title }}

-

Something has gone wrong.

- -

{{ error }}

- - Go back -
- + +
+
+
+
+
+

Error: {{ title }}

+ +

+ {{ error }} +

+ +

+ This error has likely been caught by Tornium's automated logging tool. However, if you need + help or this error continues occuring, please contact tiksan on + Discord. +

+ + Go back +
+
+
+
+
\ No newline at end of file diff --git a/templates/faction/attacks.html b/templates/faction/attacks.html index 2dc71da8..b37547d3 100644 --- a/templates/faction/attacks.html +++ b/templates/faction/attacks.html @@ -4,11 +4,66 @@ Tornium - Faction Attack Dashboard {% endblock %} -{% block content %} +{% block breadcrumbs %} + +{% endblock %} + +{% block subnav %} +
+
+ + + + + {% if current_user.is_authenticated and current_user.factiontid != 0 %} + -{% include 'navbar.html' %} -{% include 'faction/navbar.html' %} + + {% if current_user.is_authenticated and current_user.is_aa() %} + + + + {% endif %} + {% endif %} +
+
+{% endblock %} +{% block content %}
diff --git a/templates/faction/banking.html b/templates/faction/banking.html index 3cc418f8..147cd3fc 100644 --- a/templates/faction/banking.html +++ b/templates/faction/banking.html @@ -4,11 +4,66 @@ Tornium - Faction Banking {% endblock %} -{% block content %} +{% block breadcrumbs %} + +{% endblock %} + +{% block subnav %} +
+
+ + + + + {% if current_user.is_authenticated and current_user.factiontid != 0 %} + -{% include 'navbar.html' %} -{% include 'faction/navbar.html' %} + + {% if current_user.is_authenticated and current_user.is_aa() %} + + + + {% endif %} + {% endif %} +
+
+{% endblock %} +{% block content %} {% if current_user.factiontid != 0 and bankingenabled %}
diff --git a/templates/faction/bankingaa.html b/templates/faction/bankingaa.html index 200d3400..384e7ca5 100644 --- a/templates/faction/bankingaa.html +++ b/templates/faction/bankingaa.html @@ -4,11 +4,66 @@ Tornium - Faction Banking AA {% endblock %} -{% block content %} +{% block breadcrumbs %} + +{% endblock %} + +{% block subnav %} +
+
+ + + + + {% if current_user.is_authenticated and current_user.factiontid != 0 %} + -{% include 'navbar.html' %} -{% include 'faction/navbar.html' %} + + {% if current_user.is_authenticated and current_user.is_aa() %} + + + + {% endif %} + {% endif %} +
+
+{% endblock %} +{% block content %}
diff --git a/templates/faction/bot.html b/templates/faction/bot.html index 7dac0e3b..cb847d64 100644 --- a/templates/faction/bot.html +++ b/templates/faction/bot.html @@ -4,11 +4,66 @@ Tornium - Faction Bot Dashboard {% endblock %} -{% block content %} +{% block breadcrumbs %} + +{% endblock %} + +{% block subnav %} +
+
+ + + + + {% if current_user.is_authenticated and current_user.factiontid != 0 %} + -{% include 'navbar.html' %} -{% include 'faction/navbar.html' %} + + {% if current_user.is_authenticated and current_user.is_aa() %} + + + + {% endif %} + {% endif %} +
+
+{% endblock %} +{% block content %}
@@ -44,11 +99,11 @@
Vault Configuration
{% if config['vault'] == 0 %} - - + + {% else %} - - + + {% endif %}

diff --git a/templates/faction/chain.html b/templates/faction/chain.html index 928a517c..9b8e37c2 100644 --- a/templates/faction/chain.html +++ b/templates/faction/chain.html @@ -4,11 +4,66 @@ Tornium - Faction Chain Dashboard {% endblock %} -{% block content %} +{% block breadcrumbs %} + +{% endblock %} + +{% block subnav %} +
+
+ + + + + {% if current_user.is_authenticated and current_user.factiontid != 0 %} + -{% include 'navbar.html' %} -{% include 'faction/navbar.html' %} + + {% if current_user.is_authenticated and current_user.is_aa() %} + + + + {% endif %} + {% endif %} +
+
+{% endblock %} +{% block content %}
diff --git a/templates/faction/index.html b/templates/faction/index.html index b16df803..2eff5b37 100644 --- a/templates/faction/index.html +++ b/templates/faction/index.html @@ -4,11 +4,63 @@ Tornium - Faction {% endblock %} -{% block content %} +{% block breadcrumbs %} + +{% endblock %} + +{% block subnav %} +
+
+ + + + + {% if current_user.is_authenticated and current_user.factiontid != 0 %} + -{% include 'navbar.html' %} -{% include 'faction/navbar.html' %} + + {% if current_user.is_authenticated and current_user.is_aa() %} + + + + {% endif %} + {% endif %} +
+
+{% endblock %} +{% block content %}
diff --git a/templates/faction/members.html b/templates/faction/members.html index 19b4e1af..c613f6c4 100644 --- a/templates/faction/members.html +++ b/templates/faction/members.html @@ -4,11 +4,66 @@ Tornium - Faction Members {% endblock %} -{% block content %} +{% block breadcrumbs %} + +{% endblock %} + +{% block subnav %} +
+
+ + + + + {% if current_user.is_authenticated and current_user.factiontid != 0 %} + -{% include 'navbar.html' %} -{% include 'faction/navbar.html' %} + + {% if current_user.is_authenticated and current_user.is_aa() %} + + + + {% endif %} + {% endif %} +
+
+{% endblock %} +{% block content %}
diff --git a/templates/faction/navbar.html b/templates/faction/navbar.html deleted file mode 100644 index 09eba918..00000000 --- a/templates/faction/navbar.html +++ /dev/null @@ -1,53 +0,0 @@ - diff --git a/templates/index.html b/templates/index.html index ac8b7b05..a2af3b91 100644 --- a/templates/index.html +++ b/templates/index.html @@ -4,36 +4,52 @@ Tornium {% endblock %} -{% block content %} +{% block breadcrumbs %} + +{% endblock %} -{% include 'navbar.html' %} +{% block content %} +
+
+

+ Tornium is a third-party Torn application developed by tiksan [2383326] to supplement existing + applications such as YATA and Torn Stats, + but is more focused on factions. Tornium is an open source project licensed under the GNU General Purpose + License (GPLv3). +

-
-
-
-

- Tornium is a third-party Torn application developed by tiksan [2383326] to supplement existing - applications such as YATA and Torn Stats, - but is more focused on factions. Tornium is an open source project licensed under the GNU General Purpose - License (GPLv3). -

+

+ Accessing Tornium requires logging in with your API key for verification purposes. Your API key + and player and faction data will not be reviewed for any reasons other than maintenance and security + (and only then with the owner's permission). For more information or to report any issues, bugs, or + suggestions, please contact tiksan [2383326] on + Torn or on + Discord. In-game donations are appreciated + to support the running of this site and its continued development. +

+
+
-

- Accessing Tornium requires logging in with your API key for verification purposes. Your API key - and player and faction data will not be reviewed for any reasons other than maintenance and security - (and only then with the owner's permission). For more information or to report any issues, bugs, or - suggestions, please contact tiksan [2383326] on - Torn or on - Discord. In-game donations are appreciated to - support the running of this site and its continued development. -

+{% if extensions|length > 0 %} +
+
+
Loaded Tornium Extensions
+

The following Tornium extensions have been loaded on this instance of Tornium.

- {% if extensions|length > 0 %} -

- The following Tornium extensions are loaded: {% for extension in extensions %}{{ extension }} {% endfor %} -

- {% endif %} - +
+
+
    + {% for extension in extensions %} +
  • {{ extension }}
  • + {% endfor %} +
+
+
-{% endblock %} +{% endif %} +{% endblock %} \ No newline at end of file diff --git a/templates/login.html b/templates/login.html index 99fcbf3e..fd47aacb 100644 --- a/templates/login.html +++ b/templates/login.html @@ -5,22 +5,74 @@ Tornium - Login - - - + + + + + + + + + + + + + + - -
-
-

Please sign in with your API key

- -
- - -
+ +
+
+
+
+
+
Log into Tornium
+ +

+ Tornium keeps all your data protected and secured on its servers. No data or API keys will be accessed without permission beyond for security and maintenance. It is recommended to use a separate API for each service you utilize. +

- - -
+
+
+
+ + +
+ +
+ NOTE: Tornium will only accept limited or full access API keys. Any other API key access (including specific permissions) will not be accepted. +
+
+
+
+
+
+
+
diff --git a/templates/navbar.html b/templates/navbar.html deleted file mode 100644 index 1a93a601..00000000 --- a/templates/navbar.html +++ /dev/null @@ -1,54 +0,0 @@ - diff --git a/templates/settings.html b/templates/settings.html new file mode 100644 index 00000000..23e279fc --- /dev/null +++ b/templates/settings.html @@ -0,0 +1,67 @@ +{% extends 'base.html' %} + +{% block title %} +Tornium - Settings +{% endblock %} + +{% block breadcrumbs %} + +{% endblock %} + +{% block content %} +
+
+
Tornium Client Settings
+

+ Settings for Tornium clients that's stored in cookies on a per-device basis. +

+ + +
+
+ +
+
+
Tornium Server Settings
+

+ Settings for Tornium stored on the server that applies to all devices signed in with your API key. +

+ + + +
+
+{% endblock %} + +{% block scripts %} + +{% endblock %} \ No newline at end of file diff --git a/templates/stats/chain.html b/templates/stats/chain.html index 460fb289..2ce650ee 100644 --- a/templates/stats/chain.html +++ b/templates/stats/chain.html @@ -4,10 +4,47 @@ Tornium - Chain Generator {% endblock %} -{% block content %} -{% include 'navbar.html' %} -{% include 'stats/navbar.html' %} +{% block breadcrumbs %} + +{% endblock %} + +{% block subnav %} +
+
+ + + + {% if current_user.is_authenticated and current_user.is_aa() %} + + {% endif %} +
+
+{% endblock %} + +{% block content %}
@@ -45,7 +82,7 @@
Chain List Generator Options
very few total stats.
- +
diff --git a/templates/stats/config.html b/templates/stats/config.html index 09e0fb01..fbeb4366 100644 --- a/templates/stats/config.html +++ b/templates/stats/config.html @@ -4,11 +4,47 @@ Tornium - Stat DB Config {% endblock %} -{% block content %} +{% block breadcrumbs %} + +{% endblock %} + +{% block subnav %} +
+
+ -{% include 'navbar.html' %} -{% include 'stats/navbar.html' %} + + {% if current_user.is_authenticated and current_user.is_aa() %} + + {% endif %} +
+
+{% endblock %} + +{% block content %}
@@ -19,11 +55,11 @@
Stat DB

{% if config['stat'] == 0 %} - - + + {% else %} - - + + {% endif %}
@@ -40,11 +76,11 @@
Global Sharing

{% if config['global'] == 0 %} - - + + {% else %} - - + + {% endif %}
diff --git a/templates/stats/db.html b/templates/stats/db.html index c005dc2b..8192e6e0 100644 --- a/templates/stats/db.html +++ b/templates/stats/db.html @@ -4,11 +4,47 @@ Tornium - Stat DB {% endblock %} -{% block content %} +{% block breadcrumbs %} + +{% endblock %} + +{% block subnav %} +
+
+ -{% include 'navbar.html' %} -{% include 'stats/navbar.html' %} + + {% if current_user.is_authenticated and current_user.is_aa() %} + + {% endif %} +
+
+{% endblock %} + +{% block content %}
diff --git a/templates/stats/index.html b/templates/stats/index.html index e2630497..61e6ff17 100644 --- a/templates/stats/index.html +++ b/templates/stats/index.html @@ -4,11 +4,44 @@ Tornium - Stat DB {% endblock %} -{% block content %} +{% block breadcrumbs %} + +{% endblock %} + +{% block subnav %} +
+
+ + + -{% include 'navbar.html' %} -{% include 'stats/navbar.html' %} + {% if current_user.is_authenticated and current_user.is_aa() %} + + {% endif %} +
+
+{% endblock %} +{% block content %}
@@ -33,4 +66,4 @@
-{% endblock %} +{% endblock %} \ No newline at end of file diff --git a/templates/stats/navbar.html b/templates/stats/navbar.html deleted file mode 100644 index a1e55456..00000000 --- a/templates/stats/navbar.html +++ /dev/null @@ -1,33 +0,0 @@ - \ No newline at end of file diff --git a/templates/torn/factions.html b/templates/torn/factions.html index 965fd69a..bbd99949 100644 --- a/templates/torn/factions.html +++ b/templates/torn/factions.html @@ -4,11 +4,39 @@ Tornium - Factions DB {% endblock %} -{% block content %} +{% block breadcrumbs %} + +{% endblock %} -{% include 'navbar.html' %} -{% include 'torn/navbar.html' %} +{% block subnav %} + +{% endblock %} + +{% block content %}
diff --git a/templates/torn/index.html b/templates/torn/index.html index 026687d6..7f1b68e9 100644 --- a/templates/torn/index.html +++ b/templates/torn/index.html @@ -4,11 +4,36 @@ Tornium - Torn {% endblock %} -{% block content %} +{% block breadcrumbs %} + +{% endblock %} -{% include 'navbar.html' %} -{% include 'torn/navbar.html' %} +{% block subnav %} + +{% endblock %} + +{% block content %}
diff --git a/templates/torn/users.html b/templates/torn/users.html index dd0b62e0..9048e7cd 100644 --- a/templates/torn/users.html +++ b/templates/torn/users.html @@ -4,11 +4,39 @@ Tornium - Users DB {% endblock %} -{% block content %} +{% block breadcrumbs %} + +{% endblock %} -{% include 'navbar.html' %} -{% include 'torn/navbar.html' %} +{% block subnav %} + +{% endblock %} + +{% block content %}