Commit 8a4911ba authored by Joram Wilander's avatar Joram Wilander Committed by Derrick Anderson
Browse files

MM-10550 Updates to system notice (#1209)

* Updates to system notice

* Updating system notice

* Update snapshot
parent 2a8cbc68
......@@ -21,7 +21,7 @@ export default [
title: (
<FormattedHTMLMessage
id='system_notice.title'
defaultMessage='<strong>System Message</strong> from Mattermost'
defaultMessage='<strong>Notice</strong> from Mattermost'
/>
),
icon: mattermostIcon,
......
......@@ -93,6 +93,19 @@ export default class SystemNotice extends React.PureComponent {
return null;
}
let visibleMessage;
if (notice.adminOnly) {
visibleMessage = (
<div className='system-notice__info'>
<i className='fa fa-eye'/>
<FormattedMessage
id='system_notice.adminVisible'
defaultMessage='Only visible to System Admins'
/>
</div>
);
}
return (
<div
className='system-notice bg--white shadow--2'
......@@ -108,6 +121,7 @@ export default class SystemNotice extends React.PureComponent {
<div className='system-notice__body'>
{notice.body}
</div>
{visibleMessage}
<div className='system-notice__footer'>
<button
id='systemnotice_remindme'
......
......@@ -2715,7 +2715,8 @@
"system_notice.body.api3": "If you’ve created or installed integrations in the last two years, find out how <a href=\"https://about.mattermost.com/default-apiv3-deprecation-guide\" target=\"_blank\">upcoming changes</a> may affect them.",
"system_notice.dont_show": "Don't show again",
"system_notice.remind_me": "Remind me later",
"system_notice.title": "<strong>System Message</strong><br>from Mattermost",
"system_notice.title": "<strong>Notice</strong><br>from Mattermost",
"system_notice.adminVisible": "Only visible to System Admins",
"system_users_list.count": "{count, number} {count, plural, one {user} other {users}}",
"system_users_list.countPage": "{startCount, number} - {endCount, number} {count, plural, one {user} other {users}} of {total, number} total",
"system_users_list.countSearch": "{count, number} {count, plural, one {user} other {users}} of {total, number} total",
......
......@@ -38,10 +38,20 @@
text-overflow: ellipsis;
}
.system-notice__info {
@include opacity(.5);
font-size: 12px;
margin-bottom: 12px;
.fa {
margin-right: 4px;
}
}
.system-notice__body {
@include opacity(.7);
line-height: 16px;
padding: 18px 0 20px;
padding: 18px 0 16px;
}
.system-notice__footer {
......
......@@ -23,6 +23,18 @@ exports[`components/SystemNotice should match snapshot for admin, admin notice 1
>
some body
</div>
<div
className="system-notice__info"
>
<i
className="fa fa-eye"
/>
<FormattedMessage
defaultMessage="Only visible to System Admins"
id="system_notice.adminVisible"
values={Object {}}
/>
</div>
<div
className="system-notice__footer"
>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment