mirror of
https://github.com/mue/mue.git
synced 2026-07-16 05:23:49 +02:00
fix(chore): unsquash the commits
This commit is contained in:
@@ -25,7 +25,7 @@ function ShareModal({ modalClose, data }) {
|
||||
return (
|
||||
<div className="smallModal">
|
||||
<div className="shareHeader">
|
||||
<p className="title">{variables.getMessage('widgets.quote.share')}</p>
|
||||
<span className="title">{variables.getMessage('widgets.quote.share')}</span>
|
||||
<Tooltip title={variables.getMessage('modals.welcome.buttons.close')}>
|
||||
<div className="close" onClick={modalClose}>
|
||||
<MdClose />
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
@include themed() {
|
||||
background: t($modal-sidebar);
|
||||
border-radius: t($borderRadius);
|
||||
box-shadow: 0 0 0 4px t($modal-sidebarActive);
|
||||
box-shadow: 0 0 0 1px t($modal-sidebarActive);
|
||||
padding: 11px;
|
||||
flex: 1;
|
||||
color: t($color);
|
||||
@@ -63,7 +63,7 @@
|
||||
@include themed() {
|
||||
background: t($modal-sidebar);
|
||||
border-radius: t($borderRadius);
|
||||
box-shadow: 0 0 0 4px t($modal-sidebarActive);
|
||||
box-shadow: 0 0 0 1px t($modal-sidebarActive);
|
||||
padding: 11px;
|
||||
flex: 1;
|
||||
color: t($color);
|
||||
|
||||
@@ -80,6 +80,14 @@
|
||||
.infoTooltip {
|
||||
position: relative;
|
||||
display: grid;
|
||||
svg {
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
@include themed() {
|
||||
color: t($color);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.infoTooltipTitle {
|
||||
|
||||
@@ -126,16 +126,18 @@ export default class Item extends PureComponent {
|
||||
{this.props.data.data.quotes ? (
|
||||
<>
|
||||
<table>
|
||||
<tr>
|
||||
<th>{variables.getMessage('modals.main.settings.sections.quote.title')}</th>
|
||||
<th>{variables.getMessage('modals.main.settings.sections.quote.author')}</th>
|
||||
</tr>
|
||||
{this.props.data.data.quotes.slice(0, this.state.count).map((quote, index) => (
|
||||
<tr key={index}>
|
||||
<td>{quote.quote}</td>
|
||||
<td>{quote.author}</td>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{variables.getMessage('modals.main.settings.sections.quote.title')}</th>
|
||||
<th>{variables.getMessage('modals.main.settings.sections.quote.author')}</th>
|
||||
</tr>
|
||||
))}
|
||||
{this.props.data.data.quotes.slice(0, this.state.count).map((quote, index) => (
|
||||
<tr key={index}>
|
||||
<td>{quote.quote}</td>
|
||||
<td>{quote.author}</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
<div className="showMoreItems">
|
||||
<span className="link" onClick={() => this.incrementCount('quotes')}>
|
||||
@@ -157,16 +159,18 @@ export default class Item extends PureComponent {
|
||||
{this.props.data.data.settings ? (
|
||||
<>
|
||||
<table>
|
||||
<tr>
|
||||
<th>{variables.getMessage('modals.main.marketplace.product.setting')}</th>
|
||||
<th>{variables.getMessage('modals.main.marketplace.product.value')}</th>
|
||||
</tr>
|
||||
{Object.entries(this.props.data.data.settings).slice(0, this.state.count).map(([key, value]) => (
|
||||
<tr key={key}>
|
||||
<td>{key}</td>
|
||||
<td>{value}</td>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{variables.getMessage('modals.main.marketplace.product.setting')}</th>
|
||||
<th>{variables.getMessage('modals.main.marketplace.product.value')}</th>
|
||||
</tr>
|
||||
))}
|
||||
{Object.entries(this.props.data.data.settings).slice(0, this.state.count).map(([key, value]) => (
|
||||
<tr key={key}>
|
||||
<td>{key}</td>
|
||||
<td>{value}</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
<div className="showMoreItems">
|
||||
<span className="link" onClick={() => this.incrementCount('settings')}>
|
||||
|
||||
@@ -60,40 +60,37 @@ function Items({
|
||||
item.author.toLowerCase().includes(filter.toLowerCase()) ||
|
||||
item.type.toLowerCase().includes(filter.toLowerCase()),
|
||||
)
|
||||
.map((item) => {
|
||||
console.log(item, item.type.split('_')[0].endsWith('s')
|
||||
? item.type.split('_')[0]
|
||||
: item.type.split('_')[0] + 's'); return (
|
||||
.map((item) => (
|
||||
<div className="item" onClick={() => toggleFunction(item)} key={item.name}>
|
||||
<img
|
||||
className="item-back"
|
||||
draggable="false"
|
||||
src={variables.constants.DDG_IMAGE_PROXY + item.icon_url}
|
||||
aria-hidden="true"
|
||||
/>
|
||||
<img
|
||||
className="item-icon"
|
||||
alt="icon"
|
||||
draggable="false"
|
||||
src={variables.constants.DDG_IMAGE_PROXY + item.icon_url}
|
||||
/>
|
||||
<div className="card-details">
|
||||
<span className="card-title">{item.display_name || item.name}</span>
|
||||
<span className="card-subtitle">{variables.getMessage('modals.main.marketplace.by', {author: item.author})}</span>
|
||||
{
|
||||
<img
|
||||
className="item-back"
|
||||
alt=""
|
||||
draggable="false"
|
||||
src={variables.constants.DDG_IMAGE_PROXY + item.icon_url}
|
||||
aria-hidden="true"
|
||||
/>
|
||||
<img
|
||||
className="item-icon"
|
||||
alt="icon"
|
||||
draggable="false"
|
||||
src={variables.constants.DDG_IMAGE_PROXY + item.icon_url}
|
||||
/>
|
||||
<div className="card-details">
|
||||
<span className="card-title">{item.display_name || item.name}</span>
|
||||
<span className="card-subtitle">{variables.getMessage('modals.main.marketplace.by', { author: item.author })}</span>
|
||||
{
|
||||
type === 'all' && !onCollection
|
||||
? <span className="card-type">
|
||||
{variables.getMessage(`modals.main.addons.create.types.${
|
||||
item.type.split('_')[0] === "preset"
|
||||
? "settings"
|
||||
: item.type.split('_')[0] + 's'
|
||||
{variables.getMessage(`modals.main.addons.create.types.${item.type.split('_')[0] === "preset"
|
||||
? "settings"
|
||||
: item.type.split('_')[0] + 's'
|
||||
}`)}
|
||||
</span>
|
||||
: null}
|
||||
|
||||
</span>
|
||||
: null
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
)})}
|
||||
))}
|
||||
</div>
|
||||
<div className="loader"></div>
|
||||
{type === 'all' && !onCollection ? (
|
||||
|
||||
@@ -492,17 +492,14 @@ export default class Create extends PureComponent {
|
||||
<>
|
||||
<div className="flexTopMarketplace">
|
||||
{this.state.currentTab !== 1 && (
|
||||
<div className="returnButton">
|
||||
<Tooltip
|
||||
title={variables.getMessage('modals.main.marketplace.product.buttons.back')}
|
||||
key="backArrow"
|
||||
>
|
||||
<MdArrowBack
|
||||
className="backArrow"
|
||||
onClick={() => this.changeTab(1)}
|
||||
/>
|
||||
</Tooltip>
|
||||
</div>
|
||||
<Tooltip
|
||||
title={variables.getMessage('modals.main.marketplace.product.buttons.back')}
|
||||
key="backArrow"
|
||||
>
|
||||
<div className="returnButton">
|
||||
<MdArrowBack className="backArrow" onClick={() => this.changeTab(1)} />
|
||||
</div>
|
||||
</Tooltip>
|
||||
)}
|
||||
<span className="mainTitle">
|
||||
{variables.getMessage('modals.main.addons.create.other_title')}
|
||||
|
||||
@@ -7,6 +7,7 @@ import {
|
||||
MdOutlineKeyboardArrowRight,
|
||||
MdSearch,
|
||||
MdOutlineArrowForward,
|
||||
MdLibraryAdd,
|
||||
} from 'react-icons/md';
|
||||
|
||||
import Item from '../Item';
|
||||
@@ -36,6 +37,7 @@ export default class Marketplace extends PureComponent {
|
||||
install: (
|
||||
<button onClick={() => this.manage('install')}>
|
||||
{variables.getMessage('modals.main.marketplace.product.buttons.addtomue')}
|
||||
<MdLibraryAdd />
|
||||
</button>
|
||||
),
|
||||
};
|
||||
@@ -181,6 +183,30 @@ export default class Marketplace extends PureComponent {
|
||||
variables.stats.postEvent('marketplace', type === 'install' ? 'Install' : 'Uninstall');
|
||||
}
|
||||
|
||||
async installCollection() {
|
||||
this.setState({ busy: true });
|
||||
try {
|
||||
const installed = JSON.parse(localStorage.getItem('installed'));
|
||||
for (const item of this.state.items) {
|
||||
if (installed.some((i) => i.name === item.display_name)) continue; // don't install if already installed
|
||||
let { data } = await (
|
||||
await fetch(`${variables.constants.MARKETPLACE_URL}/item/${item.type}/${item.name}`, {
|
||||
signal: this.controller.signal,
|
||||
})
|
||||
).json();
|
||||
install(data.type, data);
|
||||
variables.stats.postEvent('marketplace-item', `${item.display_name} installed}`);
|
||||
variables.stats.postEvent('marketplace', 'Install');
|
||||
}
|
||||
toast(variables.getMessage('toasts.installed'));
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
toast(variables.getMessage('toasts.error'));
|
||||
} finally {
|
||||
this.setState({ busy: false });
|
||||
}
|
||||
}
|
||||
|
||||
sortMarketplace(value, sendEvent) {
|
||||
let items = this.state.oldItems;
|
||||
switch (value) {
|
||||
@@ -342,13 +368,22 @@ export default class Marketplace extends PureComponent {
|
||||
backgroundImage: `linear-gradient(to bottom, transparent, black), url('${this.state.collectionImg}')`,
|
||||
}}
|
||||
>
|
||||
<div className="nice-tag">
|
||||
{variables.getMessage('modals.main.marketplace.collection')}
|
||||
</div>
|
||||
<div className="content">
|
||||
<span className="mainTitle">{this.state.collectionTitle}</span>
|
||||
<span className="subtitle">{this.state.collectionDescription}</span>
|
||||
</div>
|
||||
<div className="nice-tag">
|
||||
{variables.getMessage('modals.main.marketplace.collection')}
|
||||
</div>
|
||||
|
||||
<button
|
||||
className="addAllButton"
|
||||
onClick={() => this.installCollection()}
|
||||
disabled={this.state.busy}
|
||||
>
|
||||
{variables.getMessage('modals.main.marketplace.add_all')}
|
||||
<MdLibraryAdd />
|
||||
</button>
|
||||
</div>
|
||||
</>
|
||||
) : (
|
||||
|
||||
@@ -211,6 +211,7 @@ h5 {
|
||||
justify-content: space-between;
|
||||
padding: 25px;
|
||||
margin-top: 20px;
|
||||
transition: 0.5s;
|
||||
@include themed() {
|
||||
background: t($modal-sidebar);
|
||||
border-radius: t($borderRadius);
|
||||
@@ -248,8 +249,9 @@ h5 {
|
||||
padding: 15px;
|
||||
gap: 15px;
|
||||
@include themed() {
|
||||
background-color: t($modal-sidebarActive);
|
||||
background-color: t($modal-secondaryColour);
|
||||
border-radius: t($borderRadius);
|
||||
border: 1px solid t($modal-sidebarActive);
|
||||
}
|
||||
button {
|
||||
@include basicIconButton(5px, 5px, modal);
|
||||
@@ -260,6 +262,9 @@ h5 {
|
||||
margin: 0 !important;
|
||||
}
|
||||
}
|
||||
svg {
|
||||
margin: 0 !important;
|
||||
}
|
||||
@extend %tabText;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,11 +27,13 @@
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
|
||||
@include themed() {
|
||||
@include themed {
|
||||
background-color: t($modal-secondaryColour);
|
||||
box-shadow: 0 0 0 1px t($modal-sidebarActive);
|
||||
|
||||
&:hover {
|
||||
background-color: t($modal-sidebarActive);
|
||||
|
||||
img {
|
||||
background-color: t($modal-sidebarActive);
|
||||
}
|
||||
@@ -42,16 +44,16 @@
|
||||
margin-top: 7px;
|
||||
}
|
||||
|
||||
.item-back {
|
||||
filter: blur(60px) saturate(180%) brightness(90%);
|
||||
-webkit-filter: blur(60px) saturate(180%) brightness(90%);
|
||||
position: absolute;
|
||||
object-fit: cover !important;
|
||||
height: 90px !important;
|
||||
width: 100px !important;
|
||||
border-radius: 100px;
|
||||
transition: 0.5s;
|
||||
margin-top: 30px;
|
||||
.item-back {
|
||||
filter: blur(60px) saturate(180%) brightness(90%);
|
||||
filter: blur(60px) saturate(180%) brightness(90%);
|
||||
position: absolute;
|
||||
object-fit: cover !important;
|
||||
height: 90px !important;
|
||||
width: 100px !important;
|
||||
border-radius: 100px;
|
||||
transition: 0.5s;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.item-icon {
|
||||
@@ -77,7 +79,7 @@
|
||||
.card-subtitle {
|
||||
font-size: 14px;
|
||||
|
||||
@include themed() {
|
||||
@include themed {
|
||||
color: t($subColor);
|
||||
}
|
||||
}
|
||||
@@ -86,15 +88,14 @@
|
||||
margin-top: 8px;
|
||||
font-size: 12px;
|
||||
font-weight: bolder;
|
||||
@include themed() {
|
||||
@include themed {
|
||||
color: t($subColor);
|
||||
}
|
||||
|
||||
border-radius: 150px;
|
||||
padding: 2px 8px;
|
||||
backdrop-filter: blur(16px) saturate(180%);
|
||||
-webkit-backdrop-filter: blur(16px) saturate(180%);
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
border: 1px solid rgba(209, 213, 219, 0.3);
|
||||
background-color: rgb(255 255 255 / 10%);
|
||||
border: 1px solid rgb(209 213 219 / 30%);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -137,7 +138,7 @@
|
||||
border-radius: 15px;
|
||||
width: 25%;
|
||||
max-height: 450px;
|
||||
|
||||
|
||||
.front {
|
||||
padding: 20px;
|
||||
height: 100%;
|
||||
@@ -148,24 +149,23 @@
|
||||
box-sizing: border-box !important;
|
||||
border-radius: 12px 12px 0 0;
|
||||
backdrop-filter: blur(40px) saturate(150%) brightness(75%);
|
||||
-webkit-backdrop-filter: blur(40px) saturate(150%) brightness(75%);
|
||||
@include themed() {
|
||||
background-image: linear-gradient(to bottom, transparent, t($modal-background));
|
||||
backdrop-filter: blur(40px) saturate(150%) brightness(75%);
|
||||
@include themed {
|
||||
background-image: linear-gradient(to bottom, transparent, t($modal-background));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.icon {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 5px 25px black;
|
||||
}
|
||||
|
||||
|
||||
.divider {
|
||||
text-transform: uppercase;
|
||||
|
||||
@include themed() {
|
||||
@include themed {
|
||||
color: t($subColor);
|
||||
}
|
||||
}
|
||||
@@ -175,6 +175,7 @@
|
||||
grid-template-columns: 1fr 1fr;
|
||||
grid-template-rows: 1fr;
|
||||
grid-gap: 20px;
|
||||
|
||||
button {
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
@@ -192,17 +193,17 @@
|
||||
}
|
||||
|
||||
.tag {
|
||||
padding: 2px 10px 2px 10px;
|
||||
padding: 2px 10px;
|
||||
border-radius: 12px;
|
||||
font-size: 12px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
@include themed() {
|
||||
@include themed {
|
||||
background: t($modal-sidebar);
|
||||
box-shadow: 0 0 0 3px t($modal-sidebarActive);
|
||||
|
||||
span {
|
||||
&:before {
|
||||
&::before {
|
||||
content: '#';
|
||||
color: t($subColor);
|
||||
margin-right: 5px;
|
||||
@@ -216,18 +217,18 @@
|
||||
}
|
||||
|
||||
.moreTag {
|
||||
padding: 2px 10px 2px 10px;
|
||||
padding: 2px 10px;
|
||||
border-radius: 12px;
|
||||
font-size: 12px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
|
||||
@include themed() {
|
||||
@include themed {
|
||||
background: t($modal-sidebar);
|
||||
box-shadow: 0 0 0 3px t($modal-sidebarActive);
|
||||
|
||||
span {
|
||||
&:before {
|
||||
&::before {
|
||||
content: '+';
|
||||
color: t($subColor);
|
||||
margin-right: 5px;
|
||||
@@ -253,7 +254,7 @@
|
||||
grid-gap: 5px;
|
||||
padding: 50px;
|
||||
|
||||
@include themed() {
|
||||
@include themed {
|
||||
.sideloadIcon {
|
||||
font-size: 50px;
|
||||
color: t($subColor);
|
||||
@@ -272,21 +273,26 @@
|
||||
flex-flow: column;
|
||||
text-align: center;
|
||||
align-items: center;
|
||||
|
||||
img {
|
||||
width: 200px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
svg {
|
||||
font-size: 70px;
|
||||
|
||||
/* background: -webkit-linear-gradient(90deg,rgba(255,92,39,.7) 37%,rgba(255,70,110,.67) 60%);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;*/
|
||||
-webkit-text-fill-color: transparent; */
|
||||
}
|
||||
|
||||
button {
|
||||
svg {
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.buttonsRow {
|
||||
display: flex;
|
||||
flex-flow: row;
|
||||
@@ -315,17 +321,25 @@ p.author {
|
||||
height: 48px;
|
||||
border-radius: 12px;
|
||||
cursor: pointer;
|
||||
margin-right: 25px;
|
||||
|
||||
svg {
|
||||
font-size: 2em;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: rgba(121, 121, 121, 0.226);
|
||||
background: rgb(121 121 121 / 22.6%);
|
||||
}
|
||||
}
|
||||
|
||||
.flexTopMarketplace {
|
||||
display: flex;
|
||||
margin-bottom: 15px;
|
||||
.tooltip {
|
||||
margin-right: 25px;
|
||||
}
|
||||
.mainTitle {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.itemWarning {
|
||||
@@ -333,7 +347,7 @@ p.author {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
@include themed() {
|
||||
@include themed {
|
||||
background: t($modal-sidebar);
|
||||
box-shadow: 0 0 0 4px t($modal-sidebarActive);
|
||||
border-radius: t($borderRadius);
|
||||
@@ -366,7 +380,7 @@ p.author {
|
||||
align-items: center;
|
||||
margin-top: 15px;
|
||||
|
||||
@include themed() {
|
||||
@include themed {
|
||||
background: t($modal-sidebar);
|
||||
border-radius: t($borderRadius);
|
||||
box-shadow: 0 0 0 4px t($modal-sidebarActive);
|
||||
@@ -388,17 +402,18 @@ p.author {
|
||||
}
|
||||
|
||||
.collectionPage {
|
||||
height: 200px;
|
||||
// height: 200px;
|
||||
padding: 1.5rem;
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 25px;
|
||||
gap: 15px;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
|
||||
@include themed() {
|
||||
@include themed {
|
||||
border-radius: t($borderRadius);
|
||||
}
|
||||
|
||||
@@ -406,15 +421,18 @@ p.author {
|
||||
border-radius: 150px;
|
||||
padding: 1px 12px;
|
||||
backdrop-filter: blur(16px) saturate(180%);
|
||||
-webkit-backdrop-filter: blur(16px) saturate(180%);
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
border: 1px solid rgba(209, 213, 219, 0.3);
|
||||
backdrop-filter: blur(16px) saturate(180%);
|
||||
background-color: rgb(255 255 255 / 10%);
|
||||
border: 1px solid rgb(209 213 219 / 30%);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
text-align: center;
|
||||
text-shadow: #000 0 0 15px;
|
||||
|
||||
.mainTitle {
|
||||
justify-content: center;
|
||||
color: #fff !important;
|
||||
@@ -424,6 +442,26 @@ p.author {
|
||||
color: #ccc !important;
|
||||
}
|
||||
}
|
||||
|
||||
.addAllButton {
|
||||
margin: 0.5rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 15px;
|
||||
padding: 1px 12px;
|
||||
backdrop-filter: blur(16px) saturate(180%) !important;
|
||||
backdrop-filter: blur(16px) saturate(180%) !important;
|
||||
background-color: rgb(255 255 255 / 10%) !important;
|
||||
border: 1px solid rgb(209 213 219 / 30%) !important;
|
||||
color: #fff !important;
|
||||
|
||||
&:hover {
|
||||
backdrop-filter: blur(16px) saturate(180%) !important;
|
||||
backdrop-filter: blur(16px) saturate(180%) !important;
|
||||
background-color: rgb(17 25 40 / 20%) !important;
|
||||
border: 1px solid rgb(255 255 255 / 12.5%) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.collection {
|
||||
@@ -436,7 +474,7 @@ p.author {
|
||||
background-repeat: no-repeat;
|
||||
align-items: center;
|
||||
|
||||
@include themed() {
|
||||
@include themed {
|
||||
box-shadow: 0 0 0 1px t($modal-sidebarActive);
|
||||
border-radius: t($borderRadius);
|
||||
}
|
||||
@@ -446,6 +484,7 @@ p.author {
|
||||
flex-flow: column;
|
||||
gap: 15px;
|
||||
max-width: 250px;
|
||||
text-shadow: #000 0 0 15px;
|
||||
|
||||
.title {
|
||||
color: #fff !important;
|
||||
@@ -467,15 +506,16 @@ p.author {
|
||||
gap: 15px;
|
||||
padding: 1px 12px;
|
||||
backdrop-filter: blur(16px) saturate(180%);
|
||||
-webkit-backdrop-filter: blur(16px) saturate(180%);
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
border: 1px solid rgba(209, 213, 219, 0.3);
|
||||
backdrop-filter: blur(16px) saturate(180%);
|
||||
background-color: rgb(255 255 255 / 10%);
|
||||
border: 1px solid rgb(209 213 219 / 30%);
|
||||
color: #fff;
|
||||
|
||||
&:hover {
|
||||
backdrop-filter: blur(16px) saturate(180%);
|
||||
-webkit-backdrop-filter: blur(16px) saturate(180%);
|
||||
background-color: rgba(17, 25, 40, 0.2);
|
||||
border: 1px solid rgba(255, 255, 255, 0.125);
|
||||
backdrop-filter: blur(16px) saturate(180%);
|
||||
background-color: rgb(17 25 40 / 20%);
|
||||
border: 1px solid rgb(255 255 255 / 12.5%);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -483,14 +523,14 @@ p.author {
|
||||
a.collectionButton {
|
||||
height: 40px;
|
||||
text-decoration: none;
|
||||
@include themed() {
|
||||
@include themed {
|
||||
border-radius: t($borderRadius);
|
||||
}
|
||||
}
|
||||
|
||||
.smallBanner {
|
||||
button {
|
||||
padding: 0 15px 0 15px;
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
display: flex;
|
||||
@@ -499,7 +539,7 @@ a.collectionButton {
|
||||
margin-top: 15px;
|
||||
align-items: center;
|
||||
|
||||
@include themed() {
|
||||
@include themed {
|
||||
box-shadow: 0 0 0 4px t($modal-sidebarActive);
|
||||
border-radius: t($borderRadius);
|
||||
background: t($modal-sidebar);
|
||||
@@ -526,15 +566,15 @@ a.collectionButton {
|
||||
padding: 10px 30px;
|
||||
border-radius: 10px;
|
||||
font-size: 18px;
|
||||
@include themed() {
|
||||
background: t($modal-sidebarActive);
|
||||
@include themed {
|
||||
box-shadow: 0 0 0 3px t($modal-sidebarActive);
|
||||
background: t($modal-sidebar);
|
||||
}
|
||||
|
||||
input {
|
||||
all: unset;
|
||||
}
|
||||
@include themed() {
|
||||
@include themed {
|
||||
&:focus-within {
|
||||
background: t($modal-sidebarActive);
|
||||
box-shadow: 0 0 0 1px t($color);
|
||||
@@ -555,7 +595,7 @@ a.collectionButton {
|
||||
gap: 15px;
|
||||
padding: 15px;
|
||||
|
||||
@include themed() {
|
||||
@include themed {
|
||||
box-shadow: 0 0 0 4px t($modal-sidebarActive);
|
||||
border-radius: t($borderRadius);
|
||||
}
|
||||
@@ -567,6 +607,7 @@ a.collectionButton {
|
||||
gap: 20px;
|
||||
align-items: center;
|
||||
margin-top: 30px;
|
||||
|
||||
svg {
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
@@ -32,3 +32,13 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.subtitle-photographers {
|
||||
font-size: 16px;
|
||||
@include themed() {
|
||||
color: t($color);
|
||||
span {
|
||||
color: t($subColor)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -183,7 +183,7 @@ export default class About extends PureComponent {
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<MdContactPage />
|
||||
Form
|
||||
{variables.getMessage('modals.main.settings.sections.about.form_button')}
|
||||
</a>
|
||||
<Tooltip title={'Email'}>
|
||||
<a
|
||||
@@ -224,6 +224,8 @@ export default class About extends PureComponent {
|
||||
<a
|
||||
className="donateButton"
|
||||
href={'https://opencollective.com/' + variables.constants.OPENCOLLECTIVE_USERNAME}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<BiDonateHeart />
|
||||
{variables.getMessage('modals.main.settings.sections.about.support_donate')}
|
||||
@@ -350,9 +352,9 @@ export default class About extends PureComponent {
|
||||
{!!this.state.loading ? <p>{this.state.loading}</p> : <></> }
|
||||
<ul>
|
||||
{this.state.photographers.map(({ name, count }) => <>
|
||||
<li>
|
||||
<li className="subtitle-photographers">
|
||||
{name}
|
||||
<span style={{ color: '#ccc' }}> ({count} images)</span>
|
||||
<span> ({count} images)</span>
|
||||
</li>
|
||||
</>)}
|
||||
</ul>
|
||||
|
||||
@@ -30,12 +30,11 @@ export default class LanguageSettings extends PureComponent {
|
||||
return;
|
||||
}
|
||||
|
||||
const quoteLanguages = [];
|
||||
data.forEach((item) => {
|
||||
quoteLanguages.push({
|
||||
name: item,
|
||||
value: item,
|
||||
});
|
||||
const quoteLanguages = data.map((language) => {
|
||||
return {
|
||||
name: languages.find((l) => l.value === language.name) ? languages.find((l) => l.value === language.name).name : 'English',
|
||||
value: language,
|
||||
};
|
||||
});
|
||||
|
||||
this.setState({
|
||||
@@ -78,7 +77,8 @@ export default class LanguageSettings extends PureComponent {
|
||||
<div className="languageSettings">
|
||||
<Radio
|
||||
name="quoteLanguage"
|
||||
options={this.state.quoteLanguages.map((l) => l.name)}
|
||||
options={this.state.quoteLanguages.map((language) => { return { name: language.name, value: language.value.name }; })}
|
||||
defaultValue={this.state.quoteLanguages[0].name}
|
||||
category="quote"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -111,6 +111,7 @@ export default class SearchSettings extends PureComponent {
|
||||
subtitle={variables.getMessage(
|
||||
'modals.main.settings.sections.search.search_engine_subtitle',
|
||||
)}
|
||||
final={ this.state.customDisplay === 'none' ? true : false}
|
||||
>
|
||||
<Dropdown
|
||||
name="searchEngine"
|
||||
@@ -128,7 +129,7 @@ export default class SearchSettings extends PureComponent {
|
||||
</Dropdown>
|
||||
</SettingsItem>
|
||||
<div style={{ display: this.state.customDisplay }}>
|
||||
<SettingsItem title={variables.getMessage('modals.main.settings.sections.search.custom')}>
|
||||
<SettingsItem title={variables.getMessage('modals.main.settings.sections.search.custom')} final={true}>
|
||||
<TextField
|
||||
label={variables.getMessage('modals.main.settings.sections.search.custom')}
|
||||
value={this.state.customValue}
|
||||
|
||||
@@ -93,6 +93,11 @@ export default class TimeSettings extends PureComponent {
|
||||
text={variables.getMessage('modals.main.settings.sections.time.analogue.minute_marks')}
|
||||
category="clock"
|
||||
/>
|
||||
<Checkbox
|
||||
name="roundClock"
|
||||
text={variables.getMessage('modals.main.settings.sections.time.analogue.round_clock')}
|
||||
category="clock"
|
||||
/>
|
||||
</SettingsItem>
|
||||
);
|
||||
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
import variables from 'modules/variables';
|
||||
import { PureComponent } from 'react';
|
||||
import { MdSettings, MdOutlineShoppingBasket, MdOutlineExtension, MdRefresh } from 'react-icons/md';
|
||||
import {
|
||||
MdSettings,
|
||||
MdOutlineShoppingBasket,
|
||||
MdOutlineExtension,
|
||||
MdRefresh,
|
||||
MdClose,
|
||||
} from 'react-icons/md';
|
||||
import Tab from './Tab';
|
||||
import ErrorBoundary from '../../../ErrorBoundary';
|
||||
|
||||
@@ -30,7 +36,14 @@ export default class Tabs extends PureComponent {
|
||||
|
||||
const reminderInfo = (
|
||||
<div className="reminder-info" style={{ display }}>
|
||||
<span className="title">{variables.getMessage('modals.main.settings.reminder.title')}</span>
|
||||
<div className="shareHeader">
|
||||
<span className="title">
|
||||
{variables.getMessage('modals.main.settings.reminder.title')}
|
||||
</span>
|
||||
<span className="closeModal" onClick={ () => localStorage.setItem('showReminder', false)}>
|
||||
<MdClose />
|
||||
</span>
|
||||
</div>
|
||||
<span className="subtitle">
|
||||
{variables.getMessage('modals.main.settings.reminder.message')}
|
||||
</span>
|
||||
|
||||
@@ -55,7 +55,7 @@ function PhotoInformation({ info, url, api }) {
|
||||
const [width, setWidth] = useState(0);
|
||||
const [height, setHeight] = useState(0);
|
||||
const [usePhotoMap, setPhotoMap] = useState(false);
|
||||
const [setMapIcon] = useState(true);
|
||||
const [useMapIcon, setMapIcon] = useState(true);
|
||||
const [showExtraInfo, setshowExtraInfo] = useState(false);
|
||||
//const [showOld, setShowOld] = useState(true);
|
||||
const [other, setOther] = useState(false);
|
||||
@@ -163,7 +163,7 @@ function PhotoInformation({ info, url, api }) {
|
||||
};
|
||||
|
||||
let photoMapClassList = 'map-concept';
|
||||
if (usePhotoMap) {
|
||||
if (photoMap() !== null) {
|
||||
photoMapClassList += ' photoMap';
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ function PhotoInformation({ info, url, api }) {
|
||||
onMouseLeave={() => setshowExtraInfo(false)}
|
||||
>
|
||||
<div className={photoMapClassList}>
|
||||
{photoMap !== null ? <MdLocationOn /> : ''}
|
||||
{useMapIcon || photoMap() === null ? <MdLocationOn /> : ''}
|
||||
<h1>{photoMap}</h1>
|
||||
{photoMap()}
|
||||
</div>
|
||||
|
||||
@@ -371,3 +371,26 @@
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.photoMap {
|
||||
img {
|
||||
height: 50px !important;
|
||||
width: 50px !important;
|
||||
}
|
||||
a {
|
||||
height: 50px;
|
||||
}
|
||||
}
|
||||
|
||||
.photoInformation:hover {
|
||||
.photoMap {
|
||||
height: auto !important;
|
||||
img {
|
||||
height: auto !important;
|
||||
width: auto !important;
|
||||
}
|
||||
a {
|
||||
height: auto !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -89,7 +89,10 @@ export default class Search extends PureComponent {
|
||||
}
|
||||
|
||||
if (setting === 'custom') {
|
||||
url = localStorage.getItem('customSearchEngine');
|
||||
const custom = localStorage.getItem('customSearchEngine');
|
||||
if (custom !== null) {
|
||||
url = custom;
|
||||
}
|
||||
}
|
||||
|
||||
if (localStorage.getItem('voiceSearch') === 'true') {
|
||||
@@ -121,7 +124,12 @@ export default class Search extends PureComponent {
|
||||
}
|
||||
|
||||
if (custom) {
|
||||
url = localStorage.getItem('customSearchEngine');
|
||||
const customSetting = localStorage.getItem('customSearchEngine');
|
||||
if (customSetting !== null) {
|
||||
url = customSetting;
|
||||
} else {
|
||||
url = this.state.url;
|
||||
}
|
||||
}
|
||||
|
||||
this.setState({
|
||||
|
||||
@@ -160,7 +160,7 @@ export default class Clock extends PureComponent {
|
||||
if (localStorage.getItem('timeType') === 'analogue') {
|
||||
return (
|
||||
<Suspense fallback={<></>}>
|
||||
<div className="clockBackground">
|
||||
<div className={`clockBackground ${enabled('roundClock') ? 'round' : ''}`}>
|
||||
<Analog
|
||||
className="analogclock clock-container"
|
||||
value={this.state.time}
|
||||
|
||||
@@ -39,6 +39,10 @@
|
||||
.clockBackground {
|
||||
@extend %basic;
|
||||
padding: 1rem;
|
||||
|
||||
&.round {
|
||||
border-radius: 100% !important;
|
||||
}
|
||||
}
|
||||
|
||||
.new-clock {
|
||||
|
||||
Reference in New Issue
Block a user