Change default addons icon (#10617)
This commit is contained in:
Родитель
544d51cb96
Коммит
ba8e32b9a6
|
@ -13,7 +13,7 @@ module.exports = {
|
|||
// Alias config for tests to be able to import config files.
|
||||
'^config/(.*)$': '<rootDir>/config/$1',
|
||||
// Replaces the following formats with an empty module.
|
||||
'^.+\\.(scss|css|svg|woff|woff2|mp4|webm)$': '<rootDir>/tests/emptyModule',
|
||||
'^.+\\.(scss|css|woff|woff2|mp4|webm)$': '<rootDir>/tests/emptyModule',
|
||||
// Alias bin for bin scripts.
|
||||
'^bin/(.*)$': '<rootDir>/bin/$1',
|
||||
},
|
||||
|
@ -36,8 +36,8 @@ module.exports = {
|
|||
transform: {
|
||||
'^.+\\.js$': 'babel-jest',
|
||||
// This transforms images to be a module that exports the filename.
|
||||
// Tests can assert on the filenname.
|
||||
'^.+\\.(jpg|jpeg|gif|png)$': '<rootDir>/tests/fileTransformer',
|
||||
// Tests can assert on the filename.
|
||||
'^.+\\.(jpg|jpeg|gif|png|svg)$': '<rootDir>/tests/fileTransformer',
|
||||
},
|
||||
transformIgnorePatterns: ['<rootDir>/node_modules/'],
|
||||
watchPlugins: [
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { isAllowedOrigin } from 'amo/utils';
|
||||
import fallbackIcon from 'amo/img/icons/default-64.png';
|
||||
import fallbackIcon from 'amo/img/icons/default.svg';
|
||||
|
||||
export function getAddonIconUrl(addon) {
|
||||
return addon && isAllowedOrigin(addon.icon_url)
|
||||
|
|
Двоичные данные
src/amo/img/icons/default-64.png
Двоичные данные
src/amo/img/icons/default-64.png
Двоичный файл не отображается.
До Ширина: | Высота: | Размер: 4.7 KiB |
|
@ -0,0 +1,6 @@
|
|||
<!-- 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/. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="128" height="128" fill="#59b106">
|
||||
<path d="M2.6 8 4 8c1.103 0 2 .897 2 2s-.897 2-2 2l-1.4 0-.6.6 0 1.775C2 15.271 2.729 16 3.625 16l9.75 0c.896 0 1.625-.729 1.625-1.625l0-8.75C15 4.729 14.271 4 13.375 4L11 4l0-2c0-1.103-.897-2-2-2S7 .897 7 2l0 2-3.375 0C2.729 4 2 4.729 2 5.625L2 7.4l.6.6z"/>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 588 B |
|
@ -7,7 +7,7 @@ import AddonSummaryCard, {
|
|||
} from 'amo/components/AddonSummaryCard';
|
||||
import RatingsByStar from 'amo/components/RatingsByStar';
|
||||
import Link from 'amo/components/Link';
|
||||
import fallbackIcon from 'amo/img/icons/default-64.png';
|
||||
import fallbackIcon from 'amo/img/icons/default.svg';
|
||||
import {
|
||||
createContextWithFakeRouter,
|
||||
createFakeLocation,
|
||||
|
|
|
@ -4,7 +4,7 @@ import EditableCollectionAddon, {
|
|||
EditableCollectionAddonBase,
|
||||
extractId,
|
||||
} from 'amo/components/EditableCollectionAddon';
|
||||
import fallbackIcon from 'amo/img/icons/default-64.png';
|
||||
import fallbackIcon from 'amo/img/icons/default.svg';
|
||||
import { ADDON_TYPE_STATIC_THEME } from 'amo/constants';
|
||||
import {
|
||||
applyUIStateChanges,
|
||||
|
|
|
@ -268,7 +268,7 @@ describe(__filename, () => {
|
|||
const root = render({ addon });
|
||||
|
||||
// image `require` calls in jest return the filename
|
||||
expect(root.find('.SearchResult-icon')).toHaveProp('src', 'default-64.png');
|
||||
expect(root.find('.SearchResult-icon')).toHaveProp('src', 'default.svg');
|
||||
});
|
||||
|
||||
it('adds a theme-specific class', () => {
|
||||
|
@ -419,7 +419,7 @@ describe(__filename, () => {
|
|||
// Since there's no add-on, there shouldn't be a link.
|
||||
expect(root.find('.SearchResult-link')).toHaveLength(0);
|
||||
|
||||
expect(root.find('.SearchResult-icon')).toHaveProp('src', 'default-64.png');
|
||||
expect(root.find('.SearchResult-icon')).toHaveProp('src', 'default.svg');
|
||||
expect(root.find('.SearchResult-name').find(LoadingText)).toHaveLength(1);
|
||||
expect(root.find('.SearchResult-summary').find(LoadingText)).toHaveLength(
|
||||
1,
|
||||
|
|
|
@ -957,7 +957,7 @@ describe(__filename, () => {
|
|||
}),
|
||||
});
|
||||
const src = root.find('.Addon-icon img').prop('src');
|
||||
expect(src).toEqual('default-64.png');
|
||||
expect(src).toEqual('default.svg');
|
||||
});
|
||||
|
||||
it('renders screenshots for type extension', () => {
|
||||
|
|
|
@ -6,7 +6,7 @@ import {
|
|||
fakeAddon,
|
||||
fakePreview,
|
||||
} from 'tests/unit/helpers';
|
||||
import fallbackIcon from 'amo/img/icons/default-64.png';
|
||||
import fallbackIcon from 'amo/img/icons/default.svg';
|
||||
|
||||
describe(__filename, () => {
|
||||
const allowedIcon = 'https://addons.cdn.mozilla.net/webdev-64.png';
|
||||
|
|
Загрузка…
Ссылка в новой задаче