-
Notifications
You must be signed in to change notification settings - Fork 885
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow to open projects from the game dashboard
- [x] Display "Open project" button (with arrow if multiples) - [x] Display cloud/local projects in game dashboard for a game - [/] Ensure we always save the game id - [x] Adapt the wording if nothing is found.
- Loading branch information
Showing
24 changed files
with
658 additions
and
351 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// @flow | ||
import * as React from 'react'; | ||
import { I18n } from '@lingui/react'; | ||
import { Trans } from '@lingui/macro'; | ||
import { type Game } from '../../Utils/GDevelopServices/Game'; | ||
import { | ||
type FileMetadataAndStorageProviderName, | ||
type FileMetadata, | ||
type StorageProvider, | ||
} from '../../ProjectsStorage'; | ||
import DashboardWidget from './DashboardWidget'; | ||
import ProjectFileList from '../../MainFrame/EditorContainers/HomePage/CreateSection/ProjectFileList'; | ||
|
||
type Props = {| | ||
game: Game, | ||
onOpenRecentFile: (file: FileMetadataAndStorageProviderName) => Promise<void>, | ||
storageProviders: Array<StorageProvider>, | ||
|
||
project: ?gdProject, | ||
currentFileMetadata: ?FileMetadata, | ||
closeProject: () => Promise<void>, | ||
|}; | ||
|
||
const ProjectsWidget = (props: Props) => { | ||
return ( | ||
<I18n> | ||
{({ i18n }) => ( | ||
<DashboardWidget gridSize={3} title={<Trans>Projects</Trans>}> | ||
<ProjectFileList {...props} i18n={i18n} /> | ||
</DashboardWidget> | ||
)} | ||
</I18n> | ||
); | ||
}; | ||
|
||
export default ProjectsWidget; |
Oops, something went wrong.