projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Apply store pattern to track global app state
[vchess.git]
/
client
/
src
/
components
/
ContactForm.vue
diff --git
a/client/src/components/ContactForm.vue
b/client/src/components/ContactForm.vue
index
a521e6a
..
20d35b0
100644
(file)
--- a/
client/src/components/ContactForm.vue
+++ b/
client/src/components/ContactForm.vue
@@
-4,26
+4,32
@@
div
div(role="dialog" aria-labelledby="contactTitle")
form.card.smallpad
label.modal-close(for="modalContact")
div(role="dialog" aria-labelledby="contactTitle")
form.card.smallpad
label.modal-close(for="modalContact")
- h3#contactTitle.section {{
$
tr["Contact form"] }}
+ h3#contactTitle.section {{
st.
tr["Contact form"] }}
fieldset
fieldset
- label(for="userEmail") {{
$
tr["Email"] }}
+ label(for="userEmail") {{
st.
tr["Email"] }}
input#userEmail(type="email")
fieldset
input#userEmail(type="email")
fieldset
- label(for="mailSubject") {{
$
tr["Subject"] }}
+ label(for="mailSubject") {{
st.
tr["Subject"] }}
input#mailSubject(type="text")
fieldset
input#mailSubject(type="text")
fieldset
- label(for="mailContent") {{
$
tr["Content"] }}
+ label(for="mailContent") {{
st.
tr["Content"] }}
br
textarea#mailContent
fieldset
button(type="button" onClick="trySendMessage()") Send
br
textarea#mailContent
fieldset
button(type="button" onClick="trySendMessage()") Send
- p#emailSent {{
$
tr["Email sent!"] }}
+ p#emailSent {{
st.
tr["Email sent!"] }}
</template>
<script>
import { ajax } from "../utils/ajax";
</template>
<script>
import { ajax } from "../utils/ajax";
+import { store } from "@/store";
export default {
export default {
- name: "ContactForm",
+ name: "my-contact-form",
+ data: function() {
+ return {
+ st: store.state,
+ };
+ },
methods: {
// Note: not using Vue here, but would be possible
trySendMessage: function() {
methods: {
// Note: not using Vue here, but would be possible
trySendMessage: function() {