Skip to content

Commit

Permalink
Add warning for potentially damaged project files
Browse files Browse the repository at this point in the history
  • Loading branch information
inukshuk committed Jul 16, 2019
1 parent a7dc8a5 commit 409549c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions res/strings/renderer.en.yml
Expand Up @@ -74,6 +74,9 @@ en:
empty: Drop your photos into Tropy to get started
new: new project
recent: Recent Projects
corrupted: >
Your project file may be damaged and manual steps necessary to fix it.
Please consult the user manual for further assistance.
wizard:
project:
title: Create a new project
Expand Down
4 changes: 3 additions & 1 deletion src/components/project/name.js
Expand Up @@ -33,7 +33,8 @@ class ProjectName extends React.PureComponent {
onCancel={this.props.onEditCancel}
onChange={this.props.onChange}/>
</div>
<IconWarningSm title="Database integrity warning"/>
{this.props.isCorrupted &&
<IconWarningSm title="project.corrupted"/>}
</div>
</li>
)
Expand All @@ -42,6 +43,7 @@ class ProjectName extends React.PureComponent {

static propTypes = {
name: string.isRequired,
isCorrupted: bool,
isEditing: bool,
isSelected: bool,
isOver: bool,
Expand Down
1 change: 1 addition & 0 deletions src/components/project/sidebar.js
Expand Up @@ -250,6 +250,7 @@ class ProjectSidebar extends React.PureComponent {
<ol>
<ProjectName
name={this.props.project.name}
isCorrupted={this.props.project.corrupted}
isSelected={!this.hasSelection}
isEditing={this.isEditing}
onChange={this.handleChange}
Expand Down

0 comments on commit 409549c

Please sign in to comment.