ParametersMenu.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <template>
  2. <v-navigation-drawer v-model="displayMenu">
  3. <template v-slot:prepend>
  4. <div class="title">
  5. <h3>{{ $t('parameters') }}</h3>
  6. </div>
  7. </template>
  8. <v-list active-class="active">
  9. <v-list-item
  10. v-for="(item, i) in menu.children"
  11. :key="i"
  12. :title="$t(item.label)"
  13. :prepend-icon="item.icon.name"
  14. :to="item.to">
  15. </v-list-item>
  16. </v-list>
  17. <template v-slot:append>
  18. <v-btn
  19. :href="homeUrl"
  20. prepend-icon="fa fa-right-from-bracket"
  21. :flat="true"
  22. color="on-neutral-very-soft"
  23. class="cancel-btn py-2"
  24. >
  25. {{ $t('exit') }}
  26. </v-btn>
  27. </template>
  28. </v-navigation-drawer>
  29. </template>
  30. <script setup lang="ts">
  31. import {useMenu} from "~/composables/layout/useMenu";
  32. import {useLayoutStore} from "~/stores/layout";
  33. import UrlUtils from "~/services/utils/urlUtils";
  34. import {useHomeUrl} from "~/composables/utils/useHomeUrl";
  35. const { getMenu, hasMenu } = useMenu()
  36. const menu = getMenu('Parameters')
  37. const displayMenu = computed(() => {
  38. return menu !== null && hasMenu('Parameters')
  39. })
  40. const { homeUrl } = useHomeUrl()
  41. </script>
  42. <style scoped lang="scss">
  43. .title {
  44. display: flex;
  45. align-items: center;
  46. height: 48px;
  47. vertical-align: center;
  48. margin-top: 18px;
  49. padding: 4px 16px;
  50. font-size: 18px;
  51. color: rgb(var(--v-theme-on-neutral-very-soft));
  52. }
  53. .v-navigation-drawer {
  54. background-color: rgb(var(--v-theme-neutral-very-soft));
  55. border-right: solid 1px rgb(var(--v-theme-neutral-strong));
  56. }
  57. :deep(.v-list-item-title), :deep(.v-icon)
  58. {
  59. font-size: 14px;
  60. color: rgb(var(--v-theme-on-neutral-very-soft));
  61. }
  62. .v-list-item:hover,
  63. .v-list-item.active,
  64. :deep(.v-list-group__items .v-list-item)
  65. {
  66. background-color: rgb(var(--v-theme-neutral)) !important;
  67. color: rgb(var(--v-theme-on-secondary-alt)) !important;
  68. }
  69. :deep(.v-list-item.active .v-list-item-title) {
  70. font-weight: 800 !important;
  71. }
  72. :deep(.v-list-item-title), :deep(.v-icon)
  73. {
  74. font-size: 14px;
  75. color: rgb(var(--v-theme-on-neutral-very-soft));
  76. }
  77. :deep(.v-list-item__prepend) {
  78. margin: 10px 0;
  79. margin-right: 10px !important;
  80. }
  81. :deep(.v-list-item .v-icon) {
  82. margin-right: 10px;
  83. }
  84. .cancel-btn {
  85. height: 42px;
  86. color: rgb(var(--v-theme-on-neutral-very-soft));
  87. background-color: transparent;
  88. width: 100%;
  89. border-top: solid 1px rgb(var(--v-theme-on-neutral-very-soft));
  90. display: flex;
  91. flex-direction: row;
  92. justify-content: start;
  93. }
  94. :deep(.cancel-btn .v-btn__prepend) {
  95. margin: 0 16px 4px 2px;
  96. }
  97. </style>