Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,28 @@
removing = true;
window.__dspaceRemoveSsrOverlay = null;

var el = document.getElementById('__dspace_ssr_overlay');
if (!el) return;
// Always unhide the real <ds-app> and drop the kept SSR styles first, even if the
// overlay node has gone missing (e.g. removed by an extension or another script).
// A bare early return here would otherwise leave the app permanently hidden.
app.removeAttribute('data-dspace-ssr-hidden');
el.style.transition = 'opacity 150ms ease-out';
el.style.opacity = '0';
setTimeout(function () {
if (el && el.parentNode) el.parentNode.removeChild(el);

var removeKeptStyles = function () {
for (var i = 0; i < keptStyles.length; i++) {
if (keptStyles[i].parentNode) keptStyles[i].parentNode.removeChild(keptStyles[i]);
}
keptStyles = [];
};

var el = document.getElementById('__dspace_ssr_overlay');
if (!el) {
removeKeptStyles();
return;
}
el.style.transition = 'opacity 150ms ease-out';
el.style.opacity = '0';
setTimeout(function () {
if (el && el.parentNode) el.parentNode.removeChild(el);
removeKeptStyles();
}, 200);
};

Expand Down
5 changes: 0 additions & 5 deletions src/themes/eager-themes.module.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { NgModule } from '@angular/core';
import { EagerThemeModule as DSpaceEagerThemeModule } from './dspace/eager-theme.module';
import { EagerThemeModule } from './dspace/eager-theme.module';
import { EagerThemeModule as CustomEagerThemeModule } from './custom/eager-theme.module';

/**
Expand All @@ -18,10 +17,6 @@ import { EagerThemeModule as CustomEagerThemeModule } from './custom/eager-theme
@NgModule({
imports: [
DSpaceEagerThemeModule,
// Uncomment this because the `untyped-item` theming is not working when it is commented out.
// Issue: https://github.com/DSpace/dspace-angular/issues/1897
// Useful info in PR: https://github.com/DSpace/dspace-angular/pull/2262#issuecomment-1557146081
EagerThemeModule,
CustomEagerThemeModule,
],
})
Expand Down
Loading