Commit 6ce1d41a authored by 神楽坂玲奈's avatar 神楽坂玲奈

fix

parent 4268cf19
......@@ -5,7 +5,6 @@
"requires": true,
"packages": {
"": {
"name": "console-web",
"version": "0.0.0",
"dependencies": {
"@angular/animations": "~12.2.0",
......@@ -115,3 +115,7 @@
#sidebarMenu {
overflow-y: auto;
}
/*.nav-link {*/
/* padding-bottom: 0;*/
/*}*/
......@@ -17,17 +17,17 @@
<div class='row'>
<nav id='sidebarMenu' class='col-md-3 col-lg-2 d-md-block bg-light sidebar collapse'>
<div class='position-sticky pt-3'>
<h6 class='sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted'>
<span>Apps</span>
<h6 class='sidebar-heading d-flex justify-content-between align-items-center px-3 mb-1 text-muted'>
<span>应用</span>
<a class='link-secondary' href='#' aria-label='Add a new report'>
<span data-feather='plus-circle'></span>
</a>
</h6>
<ul class='nav flex-column'>
<li class='nav-item' *ngFor='let app of apps | async'>
<a class='nav-link' [routerLink]="['apps', app.id]">
<img class='feather' [src]='app.icon'>
{{app.id}}
<a class='nav-link' [routerLink]="['apps', app.id]" routerLinkActive="active">
<img class='feather' [src]='app.icon' *ngIf="app.icon">
{{showName(app)}}
</a>
</li>
</ul>
......
import {AfterViewInit, Component} from '@angular/core';
import { AfterViewInit, Component } from '@angular/core';
import feather from 'feather-icons';
import {AppService} from "./app/app.service";
import { AppService, AppsJson } from './app/app.service';
@Component({
selector: 'app-root',
templateUrl: './mycard.component.html',
styleUrls: ['./mycard.component.css']
styleUrls: ['./mycard.component.css'],
})
export class MyCardComponent implements AfterViewInit {
title = 'console-web';
apps = this.appService.apps;
constructor(private appService: AppService) {
}
constructor(private appService: AppService) {}
ngAfterViewInit(): void {
feather.replace();
}
// getI18nName(app: AppsJson.App){
// return app.name['']
// }
showName(app: AppsJson.App) {
if (!app.name) return app.id;
return app.name['zh-CN'];
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment