feat: add mock emoji menu in popup menu for chat

This commit is contained in:
Jonathan Rainville 2020-07-20 14:46:15 -04:00 committed by Iuri Matias
parent 8dc7f1dd62
commit 15cc48c6f8
9 changed files with 150 additions and 1 deletions

View File

@ -92,6 +92,52 @@ StackLayout {
PopupMenu {
id: messageContextMenu
width: emojiRow.width
Row {
id: emojiRow
spacing: Style.current.smallPadding
leftPadding: Style.current.smallPadding
rightPadding: Style.current.smallPadding
bottomPadding: Style.current.padding
SVGImage {
source: "../../img/emojiReactions/heart.svg"
width: 32
fillMode: Image.PreserveAspectFit
}
SVGImage {
source: "../../img/emojiReactions/thumbsUp.svg"
width: 32
fillMode: Image.PreserveAspectFit
}
SVGImage {
source: "../../img/emojiReactions/thumbsDown.svg"
width: 32
fillMode: Image.PreserveAspectFit
}
SVGImage {
source: "../../img/emojiReactions/laughing.svg"
width: 32
fillMode: Image.PreserveAspectFit
}
SVGImage {
source: "../../img/emojiReactions/sad.svg"
width: 32
fillMode: Image.PreserveAspectFit
}
SVGImage {
source: "../../img/emojiReactions/angry.svg"
width: 32
fillMode: Image.PreserveAspectFit
}
}
Separator {
anchors.topMargin: 0
anchors.top: emojiRow.bottom
}
Action {
id: viewProfileAction
//% "View profile"

View File

@ -54,6 +54,8 @@ Item {
SelectedMessage.set(messageId, fromAuthor);
profileClick(userName, fromAuthor, identicon);
messageContextMenu.popup()
// Position the center of the menu where the mouse is
messageContextMenu.x = messageContextMenu.x - messageContextMenu.width / 2
}
Loader {

View File

@ -0,0 +1,18 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="16" cy="16" r="16" fill="url(#paint0_linear)"/>
<circle cx="16" cy="16" r="16" fill="url(#paint1_radial)"/>
<path d="M7.34466 11.1957C6.90048 11.0054 6.38609 11.2111 6.19573 11.6553C6.00537 12.0995 6.21112 12.6139 6.6553 12.8042L8.76714 13.7093C9.04923 13.8302 9.15106 14.1764 9.07031 14.4725C9.02447 14.6405 9 14.8174 9 15C9 16.1046 9.89543 17 11 17C11.8304 17 12.5426 16.4939 12.845 15.7734C12.9044 15.6319 13.0652 15.5513 13.2062 15.6118L13.6553 15.8042C14.0995 15.9946 14.6139 15.7888 14.8042 15.3447C14.9946 14.9005 14.7888 14.3861 14.3447 14.1957L7.34466 11.1957Z" fill="#424242"/>
<path d="M24.6601 11.1957C25.1043 11.0054 25.6187 11.2111 25.809 11.6553C25.9994 12.0995 25.7936 12.6139 25.3494 12.8042L23.2376 13.7093C22.9555 13.8302 22.8537 14.1764 22.9344 14.4725C22.9803 14.6405 23.0047 14.8174 23.0047 15C23.0047 16.1046 22.1093 17 21.0047 17C20.1744 17 19.4622 16.4939 19.1598 15.7734C19.1004 15.6319 18.9396 15.5513 18.7985 15.6118L18.3494 15.8042C17.9053 15.9946 17.3909 15.7888 17.2005 15.3447C17.0102 14.9005 17.2159 14.3861 17.6601 14.1957L24.6601 11.1957Z" fill="#424242"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M16 21.875C14.2182 21.875 12.6482 22.7835 11.7286 24.1667C11.4611 24.5691 10.9179 24.6784 10.5155 24.4108C10.1131 24.1433 10.0038 23.6002 10.2713 23.1977C11.5015 21.3475 13.6078 20.125 16 20.125C18.3921 20.125 20.4984 21.3475 21.7286 23.1977C21.9962 23.6002 21.8869 24.1433 21.4844 24.4108C21.082 24.6784 20.5389 24.5691 20.2713 24.1667C19.3517 22.7835 17.7817 21.875 16 21.875Z" fill="#772622"/>
<defs>
<linearGradient id="paint0_linear" x1="16" y1="0" x2="16" y2="32" gradientUnits="userSpaceOnUse">
<stop offset="0.110497" stop-color="#EA6433"/>
<stop offset="0.546961" stop-color="#F2B660"/>
<stop offset="1" stop-color="#FFBA49"/>
</linearGradient>
<radialGradient id="paint1_radial" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(21.5 6.5) rotate(124.563) scale(27.3222 35.4697)">
<stop stop-color="#FFD764" stop-opacity="0.2"/>
<stop offset="1" stop-color="#FFB746" stop-opacity="0.1"/>
</radialGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -0,0 +1,10 @@
<svg width="30" height="27" viewBox="0 0 30 27" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0 8C0 17 10.5817 27 15 27C19.4183 27 30 17 30 8C30 3.58172 27 0 23 0C19.4845 0 16.4987 1.58271 15.4252 5C15.2126 5.5 15.1063 5.5 15 5.5C14.8937 5.5 14.7874 5.5 14.5748 5C13.5013 1.58271 10.5155 0 7 0C3 0 0 3.58172 0 8Z" fill="#E45852"/>
<path d="M0 8C0 17 10.5817 27 15 27C19.4183 27 30 17 30 8C30 3.58172 27 0 23 0C19.4845 0 16.4987 1.58271 15.4252 5C15.2126 5.5 15.1063 5.5 15 5.5C14.8937 5.5 14.7874 5.5 14.5748 5C13.5013 1.58271 10.5155 0 7 0C3 0 0 3.58172 0 8Z" fill="url(#paint0_radial)"/>
<defs>
<radialGradient id="paint0_radial" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(15 7.55217) rotate(93.8972) scale(20.6905 19.79)">
<stop stop-color="#F05D56"/>
<stop offset="1" stop-color="#D15954"/>
</radialGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 877 B

View File

@ -0,0 +1,15 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="16" cy="16" r="16" fill="#FFD764"/>
<circle cx="16" cy="16" r="16" fill="url(#paint0_radial)"/>
<path d="M25 19.5C25 23.9183 20 27 16 27C12 27 7 23.9183 7 19.5C7 17.5 11.5 16.5 16 16.5C20.5 16.5 25 17.5 25 19.5Z" fill="#772622"/>
<path d="M21.3581 18.7491C20.4778 18.4528 18.6917 18 16 18C13.3082 18 11.5222 18.4528 10.6418 18.7491C10.2801 18.8708 10.1383 19.2767 10.309 19.618C10.426 19.8521 10.6641 20 10.9259 20H21.0741C21.3358 20 21.5739 19.8521 21.691 19.618C21.8616 19.2767 21.7198 18.8708 21.3581 18.7491Z" fill="white"/>
<path d="M18.9444 23.7709C19.3839 24.0189 19.3559 24.6266 18.8996 24.8423C18.006 25.2648 17.0125 25.5 16 25.5C14.9874 25.5 13.994 25.2648 13.1003 24.8423C12.644 24.6266 12.6161 24.0189 13.0555 23.7709C13.9254 23.2801 14.93 23 16 23C17.0699 23 18.0745 23.2801 18.9444 23.7709Z" fill="#E45852"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.20292 9.31486C8.51229 8.94362 9.06404 8.89346 9.43528 9.20283L12.4353 11.7028C12.7183 11.9387 12.8233 12.3265 12.6979 12.6729C12.5724 13.0193 12.2435 13.25 11.8751 13.25C10.4878 13.25 8.467 13.6992 7.33899 14.4045C6.92924 14.6607 6.38939 14.5362 6.1332 14.1265C5.87701 13.7167 6.00149 13.1768 6.41124 12.9207C7.18203 12.4387 8.19276 12.0738 9.21224 11.8346C9.41747 11.7864 9.48461 11.5219 9.32266 11.387L8.31496 10.5472C7.94371 10.2378 7.89355 9.6861 8.20292 9.31486Z" fill="#424242"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M23.7971 9.31486C23.4877 8.94362 22.936 8.89346 22.5647 9.20283L19.5647 11.7028C19.2817 11.9387 19.1767 12.3265 19.3021 12.6729C19.4276 13.0193 19.7565 13.25 20.1249 13.25C21.5122 13.25 23.533 13.6992 24.661 14.4045C25.0708 14.6607 25.6106 14.5362 25.8668 14.1265C26.123 13.7167 25.9985 13.1768 25.5888 12.9207C24.818 12.4387 23.8072 12.0738 22.7878 11.8346C22.5825 11.7864 22.5154 11.5219 22.6773 11.387L23.685 10.5472C24.0563 10.2378 24.1064 9.6861 23.7971 9.31486Z" fill="#424242"/>
<defs>
<radialGradient id="paint0_radial" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(21.5 6.5) rotate(124.563) scale(27.3222 35.4697)">
<stop stop-color="#FFD764"/>
<stop offset="1" stop-color="#FFB746"/>
</radialGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -0,0 +1,28 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="16" cy="16" r="16" fill="#FFD764"/>
<circle cx="16" cy="16" r="16" fill="url(#paint0_radial)"/>
<path d="M10.7808 22.5058C10.4931 24.1375 8.93709 25.227 7.30541 24.9393C5.67373 24.6516 4.58422 23.0956 4.87193 21.4639C5.14012 19.9429 6.87085 17.6332 8.37126 17.1389C8.57676 17.0712 8.80178 17.1109 8.97173 17.2448C10.2126 18.2224 11.049 20.9848 10.7808 22.5058Z" fill="url(#paint1_linear)"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M16 21.875C14.7351 21.875 13.8832 22.2867 12.8913 22.7826C12.4591 22.9987 11.9335 22.8235 11.7174 22.3913C11.5013 21.9591 11.6765 21.4335 12.1087 21.2174L12.114 21.2147C13.121 20.7112 14.2934 20.125 16 20.125C17.7069 20.125 18.8627 20.703 19.8631 21.2033L19.8913 21.2174C20.3236 21.4335 20.4987 21.9591 20.2826 22.3913C20.0665 22.8235 19.5409 22.9987 19.1087 22.7826C18.1156 22.2861 17.277 21.875 16 21.875Z" fill="#772622"/>
<path d="M26.0828 23.693C26.2986 24.9168 25.4815 26.0838 24.2577 26.2996C23.0339 26.5154 21.867 25.6982 21.6512 24.4745C21.4547 23.3602 22.0487 21.3575 22.9437 20.5818C23.1072 20.4401 23.3348 20.4 23.5369 20.4772C24.6432 20.9 25.8863 22.5788 26.0828 23.693Z" fill="url(#paint2_linear)"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M8 11.125C8.48325 11.125 8.875 11.5168 8.875 12C8.875 12.5512 9.0549 12.9425 9.30622 13.1938C9.55754 13.4451 9.94884 13.625 10.5 13.625C11.0512 13.625 11.4425 13.4451 11.6938 13.1938C11.9451 12.9425 12.125 12.5512 12.125 12C12.125 11.5168 12.5168 11.125 13 11.125C13.4832 11.125 13.875 11.5168 13.875 12C13.875 12.9488 13.5549 13.8075 12.9312 14.4312C12.3075 15.0549 11.4488 15.375 10.5 15.375C9.55116 15.375 8.69246 15.0549 8.06878 14.4312C7.4451 13.8075 7.125 12.9488 7.125 12C7.125 11.5168 7.51675 11.125 8 11.125Z" fill="#424242"/>
<path d="M24.3885 16.462C24.5324 17.2779 23.9876 18.0558 23.1718 18.1997C22.356 18.3435 21.578 17.7988 21.4341 16.983C21.3091 16.2742 21.6639 15.0262 22.215 14.464C22.3665 14.3095 22.598 14.2687 22.7932 14.3621C23.5034 14.7019 24.2636 15.7532 24.3885 16.462Z" fill="url(#paint3_linear)"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M19 11.125C19.4832 11.125 19.875 11.5168 19.875 12C19.875 12.5512 20.0549 12.9425 20.3062 13.1938C20.5575 13.4451 20.9488 13.625 21.5 13.625C22.0512 13.625 22.4425 13.4451 22.6938 13.1938C22.9451 12.9425 23.125 12.5512 23.125 12C23.125 11.5168 23.5168 11.125 24 11.125C24.4832 11.125 24.875 11.5168 24.875 12C24.875 12.9488 24.5549 13.8075 23.9312 14.4312C23.3075 15.0549 22.4488 15.375 21.5 15.375C20.5512 15.375 19.6925 15.0549 19.0688 14.4312C18.4451 13.8075 18.125 12.9488 18.125 12C18.125 11.5168 18.5168 11.125 19 11.125Z" fill="#424242"/>
<defs>
<radialGradient id="paint0_radial" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(21.5 6.5) rotate(124.563) scale(27.3222 35.4697)">
<stop stop-color="#FFD764"/>
<stop offset="1" stop-color="#FFB746"/>
</radialGradient>
<linearGradient id="paint1_linear" x1="8.6946" y1="17.0608" x2="7.30541" y2="24.9393" gradientUnits="userSpaceOnUse">
<stop stop-color="#6BC2FF"/>
<stop offset="1" stop-color="#2196E8"/>
</linearGradient>
<linearGradient id="paint2_linear" x1="23.2158" y1="20.3907" x2="24.2577" y2="26.2996" gradientUnits="userSpaceOnUse">
<stop stop-color="#6BC2FF"/>
<stop offset="1" stop-color="#2196E8"/>
</linearGradient>
<linearGradient id="paint3_linear" x1="22.4772" y1="14.2605" x2="23.1718" y2="18.1997" gradientUnits="userSpaceOnUse">
<stop stop-color="#6BC2FF"/>
<stop offset="1" stop-color="#2196E8"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -0,0 +1,15 @@
<svg width="31" height="32" viewBox="0 0 31 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M8 28.1932C8 30.6932 10.567 31.6932 12.5 31.6932C14.433 31.6932 15 30.1262 15 28.1932C15 27.0288 14.5 26.1932 14.5 24.8032C14.5 21.6932 16.6653 20.1943 18 19.1932C20 17.6932 24 17.6931 24 13.6932C24 8.19318 18.5 2.69324 12 2.69324C5.37256 2.69324 0 8.0658 0 14.6932C0 20.4916 3.73569 23.4882 8.95072 20.5242C9.23351 20.3635 9.60055 20.494 9.64409 20.8163C9.82094 22.1255 9.25729 23.4781 8.66187 24.8032C8 26.1932 8 27.1932 8 28.1932Z" fill="#FFD764"/>
<path d="M8 28.1932C8 30.6932 10.567 31.6932 12.5 31.6932C14.433 31.6932 15 30.1262 15 28.1932C15 27.0288 14.5 26.1932 14.5 24.8032C14.5 21.6932 16.6653 20.1943 18 19.1932C20 17.6932 24 17.6931 24 13.6932C24 8.19318 18.5 2.69324 12 2.69324C5.37256 2.69324 0 8.0658 0 14.6932C0 20.4916 3.73569 23.4882 8.95072 20.5242C9.23351 20.3635 9.60055 20.494 9.64409 20.8163C9.82094 22.1255 9.25729 23.4781 8.66187 24.8032C8 26.1932 8 27.1932 8 28.1932Z" fill="url(#paint0_radial)"/>
<path d="M20.2524 1.25946C20.3589 0.407639 21.1616 -0.188879 21.9847 0.0550213C29.5989 2.31131 33.4248 10.6358 29.3368 17.5739C29.1161 17.9486 28.6645 18.1121 28.2464 17.9927L26.5547 17.5093C25.9703 17.3423 25.6726 16.6949 25.807 16.1022C26.764 11.8803 23.6546 5.95321 20.6127 4.045C20.2352 3.80818 19.9863 3.38863 20.0416 2.94643L20.2524 1.25946Z" fill="url(#paint1_linear)"/>
<defs>
<radialGradient id="paint0_radial" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(10 19.5) rotate(-61.9275) scale(17 19.7757)">
<stop stop-color="#FFD764"/>
<stop offset="1" stop-color="#FFB746"/>
</radialGradient>
<linearGradient id="paint1_linear" x1="25.517" y1="18.0312" x2="25.517" y2="-5.72205e-06" gradientUnits="userSpaceOnUse">
<stop stop-color="#2196E8"/>
<stop offset="1" stop-color="#6BC2FF"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -0,0 +1,15 @@
<svg width="31" height="32" viewBox="0 0 31 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M10.7476 30.4337C10.6411 31.2855 9.8384 31.8821 9.01532 31.6382C1.40113 29.3819 -2.42484 21.0574 1.66318 14.1193C1.88394 13.7446 2.33551 13.581 2.75365 13.7005L4.44534 14.1839C5.02971 14.3508 5.32739 14.9982 5.19303 15.5909C4.23597 19.8129 7.34541 25.74 10.3873 27.6482C10.7648 27.885 11.0137 28.3045 10.9584 28.7468L10.7476 30.4337Z" fill="url(#paint0_linear)"/>
<path d="M23 3.5C23 1.5 21.5 0 19 0C17 0 16 1.56702 16 3.5C16 4.66436 16.5 5.5 16.5 6.88995C16.5 10 15 11.4999 13 12.4999C11 13.5 7 13.5 7 18C7 23.5 12.5 28.9999 19 28.9999C25.5 28.9999 31 24 31 16.9999C31 11.4137 27.5326 8.42798 22.6155 10.8675C22.0327 11.1566 21.3014 10.8917 21.2933 10.2412C21.2797 9.16079 21.6399 8.08039 22 7C22.5 5.5 23 4.5 23 3.5Z" fill="#FFD764"/>
<path d="M23 3.5C23 1.5 21.5 0 19 0C17 0 16 1.56702 16 3.5C16 4.66436 16.5 5.5 16.5 6.88995C16.5 10 15 11.4999 13 12.4999C11 13.5 7 13.5 7 18C7 23.5 12.5 28.9999 19 28.9999C25.5 28.9999 31 24 31 16.9999C31 11.4137 27.5326 8.42798 22.6155 10.8675C22.0327 11.1566 21.3014 10.8917 21.2933 10.2412C21.2797 9.16079 21.6399 8.08039 22 7C22.5 5.5 23 4.5 23 3.5Z" fill="url(#paint1_radial)"/>
<defs>
<linearGradient id="paint0_linear" x1="5.48305" y1="13.662" x2="5.48305" y2="31.6932" gradientUnits="userSpaceOnUse">
<stop stop-color="#6BC2FF"/>
<stop offset="1" stop-color="#2196E8"/>
</linearGradient>
<radialGradient id="paint1_radial" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(21 12) rotate(119.539) scale(17.2409 20.056)">
<stop stop-color="#FFD764"/>
<stop offset="1" stop-color="#FFB746"/>
</radialGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

2
vendor/status-go vendored

@ -1 +1 @@
Subproject commit 0b3cdf7362bbdf9ba7fc11da803105f9417dfbac
Subproject commit 2d13ccf5ec3db7e48d7a96a7954be57edb96f12f