-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpause.html
More file actions
56 lines (47 loc) · 1.73 KB
/
pause.html
File metadata and controls
56 lines (47 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Mockflix — Pause</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<header class="topbar" id="topbar"></header>
<div class="container">
<section class="hero">
<h1 class="h-title">Pause membership</h1>
<p class="h-sub">Take a short break — you can resume anytime.</p>
</section>
<div class="card panel loading-wrap" id="page">
<div class="spinner"><div class="spin" aria-label="Loading"></div></div>
<div class="content">
<div class="notice">
Pausing keeps your account settings, profiles, and watch history.
</div>
<div class="hr"></div>
<div class="footer-actions">
<a class="btn btn-ghost left" href="membership.html">Back</a>
<button class="btn" id="pauseBtn" data-testid="pause-1-month">Pause for 1 month</button>
</div>
</div>
</div>
</div>
<script src="app.js"></script>
<script>
Mockflix.requireLogin();
Mockflix.injectTopbar("account");
const s = Mockflix.loadState();
if (s.billingProvider !== "direct") window.location.href = "membership.html";
document.getElementById("pauseBtn").addEventListener("click", async (e) => {
Mockflix.disableBriefly(e.currentTarget);
Mockflix.setLoading("page");
await Mockflix.realisticDelay();
Mockflix.setState({ subscriptionStatus: "paused" });
window.location.href = "membership.html" + (Mockflix.isTestMode() ? "?test=1" : "");
});
Mockflix.setLoading("page");
Mockflix.realisticDelay().then(() => Mockflix.clearLoading("page"));
</script>
</body>
</html>