mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-25 03:17:38 -07:00
make visible always on mobile
This commit is contained in:
parent
6068391e1d
commit
6b32eae520
1 changed files with 2 additions and 45 deletions
|
@ -93,7 +93,7 @@
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
v-if="isMobile && mainRouter.currentRoute.value.name === 'index'"
|
v-if="isMobile"
|
||||||
ref="postButton"
|
ref="postButton"
|
||||||
:aria-label="i18n.t('note')"
|
:aria-label="i18n.t('note')"
|
||||||
class="postButton button post _button"
|
class="postButton button post _button"
|
||||||
|
@ -101,17 +101,6 @@
|
||||||
>
|
>
|
||||||
<i class="ph-pencil ph-bold ph-lg"></i>
|
<i class="ph-pencil ph-bold ph-lg"></i>
|
||||||
</button>
|
</button>
|
||||||
<button
|
|
||||||
v-if="
|
|
||||||
isMobile && mainRouter.currentRoute.value.name === 'messaging'
|
|
||||||
"
|
|
||||||
ref="postButton"
|
|
||||||
class="postButton button post _button"
|
|
||||||
:aria-label="i18n.t('startMessaging')"
|
|
||||||
@click="messagingStart"
|
|
||||||
>
|
|
||||||
<i class="ph-user-plus ph-bold ph-lg"></i>
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<transition :name="$store.state.animation ? 'menuDrawer-back' : ''">
|
<transition :name="$store.state.animation ? 'menuDrawer-back' : ''">
|
||||||
|
@ -217,11 +206,7 @@ function updateButtonState(): void {
|
||||||
buttonAnimIndex.value = 1;
|
buttonAnimIndex.value = 1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (routerState.includes("/my/messaging")) {
|
buttonAnimIndex.value = 2;
|
||||||
buttonAnimIndex.value = 2;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
buttonAnimIndex.value = 3;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
updateButtonState();
|
updateButtonState();
|
||||||
|
@ -277,34 +262,6 @@ function messagingStart(ev) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function startUser(): void {
|
|
||||||
os.selectUser().then((user) => {
|
|
||||||
mainRouter.push(`/my/messaging/${Acct.toString(user)}`);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
async function startGroup(): void {
|
|
||||||
const groups1 = await os.api("users/groups/owned");
|
|
||||||
const groups2 = await os.api("users/groups/joined");
|
|
||||||
if (groups1.length === 0 && groups2.length === 0) {
|
|
||||||
os.alert({
|
|
||||||
type: "warning",
|
|
||||||
title: i18n.ts.youHaveNoGroups,
|
|
||||||
text: i18n.ts.joinOrCreateGroup,
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const { canceled, result: group } = await os.select({
|
|
||||||
title: i18n.ts.group,
|
|
||||||
items: groups1.concat(groups2).map((group) => ({
|
|
||||||
value: group,
|
|
||||||
text: group.name,
|
|
||||||
})),
|
|
||||||
});
|
|
||||||
if (canceled) return;
|
|
||||||
mainRouter.push(`/my/messaging/group/${group.id}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (!isDesktop.value) {
|
if (!isDesktop.value) {
|
||||||
matchMedia(`(min-width: ${DESKTOP_THRESHOLD - 1}px)`).onchange = (
|
matchMedia(`(min-width: ${DESKTOP_THRESHOLD - 1}px)`).onchange = (
|
||||||
|
|
Loading…
Reference in a new issue