From 58fa7d633e4a9770740fda013b410911538d7e4f Mon Sep 17 00:00:00 2001 From: woothu <32914662+woothu@users.noreply.github.com> Date: Tue, 11 Feb 2020 10:33:31 +0100 Subject: [PATCH] refactor: change brand logos --- public/img/brand/coreui-base-white.svg | 24 ------------ public/img/brand/coreui-base.svg | 24 ------------ public/img/brand/coreui-signet-white.svg | 16 -------- public/img/brand/coreui-signet.svg | 16 -------- public/img/brand/coreui-vue-logo.svg | 38 ------------------- src/assets/icons/icons.js | 2 + src/assets/icons/logo.js | 28 ++++++++++++++ src/containers/TheHeader.vue | 10 ++--- src/containers/TheSidebar.vue | 15 +++++--- src/main.js | 4 +- src/store.js | 26 +++++++++++++ .../__snapshots__/TheHeader.spec.js.snap | 13 ++++--- .../__snapshots__/TheSidebar.spec.js.snap | 15 ++++++-- 13 files changed, 90 insertions(+), 141 deletions(-) delete mode 100644 public/img/brand/coreui-base-white.svg delete mode 100644 public/img/brand/coreui-base.svg delete mode 100644 public/img/brand/coreui-signet-white.svg delete mode 100644 public/img/brand/coreui-signet.svg delete mode 100644 public/img/brand/coreui-vue-logo.svg create mode 100644 src/assets/icons/logo.js create mode 100644 src/store.js diff --git a/public/img/brand/coreui-base-white.svg b/public/img/brand/coreui-base-white.svg deleted file mode 100644 index 047dbdf5..00000000 --- a/public/img/brand/coreui-base-white.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - Base_negative - - - - - - - - - - - - - - - diff --git a/public/img/brand/coreui-base.svg b/public/img/brand/coreui-base.svg deleted file mode 100644 index b452672b..00000000 --- a/public/img/brand/coreui-base.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - Base - - - - - - - - - - - - - - - diff --git a/public/img/brand/coreui-signet-white.svg b/public/img/brand/coreui-signet-white.svg deleted file mode 100644 index ee9700dc..00000000 --- a/public/img/brand/coreui-signet-white.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - signet_white - - - - - - - diff --git a/public/img/brand/coreui-signet.svg b/public/img/brand/coreui-signet.svg deleted file mode 100644 index 278b33c3..00000000 --- a/public/img/brand/coreui-signet.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - signet - - - - - - - diff --git a/public/img/brand/coreui-vue-logo.svg b/public/img/brand/coreui-vue-logo.svg deleted file mode 100644 index 4eecb11e..00000000 --- a/public/img/brand/coreui-vue-logo.svg +++ /dev/null @@ -1,38 +0,0 @@ - - - - - coreui vue - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/assets/icons/icons.js b/src/assets/icons/icons.js index 2125eb84..0ad0cd1d 100644 --- a/src/assets/icons/icons.js +++ b/src/assets/icons/icons.js @@ -79,9 +79,11 @@ import { cilXCircle } from '@coreui/icons' +import { logo } from './logo' export const iconsSet = Object.assign( {}, + { logo }, { cilArrowRight, cilBan, diff --git a/src/assets/icons/logo.js b/src/assets/icons/logo.js new file mode 100644 index 00000000..8ed51e6c --- /dev/null +++ b/src/assets/icons/logo.js @@ -0,0 +1,28 @@ +export const logo = ['556 134', ''] + +/* + + + + + + + + + + + + + + + + + + + + + + + + + */ \ No newline at end of file diff --git a/src/containers/TheHeader.vue b/src/containers/TheHeader.vue index be831eb5..4a480f15 100644 --- a/src/containers/TheHeader.vue +++ b/src/containers/TheHeader.vue @@ -10,13 +10,9 @@ class="ml-3 d-md-down-none" v-c-emit-root-event:toggle-sidebar /> - + + + diff --git a/src/containers/TheSidebar.vue b/src/containers/TheSidebar.vue index fe862662..39a327cd 100644 --- a/src/containers/TheSidebar.vue +++ b/src/containers/TheSidebar.vue @@ -4,11 +4,16 @@ :minimize="minimize" :show.sync="show" > - + + + + ', components: { App - }, + } }) diff --git a/src/store.js b/src/store.js new file mode 100644 index 00000000..786d91ad --- /dev/null +++ b/src/store.js @@ -0,0 +1,26 @@ +import Vue from 'vue' +import Vuex from 'vuex' +Vue.use(Vuex) + +const state = { + showSidebar: 'responsive' +} + +const mutations = { + toggleSidebarDesktop (state) { + const sidebarOpened = [true, 'responsive'].includes(state.showSidebar) + state.showSidebar = sidebarOpened ? false : 'responsive' + }, + toggleSidebarMobile (state) { + const sidebarClosed = [false, 'responsive'].includes(state.showSidebar) + state.showSidebar = sidebarClosed ? true : 'responsive' + }, + set (state, [variable, value]) { + state[variable] = value + } +} + +export default new Vuex.Store({ + state, + mutations +}) \ No newline at end of file diff --git a/tests/unit/containers/__snapshots__/TheHeader.spec.js.snap b/tests/unit/containers/__snapshots__/TheHeader.spec.js.snap index c3e881b4..90737c65 100644 --- a/tests/unit/containers/__snapshots__/TheHeader.spec.js.snap +++ b/tests/unit/containers/__snapshots__/TheHeader.spec.js.snap @@ -21,12 +21,15 @@ exports[`TheHeader.vue renders correctly 1`] = ` /> + to="/" + > + + + class="d-md-down-none" + to="/" + > + +