{% import "partials/macros.html" as ui %} {# The "where alerts go" choices, shared by setup step 3 and the Alerts page's add flow. Context: errors, form (previous answers), ntfy_topic, telegram {configured, bot}, apprise (installed), providers. Phone notification comes first: it is the one a person can set up from a phone in a minute. #} {% set E = errors or {} %} {% set F = form or {} %} {% macro choice(k, title, desc, icon_name, checked) -%}
{{ caller() }}
{%- endmacro %} {% call choice("ntfy", "Notification on your phone", "Free app called ntfy. Install it, add one name, done. No account.", "smartphone", kind == "ntfy") %} {% set topic = F.ntfy_topic or ntfy_topic %} {# ntfy:// links subscribe the Android app in one tap. The iPhone app has no such link, so the name itself stays big enough to type, with Copy for people already on the phone. #} {% set ntfy_link = "ntfy://ntfy.sh/" ~ topic ~ "?display=vinted-sniper" %}
  1. On your phone, install ntfy from the App Store or Google Play. It's free and doesn't ask for your name, email or number.
  2. In ntfy, tap + and add this name: {{ topic }} {{ ui.icon("smartphone", "i-sm") }}Open in ntfy (Android)

Android: scan this with your phone's camera and tap the link. ntfy opens with this name already added.
iPhone: type the name above into ntfy. It stays the same if you come back later.

{{ ui.field_error(E, "ntfy_topic") }} {% endcall %} {% call choice("telegram", "Telegram", "A chat message in Telegram. You make a small private bot first (about 3 minutes).", "send", kind == "telegram") %} {% if telegram.configured %}
  1. Tap Connect my chat. We make a one-time code.
  2. Send it to {% if telegram.bot %}your bot @{{ telegram.bot }}{% else %}your bot{% endif %} in Telegram. The button opens the chat with the code ready; just press Start.
{{ ui.field_error(E, "telegram") }}
{% else %}
  1. In Telegram, search for BotFather (it has a blue tick). It's Telegram's official tool for making bots. Send it /newbot and pick any name.
  2. BotFather sends a long code that starts with numbers, then a colon. On the computer running vinted-sniper, add it to the settings file as VINTED_SNIPER_TELEGRAM_BOT_TOKEN=that-code and restart vinted-sniper.
  3. Come back here and choose Telegram again: you'll get a button that connects your chat.
{{ ui.field_error(E, "telegram") }} {% endif %} {% endcall %} {% call choice("discord", "Discord", "A message in a Discord channel. You need your own server (free, 30 seconds).", "message-circle", kind == "discord") %}

You need to be allowed to manage the channel. On a friend's server that only works if they make you an admin; otherwise make your own server.

  1. Click the cog next to the channel name: Edit Channel.
  2. Open Integrations, then Webhooks, then New Webhook.
  3. Click Copy Webhook URL and paste it below.
{% if E.discord_url %}{{ ui.field_error(E, "discord_url") }}{% else %}

Starts with discord.com/api/webhooks/. Keep it to yourself: anyone with it can post in that channel.

{% endif %}
{% endcall %} {% call choice("apprise", "Email", "Alerts in your inbox. Needs an app password from your email provider.", "mail", kind == "apprise") %} {% if apprise %}
{{ ui.field_error(E, "email_address") }}
{{ ui.field_error(E, "email_password") }}

Your provider makes one in its security settings (Gmail: Google Account, Security, App passwords). Your normal password usually won't work.

{{ ui.field_error(E, "email_smtp") }}
{{ ui.icon("chevron-right") }}Slack, Pushover, Matrix and more

For people who've set these up before. Every service's link format.

{% else %}

Email needs an optional part that isn't installed. On the computer running vinted-sniper, install vinted-sniper[apprise] and restart. Until then, a notification on your phone works the same way: a buzz with the photo.

{% endif %} {{ ui.field_error(E, "kind") }} {{ ui.field_error(E, "config") }} {% endcall %}