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
f13bef4a
Commit
f13bef4a
authored
6 years ago
by
Acid Chicken (硫酸鶏)
Browse files
Options
Downloads
Patches
Plain Diff
回転寿司
parent
29b1aa0d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/client/app/desktop/views/components/post-form.vue
+48
-2
48 additions, 2 deletions
src/client/app/desktop/views/components/post-form.vue
src/client/app/mobile/views/components/post-form.vue
+45
-4
45 additions, 4 deletions
src/client/app/mobile/views/components/post-form.vue
with
93 additions
and
6 deletions
src/client/app/desktop/views/components/post-form.vue
+
48
−
2
View file @
f13bef4a
...
...
@@ -11,7 +11,7 @@
<a
@
click=
"addVisibleUser"
>
+ユーザーを追加
</a>
</div>
<div
class=
"hashtags"
v-if=
"recentHashtags.length > 0"
>
<a
v-for=
"tag in recentHashtags"
@
click=
"addTag(tag)"
>
#
{{
tag
}}
</a>
<a
class=
"hashtag"
v-for=
"tag in recentHashtags"
@
click=
"addTag(tag)"
>
%fa:hashtag%
{{
tag
}}
</a>
</div>
<input
v-show=
"useCw"
v-model=
"cw"
placeholder=
"内容への注釈 (オプション)"
>
<textarea
:class=
"
{ with: (files.length != 0 || poll) }"
...
...
@@ -184,6 +184,22 @@ export default Vue.extend({
}
this
.
$nextTick
(()
=>
this
.
watch
());
const
hashtags
=
[...
document
.
getElementsByClassName
(
'
hashtag
'
)];
const
hashtagsContainer
=
hashtags
.
parentElement
;
let
offsetX
=
0
const
update
=
()
=>
{
if
(
hashtags
[
0
].
getBoundingClientRect
().
right
<=
hashtagsContainer
.
getBoundingClientRect
().
left
)
{
hashtags
.
push
(
hashtags
.
shift
());
offsetX
=
0
;
hashtags
.
map
(
x
=>
x
.
style
.
transform
=
'
translateX(0)
'
);
}
else
{
offsetX
--
;
hashtags
.
map
(
x
=>
x
.
style
.
transform
=
`translateX(
${
offsetX
}
px)`
);
}
requestAnimationFrame
(
update
);
};
update
()
});
},
...
...
@@ -494,8 +510,38 @@ root(isDark)
color isDark ? #fff : #666
> .hashtags
margin 0 -16px 8px
overflow-x hidden
white-space nowrap
> *
margin-right 8px
background $theme-color
border-radius: 0 4px 4px 0
color isDark ? #282c37 : #fff8f6
margin-left 28px
white-space nowrap
&:hover
text-decoration none
background darken($theme-color, 10%)
&::before
background inherit
border-radius 4px 0
content ''
display inline-block
height 17.677669529663688110021109052621225982120898442212px
position absolute
right 100%
top 50%
transform translateY(-50%) translateX(50%) rotate(-45deg)
width 17.677669529663688110021109052621225982120898442212px
&::after
background isDark ? #282c37 : #fff8f6
border-radius 50%
content ''
height 4px
left -6.25px
position absolute
top 10px
width 4px
> .medias
margin 0
...
...
This diff is collapsed.
Click to expand it.
src/client/app/mobile/views/components/post-form.vue
+
45
−
4
View file @
f13bef4a
...
...
@@ -40,7 +40,7 @@
</div>
</div>
<div
class=
"hashtags"
v-if=
"recentHashtags.length > 0"
>
<a
v-for=
"tag in recentHashtags"
@
click=
"addTag(tag)"
>
#
{{
tag
}}
</a>
<a
class=
"hashtag"
v-for=
"tag in recentHashtags"
@
click=
"addTag(tag)"
>
%fa:hashtag%
{{
tag
}}
</a>
</div>
</div>
</
template
>
...
...
@@ -165,6 +165,22 @@ export default Vue.extend({
this
.
$nextTick
(()
=>
{
this
.
focus
();
});
const
hashtags
=
[...
document
.
getElementsByClassName
(
'
hashtag
'
)];
const
hashtagsContainer
=
hashtags
.
parentElement
;
let
offsetX
=
0
const
update
=
()
=>
{
if
(
hashtags
[
0
].
getBoundingClientRect
().
right
<=
hashtagsContainer
.
getBoundingClientRect
().
left
)
{
hashtags
.
push
(
hashtags
.
shift
());
offsetX
=
0
;
hashtags
.
map
(
x
=>
x
.
style
.
transform
=
'
translateX(0)
'
);
}
else
{
offsetX
-=
.
25
;
hashtags
.
map
(
x
=>
x
.
style
.
transform
=
`translateX(
${
offsetX
}
px)`
);
}
requestAnimationFrame
(
update
);
};
update
()
},
methods
:
{
...
...
@@ -465,10 +481,35 @@ root(isDark)
box-shadow none
> .hashtags
margin 8px
margin 0 -16px 8px
overflow-x hidden
white-space nowrap
> *
margin-right 8px
background $theme-color
border-radius: 0 4px 4px 0
color isDark ? #282c37 : #fff8f6
margin-left 28px
white-space nowrap
&::before
background inherit
border-radius 4px 0
content ''
display inline-block
height 17.677669529663688110021109052621225982120898442212px
position absolute
right 100%
top 50%
transform translateY(-50%) translateX(50%) rotate(-45deg)
width 17.677669529663688110021109052621225982120898442212px
&::after
background isDark ? #282c37 : #fff8f6
border-radius 50%
content ''
height 4px
left -6.25px
position absolute
top 10px
width 4px
.mk-post-form[data-darkmode]
root(true)
...
...
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