Add GIF search button
This commit is contained in:
@@ -220,6 +220,7 @@
|
||||
@import "./views/elements/_ToggleSwitch.pcss";
|
||||
@import "./views/elements/_Validation.pcss";
|
||||
@import "./views/emojipicker/_EmojiPicker.pcss";
|
||||
@import "./views/gifpicker/_GifPicker.pcss";
|
||||
@import "./views/location/_LocationPicker.pcss";
|
||||
@import "./views/messages/_CallEvent.pcss";
|
||||
@import "./views/messages/_CreateEvent.pcss";
|
||||
|
||||
232
res/css/views/gifpicker/_GifPicker.pcss
Normal file
232
res/css/views/gifpicker/_GifPicker.pcss
Normal file
@@ -0,0 +1,232 @@
|
||||
/*
|
||||
Copyright 2024 New Vector Ltd.
|
||||
Copyright 2019 Tulir Asokan <tulir@maunium.net>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
.mx_GifPicker {
|
||||
width: 340px;
|
||||
height: 450px;
|
||||
|
||||
border-radius: 4px;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.mx_GifPicker_body {
|
||||
height: 340px;
|
||||
flex: 1;
|
||||
overflow-y: scroll;
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: rgb(0, 0, 0, 0.2) transparent;
|
||||
}
|
||||
|
||||
.mx_GifPicker_header {
|
||||
padding: 4px 8px 0;
|
||||
border-bottom: 1px solid $message-action-bar-border-color;
|
||||
}
|
||||
|
||||
.mx_GifPicker_anchor {
|
||||
border: none;
|
||||
padding: 8px 8px 6px;
|
||||
border-bottom: 2px solid transparent;
|
||||
background-color: transparent;
|
||||
border-radius: 4px 4px 0 0;
|
||||
|
||||
width: 36px;
|
||||
height: 38px;
|
||||
|
||||
&:not(:disabled) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&:not(:disabled):hover {
|
||||
background-color: $focus-bg-color;
|
||||
border-bottom: 2px solid $accent;
|
||||
}
|
||||
}
|
||||
|
||||
.mx_GifPicker_anchor::before {
|
||||
background-color: $primary-content;
|
||||
content: "";
|
||||
display: inline-block;
|
||||
mask-size: 100%;
|
||||
mask-repeat: no-repeat;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.mx_GifPicker_anchor:disabled::before {
|
||||
background-color: $focus-bg-color;
|
||||
}
|
||||
|
||||
.mx_GifPicker_anchor_visible {
|
||||
border-bottom: 2px solid $accent;
|
||||
}
|
||||
|
||||
.mx_GifPicker_search {
|
||||
margin: 8px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid $input-border-color;
|
||||
background-color: $background;
|
||||
display: flex;
|
||||
|
||||
input {
|
||||
flex: 1;
|
||||
border: none;
|
||||
padding: 8px 12px;
|
||||
border-radius: 4px 0;
|
||||
|
||||
&::placeholder {
|
||||
color: var(--cpd-color-text-secondary);
|
||||
}
|
||||
}
|
||||
|
||||
button {
|
||||
border: none;
|
||||
background-color: inherit;
|
||||
margin: 0;
|
||||
padding: 8px;
|
||||
align-self: center;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
}
|
||||
|
||||
.mx_GifPicker_search_clear {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.mx_GifPicker_search_icon {
|
||||
width: 16px;
|
||||
margin: 8px;
|
||||
}
|
||||
|
||||
.mx_GifPicker_search_icon:not(.mx_GifPicker_search_clear) {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.mx_GifPicker_search_icon::after {
|
||||
mask: url("$(res)/img/emojipicker/search.svg") no-repeat;
|
||||
mask-size: 100%;
|
||||
background-color: $primary-content;
|
||||
content: "";
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.mx_GifPicker_search_clear::after {
|
||||
mask-image: url("$(res)/img/emojipicker/delete.svg");
|
||||
}
|
||||
|
||||
.mx_GifPicker_category {
|
||||
padding: 0 12px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.mx_GifPicker_category_label {
|
||||
width: 304px;
|
||||
}
|
||||
|
||||
.mx_GifPicker_list {
|
||||
width: 304px;
|
||||
padding: 4px;
|
||||
margin: 4px;
|
||||
}
|
||||
|
||||
.mx_GifPicker_item_wrapper {
|
||||
display: inline-block;
|
||||
list-style: none;
|
||||
width: 38px;
|
||||
cursor: pointer;
|
||||
|
||||
&:focus-within {
|
||||
background-color: $focus-bg-color;
|
||||
}
|
||||
}
|
||||
|
||||
.mx_GifPicker_body .mx_GifPicker_item_wrapper[tabindex="0"] .mx_GifPicker_item {
|
||||
background-color: $focus-bg-color;
|
||||
}
|
||||
|
||||
.mx_GifPicker_item {
|
||||
display: inline-block;
|
||||
font-size: $font-20px;
|
||||
padding: 5px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
border-radius: 4px;
|
||||
|
||||
&:hover {
|
||||
background-color: $focus-bg-color;
|
||||
}
|
||||
}
|
||||
|
||||
.mx_GifPicker_item_selected {
|
||||
color: rgb(0, 0, 0, 0.5);
|
||||
border: 1px solid $accent;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.mx_GifPicker_category_label,
|
||||
.mx_GifPicker_preview_name {
|
||||
font-size: $font-16px;
|
||||
font-weight: var(--cpd-font-weight-semibold);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.mx_GifPicker_footer {
|
||||
border-top: 1px solid $message-action-bar-border-color;
|
||||
min-height: 72px;
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.mx_GifPicker_footer .mx_GifPicker_preview {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
.mx_GifPicker_preview_text {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
padding-top: 1rem;
|
||||
padding-bottom: 1rem;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.mx_GifPicker_name {
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
.mx_GifPicker_shortcode {
|
||||
color: $light-fg-color;
|
||||
overflow-wrap: break-word;
|
||||
font: var(--cpd-font-body-md-regular);
|
||||
|
||||
&::before,
|
||||
&::after {
|
||||
content: ":";
|
||||
}
|
||||
}
|
||||
|
||||
.mx_GifPicker_quick {
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
.mx_GifPicker_quick_header .mx_GifPicker_name {
|
||||
margin-right: 4px;
|
||||
}
|
||||
@@ -173,6 +173,14 @@ Please see LICENSE files in the repository root for full details.
|
||||
}
|
||||
}
|
||||
|
||||
.mx_GifButton_icon {
|
||||
mask-image: url("$(res)/img/element-icons/room/composer/gif.svg");
|
||||
mask-repeat: no-repeat;
|
||||
mask-size: contain;
|
||||
mask-position: center;
|
||||
}
|
||||
|
||||
|
||||
.mx_MessageComposer_input_error {
|
||||
animation: 0.2s visualbell;
|
||||
}
|
||||
|
||||
65
res/img/element-icons/room/composer/gif.svg
Normal file
65
res/img/element-icons/room/composer/gif.svg
Normal file
@@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="20"
|
||||
height="20"
|
||||
viewBox="0 0 5.2916668 5.2916668"
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
inkscape:version="1.4 (e7c3feb1, 2024-10-09)"
|
||||
sodipodi:docname="gif.svg"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<defs
|
||||
id="defs1" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.3"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="38.308866"
|
||||
inkscape:cx="10.219566"
|
||||
inkscape:cy="10.493654"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1027"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="25"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg1"
|
||||
showgrid="false" />
|
||||
<metadata
|
||||
id="metadata1">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.38965px;font-family:Arial;-inkscape-font-specification:Arial;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke-width:0.199137"
|
||||
x="0.71999276"
|
||||
y="3.4290404"
|
||||
id="text3"
|
||||
transform="scale(0.97275981,1.028003)"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3"
|
||||
style="fill:#737d8c;fill-opacity:1;stroke-width:0.199137"
|
||||
x="0.71999276"
|
||||
y="3.4290404">GIF</tspan></text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
Reference in New Issue
Block a user