Skip to content

Commit

Permalink
update palettes and palettes modal
Browse files Browse the repository at this point in the history
  • Loading branch information
AvroraPolnareff committed Dec 16, 2023
1 parent 6caab46 commit 80061c4
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 18 deletions.
6 changes: 4 additions & 2 deletions locales/en/translation.json
Expand Up @@ -88,7 +88,7 @@
"Corpus": "Corpus",
"Darkness": "Darkness",
"Daybreak": "Daybreak",
"Deca Heirloom": "Deca Heirloom",
"Deca Heirloom": "Deca",
"Discord": "Discord",
"Dojo": "Dojo",
"Easter": "Easter",
Expand All @@ -114,12 +114,14 @@
"Red White Blue": "Red/White/Blue",
"Rollers": "Rollers",
"Rot": "Rot",
"Sanctum": "Sanctum",
"Shamrock": "Shamrock",
"Smoke Colors": "Smoke Colors",
"Spektaka": "Spektaka",
"Storm": "Storm",
"Tenno II": "Tenno II",
"Tenno": "Tenno",
"Tenno II": "Tenno II",
"Tenno III": "Tenno III",
"Transmission": "Transmission",
"Twilight": "Twilight",
"Twitch": "Twitch",
Expand Down
6 changes: 4 additions & 2 deletions locales/ru/translation.json
Expand Up @@ -87,7 +87,7 @@
"Corpus": "Корпус",
"Darkness": "Тьма",
"Daybreak": "Рассвет",
"Deca Heirloom": "Deca Heirloom",
"Deca Heirloom": "Deca",
"Discord": "Discord",
"Dojo": "Додзё",
"Easter": "Пасха",
Expand All @@ -111,12 +111,14 @@
"Red White Blue": "Красный, Белый и Синий",
"Rollers": "Роллеры",
"Rot": "Гниль",
"Sanctum": "Sanctum",
"Shamrock": "Трилистник",
"Smoke Colors": "Дымчатые Цвета",
"Spektaka": "Спектака",
"Storm": "Шторм",
"Tenno II": "Тэнно II",
"Tenno": "Тэнно",
"Tenno II": "Тэнно II",
"Tenno III": "Тэнно III",
"Transmission": "Передача",
"Twilight": "Сумерки",
"Twitch": "Twitch",
Expand Down
6 changes: 4 additions & 2 deletions locales/zh_CN/translation.json
Expand Up @@ -87,7 +87,7 @@
"Conquest": "Conquest",
"Corpus": "Corpus",
"Darkness": "Darkness",
"Deca Heirloom": "Deca Heirloom",
"Deca Heirloom": "Deca",
"Daybreak": "破晓",
"Discord": "Discord",
"Dojo": "道场",
Expand All @@ -114,12 +114,14 @@
"Red White Blue": "红/白/蓝",
"Rollers": "滚球",
"Rot": "Rot",
"Sanctum": "Sanctum",
"Shamrock": "幸运草",
"Smoke Colors": "烟灰色",
"Spektaka": "华丽演出",
"Storm": "暴雨",
"Tenno II": "Tenno II",
"Tenno": "Tenno",
"Tenno II": "Tenno II",
"Tenno III": "Tenno III",
"Transmission": "传播",
"Twilight": "暮光",
"Twitch": "Twitch",
Expand Down
4 changes: 2 additions & 2 deletions public/images/exit-button-night.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 13 additions & 1 deletion src/common/palettes.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/common/themes.ts
Expand Up @@ -30,7 +30,7 @@ export const nightTheme: ColorsWithMode = {
buttons: "#424242",
misc: "#424242",
danger: "#B25858",
success: "#5AB45A",
success: "#329632",
link: "#5C60B9",
warning: "#c2ab5c",
targetSchemeHeader: "#C25C5C",
Expand Down
2 changes: 1 addition & 1 deletion src/components/App.tsx
Expand Up @@ -78,7 +78,7 @@ function App() {
{
!process.env.index ?
<Credentials><a href="https://www.warframecolorpicker.app/">Hooray, we've gotten a new link!</a>Please follow <a href="https://github.com/AvroraPolnareff/warframe-color-picker/blob/master/README.md">this guide</a> to move your old palettes.</Credentials> :
<Credentials><span>Hippothoe & Moriscu, <br/>last upd.: 27/08/2023</span></Credentials>
<Credentials><span>Hippothoe & Moriscu, <br/>last upd.: 16/12/2023</span></Credentials>
}
{showPanel && <ThemePanel />}
</StyledApp>
Expand Down
16 changes: 9 additions & 7 deletions src/components/PalettesModal.tsx
Expand Up @@ -6,6 +6,7 @@ import {Button} from "./shared/Button";
import {Divider} from "./shared/Divider";
import {WarframePalette} from "./shared/WarframePalette";
import {useTranslation} from "react-i18next";
import { sortBy } from "lodash";

interface PalettesModalProps {
show: boolean,
Expand Down Expand Up @@ -41,8 +42,8 @@ export const PalettesModal = (
<WarframePalette size={1.5} paletteName={hoveredPalette} />
</HoveredPalette>

<Grid>
{palettes.map(({name}) => <Button round small
<Grid dir="">
{sortBy(palettes, ['name']).map(({name}) => <Button round small
onClick={() => onPaletteClick(name)} onMouseOver={() => setHoveredPalette(name)}
success={availablePalettes.indexOf(name) !== -1}
>
Expand All @@ -52,10 +53,10 @@ export const PalettesModal = (
</Grid>
<Divider/>
<div style={{textAlign: "right", marginTop: "0.5rem"}}>
<Button round small warning onClick={onDisableAll} style={{marginRight: '0.4em'}}>
<Button round small onClick={onDisableAll} style={{marginRight: '0.4em'}}>
{t("palettesModal.disableAll")}
</Button>
<Button round small warning onClick={onEnableAll}>
<Button round small onClick={onEnableAll}>
{t("palettesModal.enableAll")}
</Button>
</div>
Expand All @@ -70,7 +71,7 @@ const HoveredPalette = styled.div`
position: absolute;
right: -11.2em;
top: -1.9em;
border: 4px solid ${props => props.theme.colors.textOnBackground};
border: 4px solid ${props => props.theme.colors.buttons};
padding: 0.4em 0.6em;
background-color: ${({theme}) => theme.colors.background};
border-radius: 0.8em;
Expand All @@ -94,9 +95,10 @@ const PaletteName = styled.div`
const Grid = styled.div`
color: ${props => props.theme.colors.textOnBackground};
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-template-rows: repeat(15, 1fr);
row-gap: 0.2em;
grid-auto-flow: column;
justify-items: start;
margin-bottom: 0.8em;
`

1 comment on commit 80061c4

@vercel
Copy link

@vercel vercel bot commented on 80061c4 Dec 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.