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
c7e18008
Commit
c7e18008
authored
6 years ago
by
Shpuld Shpludson
Browse files
Options
Downloads
Patches
Plain Diff
more work with notifications drawer
parent
1d3b1ac9
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
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
src/App.js
+13
-1
13 additions, 1 deletion
src/App.js
src/App.scss
+1
-1
1 addition, 1 deletion
src/App.scss
src/App.vue
+6
-4
6 additions, 4 deletions
src/App.vue
src/boot/after_store.js
+3
-0
3 additions, 0 deletions
src/boot/after_store.js
src/modules/interface.js
+9
-1
9 additions, 1 deletion
src/modules/interface.js
with
32 additions
and
7 deletions
src/App.js
+
13
−
1
View file @
c7e18008
...
...
@@ -39,6 +39,10 @@ export default {
created
()
{
// Load the locale from the storage
this
.
$i18n
.
locale
=
this
.
$store
.
state
.
config
.
interfaceLanguage
window
.
addEventListener
(
'
resize
'
,
this
.
updateMobileState
)
},
destroyed
()
{
window
.
removeEventListener
(
'
resize
'
,
this
.
updateMobileState
)
},
computed
:
{
currentUser
()
{
return
this
.
$store
.
state
.
users
.
currentUser
},
...
...
@@ -87,7 +91,8 @@ export default {
unseenNotificationsCount
()
{
return
this
.
unseenNotifications
.
length
},
showFeaturesPanel
()
{
return
this
.
$store
.
state
.
instance
.
showFeaturesPanel
}
showFeaturesPanel
()
{
return
this
.
$store
.
state
.
instance
.
showFeaturesPanel
},
isMobileLayout
()
{
return
this
.
$store
.
state
.
interface
.
mobileLayout
}
},
methods
:
{
scrollToTop
()
{
...
...
@@ -105,6 +110,13 @@ export default {
},
toggleMobileNotifications
()
{
this
.
notificationsOpen
=
!
this
.
notificationsOpen
},
updateMobileState
()
{
const
width
=
window
.
innerWidth
||
document
.
documentElement
.
clientWidth
||
document
.
body
.
clientWidth
const
changed
=
width
<=
800
!==
this
.
isMobileLayout
if
(
changed
)
{
this
.
$store
.
dispatch
(
'
setMobileLayout
'
,
width
<=
800
)
}
}
}
}
This diff is collapsed.
Click to expand it.
src/App.scss
+
1
−
1
View file @
c7e18008
...
...
@@ -667,7 +667,7 @@ nav {
height
:
100vh
;
top
:
50px
;
left
:
0
;
z-index
:
1001
;
z-index
:
9
;
overflow-x
:
hidden
;
overflow-y
:
scroll
;
transition-property
:
transform
;
...
...
This diff is collapsed.
Click to expand it.
src/App.vue
+
6
−
4
View file @
c7e18008
...
...
@@ -25,11 +25,13 @@
</div>
</nav>
<div
v-if=
""
class=
"container"
id=
"content"
>
<side-drawer
ref=
"sideDrawer"
:logout=
"logout"
></side-drawer>
<div
class=
"mobile-notifications"
:class=
"
{ 'closed': !notificationsOpen }">
<notifications/>
<div
v-if=
"isMobileLayout"
>
<side-drawer
ref=
"sideDrawer"
:logout=
"logout"
></side-drawer>
<div
class=
"mobile-notifications"
:class=
"
{ 'closed': !notificationsOpen }">
<notifications/>
</div>
</div>
<div
class=
"sidebar-flexer mobile-hidden"
>
<div
class=
"sidebar-flexer mobile-hidden"
v-if=
"!isMobileLayout"
>
<div
class=
"sidebar-bounds"
>
<div
class=
"sidebar-scroller"
>
<div
class=
"sidebar"
>
...
...
This diff is collapsed.
Click to expand it.
src/boot/after_store.js
+
3
−
0
View file @
c7e18008
...
...
@@ -5,6 +5,9 @@ import routes from './routes'
import
App
from
'
../App.vue
'
const
afterStoreSetup
=
({
store
,
i18n
})
=>
{
const
width
=
window
.
innerWidth
||
document
.
documentElement
.
clientWidth
||
document
.
body
.
clientWidth
store
.
dispatch
(
'
setMobileLayout
'
,
width
<=
800
)
window
.
fetch
(
'
/api/statusnet/config.json
'
)
.
then
((
res
)
=>
res
.
json
())
.
then
((
data
)
=>
{
...
...
This diff is collapsed.
Click to expand it.
src/modules/interface.js
+
9
−
1
View file @
c7e18008
...
...
@@ -11,7 +11,8 @@ const defaultState = {
window
.
CSS
.
supports
(
'
filter
'
,
'
drop-shadow(0 0)
'
)
||
window
.
CSS
.
supports
(
'
-webkit-filter
'
,
'
drop-shadow(0 0)
'
)
)
}
},
mobileLayout
:
false
}
const
interfaceMod
=
{
...
...
@@ -31,6 +32,9 @@ const interfaceMod = {
},
setNotificationPermission
(
state
,
permission
)
{
state
.
notificationPermission
=
permission
},
setMobileLayout
(
state
,
value
)
{
state
.
mobileLayout
=
value
}
},
actions
:
{
...
...
@@ -42,6 +46,10 @@ const interfaceMod = {
},
setNotificationPermission
({
commit
},
permission
)
{
commit
(
'
setNotificationPermission
'
,
permission
)
},
setMobileLayout
({
commit
},
value
)
{
console
.
log
(
'
setMobileLayout called
'
)
commit
(
'
setMobileLayout
'
,
value
)
}
}
}
...
...
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