Something went wrong. Try again.
Web frontend and supporting services for lance.blue
Something went wrong. Try again.
1.9 kB · 48 lines
TypeScript
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849/** * The alpha feedback survey: one address, in the places that ask for it. * * A form off the site, not a record in anybody's repository — the opposite of * a flare (report-modal.ts), and deliberately. A flare is a bug report filed * publicly from the player's own account and answered on the board. This is a * questionnaire a human reads in bulk, it is anonymous, and nothing here * writes anything anywhere. * * The address is a constant rather than something the API serves, the same * way flare's board and its tag list are: it is ours, it changes about as * often as this file does, and a page that had to ask for it would have one * more thing to be down. * * arena/suramadu/web/flare.js carries the same constant for the match screen * and the end-of-match report, which are pages this bundle never runs on. * Changing the form means changing it there too. */
import { el } from "./dom";
/** The form. */export const SURVEY_URL = "https://docs.google.com/forms/d/e/1FAIpQLSdT7hshO7t3JhbvdTB74ixx8D0923ViqDwnhsUXcrYHSwTMFQ/viewform";
/** * What the link is called. A control's name, not copy: it says where it goes * and nothing else, the way "Report an issue" does. */export const SURVEY_LABEL = "Alpha User Survey";
/** * A link to the form. A new tab, because it is somebody else's site and a * player pressing this in the middle of the site should not lose their place. */export function surveyLink(className?: string): HTMLAnchorElement { const link = el("a", { href: SURVEY_URL, textContent: SURVEY_LABEL, target: "_blank", rel: "noopener", }); // Assigned rather than passed in: el() sets every key it is given, and an // absent className passed through would put the word "undefined" on the // element as a class. if (className) link.className = className; return link;}