-
Notifications
You must be signed in to change notification settings - Fork 887
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow opening a project linked to a game directly from the game dashb…
…oard (#7167)
- Loading branch information
Showing
30 changed files
with
725 additions
and
382 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
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, | ||
onOpenProject: (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.