-
Notifications
You must be signed in to change notification settings - Fork 16
/
index.vue
112 lines (102 loc) · 2.77 KB
/
index.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<template>
<div
id="root"
:class="[
'root',
'theme-' + (theme || 'none'),
'scheme-' + (color_scheme || 'kagerou-material'),
'icon-' + (job_icons || 'default'),
'order-by-' + (list_order || 'asc'),
'align-' + (list_align || 'center'),
'cell-' + (cell_background || 'translucent'), {
active,
'hide-name': hide_name,
'hide-job-icons': hide_job_icon,
'hide-handle': hide_handle,
'blur-name': blur_name,
'main-ticker-will-not-yield': !yield_for_subtickers,
'layout-mode': layout_mode,
'single-value': !cell_display2,
'singleline': cell_display2? force_singleline_allowed : true,
'force-singleline-allowed': force_singleline_allowed,
'has-subticker-above-edge': tickers_dps_crit === 'above' || tickers_healer_pct === 'above'
}
]">
<userlist />
<navbar />
<settings v-if="opened_window === 'settings'" />
<changelog v-if="opened_window === 'changelog'" />
<layout-mode v-if="layout_mode" />
</div>
</template>
<script>
import packageinfo from './package.json'
import { mapState, mapGetters } from 'vuex'
import userlist from './components/layout/userlist.vue'
import navbar from './components/layout/navbar.vue'
import layoutMode from './components/layout/layout-mode.vue'
import settings from './components/layout/settings/index.vue'
import changelog from './components/layout/changelog.vue'
export default {
components: {
userlist,
navbar,
layoutMode,
settings,
changelog
},
data: () => ({
settingsOpened: false
}),
computed: {
...mapState('settings', [
'debug',
'color_scheme',
'theme',
'job_icons',
'yield_for_subtickers',
'hide_name',
'hide_job_icon',
'hide_handle',
'blur_name',
'list_order',
'list_align',
'cell_display2',
'cell_background',
'tickers_dps_crit',
'tickers_healer_pct'
]),
...mapState('encounter', [
'active'
]),
...mapState('ui', [
'opened_window',
'layout_mode'
]),
...mapGetters('settings', [
'force_singleline_allowed'
])
},
mounted() {
if(!this.$store.state.settings.never_show_changelog_again) {
if(this.$store.state.settings.last_launched_version !== packageinfo.version) {
this.$store.commit('settings/set', {
k: 'last_launched_version',
v: packageinfo.version
})
this.$store.commit('ui/open', 'changelog')
}
}
}
}
</script>
<style lang="sass">
@import styles/reset
@import styles/index
@import styles/window
@import styles/layout_mode
@import styles/enum/gauge-colors
@import styles/enum/job-colors
@import styles/enum/class-icons-raster
@import styles/enum/class-icons-vector
</style>