Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
projet-cdaw
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Quentin Vrel
projet-cdaw
Commits
7cda6ab9
Commit
7cda6ab9
authored
Dec 02, 2020
by
quentin.vrel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mock links to games
parent
f6327d31
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
65 additions
and
7 deletions
+65
-7
Lobby.vue
frontend/src/views/Lobby.vue
+65
-7
No files found.
frontend/src/views/Lobby.vue
View file @
7cda6ab9
...
...
@@ -16,8 +16,11 @@
</div>
<div
class=
"lobby-column games-list"
>
<form
class=
"lobby-menu-form"
action=
"#"
@
submit
.
prevent=
"onSubmitJoinPublic"
>
<button-text
v-for=
"game of games"
:key=
"game.id"
:id=
"game.id"
width=
"100%"
height=
"80px"
:text=
"game.name"
/>
<form
class=
"lobby-games"
action=
"#"
@
submit
.
prevent=
"onSubmitJoinPublic"
>
<button
class=
"join-game-button"
v-for=
"game of games"
:key=
"game.id"
:id=
"game.id"
width=
"100%"
height=
"80px"
@
mouseover=
"mouseOver(game.id)"
@
mouseleave=
"mouseOver(0)"
>
{{
game
.
name
}}
<p
class=
"hidden-join-tag"
:id=
"'join-tag-'+game.id"
style=
"visibility: hidden;"
>
Rejoindre
</p>
</button>
</form>
</div>
</div>
...
...
@@ -27,9 +30,9 @@
<
script
>
// @ is an alias to /src
import
UserRibbon
from
'@/components/UserRibbon.vue'
import
PageTitle
from
'
..
/components/PageTitle.vue'
import
ButtonText
from
'
..
/components/ButtonText.vue'
import
TextInput
from
'
..
/components/form/TextInput.vue'
import
PageTitle
from
'
@
/components/PageTitle.vue'
import
ButtonText
from
'
@
/components/ButtonText.vue'
import
TextInput
from
'
@
/components/form/TextInput.vue'
export
default
{
...
...
@@ -41,6 +44,20 @@ export default {
TextInput
},
methods
:
{
mouseOver
:
function
(
id
){
if
(
id
==
0
)
{
for
(
element
of
document
.
getElementsByClassName
(
"button-over"
)){
element
.
classList
.
remove
(
"button-over"
);
document
.
getElementById
(
'join-tag-'
+
element
.
id
).
style
.
visibility
=
"hidden"
;
}
}
else
{
var
element
=
document
.
getElementById
(
id
);
element
.
classList
.
add
(
"button-over"
);
console
.
log
(
document
.
getElementById
(
'join-tag-'
+
element
.
id
).
style
.
visibility
);
document
.
getElementById
(
'join-tag-'
+
element
.
id
).
style
.
visibility
=
"visible"
;
}
},
onSubmitMenu
:
function
(){
if
(
event
.
submitter
.
id
==
'profile'
)
{
this
.
$router
.
push
(
'profile'
);
...
...
@@ -64,7 +81,8 @@ export default {
{
id
:
1
,
name
:
"Partie 1"
},
{
id
:
2
,
name
:
"Partie 2"
},
{
id
:
3
,
name
:
"Partie 3"
},
{
id
:
4
,
name
:
"Partie 4"
}
{
id
:
4
,
name
:
"Partie 4"
},
]
}
...
...
@@ -76,11 +94,14 @@ export default {
.lobby-ribbon
{
margin-left
:
auto
;
margin-right
:
0
;
height
:
10vh
;
}
.lobby-content
{
display
:
flex
;
flex-direction
:
row
;
max-width
:
100%
;
height
:
80vh
;
}
.lobby-column
{
...
...
@@ -96,13 +117,50 @@ export default {
flex-direction
:
column
;
margin-bottom
:
40px
;
}
.lobby-games
{
background
:
rgba
(
196
,
196
,
196
,
0.6
);
width
:
100%
;
display
:
flex
;
flex-direction
:
column
;
padding
:
20px
0
;
height
:
inherit
;
overflow
:
auto
}
.join-game-button
{
background
:
rgba
(
196
,
196
,
196
,
0.6
);
border
:
none
;
height
:
30px
;
text-align
:
left
;
font-family
:
Shojumaru
;
font-size
:
20px
;
margin
:
10px
20px
;
flex-direction
:
row
;
display
:
flex
;
}
.join-game-button
p
{
margin
:
0
0
0
auto
;
}
.button-over
{
background
:
green
;
}
.hidden-join-tag
{
text-align
:
right
;
}
.lobby
{
display
:
flex
;
flex-direction
:
column
;
max-height
:
100vh
;
}
.lobby
*
{
/* background: rgba(196, 196, 196, 0.2);
*/
}
.lobby-text-input
{
margin
:
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment