Skip to content
This repository has been archived by the owner on Feb 24, 2023. It is now read-only.

Commit

Permalink
remove debugger for now
Browse files Browse the repository at this point in the history
  • Loading branch information
moribellamy committed Jul 11, 2020
1 parent 119229b commit bac8323
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 27 deletions.
1 change: 1 addition & 0 deletions src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

<head>
<meta charset="utf-8" />
<title>GrayTabby</title>
<link rel="icon" type="image/png" href="assets/img/blobbycat/browseraction128.png" />
<link rel="stylesheet" type="text/css" href="app.css" />
</head>
Expand Down
25 changes: 0 additions & 25 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,16 @@
* non-trivial logic here.
*/

// Webpack uses MiniCssExtractPlugin when it sees this.
import { App } from './components/app';
import { DOCUMENT, PAGE_LOAD } from './lib/globals';
import { loadAllTabGroups } from './lib/tabs_store';
import './style/app.scss';

export class Debugger {
async double(): Promise<void> {
const groups = await loadAllTabGroups();
let earliest = Math.min(...groups.map(g => g.date));
const groupDiv: HTMLDivElement = DOCUMENT.get().querySelector('#groups');
const promises: Promise<void>[] = [];
for (const group of groups) {
earliest -= 1000;
// TODO
// await ingestTabs(group.tabs, groupDiv, () => earliest);
}
await Promise.all(promises);
}
}

declare global {
interface Window {
gt: Debugger;
}
}

/**
* The main entry point for GrayTabby.
*/
export async function graytabby(): Promise<void> {
DOCUMENT.get().title = 'GrayTabby';
const app = DOCUMENT.get().body.appendChild(App());
await app.initialRender;
DOCUMENT.get().defaultView.gt = new Debugger();
}

graytabby().then(
Expand Down
3 changes: 1 addition & 2 deletions src/components/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { PaginatorComponent } from './paginator';

async function ingestTabs(
tabSummaries: BrowserTab[],
groupsNode: HTMLDivElement,
now = () => new Date().getTime(),
): Promise<void> {
if (tabSummaries.length == 0) return;
Expand Down Expand Up @@ -96,7 +95,7 @@ export function App(): AppElement {
self.initialRender = render(0);

ARCHIVAL.get().sub(async summaries => {
await ingestTabs(summaries, groupsWrapper);
await ingestTabs(summaries);
await render(0);
});

Expand Down

0 comments on commit bac8323

Please sign in to comment.