Files
Artemis-Eapil/apps/showcase_ui/src/app/components/nav-switcher/nav-switcher.component.ts
T
chenmingxuan fac4ccb760 feat: prepare 2.2.0 with UI and execution fixes
Add dark theme, richer Markdown and readable plugin results.
Improve Android input evidence, response integrity and diagnostics.
Unify lifecycle, guidance receipts and evidence sources across clients.
Keep direct action dispatch without an added AI quota approval layer.
Align version metadata at 2.2.0 and bundle Helper 1.2.2.

Validation: 3063 backend tests before the version bump; 44 after.
Frontend: 317 tests and production build passed.
2026-10-26 00:44:13 +08:00

69 lines
2.7 KiB
TypeScript

/**
* Copyright 2026 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Component, ChangeDetectionStrategy, inject } from '@angular/core';
import { RouterLink, RouterLinkActive } from '@angular/router';
import { version } from '../../../../package.json';
import { ThemeService } from '../../services/theme.service';
@Component({
selector: 'app-nav-switcher',
standalone: true,
imports: [RouterLink, RouterLinkActive],
template: `
<nav class="floating-nav-switcher" aria-label="主导航">
<a
routerLink="/"
routerLinkActive="active"
[routerLinkActiveOptions]="{exact: true}"
class="nav-tab-btn"
aria-label="新任务 / 首页"
title="返回首页开始新任务"
>
<span class="material-symbols-outlined tab-icon">add_task</span>
<span class="tab-label">新任务 / 首页</span>
</a>
<a
routerLink="/workspace"
routerLinkActive="active"
class="nav-tab-btn"
aria-label="工作区"
title="打开工作区"
>
<span class="material-symbols-outlined tab-icon">space_dashboard</span>
<span class="tab-label">工作区</span>
</a>
<a routerLink="/plugins" routerLinkActive="active" class="nav-tab-btn" aria-label="插件" title="管理扩展插件">
<span class="material-symbols-outlined tab-icon">extension</span><span class="tab-label">插件</span>
</a>
<span class="app-version" [title]="'ARTEMIS 版本 ' + version" [attr.aria-label]="'ARTEMIS 版本 ' + version">v{{version}}</span>
<button type="button" class="theme-toggle"
[attr.aria-label]="theme.isDark() ? '切换为浅色模式' : '切换为暗色模式'"
[title]="theme.isDark() ? '切换为浅色模式' : '切换为暗色模式'"
(click)="theme.toggle()">
<span class="material-symbols-outlined" aria-hidden="true">{{ theme.isDark() ? 'light_mode' : 'dark_mode' }}</span>
</button>
</nav>
`,
changeDetection: ChangeDetectionStrategy.Eager,
styleUrls: ['./nav-switcher.component.scss']
})
export class NavSwitcherComponent {
readonly version = version;
readonly theme = inject(ThemeService);
}