File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ export default {
58
58
computed: mapState ([
59
59
' playerList' ,
60
60
' scrollOffset' ,
61
+ ' info' ,
61
62
]),
62
63
methods: {
63
64
... mapMutations ([
@@ -110,6 +111,11 @@ export default {
110
111
}
111
112
});
112
113
},
114
+ beforeRouteEnter (to , from , next ) {
115
+ next ((vm ) => {
116
+ document .title = vm .info .title ;
117
+ });
118
+ },
113
119
components: {
114
120
playerblock: PlayerBlock,
115
121
nyaaFooter: Footer,
Original file line number Diff line number Diff line change 47
47
48
48
<script >
49
49
import axios from ' axios' ;
50
- import { mapMutations } from ' vuex' ;
50
+ import { mapMutations , mapState } from ' vuex' ;
51
51
52
52
import { store } from ' ../main' ;
53
53
import NameHistory from ' ./NameHistory' ;
@@ -98,12 +98,16 @@ export default {
98
98
uuid,
99
99
player: data,
100
100
});
101
+ document .title = ` ${ this .info .title } - ${ this .player .data .playername } ` ;
101
102
},
102
103
setInfoData (data ) {
103
104
this .mutableInfo = data;
104
105
},
105
106
},
106
107
computed: {
108
+ ... mapState ([
109
+ ' info' ,
110
+ ]),
107
111
isCanvasSupported () {
108
112
const elem = document .createElement (' canvas' );
109
113
return !! (elem .getContext && elem .getContext (' 2d' ));
@@ -118,8 +122,6 @@ export default {
118
122
}, 100 );
119
123
this .$el .scrollTop = 0 ;
120
124
},
121
- updated () {
122
- },
123
125
components: {
124
126
NameHistory,
125
127
Membership,
You can’t perform that action at this time.
0 commit comments