
Security News
Open Source Maintainers Demand Ability to Block Copilot-Generated Issues and PRs
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
@emanuele-em/nuxt-swipe
Advanced tools
This Nuxt 3 module allows you to easily add swipe gestures to your Vue 3 App. With just a few lines of code, you can enable swiping on your website or web application.
To add this module to your Nuxt.js project, run the following command:
npm i @emanuele-em/nuxt-swipe
Then, add nuxt-swipe to the modules section of your nuxt.config.js file:
export default {
modules: [
'@emanuele-em/nuxt-swipe'
]
}
To use the module, simply add <Swipe>
component, it will be the component that will intercept the swipe gesture
For example:
<template>
<Swipe>
<slot />
</Swipe>
</template>
The module will create a plugin that will emit the Swipe
event only after some checks to make sure that the gesture is really a swipe gesture.
You can handle that event in the script section of your component, remember to import nuxtApp:
<script setup>
import { useNuxtApp } from '#app'
const nuxtApp = useNuxtApp()
nuxtApp.$bus.$on('swipe', (direction) => {
switch (direction) {
case 'left':
// swiped left, do things
break;
case 'right':
// swiped right, do things
break;
case 'up':
// swiped up, do things
break;
case 'down':
// swiped down, do things
break;
default:
break;
}
})
</script>
Swipe navigation with Swipe
component as Default Layout
layouts/default.vue
<template>
<Swipe>
<slot />
</Swipe>
</template>
<script setup>
import { useNuxtApp, useRoute, navigateTo } from '#app'
const nuxtApp = useNuxtApp()
const routes = ['/', '/about']
nuxtApp.$bus.$on('swipe', (direction) => {
let indexCurrentRoute = routes.indexOf(useRoute().path)
if (direction === 'left' && routes[indexCurrentRoute + 1]) {
indexCurrentRoute += 1
}
if (direction === 'right' && routes[indexCurrentRoute - 1]) {
indexCurrentRoute -= 1
}
return navigateTo(routes[indexCurrentRoute])
})
</script>
Typescript correct syntax
Swipe handling during the touchEvent
and not just at touchend
FAQs
## Development
The npm package @emanuele-em/nuxt-swipe receives a total of 130 weekly downloads. As such, @emanuele-em/nuxt-swipe popularity was classified as not popular.
We found that @emanuele-em/nuxt-swipe demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
Research
Security News
Malicious Koishi plugin silently exfiltrates messages with hex strings to a hardcoded QQ account, exposing secrets in chatbots across platforms.
Research
Security News
Malicious PyPI checkers validate stolen emails against TikTok and Instagram APIs, enabling targeted account attacks and dark web credential sales.