refactor: Cleanup git state - commit all staged changes
Major refactoring cleanup: - Add new controller architecture (class-controller-*.php) - Add new settings-v2 UI (views/settings-v2/) - Add new CSS architecture (agentic-sidebar.css, tokens) - Add esbuild build pipeline (scripts/build.js, package.json) - Add composer dependencies (vendor/) - Add frontend src directory (assets/js/src/index.jsx) - Add documentation files - Remove old/obsolete files (class-settings.php, old CSS) This commits all pending changes from previous refactoring efforts.
This commit is contained in:
66
views/settings-v2/tab-cost-log.php
Normal file
66
views/settings-v2/tab-cost-log.php
Normal file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
/**
|
||||
* Settings V2: Cost Log.
|
||||
*
|
||||
* @package WP_Agentic_Writer
|
||||
*/
|
||||
|
||||
if (!defined("ABSPATH")) {
|
||||
exit();
|
||||
} ?>
|
||||
<div class="section-head"><div><p class="eyebrow"><?php esc_html_e(
|
||||
"Spend visibility",
|
||||
"wp-agentic-writer",
|
||||
); ?></p><h2><?php esc_html_e(
|
||||
"OpenRouter cost log",
|
||||
"wp-agentic-writer",
|
||||
); ?></h2><p><?php esc_html_e(
|
||||
"Review usage, monthly spend, and per-post OpenRouter costs.",
|
||||
"wp-agentic-writer",
|
||||
); ?></p></div><button type="button" class="btn btn-small" id="wpaw-export-csv"><?php esc_html_e(
|
||||
"Export CSV",
|
||||
"wp-agentic-writer",
|
||||
); ?></button></div>
|
||||
<div class="panel"><div class="panel-head"><div class="panel-title"><h3><?php esc_html_e(
|
||||
"Monthly summary",
|
||||
"wp-agentic-writer",
|
||||
); ?></h3><p><?php esc_html_e(
|
||||
"Current month usage from the cost tracker.",
|
||||
"wp-agentic-writer",
|
||||
); ?></p></div></div><div class="panel-body grid-3"><div class="metric-card"><div class="metric-value">$<?php echo esc_html(
|
||||
number_format_i18n($monthly_used, 2),
|
||||
); ?></div><div class="metric-label"><?php esc_html_e(
|
||||
"Used",
|
||||
"wp-agentic-writer",
|
||||
); ?></div></div><div class="metric-card"><div class="metric-value">$<?php echo esc_html(
|
||||
number_format_i18n($monthly_budget, 2),
|
||||
); ?></div><div class="metric-label"><?php esc_html_e(
|
||||
"Budget",
|
||||
"wp-agentic-writer",
|
||||
); ?></div></div><div class="metric-card"><div class="metric-value"><?php echo esc_html(
|
||||
number_format_i18n($budget_percent, 1),
|
||||
); ?>%</div><div class="progress"><span style="width: <?php echo esc_attr(
|
||||
min(100, $budget_percent),
|
||||
); ?>%"></span></div><div class="metric-label"><?php esc_html_e(
|
||||
"Budget usage",
|
||||
"wp-agentic-writer",
|
||||
); ?></div></div></div></div>
|
||||
<div class="panel"><div class="panel-head"><div class="panel-title"><h3><?php esc_html_e(
|
||||
"Recent usage",
|
||||
"wp-agentic-writer",
|
||||
); ?></h3><p><?php esc_html_e(
|
||||
"Expand each post to see action-level calls and costs.",
|
||||
"wp-agentic-writer",
|
||||
); ?></p></div></div><div class="panel-body"><table class="ds-table" id="wpaw-cost-log-table"><thead><tr><th><?php esc_html_e(
|
||||
"Post",
|
||||
"wp-agentic-writer",
|
||||
); ?></th><th><?php esc_html_e(
|
||||
"Actions / calls",
|
||||
"wp-agentic-writer",
|
||||
); ?></th><th><?php esc_html_e(
|
||||
"Total cost",
|
||||
"wp-agentic-writer",
|
||||
); ?></th></tr></thead><tbody id="wpaw-cost-log-tbody"><tr><td colspan="3"><?php esc_html_e(
|
||||
"Cost data will appear after OpenRouter generations.",
|
||||
"wp-agentic-writer",
|
||||
); ?></td></tr></tbody></table></div></div>
|
||||
Reference in New Issue
Block a user