Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Sharkey
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Essem
Sharkey
Commits
a930d4fc
Commit
a930d4fc
authored
6 years ago
by
syuilo
Browse files
Options
Downloads
Patches
Plain Diff
Fix bug
parent
d42197fc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/client/app/common/views/components/messaging-room.vue
+36
-21
36 additions, 21 deletions
src/client/app/common/views/components/messaging-room.vue
with
36 additions
and
21 deletions
src/client/app/common/views/components/messaging-room.vue
+
36
−
21
View file @
a930d4fc
...
...
@@ -18,7 +18,11 @@
</
template
>
</div>
<footer>
<div
ref=
"notifications"
class=
"notifications"
></div>
<transition
name=
"fade"
>
<div
class=
"new-message"
v-show=
"showIndicator"
>
<button
@
click=
"onIndicatorClick"
>
%fa:arrow-circle-down%%i18n:@new-message%
</button>
</div>
</transition>
<x-form
:user=
"user"
ref=
"form"
/>
</footer>
</div>
...
...
@@ -45,7 +49,9 @@ export default Vue.extend({
fetchingMoreMessages
:
false
,
messages
:
[],
existMoreMessages
:
false
,
connection
:
null
connection
:
null
,
showIndicator
:
false
,
timer
:
null
};
},
...
...
@@ -172,7 +178,7 @@ export default Vue.extend({
});
}
else
if
(
message
.
userId
!=
(
this
as
any
).
os
.
i
.
id
)
{
// Notify
this
.
notify
(
'
%i18n:@new-m
essage
%
'
);
this
.
notify
NewM
essage
(
);
}
},
...
...
@@ -205,18 +211,18 @@ export default Vue.extend({
}
},
notify
(
message
)
{
const
n
=
document
.
createElement
(
'
p
'
)
as
any
;
n
.
innerHTML
=
'
%fa:arrow-circle-down%
'
+
message
;
n
.
onclick
=
()
=>
{
this
.
scrollToBottom
();
n
.
parentNode
.
removeChild
(
n
);
}
;
(
this
.
$refs
.
notifications
as
any
).
appendChild
(
n
);
setTimeout
(()
=>
{
n
.
style
.
opacity
=
0
;
setTimeout
(()
=>
n
.
parentNode
.
removeChild
(
n
),
1000
)
;
onIndicatorClick
(
)
{
this
.
showIndicator
=
false
;
this
.
scrollToBottom
()
;
},
n
otifyNewMessage
()
{
this
.
showIndicator
=
true
;
if
(
this
.
timer
)
clearTimeout
(
this
.
timer
);
this
.
timer
=
setTimeout
(()
=>
{
this
.
showIndicator
=
false
;
},
4000
);
},
...
...
@@ -345,17 +351,14 @@ export default Vue.extend({
background rgba(255, 255, 255, 0.95)
background-clip content-box
> .n
otifications
> .n
ew-message
position absolute
top -48px
width 100%
padding 8px 0
text-align center
&:empty
display none
> p
> button
display inline-block
margin 0
padding 0 12px 0 28px
...
...
@@ -365,7 +368,12 @@ export default Vue.extend({
color $theme-color-foreground
background $theme-color
border-radius 16px
transition opacity 1s ease
&:hover
background lighten($theme-color, 10%)
&:active
background darken($theme-color, 10%)
> [data-fa]
position absolute
...
...
@@ -374,4 +382,11 @@ export default Vue.extend({
line-height 32px
font-size 16px
.fade-enter-active, .fade-leave-active
transition opacity 0.1s
.fade-enter, .fade-leave-to
transition opacity 0.5s
opacity 0
</
style
>
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