Fix: Align get many methods with DB authorisation changes.

This commit is contained in:
2026-03-28 11:51:27 +00:00
parent 7da5d49bc1
commit c50463a1cd
11 changed files with 496 additions and 32 deletions

View File

@@ -1,18 +1,25 @@
Magic: The Gathering trading card game commander life tracking tool.
## Magic: The Gathering trading card game commander life tracking tool.
Powered by flask
enter virtual environment:
python -m venv VIRTUAL_ENVIRONMENT_NAME
# create virtual environment
python3 -m venv VIRTUAL_ENVIRONMENT_NAME
run module bundler:
# enter virtual environment
source ./VIRTUAL_ENVIRONMENT_NAME/bin/activate
# run module bundler
npm run build
host for machine:
python -m flask run
# create ssh tunnel to vps hosting db
ssh -i /path/to/your/key.pem -L 5433:localhost:5433 user@your-vps-ip -N
host for local network:
python -m flask run --host=0.0.0.0
# host
for machine:
python3 -m flask run
for local network:
python3 -m flask run --host=0.0.0.0
files dedicated to each page:

View File

@@ -155,6 +155,9 @@ class Parameters_MTG_Game_Player(Get_Many_Parameters_Base):
get_all_game: bool
get_inactive_game: bool
game_ids: str
get_all_user: bool
get_inactive_user: bool
user_ids: str
require_all_id_filters_met: bool
require_any_id_filters_met: bool
@@ -165,6 +168,9 @@ class Parameters_MTG_Game_Player(Get_Many_Parameters_Base):
, get_all_game = True
, get_inactive_game = False
, game_ids = ''
, get_all_user = True
, get_inactive_user = False
, user_ids = ''
, require_all_id_filters_met = True
, require_any_id_filters_met = True
)
@@ -176,6 +182,9 @@ class Parameters_MTG_Game_Player(Get_Many_Parameters_Base):
, get_all_game = json.get('a_get_all_game', False)
, get_inactive_game = json.get('a_get_inactive_game', False)
, game_ids = json.get('a_game_ids', '')
, get_all_user = json.get('a_get_all_user', False)
, get_inactive_user = json.get('a_get_inactive_user', False)
, user_ids = json.get('a_user_ids', '')
, require_all_id_filters_met = json.get('a_require_all_id_filters_met', True)
, require_any_id_filters_met = json.get('a_require_any_id_filters_met', True)
)
@@ -186,6 +195,9 @@ class Parameters_MTG_Game_Player(Get_Many_Parameters_Base):
, 'a_get_all_game': self.get_all_game
, 'a_get_inactive_game': self.get_inactive_game
, 'a_game_ids': self.game_ids
, 'a_get_all_user': self.get_all_user
, 'a_get_inactive_user': self.get_inactive_user
, 'a_user_ids': self.user_ids
, 'a_require_all_id_filters_met': self.require_all_id_filters_met
, 'a_require_any_id_filters_met': self.require_any_id_filters_met
}
@@ -197,6 +209,9 @@ class Parameters_MTG_Game_Player(Get_Many_Parameters_Base):
, 'a_get_all_game': Boolean
, 'a_get_inactive_game': Boolean
, 'a_game_ids': Text
, 'a_get_all_user': Boolean
, 'a_get_inactive_user': Boolean
, 'a_user_ids': Text
, 'a_require_all_id_filters_met': Boolean
, 'a_require_any_id_filters_met': Boolean
}

View File

