mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-17 15:53:28 +02:00
* 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>
54 lines
2.3 KiB
Plaintext
54 lines
2.3 KiB
Plaintext
//
|
|
Copyright © 2019-2024 contains code contributed by Orange SA, authors: Denis Barbaron - Licensed under the Apache license 2.0
|
|
//
|
|
|
|
.navbar.stf-menu(ng-controller='MenuCtrl')
|
|
.container-fluid.stf-top-bar
|
|
a.stf-logo(ng-href="/#!/devices") STF
|
|
ul.nav.stf-nav(nav-menu='current').unselectable
|
|
li(ng-cloak)
|
|
a(ng-href='/#!/control/{{lastUsedDevice}}', ng-show='lastUsedDevice')
|
|
span.fa.fa-mobile
|
|
span(ng-if='!$root.basicMode', translate) Control
|
|
a(ng-href='/#!/devices', accesskey='1')
|
|
span.fa.fa-sitemap
|
|
span(ng-if='!$root.basicMode', translate) Devices
|
|
a(ng-href='/#!/groups')
|
|
span.fa.fa-object-group
|
|
span(ng-if='!$root.basicMode', translate) Groups
|
|
a(ng-href='/#!/settings')
|
|
span.fa.fa-gears
|
|
span(ng-if='!$root.basicMode', translate) Settings
|
|
ul.nav.stf-nav(ng-if='isAlertMessageActive()', nav-menu='current').unselectable.col-xs-5
|
|
li.col-xs-12
|
|
.maintenance-banner(ng-class="{'information-level': isInformationAlert(), 'warning-level': isWarningAlert(), 'critical-level': isCriticalAlert()}")
|
|
p(translate) {{ alertMessage.data }}
|
|
ul.nav.stf-nav.stf-feedback.pull-right(ng-cloak, nav-menu='current').unselectable
|
|
li.stf-nav-web-native-button(ng-if='!$root.basicMode && isControlRoute')
|
|
.btn-group
|
|
button(type='button', ng-model='$root.platform', uib-btn-radio="'web'", translate).btn.btn-sm.btn-default-outline Web
|
|
button(type='button', ng-model='$root.platform', uib-btn-radio="'native'", translate).btn.btn-sm.btn-default-outline Native
|
|
|
|
li.stf-nav-web-native-button(ng-if='!$root.basicMode')
|
|
button.btn.btn-sm.btn-default-outline(
|
|
type='button'
|
|
ng-click='mailToSupport()')
|
|
i.fa.fa-envelope-o
|
|
span(translate) Contact Support
|
|
|
|
li.stf-nav-web-native-button(ng-if='!$root.basicMode')
|
|
button.btn.btn-sm.btn-default-outline(
|
|
type='button'
|
|
ng-click='logout()')
|
|
i.fa.fa-sign-out
|
|
span(translate) Logout
|
|
|
|
li
|
|
span.version-text v{{ $root.state.config.stfVersion }}
|
|
|
|
li(ng-show='!$root.basicMode')
|
|
a(ng-href='/#!/help', accesskey='6')
|
|
i.fa.fa-question-circle.fa-fw
|
|
| {{ "Help" | translate }}
|
|
|