-
Notifications
You must be signed in to change notification settings - Fork 874
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Sync] Remove Enable/Disable switch and just use input element for ha…
…ndling custom sync url. Also show Relauch button and Managed icon when required.
- Loading branch information
1 parent
eeaba3b
commit 8cc6efd
Showing
11 changed files
with
181 additions
and
150 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
69 changes: 52 additions & 17 deletions
69
browser/resources/settings/brave_sync_page/sync_url_input.html
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 |
---|---|---|
@@ -1,28 +1,63 @@ | ||
<style> | ||
cr-input { | ||
:host { | ||
cursor: auto; | ||
display: block; | ||
width: 100%; | ||
} | ||
|
||
cr-input { | ||
--cr-input-width: 50%; | ||
margin: 10px 0; | ||
padding-left: 20px; | ||
margin: 0 20px; | ||
} | ||
|
||
cr-input::part(row-container) { | ||
justify-content: normal; | ||
} | ||
|
||
.custom-title { | ||
margin: 10px 20px; | ||
} | ||
</style> | ||
|
||
<!-- Max length of 100 KB to prevent browser from freezing. --> | ||
<cr-input | ||
id="input" | ||
value="{{value}}" | ||
error-message="$i18n{notValid}" | ||
placeholder="$i18n{enterCustomSyncUrl}" | ||
invalid="{{invalid}}" | ||
on-input="validate_" | ||
maxlength="102400" | ||
spellcheck="false" | ||
on-keypress="onKeyPress_" | ||
on-blur="validate_" | ||
on-change="onChange_" | ||
> | ||
</cr-input> | ||
<div id="syncUrlInput"> | ||
<p class="custom-title">$i18n{braveCustomSyncUrlTitle}</p> | ||
<cr-input | ||
id="input" | ||
value="{{value}}" | ||
error-message="$i18n{notValid}" | ||
placeholder="$i18n{enterCustomSyncUrl}" | ||
invalid="{{invalid}}" | ||
on-input="validate_" | ||
maxlength="102400" | ||
spellcheck="false" | ||
on-keypress="onKeyPress_" | ||
on-blur="validate_" | ||
on-change="onChange_" | ||
disabled="[[controlDisabled_(pref.*, disabled)]]" | ||
> | ||
<template | ||
is="dom-if" | ||
if="[[hasPrefPolicyIndicator(pref.*)]]" | ||
> | ||
<cr-policy-pref-indicator | ||
pref="[[pref]]" | ||
icon-aria-label="[[label]]" | ||
slot="suffix" | ||
> | ||
</cr-policy-pref-indicator> | ||
</template> | ||
|
||
<template | ||
is="dom-if" | ||
if="[[shouldShowRestart_(pref.*)]]" | ||
> | ||
<cr-button | ||
on-click="onRestartClick_" | ||
slot="suffix" | ||
> | ||
$i18n{restart} | ||
</cr-button> | ||
</template> | ||
</cr-input> | ||
</div> |
Oops, something went wrong.