@@ -134,6 +134,9 @@ class Parameters_MTG_Game_Round(Get_Many_Parameters_Base):
get_all_game: bool
get_inactive_game: bool
game_ids: str
get_all_user: bool
get_inactive_user: bool
user_ids: str
require_all_id_filters_met: bool
require_any_id_filters_met: bool
@@ -144,6 +147,9 @@ class Parameters_MTG_Game_Round(Get_Many_Parameters_Base):
, get_all_game = True
, get_inactive_game = False
, game_ids = ''
, get_all_user = True
, get_inactive_user = False
, user_ids = ''
, require_all_id_filters_met = True
, require_any_id_filters_met = True
)
@@ -155,6 +161,9 @@ class Parameters_MTG_Game_Round(Get_Many_Parameters_Base):
, get_all_game = json.get('a_get_all_game', False)
, get_inactive_game = json.get('a_get_inactive_game', False)
, game_ids = json.get('a_game_ids', '')
, get_all_user = json.get('a_get_all_user', False)
, get_inactive_user = json.get('a_get_inactive_user', False)
, user_ids = json.get('a_user_ids', '')
, require_all_id_filters_met = json.get('a_require_all_id_filters_met', True)
, require_any_id_filters_met = json.get('a_require_any_id_filters_met', True)
)
@@ -165,6 +174,9 @@ class Parameters_MTG_Game_Round(Get_Many_Parameters_Base):
, 'a_get_all_game': self.get_all_game
, 'a_get_inactive_game': self.get_inactive_game
, 'a_game_ids': self.game_ids
, 'a_get_all_user': self.get_all_user
, 'a_get_inactive_user': self.get_inactive_user
, 'a_user_ids': self.user_ids
, 'a_require_all_id_filters_met': self.require_all_id_filters_met
, 'a_require_any_id_filters_met': self.require_any_id_filters_met
}
@@ -176,6 +188,9 @@ class Parameters_MTG_Game_Round(Get_Many_Parameters_Base):
, 'a_get_all_game': Boolean
, 'a_get_inactive_game': Boolean
, 'a_game_ids': Text
, 'a_get_all_user': Boolean
, 'a_get_inactive_user': Boolean
, 'a_user_ids': Text
, 'a_require_all_id_filters_met': Boolean
, 'a_require_any_id_filters_met': Boolean
}

View File

@@ -167,6 +167,9 @@ class Parameters_MTG_Game_Round_Player_Damage(Get_Many_Parameters_Base):
get_all_game: bool
get_inactive_game: bool
game_ids: str
get_all_user: bool
get_inactive_user: bool
user_ids: str
require_all_id_filters_met: bool
require_any_id_filters_met: bool
@@ -177,6 +180,9 @@ class Parameters_MTG_Game_Round_Player_Damage(Get_Many_Parameters_Base):
, get_all_game = True
, get_inactive_game = False
, game_ids = ''
, get_all_user = True
, get_inactive_user = False
, user_ids = ''
, require_all_id_filters_met = True
, require_any_id_filters_met = True
)
@@ -188,6 +194,9 @@ class Parameters_MTG_Game_Round_Player_Damage(Get_Many_Parameters_Base):
, get_all_game = json.get('a_get_all_game', False)
, get_inactive_game = json.get('a_get_inactive_game', False)
, game_ids = json.get('a_game_ids', '')
, get_all_user = json.get('a_get_all_user', False)
, get_inactive_user = json.get('a_get_inactive_user', False)
, user_ids = json.get('a_user_ids', '')
, require_all_id_filters_met = json.get('a_require_all_id_filters_met', True)
, require_any_id_filters_met = json.get('a_require_any_id_filters_met', True)
)
@@ -198,6 +207,9 @@ class Parameters_MTG_Game_Round_Player_Damage(Get_Many_Parameters_Base):
, 'a_get_all_game': self.get_all_game
, 'a_get_inactive_game': self.get_inactive_game
, 'a_game_ids': self.game_ids
, 'a_get_all_user': self.get_all_user
, 'a_get_inactive_user': self.get_inactive_user
, 'a_user_ids': self.user_ids
, 'a_require_all_id_filters_met': self.require_all_id_filters_met
, 'a_require_any_id_filters_met': self.require_any_id_filters_met
}
@@ -209,6 +221,9 @@ class Parameters_MTG_Game_Round_Player_Damage(Get_Many_Parameters_Base):
, 'a_get_all_game': Boolean
, 'a_get_inactive_game': Boolean
, 'a_game_ids': Text
, 'a_get_all_user': Boolean
, 'a_get_inactive_user': Boolean
, 'a_user_ids': Text
, 'a_require_all_id_filters_met': Boolean
, 'a_require_any_id_filters_met': Boolean
}

