Add auth icon to chat menu. Closes #1879

This commit is contained in:
Gabe Kangas 2022-04-25 15:34:19 -07:00
parent 6ee88f8a7d
commit 7a503fc282
No known key found for this signature in database
GPG key ID: 9A56337728BC81EA
3 changed files with 25 additions and 2 deletions

View file

@ -2,7 +2,7 @@ import { h, createContext } from '/js/web_modules/preact.js';
import htm from '/js/web_modules/htm.js';
import { useState, useEffect, useRef } from '/js/web_modules/preact/hooks.js';
import UsernameForm from './username.js';
import { ChatIcon, UserIcon, CaretDownIcon } from '../icons/index.js';
import { ChatIcon, UserIcon, CaretDownIcon, AuthIcon } from '../icons/index.js';
const html = htm.bind(h);
@ -40,7 +40,7 @@ export const ChatMenu = (props) => {
html`<li>
<button type="button" id="chat-auth" onClick=${showAuthModal}>
Authenticate
<span><${ChatIcon} /></span>
<span><${AuthIcon} /></span>
</button>
</li>`;

View file

@ -0,0 +1,22 @@
import { h } from '/js/web_modules/preact.js';
import htm from '/js/web_modules/htm.js';
const html = htm.bind(h);
export const AuthIcon = ({ className }) => {
return html`
<svg
class="w-6 h-6"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"
></path>
</svg>
`;
};

View file

@ -4,3 +4,4 @@ export { EditIcon } from './EditIcon.js';
export { CheckIcon } from './CheckIcon.js';
export { CloseIcon } from './CloseIcon.js';
export { CaretDownIcon } from './CaretDownIcon.js';
export { AuthIcon } from './AuthIcon.js';