moved access token to browser based

This commit is contained in:
2023-07-26 22:10:10 -06:00
parent 87fc062dfb
commit b03e81caf1
12 changed files with 118 additions and 240 deletions

View File

@@ -0,0 +1,4 @@
<div class="text-center m-3">
<span class="loader"></span>
</div>

View File

@@ -0,0 +1,56 @@
.loader {
width: 48px;
height: 48px;
border-radius: 50%;
display: inline-block;
position: relative;
border: 3px solid;
border-color: #6c757d #6c757d transparent transparent;
box-sizing: border-box;
animation: rotation 2s linear infinite;
}
.loader::after,
.loader::before {
content: '';
box-sizing: border-box;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
margin: auto;
border: 3px solid;
border-color: transparent transparent #092565 #092565;
width: 40px;
height: 40px;
border-radius: 50%;
box-sizing: border-box;
animation: rotationBack 1s linear infinite;
transform-origin: center center;
}
/* #092565 */
/* #3a0647 */
.loader::before {
width: 32px;
height: 32px;
border-color: #6c757d #6c757d transparent transparent;
animation: rotation 3s linear infinite;
}
@keyframes rotation {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
@keyframes rotationBack {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(-360deg);
}
}

View File

@@ -0,0 +1,49 @@
@code
{
[Parameter, EditorRequired]
public Func<string,Task> SetToken { get; set; } = default!;
private Modal modal { get; set; } = default!;
private string tokenInput { get; set; } = "";
protected override void OnAfterRender(bool firstRender)
{
if(firstRender)
modal.Show();
}
}
<Modal @ref="modal">
<Title>
<h3>Canvas Token</h3>
</Title>
<Body>
<div>
<p>
Please input your canvas token to enable canvas integration
</p>
<p>
We only store the token encrypted in your browser. We do not store the token on our servers.
</p>
<p>
You can get your canvas token <a href="https://snow.instructure.com/profile/settings">here</a>
</p>
<form
onsubmit:preventDefault="true"
@onsubmit="async () => await SetToken(tokenInput)"
>
<input
type="text"
class="form-control"
@bind="tokenInput"
@bind:event="oninput"
/>
</form>
</div>
</Body>
<Footer>
</Footer>
</Modal>