feat: toggle-able swiping
This commit is contained in:
parent
666d723b36
commit
03f0a7144b
@ -1053,6 +1053,7 @@ recommendedInstancesDescription: "Recommended servers separated by line breaks t
|
|||||||
caption: "Auto Caption"
|
caption: "Auto Caption"
|
||||||
splash: "Splash Screen"
|
splash: "Splash Screen"
|
||||||
updateAvailable: "There might be an update available!"
|
updateAvailable: "There might be an update available!"
|
||||||
|
swipeOnMobile: "Allow swiping between pages"
|
||||||
swipeOnDesktop: "Allow mobile-style swiping on desktop"
|
swipeOnDesktop: "Allow mobile-style swiping on desktop"
|
||||||
logoImageUrl: "Logo image URL"
|
logoImageUrl: "Logo image URL"
|
||||||
showAdminUpdates: "Indicate a new Calckey version is avaliable (admin only)"
|
showAdminUpdates: "Indicate a new Calckey version is avaliable (admin only)"
|
||||||
|
@ -45,6 +45,9 @@
|
|||||||
class="_formBlock"
|
class="_formBlock"
|
||||||
>{{ i18n.ts.useReactionPickerForContextMenu }}</FormSwitch
|
>{{ i18n.ts.useReactionPickerForContextMenu }}</FormSwitch
|
||||||
>
|
>
|
||||||
|
<FormSwitch v-model="swipeOnMobile" class="_formBlock">{{
|
||||||
|
i18n.ts.swipeOnMobile
|
||||||
|
}}</FormSwitch>
|
||||||
<FormSwitch v-model="swipeOnDesktop" class="_formBlock">{{
|
<FormSwitch v-model="swipeOnDesktop" class="_formBlock">{{
|
||||||
i18n.ts.swipeOnDesktop
|
i18n.ts.swipeOnDesktop
|
||||||
}}</FormSwitch>
|
}}</FormSwitch>
|
||||||
@ -339,6 +342,9 @@ const showUpdates = computed(defaultStore.makeGetterSetter("showUpdates"));
|
|||||||
const swipeOnDesktop = computed(
|
const swipeOnDesktop = computed(
|
||||||
defaultStore.makeGetterSetter("swipeOnDesktop")
|
defaultStore.makeGetterSetter("swipeOnDesktop")
|
||||||
);
|
);
|
||||||
|
const swipeOnMobile = computed(
|
||||||
|
defaultStore.makeGetterSetter("swipeOnMobile")
|
||||||
|
);
|
||||||
const showAdminUpdates = computed(
|
const showAdminUpdates = computed(
|
||||||
defaultStore.makeGetterSetter("showAdminUpdates")
|
defaultStore.makeGetterSetter("showAdminUpdates")
|
||||||
);
|
);
|
||||||
@ -379,6 +385,7 @@ watch(
|
|||||||
overridedDeviceKind,
|
overridedDeviceKind,
|
||||||
showAds,
|
showAds,
|
||||||
showUpdates,
|
showUpdates,
|
||||||
|
swipeOnMobile,
|
||||||
swipeOnDesktop,
|
swipeOnDesktop,
|
||||||
seperateRenoteQuote,
|
seperateRenoteQuote,
|
||||||
showAdminUpdates,
|
showAdminUpdates,
|
||||||
|
@ -45,12 +45,7 @@
|
|||||||
:modules="[Virtual]"
|
:modules="[Virtual]"
|
||||||
:space-between="20"
|
:space-between="20"
|
||||||
:virtual="true"
|
:virtual="true"
|
||||||
:allow-touch-move="
|
:allow-touch-move="defaultStore.state.swipeOnMobile && ( deviceKind !== 'desktop' || defaultStore.state.swipeOnDesktop )"
|
||||||
!(
|
|
||||||
deviceKind === 'desktop' &&
|
|
||||||
!defaultStore.state.swipeOnDesktop
|
|
||||||
)
|
|
||||||
"
|
|
||||||
@swiper="setSwiperRef"
|
@swiper="setSwiperRef"
|
||||||
@slide-change="onSlideChange"
|
@slide-change="onSlideChange"
|
||||||
>
|
>
|
||||||
|
@ -314,6 +314,10 @@ export const defaultStore = markRaw(
|
|||||||
where: "device",
|
where: "device",
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
swipeOnMobile: {
|
||||||
|
where: "device",
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
showAdminUpdates: {
|
showAdminUpdates: {
|
||||||
where: "account",
|
where: "account",
|
||||||
default: true,
|
default: true,
|
||||||
|
Loading…
Reference in New Issue
Block a user