|
81 | 81 | path {
|
82 | 82 | fill: #666;
|
83 | 83 | }
|
| 84 | + .disabled & path { |
| 85 | + fill: #ccc; |
| 86 | + } |
84 | 87 | }
|
85 | 88 | .presentation-footer-control,
|
86 | 89 | .writing-modes {
|
|
94 | 97 | </style>
|
95 | 98 |
|
96 | 99 | <template>
|
97 |
| - <footer class="footer" v-if="showFooter" :class="{'mac-footer': isMac}"> |
| 100 | + <footer class="footer" :class="{'mac-footer': isMac}"> |
98 | 101 | <span class="file-path" v-if="status.filePath">{{ status.filePath }}</span>
|
99 | 102 | <span class="word-count">{{ status.wordCount }} words</span>
|
100 | 103 | <span class="pdf-link clickable-link" v-if="status.pdf" @click="openPDF(status.pdf)">PDF</span>
|
101 | 104 | <div class="footer-right">
|
102 |
| - <div class="footer-icon-group presentation-footer-control" v-if="status.isPresentationMode"> |
103 |
| - <span |
104 |
| - aria-label="Previous Slide" |
105 |
| - class="footer-icon-item hint--top-left hint--rounded" |
106 |
| - @click="moveSlide('left')"> |
107 |
| - <svg-icon name="arrowLeft" class="footer-icon"></svg-icon> |
108 |
| - </span> |
109 |
| - <span class="footer-icon-item"> |
110 |
| - {{ status.slides.current + 1 }}/{{ status.slides.total }} |
111 |
| - </span> |
112 |
| - <span |
113 |
| - aria-label="Next Slide" |
114 |
| - class="footer-icon-item hint--top-right hint--rounded" |
115 |
| - @click="moveSlide('right')"> |
116 |
| - <svg-icon name="arrowRight" class="footer-icon"></svg-icon> |
117 |
| - </span> |
118 |
| - </div> |
119 |
| - <div class="footer-icon-group writing-modes" v-if="status.writingMode"> |
120 |
| - <span |
121 |
| - aria-label="Editor only" |
122 |
| - class="footer-icon-item writing-mode hint--top-left hint--rounded" |
123 |
| - :class="{active: status.writingMode === 'writing'}" |
124 |
| - @click="setWritingMode('writing')"> |
125 |
| - <svg-icon name="pencil" class="footer-icon"></svg-icon> |
126 |
| - </span> |
127 |
| - <span |
128 |
| - aria-label="Editor and Preview" |
129 |
| - class="footer-icon-item writing-mode hint--top-left hint--rounded" |
130 |
| - :class="{active: status.writingMode === 'default'}" |
131 |
| - @click="setWritingMode('default')"> |
132 |
| - <svg-icon name="alignHorizontalMiddle" class="footer-icon"></svg-icon> |
133 |
| - </span> |
134 |
| - <span |
135 |
| - aria-label="Preview only" |
136 |
| - class="footer-icon-item writing-mode hint--top-left hint--rounded" |
137 |
| - :class="{active: status.writingMode === 'preview'}" |
138 |
| - @click="setWritingMode('preview')"> |
139 |
| - <svg-icon name="eye" class="footer-icon"></svg-icon> |
140 |
| - </span> |
141 |
| - </div> |
| 105 | + <presentation-control |
| 106 | + :slides="status.slides" |
| 107 | + :writing-mode="status.writingMode" |
| 108 | + v-if="status.isPresentationMode"> |
| 109 | + </presentation-control> |
| 110 | + <writing-modes |
| 111 | + :writing-mode="status.writingMode" |
| 112 | + :current-tab-index="currentTabIndex" |
| 113 | + v-if="status.writingMode"> |
| 114 | + </writing-modes> |
142 | 115 | </div>
|
143 | 116 | </footer>
|
144 | 117 | </template>
|
|
147 | 120 | import tildify from 'tildify'
|
148 | 121 | import {isMac} from 'utils/os'
|
149 | 122 | import {shell} from 'electron'
|
150 |
| - import SvgIcon from 'components/svg-icon' |
| 123 | +
|
| 124 | + import PresentationControl from 'components/presentation-control' |
| 125 | + import WritingModes from 'components/writing-modes' |
151 | 126 |
|
152 | 127 | export default {
|
153 | 128 | vuex: {
|
154 | 129 | getters: {
|
155 |
| - showFooter: state => state.editor.tabs.length > 0, |
156 | 130 | currentTabIndex: state => state.editor.currentTabIndex,
|
157 | 131 | status: state => {
|
158 | 132 | const editor = state.editor.tabs[state.editor.currentTabIndex] || {}
|
|
170 | 144 | }
|
171 | 145 | }
|
172 | 146 | }
|
173 |
| - }, |
174 |
| - actions: { |
175 |
| - setWritingMode({dispatch}, mode) { |
176 |
| - dispatch('SET_WRITING_MODE', { |
177 |
| - index: this.currentTabIndex, |
178 |
| - mode |
179 |
| - }) |
180 |
| - }, |
181 |
| - moveSlide({dispatch}, direction) { |
182 |
| - dispatch('MOVE_SLIDE', direction) |
183 |
| - } |
184 | 147 | }
|
185 | 148 | },
|
186 | 149 | data() {
|
|
194 | 157 | }
|
195 | 158 | },
|
196 | 159 | components: {
|
197 |
| - SvgIcon |
| 160 | + PresentationControl, |
| 161 | + WritingModes |
198 | 162 | }
|
199 | 163 | }
|
200 | 164 | </script>
|
0 commit comments