Skip to content

Commit

Permalink
fix: add person icon
Browse files Browse the repository at this point in the history
  • Loading branch information
shanberg committed Apr 12, 2022
1 parent 6336a9e commit 35aa390
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cljs/athens/views/blocks/textarea_keydown.cljs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(ns athens.views.blocks.textarea-keydown
(:require
["/components/Icons/Icons" :refer [TimeNow CheckboxIcon CalendarNowIcon CalendarTomorrowIcon CalendarYesterdayIcon BlockEmbedIcon TemplateIcon HTMLEmbedIcon YoutubeIcon]]
["/components/Icons/Icons" :refer [TimeNowIcon PersonIcon CheckboxIcon CalendarNowIcon CalendarTomorrowIcon CalendarYesterdayIcon BlockEmbedIcon TemplateIcon HTMLEmbedIcon YoutubeIcon]]
[athens.common-db :as common-db]
[athens.common.utils :as common.utils]
[athens.dates :as dates]
Expand Down Expand Up @@ -94,7 +94,7 @@
[]
(cond->
[["Add Todo" CheckboxIcon "{{[[TODO]]}} " "cmd-enter" nil]
["Current Time" TimeNow (fn [] (.. (js/Date.) (toLocaleTimeString [] (clj->js {"timeStyle" "short"})))) nil nil]
["Current Time" TimeNowIcon (fn [] (.. (js/Date.) (toLocaleTimeString [] (clj->js {"timeStyle" "short"})))) nil nil]
["Today" CalendarNowIcon (fn [] (str "[[" (:title (dates/get-day 0)) "]] ")) nil nil]
["Tomorrow" CalendarTomorrowIcon (fn [] (str "[[" (:title (dates/get-day -1)) "]]")) nil nil]
["Yesterday" CalendarYesterdayIcon (fn [] (str "[[" (:title (dates/get-day 1)) "]]")) nil nil]
Expand All @@ -104,7 +104,7 @@
["Template" TemplateIcon ";;" nil nil]]
@(subscribe [:db-picker/remote-db?])
(conj (let [username (:username @(rf/subscribe [:presence/current-user]))]
[(str "Me (" username ")") Person (fn [] (str "[[" username "]] ")) nil nil]))))
[(str "Me (" username ")") PersonIcon (fn [] (str "[[" username "]] ")) nil nil]))))


;; [ "Block Embed" #(str "[[" (:title (dates/get-day 1)) "]]")]
Expand Down
16 changes: 16 additions & 0 deletions src/js/components/Icons/Icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,22 @@ export const PencilLineIcon = createIcon({
),
});

export const PersonIcon = createIcon({
displayName: 'PersonIcon',
viewBox: '0 0 24 24',
path: (
<path fillRule="evenodd" clipRule="evenodd" d="M12 11C14.4853 11 16.5 8.98528 16.5 6.5C16.5 4.01472 14.4853 2 12 2C9.51472 2 7.5 4.01472 7.5 6.5C7.5 8.98528 9.51472 11 12 11ZM7 13C5.34315 13 4 14.3431 4 16V16.4162C4 19.1224 5.79954 21.5773 8.47335 21.9946C10.9235 22.377 13.0786 22.3777 15.5298 21.9952C18.2022 21.5781 20 19.1239 20 16.4191V16C20 14.3431 18.6569 13 17 13H7Z" fill="currentColor" />
),
});

export const PersonCircleIcon = createIcon({
displayName: 'PersonCircleIcon',
viewBox: '0 0 24 24',
path: (
<path fillRule="evenodd" clipRule="evenodd" d="M6.89699 18.1614C6.74688 17.7243 6.66667 17.2558 6.66667 16.7764C6.66667 15.6112 7.61124 14.6667 8.77643 14.6667H15.2228C16.3884 14.6667 17.3333 15.6116 17.3333 16.7772C17.3333 17.2561 17.2533 17.7242 17.1035 18.161C18.873 16.6936 20 14.4784 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 14.4786 5.12722 16.694 6.89699 18.1614ZM22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12ZM15 10.3333C15 11.9902 13.6569 13.3333 12 13.3333C10.3431 13.3333 9 11.9902 9 10.3333C9 8.67648 10.3431 7.33333 12 7.33333C13.6569 7.33333 15 8.67648 15 10.3333Z" fill="currentColor" />
),
});

export const PlusIcon = createIcon({
displayName: 'PlusIcon',
viewBox: '0 0 24 24',
Expand Down

0 comments on commit 35aa390

Please sign in to comment.