Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
UI
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coscine
frontend
apps
UI
Commits
16da9981
Commit
16da9981
authored
2 years ago
by
Petar Hristov
Browse files
Options
Downloads
Patches
Plain Diff
Fix: CoscineCard
parent
424989b4
No related branches found
No related tags found
No related merge requests found
Pipeline
#890703
passed
2 years ago
Stage: build
Stage: test
Stage: publish
Changes
2
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/coscine/CoscineCard.vue
+30
-22
30 additions, 22 deletions
src/components/coscine/CoscineCard.vue
src/modules/project/pages/ProjectPage.vue
+2
-32
2 additions, 32 deletions
src/modules/project/pages/ProjectPage.vue
with
32 additions
and
54 deletions
src/components/coscine/CoscineCard.vue
+
30
−
22
View file @
16da9981
...
@@ -2,35 +2,39 @@
...
@@ -2,35 +2,39 @@
<b-card
<b-card
no-body
no-body
class=
"coscine_card m-2 text-center"
class=
"coscine_card m-2 text-center"
:class=
"isLoading ? 'bg-light' : ''"
:class=
"isLoading
|| disabled
? 'bg-light' : ''"
@
click.prevent=
"openCard()"
@
click.prevent=
"openCard()"
>
>
<!-- Stretched Link (Card) -->
<!-- Stretched Link (Card) -->
<a
<a
v-if=
"!isLoading && !
isD
isabled"
v-if=
"!isLoading && !
d
isabled"
:href=
"hrefFromRouter(to)"
:href=
"hrefFromRouter(to)"
class=
"stretched-link"
class=
"stretched-link"
/>
/>
<!-- Badge -->
<!-- Badge -->
<template
#header
>
<template
#header
>
<b-badge
v-if=
"badgeVisibility"
pill
:variant=
"badgeType"
>
<b-badge
v-if=
"badgeVisibility"
pill
:variant=
"disabled ? 'secondary' : badgeType"
>
{{
badgeText
}}
{{
badgeText
}}
</b-badge>
</b-badge>
</
template
>
</
template
>
<!-- Settings Button -->
<!-- Settings Button -->
<b-button
<b-button
v-if=
"toSettings"
v-if=
"
!disabled &&
toSettings"
size=
"sm"
size=
"sm"
variant=
"outline-primary"
variant=
"outline-primary"
class=
"settings_button"
class=
"settings_button"
@
click.stop.prevent=
"
s
ettings
Card
"
@
click.stop.prevent=
"
openS
ettings"
>
>
<b-icon
icon=
"pencil-fill"
/>
<b-icon
icon=
"pencil-fill"
/>
<!-- Stretched Link (Settings) -->
<!-- Stretched Link (Settings) -->
<a
<a
v-if=
"!isLoading && !
isD
isabled"
v-if=
"!isLoading && !
d
isabled"
:href=
"hrefFromRouter(toSettings)"
:href=
"hrefFromRouter(toSettings)"
class=
"stretched-link"
class=
"stretched-link"
/>
/>
...
@@ -41,7 +45,12 @@
...
@@ -41,7 +45,12 @@
<!-- Loading Spinner -->
<!-- Loading Spinner -->
<b-spinner
v-if=
"isLoading"
variant=
"primary"
class=
"card_icon"
/>
<b-spinner
v-if=
"isLoading"
variant=
"primary"
class=
"card_icon"
/>
<!-- Icon -->
<!-- Icon -->
<b-icon
v-else
:icon=
"cardIcon"
variant=
"primary"
class=
"card_icon"
/>
<b-icon
v-else
:icon=
"cardIcon"
:variant=
"disabled ? 'secondary' : 'primary'"
class=
"card_icon"
/>
</div>
</div>
<!-- Title -->
<!-- Title -->
<b-card-text>
<b-card-text>
...
@@ -93,7 +102,7 @@ export default defineComponent({
...
@@ -93,7 +102,7 @@ export default defineComponent({
default
:
false
,
default
:
false
,
type
:
Boolean
,
type
:
Boolean
,
},
},
isD
isabled
:
{
d
isabled
:
{
default
:
false
,
default
:
false
,
type
:
Boolean
,
type
:
Boolean
,
},
},
...
@@ -128,10 +137,14 @@ export default defineComponent({
...
@@ -128,10 +137,14 @@ export default defineComponent({
return
routeData
.
href
;
return
routeData
.
href
;
},
},
openCard
()
{
openCard
()
{
if
(
!
this
.
disabled
)
{
this
.
$emit
(
"
open-card
"
,
this
.
to
);
this
.
$emit
(
"
open-card
"
,
this
.
to
);
}
},
},
settingsCard
()
{
openSettings
()
{
if
(
!
this
.
disabled
)
{
this
.
$emit
(
"
open-card-settings
"
,
this
.
toSettings
);
this
.
$emit
(
"
open-card-settings
"
,
this
.
toSettings
);
}
},
},
},
},
});
});
...
@@ -145,7 +158,12 @@ export default defineComponent({
...
@@ -145,7 +158,12 @@ export default defineComponent({
max-width
:
9rem
;
max-width
:
9rem
;
max-height
:
9rem
;
max-height
:
9rem
;
}
}
.coscine_card
:hover
{
background-color
:
#cccccc
!important
;
}
.coscine_card
:hover
.settings_button
{
visibility
:
visible
;
}
.card-header
{
.card-header
{
/* Header + (Icon) + Text = Card */
/* Header + (Icon) + Text = Card */
/* (Padding) + Settings Icon = Header */
/* (Padding) + Settings Icon = Header */
...
@@ -155,15 +173,6 @@ export default defineComponent({
...
@@ -155,15 +173,6 @@ export default defineComponent({
border
:
0
;
border
:
0
;
text-align
:
center
;
text-align
:
center
;
}
}
.coscine_card
:hover
{
background-color
:
#cccccc
;
}
.card.coscine_card
:hover
.settings_button
{
visibility
:
visible
;
}
.settings_button
{
.settings_button
{
/* Pin button in the top-right corner */
/* Pin button in the top-right corner */
position
:
absolute
;
position
:
absolute
;
...
@@ -176,7 +185,6 @@ export default defineComponent({
...
@@ -176,7 +185,6 @@ export default defineComponent({
height
:
1.7rem
;
height
:
1.7rem
;
padding
:
0
;
padding
:
0
;
}
}
.card_icon
{
.card_icon
{
/* Header + (Icon) + Text = Card */
/* Header + (Icon) + Text = Card */
width
:
2.9rem
;
width
:
2.9rem
;
...
...
This diff is collapsed.
Click to expand it.
src/modules/project/pages/ProjectPage.vue
+
2
−
32
View file @
16da9981
...
@@ -11,11 +11,10 @@
...
@@ -11,11 +11,10 @@
<b-card-group
id=
"card-deck"
deck
>
<b-card-group
id=
"card-deck"
deck
>
<CoscineCard
<CoscineCard
id=
"addResource"
id=
"addResource"
:style=
"cardStyleAddResource"
:title=
"$t('page.project.addResource')"
:title=
"$t('page.project.addResource')"
type=
"create"
type=
"create"
:to=
"toCreateResource()"
:to=
"toCreateResource()"
:
is-
disabled=
"!isEmailValid"
:disabled=
"!isEmailValid"
@
open-card=
"openCreateResource($event)"
@
open-card=
"openCreateResource($event)"
/>
/>
<b-tooltip
target=
"addResource"
>
<b-tooltip
target=
"addResource"
>
...
@@ -40,7 +39,6 @@
...
@@ -40,7 +39,6 @@
:key=
"index"
:key=
"index"
:title=
"resource.displayName"
:title=
"resource.displayName"
type=
"resource"
type=
"resource"
:style=
"cardStyle"
:badge-visibility=
"resource.archived"
:badge-visibility=
"resource.archived"
:badge-text=
"$t('default.archived')"
:badge-text=
"$t('default.archived')"
:to=
"toResource(resource)"
:to=
"toResource(resource)"
...
@@ -54,6 +52,7 @@
...
@@ -54,6 +52,7 @@
:to=
"{}"
:to=
"{}"
:title=
"$t('default.loading')"
:title=
"$t('default.loading')"
:is-loading=
"!resources"
:is-loading=
"!resources"
:disabled=
"true"
/>
/>
</b-card-group>
</b-card-group>
</div>
</div>
...
@@ -69,7 +68,6 @@
...
@@ -69,7 +68,6 @@
<CoscineCard
<CoscineCard
:title=
"$t('page.listProjects.addProject')"
:title=
"$t('page.listProjects.addProject')"
type=
"create"
type=
"create"
:style=
"cardStyle"
:to=
"toCreateSubProject()"
:to=
"toCreateSubProject()"
@
open-card=
"openCreateProject($event)"
@
open-card=
"openCreateProject($event)"
/>
/>
...
@@ -86,7 +84,6 @@
...
@@ -86,7 +84,6 @@
:key=
"index"
:key=
"index"
:title=
"subProject.displayName"
:title=
"subProject.displayName"
type=
"project"
type=
"project"
:style=
"cardStyle"
:to=
"toSubProject(subProject)"
:to=
"toSubProject(subProject)"
@
open-card=
"openProject($event, subProject)"
@
open-card=
"openProject($event, subProject)"
/>
/>
...
@@ -130,14 +127,6 @@ export default defineComponent({
...
@@ -130,14 +127,6 @@ export default defineComponent({
return
{
projectStore
,
resourceStore
,
userStore
};
return
{
projectStore
,
resourceStore
,
userStore
};
},
},
data
()
{
return
{
card
:
{
backgroundHoverActive
:
"
#cccccc
"
,
backgroundHoverInactive
:
"
transparent
"
,
},
};
},
computed
:
{
computed
:
{
project
():
ProjectObject
|
null
{
project
():
ProjectObject
|
null
{
...
@@ -170,25 +159,6 @@ export default defineComponent({
...
@@ -170,25 +159,6 @@ export default defineComponent({
user
():
UserObject
|
null
{
user
():
UserObject
|
null
{
return
this
.
userStore
.
user
;
return
this
.
userStore
.
user
;
},
},
cardStyle
()
{
return
{
"
--coscine_card-background-color--hover
"
:
this
.
card
.
backgroundHoverActive
,
};
},
cardStyleAddResource
()
{
if
(
this
.
isEmailValid
)
{
return
{
"
--coscine_card-background-color--hover
"
:
this
.
card
.
backgroundHoverActive
,
};
}
else
{
return
{
"
--coscine_card-background-color--hover
"
:
this
.
card
.
backgroundHoverInactive
,
};
}
},
},
},
methods
:
{
methods
:
{
...
...
This diff is collapsed.
Click to expand it.
CoscineBot
@CoscineBot
mentioned in commit
fcc68d9e
·
2 years ago
mentioned in commit
fcc68d9e
mentioned in commit fcc68d9e5a2c7322bc02c0b91e31a0e92c6906f4
Toggle commit list
Sandra Westerhoff
@sandra.westerhoff
mentioned in merge request
!175 (merged)
·
2 years ago
mentioned in merge request
!175 (merged)
mentioned in merge request !175
Toggle commit list
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