Files
stf-DeviceFarmer-1/res/app/menu/menu.css
Matan Baruch 4e26101a95 feat: Display STF version in Web UI (#858)
* feat: Display STF version in Web UI

Adds the STF application version to the main menu in the Web UI.

Changes:
- Modified `lib/units/app/index.js` to read the version from `package.json` and make it available to the frontend via the `GLOBAL_APPSTATE.config.stfVersion` variable.
- Updated `res/app/menu/menu.pug` to display this version in the top navigation bar, near the help icon. The format is "vX.Y.Z".
- Added an E2E test (`res/test/e2e/menu/menu-spec.js`) to verify the presence and correct format of the version string in the UI.

Signed-off-by: matanbaruch <matan.baruch@unity3d.com>

* Update menu-spec.js

Signed-off-by: matanbaruch <matan.baruch@unity3d.com>

* fix: lint

Signed-off-by: matanbaruch <matan.baruch@unity3d.com>

* feat: Add application state to root scope and style version text in menu

- Introduced a new run block in `app.js` to attach the application state to the `$rootScope`.
- Added CSS styles for the version text in the menu to enhance its visibility and layout.

Signed-off-by: matanbaruch <matan.baruch@unity3d.com>

* fix: Correct path to package.json in index.js

Updated the import statement for package.json in lib/units/app/index.js to use the correct relative path, ensuring proper access to the application version information.

Signed-off-by: matanbaruch <matan.baruch@unity3d.com>

---------

Signed-off-by: matanbaruch <matan.baruch@unity3d.com>
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2025-05-23 12:31:20 +02:00

124 lines
2.1 KiB
CSS

/*
Copyright © 2019-2024 contains code contributed by Orange SA, authors: Denis Barbaron - Licensed under the Apache license 2.0
*/
.stf-menu .stf-logo {
background: url(../../common/logo/exports/STF-512.png) no-repeat 0 0;
width: 32px;
height: 32px;
float: left;
text-indent: -9999em;
margin: 6px 10px 0 0;
background-size: 100% auto;
-webkit-background-size: 100% auto;
}
.stf-menu .stf-top-bar {
height: 44px;
padding: 0 10px 0 20px;
width: 100%;
float: left;
}
.stf-menu .stf-nav {
padding-left: 15px;
text-align: left;
margin: 0;
float: left;
}
.stf-menu .stf-nav > li {
padding-right: 15px;
float: left;
display: inline-block;
text-align: left;
position: relative;
margin: 0;
}
.stf-menu .stf-nav > li > a {
display: inline-block;
text-align: left;
padding: 0 !important;
padding-right: 18px !important;
padding-left: 14px !important;
font-size: 15px;
line-height: 44px;
color: #777777;
font-weight: 400;
height: 44px;
position: relative;
}
.stf-menu .stf-nav > li > a > span.fa {
display: inline-block;
float: left;
margin: 8px 8px 0 0;
font-size: 28px;
}
.stf-menu .stf-nav > li > a > span.fa-mobile {
font-size: 30px;
}
.stf-menu .stf-nav > li > a.current {
color: #007aff;
}
.stf-menu.navbar {
height: 44px !important;
min-height: 44px !important;
}
.stf-menu .version-text {
display: inline-block;
font-size: 14px;
line-height: 44px;
color: #777777;
font-weight: 400;
padding: 0 10px;
text-align: center;
vertical-align: middle;
}
.stf-menu .information-level {
background-color: #5bc0df;
}
.stf-menu .warning-level {
background-color: #f0ad4f;
}
.stf-menu .critical-level {
background-color: #ff4b2b;
}
.stf-menu .maintenance-banner {
color: #ffffff;
padding: 10px;
position: relative;
text-align: center;
overflow: hidden;
height: 44px;
}
.stf-menu .maintenance-banner p {
font-size: 18px;
animation: slideBanner 15s linear infinite;
white-space: nowrap;
position: relative;
top: 50%;
transform: translate(0%,-50%);
line-height: 44px;
}
@keyframes slideBanner {
0% {
left: 100%;
}
100% {
left: -100%;
}
}