Skip to content

Components

Reusable UI components live in apps/frontend/src/components/.


Layout Components

header.vue

The top navigation bar rendered inside home.vue.

Features:

  • Application logo / title
  • Hamburger button for toggling sidebar collapse (sidebarStore.handleCollapse())
  • Breadcrumb navigation
  • User dropdown menu: profile link + logout
  • Logout calls POST /api/v1/user/logout, clears authStore, redirects to /signin

The left navigation menu rendered inside home.vue.

Features:

  • Collapsible (respects sidebarStore.collapse)
  • Menu items grouped by section (Dashboard, Monitoring, Settings, Admin)
  • Active item highlighted using vue-router's active class
  • Background + text colors driven by sidebarStore.bgColor / sidebarStore.textColor
  • Admin section shown only if authStore.user_details?.type === 'admin'

tabs.vue

An open-tabs navigation bar displayed below the header when multiple pages are open.

Features:

  • Renders one tab per entry in tabsStore.list
  • Click tab → navigate to that route
  • Close button on each tab (tabsStore.delTabsItem)
  • Right-click context menu: Close Others, Close All

Alternative navigation bar variant. Used in specific layout contexts.

settingsMenu.vue

Settings sub-navigation component rendered inside the settings-related views. Provides links to:

  • Profile
  • Notification Settings
  • Recipient Settings
  • Device Settings
  • Storage Settings

Auth Components

signUpAndSignInHeader.vue

Branded header used exclusively on the SignUpAndSignIn layout. Displays the company logo and name.


Utility Components

countup.vue

Animated count-up number component. Used on the dashboard for displaying total counts (devices, alerts, units) with a smooth counting animation.

Props:

PropTypeDefaultDescription
endValnumber0Target value to count up to
durationnumber1500Animation duration in milliseconds
prefixstring''Text before the number
suffixstring''Text after the number
decimalsnumber0Number of decimal places

Page-Specific Sub-Components

components/pages/ contains sub-components used within specific view pages. These are not globally reused but are split out to keep view files manageable.


Element Plus Components (Auto-Imported)

The following Element Plus components are commonly used throughout the app via auto-import — no import statements required:

ComponentUsage
el-cardPage section containers
el-formForms with built-in validation
el-form-itemLabelled form fields
el-inputText inputs
el-selectDropdown selects
el-date-pickerDate & range picker
el-tableData tables with pagination
el-buttonButtons
el-dialogModal dialogs
el-tagStatus / alert badges
el-switchToggle switches
el-paginationPagination controls
el-loadingLoading overlay directive
el-notificationToast notifications (via composables)

Global CSS Classes (App.vue)

These utility classes are defined in the root App.vue and are available globally:

ClassDescription
.btn-primaryStyled primary action button
.color-goodGreen text (value within safe range)
.color-badRed text (value outside safe range)
.fill-goodGreen background fill
.fill-badRed background fill
.bg-goodLight green background
.bg-badLight red background
.bg-betweenYellow/amber background (borderline)

Intecog Logistech IoT Monitoring Platform