-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add aboud and license notice modals.
* Update NOTICE file to be a bit clearer/complete * Add simple about dialog that acknowledges contributors and sponsors * Add License NOTICE link in the footer, to be sure it's present and remains for any derivates.
- Loading branch information
1 parent
ba15adc
commit b9d2692
Showing
35 changed files
with
337 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,234 @@ | ||
import { useModalRef } from "./misc/useModalRef"; | ||
|
||
import cannonKeys from "./assets/cannonkeys.png"; | ||
import cannonKeysDarkMode from "./assets/cannonkeys-dark-mode.png"; | ||
|
||
import niceAndTyperactive from "./assets/niceandtyperactive.png"; | ||
import niceAndTyperactiveDarkMode from "./assets/niceandtyperactive-dark-mode.png"; | ||
|
||
import kinesis from "./assets/kinesis.png"; | ||
import kinesisDarkMode from "./assets/kinesis-dark-mode.png"; | ||
|
||
import keychron from "./assets/keychron.png"; | ||
import keychronDarkMode from "./assets/keychron-dark-mode.png"; | ||
|
||
import littleKeyboards from "./assets/littlekeyboards.avif"; | ||
import littleKeyboardsDarkMode from "./assets/littlekeyboards-dark-mode.avif"; | ||
|
||
import keebmaker from "./assets/keebmaker.png"; | ||
import keebmakerDarkMode from "./assets/keebmaker-dark-mode.png"; | ||
|
||
import keebio from "./assets/keebio.avif"; | ||
|
||
import deskHero from "./assets/deskhero.webp"; | ||
import deskHeroDarkMode from "./assets/deskhero-dark-mode.webp"; | ||
|
||
import mode from "./assets/mode.png"; | ||
import modeDarkMode from "./assets/mode-dark-mode.png"; | ||
|
||
import mechlovin from "./assets/mechloving.png"; | ||
import mechlovinDarkMode from "./assets/mechlovin-dark-mode.png"; | ||
|
||
import phaseByte from "./assets/phasebyte.png"; | ||
|
||
import keycapsss from "./assets/keycapsss.png"; | ||
import keycapsssDarkMode from "./assets/keycapsss-dark-mode.png"; | ||
|
||
import mekibo from "./assets/mekibo.png"; | ||
import mekiboDarkMode from "./assets/mekibo-dark-mode.png"; | ||
|
||
import splitkb from "./assets/splitkb.png"; | ||
import splitkbDarkMode from "./assets/splitkb-dark-mode.png"; | ||
|
||
export interface AboutModalProps { | ||
open: boolean; | ||
onClose: () => void; | ||
} | ||
|
||
enum SponsorSize { | ||
Large, | ||
Medium, | ||
Small, | ||
} | ||
|
||
const sponsors = [ | ||
{ | ||
level: "Platinum", | ||
size: SponsorSize.Large, | ||
vendors: [ | ||
{ | ||
name: "nice!keyboards / typeractive", | ||
img: niceAndTyperactive, | ||
darkModeImg: niceAndTyperactiveDarkMode, | ||
url: "https://typeractive.xyz/", | ||
}, | ||
{ | ||
name: "Kineses", | ||
img: kinesis, | ||
darkModeImg: kinesisDarkMode, | ||
url: "https://kinesis-ergo.com/", | ||
}, | ||
], | ||
}, | ||
{ | ||
level: "Gold+", | ||
size: SponsorSize.Large, | ||
vendors: [ | ||
{ | ||
name: "CannonKeys", | ||
img: cannonKeys, | ||
darkModeImg: cannonKeysDarkMode, | ||
url: "https://cannonkeys.com/", | ||
}, | ||
{ | ||
name: "Keychron", | ||
img: keychron, | ||
darkModeImg: keychronDarkMode, | ||
url: "https://keychron.com/", | ||
}, | ||
], | ||
}, | ||
{ | ||
level: "Gold", | ||
size: SponsorSize.Medium, | ||
vendors: [ | ||
{ | ||
name: "Little Keyboards", | ||
img: littleKeyboards, | ||
darkModeImg: littleKeyboardsDarkMode, | ||
url: "https://littlekeyboards.com/", | ||
}, | ||
{ | ||
name: "Keebmaker", | ||
img: keebmaker, | ||
darkModeImg: keebmakerDarkMode, | ||
url: "https://keebmaker.com/", | ||
}, | ||
], | ||
}, | ||
{ | ||
level: "Silver", | ||
size: SponsorSize.Medium, | ||
vendors: [ | ||
{ | ||
name: "keeb.io", | ||
img: keebio, | ||
url: "https://keeb.io/", | ||
}, | ||
{ | ||
name: "Mode Designs", | ||
img: mode, | ||
darkModeImg: modeDarkMode, | ||
url: "https://modedesigns.com/", | ||
}, | ||
], | ||
}, | ||
{ | ||
level: "Bronze", | ||
size: SponsorSize.Small, | ||
vendors: [ | ||
{ | ||
name: "deskhero", | ||
img: deskHero, | ||
darkModeImg: deskHeroDarkMode, | ||
url: "https://deskhero.ca/", | ||
}, | ||
{ | ||
name: "PhaseByte", | ||
img: phaseByte, | ||
url: "https://phasebyte.com/", | ||
}, | ||
{ | ||
name: "Mechlovin'", | ||
img: mechlovin, | ||
darkModeImg: mechlovinDarkMode, | ||
url: "https://mechlovin.studio/", | ||
}, | ||
], | ||
}, | ||
{ | ||
level: "Additional", | ||
size: SponsorSize.Small, | ||
vendors: [ | ||
{ | ||
name: "splitkb.com", | ||
img: splitkb, | ||
darkModeImg: splitkbDarkMode, | ||
url: "https://splitkb.com/", | ||
}, | ||
{ | ||
name: "keycapsss", | ||
img: keycapsss, | ||
darkModeImg: keycapsssDarkMode, | ||
url: "https://keycapsss.com/", | ||
}, | ||
{ | ||
name: "mekibo", | ||
img: mekibo, | ||
darkModeImg: mekiboDarkMode, | ||
url: "https://mekibo.com/", | ||
}, | ||
], | ||
}, | ||
]; | ||
|
||
export const AboutModal = ({ open, onClose }: AboutModalProps) => { | ||
const ref = useModalRef(open); | ||
|
||
return ( | ||
<dialog | ||
ref={ref} | ||
onClose={onClose} | ||
className="p-5 rounded-lg border-text-base border min-w-min w-[70vw]" | ||
> | ||
<p className="py-1"> | ||
ZMK Studio is made possible thanks to the generous donation of time from | ||
our contributors, as well as the financial sponsorship from the | ||
following vendors: | ||
</p> | ||
<div className="grid gap-2 auto-rows-auto grid-cols-[auto_minmax(min-content,1fr)] justify-items-center items-center"> | ||
{sponsors.map((s) => { | ||
const heightVariants = { | ||
[SponsorSize.Large]: "h-16", | ||
[SponsorSize.Medium]: "h-12", | ||
[SponsorSize.Small]: "h-8", | ||
}; | ||
|
||
return ( | ||
<> | ||
<label>{s.level}</label> | ||
<div | ||
className={`grid grid-rows-1 gap-x-1 auto-cols-fr grid-flow-col justify-items-center items-center ${ | ||
heightVariants[s.size] | ||
}`} | ||
> | ||
{s.vendors.map((v) => { | ||
const maxSizeVariants = { | ||
[SponsorSize.Large]: "max-h-16", | ||
[SponsorSize.Medium]: "max-h-12", | ||
[SponsorSize.Small]: "max-h-8", | ||
}; | ||
|
||
return ( | ||
<a href={v.url} target="_blank"> | ||
<picture aria-label={v.name}> | ||
{v.darkModeImg && ( | ||
<source | ||
className={maxSizeVariants[s.size]} | ||
srcSet={v.darkModeImg} | ||
media="(prefers-color-scheme: dark)" | ||
/> | ||
)} | ||
<img className={maxSizeVariants[s.size]} src={v.img} /> | ||
</picture> | ||
</a> | ||
); | ||
})} | ||
</div> | ||
</> | ||
); | ||
})} | ||
</div> | ||
</dialog> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
export interface AppFooterProps { | ||
onShowAbout: () => void; | ||
onShowLicenseNotice: () => void; | ||
} | ||
|
||
export const AppFooter = ({ | ||
onShowAbout, | ||
onShowLicenseNotice, | ||
}: AppFooterProps) => { | ||
return ( | ||
<div className="grid justify-center m-1"> | ||
<div> | ||
<span>© 2024 - The ZMK Contributors</span> -{" "} | ||
<a href="#" onClick={onShowAbout}> | ||
About ZMK Studio | ||
</a>{" "} | ||
-{" "} | ||
<a href="#" onClick={onShowLicenseNotice}> | ||
License NOTICE | ||
</a> | ||
</div> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.