Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pleroma-fe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pleroma
pleroma-fe
Commits
c06bcf33
Commit
c06bcf33
authored
5 years ago
by
Shpuld Shpludson
Browse files
Options
Downloads
Patches
Plain Diff
add gesture to close notifications drawer
parent
31010779
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!1028
`master` refresh with `develop`
,
!703
Mobile notifications in nav bar, separate mobile navbar to its own component
Pipeline
#9613
passed
5 years ago
Stage: lint
Stage: build
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/mobile_nav/mobile_nav.js
+15
-0
15 additions, 0 deletions
src/components/mobile_nav/mobile_nav.js
src/components/mobile_nav/mobile_nav.vue
+7
-2
7 additions, 2 deletions
src/components/mobile_nav/mobile_nav.vue
with
22 additions
and
2 deletions
src/components/mobile_nav/mobile_nav.js
+
15
−
0
View file @
c06bcf33
...
...
@@ -2,6 +2,7 @@ import SideDrawer from '../side_drawer/side_drawer.vue'
import
Notifications
from
'
../notifications/notifications.vue
'
import
MobilePostStatusModal
from
'
../mobile_post_status_modal/mobile_post_status_modal.vue
'
import
{
unseenNotificationsFromStore
}
from
'
../../services/notification_utils/notification_utils
'
import
GestureService
from
'
../../services/gesture_service/gesture_service
'
const
MobileNav
=
{
components
:
{
...
...
@@ -10,8 +11,16 @@ const MobileNav = {
MobilePostStatusModal
},
data
:
()
=>
({
notificationsCloseGesture
:
undefined
,
notificationsOpen
:
false
}),
created
()
{
this
.
notificationsCloseGesture
=
GestureService
.
swipeGesture
(
GestureService
.
DIRECTION_RIGHT
,
this
.
closeMobileNotifications
,
50
)
},
computed
:
{
currentUser
()
{
return
this
.
$store
.
state
.
users
.
currentUser
...
...
@@ -39,6 +48,12 @@ const MobileNav = {
this
.
markNotificationsAsSeen
()
}
},
notificationsTouchStart
(
e
)
{
GestureService
.
beginSwipe
(
e
,
this
.
notificationsCloseGesture
)
},
notificationsTouchMove
(
e
)
{
GestureService
.
updateSwipe
(
e
,
this
.
notificationsCloseGesture
)
},
scrollToTop
()
{
window
.
scrollTo
(
0
,
0
)
},
...
...
This diff is collapsed.
Click to expand it.
src/components/mobile_nav/mobile_nav.vue
+
7
−
2
View file @
c06bcf33
<
template
>
<nav
class=
'nav-bar container
asd
'
id=
"nav"
>
<nav
class=
'nav-bar container'
id=
"nav"
>
<div
class=
'mobile-inner-nav'
@
click=
"scrollToTop()"
>
<div
class=
'item'
>
<a
href=
"#"
class=
"mobile-nav-button"
@
click.stop.prevent=
"toggleMobileSidebar()"
>
...
...
@@ -15,7 +15,12 @@
</div>
</div>
<SideDrawer
ref=
"sideDrawer"
:logout=
"logout"
/>
<div
v-if=
"currentUser"
class=
"mobile-notifications-drawer"
:class=
"
{ 'closed': !notificationsOpen }">
<div
v-if=
"currentUser"
class=
"mobile-notifications-drawer"
:class=
"
{ 'closed': !notificationsOpen }"
@touchstart="notificationsTouchStart"
@touchmove="notificationsTouchMove"
>
<div
class=
"mobile-notifications-header"
>
<span
class=
"title"
>
{{
$t
(
'
notifications.notifications
'
)
}}
</span>
<a
class=
"mobile-nav-button"
@
click.stop.prevent=
"closeMobileNotifications()"
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment