Skip to content

Commit

Permalink
chore: remove icon transition, closes #4332
Browse files Browse the repository at this point in the history
  • Loading branch information
kyranjamie committed Oct 30, 2023
1 parent e8fa72f commit b75b20a
Show file tree
Hide file tree
Showing 18 changed files with 7 additions and 32 deletions.
Binary file removed public/assets/connect-logo/Stacks128w-dev.png
Binary file not shown.
Binary file removed public/assets/connect-logo/Stacks128w-preview.png
Binary file not shown.
Binary file removed public/assets/connect-logo/Stacks128w.png
Binary file not shown.
Binary file removed public/assets/connect-logo/Stacks256w-dev.png
Binary file not shown.
Binary file removed public/assets/connect-logo/Stacks256w-preview.png
Binary file not shown.
Binary file removed public/assets/connect-logo/Stacks256w.png
Binary file not shown.
Binary file removed public/assets/connect-logo/Stacks512w-dev.png
Binary file not shown.
Binary file removed public/assets/connect-logo/Stacks512w-preview.png
Binary file not shown.
Binary file removed public/assets/connect-logo/Stacks512w.png
Binary file not shown.
Binary file modified public/assets/icons/leather-icon-256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/assets/icons/leather-icon-512-dev.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/assets/icons/leather-icon-512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions scripts/generate-manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ const TARGET_BROWSER = process.env.TARGET_BROWSER ?? 'chromium';

function generateImageAssetUrlsWithSuffix(suffix = '') {
return {
128: `assets/connect-logo/Stacks128w${suffix}.png`,
256: `assets/connect-logo/Stacks256w${suffix}.png`,
512: `assets/connect-logo/Stacks512w${suffix}.png`,
128: `assets/icons/leather-icon-128${suffix}.png`,
256: `assets/icons/leather-icon-256${suffix}.png`,
512: `assets/icons/leather-icon-512${suffix}.png`,
};
}

Expand All @@ -37,8 +37,8 @@ const contentSecurityPolicyEnvironment = {
};

const defaultIconEnvironment = {
development: 'assets/connect-logo/Stacks128w-dev.png',
production: 'assets/connect-logo/Stacks128w.png',
development: 'assets/icons/leather-icon-128-dev.png',
production: 'assets/icons/leather-icon-128.png',
};

const browserSpecificConfig = {
Expand Down
2 changes: 1 addition & 1 deletion src/app/features/html-head/head-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function HiroMetaTags() {
return (
<>
<Title>Hiro Wallet</Title>
<Link rel="icon" href="/assets/connect-logo/Stacks128w.png" />
<Link rel="icon" href="/assets/icons/leather-icon-128.png" />
</>
);
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { createContext, useContext } from 'react';
import { Outlet, Route, useNavigate } from 'react-router-dom';

import { setNewAppIcon } from '@shared/new-theme/update-app-icon';

import { useAnalytics } from '@app/common/hooks/analytics/use-analytics';
import { delay } from '@app/common/utils';
import { openInNewTab } from '@app/common/utils/open-in-new-tab';
Expand Down Expand Up @@ -51,7 +49,6 @@ function LeatherIntroDialogContainer() {
async function onAcceptTerms() {
void analytics.track('new_brand_accept_terms');
dispatch(settingsActions.setHasApprovedNewBrand());
await setNewAppIcon();
navigate('../', { replace: true });
}

Expand Down
6 changes: 0 additions & 6 deletions src/background/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import { logger } from '@shared/logger';
import { CONTENT_SCRIPT_PORT } from '@shared/message-types';
import type { LegacyMessageFromContentScript } from '@shared/message-types';
import { setNewAppIcon, userHasApprovedAppIcon } from '@shared/new-theme/update-app-icon';
import { RouteUrls } from '@shared/route-urls';
import { WalletRequests } from '@shared/rpc/rpc-methods';
import { warnUsersAboutDevToolsDangers } from '@shared/utils/dev-tools-warning-log';
Expand All @@ -22,17 +21,12 @@ warnUsersAboutDevToolsDangers();

chrome.runtime.onInstalled.addListener(async details => {
if (details.reason === 'install' && process.env.WALLET_ENVIRONMENT !== 'testing') {
await setNewAppIcon();
await chrome.tabs.create({
url: chrome.runtime.getURL(`index.html#${RouteUrls.RequestDiagnostics}`),
});
}
});

chrome.runtime.onStartup.addListener(async () => {
if (await userHasApprovedAppIcon()) await setNewAppIcon();
});

// Listen for connection to the content-script - port for two-way communication
chrome.runtime.onConnect.addListener(port => {
if (port.name !== CONTENT_SCRIPT_PORT) return;
Expand Down
15 changes: 0 additions & 15 deletions src/shared/new-theme/update-app-icon.ts

This file was deleted.

3 changes: 1 addition & 2 deletions test-app/public/html/index.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
<title><%= htmlWebpackPlugin.options.title %></title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" href="/assets/Stacks128w.png" />
</head>
<body>
<div id="app-root"></div>
Expand Down

0 comments on commit b75b20a

Please sign in to comment.