diff --git a/src/app/elements/content/content-tab/content-tab.component.html b/src/app/elements/content/content-tab/content-tab.component.html
index 414dc7274..f6e9001e5 100644
--- a/src/app/elements/content/content-tab/content-tab.component.html
+++ b/src/app/elements/content/content-tab/content-tab.component.html
@@ -2,18 +2,20 @@
(click)="setActive()"
(dblclick)="onDoubleClick()"
[id]="view.id"
- [ngClass]="{'active': view.active,'disconnected': !view.connected, 'hidden': view.closed != false}"
+ [ngClass]="{ active: view.active, disconnected: !view.connected, hidden: view.closed != false }"
[title]="view.name"
>
{{ view.name }}
-
+
×
diff --git a/src/app/elements/content/content-tab/content-tab.component.scss b/src/app/elements/content/content-tab/content-tab.component.scss
index 765b5fa65..b8241599b 100644
--- a/src/app/elements/content/content-tab/content-tab.component.scss
+++ b/src/app/elements/content/content-tab/content-tab.component.scss
@@ -19,9 +19,28 @@ li {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
+ transition:
+ background-color 160ms ease,
+ box-shadow 160ms ease,
+ color 160ms ease,
+ border-color 160ms ease;
&.active {
- box-shadow: inset 0 -2px var(--primary-color);
+ /* Subtle raised feel */
+ // background: linear-gradient(
+ // 180deg,
+ // rgba(255, 255, 255, 0.03) 0%,
+ // rgba(255, 255, 255, 0.01) 55%,
+ // rgba(0, 0, 0, 0.06) 100%
+ // );
+ border-top-left-radius: 2px;
+ border-top-right-radius: 2px;
+ border-left: 1px solid rgba(255, 255, 255, 0.05);
+ border-right: 1px solid rgba(0, 0, 0, 0.3);
+ /* Accent at bottom */
+ box-shadow:
+ inset 0 -1px 0 0 var(--primary-color),
+ inset 0 1px 0 0 rgba(255, 255, 255, 0.08);
span {
color: var(--el-icon-color);
@@ -41,13 +60,13 @@ li {
& > span {
display: flex;
align-items: center;
- gap:4px;
+ gap: 4px;
color: #cacaca;
font-size: 13px;
max-width: 164px;
cursor: pointer;
- .tab-text{
+ .tab-text {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
@@ -69,7 +88,7 @@ li {
display: flex;
align-items: center;
line-height: 30px;
- font-family: "Roboto", sans-serif;
+ font-family: 'Roboto', sans-serif;
font-size: 13px;
color: var(--el-icon-color);
cursor: pointer;
diff --git a/src/app/elements/nav/nav.component.html b/src/app/elements/nav/nav.component.html
index cef34055a..56c8539e7 100644
--- a/src/app/elements/nav/nav.component.html
+++ b/src/app/elements/nav/nav.component.html
@@ -1,21 +1,30 @@
-
+
-
-
+
- -
-
+ -
+
-
{{ 'NoTabs' | translate }}
0">
- -
+
-
{{ view.name }}
@@ -25,9 +34,9 @@
- -
+
-
{{ vv.name | translate }}
-
+
{{ vv.name | translate }}
diff --git a/src/app/elements/nav/nav.component.scss b/src/app/elements/nav/nav.component.scss
index 2ec0542b4..fe98cd22c 100644
--- a/src/app/elements/nav/nav.component.scss
+++ b/src/app/elements/nav/nav.component.scss
@@ -1,3 +1,8 @@
+::ng-deep .setting-dialog {
+ .ant-modal-footer {
+ padding: 1px 30px 20px 30px;
+ }
+}
.nav {
display: flex;
@@ -7,7 +12,7 @@
padding-bottom: 1px;
.ant-menu-horizontal > .ant-menu-submenu {
- top: 0
+ top: 0;
}
.logo-item {
@@ -55,17 +60,18 @@
}
}
- .ant-menu-submenu-active, .ant-menu-submenu-open {
+ .ant-menu-submenu-active,
+ .ant-menu-submenu-open {
background: rgba(0, 0, 0, 0.6);
}
.ant-menu-submenu-horizontal.ant-menu-submenu {
padding: 0;
}
-
}
- li, .dropdown {
+ li,
+ .dropdown {
height: 30px;
line-height: 30px;
padding: 0;
@@ -100,3 +106,13 @@
}
}
+.flag {
+ display: none;
+ color: var(--primary-color);
+ padding-right: 5px;
+}
+
+
+.active .flag {
+ display: inline;
+}
diff --git a/src/app/elements/nav/nav.component.ts b/src/app/elements/nav/nav.component.ts
index 22c6ca8fa..33f3203f7 100644
--- a/src/app/elements/nav/nav.component.ts
+++ b/src/app/elements/nav/nav.component.ts
@@ -4,10 +4,14 @@ import { themes } from '@src/sass/theme/main';
import { useTheme } from '@src/sass/theme/util';
import { I18nService } from '@app/services/i18n';
import { Component, OnInit } from '@angular/core';
-import { CookieService } from 'ngx-cookie-service';
import { NzModalService } from 'ng-zorro-antd/modal';
import { ElementSettingComponent } from '@app/elements/nav/setting/setting.component';
-import { IframeCommunicationService, HttpService, SettingService, ViewService } from '@app/services';
+import {
+ IframeCommunicationService,
+ HttpService,
+ SettingService,
+ ViewService
+} from '@app/services';
@Component({
standalone: false,
@@ -29,7 +33,7 @@ export class ElementNavComponent implements OnInit {
private _dialog: NzModalService,
private _settingSvc: SettingService,
private _http: HttpService,
- private _iframeSvc: IframeCommunicationService,
+ private _iframeSvc: IframeCommunicationService
) {}
get viewListSorted() {
@@ -103,48 +107,21 @@ export class ElementNavComponent implements OnInit {
id: 'General',
name: this._i18n.instant('General'),
click: () => {
- this._dialog.create({
- nzWidth: '600px',
- nzCentered: true,
- nzContent: ElementSettingComponent,
- nzTitle: this._i18n.instant('General'),
- nzData: { type: 'general', name: 'General' },
- nzOnOk: cmp => cmp.onSubmit(),
- nzCancelText: this._i18n.instant('Cancel'),
- nzOkText: this._i18n.instant('Confirm')
- });
+ this.showSettingDialog('general', 'General');
}
},
{
id: 'GUI',
name: this._i18n.instant('GUI'),
click: () => {
- this._dialog.create({
- nzTitle: this._i18n.instant('GUI'),
- nzContent: ElementSettingComponent,
- nzWidth: '600px',
- nzCentered: true,
- nzData: { type: 'gui', name: 'GUI' },
- nzOnOk: cmp => cmp.onSubmit(),
- nzCancelText: this._i18n.instant('Cancel'),
- nzOkText: this._i18n.instant('Confirm')
- });
+ this.showSettingDialog('gui', 'GUI');
}
},
{
id: 'CLI',
name: this._i18n.instant('CLI'),
click: () => {
- this._dialog.create({
- nzTitle: this._i18n.instant('CLI'),
- nzContent: ElementSettingComponent,
- nzWidth: '600px',
- nzCentered: true,
- nzData: { type: 'cli', name: 'CLI' },
- nzOnOk: cmp => cmp.onSubmit(),
- nzCancelText: this._i18n.instant('Cancel'),
- nzOkText: this._i18n.instant('Confirm')
- });
+ this.showSettingDialog('cli', 'CLI');
}
}
]
@@ -201,6 +178,20 @@ export class ElementNavComponent implements OnInit {
];
}
+ showSettingDialog(type: string, name: string) {
+ this._dialog.create({
+ nzTitle: this._i18n.instant(name),
+ nzContent: ElementSettingComponent,
+ nzClassName: 'setting-dialog',
+ nzWidth: '600px',
+ nzCentered: true,
+ nzData: { type, name },
+ nzOnOk: cmp => cmp.onSubmit(),
+ nzCancelText: this._i18n.instant('Cancel'),
+ nzOkText: this._i18n.instant('Confirm')
+ });
+ }
+
getLanguageOptions() {
const langOptions = [];
this._settingSvc.afterInited().then(state => {