-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: export options: rights, embed code and layout (#2032)
* feat: added show rights and embed options to export * refactor: fixed imports * refactor: extracted export functionality to controller * feat: added embed hider in reporter * feat: added locales * feat: app remembers last directory in file picker * refactor: dependency injection for electron state * refactor: make mui happy * feat: added margin and centering in simple export template * feat: add visual display options to export dialog * feat: export dialog logic and localization * feat: implemented display options * feat: implement display options in SCORM * refactor: client doesn't use paths when opening or saving The old way of saving and loading h5ps was insecure, as it would have been possible for a malicious H5P library to send client requests that do something undesired on the user's disk. Now there are only file handles that reference files the user has picked in the file picker before. * feat: custom CSS files can be added to exports * fix: localized updater message box * refactor: added comments * fix: validation in export dialog * chore(deps): update to react-scripts 5 and Node 17
- Loading branch information
Showing
73 changed files
with
37,983 additions
and
71,279 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
**/*.* |
Large diffs are not rendered by default.
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
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,72 @@ | ||
/** | ||
* Sets default width limits for all known content types | ||
*/ | ||
export const getDefaultContentTypeWidth = (mainLibrary: string): number => { | ||
const machineName = mainLibrary.substr(0, mainLibrary.indexOf(' ')); | ||
switch (machineName) { | ||
case 'H5P.Audio': | ||
case 'H5P.AudioRecorder': | ||
case 'H5P.Column': | ||
case 'H5P.Dialogcards': | ||
case 'H5P.GreetingCard': | ||
case 'H5P.KewarCode': | ||
return 800; | ||
|
||
case 'H5P.Accordion': | ||
case 'H5P.AdvancedBlanks': | ||
case 'H5P.AdventCalendar': | ||
case 'H5P.Agamotto': | ||
case 'H5P.Bingo': | ||
case 'H5P.Blanks': | ||
case 'H5P.Chart': | ||
case 'H5P.Collage': | ||
case 'H5P.Cornell': | ||
case 'H5P.Crossword': | ||
case 'H5P.Dictation': | ||
case 'H5P.DocumentationTool': | ||
case 'H5P.DragText': | ||
case 'H5P.Essay': | ||
case 'H5P.FacebookFeedPage': | ||
case 'H5P.FindTheWords': | ||
case 'H5P.GuessTheAnswer': | ||
case 'H5P.ImagePair': | ||
case 'H5P.InteractiveBook': | ||
case 'H5P.MarkTheWords': | ||
case 'H5P.MemoryGame': | ||
case 'H5P.MultiChoice': | ||
case 'H5P.PersonalityQuiz': | ||
case 'H5P.PickTheSymbols': | ||
case 'H5P.Questionnaire': | ||
case 'H5P.QuestionSet': | ||
case 'H5P.SingleChoiceSet': | ||
case 'H5P.SortParagraphs': | ||
case 'H5P.SpeakTheWords': | ||
case 'H5P.SpeakTheWordsSet': | ||
case 'H5P.Summary': | ||
case 'H5P.TrueFalse': | ||
case 'H5P.TwitterUserFeed': | ||
return 1100; | ||
|
||
case 'H5P.ArithmeticQuiz': | ||
case 'H5P.ArScavenger': | ||
case 'H5P.BranchingScenario': | ||
case 'H5P.CoursePresentation': | ||
case 'H5P.DragQuestion': | ||
case 'H5P.Flashcards': | ||
case 'H5P.ImageHotspotQuestion': | ||
case 'H5P.ImageHotspots': | ||
case 'H5P.ImageJuxtaposition': | ||
case 'H5P.ImageMultipleHotspotQuestion': | ||
case 'H5P.ImageSequencing': | ||
case 'H5P.ImageSlider': | ||
case 'H5P.ImpressivePresentation': | ||
case 'H5P.InteractiveVideo': | ||
case 'H5P.MultiMediaChoice': | ||
case 'H5P.ThreeImage': | ||
case 'H5P.Timeline': | ||
return 1400; | ||
|
||
default: | ||
return 1100; | ||
} | ||
}; |
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
Oops, something went wrong.