Skip to content

Commit

Permalink
Removed unused icons
Browse files Browse the repository at this point in the history
  • Loading branch information
robmoffat committed Sep 26, 2024
1 parent 3b4cef9 commit f63f9e4
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 82 deletions.
71 changes: 0 additions & 71 deletions directory/sail.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,77 +108,6 @@
"version": "1.0.0",
"publisher": "FINOS",
"icons": []
},
{
"appId": "pricer",
"name": "Pricer",
"title": "Pricer",
"description": "A demo app for the FDC3 Developer Course",
"icons": [
{
"src": "http://localhost:5000/static/pricer/icon.png"
}
],
"screenshots": [
{
"src": "http://localhost:5000/static/pricer/screenshot.png",
"label": "Demo Screenshot"
}
],
"type": "web",
"details": {
"url": "http://localhost:5000/static/pricer/index.html"
},
"interop": {
"intents": {
"listensFor": {
"ViewQuote": {
"displayName": "View Quote",
"contexts": [
"fdc3.instrument"
]
},
"demo.GetPrices": {
"displayName": "Get Prices",
"contexts": [
"fdc3.instrument"
]
}
}
}
},
"hostManifests": {
"sail": {
"injectApi": "2.0"
}
}
},
{
"appId": "tradelist",
"name": "TradeList",
"title": "TradeList",
"description": "A demo app for the FDC3 Developer Course",
"icons": [
{
"src": "http://localhost:5000/static/tradelist/icon.png"
}
],
"screenshots": [
{
"src": "http://localhost:5000/static/tradelist/screenshot.png",
"label": "Demo Screenshot"
}
],
"type": "web",
"details": {
"url": "http://localhost:5000/static/tradelist/index.html"
},
"interop": {},
"hostManifests": {
"sail": {
"injectApi": "2.0"
}
}
}
],
"message": "OK"
Expand Down
6 changes: 4 additions & 2 deletions src/client/grid/grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import "gridstack/dist/gridstack.css"
import { GridsState } from "./gridstate"
import { AppState, getAppState } from "../state/AppState"
import { State } from "@kite9/fdc3-web-impl"
import { AppHosting } from "../../server/da/SailServerContext"

type GridsProps = { cs: ClientState; gs: GridsState; as: AppState; id: string }

Expand Down Expand Up @@ -142,13 +143,14 @@ export const Content = ({
<span className={styles.contentTitleTextSpan}>{panel.title}</span>
</p>
<AppStateIcon instanceId={panel.panelId} as={as} />
<LockIcon />
{/* <LockIcon />
<PopOutIcon
action={() => {
cs.removePanel(panel.panelId)
as.open(panel.appId, AppHosting.Tab)
window.open(panel.url, "_blank")
}}
/>
/> */}
</div>
<div className={styles.resizeBaffle} />
<div className={styles.contentBody}>
Expand Down
6 changes: 3 additions & 3 deletions src/client/state/AppState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export interface AppState {

registerAppWindow(window: Window, instanceId: string): void

open(detail: DirectoryApp): Promise<string>
open(detail: DirectoryApp, destination?: AppHosting): Promise<string>

getAppState(instanceId: string): State | undefined

Expand Down Expand Up @@ -125,9 +125,9 @@ class DefaultAppState implements AppState {
* Opens either a new panel or a browser tab for the application to go in,
* returns the instance id for the new thing.
*/
open(detail: DirectoryApp): Promise<string> {
open(detail: DirectoryApp, destination?: AppHosting): Promise<string> {
return new Promise(async (resolve, _reject) => {
const hosting: AppHosting = (detail.hostManifests as any)?.sail?.forceNewWindow ? AppHosting.Tab : AppHosting.Frame
const hosting: AppHosting = destination ?? (detail.hostManifests as any)?.sail?.forceNewWindow ? AppHosting.Tab : AppHosting.Frame
const instanceId = await getServerState().registerAppLaunch(detail.appId, hosting)
if (hosting == AppHosting.Tab) {
const w = window.open((detail.details as WebAppDetails).url, "_blank")!!;
Expand Down
14 changes: 8 additions & 6 deletions src/server/da/initSocketService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,10 @@ export function initSocketService(httpServer: any, sessions: Map<string, SailFDC
appInstance.url = (directoryItem[0].details as WebAppDetails).url
fdc3ServerInstance = fdc3Server
fdc3ServerInstance.serverContext.setInstanceDetails(appInstanceId, appInstance)
callback(appInstance.hosting)
} else if (DEBUG_MODE) {
return callback(appInstance.hosting)
} else if ((DEBUG_MODE && directoryItem.length > 0)) {
console.error("App tried to connect with invalid instance id, allowing connection anyway ", appInstanceId)

const instanceDetails: SailData = {
appId: props.appId,
instanceId: appInstanceId,
Expand All @@ -130,11 +131,12 @@ export function initSocketService(httpServer: any, sessions: Map<string, SailFDC
fdc3Server?.serverContext.setInstanceDetails(appInstanceId, instanceDetails)

fdc3ServerInstance = fdc3Server
callback(instanceDetails.hosting)
} else {
console.error("App tried to connect with invalid instance id")
callback(null, "Invalid instance id")
return callback(instanceDetails.hosting)
}

console.error("App tried to connect with invalid instance id")
return callback(null, "Invalid instance id")

} else {
console.error("App Tried Connecting to non-existent DA Instance ", userSessionId, appInstanceId)
callback(null, "App Tried Connecting to non-existent DA Instance")
Expand Down

0 comments on commit f63f9e4

Please sign in to comment.