fix(pic-view): masonry button icon
Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
+43
-48
@@ -1,5 +1,4 @@
|
||||
import { useMobile } from "@follow/components/hooks/useMobile.js"
|
||||
import { AutoResizeHeight } from "@follow/components/ui/auto-resize-height/index.js"
|
||||
import { ActionButton } from "@follow/components/ui/button/index.js"
|
||||
import { SegmentGroup, SegmentItem } from "@follow/components/ui/segment/index.js"
|
||||
import { Switch } from "@follow/components/ui/switch/index.js"
|
||||
@@ -39,57 +38,53 @@ export const SwitchToMasonryButton = () => {
|
||||
"data-[state=closed]:slide-out-to-top-5 data-[state=open]:slide-in-from-top-5",
|
||||
"data-[state=closed]:slide-in-from-top-0 data-[state=open]:slide-in-from-top-0",
|
||||
"transition-all duration-200 ease-in-out",
|
||||
"px-3 py-2",
|
||||
"p-3",
|
||||
)}
|
||||
>
|
||||
<AutoResizeHeight>
|
||||
<div className="flex flex-col gap-3">
|
||||
<div className="flex items-center">
|
||||
<label className="mr-2 w-[120px] text-sm">
|
||||
{t("entry_list_header.preview_mode")}
|
||||
</label>
|
||||
<SegmentGroup
|
||||
className="h-8"
|
||||
value={isMasonry ? "masonry" : "grid"}
|
||||
onValueChanged={(v) => {
|
||||
setUISetting("pictureViewMasonry", v === "masonry")
|
||||
}}
|
||||
>
|
||||
<SegmentItem
|
||||
key="Grid"
|
||||
value="grid"
|
||||
label={
|
||||
<div className="flex items-center gap-1 text-sm">
|
||||
<i className="i-mgc-grid-2-cute-re" />
|
||||
<span>{t("entry_list_header.grid")}</span>
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
<SegmentItem
|
||||
key="Masonry"
|
||||
value="masonry"
|
||||
label={
|
||||
<div className="flex items-center gap-1 text-sm">
|
||||
<i className="i-mgc-grid-cute-re" />
|
||||
<span>{t("entry_list_header.masonry")}</span>
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
</SegmentGroup>
|
||||
</div>
|
||||
<div className="flex items-center justify-between">
|
||||
<label className="mr-2 w-[120px] text-sm">
|
||||
{t("entry_list_header.image_only")}
|
||||
</label>
|
||||
<Switch
|
||||
checked={isImageOnly}
|
||||
onCheckedChange={(checked) => {
|
||||
setUISetting("pictureViewImageOnly", checked)
|
||||
}}
|
||||
<div className="flex flex-col gap-3">
|
||||
<div className="flex items-center">
|
||||
<label className="mr-2 w-[120px] text-sm">
|
||||
{t("entry_list_header.preview_mode")}
|
||||
</label>
|
||||
<SegmentGroup
|
||||
className="h-8"
|
||||
value={isMasonry ? "masonry" : "grid"}
|
||||
onValueChanged={(v) => {
|
||||
setUISetting("pictureViewMasonry", v === "masonry")
|
||||
}}
|
||||
>
|
||||
<SegmentItem
|
||||
key="Grid"
|
||||
value="grid"
|
||||
label={
|
||||
<div className="flex items-center gap-1 text-sm">
|
||||
<i className="i-mgc-grid-cute-re" />
|
||||
<span>{t("entry_list_header.grid")}</span>
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
<SegmentItem
|
||||
key="Masonry"
|
||||
value="masonry"
|
||||
label={
|
||||
<div className="flex items-center gap-1 text-sm">
|
||||
<i className="i-mgc-grid-2-cute-re" />
|
||||
<span>{t("entry_list_header.masonry")}</span>
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
</SegmentGroup>
|
||||
</div>
|
||||
</AutoResizeHeight>
|
||||
<div className="flex items-center justify-between">
|
||||
<label className="mr-2 w-[120px] text-sm">{t("entry_list_header.image_only")}</label>
|
||||
<Switch
|
||||
checked={isImageOnly}
|
||||
onCheckedChange={(checked) => {
|
||||
setUISetting("pictureViewImageOnly", checked)
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</HoverCardContent>
|
||||
</HoverCardPortal>
|
||||
</HoverCard>
|
||||
|
||||
Reference in New Issue
Block a user