diff --git a/apps/block_scout_web/assets/js/pages/layout.js b/apps/block_scout_web/assets/js/pages/layout.js index 43fb5a2178..ab170e873c 100644 --- a/apps/block_scout_web/assets/js/pages/layout.js +++ b/apps/block_scout_web/assets/js/pages/layout.js @@ -1,5 +1,195 @@ import $ from 'jquery' import { addChainToMM } from '../lib/add_chain_to_mm' +import mixpanel from 'mixpanel-browser' +import { init as amplitudeInit, track as amplitudeTrack } from '@amplitude/analytics-browser' + +const mixpanelToken = process.env.MIXPANEL_TOKEN +const amplitudeApiKey = process.env.AMPLITUDE_API_KEY +const mixpanelUrl = process.env.MIXPANEL_URL +const amplitudeUrl = process.env.AMPLITUDE_URL + +if (mixpanelToken) { + if (mixpanelUrl) { + mixpanel.init(mixpanelToken, { api_host: mixpanelUrl }) + } else { + mixpanel.init(mixpanelToken) + } +} + +if (amplitudeApiKey) { + if (amplitudeUrl) { + amplitudeInit(amplitudeApiKey, { serverUrl: amplitudeUrl }) + } else { + amplitudeInit(amplitudeApiKey) + } +} + +const simpleEvents = { + '.profile-button': 'Profile click', + '.watchlist-button': 'Watch list click', + '.address-tags-button': 'Address tags click', + '.transaction-tags-button': 'Transaction tags click', + '.api-keys-button': 'API keys click', + '.custom-abi-button': 'Custom ABI click', + '.public-tags-button': 'Public tags click', + '.sign-out-button': 'Sign out click', + '.sign-in-button': 'Sign in click', + '.add-address-button': 'Add address to watch list click', + '.add-address-tag-button': 'Add address tag click', + '.add-transaction-tag-button': 'Add transaction tag click', + '.add-api-key-button': 'Add API key click', + '.add-custom-abi-button': 'Add custom ABI click', + '.add-public-tag-button': 'Request to add public tag click' +} + +if (mixpanelToken || amplitudeApiKey) { + for (const elementClass in simpleEvents) { + $(elementClass).click((_event) => { + if (mixpanelToken) { + mixpanel.track(simpleEvents[elementClass]) + } + + if (amplitudeApiKey) { + amplitudeTrack(simpleEvents[elementClass]) + } + }) + } +} + +$('.save-address-button').click((_event) => { + const eventProperties = { + address_hash: $('#watchlist_address_address_hash').val(), + private_tag: $('#watchlist_address_name').val(), + eth_incoming: $('#watchlist_address_watch_coin_input').prop('checked'), + eth_outgoing: $('#watchlist_address_watch_coin_output').prop('checked'), + erc_20_incoming: $('#watchlist_address_watch_erc_20_input').prop('checked'), + erc_20_outgoing: $('#watchlist_address_watch_erc_20_output').prop('checked'), + erc_721_1155_incoming: $('#watchlist_address_watch_erc_721_input').prop('checked'), + erc_721_1155_outgoing: $('#watchlist_address_watch_erc_721_output').prop('checked'), + email_notifications: $('#watchlist_address_notify_email').prop('checked') + } + const eventName = 'New address to watchlist completed' + + if (mixpanelToken) { + mixpanel.track(eventName, eventProperties) + } + + if (amplitudeApiKey) { + amplitudeTrack(eventName, eventProperties) + } +}) + +$('.save-address-tag-button').click((_event) => { + const eventProperties = { + address_hash: $('#tag_address_address_hash').val(), + private_tag: $('#tag_address_name').val() + } + const eventName = 'Add address tag completed' + + if (mixpanelToken) { + mixpanel.track(eventName, eventProperties) + } + + if (amplitudeApiKey) { + amplitudeTrack(eventName, eventProperties) + } +}) + +$('.save-transaction-tag-button').click((_event) => { + const eventProperties = { + address_hash: $('#tag_transaction_tx_hash').val(), + private_tag: $('#tag_transaction_name').val() + } + const eventName = 'Add transaction tag completed' + + if (mixpanelToken) { + mixpanel.track(eventName, eventProperties) + } + + if (amplitudeApiKey) { + amplitudeTrack(eventName, eventProperties) + } +}) + +$('.save-api-key-button').click((_event) => { + const eventProperties = { + application_name: $('#key_name').val() + } + const eventName = 'Generate API key completed' + + if (mixpanelToken) { + mixpanel.track(eventName, eventProperties) + } + + if (amplitudeApiKey) { + amplitudeTrack(eventName, eventProperties) + } +}) + +$('.save-custom-abi-button').click((_event) => { + const eventProperties = { + smart_contract_address: $('#custom_abi_address_hash').val(), + project_name: $('#custom_abi_name').val(), + custom_abi: $('#custom_abi_abi').val() + } + const eventName = 'Custom ABI completed' + + if (mixpanelToken) { + mixpanel.track(eventName, eventProperties) + } + + if (amplitudeApiKey) { + amplitudeTrack(eventName, eventProperties) + } +}) + +$('.send-public-tag-request-button').click((_event) => { + const eventProperties = { + name: $('#public_tags_request_full_name').val(), + email: $('#public_tags_request_email').val(), + company_name: $('#public_tags_request_company').val(), + company_website: $('#public_tags_request_website').val(), + goal: $('#public_tags_request_is_owner_true').prop('checked') ? 'Add tags' : 'Incorrect public tag', + public_tag: $('#public_tags_request_tags').val(), + smart_contracts: $('*[id=public_tags_request_addresses]').map((_i, el) => { + return el.value + }).get(), + reason: $('#public_tags_request_additional_comment').val() + } + const eventName = 'Request a public tag completed' + + if (mixpanelToken) { + mixpanel.track(eventName, eventProperties) + } + + if (amplitudeApiKey) { + amplitudeTrack(eventName, eventProperties) + } +}) + +$('#public_tags_request_additional_comment').click((_event) => { + const eventProperties = { + name: $('#public_tags_request_full_name').val(), + email: $('#public_tags_request_email').val(), + company_name: $('#public_tags_request_company').val(), + company_website: $('#public_tags_request_website').val(), + goal: $('#public_tags_request_is_owner_true').prop('checked') ? 'Add tags' : 'Incorrect public tag', + public_tag: $('#public_tags_request_tags').val(), + smart_contracts: $('*[id=public_tags_request_addresses]').map((_i, el) => { + return el.value + }).get(), + reason: $('#public_tags_request_additional_comment').val() + } + const eventName = 'Request a public tag completed' + + if (mixpanelToken) { + mixpanel.track(eventName, eventProperties) + } + + if (amplitudeApiKey) { + amplitudeTrack(eventName, eventProperties) + } +}) $(document).click(function (event) { const clickover = $(event.target) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index 1a98c9e3b0..15e7da4cb6 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -7,6 +7,7 @@ "name": "blockscout", "license": "GPL-3.0", "dependencies": { + "@amplitude/analytics-browser": "^1.6.1", "@fortawesome/fontawesome-free": "^6.2.1", "@tarekraafat/autocomplete.js": "^10.2.7", "@walletconnect/web3-provider": "^1.8.0", @@ -44,6 +45,7 @@ "lodash.rangeright": "^4.2.0", "lodash.reduce": "^4.6.0", "luxon": "^3.1.1", + "mixpanel-browser": "^2.45.0", "moment": "^2.29.4", "nanomorph": "^5.4.0", "numeral": "^2.0.6", @@ -103,6 +105,84 @@ "../../../deps/phoenix_html": { "version": "0.0.1" }, + "node_modules/@amplitude/analytics-browser": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@amplitude/analytics-browser/-/analytics-browser-1.6.1.tgz", + "integrity": "sha512-i9Mt3p6ikZm7zu6QRMIziSzNwWW3F2zEIKoOoBbMxy97hSliM93/VoLBLOzwMhusHK3Xy5OwcIgYVUHdXbmigw==", + "dependencies": { + "@amplitude/analytics-client-common": "^0.4.0", + "@amplitude/analytics-core": "^0.10.0", + "@amplitude/analytics-types": "^0.12.0", + "@amplitude/ua-parser-js": "^0.7.31", + "tslib": "^2.3.1" + } + }, + "node_modules/@amplitude/analytics-browser/node_modules/tslib": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", + "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" + }, + "node_modules/@amplitude/analytics-client-common": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@amplitude/analytics-client-common/-/analytics-client-common-0.4.0.tgz", + "integrity": "sha512-I3cy6AYCiVUqXAD6yU+tm3qBZdEyrdruDaUS/vVPoi+MvHIkZIXw7xaQjmkBRURWCgdcxu5LioU8r1ld1widtA==", + "dependencies": { + "@amplitude/analytics-connector": "^1.4.5", + "@amplitude/analytics-core": "^0.10.0", + "@amplitude/analytics-types": "^0.12.0", + "tslib": "^2.3.1" + } + }, + "node_modules/@amplitude/analytics-client-common/node_modules/tslib": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", + "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" + }, + "node_modules/@amplitude/analytics-connector": { + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/@amplitude/analytics-connector/-/analytics-connector-1.4.6.tgz", + "integrity": "sha512-6jD2pOosRD4y8DT8StUCz7yTd5ZDkdOU9/AWnlWKM5qk90Mz7sdZrdZ9H7sA/L3yOJEpQOYZgQplQdWWUzyWug==", + "dependencies": { + "@amplitude/ua-parser-js": "0.7.31" + } + }, + "node_modules/@amplitude/analytics-core": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@amplitude/analytics-core/-/analytics-core-0.10.0.tgz", + "integrity": "sha512-D/6U9SzyDmcNWnT/lFnBKfYl4ASicLlwD1tqu4RZoYS3SwHd/PNST+LbnL3yBTEIJIY//qjth9lLBh/RRzePfg==", + "dependencies": { + "@amplitude/analytics-types": "^0.12.0", + "tslib": "^2.3.1" + } + }, + "node_modules/@amplitude/analytics-core/node_modules/tslib": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", + "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" + }, + "node_modules/@amplitude/analytics-types": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@amplitude/analytics-types/-/analytics-types-0.12.0.tgz", + "integrity": "sha512-XwySEhnCdU8fNWUNaB38JS7bwOt4GOUG8OqgzuXtR8HvGnpCvuT7C6H+BIGA7MfctNQBAzR+6IBgDD+8r1/OEQ==" + }, + "node_modules/@amplitude/ua-parser-js": { + "version": "0.7.31", + "resolved": "https://registry.npmjs.org/@amplitude/ua-parser-js/-/ua-parser-js-0.7.31.tgz", + "integrity": "sha512-+z8UGRaj13Pt5NDzOnkTBy49HE2CX64jeL0ArB86HAtilpnfkPB7oqkigN7Lf2LxscMg4QhFD7mmCfedh3rqTg==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/ua-parser-js" + }, + { + "type": "paypal", + "url": "https://paypal.me/faisalman" + } + ], + "engines": { + "node": "*" + } + }, "node_modules/@ampproject/remapping": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", @@ -12292,6 +12372,11 @@ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" }, + "node_modules/mixpanel-browser": { + "version": "2.45.0", + "resolved": "https://registry.npmjs.org/mixpanel-browser/-/mixpanel-browser-2.45.0.tgz", + "integrity": "sha512-PQ1DaTk68yyYtLA0iejmzPA9iNDhT4uIZpqZjRTw7HWpYfl123fydHb2laKanaKjm8YDmrGGz3+xZ4Q6joogyg==" + }, "node_modules/mkdirp": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", @@ -16985,6 +17070,77 @@ } }, "dependencies": { + "@amplitude/analytics-browser": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@amplitude/analytics-browser/-/analytics-browser-1.6.1.tgz", + "integrity": "sha512-i9Mt3p6ikZm7zu6QRMIziSzNwWW3F2zEIKoOoBbMxy97hSliM93/VoLBLOzwMhusHK3Xy5OwcIgYVUHdXbmigw==", + "requires": { + "@amplitude/analytics-client-common": "^0.4.0", + "@amplitude/analytics-core": "^0.10.0", + "@amplitude/analytics-types": "^0.12.0", + "@amplitude/ua-parser-js": "^0.7.31", + "tslib": "^2.3.1" + }, + "dependencies": { + "tslib": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", + "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" + } + } + }, + "@amplitude/analytics-client-common": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@amplitude/analytics-client-common/-/analytics-client-common-0.4.0.tgz", + "integrity": "sha512-I3cy6AYCiVUqXAD6yU+tm3qBZdEyrdruDaUS/vVPoi+MvHIkZIXw7xaQjmkBRURWCgdcxu5LioU8r1ld1widtA==", + "requires": { + "@amplitude/analytics-connector": "^1.4.5", + "@amplitude/analytics-core": "^0.10.0", + "@amplitude/analytics-types": "^0.12.0", + "tslib": "^2.3.1" + }, + "dependencies": { + "tslib": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", + "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" + } + } + }, + "@amplitude/analytics-connector": { + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/@amplitude/analytics-connector/-/analytics-connector-1.4.6.tgz", + "integrity": "sha512-6jD2pOosRD4y8DT8StUCz7yTd5ZDkdOU9/AWnlWKM5qk90Mz7sdZrdZ9H7sA/L3yOJEpQOYZgQplQdWWUzyWug==", + "requires": { + "@amplitude/ua-parser-js": "0.7.31" + } + }, + "@amplitude/analytics-core": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@amplitude/analytics-core/-/analytics-core-0.10.0.tgz", + "integrity": "sha512-D/6U9SzyDmcNWnT/lFnBKfYl4ASicLlwD1tqu4RZoYS3SwHd/PNST+LbnL3yBTEIJIY//qjth9lLBh/RRzePfg==", + "requires": { + "@amplitude/analytics-types": "^0.12.0", + "tslib": "^2.3.1" + }, + "dependencies": { + "tslib": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", + "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" + } + } + }, + "@amplitude/analytics-types": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@amplitude/analytics-types/-/analytics-types-0.12.0.tgz", + "integrity": "sha512-XwySEhnCdU8fNWUNaB38JS7bwOt4GOUG8OqgzuXtR8HvGnpCvuT7C6H+BIGA7MfctNQBAzR+6IBgDD+8r1/OEQ==" + }, + "@amplitude/ua-parser-js": { + "version": "0.7.31", + "resolved": "https://registry.npmjs.org/@amplitude/ua-parser-js/-/ua-parser-js-0.7.31.tgz", + "integrity": "sha512-+z8UGRaj13Pt5NDzOnkTBy49HE2CX64jeL0ArB86HAtilpnfkPB7oqkigN7Lf2LxscMg4QhFD7mmCfedh3rqTg==" + }, "@ampproject/remapping": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", @@ -26264,6 +26420,11 @@ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" }, + "mixpanel-browser": { + "version": "2.45.0", + "resolved": "https://registry.npmjs.org/mixpanel-browser/-/mixpanel-browser-2.45.0.tgz", + "integrity": "sha512-PQ1DaTk68yyYtLA0iejmzPA9iNDhT4uIZpqZjRTw7HWpYfl123fydHb2laKanaKjm8YDmrGGz3+xZ4Q6joogyg==" + }, "mkdirp": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index 59580d619d..10f3ecc0f3 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -20,6 +20,7 @@ }, "dependencies": { "@fortawesome/fontawesome-free": "^6.2.1", + "@amplitude/analytics-browser": "^1.6.1", "@tarekraafat/autocomplete.js": "^10.2.7", "@walletconnect/web3-provider": "^1.8.0", "assert": "^2.0.0", @@ -56,6 +57,7 @@ "lodash.rangeright": "^4.2.0", "lodash.reduce": "^4.6.0", "luxon": "^3.1.1", + "mixpanel-browser": "^2.45.0", "moment": "^2.29.4", "nanomorph": "^5.4.0", "numeral": "^2.0.6", diff --git a/apps/block_scout_web/assets/webpack.config.js b/apps/block_scout_web/assets/webpack.config.js index d4f59631be..62d0fe3022 100644 --- a/apps/block_scout_web/assets/webpack.config.js +++ b/apps/block_scout_web/assets/webpack.config.js @@ -164,7 +164,11 @@ const appJs = new ContextReplacementPlugin(/moment[\/\\]locale$/, /en/), new webpack.DefinePlugin({ 'process.env.SOCKET_ROOT': JSON.stringify(process.env.SOCKET_ROOT), - 'process.env.NETWORK_PATH': JSON.stringify(process.env.NETWORK_PATH) + 'process.env.NETWORK_PATH': JSON.stringify(process.env.NETWORK_PATH), + 'process.env.MIXPANEL_TOKEN': JSON.stringify(process.env.MIXPANEL_TOKEN), + 'process.env.MIXPANEL_URL': JSON.stringify(process.env.MIXPANEL_URL), + 'process.env.AMPLITUDE_API_KEY': JSON.stringify(process.env.AMPLITUDE_API_KEY), + 'process.env.AMPLITUDE_URL': JSON.stringify(process.env.AMPLITUDE_URL) }), new webpack.ProvidePlugin({ process: 'process/browser', diff --git a/apps/block_scout_web/config/config.exs b/apps/block_scout_web/config/config.exs index 815116d275..b9546f57fe 100644 --- a/apps/block_scout_web/config/config.exs +++ b/apps/block_scout_web/config/config.exs @@ -99,6 +99,10 @@ config :block_scout_web, BlockScoutWeb.ApiRouter, config :block_scout_web, BlockScoutWeb.WebRouter, enabled: System.get_env("DISABLE_WEBAPP") != "true" +config :block_scout_web, BlockScoutWeb.CSPHeader, + mixpanel_url: System.get_env("MIXPANEL_URL", "https://api-js.mixpanel.com"), + amplitude_url: System.get_env("AMPLITUDE_URL", "https://api2.amplitude.com/2/httpapi") + # Configures Ueberauth local settings config :ueberauth, Ueberauth, providers: [ diff --git a/apps/block_scout_web/lib/block_scout_web/csp_header.ex b/apps/block_scout_web/lib/block_scout_web/csp_header.ex index cb81c9b224..b75aaa4c19 100644 --- a/apps/block_scout_web/lib/block_scout_web/csp_header.ex +++ b/apps/block_scout_web/lib/block_scout_web/csp_header.ex @@ -9,9 +9,11 @@ defmodule BlockScoutWeb.CSPHeader do def init(opts), do: opts def call(conn, _opts) do + config = Application.get_env(:block_scout_web, __MODULE__) + Controller.put_secure_browser_headers(conn, %{ "content-security-policy" => "\ - connect-src 'self' #{websocket_endpoints(conn)} wss://*.bridge.walletconnect.org/ https://request-global.czilladx.com/ https://raw.githubusercontent.com/trustwallet/assets/ https://registry.walletconnect.org/data/wallets.json https://*.poa.network;\ + connect-src 'self' #{config[:mixpanel_url]} #{config[:amplitude_url]} #{websocket_endpoints(conn)} wss://*.bridge.walletconnect.org/ https://request-global.czilladx.com/ https://raw.githubusercontent.com/trustwallet/assets/ https://registry.walletconnect.org/data/wallets.json https://*.poa.network;\ default-src 'self';\ script-src 'self' 'unsafe-inline' 'unsafe-eval' https://coinzillatag.com https://www.google.com https://www.gstatic.com;\ style-src 'self' 'unsafe-inline' 'unsafe-eval' https://fonts.googleapis.com;\ diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/api_key/form.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/api_key/form.html.eex index a425a078b5..66b7c73175 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/account/api_key/form.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/api_key/form.html.eex @@ -23,7 +23,7 @@
<%= gettext "Back to API keys (Cancel)"%> - <%= submit gettext("Save"), class: "button button-primary button-sm ml-3" %> + <%= submit gettext("Save"), class: "save-api-key-button button button-primary button-sm ml-3" %>
<% end %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/api_key/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/api_key/index.html.eex index 72ebbe8782..156fe24147 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/account/api_key/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/api_key/index.html.eex @@ -41,11 +41,11 @@ <%= if Enum.count(@api_keys) < Key.get_max_api_keys_count() do %> - <%= gettext "Add API key" %> + <%= gettext "Add API key" %> <% end %> - \ No newline at end of file + diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/common/_nav.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/common/_nav.html.eex index cf28ad5d85..81667180d7 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/account/common/_nav.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/common/_nav.html.eex @@ -1,25 +1,25 @@ diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/custom_abi/form.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/custom_abi/form.html.eex index c54477c824..312e020677 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/account/custom_abi/form.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/custom_abi/form.html.eex @@ -28,7 +28,7 @@
<%= gettext "Back to Custom ABI (Cancel)"%> - <%= submit gettext("Save"), class: "button button-primary button-sm ml-3" %> + <%= submit gettext("Save"), class: "save-custom-abi-button button button-primary button-sm ml-3" %>
<% end %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/custom_abi/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/custom_abi/index.html.eex index 409a4ffaa0..84467652b1 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/account/custom_abi/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/custom_abi/index.html.eex @@ -41,11 +41,11 @@ <%= if Enum.count(@custom_abis) < CustomABI.get_max_custom_abis_count() do %> - <%= gettext "Add Custom ABI" %> + <%= gettext "Add Custom ABI" %> <% end %> - \ No newline at end of file + diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/public_tags_request/form.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/public_tags_request/form.html.eex index 86cfd1df22..9a2cec1220 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/account/public_tags_request/form.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/public_tags_request/form.html.eex @@ -60,7 +60,7 @@
<%= gettext "Cancel"%> - <%= submit gettext("Send request"), class: "button button-primary button-sm ml-3" %> + <%= submit gettext("Send request"), class: "send-public-tag-request-button button button-primary button-sm ml-3" %>
<% end %> @@ -69,4 +69,4 @@ - \ No newline at end of file + diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/public_tags_request/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/public_tags_request/index.html.eex index bd94519473..b3a5155868 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/account/public_tags_request/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/public_tags_request/index.html.eex @@ -34,11 +34,11 @@ <%= if Enum.count(@public_tags_requests) < PublicTagsRequest.get_max_public_tags_request_count() do %> - <%= gettext "Request to add public tag" %> + <%= gettext "Request to add public tag" %> <% end %> - \ No newline at end of file + diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/tag_address/form.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/tag_address/form.html.eex index ec4d930cf1..6e41a7c3f3 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/account/tag_address/form.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/tag_address/form.html.eex @@ -22,7 +22,7 @@
<%= gettext "Back to Address Tags (Cancel)"%> - <%= submit gettext("Save"), class: "button button-primary button-sm ml-3" %> + <%= submit gettext("Save"), class: "save-address-tag-button button button-primary button-sm ml-3" %>
<% end %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/tag_address/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/tag_address/index.html.eex index 511405cdda..bcc3d2d31b 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/account/tag_address/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/tag_address/index.html.eex @@ -34,7 +34,7 @@ <%= if Enum.count(@address_tags) < TagAddress.get_max_tags_count() do %> - <%= gettext "Add address tag" %> + <%= gettext "Add address tag" %> <% end %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/tag_transaction/form.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/tag_transaction/form.html.eex index 40d9c03f83..1426bdd90a 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/account/tag_transaction/form.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/tag_transaction/form.html.eex @@ -22,7 +22,7 @@
<%= gettext "Back to Transaction Tags (Cancel)"%> - <%= submit gettext("Save"), class: "button button-primary button-sm ml-3" %> + <%= submit gettext("Save"), class: "save-transaction-tag-button button button-primary button-sm ml-3" %>
<% end %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/tag_transaction/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/tag_transaction/index.html.eex index c1cca8adec..508d8126ba 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/account/tag_transaction/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/tag_transaction/index.html.eex @@ -34,7 +34,7 @@ <%= if Enum.count(@tx_tags) < TagTransaction.get_max_tags_count() do %> - <%= gettext "Add transaction tag" %> + <%= gettext "Add transaction tag" %> <% end %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist/show.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist/show.html.eex index 592532f625..6270bc7667 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist/show.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist/show.html.eex @@ -35,7 +35,7 @@ <%= if Enum.count(@watchlist.watchlist_addresses) < WatchlistAddress.get_max_watchlist_addresses_count() do %> - <%= gettext "Add address" %> + <%= gettext "Add address" %> <% end %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist_address/form.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist_address/form.html.eex index c2a6dce569..410b19615d 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist_address/form.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/account/watchlist_address/form.html.eex @@ -80,7 +80,7 @@ <%= gettext "Back to Watch list (Cancel)" %> - <%= submit gettext("Save"), class: "button button-primary button-sm ml-3" %> + <%= submit gettext("Save"), class: "#{if @method == :create, do: "save-address-button "}button button-primary button-sm ml-3" %> <% end %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/layout/_account_menu_item.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/layout/_account_menu_item.html.eex index e8f8e58f62..541dcecb45 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/layout/_account_menu_item.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/layout/_account_menu_item.html.eex @@ -8,26 +8,26 @@ <% else %>
  • - + <%= render BlockScoutWeb.IconsView, "_accounts_icon.html" %> - Sign in + <%= gettext "Sign in" %>
  • <% end %> -<% end %> \ No newline at end of file +<% end %>