View File

@@ -100,7 +100,9 @@ script, link {
margin: 0.5vh auto;
}
section {
margin: 0 auto;
}
/* Add a card effect for articles */
.card {

View File

@@ -1,7 +1,186 @@
#pageBody .column .row {
margin-top: 0.5vh;
/* Landing Page - Hero Section */
.home-hero {
text-align: center;
padding: 6rem 2rem 4rem;
position: relative;
}
.home-hero::before {
content: '';
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
width: 900px;
height: 550px;
background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
pointer-events: none;
}
.home-hero-eyebrow {
font-family: 'Cinzel', serif;
font-size: 1.5rem;
color: var(--tcg-accent-purple);
letter-spacing: 0.3em;
text-transform: uppercase;
margin-bottom: 1.5rem;
animation: tcg-fadeIn 0.6s ease both;
}
.home-hero-title {
font-family: 'Cinzel', serif;
font-size: clamp(2.5rem, 6vw, 4.5rem);
font-weight: 700;
background: linear-gradient(135deg, var(--tcg-accent-gold) 30%, var(--tcg-accent-purple));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
letter-spacing: 0.05em;
text-transform: uppercase;
margin: 0 0 1.5rem;
line-height: 1.1;
animation: tcg-fadeInDown 0.8s ease 0.1s both;
}
.home-hero-subtitle {
font-size: clamp(1.1rem, 2vw, 1.4rem);
color: var(--tcg-text-secondary);
max-width: 580px;
margin: 0 auto 3rem;
line-height: 1.7;
animation: tcg-fadeIn 0.8s ease 0.3s both;
}
.home-hero-actions {
display: flex;
gap: 1.25rem;
justify-content: center;
flex-wrap: wrap;
animation: tcg-fadeIn 0.8s ease 0.5s both;
}
/* Divider */
.home-divider {
width: 80px;
height: 3px;
background: linear-gradient(90deg, var(--tcg-accent-purple), var(--tcg-accent-gold));
margin: 0 auto;
border-radius: 2px;
}
/* Features Section */
.home-features {
padding: 2rem 0;
}
.home-features-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
gap: 1.5rem;
margin-top: 2.5rem;
}
.home-feature-card {
position: relative;
text-align: center;
}
.home-feature-card:nth-child(1) { animation: tcg-scaleIn 0.6s ease 0.1s both; }
.home-feature-card:nth-child(2) { animation: tcg-scaleIn 0.6s ease 0.25s both; }
.home-feature-card:nth-child(3) { animation: tcg-scaleIn 0.6s ease 0.4s both; }
.home-feature-symbol {
width: 56px;
height: 56px;
margin: 0 auto 1.25rem;
background: linear-gradient(135deg, var(--tcg-accent-purple), var(--tcg-accent-gold));
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
font-family: 'Cinzel', serif;
font-size: 1.4rem;
color: var(--tcg-bg-primary);
font-weight: 700;
letter-spacing: 0;
}
.home-feature-card h3 {
font-family: 'Cinzel', serif;
color: var(--tcg-accent-gold);
font-size: 1.05rem;
margin: 0 0 0.75rem;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.home-feature-card p {
color: var(--tcg-text-secondary);
font-size: 1.1rem;
line-height: 1.6;
margin: 0;
}
/* CTA Section */
.home-cta {
text-align: center;
padding: 4rem 2rem;
background: var(--tcg-bg-secondary);
border: 2px solid var(--tcg-border-color);
border-radius: 16px;
margin-top: 1rem;
position: relative;
/* overflow: hidden; */
animation: tcg-fadeIn 0.8s ease 0.6s both;
}
.home-cta::before {
content: '';
position: absolute;
inset: 0;
background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.06) 0%, transparent 70%);
pointer-events: none;
}
.home-cta-title {
font-family: 'Cinzel', serif;
font-size: clamp(1.4rem, 3vw, 2rem);
color: var(--tcg-text-primary);
margin: 0 0 1rem;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.home-cta-subtitle {
color: var(--tcg-text-secondary);
font-size: 1.15rem;
margin: 0 auto 2.5rem;
max-width: 500px;
line-height: 1.6;
}
/* Responsive */
@media screen and (max-width: 768px) {
.home-hero {
padding: 3rem 1rem 2rem;
}
.home-hero-actions {
flex-direction: column;
align-items: center;
}
.home-hero-actions .btn-tcg {
width: 100%;
max-width: 280px;
text-align: center;
}
.home-features-grid {
grid-template-columns: 1fr;
}
.home-cta {
padding: 2.5rem 1.5rem;
}
}
#pageBody .column .row .button {
margin-left: auto;
margin-right: auto;
}

