more tailwind icons

This commit is contained in:
Martti Malmi 2023-04-26 01:50:09 +03:00
parent 72c4e6e5cc
commit e03d8d5f39
4 changed files with 51 additions and 81 deletions

View File

@ -414,15 +414,18 @@ export default {
</svg>
),
newFollower: (
<svg width="24" viewBox="0 0 24 24" fill="currentColor">
<svg
width="24"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
className="w-6 h-6"
>
<path
d="M12,6c2.8,0,5.1,2.3,5.1,5.1s-2.3,5.1-5.1,5.1s-5.1-2.3-5.1-5.1S9.2,6,12,6z M17.5,4.6h1.8v1.8c0,0.5,0.4,0.9,0.9,0.9
c0.5,0,0.9-0.4,0.9-0.9V4.6h1.8c0.5,0,0.9-0.4,0.9-0.9s-0.4-0.9-0.9-0.9h-1.8V0.9c0-0.5-0.4-0.9-0.9-0.9c-0.5,0-0.9,0.4-0.9,0.9v1.8
h-1.8c-0.5,0-0.9,0.4-0.9,0.9S17,4.6,17.5,4.6z M22.8,9.3c-0.5,0.1-0.8,0.5-0.8,1c0,0,0,0,0,0c0.1,0.5,0.1,1.1,0.1,1.6
c0,2.5-0.9,4.9-2.6,6.7c-0.7-1.1-1.7-2-2.8-2.7c-2.7,2.6-6.9,2.6-9.5,0c-1.1,0.7-2.1,1.6-2.8,2.7C0.7,14.5,1.1,8.1,5.3,4.4
C7.1,2.8,9.5,1.8,12,1.8c0.5,0,1.1,0,1.6,0.1c0.5,0.1,1-0.3,1-0.8c0.1-0.5-0.3-0.9-0.8-1C13.3,0,12.6,0,12,0C5.4,0,0,5.4,0,12
c0,3.4,1.4,6.6,3.9,8.8L4,21c4.5,4,11.4,4,15.9,0l0.2-0.1c2.5-2.3,3.9-5.5,3.9-8.9c0-0.6,0-1.3-0.2-1.9C23.8,9.6,23.3,9.3,22.8,9.3
C22.8,9.3,22.8,9.3,22.8,9.3z"
stroke-linecap="round"
stroke-linejoin="round"
d="M19 7.5v3m0 0v3m0-3h3m-3 0h-3m-2.25-4.125a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zM4 19.235v-.11a6.375 6.375 0 0112.75 0v.109A12.318 12.318 0 0110.374 21c-2.331 0-4.512-.645-6.374-1.766z"
/>
</svg>
),
@ -443,6 +446,38 @@ export default {
/>
</svg>
),
attach: (
<svg
width="24"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
className="w-6 h-6"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M18.375 12.739l-7.693 7.693a4.5 4.5 0 01-6.364-6.364l10.94-10.94A3 3 0 1119.5 7.372L8.552 18.32m.009-.01l-.01.01m5.699-9.941l-7.81 7.81a1.5 1.5 0 002.112 2.13"
/>
</svg>
),
smile: (
<svg
width="24"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
className="w-6 h-6"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M15.182 15.182a4.5 4.5 0 01-6.364 0M21 12a9 9 0 11-18 0 9 9 0 0118 0zM9.75 9.75c0 .414-.168.75-.375.75S9 10.164 9 9.75 9.168 9 9.375 9s.375.336.375.75zm-.375 0h.008v.015h-.008V9.75zm5.625 0c0 .414-.168.75-.375.75s-.375-.336-.375-.75.168-.75.375-.75.375.336.375.75zm-.375 0h.008v.015h-.008V9.75z"
/>
</svg>
),
language: (
<svg
width="14"

View File

@ -22,6 +22,7 @@ import Note from './views/Note';
import Notifications from './views/Notifications';
import Profile from './views/Profile';
import Settings from './views/settings/Settings';
import Subscribe from './views/Subscribe';
import Torrent from './views/Torrent';
import Component from './BaseComponent';
import Helpers from './Helpers';
@ -31,7 +32,6 @@ import '@fontsource/lato/400.css';
import '@fontsource/lato/700.css';
import '../css/style.css';
import '../css/cropper.min.css';
import Subscribe from "./views/Subscribe";
type Props = Record<string, unknown>;

View File

@ -3,6 +3,7 @@ import $ from 'jquery';
import { createRef } from 'preact';
import Helpers from '../Helpers';
import Icons from '../Icons';
import EmojiButton from '../lib/emoji-button';
import localState from '../LocalState';
import { translate as t } from '../translations/Translation';
@ -252,52 +253,18 @@ class PublicMessageForm extends MessageForm {
class="attach-file-btn"
onClick=${(e) => this.attachFileClicked(e)}
>
<svg width="24" height="24" viewBox="0 0 24 24">
<path
fill="currentColor"
d="M21.586 10.461l-10.05 10.075c-1.95 1.949-5.122 1.949-7.071 0s-1.95-5.122 0-7.072l10.628-10.585c1.17-1.17 3.073-1.17 4.243 0 1.169 1.17 1.17 3.072 0 4.242l-8.507 8.464c-.39.39-1.024.39-1.414 0s-.39-1.024 0-1.414l7.093-7.05-1.415-1.414-7.093 7.049c-1.172 1.172-1.171 3.073 0 4.244s3.071 1.171 4.242 0l8.507-8.464c.977-.977 1.464-2.256 1.464-3.536 0-2.769-2.246-4.999-5-4.999-1.28 0-2.559.488-3.536 1.465l-10.627 10.583c-1.366 1.368-2.05 3.159-2.05 4.951 0 3.863 3.13 7 7 7 1.792 0 3.583-.684 4.95-2.05l10.05-10.075-1.414-1.414z"
/>
</svg>
${Icons.attach}
</button>
<button
class="emoji-picker-btn hidden-xs"
type="button"
onClick=${(e) => this.onEmojiButtonClick(e)}
>
<svg
aria-hidden="true"
focusable="false"
data-prefix="far"
data-icon="smile"
class="svg-inline--fa fa-smile fa-w-16"
role="img"
viewBox="0 0 496 512"
>
<path
fill="currentColor"
d="M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm-80-216c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm4 72.6c-20.8 25-51.5 39.4-84 39.4s-63.2-14.3-84-39.4c-8.5-10.2-23.7-11.5-33.8-3.1-10.2 8.5-11.5 23.6-3.1 33.8 30 36 74.1 56.6 120.9 56.6s90.9-20.6 120.9-56.6c8.5-10.2 7.1-25.3-3.1-33.8-10.1-8.4-25.3-7.1-33.8 3.1z"
></path>
</svg>
${Icons.smile}
</button>
<button type="submit">
<span>${t('post')} </span>
<svg
class="svg-inline--fa fa-w-16"
x="0px"
y="0px"
viewBox="0 0 486.736 486.736"
style="enable-background:new 0 0 486.736 486.736;"
width="100px"
height="100px"
fill="currentColor"
stroke="#000000"
stroke-width="0"
>
<path
fill="currentColor"
d="M481.883,61.238l-474.3,171.4c-8.8,3.2-10.3,15-2.6,20.2l70.9,48.4l321.8-169.7l-272.4,203.4v82.4c0,5.6,6.3,9,11,5.9 l60-39.8l59.1,40.3c5.4,3.7,12.8,2.1,16.3-3.5l214.5-353.7C487.983,63.638,485.083,60.038,481.883,61.238z"
></path>
</svg>
${Icons.chat}
</button>
</div>
`}

View File

@ -4,32 +4,13 @@ import $ from 'jquery';
import MessageForm from '../../components/MessageForm';
import Torrent from '../../components/Torrent';
import Helpers from '../../Helpers';
import Icons from '../../Icons';
import EmojiButton from '../../lib/emoji-button';
import localState from '../../LocalState';
import Events from '../../nostr/Events';
import Key from '../../nostr/Key';
import { translate as t } from '../../translations/Translation';
const submitButton = html` <button type="submit">
<svg
class="svg-inline--fa fa-w-16"
x="0px"
y="0px"
viewBox="0 0 486.736 486.736"
style="enable-background:new 0 0 486.736 486.736;"
width="100px"
height="100px"
fill="currentColor"
stroke="#000000"
stroke-width="0"
>
<path
fill="currentColor"
d="M481.883,61.238l-474.3,171.4c-8.8,3.2-10.3,15-2.6,20.2l70.9,48.4l321.8-169.7l-272.4,203.4v82.4c0,5.6,6.3,9,11,5.9 l60-39.8l59.1,40.3c5.4,3.7,12.8,2.1,16.3-3.5l214.5-353.7C487.983,63.638,485.083,60.038,481.883,61.238z"
></path>
</svg>
</button>`;
class ChatMessageForm extends MessageForm {
componentDidMount() {
this.picker = new EmojiButton({ position: 'top-start' });
@ -115,20 +96,7 @@ class ChatMessageForm extends MessageForm {
type="button"
onClick=${(e) => this.onEmojiButtonClick(e)}
>
<svg
aria-hidden="true"
focusable="false"
data-prefix="far"
data-icon="smile"
class="svg-inline--fa fa-smile fa-w-16"
role="img"
viewBox="0 0 496 512"
>
<path
fill="currentColor"
d="M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm-80-216c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm4 72.6c-20.8 25-51.5 39.4-84 39.4s-63.2-14.3-84-39.4c-8.5-10.2-23.7-11.5-33.8-3.1-10.2 8.5-11.5 23.6-3.1 33.8 30 36 74.1 56.6 120.9 56.6s90.9-20.6 120.9-56.6c8.5-10.2 7.1-25.3-3.1-33.8-10.1-8.4-25.3-7.1-33.8 3.1z"
></path>
</svg>
${Icons.smile}
</button>`;
return html`<form
@ -156,7 +124,7 @@ class ChatMessageForm extends MessageForm {
autocapitalize="sentences"
spellcheck="off"
/>
${submitButton}
${Icons.chat}
<div id="webtorrent">
${this.state.torrentId
? html`<${Torrent} preview=${true} torrentId=${this.state.torrentId} />`