-
Notifications
You must be signed in to change notification settings - Fork 862
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
23 changed files
with
451 additions
and
38 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
53 changes: 53 additions & 0 deletions
53
...on/extension/brave_extension/components/advancedView/overlays/webCompatWarningOverlay.tsx
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,53 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
import * as React from 'react' | ||
|
||
// Types | ||
import { SetAdvancedViewFirstAccess } from '../../../types/actions/shieldsPanelActions' | ||
|
||
// Feature-specific components | ||
import { | ||
Overlay, | ||
WarningModal, | ||
WarningIcon, | ||
WarningText, | ||
ShieldsButton | ||
} from 'brave-ui/features/shields' | ||
|
||
// Shared components | ||
import { Card } from 'brave-ui' | ||
|
||
// Locale | ||
import { getLocale } from '../../../background/api/localeAPI' | ||
|
||
interface Props { | ||
setAdvancedViewFirstAccess: SetAdvancedViewFirstAccess | ||
} | ||
|
||
export default class WebCompatWarning extends React.PureComponent<Props, {}> { | ||
setAdvancedViewFirstAccess = () => { | ||
this.props.setAdvancedViewFirstAccess(false) | ||
} | ||
render () { | ||
return ( | ||
<Overlay> | ||
<Card> | ||
<WarningModal> | ||
<WarningIcon /> | ||
<WarningText> | ||
{getLocale('webCompatWarning')} | ||
</WarningText> | ||
<ShieldsButton | ||
level='primary' | ||
type='accent' | ||
onClick={this.setAdvancedViewFirstAccess} | ||
text={getLocale('gotIt')} | ||
/> | ||
</WarningModal> | ||
</Card> | ||
</Overlay> | ||
) | ||
} | ||
} |
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
40 changes: 40 additions & 0 deletions
40
components/brave_extension/extension/brave_extension/components/simpleView/footer.tsx
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,40 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
import * as React from 'react' | ||
|
||
// Feature-specific components | ||
import { MainFooter, Link } from 'brave-ui/features/shields' | ||
|
||
// API | ||
import * as tabsAPI from '../../background/api/tabsAPI' | ||
|
||
// Locale | ||
import { getLocale } from '../../background/api/localeAPI' | ||
import { ToggleAdvancedView } from '../../types/actions/shieldsPanelActions' | ||
|
||
export interface Props { | ||
toggleAdvancedView: ToggleAdvancedView | ||
} | ||
|
||
export default class Footer extends React.PureComponent<Props, {}> { | ||
openSettings = () => { | ||
tabsAPI.createTab({ url: 'chrome://settings/shields' }) | ||
.catch((err) => console.log('[Unable to open a new tab from Shields]', err)) | ||
} | ||
|
||
render () { | ||
const { toggleAdvancedView } = this.props | ||
return ( | ||
<MainFooter> | ||
<Link onClick={toggleAdvancedView}> | ||
{getLocale('advancedView')} | ||
</Link> | ||
<Link id='braveShieldsFooter' onClick={this.openSettings}> | ||
{getLocale('changeDefaults')} | ||
</Link> | ||
</MainFooter> | ||
) | ||
} | ||
} |
Oops, something went wrong.