Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Issue #9053: Making country field in autofill a dropdown list instead of text input box. #10821

Merged
merged 6 commits into from
Sep 10, 2017
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion app/browser/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,11 @@ const createViewSubmenu = () => {
click: function () {
const win = BrowserWindow.getActiveWindow()
const activeTab = tabState.getActiveTab(appStore.getState(), win.id)
appActions.toggleDevTools(activeTab.get('tabId'))
if (activeTab) {
appActions.toggleDevTools(activeTab.get('tabId'))
} else {
console.warn('Unable to open developer tools; activeTab is null or undefined')
}
}
},
CommonMenu.separatorMenuItem,
Expand Down
253 changes: 253 additions & 0 deletions app/common/constants/countryCodes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,253 @@
const countryCodes = [
'AF',
'AX',
'AL',
'DZ',
'AS',
'AD',
'AO',
'AI',
'AQ',
'AG',
'AR',
'AM',
'AW',
'AU',
'AT',
'AZ',
'BS',
'BH',
'BD',
'BB',
'BY',
'BE',
'BZ',
'BJ',
'BM',
'BT',
'BO',
'BQ',
'BA',
'BW',
'BV',
'BR',
'IO',
'BN',
'BG',
'BF',
'BI',
'KH',
'CM',
'CA',
'CV',
'KY',
'CF',
'TD',
'CL',
'CN',
'CX',
'CC',
'CO',
'KM',
'CG',
'CD',
'CK',
'CR',
'CI',
'HR',
'CU',
'CW',
'CY',
'CZ',
'DK',
'DJ',
'DM',
'DO',
'EC',
'EG',
'SV',
'GQ',
'ER',
'EE',
'ET',
'FK',
'FO',
'FJ',
'FI',
'FR',
'GF',
'PF',
'TF',
'GA',
'GM',
'GE',
'DE',
'GH',
'GI',
'GR',
'GL',
'GD',
'GP',
'GU',
'GT',
'GG',
'GN',
'GW',
'GY',
'HT',
'HM',
'VA',
'HN',
'HK',
'HU',
'IS',
'IN',
'ID',
'IR',
'IQ',
'IE',
'IM',
'IL',
'IT',
'JM',
'JP',
'JE',
'JO',
'KZ',
'KE',
'KI',
'KP',
'KR',
'KW',
'KG',
'LA',
'LV',
'LB',
'LS',
'LR',
'LY',
'LI',
'LT',
'LU',
'MO',
'MK',
'MG',
'MW',
'MY',
'MV',
'ML',
'MT',
'MH',
'MQ',
'MR',
'MU',
'YT',
'MX',
'FM',
'MD',
'MC',
'MN',
'ME',
'MS',
'MA',
'MZ',
'MM',
'NA',
'NR',
'NP',
'NL',
'NC',
'NZ',
'NI',
'NE',
'NG',
'NU',
'NF',
'MP',
'NO',
'OM',
'PK',
'PW',
'PS',
'PA',
'PG',
'PY',
'PE',
'PH',
'PN',
'PL',
'PT',
'PR',
'QA',
'RE',
'RO',
'RU',
'RW',
'BL',
'SH',
'KN',
'LC',
'MF',
'PM',
'VC',
'WS',
'SM',
'ST',
'SA',
'SN',
'RS',
'SC',
'SL',
'SG',
'SX',
'SK',
'SI',
'SB',
'SO',
'ZA',
'GS',
'SS',
'ES',
'LK',
'SD',
'SR',
'SJ',
'SZ',
'SE',
'CH',
'SY',
'TW',
'TJ',
'TZ',
'TH',
'TL',
'TG',
'TK',
'TO',
'TT',
'TN',
'TR',
'TM',
'TC',
'TV',
'UG',
'UA',
'AE',
'GB',
'US',
'UM',
'UY',
'UZ',
'VU',
'VE',
'VN',
'VG',
'VI',
'WF',
'EH',
'YE',
'ZM',
'ZW'
]

module.exports = countryCodes
1 change: 1 addition & 0 deletions app/extensions/brave/about-autofill.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<script src="ext/l20n.min.js"></script>
<script src="gen/aboutPages.entry.js" async></script>
<link rel="localization" href="locales/{locale}/autofill.properties">
<link rel="localization" href="locales/{locale}/countries.properties">
</head>
<body>
<div id="appContainer"/>
Expand Down
1 change: 1 addition & 0 deletions app/extensions/brave/index-dev.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<link rel="localization" href="locales/{locale}/bravery.properties">
<link rel="localization" href="locales/{locale}/menu.properties">
<link rel="localization" href="locales/{locale}/downloads.properties">
<link rel="localization" href="locales/{locale}/countries.properties">
</head>
<body>
<div id="appContainer">
Expand Down
1 change: 1 addition & 0 deletions app/extensions/brave/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<link rel="localization" href="locales/{locale}/bravery.properties">
<link rel="localization" href="locales/{locale}/menu.properties"/>
<link rel="localization" href="locales/{locale}/downloads.properties"/>
<link rel="localization" href="locales/{locale}/countries.properties"/>
</head>
<body>
<div id="appContainer"/>
Expand Down
Loading