Loading backend @ e3879174 Compare f9294b13 to e3879174 Original line number Diff line number Diff line Subproject commit f9294b13a2b57a9f49f69bbb4d2f2a46a1d9e5ac Subproject commit e3879174c07ab4a24cd3b09fdd7260a85e90d668 frontend/src/clientsettings/components/ChangePassword.tsx +1 −1 Original line number Diff line number Diff line Loading @@ -6,13 +6,13 @@ import { SectionCard, } from '@blueprintjs/core' import { css, cx } from '@emotion/css' import { useHost } from '@inject/graphql' import { authenticatedFetch, changePasswordUrl, ErrorMessage, notifyNoncommmit, setSessionId, useHost, useWiggle, wiggleClass, } from '@inject/shared' Loading graphql/urql/multitabController.ts +18 −1 Original line number Diff line number Diff line import { getSessionId } from '@inject/shared' import UrqlWorker from '@inject/webworker/worker?sharedworker&url' import type { WorkerData } from '@inject/webworker/workerTyping' import type { Exchange, OperationResult } from 'urql' Loading Loading @@ -30,7 +31,19 @@ const keyMap = new Set<number>() const operationTabNonce = generateTabNonce() const awaitReadiness = () => new Promise(resolve => { setTimeout(async function fn() { if ((await getSessionId()) === '') { setTimeout(fn, 500) } else { resolve(true) } }, 500) }) export const multitab: Exchange = () => op$ => { let isSessionIdReady = false pipe( op$, filter( Loading @@ -41,8 +54,12 @@ export const multitab: Exchange = () => op$ => { op.context.requestPolicy === 'network-only' || op.context.requestPolicy === 'cache-and-network' ), tap(op => { tap(async op => { keyMap.add(op.key) if (!isSessionIdReady) { await awaitReadiness() isSessionIdReady = true } const tabWorker = new SharedWorker(UrqlWorker, { type: 'module', name: 'urqlWorker', Loading webworker/db.ts +0 −15 Original line number Diff line number Diff line import type { EntityTable } from 'dexie' import { Dexie } from 'dexie' import 'dexie-syncable' export const db = new Dexie('storage') as Dexie & { actionLogs: EntityTable< Loading Loading @@ -49,17 +48,3 @@ db.version(1).stores({ questionnaires: '&id', emailThreads: '&id', }) Dexie.Syncable.registerSyncProtocol('ixp-syncable', { sync(context, exerciseId, options, baseRevision, syncedRevision, changes, partial, applyRemoteChanges, onChangesAccepted, onSuccess, onError) { changes.forEach(change => { if (change.type === 'insert' || change.type === 'update') { context.table(change.table).put(change.value) } else if (change.type === 'delete') { context.table(change.table).delete(change.key) } } }, }) db.syncable.connect({}) webworker/fragments.ts +4 −0 Original line number Diff line number Diff line Loading @@ -884,6 +884,7 @@ export const Question = graphql( } } note ...QuestionAnswerable } `, [ Loading @@ -891,6 +892,7 @@ export const Question = graphql( RadioQuestionDetails, FreeFormQuestionDetails, AutoFreeFormQuestionDetails, QuestionAnswerable, MultipleChoiceQuestionDetailsType, ] ) Loading Loading @@ -952,6 +954,7 @@ export const Questionnaire = graphql( } questions { ...Question ...QuestionAnswerable } postExerciseSubmission repeatable { Loading @@ -966,6 +969,7 @@ export const Questionnaire = graphql( Question, Team, QuestionnaireAnswer, QuestionAnswerable, QuestionRelatedMilestones, Repeatable, ] Loading Loading
backend @ e3879174 Compare f9294b13 to e3879174 Original line number Diff line number Diff line Subproject commit f9294b13a2b57a9f49f69bbb4d2f2a46a1d9e5ac Subproject commit e3879174c07ab4a24cd3b09fdd7260a85e90d668
frontend/src/clientsettings/components/ChangePassword.tsx +1 −1 Original line number Diff line number Diff line Loading @@ -6,13 +6,13 @@ import { SectionCard, } from '@blueprintjs/core' import { css, cx } from '@emotion/css' import { useHost } from '@inject/graphql' import { authenticatedFetch, changePasswordUrl, ErrorMessage, notifyNoncommmit, setSessionId, useHost, useWiggle, wiggleClass, } from '@inject/shared' Loading
graphql/urql/multitabController.ts +18 −1 Original line number Diff line number Diff line import { getSessionId } from '@inject/shared' import UrqlWorker from '@inject/webworker/worker?sharedworker&url' import type { WorkerData } from '@inject/webworker/workerTyping' import type { Exchange, OperationResult } from 'urql' Loading Loading @@ -30,7 +31,19 @@ const keyMap = new Set<number>() const operationTabNonce = generateTabNonce() const awaitReadiness = () => new Promise(resolve => { setTimeout(async function fn() { if ((await getSessionId()) === '') { setTimeout(fn, 500) } else { resolve(true) } }, 500) }) export const multitab: Exchange = () => op$ => { let isSessionIdReady = false pipe( op$, filter( Loading @@ -41,8 +54,12 @@ export const multitab: Exchange = () => op$ => { op.context.requestPolicy === 'network-only' || op.context.requestPolicy === 'cache-and-network' ), tap(op => { tap(async op => { keyMap.add(op.key) if (!isSessionIdReady) { await awaitReadiness() isSessionIdReady = true } const tabWorker = new SharedWorker(UrqlWorker, { type: 'module', name: 'urqlWorker', Loading
webworker/db.ts +0 −15 Original line number Diff line number Diff line import type { EntityTable } from 'dexie' import { Dexie } from 'dexie' import 'dexie-syncable' export const db = new Dexie('storage') as Dexie & { actionLogs: EntityTable< Loading Loading @@ -49,17 +48,3 @@ db.version(1).stores({ questionnaires: '&id', emailThreads: '&id', }) Dexie.Syncable.registerSyncProtocol('ixp-syncable', { sync(context, exerciseId, options, baseRevision, syncedRevision, changes, partial, applyRemoteChanges, onChangesAccepted, onSuccess, onError) { changes.forEach(change => { if (change.type === 'insert' || change.type === 'update') { context.table(change.table).put(change.value) } else if (change.type === 'delete') { context.table(change.table).delete(change.key) } } }, }) db.syncable.connect({})
webworker/fragments.ts +4 −0 Original line number Diff line number Diff line Loading @@ -884,6 +884,7 @@ export const Question = graphql( } } note ...QuestionAnswerable } `, [ Loading @@ -891,6 +892,7 @@ export const Question = graphql( RadioQuestionDetails, FreeFormQuestionDetails, AutoFreeFormQuestionDetails, QuestionAnswerable, MultipleChoiceQuestionDetailsType, ] ) Loading Loading @@ -952,6 +954,7 @@ export const Questionnaire = graphql( } questions { ...Question ...QuestionAnswerable } postExerciseSubmission repeatable { Loading @@ -966,6 +969,7 @@ export const Questionnaire = graphql( Question, Team, QuestionnaireAnswer, QuestionAnswerable, QuestionRelatedMilestones, Repeatable, ] Loading