forked from codex-team/hawk.so
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from codex-team/minor
feat: minor updates
- Loading branch information
Showing
5 changed files
with
276 additions
and
200 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,44 @@ | ||
<template> | ||
<div :class="['box', inputActive && 'box__active']"> | ||
<div class="contact"> | ||
<div :class="[`div-${$props.titleSize}`, `div`, inputActive && 'div__active']">{{ $props.title }}</div> | ||
<div :class="[`div-${$props.titleSize}`, `div`, inputActive && 'div__active']"> | ||
{{ $props.title }} | ||
</div> | ||
<p :class="['team-hawk-so-t-me', inputActive && 'team-hawk-so-t-me__active']"> | ||
Чтобы начать сотрудничество или получить больше информации, напишите нам на | ||
<a href="mailto:[email protected]"> [email protected]</a> | ||
или в телеграм | ||
<a href="https://t.me/+xWe73YEfIVRlNmYy">t.me/hawk-support</a>. | ||
<br /> | ||
<a href="https://t.me/hawk_tracker">t.me/hawk_tracker</a>. | ||
<br> | ||
<span class="text-wrapper"> | ||
Либо оставьте почту: | ||
Либо оставьте телеграм или имейл: | ||
</span> | ||
</p> | ||
<form | ||
v-if="mail === '' || mail === undefined" | ||
class="bottom-container" | ||
@submit.prevent="notify(inputData)" | ||
> | ||
> | ||
<div class="frame"> | ||
<input | ||
required | ||
:value="inputData" | ||
:class="['input-style', inputActive && 'input-style-active']" | ||
type="text" | ||
placeholder="Telegram или email" | ||
@input="inputData = $event.target.value" | ||
type="email" | ||
placeholder="[email protected]" /> | ||
> | ||
</div> | ||
<button class="div-wrapper"> | ||
<div class="text-wrapper-3">Получить информацию</div> | ||
<div class="text-wrapper-3"> | ||
Получить информацию | ||
</div> | ||
</button> | ||
</form> | ||
<div v-else | ||
<div | ||
v-else | ||
class="bottom-container, bottom-container__text" | ||
> | ||
> | ||
Спасибо, мы свяжемся с вами по почте <b>{{ mail }}</b> | ||
</div> | ||
</div> | ||
|
@@ -56,38 +62,37 @@ export default Vue.extend({ | |
}, | ||
mail: { | ||
type: String, | ||
required: true | ||
required: true, | ||
}, | ||
}, | ||
data() { | ||
return { | ||
inputData: this.mail, | ||
} | ||
}; | ||
}, | ||
watch: { | ||
mail(newMail) { | ||
this.inputData = newMail; | ||
}, | ||
}, | ||
methods: { | ||
notify: function(message: string): void { | ||
notify(message: string): void { | ||
fetch('https://notify.bot.codex.so/u/U8S04KRK5R51', { | ||
method: 'POST', | ||
headers: { | ||
'Content-Type': 'application/x-www-form-urlencoded' | ||
'Content-Type': 'application/x-www-form-urlencoded', | ||
}, | ||
body: new URLSearchParams({ | ||
'message': message | ||
}) | ||
message, | ||
}), | ||
}) | ||
.then(_ => { | ||
this.$emit('update:mail', this.inputData); | ||
}) | ||
.catch(error => console.error('Error:', error)); | ||
.then((_) => { | ||
this.$emit('update:mail', this.inputData); | ||
}) | ||
.catch(error => console.error('Error:', error)); | ||
}, | ||
}, | ||
}); | ||
</script> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.