Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add explanation of Delete Assets #26762

Merged
merged 1 commit into from
Jan 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/i18n/common/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@
"completedWithoutRecommendedBlock": "Congratulations! You completed Puzzle {puzzleNumber}. (But you could use a different block for stronger code.)",
"completionStatus": "Completion Status",
"concept": "Concept",
"confirmDeleteExplanation": "Deleting this file will remove it everywhere in your project",
"confirming": "Confirming...",
"confirmSchool": "Confirm School",
"congratsCertificateHeading": "You Earned a Certificate of Completion",
Expand Down
12 changes: 12 additions & 0 deletions apps/src/code-studio/components/AssetRow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ import {assets as assetsApi, files as filesApi} from '@cdo/apps/clientApi';
import AssetThumbnail from './AssetThumbnail';
import i18n from '@cdo/locale';
import firehoseClient from "@cdo/apps/lib/util/firehose";
import color from "@cdo/apps/util/color";

const styles = {
deleteWarning: {
paddingLeft: '34px',
textAlign: 'left',
color: color.red
}
};

/**
* A single row in the AssetManager, describing one asset.
Expand Down Expand Up @@ -114,6 +123,9 @@ export default class AssetRow extends React.Component {
Delete File
</button>
<button onClick={this.cancelDelete}>Cancel</button>
<div style={styles.deleteWarning}>
{i18n.confirmDeleteExplanation()}
</div>
{this.state.actionText}
</td>
);
Expand Down