[Enhancement] Hide sidebar on tablets (#358)
* [Enhancement] Hide sidebar on tablets * Remove unnecessary console.log * Use beforeDestroy
This commit is contained in:
parent
2b41e91768
commit
febc4bef83
12 changed files with 136 additions and 38 deletions
|
@ -2,6 +2,7 @@
|
|||
<div class="conversations-sidebar medium-4 columns">
|
||||
<div class="chat-list__top">
|
||||
<h1 class="page-title">
|
||||
<woot-sidemenu-icon></woot-sidemenu-icon>
|
||||
{{ getInboxName }}
|
||||
</h1>
|
||||
<chat-filter @statusFilterChange="getDataForStatusTab"></chat-filter>
|
||||
|
|
14
app/javascript/dashboard/components/SidemenuIcon.vue
Normal file
14
app/javascript/dashboard/components/SidemenuIcon.vue
Normal file
|
@ -0,0 +1,14 @@
|
|||
<template>
|
||||
<i class="ion-android-menu hamburger--menu" @click="onMenuItemClick"></i>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/* global bus */
|
||||
export default {
|
||||
methods: {
|
||||
onMenuItemClick() {
|
||||
bus.$emit('sidemenu_icon_click');
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
|
@ -7,6 +7,7 @@ import LoadingState from './widgets/LoadingState';
|
|||
import Modal from './Modal';
|
||||
import ModalHeader from './ModalHeader';
|
||||
import ReportStatsCard from './widgets/ReportStatsCard';
|
||||
import SidemenuIcon from './SidemenuIcon';
|
||||
import Spinner from './Spinner';
|
||||
import SubmitButton from './buttons/FormSubmitButton';
|
||||
import Tabs from './ui/Tabs/Tabs';
|
||||
|
@ -19,6 +20,7 @@ const WootUIKit = {
|
|||
Modal,
|
||||
ModalHeader,
|
||||
ReportStatsCard,
|
||||
SidemenuIcon,
|
||||
Spinner,
|
||||
SubmitButton,
|
||||
Tabs,
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
import { mount } from '@vue/test-utils';
|
||||
import SidemenuIcon from '../SidemenuIcon';
|
||||
|
||||
describe('SidemenuIcon', () => {
|
||||
test('matches snapshot', () => {
|
||||
const wrapper = mount(SidemenuIcon);
|
||||
expect(wrapper.isVueInstance()).toBeTruthy();
|
||||
expect(wrapper.element).toMatchSnapshot();
|
||||
});
|
||||
});
|
|
@ -0,0 +1,7 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`SidemenuIcon matches snapshot 1`] = `
|
||||
<i
|
||||
class="ion-android-menu hamburger--menu"
|
||||
/>
|
||||
`;
|
Loading…
Add table
Add a link
Reference in a new issue