Skip to content

Commit d78fbaf

Browse files
committed
fix: remove icon
1 parent 3a78588 commit d78fbaf

File tree

3 files changed

+7
-70
lines changed

3 files changed

+7
-70
lines changed

dist/autofill-debug.js

Lines changed: 2 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/autofill.js

Lines changed: 2 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Form/inputTypeConfig.js

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,6 @@ const canBeAutofilled = async (input, device) => {
8888
return Boolean(canAutofill);
8989
};
9090

91-
/**
92-
* @param {import('./matching.js').SupportedSubTypes | 'unknown'} subtype
93-
* @returns {boolean}
94-
*/
95-
const canShowCCIcon = (subtype) => subtype === 'cardNumber' || subtype === 'cardSecurityCode';
96-
9791
/**
9892
* A map of config objects. These help by centralising here some complexity
9993
* @type {InputTypeConfig}
@@ -158,27 +152,8 @@ const inputTypeConfig = {
158152
creditCards: {
159153
type: 'creditCards',
160154
displayName: 'credit cards',
161-
getIconBase: (input, form) => {
162-
const { device } = form;
163-
const subtype = getInputSubtype(input);
164-
165-
if (subtype === 'cardName') return '';
166-
167-
if (canBeInteractedWith(input) && device.globalConfig.isMobileApp && canShowCCIcon(subtype))
168-
return ddgPasswordIcons.ddgCcIconBase;
169-
170-
return '';
171-
},
172-
getIconFilled: (input, form) => {
173-
const { device } = form;
174-
const subtype = getInputSubtype(input);
175-
176-
if (subtype === 'cardName') return '';
177-
178-
if (device.globalConfig.isMobileApp && canShowCCIcon(subtype)) return ddgPasswordIcons.ddgCcIconFilled;
179-
180-
return '';
181-
},
155+
getIconBase: () => '',
156+
getIconFilled: () => '',
182157
getIconAlternate: () => '',
183158
shouldDecorate: async (input, { device }) => {
184159
return canBeAutofilled(input, device);
@@ -243,4 +218,4 @@ const isFieldDecorated = (input) => {
243218
return input.hasAttribute(constants.ATTR_INPUT_TYPE);
244219
};
245220

246-
export { getInputConfig, getInputConfigFromType, canBeInteractedWith, isFieldDecorated, canShowCCIcon };
221+
export { getInputConfig, getInputConfigFromType, canBeInteractedWith, isFieldDecorated };

0 commit comments

Comments
 (0)