parent
ac0c581bac
commit
30dd8d29b8
@ -40,7 +40,8 @@
|
|||||||
"themer-colors-seti": "^1.0.0",
|
"themer-colors-seti": "^1.0.0",
|
||||||
"themer-colors-solarized": "^1.0.3",
|
"themer-colors-solarized": "^1.0.3",
|
||||||
"themer-conemu": "^1.0.5",
|
"themer-conemu": "^1.0.5",
|
||||||
"themer-firefox-color": "^1.0.0",
|
"themer-firefox-addon": "^1.0.0",
|
||||||
|
"themer-firefox-color": "^1.0.1",
|
||||||
"themer-gnome-terminal": "^1.0.1",
|
"themer-gnome-terminal": "^1.0.1",
|
||||||
"themer-hyper": "^3.0.2",
|
"themer-hyper": "^3.0.2",
|
||||||
"themer-iterm": "^2.0.2",
|
"themer-iterm": "^2.0.2",
|
||||||
|
@ -37,7 +37,7 @@ export default () => {
|
|||||||
const [sketchPalettes, setSketchPalettes] = useState(false);
|
const [sketchPalettes, setSketchPalettes] = useState(false);
|
||||||
const [tmux, setTmux] = useState(false);
|
const [tmux, setTmux] = useState(false);
|
||||||
const [prism, setPrism] = useState(false);
|
const [prism, setPrism] = useState(false);
|
||||||
const [firefoxColor, setFirefoxColor] = useState(false);
|
const [firefox, setFirefox] = useState(false);
|
||||||
|
|
||||||
const { getActiveColorOrFallback, preparedColorSet, cliColorSet } = useContext(ThemeContext);
|
const { getActiveColorOrFallback, preparedColorSet, cliColorSet } = useContext(ThemeContext);
|
||||||
|
|
||||||
@ -221,9 +221,9 @@ export default () => {
|
|||||||
accentSelected
|
accentSelected
|
||||||
/>
|
/>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
value={ firefoxColor }
|
value={ firefox }
|
||||||
onChange={ () => setFirefoxColor(!firefoxColor) }
|
onChange={ () => setFirefox(!firefox) }
|
||||||
label="Firefox Color"
|
label="Firefox"
|
||||||
accentSelected
|
accentSelected
|
||||||
/>
|
/>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
@ -294,7 +294,7 @@ export default () => {
|
|||||||
sketchPalettes,
|
sketchPalettes,
|
||||||
tmux,
|
tmux,
|
||||||
prism,
|
prism,
|
||||||
firefoxColor,
|
firefox,
|
||||||
},
|
},
|
||||||
preparedColorSet,
|
preparedColorSet,
|
||||||
window.innerWidth * window.devicePixelRatio,
|
window.innerWidth * window.devicePixelRatio,
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import prepareColors from 'themer/lib/prepare';
|
import prepareColors from 'themer/lib/prepare';
|
||||||
import themer from 'themer/lib/themer';
|
import themer from 'themer/lib/themer';
|
||||||
import JSZip from 'jszip';
|
import JSZip from 'jszip';
|
||||||
|
import { flatten } from 'lodash';
|
||||||
|
|
||||||
import * as themerAlacritty from 'themer-alacritty';
|
import * as themerAlacritty from 'themer-alacritty';
|
||||||
import * as themerAlfred from 'themer-alfred';
|
import * as themerAlfred from 'themer-alfred';
|
||||||
@ -11,6 +12,7 @@ import * as themerBrave from 'themer-brave';
|
|||||||
import * as themerChrome from 'themer-chrome';
|
import * as themerChrome from 'themer-chrome';
|
||||||
import * as themerCmd from 'themer-cmd';
|
import * as themerCmd from 'themer-cmd';
|
||||||
import * as themerConemu from 'themer-conemu';
|
import * as themerConemu from 'themer-conemu';
|
||||||
|
import * as themerFirefoxAddon from 'themer-firefox-addon';
|
||||||
import * as themerFirefoxColor from 'themer-firefox-color';
|
import * as themerFirefoxColor from 'themer-firefox-color';
|
||||||
import * as themerGnomeTerminal from 'themer-gnome-terminal';
|
import * as themerGnomeTerminal from 'themer-gnome-terminal';
|
||||||
import * as themerHyper from 'themer-hyper';
|
import * as themerHyper from 'themer-hyper';
|
||||||
@ -44,7 +46,10 @@ const templates = {
|
|||||||
chrome: { name: 'Chrome', ...themerChrome },
|
chrome: { name: 'Chrome', ...themerChrome },
|
||||||
cmd: { name: 'CMD', ...themerCmd },
|
cmd: { name: 'CMD', ...themerCmd },
|
||||||
conemu: { name: 'ConEmu', ...themerConemu },
|
conemu: { name: 'ConEmu', ...themerConemu },
|
||||||
firefoxColor: { name: 'Firefox Color', ...themerFirefoxColor },
|
firefox: [
|
||||||
|
{ name: 'Firefox Add-on', ...themerFirefoxAddon },
|
||||||
|
{ name: 'Firefox Color', ...themerFirefoxColor },
|
||||||
|
],
|
||||||
gnomeTerminal: { name: 'GNOME Terminal', ...themerGnomeTerminal },
|
gnomeTerminal: { name: 'GNOME Terminal', ...themerGnomeTerminal },
|
||||||
hyper: { name: 'Hyper', ...themerHyper },
|
hyper: { name: 'Hyper', ...themerHyper },
|
||||||
iterm: { name: 'iTerm', ...themerIterm },
|
iterm: { name: 'iTerm', ...themerIterm },
|
||||||
@ -104,7 +109,9 @@ export default async function generateZip(selections, colors, width, height, url
|
|||||||
const selectedKeys = Array.from(Object.entries(selections))
|
const selectedKeys = Array.from(Object.entries(selections))
|
||||||
.filter(([_, selected]) => selected)
|
.filter(([_, selected]) => selected)
|
||||||
.map(([key]) => key);
|
.map(([key]) => key);
|
||||||
const selectedTemplates = selectedKeys.map(key => templates[key]);
|
const selectedTemplates = flatten(
|
||||||
|
selectedKeys.map(key => Array.isArray(templates[key]) ? templates[key] : [templates[key]]),
|
||||||
|
);
|
||||||
const extraArgs = selectedKeys.reduce(
|
const extraArgs = selectedKeys.reduce(
|
||||||
(acc, key) => ({
|
(acc, key) => ({
|
||||||
...acc,
|
...acc,
|
||||||
|
@ -10042,10 +10042,18 @@ themer-conemu@^1.0.5:
|
|||||||
dependencies:
|
dependencies:
|
||||||
lodash "^4.17.4"
|
lodash "^4.17.4"
|
||||||
|
|
||||||
themer-firefox-color@^1.0.0:
|
themer-firefox-addon@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/themer-firefox-color/-/themer-firefox-color-1.0.0.tgz#fa6e29be7f566f244a8bbce0ea6173f9627798df"
|
resolved "https://registry.yarnpkg.com/themer-firefox-addon/-/themer-firefox-addon-1.0.0.tgz#5aa4cb9714751bb026d2cbef10ff404cd2219eaa"
|
||||||
integrity sha512-CcjKkxjIqBcq95FeDQwcMQtHTqMG7FoMZTAuvFUmSQPtvHu3qdfEfHqbTnSnVF35/VOufILZMJtfxWdh/Su7ew==
|
integrity sha512-tvV3bCHpcioGVdiFmLBrOT3QfeBABWJZy8FYLLUojYPaAo4BZo/F+nVQdJ6WyBTHN/Xb/my2Dc7JEPaI79h1zg==
|
||||||
|
dependencies:
|
||||||
|
color "^3.1.2"
|
||||||
|
lodash "^4.17.15"
|
||||||
|
|
||||||
|
themer-firefox-color@^1.0.1:
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/themer-firefox-color/-/themer-firefox-color-1.0.1.tgz#6cf7c5984b55ebe5376c4bb8646ebad90784260c"
|
||||||
|
integrity sha512-Y2Y5I2dxAcskJPK2vxK8Qpz+qUaryGyyPD6/5JlcT7qhqcBUxQAiZIbrrEBkIHtnFypvL3WWbh8BUNxGiLtR7w==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@babel/runtime" "^7.9.2"
|
"@babel/runtime" "^7.9.2"
|
||||||
color "^3.1.2"
|
color "^3.1.2"
|
||||||
|
Loading…
Reference in New Issue
Block a user