Skip to content

Commit

Permalink
added notifier for contact component
Browse files Browse the repository at this point in the history
  • Loading branch information
e11sy committed Jul 9, 2024
1 parent 0a3e435 commit da3f575
Showing 1 changed file with 30 additions and 7 deletions.
37 changes: 30 additions & 7 deletions components/contact.vue
Original file line number Diff line number Diff line change
@@ -6,21 +6,23 @@
<span class="text-wrapper">
Чтобы начать сотрудничество или получить больше информации, напишите нам на
</span>
<span class="span"> team@hawk.so</span>
<span class="text-wrapper"> или в телеграм </span>
<span class="span"> t.me/hawk-support</span>
<span class="text-wrapper">.</span>
<span class="span"> team@hawk.so</span><span class="text-wrapper"> или в телеграм </span><span class="span"> t.me/hawk-support</span><span class="text-wrapper">.</span>
<br /> <!-- Переносим текст на новую строку -->
<span class="text-wrapper">
Либо оставьте почту:
</span>
</p>
<div class="bottom-container">
<div class="frame">
<input :class="['input-style', inputActive && 'input-style-active']" type="text" placeholder="dev@yourproduct.ru" />
<input
:value="inputData"
:class="['input-style', inputActive && 'input-style-active']"
@input="inputData = $event.target.value"
type="text"
placeholder="dev@yourproduct.ru" />
</div>
<button class="div-wrapper">
<div class="text-wrapper-3">Получить информацию</div>
<div @click="notify($props.inputData)" class="text-wrapper-3">Получить информацию</div>
</button>
</div>
</div>
@@ -41,8 +43,29 @@ export default Vue.extend({
},
titleSize: {
type: String,
}
},
inputData: {
type: String,
},
},
methods: {
notify: function(message: string): void {
console.log('notified');
fetch('https://notify.bot.codex.so/u/6PI3KB10U6ZV', {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({
'message': message
})
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
console.log('notified end');
},
}
});
</script>

0 comments on commit da3f575

Please sign in to comment.