mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-03 06:07:19 +02:00
Convert CSS to Stylus
This commit is contained in:
parent
59c318e0e4
commit
4eeb6175d3
@ -7,7 +7,9 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/bun": "latest",
|
||||
"@types/node": "^20.12.7"
|
||||
"@types/node": "^20.12.7",
|
||||
"@types/stylus": "^0.48.42",
|
||||
"stylus": "^0.63.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": "^5.0.0"
|
||||
|
108
src/assets/css/button.styl
Normal file
108
src/assets/css/button.styl
Normal file
@ -0,0 +1,108 @@
|
||||
.bx-button {
|
||||
background-color: var(--bx-default-button-color);
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
color: #fff;
|
||||
font-family: var(--bx-title-font-semibold);
|
||||
font-size: 14px;
|
||||
border: none;
|
||||
font-weight: 400;
|
||||
height: var(--bx-button-height);
|
||||
border-radius: 4px;
|
||||
padding: 0 8px;
|
||||
text-transform: uppercase;
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
|
||||
&:focus {
|
||||
outline: none !important;
|
||||
}
|
||||
|
||||
&:hover, &.bx-focusable:focus {
|
||||
background-color: var(--bx-default-button-hover-color);
|
||||
}
|
||||
|
||||
&:disabled {
|
||||
cursor: default;
|
||||
background-color: var(--bx-default-button-disabled-color);
|
||||
}
|
||||
|
||||
&.bx-ghost {
|
||||
background-color: transparent;
|
||||
|
||||
&:hover, &.bx-focusable:focus {
|
||||
background-color: var(--bx-default-button-hover-color);
|
||||
}
|
||||
}
|
||||
|
||||
&.bx-primary {
|
||||
background-color: var(--bx-primary-button-color);
|
||||
|
||||
&:hover, &.bx-focusable:focus {
|
||||
background-color: var(--bx-primary-button-hover-color);
|
||||
}
|
||||
|
||||
&:disabled {
|
||||
background-color: var(--bx-primary-button-disabled-color);
|
||||
}
|
||||
}
|
||||
|
||||
&.bx-danger {
|
||||
background-color: var(--bx-danger-button-color);
|
||||
|
||||
&:hover, &.bx-focusable:focus {
|
||||
background-color: var(--bx-danger-button-hover-color);
|
||||
}
|
||||
|
||||
&:disabled {
|
||||
background-color: var(--bx-danger-button-disabled-color);
|
||||
}
|
||||
}
|
||||
|
||||
svg {
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: var(--bx-button-height);
|
||||
|
||||
&:not(:only-child) {
|
||||
margin-right: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
span {
|
||||
display: inline-block;
|
||||
height: calc(var(--bx-button-height) - 2px);
|
||||
line-height: var(--bx-button-height);
|
||||
vertical-align: middle;
|
||||
color: #fff;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&.bx-focusable {
|
||||
position: relative;
|
||||
|
||||
&::after {
|
||||
border: 2px solid transparent;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
&:focus::after {
|
||||
content: '';
|
||||
border-color: white;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
a.bx-button {
|
||||
display: inline-block;
|
||||
|
||||
&.bx-full-width {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
95
src/assets/css/dialog.styl
Normal file
95
src/assets/css/dialog.styl
Normal file
@ -0,0 +1,95 @@
|
||||
.bx-dialog-overlay {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: var(--bx-dialog-overlay-z-index);
|
||||
background: black;
|
||||
opacity: 50%;
|
||||
}
|
||||
|
||||
.bx-dialog {
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
max-height: 90vh;
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-right: -50%;
|
||||
transform: translate(-50%, -50%);
|
||||
min-width: 420px;
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
z-index: var(--bx-dialog-z-index);
|
||||
background: #1a1b1e;
|
||||
color: #fff;
|
||||
font-weight: 400;
|
||||
font-size: 16px;
|
||||
font-family: var(--bx-normal-font);
|
||||
box-shadow: 0 0 6px #000;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
|
||||
*:focus {
|
||||
outline: none !important;
|
||||
}
|
||||
|
||||
h2 {
|
||||
display: flex;
|
||||
margin-bottom: 12px;
|
||||
|
||||
b {
|
||||
flex: 1;
|
||||
color: #fff;
|
||||
display: block;
|
||||
font-family: var(--bx-title-font);
|
||||
font-size: 26px;
|
||||
font-weight: 400;
|
||||
line-height: var(--bx-button-height);
|
||||
}
|
||||
}
|
||||
|
||||
&.bx-binding-dialog {
|
||||
h2 {
|
||||
b {
|
||||
font-family: var(--bx-promptfont-font) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
> div {
|
||||
overflow: auto;
|
||||
padding: 2px 0;
|
||||
}
|
||||
|
||||
> button {
|
||||
padding: 8px 32px;
|
||||
margin: 10px auto 0;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
display: block;
|
||||
background-color: #2d3036;
|
||||
text-align: center;
|
||||
color: white;
|
||||
text-transform: uppercase;
|
||||
font-family: var(--bx-title-font);
|
||||
font-weight: 400;
|
||||
line-height: 18px;
|
||||
font-size: 14px;
|
||||
|
||||
&:hover {
|
||||
@media (hover: hover) {
|
||||
background-color: #515863;
|
||||
}
|
||||
}
|
||||
|
||||
&:focus {
|
||||
background-color: #515863;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media screen and (max-width: 450px) {
|
||||
.bx-dialog {
|
||||
min-width: 100%;
|
||||
}
|
||||
}
|
169
src/assets/css/global-settings.styl
Normal file
169
src/assets/css/global-settings.styl
Normal file
@ -0,0 +1,169 @@
|
||||
.bx-settings-reload-button-wrapper {
|
||||
z-index: var(--bx-reload-button-z-index);
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
text-align: center;
|
||||
background: #000000cf;
|
||||
padding: 10px;
|
||||
|
||||
button {
|
||||
max-width: 450px;
|
||||
margin: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.bx-settings-container {
|
||||
background-color: #151515;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
color: #fff;
|
||||
font-family: var(--bx-normal-font);
|
||||
}
|
||||
|
||||
@media (hover: hover) {
|
||||
.bx-settings-wrapper a.bx-settings-title:hover {
|
||||
color: #83f73a;
|
||||
}
|
||||
}
|
||||
|
||||
.bx-settings-wrapper {
|
||||
width: 450px;
|
||||
margin: auto;
|
||||
padding: 12px 6px;
|
||||
|
||||
@media screen and (max-width: 450px) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
*:focus {
|
||||
outline: none !important;
|
||||
}
|
||||
|
||||
.bx-settings-title-wrapper {
|
||||
display: flex;
|
||||
margin-bottom: 10px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
a.bx-settings-title {
|
||||
font-family: var(--bx-title-font);
|
||||
font-size: 1.4rem;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
display: block;
|
||||
color: #5dc21e;
|
||||
flex: 1;
|
||||
|
||||
&:focus {
|
||||
color: #83f73a;
|
||||
}
|
||||
}
|
||||
|
||||
.bx-button.bx-primary {
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
a.bx-settings-update {
|
||||
display: block;
|
||||
color: #ff834b;
|
||||
text-decoration: none;
|
||||
margin-bottom: 8px;
|
||||
text-align: center;
|
||||
background: #222;
|
||||
border-radius: 4px;
|
||||
padding: 4px;
|
||||
|
||||
&:hover {
|
||||
@media (hover: hover) {
|
||||
color: #ff9869;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
&:focus {
|
||||
color: #ff9869;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bx-settings-group-label {
|
||||
font-weight: bold;
|
||||
display: block;
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
|
||||
.bx-settings-row {
|
||||
display: flex;
|
||||
margin-bottom: 8px;
|
||||
padding: 2px 4px;
|
||||
|
||||
label {
|
||||
flex: 1;
|
||||
align-self: center;
|
||||
margin-bottom: 0;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
|
||||
&:focus-within {
|
||||
@media (hover: none) {
|
||||
background-color: #242424;
|
||||
}
|
||||
}
|
||||
|
||||
input {
|
||||
align-self: center;
|
||||
accent-color: var(--bx-primary-button-color);
|
||||
}
|
||||
|
||||
select:disabled {
|
||||
-webkit-appearance: none;
|
||||
background: transparent;
|
||||
text-align-last: right;
|
||||
border: none;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.bx-settings-group-label b, .bx-settings-row label b {
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
font-style: italic;
|
||||
font-weight: normal;
|
||||
color: #828282;
|
||||
}
|
||||
|
||||
.bx-settings-group-label b {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.bx-settings-app-version {
|
||||
margin-top: 10px;
|
||||
text-align: center;
|
||||
color: #747474;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.bx-donation-link {
|
||||
display: block;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
font-size: 14px;
|
||||
margin-top: 10px;
|
||||
color: #5dc21e;
|
||||
|
||||
&:hover {
|
||||
color: #6dd72b;
|
||||
}
|
||||
}
|
||||
|
||||
.bx-settings-custom-user-agent {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
23
src/assets/css/header.styl
Normal file
23
src/assets/css/header.styl
Normal file
@ -0,0 +1,23 @@
|
||||
.bx-header-remote-play-button {
|
||||
height: auto;
|
||||
margin-right: 8px !important;
|
||||
|
||||
svg {
|
||||
width: 24px;
|
||||
height: 46px;
|
||||
}
|
||||
}
|
||||
|
||||
.bx-header-settings-button {
|
||||
line-height: 30px;
|
||||
font-size: 14px;
|
||||
text-transform: uppercase;
|
||||
position: relative;
|
||||
|
||||
&[data-update-available]::before {
|
||||
content: '🌟' !important;
|
||||
line-height: var(--bx-button-height);
|
||||
display: inline-block;
|
||||
margin-left: 4px;
|
||||
}
|
||||
}
|
31
src/assets/css/loading-screen.styl
Normal file
31
src/assets/css/loading-screen.styl
Normal file
@ -0,0 +1,31 @@
|
||||
.bx-wait-time-box {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
background-color: #000000cc;
|
||||
color: #fff;
|
||||
z-index: var(--bx-wait-time-box-z-index);
|
||||
padding: 12px;
|
||||
border-radius: 0 0 0 8px;
|
||||
|
||||
label {
|
||||
display: block;
|
||||
text-transform: uppercase;
|
||||
text-align: right;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
span {
|
||||
display: block;
|
||||
font-family: var(--bx-monospaced-font);
|
||||
text-align: right;
|
||||
font-size: 16px;
|
||||
margin-bottom: 10px;
|
||||
|
||||
&:last-of-type {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
166
src/assets/css/mkb.styl
Normal file
166
src/assets/css/mkb.styl
Normal file
@ -0,0 +1,166 @@
|
||||
.bx-mkb-settings {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
padding-bottom: 10px;
|
||||
overflow: hidden;
|
||||
|
||||
select:disabled {
|
||||
-webkit-appearance: none;
|
||||
background: transparent;
|
||||
text-align-last: right;
|
||||
text-align: right;
|
||||
border: none;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.bx-mkb-pointer-lock-msg {
|
||||
display: flex;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translateX(-50%) translateY(-50%);
|
||||
margin: auto;
|
||||
background: #000000e5;
|
||||
z-index: var(--bx-mkb-pointer-lock-msg-z-index);
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
font-weight: 400;
|
||||
font-family: "Segoe UI", Arial, Helvetica, sans-serif;
|
||||
font-size: 1.3rem;
|
||||
padding: 12px;
|
||||
border-radius: 8px;
|
||||
align-items: center;
|
||||
box-shadow: 0 0 6px #000;
|
||||
|
||||
&:hover {
|
||||
background: #151515;
|
||||
}
|
||||
|
||||
button {
|
||||
margin-right: 12px;
|
||||
height: 60px;
|
||||
}
|
||||
|
||||
svg {
|
||||
width: 32px;
|
||||
}
|
||||
|
||||
div {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
|
||||
&:first-child {
|
||||
font-size: 22px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
font-size: 14px;
|
||||
font-style: italic;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bx-mkb-preset-tools {
|
||||
display: flex;
|
||||
margin-bottom: 12px;
|
||||
|
||||
select {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
button {
|
||||
margin-left: 6px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.bx-mkb-settings-rows {
|
||||
flex: 1;
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
.bx-mkb-key-row {
|
||||
display: flex;
|
||||
margin-bottom: 10px;
|
||||
align-items: center;
|
||||
|
||||
|
||||
label {
|
||||
margin-bottom: 0;
|
||||
font-family: var(--bx-promptfont-font);
|
||||
font-size: 26px;
|
||||
text-align: center;
|
||||
width: 26px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
}
|
||||
|
||||
button {
|
||||
flex: 1;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
margin: 0 0 0 10px;
|
||||
background: transparent;
|
||||
border: none;
|
||||
color: white;
|
||||
border-radius: 0;
|
||||
border-left: 1px solid #373737;
|
||||
|
||||
&:hover {
|
||||
background: transparent;
|
||||
cursor: default;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.bx-mkb-settings.bx-editing .bx-mkb-key-row button {
|
||||
background: #393939;
|
||||
border-radius: 4px;
|
||||
border: none;
|
||||
|
||||
&:hover {
|
||||
background: #333;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.bx-mkb-action-buttons {
|
||||
> div {
|
||||
text-align: right;
|
||||
display: none;
|
||||
}
|
||||
|
||||
button {
|
||||
margin-left: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.bx-mkb-settings:not(.bx-editing) .bx-mkb-action-buttons > div:first-child {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.bx-mkb-settings.bx-editing .bx-mkb-action-buttons > div:last-child {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.bx-mkb-note {
|
||||
display: block;
|
||||
margin: 16px 0 10px;
|
||||
font-size: 12px;
|
||||
|
||||
&:first-of-type {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
41
src/assets/css/number-stepper.styl
Normal file
41
src/assets/css/number-stepper.styl
Normal file
@ -0,0 +1,41 @@
|
||||
.bx-number-stepper {
|
||||
span {
|
||||
display: inline-block;
|
||||
width: 40px;
|
||||
font-family: var(--bx-monospaced-font);
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
button {
|
||||
border: none;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
margin: 0 4px;
|
||||
line-height: 24px;
|
||||
background-color: var(--bx-default-button-color);
|
||||
color: #fff;
|
||||
border-radius: 4px;
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
font-family: var(--bx-monospaced-font);
|
||||
color: #fff;
|
||||
|
||||
&:hover {
|
||||
@media (hover: hover) {
|
||||
background-color: var(--bx-default-button-hover-color);
|
||||
}
|
||||
}
|
||||
|
||||
&:active {
|
||||
background-color: var(--bx-default-button-hover-color);
|
||||
}
|
||||
|
||||
&:disabled + span {
|
||||
font-family: var(--bx-title-font);
|
||||
}
|
||||
}
|
||||
|
||||
input[type=range]:disabled, button:disabled {
|
||||
display: none;
|
||||
}
|
||||
}
|
123
src/assets/css/remote-play.styl
Normal file
123
src/assets/css/remote-play.styl
Normal file
@ -0,0 +1,123 @@
|
||||
.bx-remote-play-popup {
|
||||
width: 100%;
|
||||
max-width: 1920px;
|
||||
margin: auto;
|
||||
position: relative;
|
||||
height: 0.1px;
|
||||
overflow: visible;
|
||||
z-index: var(--bx-remote-play-popup-z-index);
|
||||
}
|
||||
|
||||
.bx-remote-play-container {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 0;
|
||||
background: #1a1b1e;
|
||||
border-radius: 10px;
|
||||
width: 420px;
|
||||
max-width: calc(100vw - 20px);
|
||||
margin: 0 0 0 auto;
|
||||
padding: 20px;
|
||||
box-shadow: #00000080 0px 0px 12px 0px;
|
||||
|
||||
@media (min-width:480px) and (min-height:calc(480px + 1px)) {
|
||||
right: calc(env(safe-area-inset-right, 0px) + 32px);
|
||||
}
|
||||
|
||||
@media (min-width:768px) and (min-height:calc(480px + 1px)) {
|
||||
right: calc(env(safe-area-inset-right, 0px) + 48px);
|
||||
}
|
||||
|
||||
@media (min-width:1920px) and (min-height:calc(480px + 1px)) {
|
||||
right: calc(env(safe-area-inset-right, 0px) + 80px);
|
||||
}
|
||||
|
||||
> .bx-button {
|
||||
display: table;
|
||||
margin: 0 0 0 auto;
|
||||
}
|
||||
}
|
||||
|
||||
.bx-remote-play-settings {
|
||||
margin-bottom: 12px;
|
||||
padding-bottom: 12px;
|
||||
border-bottom: 1px solid #2d2d2d;
|
||||
|
||||
> div {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
label {
|
||||
flex: 1;
|
||||
|
||||
p {
|
||||
margin: 4px 0 0;
|
||||
padding: 0;
|
||||
color: #888;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
span {
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
display: block;
|
||||
margin-bottom: 8px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.bx-remote-play-resolution {
|
||||
display: block;
|
||||
|
||||
input[type="radio"] {
|
||||
accent-color: var(--bx-primary-button-color);
|
||||
margin-right: 6px;
|
||||
|
||||
&:focus {
|
||||
accent-color: var(--bx-primary-button-hover-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bx-remote-play-device-wrapper {
|
||||
display: flex;
|
||||
margin-bottom: 12px;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
.bx-remote-play-device-info {
|
||||
flex: 1;
|
||||
padding: 4px 0;
|
||||
}
|
||||
|
||||
.bx-remote-play-device-name {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.bx-remote-play-console-type {
|
||||
font-size: 12px;
|
||||
background: #004c87;
|
||||
color: #fff;
|
||||
display: inline-block;
|
||||
border-radius: 14px;
|
||||
padding: 2px 10px;
|
||||
margin-left: 8px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.bx-remote-play-power-state {
|
||||
color: #888;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.bx-remote-play-connect-button {
|
||||
min-height: 100%;
|
||||
margin: 4px 0;
|
||||
}
|
106
src/assets/css/root.styl
Normal file
106
src/assets/css/root.styl
Normal file
@ -0,0 +1,106 @@
|
||||
:root {
|
||||
--bx-title-font: Bahnschrift, Arial, Helvetica, sans-serif;
|
||||
--bx-title-font-semibold: Bahnschrift Semibold, Arial, Helvetica, sans-serif;
|
||||
--bx-normal-font: "Segoe UI", Arial, Helvetica, sans-serif;
|
||||
--bx-monospaced-font: Consolas, "Courier New", Courier, monospace;
|
||||
--bx-promptfont-font: promptfont;
|
||||
|
||||
--bx-button-height: 36px;
|
||||
|
||||
--bx-default-button-color: #2d3036;
|
||||
--bx-default-button-hover-color: #515863;
|
||||
--bx-default-button-disabled-color: #8e8e8e;
|
||||
|
||||
--bx-primary-button-color: #008746;
|
||||
--bx-primary-button-hover-color: #04b358;
|
||||
--bx-primary-button-disabled-color: #448262;
|
||||
|
||||
--bx-danger-button-color: #c10404;
|
||||
--bx-danger-button-hover-color: #e61d1d;
|
||||
--bx-danger-button-disabled-color: #a26c6c;
|
||||
|
||||
--bx-toast-z-index: 9999;
|
||||
--bx-reload-button-z-index: 9200;
|
||||
--bx-dialog-z-index: 9101;
|
||||
--bx-dialog-overlay-z-index: 9100;
|
||||
--bx-remote-play-popup-z-index: 9090;
|
||||
--bx-stats-bar-z-index: 9001;
|
||||
--bx-stream-settings-z-index: 9000;
|
||||
--bx-mkb-pointer-lock-msg-z-index: 8999;
|
||||
--bx-screenshot-z-index: 8888;
|
||||
--bx-touch-controller-bar-z-index: 5555;
|
||||
--bx-wait-time-box-z-index: 100;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'promptfont';
|
||||
src: url('https://redphx.github.io/better-xcloud/fonts/promptfont.otf');
|
||||
}
|
||||
|
||||
/* Fix Stream menu buttons not hiding */
|
||||
div[class^=HUDButton-module__hiddenContainer] ~ div:not([class^=HUDButton-module__hiddenContainer]) {
|
||||
opacity: 0;
|
||||
pointer-events: none !important;
|
||||
position: absolute;
|
||||
top: -9999px;
|
||||
left: -9999px;
|
||||
}
|
||||
|
||||
/* Remove the "Cloud Gaming" text in header when the screen is too small */
|
||||
@media screen and (max-width: 600px) {
|
||||
header a[href="/play"] {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.bx-full-width {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.bx-full-height {
|
||||
height: 100% !important;
|
||||
}
|
||||
|
||||
.bx-no-scroll {
|
||||
overflow: hidden !important;
|
||||
}
|
||||
|
||||
.bx-gone {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.bx-offscreen {
|
||||
position: absolute !important;
|
||||
top: -9999px !important;
|
||||
left: -9999px !important;
|
||||
visibility: hidden !important;
|
||||
}
|
||||
|
||||
.bx-hidden {
|
||||
visibility: hidden !important;
|
||||
}
|
||||
|
||||
.bx-no-margin {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.bx-no-padding {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
/* Hide UI elements */
|
||||
#headerArea, #uhfSkipToMain, .uhf-footer {
|
||||
display: none;
|
||||
}
|
||||
|
||||
div[class*=NotFocusedDialog] {
|
||||
position: absolute !important;
|
||||
top: -9999px !important;
|
||||
left: -9999px !important;
|
||||
width: 0px !important;
|
||||
height: 0px !important;
|
||||
}
|
||||
|
||||
#game-stream video:not([src]) {
|
||||
visibility: hidden;
|
||||
}
|
46
src/assets/css/stream-actions.styl
Normal file
46
src/assets/css/stream-actions.styl
Normal file
@ -0,0 +1,46 @@
|
||||
.bx-screenshot-button {
|
||||
display: none;
|
||||
opacity: 0;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
box-sizing: border-box;
|
||||
width: 60px;
|
||||
height: 90px;
|
||||
padding: 16px 16px 46px 16px;
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
background-origin: content-box;
|
||||
filter: drop-shadow(0 0 2px #000000B0);
|
||||
transition: opacity 0.1s ease-in-out 0s, padding 0.1s ease-in 0s;
|
||||
z-index: var(--bx-screenshot-z-index);
|
||||
|
||||
/* Credit: https://phosphoricons.com */
|
||||
background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDMyIDMyIiBmaWxsPSIjZmZmIj48cGF0aCBkPSJNMjguMzA4IDUuMDM4aC00LjI2NWwtMi4wOTctMy4xNDVhMS4yMyAxLjIzIDAgMCAwLTEuMDIzLS41NDhoLTkuODQ2YTEuMjMgMS4yMyAwIDAgMC0xLjAyMy41NDhMNy45NTYgNS4wMzhIMy42OTJBMy43MSAzLjcxIDAgMCAwIDAgOC43MzF2MTcuMjMxYTMuNzEgMy43MSAwIDAgMCAzLjY5MiAzLjY5MmgyNC42MTVBMy43MSAzLjcxIDAgMCAwIDMyIDI1Ljk2MlY4LjczMWEzLjcxIDMuNzEgMCAwIDAtMy42OTItMy42OTJ6bS02Ljc2OSAxMS42OTJjMCAzLjAzOS0yLjUgNS41MzgtNS41MzggNS41MzhzLTUuNTM4LTIuNS01LjUzOC01LjUzOCAyLjUtNS41MzggNS41MzgtNS41MzggNS41MzggMi41IDUuNTM4IDUuNTM4eiIvPjwvc3ZnPgo=');
|
||||
|
||||
&[data-showing=true] {
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
&[data-capturing=true] {
|
||||
padding: 8px 8px 38px 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.bx-screenshot-canvas {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#bx-touch-controller-bar {
|
||||
display: none;
|
||||
opacity: 0;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 6vh;
|
||||
z-index: var(--bx-touch-controller-bar-z-index);
|
||||
|
||||
&[data-showing=true] {
|
||||
display: block;
|
||||
}
|
||||
}
|
133
src/assets/css/stream-settings.styl
Normal file
133
src/assets/css/stream-settings.styl
Normal file
@ -0,0 +1,133 @@
|
||||
.bx-quick-settings-bar {
|
||||
display: flex;
|
||||
position: fixed;
|
||||
z-index: var(--bx-stream-settings-z-index);
|
||||
opacity: 0.98;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
|
||||
.bx-quick-settings-tabs {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 420px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border-radius: 0 0 0 8px;
|
||||
box-shadow: 0px 0px 6px #000;
|
||||
overflow: clip;
|
||||
|
||||
svg {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
padding: 10px;
|
||||
box-sizing: content-box;
|
||||
background: #131313;
|
||||
cursor: pointer;
|
||||
border-left: 4px solid #1e1e1e;
|
||||
|
||||
&.bx-active {
|
||||
background: #222;
|
||||
border-color: #008746;
|
||||
}
|
||||
|
||||
&:not(.bx-active):hover {
|
||||
background: #2f2f2f;
|
||||
border-color: #484848;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.bx-quick-settings-tab-contents {
|
||||
flex-direction: column;
|
||||
position: fixed;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
padding: 14px 14px 0;
|
||||
width: 420px;
|
||||
background: #1a1b1e;
|
||||
color: #fff;
|
||||
font-weight: 400;
|
||||
font-size: 16px;
|
||||
font-family: var(--bx-title-font);
|
||||
text-align: center;
|
||||
box-shadow: 0px 0px 6px #000;
|
||||
overflow: overlay;
|
||||
|
||||
> div[data-group=mkb] {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
*:focus {
|
||||
outline: none !important;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin-bottom: 8px;
|
||||
display: flex;
|
||||
align-item: center;
|
||||
|
||||
span {
|
||||
display: inline-block;
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
text-align: left;
|
||||
flex: 1;
|
||||
height: var(--bx-button-height);
|
||||
line-height: calc(var(--bx-button-height) + 4px);
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
input[type="range"] {
|
||||
display: block;
|
||||
margin: 12px auto 2px;
|
||||
width: 180px;
|
||||
color: #959595 !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.bx-quick-settings-row {
|
||||
display: flex;
|
||||
border-bottom: 1px solid #40404080;
|
||||
margin-bottom: 16px;
|
||||
padding-bottom: 16px;
|
||||
|
||||
label {
|
||||
font-size: 16px;
|
||||
display: block;
|
||||
text-align: left;
|
||||
flex: 1;
|
||||
align-self: center;
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
input {
|
||||
accent-color: var(--bx-primary-button-color);
|
||||
}
|
||||
|
||||
select:disabled {
|
||||
-webkit-appearance: none;
|
||||
background: transparent;
|
||||
text-align-last: right;
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
|
||||
.bx-quick-settings-bar-note {
|
||||
display: block;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
font-weight: lighter;
|
||||
font-style: italic;
|
||||
padding-top: 16px;
|
||||
}
|
145
src/assets/css/stream-stats.styl
Normal file
145
src/assets/css/stream-stats.styl
Normal file
@ -0,0 +1,145 @@
|
||||
/* STATS BADGE */
|
||||
.bx-badges {
|
||||
position: absolute;
|
||||
margin-left: 0px;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
|
||||
.bx-badge {
|
||||
border: none;
|
||||
display: inline-block;
|
||||
line-height: 24px;
|
||||
color: #fff;
|
||||
font-family: var(--bx-title-font-semibold);
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
margin: 0 8px 8px 0;
|
||||
box-shadow: 0px 0px 6px #000;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.bx-badge-name {
|
||||
background-color: #2d3036;
|
||||
display: inline-block;
|
||||
padding: 2px 8px;
|
||||
border-radius: 4px 0 0 4px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.bx-badge-value {
|
||||
background-color: grey;
|
||||
display: inline-block;
|
||||
padding: 2px 8px;
|
||||
border-radius: 0 4px 4px 0;
|
||||
}
|
||||
|
||||
.bx-badge-battery[data-charging=true] span:first-of-type::after {
|
||||
content: ' ⚡️';
|
||||
}
|
||||
|
||||
/* STATS BAR */
|
||||
.bx-stats-bar {
|
||||
display: block;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
background-color: #000;
|
||||
color: #fff;
|
||||
font-family: var(--bx-monospaced-font);
|
||||
font-size: 0.9rem;
|
||||
padding-left: 8px;
|
||||
z-index: var(--bx-stats-bar-z-index);
|
||||
text-wrap: nowrap;
|
||||
|
||||
&[data-stats*="[fps]"] > .bx-stat-fps,
|
||||
&[data-stats*="[ping]"] > .bx-stat-ping,
|
||||
&[data-stats*="[btr]"] > .bx-stat-btr,
|
||||
&[data-stats*="[dt]"] > .bx-stat-dt,
|
||||
&[data-stats*="[pl]"] > .bx-stat-pl,
|
||||
&[data-stats*="[fl]"] > .bx-stat-fl {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
&[data-stats$="[fps]"] > .bx-stat-fps,
|
||||
&[data-stats$="[ping]"] > .bx-stat-ping,
|
||||
&[data-stats$="[btr]"] > .bx-stat-btr,
|
||||
&[data-stats$="[dt]"] > .bx-stat-dt,
|
||||
&[data-stats$="[pl]"] > .bx-stat-pl,
|
||||
&[data-stats$="[fl]"] > .bx-stat-fl {
|
||||
margin-right: 0;
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
&::before {
|
||||
display: none;
|
||||
content: '👀';
|
||||
vertical-align: middle;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
&[data-display=glancing]::before {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
&[data-position=top-left] {
|
||||
left: 0;
|
||||
border-radius: 0 0 4px 0;
|
||||
}
|
||||
|
||||
&[data-position=top-right] {
|
||||
right: 0;
|
||||
border-radius: 0 0 0 4px;
|
||||
}
|
||||
|
||||
&[data-position=top-center] {
|
||||
transform: translate(-50%, 0);
|
||||
left: 50%;
|
||||
border-radius: 0 0 4px 4px;
|
||||
}
|
||||
|
||||
&[data-transparent=true] {
|
||||
background: none;
|
||||
filter: drop-shadow(1px 0 0 #000000f0) drop-shadow(-1px 0 0 #000000f0) drop-shadow(0 1px 0 #000000f0) drop-shadow(0 -1px 0 #000000f0);
|
||||
}
|
||||
|
||||
> div {
|
||||
display: none;
|
||||
margin-right: 8px;
|
||||
border-right: 1px solid #fff;
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
label {
|
||||
margin: 0 8px 0 0;
|
||||
font-family: var(--bx-title-font);
|
||||
font-size: inherit;
|
||||
font-weight: bold;
|
||||
vertical-align: middle;
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
span {
|
||||
min-width: 60px;
|
||||
display: inline-block;
|
||||
text-align: right;
|
||||
vertical-align: middle;
|
||||
|
||||
&[data-grade=good] {
|
||||
color: #6bffff;
|
||||
}
|
||||
|
||||
&[data-grade=ok] {
|
||||
color: #fff16b;
|
||||
}
|
||||
|
||||
&[data-grade=bad] {
|
||||
color: #ff5f5f;
|
||||
}
|
||||
|
||||
&:first-of-type {
|
||||
min-width: 22px;
|
||||
}
|
||||
}
|
||||
}
|
9
src/assets/css/stream.styl
Normal file
9
src/assets/css/stream.styl
Normal file
@ -0,0 +1,9 @@
|
||||
div[class*=StreamMenu-module__menuContainer] > div[class*=Menu-module] {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.bx-stream-menu-button-on {
|
||||
fill: #000 !important;
|
||||
background-color: #2d2d2d !important;
|
||||
color: #000 !important;
|
||||
}
|
16
src/assets/css/styles.styl
Normal file
16
src/assets/css/styles.styl
Normal file
@ -0,0 +1,16 @@
|
||||
@import 'root.styl';
|
||||
|
||||
@import 'button.styl';
|
||||
@import 'header.styl';
|
||||
@import 'global-settings.styl';
|
||||
@import 'dialog.styl';
|
||||
@import 'toast.styl';
|
||||
@import 'loading-screen.styl';
|
||||
@import 'remote-play.styl';
|
||||
|
||||
@import 'stream.styl';
|
||||
@import 'number-stepper.styl';
|
||||
@import 'stream-actions.styl';
|
||||
@import 'stream-stats.styl';
|
||||
@import 'stream-settings.styl';
|
||||
@import 'mkb.styl';
|
45
src/assets/css/toast.styl
Normal file
45
src/assets/css/toast.styl
Normal file
@ -0,0 +1,45 @@
|
||||
.bx-toast {
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
top: 24px;
|
||||
transform: translate(-50%, 0);
|
||||
background: #000000;
|
||||
border-radius: 16px;
|
||||
color: white;
|
||||
z-index: var(--bx-toast-z-index);
|
||||
font-family: var(--bx-normal-font);
|
||||
border: 2px solid #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
opacity: 0;
|
||||
overflow: clip;
|
||||
transition: opacity 0.2s ease-in;
|
||||
|
||||
&.bx-show {
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
&.bx-hide {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.bx-toast-msg {
|
||||
font-size: 14px;
|
||||
display: inline-block;
|
||||
padding: 12px 16px;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.bx-toast-status {
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
text-transform: uppercase;
|
||||
display: inline-block;
|
||||
background: #515863;
|
||||
padding: 12px 16px;
|
||||
color: #fff;
|
||||
white-space: pre;
|
||||
}
|
13
src/macros/build.ts
Normal file
13
src/macros/build.ts
Normal file
@ -0,0 +1,13 @@
|
||||
import stylus from 'stylus';
|
||||
|
||||
// @ts-ignore
|
||||
import cssStr from "../assets/css/styles.styl" with { type: "text" };
|
||||
|
||||
const generatedCss = await (stylus(cssStr, {})
|
||||
.set('filename', 'styles.css')
|
||||
.include('src/assets/css/'))
|
||||
.render();
|
||||
|
||||
export const renderStylus = () => {
|
||||
return generatedCss;
|
||||
};
|
1272
src/utils/css.ts
1272
src/utils/css.ts
File diff suppressed because it is too large
Load Diff
@ -68,8 +68,6 @@ export enum Icon {
|
||||
REMOTE_PLAY = '<g transform="matrix(.492308 0 0 .581818 -14.7692 -11.6364)"><clipPath id="A"><path d="M30 20h65v55H30z"/></clipPath><g clip-path="url(#A)"><g transform="matrix(.395211 0 0 .334409 11.913 7.01124)"><g transform="matrix(.555556 0 0 .555556 57.8889 -20.2417)" fill="none" stroke="#fff" stroke-width="13.88"><path d="M200 140.564c-42.045-33.285-101.955-33.285-144 0M168 165c-23.783-17.3-56.217-17.3-80 0"/></g><g transform="matrix(-.555556 0 0 -.555556 200.111 262.393)"><g transform="matrix(1 0 0 1 0 11.5642)"><path d="M200 129c-17.342-13.728-37.723-21.795-58.636-24.198C111.574 101.378 80.703 109.444 56 129" fill="none" stroke="#fff" stroke-width="13.88"/></g><path d="M168 165c-23.783-17.3-56.217-17.3-80 0" fill="none" stroke="#fff" stroke-width="13.88"/></g><g transform="matrix(.75 0 0 .75 32 32)"><path d="M24 72h208v93.881H24z" fill="none" stroke="#fff" stroke-linejoin="miter" stroke-width="9.485"/><circle cx="188" cy="128" r="12" stroke-width="10" transform="matrix(.708333 0 0 .708333 71.8333 12.8333)"/><path d="M24.358 103.5h110" fill="none" stroke="#fff" stroke-linecap="butt" stroke-width="10.282"/></g></g></g></g>',
|
||||
|
||||
HAND_TAP = '<path d="M6.537 8.906c0-4.216 3.469-7.685 7.685-7.685s7.685 3.469 7.685 7.685M7.719 30.778l-4.333-7.389C3.133 22.944 3 22.44 3 21.928a2.97 2.97 0 0 1 2.956-2.956 2.96 2.96 0 0 1 2.55 1.461l2.761 4.433V8.906a2.97 2.97 0 0 1 2.956-2.956 2.97 2.97 0 0 1 2.956 2.956v8.276a2.97 2.97 0 0 1 2.956-2.956 2.97 2.97 0 0 1 2.956 2.956v2.365a2.97 2.97 0 0 1 2.956-2.956A2.97 2.97 0 0 1 29 19.547v5.32c0 3.547-1.182 5.911-1.182 5.911"/>',
|
||||
|
||||
SCREENSHOT_B64 = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDMyIDMyIiBmaWxsPSIjZmZmIj48cGF0aCBkPSJNMjguMzA4IDUuMDM4aC00LjI2NWwtMi4wOTctMy4xNDVhMS4yMyAxLjIzIDAgMCAwLTEuMDIzLS41NDhoLTkuODQ2YTEuMjMgMS4yMyAwIDAgMC0xLjAyMy41NDhMNy45NTYgNS4wMzhIMy42OTJBMy43MSAzLjcxIDAgMCAwIDAgOC43MzF2MTcuMjMxYTMuNzEgMy43MSAwIDAgMCAzLjY5MiAzLjY5MmgyNC42MTVBMy43MSAzLjcxIDAgMCAwIDMyIDI1Ljk2MlY4LjczMWEzLjcxIDMuNzEgMCAwIDAtMy42OTItMy42OTJ6bS02Ljc2OSAxMS42OTJjMCAzLjAzOS0yLjUgNS41MzgtNS41MzggNS41MzhzLTUuNTM4LTIuNS01LjUzOC01LjUzOCAyLjUtNS41MzggNS41MzgtNS41MzggNS41MzggMi41IDUuNTM4IDUuNTM4eiIvPjwvc3ZnPgo=',
|
||||
};
|
||||
|
||||
export const createSvgIcon = (icon: string, strokeWidth=2) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user