تنظیمات
پیشنمایش تمامصفحهاعلانها، ترجیحات، تغییر رمز و حذف حساب با تأیید.
۱. نصب کامپوننتها
این بلاک از ۱۰ آیتم دیگ استفاده میکند: alert-dialogbuttoncardcontrol-sizelabelpassword-fieldselectswitchtabstoast
npx digdesign@latest add https://docs.digdesign.ir/r/alert-dialog.json https://docs.digdesign.ir/r/button.json https://docs.digdesign.ir/r/card.json https://docs.digdesign.ir/r/control-size.json https://docs.digdesign.ir/r/label.json https://docs.digdesign.ir/r/password-field.json https://docs.digdesign.ir/r/select.json https://docs.digdesign.ir/r/switch.json https://docs.digdesign.ir/r/tabs.json https://docs.digdesign.ir/r/toast.jsonpnpm dlx digdesign@latest add https://docs.digdesign.ir/r/alert-dialog.json https://docs.digdesign.ir/r/button.json https://docs.digdesign.ir/r/card.json https://docs.digdesign.ir/r/control-size.json https://docs.digdesign.ir/r/label.json https://docs.digdesign.ir/r/password-field.json https://docs.digdesign.ir/r/select.json https://docs.digdesign.ir/r/switch.json https://docs.digdesign.ir/r/tabs.json https://docs.digdesign.ir/r/toast.jsonyarn dlx digdesign@latest add https://docs.digdesign.ir/r/alert-dialog.json https://docs.digdesign.ir/r/button.json https://docs.digdesign.ir/r/card.json https://docs.digdesign.ir/r/control-size.json https://docs.digdesign.ir/r/label.json https://docs.digdesign.ir/r/password-field.json https://docs.digdesign.ir/r/select.json https://docs.digdesign.ir/r/switch.json https://docs.digdesign.ir/r/tabs.json https://docs.digdesign.ir/r/toast.jsonbunx --bun digdesign@latest add https://docs.digdesign.ir/r/alert-dialog.json https://docs.digdesign.ir/r/button.json https://docs.digdesign.ir/r/card.json https://docs.digdesign.ir/r/control-size.json https://docs.digdesign.ir/r/label.json https://docs.digdesign.ir/r/password-field.json https://docs.digdesign.ir/r/select.json https://docs.digdesign.ir/r/switch.json https://docs.digdesign.ir/r/tabs.json https://docs.digdesign.ir/r/toast.jsonnpx digdesign@latest add alert-dialog button card control-size label password-field select switch tabs toast --framework vuepnpm dlx digdesign@latest add alert-dialog button card control-size label password-field select switch tabs toast --framework vueyarn dlx digdesign@latest add alert-dialog button card control-size label password-field select switch tabs toast --framework vuebunx --bun digdesign@latest add alert-dialog button card control-size label password-field select switch tabs toast --framework vuenpx digdesign@latest add button --framework sveltepnpm dlx digdesign@latest add button --framework svelteyarn dlx digdesign@latest add button --framework sveltebunx --bun digdesign@latest add button --framework sveltenpx digdesign@latest add alert-dialog button card control-size label password-field select switch tabs toast --framework angularpnpm dlx digdesign@latest add alert-dialog button card control-size label password-field select switch tabs toast --framework angularyarn dlx digdesign@latest add alert-dialog button card control-size label password-field select switch tabs toast --framework angularbunx --bun digdesign@latest add alert-dialog button card control-size label password-field select switch tabs toast --framework angularnpx digdesign@latest add alert-dialog button card control-size label password-field select switch tabs toast --framework androidpnpm dlx digdesign@latest add alert-dialog button card control-size label password-field select switch tabs toast --framework androidyarn dlx digdesign@latest add alert-dialog button card control-size label password-field select switch tabs toast --framework androidbunx --bun digdesign@latest add alert-dialog button card control-size label password-field select switch tabs toast --framework android۲. کد صفحه
کد را در صفحهٔ پروژهتان بگذارید (React: app/<route>/page.tsx) و متنها، داده و هندلرها را با محصول خودتان عوض کنید. با سوییچر فریمورک کدِ همین صفحه در فریمورک دیگر را ببینید.
"use client"
import * as React from "react"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "@/components/ui/card"
import { ControlSizeProvider } from "@/components/ui/control-size"
import { Label } from "@/components/ui/label"
import { PasswordField } from "@/components/ui/password-field"
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"
import { Switch } from "@/components/ui/switch"
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"
import { toast } from "@/components/ui/toast"
const NOTIFICATIONS = [
{ id: "orders", label: "وضعیت سفارشها", description: "پیامک هنگام ارسال و تحویل", on: true },
{ id: "offers", label: "پیشنهادها و تخفیفها", description: "ایمیل هفتگی", on: false },
{ id: "login", label: "ورود از دستگاه تازه", description: "هشدار فوری امنیتی", on: true },
]
export default function SettingsBlock() {
return (
<ControlSizeProvider size="xl" asChild>
<main className="mx-auto w-full max-w-2xl p-4 sm:p-6">
<header className="mb-8">
<div className="flex flex-col gap-1">
<h1 className="text-2xl font-bold">تنظیمات</h1>
<p className="text-sm text-muted-foreground">اعلانها، ترجیحات نمایش و امنیت حساب.</p>
</div>
</header>
<ControlSizeProvider size="xl">
<Tabs defaultValue="notifications" className="gap-4">
<TabsList>
<TabsTrigger value="notifications">اعلانها</TabsTrigger>
<TabsTrigger value="preferences">ترجیحات</TabsTrigger>
<TabsTrigger value="security">امنیت</TabsTrigger>
</TabsList>
<TabsContent value="notifications">
<Card>
<CardHeader>
<CardTitle>اعلانها</CardTitle>
<CardDescription>انتخاب کنید دربارهٔ چه چیزهایی باخبر شوید.</CardDescription>
</CardHeader>
<CardContent className="flex flex-col divide-y divide-border">
{NOTIFICATIONS.map((item) => (
<div key={item.id} className="flex items-center justify-between gap-4 py-3">
<div className="flex flex-col gap-1">
<Label htmlFor={`notify-${item.id}`}>{item.label}</Label>
<p className="text-xs text-muted-foreground">{item.description}</p>
</div>
<Switch
id={`notify-${item.id}`}
defaultChecked={item.on}
// پیام باید بگوید کدام تنظیم و به کدام حالت رفت، نه فقط «ذخیره شد».
onCheckedChange={(on) =>
on
? toast.success(`«${item.label}» روشن شد.`, { description: item.description })
: toast(`«${item.label}» خاموش شد.`, { description: "دیگر برایش اعلانی نمیفرستیم." })
}
/>
</div>
))}
</CardContent>
</Card>
</TabsContent>
<TabsContent value="preferences">
<Card>
<CardHeader>
<CardTitle>ترجیحات</CardTitle>
</CardHeader>
<CardContent className="grid grid-cols-1 gap-4 sm:grid-cols-2">
<div className="flex flex-col gap-2">
<Label id="calendar-label">تقویم</Label>
<Select name="calendar" defaultValue="jalali">
<SelectTrigger aria-labelledby="calendar-label" className="w-full">
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectItem value="jalali">شمسی</SelectItem>
<SelectItem value="gregorian">میلادی</SelectItem>
</SelectContent>
</Select>
</div>
<div className="flex flex-col gap-2">
<Label id="currency-label">واحد پول</Label>
<Select name="currency" defaultValue="toman">
<SelectTrigger aria-labelledby="currency-label" className="w-full">
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectItem value="toman">تومان</SelectItem>
<SelectItem value="rial">ریال</SelectItem>
</SelectContent>
</Select>
</div>
</CardContent>
<CardFooter className="justify-end">
<Button onClick={() => toast.success("ترجیحات ذخیره شد.")}>ذخیره</Button>
</CardFooter>
</Card>
</TabsContent>
<TabsContent value="security" className="flex flex-col gap-4">
<Card>
<CardHeader>
<CardTitle>تغییر رمز عبور</CardTitle>
</CardHeader>
<CardContent className="flex flex-col gap-4">
<PasswordField label="رمز فعلی" autoComplete="current-password" required />
<PasswordField label="رمز تازه" autoComplete="new-password" strength requirements requirementsWhen="weak" required />
</CardContent>
<CardFooter className="justify-end">
<Button onClick={() => toast.success("رمز عبور تغییر کرد.")}>تغییر رمز</Button>
</CardFooter>
</Card>
<Card className="border-destructive">
<CardHeader>
<CardTitle>حذف حساب</CardTitle>
<CardDescription>همهٔ اطلاعات شما برای همیشه پاک میشود.</CardDescription>
</CardHeader>
<CardFooter>
<AlertDialog>
<AlertDialogTrigger asChild>
<Button variant="outline" color="destructive">
حذف حساب
</Button>
</AlertDialogTrigger>
<ControlSizeProvider size="xl" asChild>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>حساب حذف شود؟</AlertDialogTitle>
<AlertDialogDescription>این کار قابل بازگشت نیست.</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>انصراف</AlertDialogCancel>
<AlertDialogAction variant="destructive">حذف حساب</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</ControlSizeProvider>
</AlertDialog>
</CardFooter>
</Card>
</TabsContent>
</Tabs>
</ControlSizeProvider>
</main>
</ControlSizeProvider>
)
}
<script setup lang="ts">
import AlertDialog from "@/components/ui/AlertDialog.vue"
import AlertDialogAction from "@/components/ui/AlertDialogAction.vue"
import AlertDialogCancel from "@/components/ui/AlertDialogCancel.vue"
import AlertDialogContent from "@/components/ui/AlertDialogContent.vue"
import AlertDialogDescription from "@/components/ui/AlertDialogDescription.vue"
import AlertDialogFooter from "@/components/ui/AlertDialogFooter.vue"
import AlertDialogHeader from "@/components/ui/AlertDialogHeader.vue"
import AlertDialogTitle from "@/components/ui/AlertDialogTitle.vue"
import AlertDialogTrigger from "@/components/ui/AlertDialogTrigger.vue"
import Button from "@/components/ui/Button.vue"
import Card from "@/components/ui/Card.vue"
import CardContent from "@/components/ui/CardContent.vue"
import CardDescription from "@/components/ui/CardDescription.vue"
import CardFooter from "@/components/ui/CardFooter.vue"
import CardHeader from "@/components/ui/CardHeader.vue"
import CardTitle from "@/components/ui/CardTitle.vue"
import ControlSize from "@/components/ui/ControlSize.vue"
import Label from "@/components/ui/Label.vue"
import PasswordField from "@/components/ui/PasswordField.vue"
import Select from "@/components/ui/Select.vue"
import SelectContent from "@/components/ui/SelectContent.vue"
import SelectItem from "@/components/ui/SelectItem.vue"
import SelectTrigger from "@/components/ui/SelectTrigger.vue"
import SelectValue from "@/components/ui/SelectValue.vue"
import Switch from "@/components/ui/Switch.vue"
import Tabs from "@/components/ui/Tabs.vue"
import TabsContent from "@/components/ui/TabsContent.vue"
import TabsList from "@/components/ui/TabsList.vue"
import TabsTrigger from "@/components/ui/TabsTrigger.vue"
import { toast } from "@/components/ui/Toast.vue"
const NOTIFICATIONS = [
{ id: "orders", label: "وضعیت سفارشها", description: "پیامک هنگام ارسال و تحویل", on: true },
{ id: "offers", label: "پیشنهادها و تخفیفها", description: "ایمیل هفتگی", on: false },
{ id: "login", label: "ورود از دستگاه تازه", description: "هشدار فوری امنیتی", on: true },
]
// پیام باید بگوید کدام تنظیم و به کدام حالت رفت، نه فقط «ذخیره شد».
function onNotify(item: (typeof NOTIFICATIONS)[number], on: boolean) {
if (on) toast.success(`«${item.label}» روشن شد.`, { description: item.description })
else toast(`«${item.label}» خاموش شد.`, { description: "دیگر برایش اعلانی نمیفرستیم." })
}
</script>
<template>
<ControlSize size="xl" as-child>
<main class="mx-auto w-full max-w-2xl p-4 sm:p-6">
<header class="mb-8">
<div class="flex flex-col gap-1">
<h1 class="text-2xl font-bold">تنظیمات</h1>
<p class="text-sm text-muted-foreground">اعلانها، ترجیحات نمایش و امنیت حساب.</p>
</div>
</header>
<ControlSize size="xl">
<Tabs default-value="notifications" class="gap-4">
<TabsList>
<TabsTrigger value="notifications">اعلانها</TabsTrigger>
<TabsTrigger value="preferences">ترجیحات</TabsTrigger>
<TabsTrigger value="security">امنیت</TabsTrigger>
</TabsList>
<TabsContent value="notifications">
<Card>
<CardHeader>
<CardTitle>اعلانها</CardTitle>
<CardDescription>انتخاب کنید دربارهٔ چه چیزهایی باخبر شوید.</CardDescription>
</CardHeader>
<CardContent class="flex flex-col divide-y divide-border">
<div v-for="item in NOTIFICATIONS" :key="item.id" class="flex items-center justify-between gap-4 py-3">
<div class="flex flex-col gap-1">
<Label :for="`notify-${item.id}`">{{ item.label }}</Label>
<p class="text-xs text-muted-foreground">{{ item.description }}</p>
</div>
<Switch :id="`notify-${item.id}`" :default-checked="item.on" @update:checked="(on) => onNotify(item, on)" />
</div>
</CardContent>
</Card>
</TabsContent>
<TabsContent value="preferences">
<Card>
<CardHeader>
<CardTitle>ترجیحات</CardTitle>
</CardHeader>
<CardContent class="grid grid-cols-1 gap-4 sm:grid-cols-2">
<div class="flex flex-col gap-2">
<Label id="calendar-label">تقویم</Label>
<Select name="calendar" default-value="jalali">
<SelectTrigger aria-labelledby="calendar-label" class="w-full">
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectItem value="jalali">شمسی</SelectItem>
<SelectItem value="gregorian">میلادی</SelectItem>
</SelectContent>
</Select>
</div>
<div class="flex flex-col gap-2">
<Label id="currency-label">واحد پول</Label>
<Select name="currency" default-value="toman">
<SelectTrigger aria-labelledby="currency-label" class="w-full">
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectItem value="toman">تومان</SelectItem>
<SelectItem value="rial">ریال</SelectItem>
</SelectContent>
</Select>
</div>
</CardContent>
<CardFooter class="justify-end">
<Button @click="toast.success('ترجیحات ذخیره شد.')">ذخیره</Button>
</CardFooter>
</Card>
</TabsContent>
<TabsContent value="security" class="flex flex-col gap-4">
<Card>
<CardHeader>
<CardTitle>تغییر رمز عبور</CardTitle>
</CardHeader>
<CardContent class="flex flex-col gap-4">
<PasswordField label="رمز فعلی" autocomplete="current-password" required />
<PasswordField label="رمز تازه" autocomplete="new-password" strength requirements requirements-when="weak" required />
</CardContent>
<CardFooter class="justify-end">
<Button @click="toast.success('رمز عبور تغییر کرد.')">تغییر رمز</Button>
</CardFooter>
</Card>
<Card class="border-destructive">
<CardHeader>
<CardTitle>حذف حساب</CardTitle>
<CardDescription>همهٔ اطلاعات شما برای همیشه پاک میشود.</CardDescription>
</CardHeader>
<CardFooter>
<AlertDialog>
<AlertDialogTrigger as-child>
<Button variant="outline" color="destructive">حذف حساب</Button>
</AlertDialogTrigger>
<ControlSize size="xl" as-child>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>حساب حذف شود؟</AlertDialogTitle>
<AlertDialogDescription>این کار قابل بازگشت نیست.</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>انصراف</AlertDialogCancel>
<AlertDialogAction variant="destructive">حذف حساب</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</ControlSize>
</AlertDialog>
</CardFooter>
</Card>
</TabsContent>
</Tabs>
</ControlSize>
</main>
</ControlSize>
</template>
کدِ این بلاک هنوز برای Svelte نوشته نشده است.
این موارد هنوز برای Svelte آماده نیستند: alert-dialogcardcontrol-sizelabelpassword-fieldselectswitchtabstoast
کدِ React همین بلاک مرجع است. با MCP دیگ و get_block با framework="svelte" ایجنت آن را با کامپوننتهای Svelte میسازد.
import { Component, ChangeDetectionStrategy } from "@angular/core"
import { DigControlSize } from "@/components/ui/control-size"
import { DigTabs, DigTabsList, DigTabsTrigger, DigTabsContent } from "@/components/ui/tabs"
import {
DigCard,
DigCardHeader,
DigCardTitle,
DigCardDescription,
DigCardContent,
DigCardFooter,
} from "@/components/ui/card"
import { DigLabel } from "@/components/ui/label"
import { DigSwitch } from "@/components/ui/switch"
import { DigSelect, DigSelectTrigger, DigSelectValue, DigSelectContent, DigSelectItem } from "@/components/ui/select"
import { DigButton } from "@/components/ui/button"
import { DigPasswordField } from "@/components/ui/password-field"
import {
DigAlertDialog,
DigAlertDialogTrigger,
DigAlertDialogContent,
DigAlertDialogHeader,
DigAlertDialogTitle,
DigAlertDialogDescription,
DigAlertDialogFooter,
DigAlertDialogCancel,
DigAlertDialogAction,
} from "@/components/ui/alert-dialog"
import { toast } from "@/components/ui/toast"
const NOTIFICATIONS = [
{
id: "orders",
label: "وضعیت سفارشها",
description: "پیامک هنگام ارسال و تحویل",
on: true,
},
{
id: "offers",
label: "پیشنهادها و تخفیفها",
description: "ایمیل هفتگی",
on: false,
},
{
id: "login",
label: "ورود از دستگاه تازه",
description: "هشدار فوری امنیتی",
on: true,
},
]
function onNotify(item: (typeof NOTIFICATIONS)[number], on: boolean) {
if (on)
toast.success(`«${item.label}» روشن شد.`, {
description: item.description,
})
else
toast(`«${item.label}» خاموش شد.`, {
description: "دیگر برایش اعلانی نمیفرستیم.",
})
}
@Component({
selector: "dig-block-settings",
imports: [
DigControlSize,
DigTabs,
DigTabsList,
DigTabsTrigger,
DigTabsContent,
DigCard,
DigCardHeader,
DigCardTitle,
DigCardDescription,
DigCardContent,
DigCardFooter,
DigLabel,
DigSwitch,
DigSelect,
DigSelectTrigger,
DigSelectValue,
DigSelectContent,
DigSelectItem,
DigButton,
DigPasswordField,
DigAlertDialog,
DigAlertDialogTrigger,
DigAlertDialogContent,
DigAlertDialogHeader,
DigAlertDialogTitle,
DigAlertDialogDescription,
DigAlertDialogFooter,
DigAlertDialogCancel,
DigAlertDialogAction,
],
changeDetection: ChangeDetectionStrategy.OnPush,
template: `
<main digControlSize="xl" class="mx-auto w-full max-w-2xl p-4 sm:p-6">
<header class="mb-8">
<div class="flex flex-col gap-1">
<h1 class="text-2xl font-bold">تنظیمات</h1>
<p class="text-sm text-muted-foreground">اعلانها، ترجیحات نمایش و امنیت حساب.</p>
</div>
</header>
<div digControlSize="xl">
<div digTabs value="notifications" class="gap-4">
<div digTabsList>
<button digTabsTrigger value="notifications">اعلانها</button>
<button digTabsTrigger value="preferences">ترجیحات</button>
<button digTabsTrigger value="security">امنیت</button>
</div>
<div digTabsContent value="notifications">
<div digCard>
<div digCardHeader>
<div digCardTitle>اعلانها</div>
<div digCardDescription>انتخاب کنید دربارهٔ چه چیزهایی باخبر شوید.</div>
</div>
<div digCardContent class="flex flex-col divide-y divide-border">
@for (item of NOTIFICATIONS; track item.id) {
<div class="flex items-center justify-between gap-4 py-3">
<div class="flex flex-col gap-1">
<label digLabel [htmlFor]="\`notify-\${item.id}\`">{{ item.label }}</label>
<p class="text-xs text-muted-foreground">
{{ item.description }}
</p>
</div>
<button
digSwitch
[id]="\`notify-\${item.id}\`"
[checked]="item.on"
(checkedChange)="onNotify(item, $event)"
></button>
</div>
}
</div>
</div>
</div>
<div digTabsContent value="preferences">
<div digCard>
<div digCardHeader><div digCardTitle>ترجیحات</div></div>
<div digCardContent class="grid grid-cols-1 gap-4 sm:grid-cols-2">
<div class="flex flex-col gap-2">
<label digLabel id="calendar-label">تقویم</label>
<ng-container digSelect name="calendar" value="jalali"
><button digSelectTrigger aria-labelledby="calendar-label" class="w-full">
<span digSelectValue></span>
</button>
<div digSelectContent>
<div digSelectItem value="jalali">شمسی</div>
<div digSelectItem value="gregorian">میلادی</div>
</div></ng-container
>
</div>
<div class="flex flex-col gap-2">
<label digLabel id="currency-label">واحد پول</label>
<ng-container digSelect name="currency" value="toman"
><button digSelectTrigger aria-labelledby="currency-label" class="w-full">
<span digSelectValue></span>
</button>
<div digSelectContent>
<div digSelectItem value="toman">تومان</div>
<div digSelectItem value="rial">ریال</div>
</div></ng-container
>
</div>
</div>
<div digCardFooter class="justify-end">
<button digButton type="button" (click)="notify('ترجیحات ذخیره شد.')">ذخیره</button>
</div>
</div>
</div>
<div digTabsContent value="security" class="flex flex-col gap-4">
<div digCard>
<div digCardHeader><div digCardTitle>تغییر رمز عبور</div></div>
<div digCardContent class="flex flex-col gap-4">
<div digPasswordField label="رمز فعلی" autocomplete="current-password" required></div>
<div
digPasswordField
label="رمز تازه"
autocomplete="new-password"
strength
requirements
requirementsWhen="weak"
required
></div>
</div>
<div digCardFooter class="justify-end">
<button digButton type="button" (click)="notify('رمز عبور تغییر کرد.')">تغییر رمز</button>
</div>
</div>
<div digCard class="border-destructive">
<div digCardHeader>
<div digCardTitle>حذف حساب</div>
<div digCardDescription>همهٔ اطلاعات شما برای همیشه پاک میشود.</div>
</div>
<div digCardFooter>
<ng-container digAlertDialog
><button digAlertDialogTrigger digButton type="button" variant="outline" color="destructive">
حذف حساب
</button>
<div digControlSize="xl">
<div digAlertDialogContent>
<div digAlertDialogHeader>
<h2 digAlertDialogTitle>حساب حذف شود؟</h2>
<p digAlertDialogDescription>این کار قابل بازگشت نیست.</p>
</div>
<div digAlertDialogFooter>
<button digAlertDialogCancel>انصراف</button>
<button digAlertDialogAction variant="destructive">حذف حساب</button>
</div>
</div>
</div></ng-container
>
</div>
</div>
</div>
</div>
</div>
</main>
`,
})
export class SettingsBlock {
readonly onNotify = onNotify
readonly NOTIFICATIONS = NOTIFICATIONS
notify(message: string) {
toast.success(message)
}
}
کدِ این بلاک هنوز برای Android نوشته نشده است.
همهٔ کامپوننتهای لازم برای Android آمادهاند؛ با MCP میتوانید همین صفحه را از روی نسخهٔ React بسازید.
کدِ React همین بلاک مرجع است. با MCP دیگ و get_block با framework="android" ایجنت آن را با کامپوننتهای Android میسازد.