mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-25 23:28:33 -06:00
moved access token to browser based
This commit is contained in:
4
Management.Web/Shared/Components/Spinner.razor
Normal file
4
Management.Web/Shared/Components/Spinner.razor
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
<div class="text-center m-3">
|
||||
<span class="loader"></span>
|
||||
</div>
|
||||
56
Management.Web/Shared/Components/Spinner.razor.css
Normal file
56
Management.Web/Shared/Components/Spinner.razor.css
Normal 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);
|
||||
}
|
||||
}
|
||||
|
||||
49
Management.Web/Shared/Components/ValidateCanvasToken.razor
Normal file
49
Management.Web/Shared/Components/ValidateCanvasToken.razor
Normal 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>
|
||||
|
||||
Reference in New Issue
Block a user