1
0
mirror of git://f0xx.org/android_cast synced 2026-07-29 04:38:53 +03:00
This commit is contained in:
Anton Afanasyeu
2026-06-10 09:15:19 +02:00
parent 9f6d33cb26
commit e234a7b535
14 changed files with 280 additions and 34 deletions

View File

@@ -15,6 +15,9 @@
"nav.remote": "Remote access",
"nav.builder": "Builder",
"nav.toggle": "Navigation",
"nav.security": "Security",
"nav.logout": "Logout",
"nav.sign_in": "Sign in",
"lang.label": "Language",
"theme.label": "Theme",
"rail.label": "Page navigation",

View File

@@ -15,6 +15,9 @@
"nav.remote": "Удалённый доступ",
"nav.builder": "Сборщик",
"nav.toggle": "Навигация",
"nav.security": "Безопасность",
"nav.logout": "Выход",
"nav.sign_in": "Вход",
"lang.label": "Язык",
"theme.label": "Тема",
"rail.label": "Навигация по страницам",

View File

@@ -158,12 +158,26 @@
/* (2) Left shell — console nav-pane */
.landing-left.nav-pane {
position: relative;
display: flex;
flex-direction: column;
flex: 0 0 var(--landing-left-w);
width: var(--landing-left-w);
height: 100%;
max-height: 100%;
overflow: hidden;
z-index: 3;
pointer-events: auto;
border-right: 1px solid var(--border);
background: var(--surface);
}
.landing-left .nav-list {
flex: 1 1 auto;
min-height: 0;
overflow-y: auto;
}
.landing-left .nav-user {
margin-top: auto;
border-top: 1px solid var(--border);
}
.landing-left.nav-pane.open {
width: 200px;

View File

@@ -4,7 +4,22 @@ if (!is_file($__platformDir . '/footer.php')) {
$__platformDir = dirname(__DIR__) . '/platform';
}
require_once $__platformDir . '/footer.php';
unset($__platformDir);
$__sessionFile = $__platformDir . '/shared_session.php';
$hubCrashesBase = '/app/androidcast_project/crashes';
$hubUsername = '';
if (is_file($__sessionFile) && function_exists('session_start')) {
require_once $__sessionFile;
platform_start_session('ac_crash_sess', '/app/androidcast_project');
$hubUser = $_SESSION['user'] ?? null;
if (is_array($hubUser)) {
$hubUsername = trim((string) ($hubUser['username'] ?? ''));
}
}
unset($__platformDir, $__sessionFile);
function hub_h(string $s): string {
return htmlspecialchars($s, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');
}
?>
<!DOCTYPE html>
<html lang="en" data-theme="dark" data-clock-font="mixed">
@@ -129,6 +144,36 @@ unset($__platformDir);
<li><a href="crashes/?view=remote_access" class="nav-link"><span class="nav-icon nav-icon--reports"></span><span class="nav-label" data-i18n="nav.remote">Remote access</span></a></li>
<li><a href="build/" class="nav-link"><span class="nav-icon nav-icon--builder"></span><span class="nav-label" data-i18n="nav.builder">Builder</span></a></li>
</ul>
<div class="nav-user">
<?php if ($hubUsername !== ''): ?>
<span class="nav-user-name" title="<?= hub_h($hubUsername) ?>">
<span class="nav-icon nav-icon--user" aria-hidden="true"></span>
<span class="nav-label"><?= hub_h($hubUsername) ?></span>
</span>
<a href="<?= hub_h($hubCrashesBase) ?>/account-security"
class="nav-link"
data-i18n-aria="nav.security" data-i18n-title="nav.security"
aria-label="Security" title="Security">
<span class="nav-icon nav-icon--user" aria-hidden="true"></span>
<span class="nav-label" data-i18n="nav.security">Security</span>
</a>
<a href="<?= hub_h($hubCrashesBase) ?>/logout"
class="nav-link nav-link--logout"
data-i18n-aria="nav.logout" data-i18n-title="nav.logout"
aria-label="Logout" title="Logout">
<span class="nav-icon nav-icon--logout" aria-hidden="true"></span>
<span class="nav-label" data-i18n="nav.logout">Logout</span>
</a>
<?php else: ?>
<a href="<?= hub_h($hubCrashesBase) ?>/login"
class="nav-link"
data-i18n-aria="nav.sign_in" data-i18n-title="nav.sign_in"
aria-label="Sign in" title="Sign in">
<span class="nav-icon nav-icon--user" aria-hidden="true"></span>
<span class="nav-label" data-i18n="nav.sign_in">Sign in</span>
</a>
<?php endif; ?>
</div>
</nav>
<main class="landing-scroll" id="landing-scroll" tabindex="-1">