refs #48 Add new account button in global header

This commit is contained in:
AkiraFukushima 2018-03-15 01:48:37 +09:00
parent fefa03b50e
commit 2b3d8c7c1d
2 changed files with 12 additions and 5 deletions

View File

@ -14,6 +14,10 @@
<i class="el-icon-menu"></i> <i class="el-icon-menu"></i>
<span slot="title">{{ account.domain }}</span> <span slot="title">{{ account.domain }}</span>
</el-menu-item> </el-menu-item>
<el-menu-item index="/login" @click="login">
<i class="el-icon-plus"></i>
<span slot="new">New</span>
</el-menu-item>
</el-menu> </el-menu>
<div class="space"> <div class="space">
<router-view></router-view> <router-view></router-view>
@ -60,6 +64,9 @@ export default {
}, },
accountClosed (key, keyPath) { accountClosed (key, keyPath) {
console.log(key, keyPath) console.log(key, keyPath)
},
login () {
return this.$router.push({ path: '/login' })
} }
} }
} }

View File

@ -124,9 +124,9 @@ const TimelineSpace = {
}) })
}, },
stopUserStreaming ({ commit }) { stopUserStreaming ({ commit }) {
ipcRenderer.removeAll('update-start-user-streaming') ipcRenderer.removeAllListeners('update-start-user-streaming')
ipcRenderer.removeAll('notification-start-user-streaming') ipcRenderer.removeAllListeners('notification-start-user-streaming')
ipcRenderer.removeAll('error-start-user-streaming') ipcRenderer.removeAllListeners('error-start-user-streaming')
ipcRenderer.send('stop-user-streaming') ipcRenderer.send('stop-user-streaming')
}, },
watchShortcutEvents ({ commit }) { watchShortcutEvents ({ commit }) {
@ -139,8 +139,8 @@ const TimelineSpace = {
}) })
}, },
removeShortcutEvents () { removeShortcutEvents () {
ipcRenderer.removeAll('CmdOrCtrl+N') ipcRenderer.removeAllListeners('CmdOrCtrl+N')
ipcRenderer.removeAll('CmdOrCtrl+R') ipcRenderer.removeAllListeners('CmdOrCtrl+R')
}, },
fetchHomeTimeline ({ commit }, account) { fetchHomeTimeline ({ commit }, account) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {