Fix: remove AI Pricing badge from customer page, use relative API URLs via nginx proxy

This commit is contained in:
root
2026-06-20 19:34:21 +00:00
parent 66186168c7
commit 2161ba1df6
3 changed files with 10 additions and 24 deletions
+1 -1
View File
@@ -205,7 +205,7 @@
</div>
<script>
const API = 'http://192.168.1.126:8581';
const API = '';
let token = localStorage.getItem('vela_admin_token') || '';
let orders = [];
let currentFilter = 'all';
+1 -1
View File
@@ -109,7 +109,7 @@
</footer>
<script>
const API = 'http://192.168.1.126:8581';
const API = '';
const COOKIE_NAME = 'vela_order_check';
const STATUSES = ['received','confirmed','hardware ready','installing','completed'];
+8 -22
View File
@@ -93,7 +93,6 @@
.tier-specs li .check{color:var(--green)}
.tier-specs li .x{color:var(--red)}
.tier-card .btn{width:100%;justify-content:center;font-size:.82rem;white-space:nowrap}
#aiPricingBadge.loaded{opacity:1!important}
.why-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:1.5rem}
.why-card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:2rem}
.why-card .icon{font-size:1.8rem;margin-bottom:1rem}
@@ -221,21 +220,11 @@
<!-- Tiers -->
<section id="tiers">
<div class="section-inner">
<div class="section-label"><span class="en-only">Pricing</span><span class="fr-only">Tarifs</span></div>
<h2 class="section-title"><span class="en-only">Pick a tier. Get a server.</span><span class="fr-only">Choisissez une offre. Recevez un serveur.</span></h2>
<p class="section-sub en-only">Four options, from entry-level to redundant storage. All include hardware, on-site installation, and a working server before we leave.</p>
<p class="section-sub fr-only">Quatre options, de l'entrée de gamme au stockage redondant. Chaque offre inclut le matériel, l'installation sur place et un serveur opérationnel avant notre départ.</p>
<div style="display:flex;align-items:center;gap:.75rem;margin-bottom:2rem;flex-wrap:wrap">
<span id="aiPricingBadge" style="display:inline-flex;align-items:center;gap:.35rem;font-size:.72rem;padding:.2rem .6rem;border-radius:100px;background:rgba(59,130,246,.1);border:1px solid var(--accent);color:var(--accent);font-weight:500;opacity:.6;transition:opacity .3s">
<span style="width:6px;height:6px;border-radius:50%;background:var(--accent);animation:pulse 2s infinite;display:inline-block"></span>
<span class="en-only">AI Pricing — live from P&amp;L</span><span class="fr-only">Prix AI — en direct du P&amp;L</span>
</span>
<span style="font-size:.75rem;color:var(--text-muted)">
<span class="en-only">Prices auto-update when you change costs in the P&amp;L manager</span>
<span class="fr-only">Les prix se mettent à jour automatiquement depuis le gestionnaire P&amp;L</span>
</span>
</div>
<div class="tiers-grid">
<div class="section-label"><span class="en-only">Pricing</span><span class="fr-only">Tarifs</span></div>
<h2 class="section-title"><span class="en-only">Pick a tier. Get a server.</span><span class="fr-only">Choisissez une offre. Recevez un serveur.</span></h2>
<p class="section-sub en-only">Four options, from entry-level to redundant storage. All include hardware, on-site installation, and a working server before we leave.</p>
<p class="section-sub fr-only">Quatre options, de l'entrée de gamme au stockage redondant. Chaque offre inclut le matériel, l'installation sur place et un serveur opérationnel avant notre départ.</p>
<div class="tiers-grid">
<div class="tier-card">
<div class="tier-name">Rif</div>
<div class="tier-tag"><span class="en-only">entry-level</span><span class="fr-only">entrée de gamme</span></div>
@@ -513,16 +502,15 @@
<script>
(function(){
const API_URL = 'http://192.168.1.126:8581';
const API_URL = '';
// ── Live AI Pricing: fetch from P&L manager via API proxy ──
// ── Live Pricing: fetch from P&L manager via API proxy ──
const TIER_PRICE_MAP = {rif: 'Rif', rifplus: 'Rif+', atlas: 'Atlas', atlasplus: 'Atlas+'};
let livePrices = {};
let pricingLoaded = false;
async function fetchPricing() {
try {
const resp = await fetch(API_URL + '/api/public/pricing');
const resp = await fetch('/api/public/pricing');
if (!resp.ok) return;
const data = await resp.json();
for (const svc of data.pricing) {
@@ -565,8 +553,6 @@
}
}
});
// Show AI Pricing badge
document.getElementById('aiPricingBadge')?.classList.add('loaded');
} catch (e) {
console.log('Pricing API unavailable — using defaults');
}