mirror of
https://github.com/oxen-io/session-desktop.git
synced 2023-12-14 02:12:57 +01:00
Timer notifications complete
This commit is contained in:
parent
f2ce52a3d5
commit
43772b8ee2
|
@ -33,6 +33,10 @@
|
||||||
|
|
||||||
.module-contact-name.compact {
|
.module-contact-name.compact {
|
||||||
display: block;
|
display: block;
|
||||||
|
|
||||||
|
span::after {
|
||||||
|
content: '\00a0';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Module: Message
|
// Module: Message
|
||||||
|
@ -1242,7 +1246,7 @@
|
||||||
width: 90%;
|
width: 90%;
|
||||||
max-width: 700px;
|
max-width: 700px;
|
||||||
margin: 10px auto;
|
margin: 10px auto;
|
||||||
padding: 5px 20px;
|
padding: 5px 0px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
}
|
}
|
||||||
|
@ -1380,7 +1384,7 @@
|
||||||
|
|
||||||
.module-timer-notification__message {
|
.module-timer-notification__message {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 20px auto 20px;
|
grid-template-columns: 40px auto 40px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
letter-spacing: 0.3px;
|
letter-spacing: 0.3px;
|
||||||
|
@ -1389,7 +1393,6 @@
|
||||||
align-self: center;
|
align-self: center;
|
||||||
justify-self: center;
|
justify-self: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,8 @@ export class ContactName extends React.Component<Props> {
|
||||||
const prefix = module ? module : 'module-contact-name';
|
const prefix = module ? module : 'module-contact-name';
|
||||||
|
|
||||||
const title = name ? name : phoneNumber;
|
const title = name ? name : phoneNumber;
|
||||||
const shouldShowProfile = Boolean(profileName && !name);
|
const shouldShowProfile = Boolean(profileName && !profileName);
|
||||||
|
|
||||||
const styles = (boldProfileName
|
const styles = (boldProfileName
|
||||||
? {
|
? {
|
||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
|
|
|
@ -21,7 +21,6 @@ export class TimerNotification extends React.Component<Props> {
|
||||||
public renderContents() {
|
public renderContents() {
|
||||||
const {
|
const {
|
||||||
i18n,
|
i18n,
|
||||||
name,
|
|
||||||
phoneNumber,
|
phoneNumber,
|
||||||
profileName,
|
profileName,
|
||||||
timespan,
|
timespan,
|
||||||
|
@ -32,23 +31,14 @@ export class TimerNotification extends React.Component<Props> {
|
||||||
? 'disabledDisappearingMessages'
|
? 'disabledDisappearingMessages'
|
||||||
: 'theyChangedTheTimer';
|
: 'theyChangedTheTimer';
|
||||||
|
|
||||||
|
const recipient = profileName ?? phoneNumber;
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'fromOther':
|
case 'fromOther':
|
||||||
return (
|
return (
|
||||||
<Intl
|
<>
|
||||||
i18n={i18n}
|
{i18n(changeKey, [recipient, timespan])}
|
||||||
id={changeKey}
|
</>
|
||||||
components={[
|
|
||||||
<ContactName
|
|
||||||
i18n={i18n}
|
|
||||||
key="external-1"
|
|
||||||
phoneNumber={phoneNumber}
|
|
||||||
profileName={profileName}
|
|
||||||
name={name}
|
|
||||||
/>,
|
|
||||||
timespan,
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
);
|
);
|
||||||
case 'fromMe':
|
case 'fromMe':
|
||||||
return disabled
|
return disabled
|
||||||
|
|
|
@ -521,7 +521,6 @@ export class SessionConversation extends React.Component<any, State> {
|
||||||
console.log(`[header] HeaderProps:`, headerProps);
|
console.log(`[header] HeaderProps:`, headerProps);
|
||||||
console.log(`[header] Conv: `, conversation);
|
console.log(`[header] Conv: `, conversation);
|
||||||
|
|
||||||
|
|
||||||
return headerProps;
|
return headerProps;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue