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