generated from maximegris/angular-electron
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
32f350a
commit 1cf5295
Showing
11 changed files
with
197 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { I2PData } from "./I2PData"; | ||
|
||
export class RouterCommandResultData extends I2PData { | ||
public message: string = ""; | ||
|
||
public static fromWrapper(wrapper: HTMLElement): RouterCommandResultData { | ||
const elements = wrapper.getElementsByClassName("content"); | ||
const content = elements.item(0); | ||
|
||
if (!content) { | ||
throw new Error("Content not found"); | ||
} | ||
|
||
const data = new RouterCommandResultData(); | ||
|
||
data.message = content.textContent ? content.textContent : 'Unknown error'; | ||
|
||
return data; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { I2PData } from "./I2PData"; | ||
|
||
export class TokenData extends I2PData { | ||
public token: string = ""; | ||
|
||
public static fromWrapper(wrapper: HTMLElement): TokenData { | ||
const collection = wrapper.getElementsByTagName("input"); | ||
|
||
for(let i = 0; i < collection.length; i++) { | ||
const element = collection.item(i); | ||
if (!element) continue; | ||
if (element.name === 'token') { | ||
const data = new TokenData(); | ||
data.token = element.value; | ||
return data; | ||
} | ||
} | ||
|
||
throw new Error("Token data not found in wrapper"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
export { I2PData } from './I2PData'; | ||
export { MainData } from './MainData'; | ||
export { RouterCommandsData } from './RouterCommandsData'; | ||
export { RouterCommandResultData } from './RouterCommandResultData'; | ||
export { LocalDestinationsData } from './LocalDestinationsData'; | ||
export { TunnelsData, TunnelInfo } from './TunnelsData'; | ||
export { TunnelsData, TunnelInfo } from './TunnelsData'; | ||
export { TokenData } from "./TokenData"; |