fix: missing translation on item page

- change position of close button on modal
This commit is contained in:
alexsparkes
2022-10-19 18:09:06 +01:00
parent 0efc6d4311
commit 60008e291e
19 changed files with 76 additions and 35 deletions

View File

@@ -56,7 +56,7 @@ export default function MainModal({ modalClose }) {
return (
<div className="frame">
<Tooltip
style={{ position: 'absolute', top: '3rem', right: '3rem' }}
style={{ position: 'absolute', top: '1rem', right: '1rem' }}
title={variables.getMessage('modals.welcome.buttons.close')}
key="closeTooltip"
>

View File

@@ -13,6 +13,7 @@ import {
MdTranslate,
MdOutlineKeyboardArrowRight,
MdExpandMore,
MdExpandLess,
MdStyle,
} from 'react-icons/md';
import Modal from 'react-modal';
@@ -53,7 +54,11 @@ export default class Item extends PureComponent {
}
incrementCount() {
this.setState({ count: this.props.data.data.quotes.length });
if (this.state.count !== this.props.data.data.quotes.length) {
this.setState({ count: this.props.data.data.quotes.length });
} else {
this.setState({ count: 5 });
}
}
render() {
@@ -123,8 +128,8 @@ export default class Item extends PureComponent {
<>
<table>
<tr>
<th>Quote</th>
<th>Author</th>
<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}>
@@ -135,7 +140,15 @@ export default class Item extends PureComponent {
</table>
<div className="showMoreItems">
<span className="link" onClick={() => this.incrementCount()}>
<MdExpandMore /> Show All
{this.state.count !== this.props.data.data.quotes.length ? (
<>
<MdExpandMore /> {variables.getMessage('modals.main.marketplace.product.show_all')}
</>
) : (
<>
<MdExpandLess /> {variables.getMessage('modals.main.marketplace.product.show_less')}
</>
)}
</span>
</div>
</>
@@ -213,7 +226,10 @@ export default class Item extends PureComponent {
<div className="infoItem">
<MdStyle />
<div className="text">
<span className="header"> {variables.getMessage('modals.main.settings.sections.background.type.title')}</span>
<span className="header">
{' '}
{variables.getMessage('modals.main.settings.sections.background.type.title')}
</span>
<span>
{' '}
{variables.getMessage(

View File

@@ -1,6 +1,6 @@
import variables from 'modules/variables';
import { PureComponent } from 'react';
import { MdUpdate, MdOutlineExtensionOff } from 'react-icons/md';
import { MdUpdate, MdOutlineExtensionOff, MdCode } from 'react-icons/md';
import { toast } from 'react-toastify';
import Modal from 'react-modal';
@@ -193,10 +193,16 @@ export default class Added extends PureComponent {
if (this.state.installed.length === 0) {
return (
<>
<div className="flexTopMarketplace">
<span className="mainTitle">{variables.getMessage('modals.main.navbar.addons')}</span>
</div>
<div className="filter">
{sideLoadBackendElements()}
<button onClick={() => document.getElementById('file-input').click()}>
<button className="sideload " onClick={() => document.getElementById('file-input').click()}>
{variables.getMessage('modals.main.addons.sideload.title')}
<MdCode />
</button>
</div>
<div className="emptyItems">
<div className="emptyNewMessage">
<MdOutlineExtensionOff />
@@ -224,12 +230,19 @@ export default class Added extends PureComponent {
return (
<>
{sideLoadBackendElements()}
<span className="mainTitle">{variables.getMessage('modals.main.addons.added')}</span>
<button onClick={() => document.getElementById('file-input').click()}>
{variables.getMessage('modals.main.addons.sideload.title')}
</button>
<div className="filter">
{sideLoadBackendElements()}
<div className="buttonSection">
<button className="sideload " onClick={() => document.getElementById('file-input').click()}>
{variables.getMessage('modals.main.addons.sideload.title')}
<MdCode />
</button>
<button className="addToMue sideload updateCheck" onClick={() => this.updateCheck()}>
<MdUpdate />
{variables.getMessage('modals.main.addons.check_updates')}
</button>
</div>
<Dropdown
label={variables.getMessage('modals.main.addons.sort.title')}
name="sortAddons"
@@ -240,10 +253,6 @@ export default class Added extends PureComponent {
<option value="a-z">{variables.getMessage('modals.main.addons.sort.a_z')}</option>
<option value="z-a">{variables.getMessage('modals.main.addons.sort.z_a')}</option>
</Dropdown>
<button className="addToMue sideload updateCheck" onClick={() => this.updateCheck()}>
<MdUpdate />
{variables.getMessage('modals.main.addons.check_updates')}
</button>
</div>
<Items
items={this.state.installed}

View File

@@ -330,6 +330,16 @@ p.author {
box-shadow: 0 0 0 4px t($modal-sidebarActive);
}
.MuiFormControl-root {
margin-bottom: 10px;
}
.buttonSection {
display: flex;
flex-flow: row;
gap: 20px;
}
.tags {
max-width: 50%;
}

View File

@@ -163,7 +163,7 @@ export default class QuickLinks extends PureComponent {
const link = (
<div className="messageMap">
<div className="icon">
<img src={img} alt={item.name} draggable={false} />
<img src={img} alt={item.name} draggable={false} style={{ height: '30px', width: '30px'}} />
</div>
<div className="messageText">
<div className="title">{item.name}</div>

View File

@@ -58,7 +58,7 @@ export default class Tabs extends PureComponent {
}
return (
<div style={{ display: 'flex', width: '100%' }}>
<div style={{ display: 'flex', width: '100%', minHeight: '100%' }}>
<ul className="sidebar" style={{ display: marketplaceActive === ' navbar-item-active' || addonsActive === ' navbar-item-active' ? 'none' : 'block'}}>
{this.props.children.map((tab, index) => (
<Tab

View File

@@ -95,7 +95,7 @@ export default class QuickLinks extends PureComponent {
// widget zoom
setZoom(element) {
const zoom = localStorage.getItem('zoomQuicklinks') || 100;
if (localStorage.getItem('quickLinksStyle') !== "text") {
if (localStorage.getItem('quickLinksStyle') !== 'text') {
for (const link of element.getElementsByTagName('span')) {
link.style.fontSize = `${14 * Number(zoom / 100)}px`;
}
@@ -179,27 +179,21 @@ export default class QuickLinks extends PureComponent {
if (localStorage.getItem('quickLinksStyle') === 'metro') {
return (
<a
className="quickLinksMetro"
key={item.key}
href={item.url}
target={target}
rel={rel}
draggable={false}
>
<img src={img} alt={item.name} draggable={false} />
<span className="subtitle">{item.name}</span>
className="quickLinksMetro"
key={item.key}
href={item.url}
target={target}
rel={rel}
draggable={false}
>
<img src={img} alt={item.name} draggable={false} />
<span className="subtitle">{item.name}</span>
</a>
);
}
const link = (
<a
key={item.key}
href={item.url}
target={target}
rel={rel}
draggable={false}
>
<a key={item.key} href={item.url} target={target} rel={rel} draggable={false}>
<img src={img} alt={item.name} draggable={false} />
</a>
);

View File

@@ -81,6 +81,7 @@ body {
.frame {
width: 100%;
height: 100%;
}
/* fonts (imported from fontsource) */

View File

@@ -489,6 +489,7 @@
"description": "Description",
"show_more": "Show More",
"show_less": "Show Less",
"show_all": "Show All",
"showing": "Showing",
"no_images": "No. Images",
"no_quotes": "No. Quotes",

View File

@@ -487,6 +487,7 @@
"description": "Description",
"show_more": "Show More",
"show_less": "Show Less",
"show_all": "Show All",
"showing": "Showing",
"no_images": "No. Images",
"no_quotes": "No. Quotes",

View File

@@ -488,6 +488,7 @@
"description": "Description",
"show_more": "Show More",
"show_less": "Show Less",
"show_all": "Show All",
"showing": "Showing",
"no_images": "No. Images",
"no_quotes": "No. Quotes",

View File

@@ -488,6 +488,7 @@
"description": "Description",
"show_more": "Show More",
"show_less": "Show Less",
"show_all": "Show All",
"showing": "Showing",
"no_images": "No. Images",
"no_quotes": "No. Quotes",

View File

@@ -488,6 +488,7 @@
"description": "Description",
"show_more": "Show More",
"show_less": "Show Less",
"show_all": "Show All",
"showing": "Showing",
"no_images": "No. Images",
"no_quotes": "No. Quotes",

View File

@@ -488,6 +488,7 @@
"description": "Description",
"show_more": "Show More",
"show_less": "Show Less",
"show_all": "Show All",
"showing": "Showing",
"no_images": "No. Images",
"no_quotes": "No. Quotes",

View File

@@ -488,6 +488,7 @@
"description": "Description",
"show_more": "Show More",
"show_less": "Show Less",
"show_all": "Show All",
"showing": "Showing",
"no_images": "No. Images",
"no_quotes": "No. Quotes",

View File

@@ -488,6 +488,7 @@
"description": "Description",
"show_more": "Show More",
"show_less": "Show Less",
"show_all": "Show All",
"showing": "Showing",
"no_images": "No. Images",
"no_quotes": "No. Quotes",

View File

@@ -488,6 +488,7 @@
"description": "Description",
"show_more": "Show More",
"show_less": "Show Less",
"show_all": "Show All",
"showing": "Showing",
"no_images": "No. Images",
"no_quotes": "No. Quotes",

View File

@@ -488,6 +488,7 @@
"description": "Açıklama/Tanım",
"show_more": "Daha fazla göster",
"show_less": "Daha az göster",
"show_all": "Show All",
"showing": "Showing",
"no_images": "Fotoğraf bulunamadı",
"no_quotes": "Alıntı bulunamadı",

View File

@@ -488,6 +488,7 @@
"description": "Description",
"show_more": "Show More",
"show_less": "Show Less",
"show_all": "Show All",
"showing": "Showing",
"no_images": "No. Images",
"no_quotes": "No. Quotes",