Profile: add items into menu
This commit is contained in:
parent
b61012f12b
commit
20a5e565b1
1 changed files with 42 additions and 4 deletions
|
@ -26,10 +26,14 @@ import {
|
||||||
Close,
|
Close,
|
||||||
Edit,
|
Edit,
|
||||||
ExpandMore,
|
ExpandMore,
|
||||||
|
Group,
|
||||||
MoreVert,
|
MoreVert,
|
||||||
OpenInBrowser,
|
OpenInBrowser,
|
||||||
|
PersonOff,
|
||||||
|
PlaylistAdd,
|
||||||
Send,
|
Send,
|
||||||
Share,
|
Share,
|
||||||
|
Translate,
|
||||||
Verified,
|
Verified,
|
||||||
} from "@suid/icons-material";
|
} from "@suid/icons-material";
|
||||||
import { Title } from "../material/typography";
|
import { Title } from "../material/typography";
|
||||||
|
@ -90,6 +94,10 @@ const Profile: Component = () => {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const isCurrentSessionProfile = () => {
|
||||||
|
return session().account?.inf?.url === profile()?.url;
|
||||||
|
};
|
||||||
|
|
||||||
const [recentTootFilter, setRecentTootFilter] = createSignal({
|
const [recentTootFilter, setRecentTootFilter] = createSignal({
|
||||||
pinned: true,
|
pinned: true,
|
||||||
boost: false,
|
boost: false,
|
||||||
|
@ -261,18 +269,48 @@ const Profile: Component = () => {
|
||||||
document.getElementById(menuButId)!.getBoundingClientRect()
|
document.getElementById(menuButId)!.getBoundingClientRect()
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
<Show
|
||||||
|
when={isCurrentSessionProfile()}
|
||||||
|
fallback={
|
||||||
|
<MenuItem disabled>
|
||||||
|
<ListItemIcon>
|
||||||
|
<PlaylistAdd />
|
||||||
|
</ListItemIcon>
|
||||||
|
<ListItemText>Subscribe...</ListItemText>
|
||||||
|
</MenuItem>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<MenuItem disabled>
|
||||||
|
<ListItemIcon>
|
||||||
|
<Edit />
|
||||||
|
</ListItemIcon>
|
||||||
|
<ListItemText>Edit...</ListItemText>
|
||||||
|
</MenuItem>
|
||||||
|
</Show>
|
||||||
|
<Divider />
|
||||||
<MenuItem disabled>
|
<MenuItem disabled>
|
||||||
<ListItemIcon>
|
<ListItemIcon>
|
||||||
<Edit />
|
<Group />
|
||||||
</ListItemIcon>
|
</ListItemIcon>
|
||||||
<ListItemText>Edit...</ListItemText>
|
<ListItemText>Subscribers</ListItemText>
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem disabled>
|
||||||
|
<ListItemIcon>
|
||||||
|
<PersonOff />
|
||||||
|
</ListItemIcon>
|
||||||
|
<ListItemText>Blocklist</ListItemText>
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem disabled>
|
||||||
|
<ListItemIcon>
|
||||||
|
<Translate />
|
||||||
|
</ListItemIcon>
|
||||||
|
<ListItemText>Translate Name and Bio...</ListItemText>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<Divider />
|
|
||||||
<MenuItem disabled>
|
<MenuItem disabled>
|
||||||
<ListItemIcon>
|
<ListItemIcon>
|
||||||
<Send />
|
<Send />
|
||||||
</ListItemIcon>
|
</ListItemIcon>
|
||||||
<ListItemText>Mention {profile()?.displayName || ""}...</ListItemText>
|
<ListItemText>Mention in...</ListItemText>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<Divider />
|
<Divider />
|
||||||
<MenuItem
|
<MenuItem
|
||||||
|
|
Loading…
Reference in a new issue