View File

@@ -100,7 +100,9 @@ script, link {
margin: 0.5vh auto;
}
section {
margin: 0 auto;
}
/* Add a card effect for articles */
.card {

File diff suppressed because one or more lines are too long

View File

@@ -63,12 +63,192 @@
padding: 0;
margin: 0;
}
#pageBody .column .row {
margin-top: 0.5vh;
}
#pageBody .column .row .button {
margin-left: auto;
margin-right: auto;
/* Landing Page - Hero Section */
.home-hero {
text-align: center;
padding: 6rem 2rem 4rem;
position: relative;
}
.home-hero::before {
content: '';
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
width: 900px;
height: 550px;
background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
pointer-events: none;
}
.home-hero-eyebrow {
font-family: 'Cinzel', serif;
font-size: 1.5rem;
color: var(--tcg-accent-purple);
letter-spacing: 0.3em;
text-transform: uppercase;
margin-bottom: 1.5rem;
animation: tcg-fadeIn 0.6s ease both;
}
.home-hero-title {
font-family: 'Cinzel', serif;
font-size: clamp(2.5rem, 6vw, 4.5rem);
font-weight: 700;
background: linear-gradient(135deg, var(--tcg-accent-gold) 30%, var(--tcg-accent-purple));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
letter-spacing: 0.05em;
text-transform: uppercase;
margin: 0 0 1.5rem;
line-height: 1.1;
animation: tcg-fadeInDown 0.8s ease 0.1s both;
}
.home-hero-subtitle {
font-size: clamp(1.1rem, 2vw, 1.4rem);
color: var(--tcg-text-secondary);
max-width: 580px;
margin: 0 auto 3rem;
line-height: 1.7;
animation: tcg-fadeIn 0.8s ease 0.3s both;
}
.home-hero-actions {
display: flex;
gap: 1.25rem;
justify-content: center;
flex-wrap: wrap;
animation: tcg-fadeIn 0.8s ease 0.5s both;
}
/* Divider */
.home-divider {
width: 80px;
height: 3px;
background: linear-gradient(90deg, var(--tcg-accent-purple), var(--tcg-accent-gold));
margin: 0 auto;
border-radius: 2px;
}
/* Features Section */
.home-features {
padding: 2rem 0;
}
.home-features-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
gap: 1.5rem;
margin-top: 2.5rem;
}
.home-feature-card {
position: relative;
text-align: center;
}
.home-feature-card:nth-child(1) { animation: tcg-scaleIn 0.6s ease 0.1s both; }
.home-feature-card:nth-child(2) { animation: tcg-scaleIn 0.6s ease 0.25s both; }
.home-feature-card:nth-child(3) { animation: tcg-scaleIn 0.6s ease 0.4s both; }
.home-feature-symbol {
width: 56px;
height: 56px;
margin: 0 auto 1.25rem;
background: linear-gradient(135deg, var(--tcg-accent-purple), var(--tcg-accent-gold));
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
font-family: 'Cinzel', serif;
font-size: 1.4rem;
color: var(--tcg-bg-primary);
font-weight: 700;
letter-spacing: 0;
}
.home-feature-card h3 {
font-family: 'Cinzel', serif;
color: var(--tcg-accent-gold);
font-size: 1.05rem;
margin: 0 0 0.75rem;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.home-feature-card p {
color: var(--tcg-text-secondary);
font-size: 1.1rem;
line-height: 1.6;
margin: 0;
}
/* CTA Section */
.home-cta {
text-align: center;
padding: 4rem 2rem;
background: var(--tcg-bg-secondary);
border: 2px solid var(--tcg-border-color);
border-radius: 16px;
margin-top: 1rem;
position: relative;
/* overflow: hidden; */
animation: tcg-fadeIn 0.8s ease 0.6s both;
}
.home-cta::before {
content: '';
position: absolute;
inset: 0;
background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.06) 0%, transparent 70%);
pointer-events: none;
}
.home-cta-title {
font-family: 'Cinzel', serif;
font-size: clamp(1.4rem, 3vw, 2rem);
color: var(--tcg-text-primary);
margin: 0 0 1rem;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.home-cta-subtitle {
color: var(--tcg-text-secondary);
font-size: 1.15rem;
margin: 0 auto 2.5rem;
max-width: 500px;
line-height: 1.6;
}
/* Responsive */
@media screen and (max-width: 768px) {
.home-hero {
padding: 3rem 1rem 2rem;
}
.home-hero-actions {
flex-direction: column;
align-items: center;
}
.home-hero-actions .btn-tcg {
width: 100%;
max-width: 280px;
text-align: center;
}
.home-features-grid {
grid-template-columns: 1fr;
}
.home-cta {
padding: 2.5rem 1.5rem;
}
}
/*# sourceMappingURL=tcg_home.bundle.css.map*/

File diff suppressed because one or more lines are too long

View File

@@ -5,14 +5,63 @@
{% endblock %}
{% block page_body %}
<header class="game-header">
<div class="header-left"></div>
<div class="header-center">
<div class="game-meta">Home</div>
<!-- Hero -->
<section class="home-hero">
<p class="home-hero-eyebrow">{{ model.NAME_COMPANY }}</p>
<h1 class="home-hero-title">Commander Life Tracker</h1>
<p class="home-hero-subtitle">
Track life totals and commander damage across your multiplayer games.
Manage your decks, join sessions, and focus on the battle.
</p>
<div class="home-hero-actions">
<a class="btn-tcg {{ model.FLAG_NAV_USER_LOGIN }}">Sign In</a>
<a href="{{ model.HASH_PAGE_MTG_TRIAL_GAME }}" class="btn-tcg btn-tcg-secondary">Try a Free Game</a>
</div>
<div class="header-right"></div>
</header>
</section>
<script>
</script>
<!-- Divider -->
<div class="home-divider"></div>
<!-- Features -->
<section class="home-features">
<h2 class="tcg-section-title">Everything You Need at the Table</h2>
<div class="home-features-grid">
<div class="tcg-card home-feature-card">
<div class="home-feature-symbol">40</div>
<h3>Life Tracking</h3>
<p>
Track life totals and commander damage for every player in real time.
Built for Commander's multiplayer chaos.
</p>
</div>
<div class="tcg-card home-feature-card">
<div class="home-feature-symbol">&#9670;</div>
<h3>Deck Management</h3>
<p>
Store and organise your Commander decks. Choose your general before each game
and keep your collection in one place.
</p>
</div>
<div class="tcg-card home-feature-card">
<div class="home-feature-symbol">&#9654;</div>
<h3>Instant Games</h3>
<p>
Create or join a game in seconds. No setup required &mdash; just share the session
and start playing.
</p>
</div>
</div>
</section>
<!-- CTA -->
<section class="home-cta">
<h2 class="home-cta-title">Ready to Play?</h2>
<p class="home-cta-subtitle">
Sign in to save your games and decks, or jump straight into a trial game with no account required.
</p>
<div class="home-hero-actions">
<a class="btn-tcg {{ model.FLAG_NAV_USER_LOGIN }}">Sign In</a>
<a href="{{ model.HASH_PAGE_MTG_TRIAL_GAME }}" class="btn-tcg btn-tcg-secondary">Try Without an Account</a>
</div>
</section>
{% endblock %}