Skip to content
Open
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
5 changes: 5 additions & 0 deletions public/Images/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 8 additions & 3 deletions webapp/src/components/iconPresenter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import {FormattedMessage} from 'react-intl';

import SVGs from '../constants/SVGs';
const Icon = require('/public/Images/icon.svg');

const IconPresenter = ({encryptionEnabled}) => {
const style = {
Expand All @@ -18,8 +18,13 @@ const IconPresenter = ({encryptionEnabled}) => {
<span
style={style}
aria-label={ariaLabel}
dangerouslySetInnerHTML={{__html: encryptionEnabled ? SVGs.ANONYMOUS_ICON_ENABLED : SVGs.ANONYMOUS_ICON_DISABLED}}
/>
>
<img
src={Icon}
style={{fill: encryptionEnabled ? '' : '#2389d7'}}
alt='Image not loaded'
/>
</span>
)}
</FormattedMessage>
);
Expand Down
3 changes: 2 additions & 1 deletion webapp/src/constants/SVGs.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

const anonymousIconStart = "<svg xmlns='http://www.w3.org/2000/svg' ";
const anonymousIconEnd = " x='0px' y='0px' width='25' height='25'" +
" viewBox='0 0 1000 1000' enable-background='new 0 0 1000 1000' xml:space='preserve'> " +
Expand All @@ -24,7 +25,7 @@ const anonymousIconEnd = " x='0px' y='0px' width='25' height='25'" +
'5C4838.3,620.7,4789.8,611,4663.6,545.5z M5163.4,74.8c128.6-106.7,123.7-264.5-12.1-405.2c-63.1-65.5-63.1-70.4-65.' +
'5-473.1l-2.4-407.6h-84.9h-84.9l-4.9,407.6c-2.4,402.8-2.4,410.1-63.1,473.1c-131,138.3-138.3,276.6-21.8,400.' +
"3C4908.7,159.7,5059.1,162.2,5163.4,74.8z'/></g></g> </svg>";
const fillGreen = "style='fill:green'";
const fillGreen = "style='fill: #2389d7'";

export default {
ANONYMOUS_ICON_ENABLED: anonymousIconStart + fillGreen + anonymousIconEnd,
Expand Down
1 change: 1 addition & 0 deletions webapp/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {handleEncryptionStatusChange, toggleEncryption} from './actions/actions'
import ChannelChangeListener, {initializeEncryptionStatusForChannel} from './hook/channelChangeListener';

export default class Plugin {
// noinspection BadExpressionStatementJS,BadExpressionStatementJS
initialize(registry, store) {
registry.registerReducer(reducer);
this.channelChangeListener = new ChannelChangeListener(store);
Expand Down