diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-05-27 02:56:54 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-05-27 02:56:54 +0900 |
| commit | 728dd446b3fdb3a9ed46de87a46b3f0eb3ccb05d (patch) | |
| tree | 11299016b48e01e2ca61b0b58997877255112524 /src | |
| parent | 2.18.0 (diff) | |
| download | sharkey-728dd446b3fdb3a9ed46de87a46b3f0eb3ccb05d.tar.gz sharkey-728dd446b3fdb3a9ed46de87a46b3f0eb3ccb05d.tar.bz2 sharkey-728dd446b3fdb3a9ed46de87a46b3f0eb3ccb05d.zip | |
Refactor
Diffstat (limited to 'src')
| -rw-r--r-- | src/client/app/desktop/views/components/timeline.vue | 17 | ||||
| -rw-r--r-- | src/client/app/mobile/views/pages/home.vue | 19 |
2 files changed, 18 insertions, 18 deletions
diff --git a/src/client/app/desktop/views/components/timeline.vue b/src/client/app/desktop/views/components/timeline.vue index 6a243ca563..27d329d13f 100644 --- a/src/client/app/desktop/views/components/timeline.vue +++ b/src/client/app/desktop/views/components/timeline.vue @@ -33,17 +33,11 @@ export default Vue.extend({ watch: { src() { - this.$store.commit('device/setTl', { - src: this.src, - arg: this.list - }); + this.saveSrc(); }, list() { - this.$store.commit('device/setTl', { - src: this.src, - arg: this.list - }); + this.saveSrc(); } }, @@ -65,6 +59,13 @@ export default Vue.extend({ }, methods: { + saveSrc() { + this.$store.commit('device/setTl', { + src: this.src, + arg: this.list + }); + }, + warp(date) { (this.$refs.tl as any).warp(date); }, diff --git a/src/client/app/mobile/views/pages/home.vue b/src/client/app/mobile/views/pages/home.vue index 8d10d96c82..33579185e1 100644 --- a/src/client/app/mobile/views/pages/home.vue +++ b/src/client/app/mobile/views/pages/home.vue @@ -64,20 +64,12 @@ export default Vue.extend({ watch: { src() { this.showNav = false; - - this.$store.commit('device/setTl', { - src: this.src, - arg: this.list - }); + this.saveSrc(); }, list() { this.showNav = false; - - this.$store.commit('device/setTl', { - src: this.src, - arg: this.list - }); + this.saveSrc(); }, showNav(v) { @@ -115,6 +107,13 @@ export default Vue.extend({ (this as any).apis.post(); }, + saveSrc() { + this.$store.commit('device/setTl', { + src: this.src, + arg: this.list + }); + }, + warp() { } |