forked from nus-cs2103-AY1819S2/addressbook-level4
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #81 from thomastanck/offline-view
View articles offline if available Adds `offlineLink` field to `Entry`, and `BrowserPanel` views `offlineLink` if it exists. ### Summary of changes * Add `offlineLink` to `Entry` * Connect `offlineLink` to `BrowserPanel` * Update `JsonAdaptedEntry` so that `offlineLink` will be saved to disk * Adds `.html` extension to local filenames so that `WebEngine` views them properly.
- Loading branch information
Showing
18 changed files
with
240 additions
and
92 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
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
14 changes: 8 additions & 6 deletions
14
src/test/data/JsonEntryBookStorageTest/invalidAndValidEntryEntryBook.json
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,13 +1,15 @@ | ||
{ | ||
"persons": [ { | ||
"name": "Valid Title!", | ||
"phone": "Val1d-C@mment! ~ !", | ||
"email": "https://hans.example.com", | ||
"title": "Valid Title!", | ||
"description": "Val1d-C@mment! ~ !", | ||
"link": "https://hans.example.com", | ||
"offlineLink": "", | ||
"address": "4th street" | ||
}, { | ||
"name": "Entry With Invalid Link Field", | ||
"phone": "Oh no!", | ||
"email": "[email protected]", | ||
"title": "Entry With Invalid Link Field", | ||
"description": "Oh no!", | ||
"link": "[email protected]", | ||
"offlineLink": "", | ||
"address": "4th street" | ||
} ] | ||
} |
7 changes: 4 additions & 3 deletions
7
src/test/data/JsonEntryBookStorageTest/invalidEntryEntryBook.json
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,8 +1,9 @@ | ||
{ | ||
"persons": [ { | ||
"name": "Entry with invalid link field", | ||
"phone": "Oh no!", | ||
"email": "[email protected]", | ||
"title": "Entry with invalid link field", | ||
"description": "Oh no!", | ||
"link": "[email protected]", | ||
"offlineLink": "", | ||
"address": "4th street" | ||
} ] | ||
} |
Oops, something went wrong.