mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-11 18:19:58 +00:00
Improve macOS styles in popup
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<link rel="stylesheet" href="index.css">
|
<link rel="stylesheet" href="styles/index.css">
|
||||||
<script src="bundle.js" defer></script>
|
<script src="bundle.js" defer></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -5,6 +5,18 @@ import ReactDOM from "react-dom";
|
|||||||
|
|
||||||
const _ = browser.i18n.getMessage;
|
const _ = browser.i18n.getMessage;
|
||||||
|
|
||||||
|
// macOS styles
|
||||||
|
browser.runtime.getPlatformInfo()
|
||||||
|
.then(platformInfo => {
|
||||||
|
if (platformInfo.os === "mac") {
|
||||||
|
const link = document.createElement("link");
|
||||||
|
link.rel = "stylesheet";
|
||||||
|
link.href = "styles/mac.css";
|
||||||
|
document.head.appendChild(link);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
let winWidth = 350;
|
let winWidth = 350;
|
||||||
let winHeight = 200;
|
let winHeight = 200;
|
||||||
|
|
||||||
@@ -97,11 +109,12 @@ class App extends Component {
|
|||||||
to:
|
to:
|
||||||
</div>
|
</div>
|
||||||
<ul className="receivers">
|
<ul className="receivers">
|
||||||
{ this.state.receivers.map(receiver => {
|
{ this.state.receivers.map((receiver, i) => {
|
||||||
return (
|
return (
|
||||||
<Receiver receiver={receiver}
|
<Receiver receiver={receiver}
|
||||||
onCast={this.onCast.bind(this)}
|
onCast={this.onCast.bind(this)}
|
||||||
isLoading={this.state.isLoading} />
|
isLoading={this.state.isLoading}
|
||||||
|
key={i}/>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
21
ext/src/popup/styles/mac.css
Executable file
21
ext/src/popup/styles/mac.css
Executable file
@@ -0,0 +1,21 @@
|
|||||||
|
body {
|
||||||
|
background: rgb(236, 236, 236);
|
||||||
|
font: menu;
|
||||||
|
}
|
||||||
|
|
||||||
|
button,
|
||||||
|
select {
|
||||||
|
font: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:not([disabled]):hover:active {
|
||||||
|
color: -moz-mac-buttonactivetext;
|
||||||
|
}
|
||||||
|
|
||||||
|
.receiver-address {
|
||||||
|
font: message-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.receiver-connect {
|
||||||
|
height: 22px;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user