Split mx_AppPermissionWarning
on _AppsDrawer.pcss
into two classes (#10824)
* Separate mx_AppWarning and mx_AppPermission * Remove mx_AppPermission_row for a type selector * Nest: mx_AppPermission * Run prettier * Create a CSS file for AppPermission
This commit is contained in:
parent
ae692f712a
commit
2eedfbf566
5 changed files with 91 additions and 68 deletions
|
@ -20,6 +20,7 @@
|
||||||
@import "./components/views/dialogs/polls/_PollDetailHeader.pcss";
|
@import "./components/views/dialogs/polls/_PollDetailHeader.pcss";
|
||||||
@import "./components/views/dialogs/polls/_PollListItem.pcss";
|
@import "./components/views/dialogs/polls/_PollListItem.pcss";
|
||||||
@import "./components/views/dialogs/polls/_PollListItemEnded.pcss";
|
@import "./components/views/dialogs/polls/_PollListItemEnded.pcss";
|
||||||
|
@import "./components/views/elements/_AppPermission.pcss";
|
||||||
@import "./components/views/elements/_FilterDropdown.pcss";
|
@import "./components/views/elements/_FilterDropdown.pcss";
|
||||||
@import "./components/views/elements/_FilterTabGroup.pcss";
|
@import "./components/views/elements/_FilterTabGroup.pcss";
|
||||||
@import "./components/views/elements/_LearnMore.pcss";
|
@import "./components/views/elements/_LearnMore.pcss";
|
||||||
|
|
77
res/css/components/views/elements/_AppPermission.pcss
Normal file
77
res/css/components/views/elements/_AppPermission.pcss
Normal file
|
@ -0,0 +1,77 @@
|
||||||
|
/*
|
||||||
|
Copyright 2015, 2016 OpenMarket Ltd
|
||||||
|
Copyright 2019 - 2023 The Matrix.org Foundation C.I.C.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
.mx_AppPermission {
|
||||||
|
> div {
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h4 {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mx_AppPermission_smallText {
|
||||||
|
font-size: $font-12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mx_AppPermission_bolder {
|
||||||
|
font-weight: var(--font-semi-bold);
|
||||||
|
}
|
||||||
|
|
||||||
|
.mx_AppPermission_helpIcon {
|
||||||
|
margin-top: 1px;
|
||||||
|
margin-right: 2px;
|
||||||
|
width: 10px;
|
||||||
|
height: 10px;
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
display: inline-block;
|
||||||
|
background-color: $accent;
|
||||||
|
mask-repeat: no-repeat;
|
||||||
|
mask-size: 12px;
|
||||||
|
width: 12px;
|
||||||
|
height: 12px;
|
||||||
|
mask-position: center;
|
||||||
|
content: "";
|
||||||
|
vertical-align: middle;
|
||||||
|
mask-image: url("$(res)/img/feather-customised/help-circle.svg");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.mx_AppPermission_tooltip {
|
||||||
|
box-shadow: none;
|
||||||
|
background-color: $tooltip-timeline-bg-color;
|
||||||
|
color: $tooltip-timeline-fg-color;
|
||||||
|
border: none;
|
||||||
|
border-radius: 3px;
|
||||||
|
padding: 6px 8px;
|
||||||
|
|
||||||
|
&.mx_AppPermission_tooltip--dark {
|
||||||
|
.mx_Tooltip_chevron::after {
|
||||||
|
border-right-color: $tooltip-timeline-bg-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ul {
|
||||||
|
list-style-position: inside;
|
||||||
|
padding-left: 2px;
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -318,7 +318,8 @@ limitations under the License.
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_AppPermissionWarning {
|
.mx_AppWarning,
|
||||||
|
.mx_AppPermission {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
@ -333,60 +334,6 @@ limitations under the License.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_AppPermissionWarning_row {
|
|
||||||
margin-bottom: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mx_AppPermissionWarning_smallText {
|
|
||||||
font-size: $font-12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mx_AppPermissionWarning_bolder {
|
|
||||||
font-weight: var(--font-semi-bold);
|
|
||||||
}
|
|
||||||
|
|
||||||
.mx_AppPermissionWarning_helpIcon {
|
|
||||||
margin-top: 1px;
|
|
||||||
margin-right: 2px;
|
|
||||||
width: 10px;
|
|
||||||
height: 10px;
|
|
||||||
display: inline-block;
|
|
||||||
|
|
||||||
&::before {
|
|
||||||
display: inline-block;
|
|
||||||
background-color: $accent;
|
|
||||||
mask-repeat: no-repeat;
|
|
||||||
mask-size: 12px;
|
|
||||||
width: 12px;
|
|
||||||
height: 12px;
|
|
||||||
mask-position: center;
|
|
||||||
content: "";
|
|
||||||
vertical-align: middle;
|
|
||||||
mask-image: url("$(res)/img/feather-customised/help-circle.svg");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.mx_AppPermissionWarning_tooltip {
|
|
||||||
box-shadow: none;
|
|
||||||
background-color: $tooltip-timeline-bg-color;
|
|
||||||
color: $tooltip-timeline-fg-color;
|
|
||||||
border: none;
|
|
||||||
border-radius: 3px;
|
|
||||||
padding: 6px 8px;
|
|
||||||
|
|
||||||
&.mx_AppPermissionWarning_tooltip--dark {
|
|
||||||
.mx_Tooltip_chevron::after {
|
|
||||||
border-right-color: $tooltip-timeline-bg-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ul {
|
|
||||||
list-style-position: inside;
|
|
||||||
padding-left: 2px;
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.mx_AppTile_loading {
|
.mx_AppTile_loading {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
|
@ -115,9 +115,9 @@ export default class AppPermission extends React.Component<IProps, IState> {
|
||||||
const warningTooltip = (
|
const warningTooltip = (
|
||||||
<TextWithTooltip
|
<TextWithTooltip
|
||||||
tooltip={warningTooltipText}
|
tooltip={warningTooltipText}
|
||||||
tooltipClass="mx_AppPermissionWarning_tooltip mx_AppPermissionWarning_tooltip--dark"
|
tooltipClass="mx_AppPermission_tooltip mx_AppPermission_tooltip--dark"
|
||||||
>
|
>
|
||||||
<span className="mx_AppPermissionWarning_helpIcon" />
|
<span className="mx_AppPermission_helpIcon" />
|
||||||
</TextWithTooltip>
|
</TextWithTooltip>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -137,20 +137,18 @@ export default class AppPermission extends React.Component<IProps, IState> {
|
||||||
const encryptionWarning = this.props.isRoomEncrypted ? _t("Widgets do not use message encryption.") : null;
|
const encryptionWarning = this.props.isRoomEncrypted ? _t("Widgets do not use message encryption.") : null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mx_AppPermissionWarning">
|
<div className="mx_AppPermission">
|
||||||
<div className="mx_AppPermissionWarning_row mx_AppPermissionWarning_bolder mx_AppPermissionWarning_smallText">
|
<div className="mx_AppPermission_bolder mx_AppPermission_smallText">{_t("Widget added by")}</div>
|
||||||
{_t("Widget added by")}
|
<div>
|
||||||
</div>
|
|
||||||
<div className="mx_AppPermissionWarning_row">
|
|
||||||
{avatar}
|
{avatar}
|
||||||
<h4 className="mx_AppPermissionWarning_bolder">{displayName}</h4>
|
<h4 className="mx_AppPermission_bolder">{displayName}</h4>
|
||||||
<div className="mx_AppPermissionWarning_smallText">{userId}</div>
|
<div className="mx_AppPermission_smallText">{userId}</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="mx_AppPermissionWarning_row mx_AppPermissionWarning_smallText">{warning}</div>
|
<div className="mx_AppPermission_smallText">{warning}</div>
|
||||||
<div className="mx_AppPermissionWarning_row mx_AppPermissionWarning_smallText">
|
<div className="mx_AppPermission_smallText">
|
||||||
{_t("This widget may use cookies.")} {encryptionWarning}
|
{_t("This widget may use cookies.")} {encryptionWarning}
|
||||||
</div>
|
</div>
|
||||||
<div className="mx_AppPermissionWarning_row">
|
<div>
|
||||||
<AccessibleButton kind="primary_sm" onClick={this.props.onPermissionGranted}>
|
<AccessibleButton kind="primary_sm" onClick={this.props.onPermissionGranted}>
|
||||||
{_t("Continue")}
|
{_t("Continue")}
|
||||||
</AccessibleButton>
|
</AccessibleButton>
|
||||||
|
|
|
@ -22,7 +22,7 @@ interface IProps {
|
||||||
|
|
||||||
const AppWarning: React.FC<IProps> = (props) => {
|
const AppWarning: React.FC<IProps> = (props) => {
|
||||||
return (
|
return (
|
||||||
<div className="mx_AppPermissionWarning">
|
<div className="mx_AppWarning">
|
||||||
<div>
|
<div>
|
||||||
<img src={require("../../../../res/img/warning.svg").default} alt="" />
|
<img src={require("../../../../res/img/warning.svg").default} alt="" />
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue