Update to add Login Link
function LoginLink(user: UserData | null) {
return !user?.id && html`<a href="/.well-known/authenticate" id="login">Login</a>`;
}
Inject the link into the Page component
Update to add Login Link
function LoginLink(user: UserData | null) {
return !user?.id && html`<a href="/.well-known/authenticate" id="login">Login</a>`;
}
Inject the link into the Page component
/* eslint-disable */ | |
// noinspection JSUnusedGlobalSymbols | |
/** An abnormal event (called an exception) which occurs as a result of calling a method or accessing a property of a web API. */ | |
declare class DOMException extends Error { | |
constructor(param0?: string, param1?: string); | |
readonly message: string; | |
readonly name: string; | |
readonly code: number; | |
readonly stack: any; | |
static readonly INDEX_SIZE_ERR: number; |
Qualtrics.SurveyEngine.addOnload(function() | |
{ | |
this.hideChoices(); | |
const alreadySelected = this.getSelectedChoices()[0] | |
this.getQuestionTextContainer().innerHTML = this.getQuestionInfo().QuestionText.replace( | |
"{{dropdown}}", "<select required name=\""+this.getQuestionInfo().QuestionID+"\" id=\""+this.getQuestionInfo().QuestionID+"-select\"><option value=\"\" disabled "+(!alreadySelected?"selected":"")+" hidden></option>"+Object.values(this.getQuestionInfo().Choices).map(c => "<option "+(alreadySelected ==c.RecodeValue?"selected":"")+ " value=\""+c.RecodeValue+"\">"+c.Text+"</option>").join("\n")+"</select>" | |
); | |
this.getQuestionTextContainer().querySelector("select").addEventListener('change', e => { | |
let option = e.target[e.target.selectedIndex] | |
this.setChoiceValueByRecodeValue(option.value, option.text) |
<script> | |
import {Fetch} from "svelte-data-loading" | |
</script> | |
<Fetch | |
base="https://example.com" // optional, will be prepended to all API `load` paths. Special case of `transform` | |
headers={headers => ({...headers, ...headersToAdd})} // Add additional headers for e.g. auth. Special case of `transform` | |
transform={({method, url, headers, body}) => ({method, url, headers, body})} // Modify a request before it's made | |
defautLoading={Component} // display if the `loading` slot isn't provided | |
defaultError={Component} // display if the `error` slot isn't provided |
<script> | |
import { Get } from "svelte-data-loading" | |
</script> | |
<Get load="/my/api" let:data> | |
{data} | |
<div slot="loading"> | |
Loading... | |
</div> | |
<div slot="error" let:error> |
<script> | |
import { Get } from "svelte-data-loading" | |
</script> | |
<Get load="/my/api" let:data> | |
{data} | |
</Get> |
<script> | |
import { onMount } from "svelte" | |
let data | |
onMount(() => { | |
fetch("https://example.com/my/api") | |
.then(r => r.json()) | |
.then(j => data = j) | |
} | |
</script> |
I hereby claim:
To claim this, I am signing this object:
{"lastUpload":"2020-02-02T22:06:41.571Z","extensionVersion":"v3.4.3"} |