-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "NB-12 remove cyphertext field from graphql and reformat the c…
…ode" This reverts commit 35d69de.
- Loading branch information
1 parent
35d69de
commit f97685a
Showing
19 changed files
with
440 additions
and
773 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ | |
CENSOR_MASTER_KEY = '********' | ||
CENSOR_MASTER_KEY_CHANGED = '***CHANGED***' | ||
|
||
|
||
# | ||
# Session Keys | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,73 @@ | ||
type ToastLevel = 'danger' | 'warning' | 'success' | 'info'; | ||
|
||
export function createToast( | ||
level: ToastLevel, | ||
title: string, | ||
message: string, | ||
extra?: string, | ||
level: ToastLevel, | ||
title: string, | ||
message: string, | ||
extra?: string, | ||
): InstanceType<typeof window.Toast> { | ||
let iconName = 'mdi-alert'; | ||
switch (level) { | ||
case 'warning': | ||
iconName = 'mdi-alert'; | ||
break; | ||
case 'success': | ||
iconName = 'mdi-check-circle'; | ||
break; | ||
case 'info': | ||
iconName = 'mdi-information'; | ||
break; | ||
case 'danger': | ||
iconName = 'mdi-alert'; | ||
break; | ||
} | ||
let iconName = 'mdi-alert'; | ||
switch (level) { | ||
case 'warning': | ||
iconName = 'mdi-alert'; | ||
break; | ||
case 'success': | ||
iconName = 'mdi-check-circle'; | ||
break; | ||
case 'info': | ||
iconName = 'mdi-information'; | ||
break; | ||
case 'danger': | ||
iconName = 'mdi-alert'; | ||
break; | ||
} | ||
|
||
const container = document.createElement('div'); | ||
container.setAttribute('class', 'toast-container position-fixed bottom-0 end-0 m-3'); | ||
const container = document.createElement('div'); | ||
container.setAttribute('class', 'toast-container position-fixed bottom-0 end-0 m-3'); | ||
|
||
const main = document.createElement('div'); | ||
main.setAttribute('class', `toast bg-${level}`); | ||
main.setAttribute('role', 'alert'); | ||
main.setAttribute('aria-live', 'assertive'); | ||
main.setAttribute('aria-atomic', 'true'); | ||
const main = document.createElement('div'); | ||
main.setAttribute('class', `toast bg-${level}`); | ||
main.setAttribute('role', 'alert'); | ||
main.setAttribute('aria-live', 'assertive'); | ||
main.setAttribute('aria-atomic', 'true'); | ||
|
||
const header = document.createElement('div'); | ||
header.setAttribute('class', `toast-header bg-${level} text-body`); | ||
const header = document.createElement('div'); | ||
header.setAttribute('class', `toast-header bg-${level} text-body`); | ||
|
||
const icon = document.createElement('i'); | ||
icon.setAttribute('class', `mdi ${iconName}`); | ||
const icon = document.createElement('i'); | ||
icon.setAttribute('class', `mdi ${iconName}`); | ||
|
||
const titleElement = document.createElement('strong'); | ||
titleElement.setAttribute('class', 'me-auto ms-1'); | ||
titleElement.innerText = title; | ||
const titleElement = document.createElement('strong'); | ||
titleElement.setAttribute('class', 'me-auto ms-1'); | ||
titleElement.innerText = title; | ||
|
||
const button = document.createElement('button'); | ||
button.setAttribute('type', 'button'); | ||
button.setAttribute('class', 'btn-close'); | ||
button.setAttribute('data-bs-dismiss', 'toast'); | ||
button.setAttribute('aria-label', 'Close'); | ||
const button = document.createElement('button'); | ||
button.setAttribute('type', 'button'); | ||
button.setAttribute('class', 'btn-close'); | ||
button.setAttribute('data-bs-dismiss', 'toast'); | ||
button.setAttribute('aria-label', 'Close'); | ||
|
||
const body = document.createElement('div'); | ||
body.setAttribute('class', 'toast-body'); | ||
const body = document.createElement('div'); | ||
body.setAttribute('class', 'toast-body'); | ||
|
||
header.appendChild(icon); | ||
header.appendChild(titleElement); | ||
header.appendChild(icon); | ||
header.appendChild(titleElement); | ||
|
||
if (typeof extra !== 'undefined') { | ||
const extraElement = document.createElement('small'); | ||
extraElement.setAttribute('class', 'text-muted'); | ||
header.appendChild(extraElement); | ||
} | ||
if (typeof extra !== 'undefined') { | ||
const extraElement = document.createElement('small'); | ||
extraElement.setAttribute('class', 'text-muted'); | ||
header.appendChild(extraElement); | ||
} | ||
|
||
header.appendChild(button); | ||
header.appendChild(button); | ||
|
||
body.innerText = message.trim(); | ||
body.innerText = message.trim(); | ||
|
||
main.appendChild(header); | ||
main.appendChild(body); | ||
container.appendChild(main); | ||
document.body.appendChild(container); | ||
main.appendChild(header); | ||
main.appendChild(body); | ||
container.appendChild(main); | ||
document.body.appendChild(container); | ||
|
||
const toast = new window.Toast(main); | ||
return toast; | ||
const toast = new window.Toast(main); | ||
return toast; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import {initSecrets} from './secrets'; | ||
import { initSecrets } from './secrets'; | ||
|
||
if (document.readyState !== 'loading') { | ||
initSecrets(); | ||
initSecrets(); | ||
} else { | ||
document.addEventListener('DOMContentLoaded', initSecrets); | ||
document.addEventListener('DOMContentLoaded', initSecrets); | ||
} |
Oops, something went wrong.