Skip to content

Commit

Permalink
Merge pull request #23 from nkolba/fix-14
Browse files Browse the repository at this point in the history
Fix 14
  • Loading branch information
nkolba authored Apr 15, 2022
2 parents 8d079ba + c5e58d0 commit 088f7ce
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 20 deletions.
22 changes: 10 additions & 12 deletions directory/src/routes/root.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import { FastifyInstance } from 'fastify';

export const root = (fastify : FastifyInstance, options, done) => {
fastify.get('/', async (request, reply) => {
console.log("root request", request);
reply
.code(200)
.header('Content-Type', 'application/json; charset=utf-8')
.send({"description":"FDC3 App Directory API","version":"1.2"});

});
export const root = (fastify: FastifyInstance, options, done) => {
fastify.get('/', async (request, reply) => {
console.log('root request', request);
reply
.code(200)
.header('Content-Type', 'application/json; charset=utf-8')
.send({ description: 'FDC3 App Directory API', version: '1.2' });
});

done();

};
done();
};
9 changes: 6 additions & 3 deletions packages/main/src/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ const SEARCH_RESULTS_PRELOAD = join(
'../../preload/dist/searchResults/index.cjs',
);

const CHANNEL_WINDOW_WIDTH = 130;
const CHANNEL_WINDOW_HEIGHT = 90;

export class Workspace {
constructor(config?: WorkspaceConfig) {
this.id = utils.guid();
Expand Down Expand Up @@ -383,8 +386,8 @@ export class Workspace {
console.log('creatChannelWIndow');
return new Promise((resolve, reject) => {
this.channelWindow = new BrowserWindow({
height: 100,
width: 140,
height: CHANNEL_WINDOW_HEIGHT,
width: CHANNEL_WINDOW_WIDTH,
hasShadow: true,
show: false,
frame: false,
Expand Down Expand Up @@ -436,7 +439,7 @@ export class Workspace {
});
const winPos: number[] = this.window ? this.window.getPosition() : [0, 0];
this.channelWindow.setPosition(
winPos[0] + (xOffset || 0),
winPos[0] + ((xOffset || 0) - CHANNEL_WINDOW_WIDTH),
winPos[1] + (yOffset || 0),
);
this.channelWindow.show();
Expand Down
8 changes: 3 additions & 5 deletions packages/preload/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,14 @@ ipcRenderer.on(TOPICS.ADD_TAB, (event, args) => {
title: args.title,
},
});
if (frameReady){

if (frameReady) {
document.dispatchEvent(tabEvent);
}
else {
} else {
document.addEventListener(TOPICS.FRAME_READY, () => {
document.dispatchEvent(tabEvent);
});
}

});

ipcRenderer.on(TOPICS.SELECT_TAB, (event, args) => {
Expand Down

0 comments on commit 088f7ce

Please sign in to comment.