@@ -274,20 +274,20 @@ export async function registrationControl (
274274 const row = tbody . appendChild ( dom . createElement ( 'tr' ) )
275275 row . appendChild ( renderScopeCheckbox ( scope ) ) // @@ index
276276 }
277-
278277 return context
279278}
280279
281280export function renderScopeHeadingRow ( context , store , scope ) {
282- const backgroundColor = { private : '#ff8 ' , public : 'white ' }
281+ const backgroundColor = { private : '#fee ' , public : '#efe ' }
283282 const { dom } = context
284283 const name = scopeLabel ( context , scope )
285284 const row = dom . createElement ( 'tr' )
286285 const cell = row . appendChild ( dom . createElement ( 'td' ) )
287- cell . colspan = 3 // @@ check
286+ cell . setAttribute ( 'colspan' , '3' )
287+ cell . style . backgoundColor = backgroundColor [ scope . label ] || 'white'
288288 const header = cell . appendChild ( dom . createElement ( 'h3' ) )
289289 header . textContent = name
290- row . style . backgroundColor = backgroundColor [ scope . label ] || 'white '
290+ header . style . textAlign = 'left '
291291 return row
292292}
293293/**
@@ -322,15 +322,13 @@ export async function registrationList (context: AuthenticationContext, options:
322322 const items = await getScopedAppsFromIndex ( store , scope , options . type || null ) // any class
323323 console . log ( '@@ instance items' , items )
324324 for ( const item of items ) {
325- /*
326- async function deleteRegistration () {
327- await deleteTypeIndexRegistration(store, item)
328- } */
329- // if (!options.type || options.type.sameTerm(item.scope.class)) {
330- // tbody.appendChild(widgets.personTR(item.scope.instance))
331- tbody . appendChild ( widgets . personTR ( dom , ns . solid ( 'instance' ) , item . instance , {
332- deleteFunction : async ( ) => await deleteTypeIndexRegistration ( store , item ) // deleteRegistration
333- } ) )
325+ const row = widgets . personTR ( dom , ns . solid ( 'instance' ) , item . instance , {
326+ deleteFunction : async ( ) => {
327+ await deleteTypeIndexRegistration ( store , item ) ;
328+ tbody . removeChild ( row )
329+ }
330+ } )
331+ tbody . appendChild ( row )
334332 }
335333 }
336334 return context
0 commit comments