All files / src/BaseApp BaseWebApp.vue

0% Statements 0/0
0% Branches 0/0
0% Functions 0/0
0% Lines 0/0

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85                                                                                                                                                                         
<template lang="pug">
BaseAnimationBlock(:appear='true' anim='fade' :options='{ duration: 2 }')
  .container-fluid.px-0.h-100
    BaseErrorReport(ref="errorReport")
    BaseModal(ref='keyboardShortcuts' title='Keyboard Shortcuts')
      slot(name='kbd-modal')
        p These shortcuts can help to speed-up the use of the application.
        .text.ml-3 Global Shortcuts
          dl.row
            dt.col-sm-3 #[kbd F1]
            dd.col-sm-9 Open Keyboard Shortcuts List
            dt.col-sm-3 #[kbd Ctrl] + #[kbd K]
            dd.col-sm-9 Toggle Keyboard Shortcuts visual hints
            dt.col-sm-3 #[kbd Ctrl] + #[kbd E]
            dd.col-sm-9 Open Complete Error Report
            dt.col-sm-3 #[kbd Tab]
            dd.col-sm-9 Change focus on the next input element
            dt.col-sm-3 #[kbd Shift] + #[kbd Tab]
            dd.col-sm-9 Change focus on the previous input element
 
        .text.ml-3 Local Shortcuts (when specific area is focused)
          dl.row
            dt.col-sm-3 #[kbd E]
            dd.col-sm-9 Toggle Edit mode
            dt.col-sm-3 #[kbd Esc]
            dd.col-sm-9 Exit Edit mode
            dt.col-sm-3 #[kbd Ctrl] + #[kbd S] / #[kbd Enter]
            dd.col-sm-9 Save Configuration and Exit Edit mode
    slot(name='root')
    BaseErrorAlert
    BaseNavBar(:title='title' :version='version' :showRoutes='false'
        :showThemeSwitcher='showThemeSwitcher' :showAbout='showAbout'
        @toggle-errors='$refs.errorReport.toggle()'
        @toggle-keyboard-modal='$refs.keyboardShortcuts.toggle()'
        @toggle-about='$emit("toggle-about")')
      template(v-slot:content='')
        slot(name='navbar-content' v-bind='{ toggleSideBar, showKeyHints }')
          .button.btn.b-clickable(@click="toggleSideBar()" align='left')
            kbd.inverted.keyHintNavBar.mr-2(v-if="showKeyHints") Ctrl+M
            i.fa.fa-bars.fa-lg.text-white
          router-link.navbar-brand(v-if='$router' to="/")
            .text-muted.d-none.ml-1.d-xl-inline {{ title }} #[span.text-muted.tiny {{ version }}]
          a.navbar-brand(v-else :href="$butils.currentUrl()")
            .text-muted.d-none.ml-1.d-xl-inline {{ title }} #[span.text-muted.tiny {{ version }}]
    .row.no-gutters.d-flex.b-viewport
      BaseSideBar(ref='sidebar' :showRoutes='showRoutes' :showAbout='showAbout'
          @toggle-about="$emit('toggle-about')")
        template(v-slot:default='')
          slot(name='sidebar-content')
        template(v-slot:footer='')
          slot(name='sidebar-footer')
      .col.p-3.b-content
        BaseAnimationBlock
          slot
            //-
              Transitions enabled only for the top-level route. To also enable them for nested
              routes, overwrite this slot content by setting '$route.path' to the key attribute
            router-view(v-if='hasRouter' :key='$butils.get($route, [ "matched", 0, "path" ])')
</template>
<script>
 
export { default } from "./BaseWebApp.vue.js";
 
</script>
<style lang="scss">
 
.b-viewport {
  min-height: 100%;
  height: 100vh;
  width: 100vw;
}
// for the top-bar
.b-content * {
  scroll-margin-top: 0.75rem;
}
 
.b-content {
  overflow-y: auto;
  overflow-x: hidden;
  height: 100%;
  min-height: 100%;
}
 
</style>