From a92d7f8149ef0ea9c385877589c7e596fe9108f7 Mon Sep 17 00:00:00 2001 From: Tixie Date: Sun, 10 Mar 2019 00:28:47 +0100 Subject: [PATCH] feat: Add fake encoding state --- src/assets/css/4-modules/encoding.css | 18 +++++++++++++ src/assets/css/style.css | 1 + src/components/capture-options.vue | 9 ++++--- src/components/encoding.vue | 38 +++++++++++++++++++++++++++ src/store.js | 9 +++++++ src/views/capture.vue | 10 +++++-- 6 files changed, 79 insertions(+), 6 deletions(-) create mode 100644 src/assets/css/4-modules/encoding.css create mode 100644 src/components/encoding.vue diff --git a/src/assets/css/4-modules/encoding.css b/src/assets/css/4-modules/encoding.css new file mode 100644 index 0000000..c987ccf --- /dev/null +++ b/src/assets/css/4-modules/encoding.css @@ -0,0 +1,18 @@ +/* ----------------------------------------------------------- */ +/* == Encoding overlay */ +/* ----------------------------------------------------------- */ + +.encoding { + position: fixed; + top: 0; + left: 0; + display: flex; + justify-content: center; + align-items: center; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, .7); + color: #fff; + text-align: center; + font-size: 2.4rem; +} diff --git a/src/assets/css/style.css b/src/assets/css/style.css index c4336e2..8fff050 100644 --- a/src/assets/css/style.css +++ b/src/assets/css/style.css @@ -32,6 +32,7 @@ @import "4-modules/preview.css"; @import "4-modules/progress-bar.css"; +@import "4-modules/encoding.css"; /* ----------------------------------------------------------- */ /* == screens */ diff --git a/src/components/capture-options.vue b/src/components/capture-options.vue index 850cd35..82f295c 100644 --- a/src/components/capture-options.vue +++ b/src/components/capture-options.vue @@ -1,11 +1,11 @@ @@ -21,7 +21,8 @@ export default { }, computed: { ...mapState([ - 'timer' + 'timer', + 'encoding' ]) }, methods: { diff --git a/src/components/encoding.vue b/src/components/encoding.vue new file mode 100644 index 0000000..bfd61fb --- /dev/null +++ b/src/components/encoding.vue @@ -0,0 +1,38 @@ + + + diff --git a/src/store.js b/src/store.js index 1835f29..483babf 100644 --- a/src/store.js +++ b/src/store.js @@ -13,6 +13,9 @@ export default new Vuex.Store({ capturing: { status: false, state: 0 + }, + encoding: { + status: false } }, mutations: { @@ -30,6 +33,12 @@ export default new Vuex.Store({ }, updateCaptureState (store, percent) { store.capturing.state = percent + }, + startEncoding (store) { + store.encoding.status = true + }, + stopEncoding (store) { + store.encoding.status = false } }, actions: { diff --git a/src/views/capture.vue b/src/views/capture.vue index 3cefcd6..41cb651 100644 --- a/src/views/capture.vue +++ b/src/views/capture.vue @@ -11,12 +11,14 @@ +