mirror of
git://f0xx.org/ac/ac-be-remote-access
synced 2026-07-29 02:58:19 +03:00
initial
This commit is contained in:
58
views/partials/console_home_landing.php
Normal file
58
views/partials/console_home_landing.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
$bp = Auth::basePath();
|
||||
$proj = '/app/androidcast_project';
|
||||
?>
|
||||
<div class="console-home">
|
||||
<div class="toolbar reports-toolbar console-home-toolbar">
|
||||
<h1 data-i18n="home.title">Console</h1>
|
||||
<div class="toolbar-actions">
|
||||
<label class="toolbar-select">
|
||||
<span data-i18n="theme.label">Theme</span>
|
||||
<select id="theme-select" aria-label="UI theme" data-i18n-options="theme">
|
||||
<option value="dark" data-i18n="theme.dark">Dark</option>
|
||||
<option value="light" data-i18n="theme.light">Light</option>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<p class="console-home-intro" data-i18n="home.intro">Issue triage, tickets, and session metrics — pick a workspace below.</p>
|
||||
|
||||
<div class="cards cards--lift console-home-cards">
|
||||
<a href="<?= h($bp) ?>/?view=reports" class="card card--lift console-home-card">
|
||||
<span class="nav-icon nav-icon--reports" aria-hidden="true"></span>
|
||||
<h2 data-i18n="home.card_issues">Issues</h2>
|
||||
<p class="muted" data-i18n="home.card_issues_desc">Browse and triage issues, tags, and fingerprints.</p>
|
||||
</a>
|
||||
<button type="button" class="card card--lift console-home-card console-home-card--btn js-new-issue-btn">
|
||||
<span class="nav-icon nav-icon--reports" aria-hidden="true"></span>
|
||||
<h2 data-i18n="issues.new">New issue</h2>
|
||||
<p class="muted" data-i18n="home.card_new_issue_desc">Log a new issue or task in one step.</p>
|
||||
</button>
|
||||
<a href="<?= h($bp) ?>/?view=tickets" class="card card--lift console-home-card">
|
||||
<span class="nav-icon nav-icon--tickets" aria-hidden="true"></span>
|
||||
<h2 data-i18n="nav.tickets">Tickets</h2>
|
||||
<p class="muted" data-i18n="home.card_tickets_desc">Roadmap tasks, QA items, and workflow tags.</p>
|
||||
</a>
|
||||
<button type="button" class="card card--lift console-home-card console-home-card--btn js-new-ticket-btn">
|
||||
<span class="nav-icon nav-icon--tickets" aria-hidden="true"></span>
|
||||
<h2 data-i18n="tickets.new">New ticket</h2>
|
||||
<p class="muted" data-i18n="home.card_new_ticket_desc">Create a roadmap or QA ticket in one step.</p>
|
||||
</button>
|
||||
<a href="<?= h($proj) ?>/graphs/" class="card card--lift console-home-card">
|
||||
<span class="nav-icon nav-icon--graphs" aria-hidden="true"></span>
|
||||
<h2 data-i18n="home.card_graphs">Graphs</h2>
|
||||
<p class="muted" data-i18n="home.card_graphs_desc">Sessions, issues, and device activity over time.</p>
|
||||
</a>
|
||||
<?php if (Rbac::can('short_links_view')): ?>
|
||||
<a href="<?= h($bp) ?>/?view=short_links" class="card card--lift console-home-card">
|
||||
<span class="nav-icon nav-icon--link" aria-hidden="true"></span>
|
||||
<h2 data-i18n="home.card_short_links">Short links</h2>
|
||||
<p class="muted" data-i18n="home.card_short_links_desc">Mint bearer tokens and shorten URLs for s.f0xx.org.</p>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<h2 class="console-home-more" data-i18n="home.more">All services</h2>
|
||||
<?php $skip_home_link = true; require __DIR__ . '/console_quick_links.php'; ?>
|
||||
</div>
|
||||
37
views/partials/console_quick_links.php
Normal file
37
views/partials/console_quick_links.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* Horizontal service links with the same icons as the left nav (8px gap).
|
||||
* @var string|null $extra_class optional class on <nav>
|
||||
* @var bool $skip_home_link omit "Console home" (use on home view)
|
||||
*/
|
||||
$bp = Auth::basePath();
|
||||
$proj = '/app/androidcast_project';
|
||||
$navClass = 'console-quick-links graphs-quick-links' . (isset($extra_class) ? ' ' . $extra_class : '');
|
||||
$items = [];
|
||||
if (empty($skip_home_link)) {
|
||||
$items[] = ['Console home', $bp . '/?view=home', 'nav-icon--home'];
|
||||
}
|
||||
$items[] = ['Issues', $bp . '/?view=reports', 'nav-icon--reports'];
|
||||
$items[] = ['Tickets', $bp . '/?view=tickets', 'nav-icon--tickets'];
|
||||
if (Rbac::can('remote_access_view')) {
|
||||
$items[] = ['Remote access', $bp . '/?view=remote_access', 'nav-icon--remote'];
|
||||
}
|
||||
if (Rbac::can('short_links_view')) {
|
||||
$items[] = ['Short links', $bp . '/?view=short_links', 'nav-icon--link'];
|
||||
}
|
||||
if (Rbac::canManageRbac()) {
|
||||
$items[] = ['Access control', $bp . '/?view=rbac', 'nav-icon--tickets'];
|
||||
}
|
||||
$items[] = ['Graphs', $proj . '/graphs/', 'nav-icon--graphs'];
|
||||
$items[] = ['Builder', $proj . '/build/', 'nav-icon--builder'];
|
||||
$items[] = ['Hub', $proj . '/', 'nav-icon--home'];
|
||||
?>
|
||||
<nav class="<?= h($navClass) ?>" aria-label="Related services">
|
||||
<?php foreach ($items as [$label, $href, $icon]): ?>
|
||||
<a href="<?= h($href) ?>" class="console-quick-link">
|
||||
<span class="nav-icon <?= h($icon) ?>" aria-hidden="true"></span>
|
||||
<span><?= h($label) ?></span>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</nav>
|
||||
15
views/partials/cookie_consent.php
Normal file
15
views/partials/cookie_consent.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php declare(strict_types=1); ?>
|
||||
<div id="cookie-consent-banner" class="cookie-consent" hidden role="dialog" aria-labelledby="cookie-consent-title" aria-modal="false">
|
||||
<div class="cookie-consent-inner">
|
||||
<p id="cookie-consent-title" class="cookie-consent-title">Cookies on AndroidCast</p>
|
||||
<p class="cookie-consent-text muted">
|
||||
We use necessary session cookies to sign you in. With your consent we also load analytics to improve the service.
|
||||
You can change this later in your browser by clearing site data.
|
||||
</p>
|
||||
<div class="cookie-consent-actions">
|
||||
<button type="button" class="btn btn--primary" id="cookie-consent-all">Accept all</button>
|
||||
<button type="button" class="btn" id="cookie-consent-necessary">Necessary only</button>
|
||||
<button type="button" class="btn btn--ghost" id="cookie-consent-reject">Reject optional</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user