Happifies eslint and adds an editorconfig
This commit is contained in:
9
.editorconfig
Normal file
9
.editorconfig
Normal file
@@ -0,0 +1,9 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
|
||||
[*.{js,vue}]
|
||||
indent_style = tab
|
||||
68
src/App.vue
68
src/App.vue
@@ -22,18 +22,18 @@
|
||||
|
||||
<template>
|
||||
|
||||
<div
|
||||
<div
|
||||
id="content"
|
||||
v-bind:class="{ 'nav-hidden': navHidden, 'sidebar-hidden': sidebarHidden }">
|
||||
<AppNavigation :menu="menu" />
|
||||
<div id="app-content">
|
||||
<Controls></Controls>
|
||||
<router-view />
|
||||
<AppNavigation :menu="menu" />
|
||||
<div id="app-content">
|
||||
<Controls />
|
||||
<router-view />
|
||||
</div>
|
||||
<div id="app-sidebar">
|
||||
<component v-bind:is="sidebarComponent" />
|
||||
</div>
|
||||
</div>
|
||||
<div id="app-sidebar">
|
||||
<component v-bind:is="sidebarComponent"></component>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
@@ -49,13 +49,13 @@ export default {
|
||||
components: {
|
||||
AppNavigation,
|
||||
Controls,
|
||||
Sidebar
|
||||
Sidebar
|
||||
},
|
||||
computed: mapState({
|
||||
navHidden: state => state.nav.hidden,
|
||||
sidebarHidden: state => state.sidebar.hidden,
|
||||
menu: state => state.nav.menu,
|
||||
sidebarComponent: state => state.sidebar.component
|
||||
sidebarComponent: state => state.sidebar.component
|
||||
})
|
||||
}
|
||||
|
||||
@@ -63,35 +63,35 @@ export default {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
#content {
|
||||
#app-content {
|
||||
transition: margin-left 100ms ease;
|
||||
}
|
||||
|
||||
#app-sidebar {
|
||||
transition: width 100ms ease;
|
||||
}
|
||||
|
||||
&.nav-hidden {
|
||||
#content {
|
||||
#app-content {
|
||||
margin-left: 0;
|
||||
transition: margin-left 100ms ease;
|
||||
}
|
||||
}
|
||||
|
||||
&.sidebar-hidden {
|
||||
#app-sidebar {
|
||||
max-width: 0;
|
||||
min-width: 0;
|
||||
transition: width 100ms ease;
|
||||
}
|
||||
|
||||
&.nav-hidden {
|
||||
#app-content {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&.sidebar-hidden {
|
||||
#app-sidebar {
|
||||
max-width: 0;
|
||||
min-width: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.deck-main {
|
||||
bottom: 0;
|
||||
overflow: auto;
|
||||
position: absolute;
|
||||
top: 44px;
|
||||
width: 100%;
|
||||
}
|
||||
.deck-main {
|
||||
bottom: 0;
|
||||
overflow: auto;
|
||||
position: absolute;
|
||||
top: 44px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -22,20 +22,20 @@
|
||||
|
||||
<template>
|
||||
|
||||
<div>
|
||||
<div id="app-navigation-toggle-custom" class="icon-menu" v-on:click="toggleNav"></div>
|
||||
</div>
|
||||
<div>
|
||||
<div id="app-navigation-toggle-custom" class="icon-menu" v-on:click="toggleNav" />
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "Controls",
|
||||
methods: {
|
||||
toggleNav() {
|
||||
this.$store.dispatch('nav/toggle')
|
||||
}
|
||||
}
|
||||
name: 'Controls',
|
||||
methods: {
|
||||
toggleNav() {
|
||||
this.$store.dispatch('nav/toggle')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -21,9 +21,9 @@
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="deck-main">
|
||||
Main
|
||||
</div>
|
||||
<div class="deck-main">
|
||||
Main
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
@@ -30,12 +30,12 @@ Vue.use(Vuex)
|
||||
const debug = process.env.NODE_ENV !== 'production'
|
||||
|
||||
export default new Vuex.Store({
|
||||
modules: {
|
||||
nav,
|
||||
sidebar
|
||||
},
|
||||
modules: {
|
||||
nav,
|
||||
sidebar
|
||||
},
|
||||
strict: debug,
|
||||
state: {},
|
||||
mutations: {},
|
||||
actions: {}
|
||||
state: {},
|
||||
mutations: {},
|
||||
actions: {}
|
||||
})
|
||||
|
||||
@@ -26,87 +26,92 @@
|
||||
import { translate as t } from 'nextcloud-server/dist/l10n'
|
||||
|
||||
let defaultCategories = [
|
||||
{
|
||||
id: 'deck-boards',
|
||||
classes: [],
|
||||
icon: 'icon-deck',
|
||||
text: t('deck', 'All boards'),
|
||||
router: {
|
||||
name: 'boards'
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'deck-boards-archived',
|
||||
classes: [],
|
||||
icon: 'icon-archive',
|
||||
text: t('deck', 'Archived boards'),
|
||||
router: {
|
||||
name: 'boards.archived'
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'deck-boards-shared',
|
||||
classes: [],
|
||||
icon: 'icon-shared',
|
||||
text: t('deck', 'Shared boards'),
|
||||
router: {
|
||||
name: 'boards.shared'
|
||||
}
|
||||
}
|
||||
{
|
||||
id: 'deck-boards',
|
||||
classes: [],
|
||||
icon: 'icon-deck',
|
||||
text: t('deck', 'All boards'),
|
||||
router: {
|
||||
name: 'boards'
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'deck-boards-archived',
|
||||
classes: [],
|
||||
icon: 'icon-archive',
|
||||
text: t('deck', 'Archived boards'),
|
||||
router: {
|
||||
name: 'boards.archived'
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'deck-boards-shared',
|
||||
classes: [],
|
||||
icon: 'icon-shared',
|
||||
text: t('deck', 'Shared boards'),
|
||||
router: {
|
||||
name: 'boards.shared'
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
const boardActions = [
|
||||
{
|
||||
action: () => {},
|
||||
icon: 'icon-edit',
|
||||
text: t('deck', 'Edit board')
|
||||
},
|
||||
{
|
||||
action: () => {},
|
||||
icon: 'icon-archive',
|
||||
text: t('deck', 'Archive board')
|
||||
},
|
||||
{
|
||||
action: () => {},
|
||||
icon: 'icon-delete',
|
||||
text: t('deck', 'Delete board')
|
||||
},
|
||||
{
|
||||
action: () => {},
|
||||
icon: 'icon-settings',
|
||||
text: t('deck', 'Board details')
|
||||
}
|
||||
{
|
||||
action: () => {
|
||||
},
|
||||
icon: 'icon-edit',
|
||||
text: t('deck', 'Edit board')
|
||||
},
|
||||
{
|
||||
action: () => {
|
||||
},
|
||||
icon: 'icon-archive',
|
||||
text: t('deck', 'Archive board')
|
||||
},
|
||||
{
|
||||
action: () => {
|
||||
},
|
||||
icon: 'icon-delete',
|
||||
text: t('deck', 'Delete board')
|
||||
},
|
||||
{
|
||||
action: () => {
|
||||
},
|
||||
icon: 'icon-settings',
|
||||
text: t('deck', 'Board details')
|
||||
}
|
||||
]
|
||||
|
||||
const boards = [
|
||||
{
|
||||
id: 'deck-board-1',
|
||||
classes: [],
|
||||
bullet: '#00cc00',
|
||||
text: 'Example board',
|
||||
router: {
|
||||
name: 'board',
|
||||
params: { id: 1 }
|
||||
},
|
||||
utils: {
|
||||
actions: boardActions
|
||||
}
|
||||
}
|
||||
{
|
||||
id: 'deck-board-1',
|
||||
classes: [],
|
||||
bullet: '#00cc00',
|
||||
text: 'Example board',
|
||||
router: {
|
||||
name: 'board',
|
||||
params: { id: 1 }
|
||||
},
|
||||
utils: {
|
||||
actions: boardActions
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
const addButton = {
|
||||
icon: 'icon-add',
|
||||
text: t('deck', 'Create new board'),
|
||||
action: () => {}
|
||||
icon: 'icon-add',
|
||||
text: t('deck', 'Create new board'),
|
||||
action: () => {
|
||||
}
|
||||
}
|
||||
|
||||
// initial state
|
||||
const state = {
|
||||
hidden: false,
|
||||
menu: {
|
||||
items: defaultCategories.concat(boards).concat([addButton]),
|
||||
loading: false
|
||||
}
|
||||
hidden: false,
|
||||
menu: {
|
||||
items: defaultCategories.concat(boards).concat([addButton]),
|
||||
loading: false
|
||||
}
|
||||
}
|
||||
|
||||
// getters
|
||||
@@ -114,22 +119,22 @@ const getters = {}
|
||||
|
||||
// actions
|
||||
const actions = {
|
||||
toggle ({ commit }) {
|
||||
commit('toggle')
|
||||
}
|
||||
toggle({ commit }) {
|
||||
commit('toggle')
|
||||
}
|
||||
}
|
||||
|
||||
// mutations
|
||||
const mutations = {
|
||||
toggle (state) {
|
||||
state.hidden = !state.hidden
|
||||
}
|
||||
toggle(state) {
|
||||
state.hidden = !state.hidden
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state,
|
||||
getters,
|
||||
actions,
|
||||
mutations
|
||||
namespaced: true,
|
||||
state,
|
||||
getters,
|
||||
actions,
|
||||
mutations
|
||||
}
|
||||
|
||||
@@ -20,11 +20,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
// initial state
|
||||
const state = {
|
||||
hidden: true,
|
||||
component: 'Sidebar'
|
||||
hidden: true,
|
||||
component: 'Sidebar'
|
||||
}
|
||||
|
||||
// getters
|
||||
@@ -32,22 +31,22 @@ const getters = {}
|
||||
|
||||
// actions
|
||||
const actions = {
|
||||
toggle ({ commit }) {
|
||||
commit('toggle')
|
||||
}
|
||||
toggle({ commit }) {
|
||||
commit('toggle')
|
||||
}
|
||||
}
|
||||
|
||||
// mutations
|
||||
const mutations = {
|
||||
toggle (state) {
|
||||
state.hidden = !state.hidden
|
||||
}
|
||||
toggle(state) {
|
||||
state.hidden = !state.hidden
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state,
|
||||
getters,
|
||||
actions,
|
||||
mutations
|
||||
namespaced: true,
|
||||
state,
|
||||
getters,
|
||||
actions,
|
||||
mutations
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user