From a245e75221ca48b9cd855c6c264627673482af5e Mon Sep 17 00:00:00 2001 From: drewmcarthur Date: Sat, 20 Jan 2024 22:10:44 -0700 Subject: [PATCH] links --- src/public/index.html | 5 +++-- src/views.rs | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/public/index.html b/src/public/index.html index 7efb46e..2739bac 100644 --- a/src/public/index.html +++ b/src/public/index.html @@ -16,10 +16,11 @@

Welcome to QRStats!

For example, if you wanted to track scans of a QR Code, for example.

How it works

You give us a URL, and we generate an ID. You can then share a URL - that looks like https://qrstats.drewmca.dev/redirect/9aa7e609, + that looks like https://qrstats.drewmca.dev/redirect/id, and when they visit the site, we'll write that down and redirect them to your URL.

-

Then, you can visit https://qrstats.drewmca.dev/stats, and see how many people have visited +

Then, you can visit https://qrstats.drewmca.dev/stats/id, and see how many people have + visited your site.

Get Started

You can get started by visiting /create.

diff --git a/src/views.rs b/src/views.rs index a207cbb..40f76f4 100644 --- a/src/views.rs +++ b/src/views.rs @@ -5,6 +5,8 @@ use crate::{util::serve_html, Stats, Target}; pub(crate) fn stats_view(stats: Stats) -> Result { let body = format!( "

Stats

+ Home + Back to Login

ID

{}

Count

@@ -21,6 +23,7 @@ pub(crate) fn create_success(target: Target, id: String) -> Result { let body = format!( "

Success!

+ Home

New ID for URL(\"{}\") is: {}

Redirect URL (copy this into your QR generator

Stats URL (visit here, and enter your ID and password to view your stats)

",