Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
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
idatt2106-2024-07
frontend
Commits
8fa21c53
Commit
8fa21c53
authored
1 year ago
by
VIktorGrev
Browse files
Options
Downloads
Patches
Plain Diff
feat: starting on update banner on userprofile
parent
8a9dfd26
Branches
Branches containing commit
No related tags found
1 merge request
!93
feat: Profile stats
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/components/UserProfile/MyProfile.vue
+10
-8
10 additions, 8 deletions
src/components/UserProfile/MyProfile.vue
with
10 additions
and
8 deletions
src/components/UserProfile/MyProfile.vue
+
10
−
8
View file @
8fa21c53
...
@@ -3,14 +3,17 @@ import {ref, onMounted} from "vue";
...
@@ -3,14 +3,17 @@ import {ref, onMounted} from "vue";
import
{
useRouter
}
from
"
vue-router
"
;
import
{
useRouter
}
from
"
vue-router
"
;
import
{
useUserInfoStore
}
from
"
@/stores/UserStore
"
;
import
{
useUserInfoStore
}
from
"
@/stores/UserStore
"
;
import
{
UserService
,
BadgeService
,
GoalService
,
type
GoalDTO
,
type
BadgeDTO
}
from
"
@/api
"
;
import
{
UserService
,
BadgeService
,
GoalService
,
type
GoalDTO
,
type
BadgeDTO
}
from
"
@/api
"
;
import
{
ItemService
}
from
"
@/api
"
;
import
{
ItemService
,
type
UserUpdateDTO
}
from
"
@/api
"
;
import
handleUnknownError
from
'
@/components/Exceptions/unkownErrorHandler
'
import
handleUnknownError
from
'
@/components/Exceptions/unkownErrorHandler
'
import
bannerImage
from
'
@/assets/banners/stacked.svg
'
;
let
numberOfHistory
=
6
;
let
numberOfHistory
=
6
;
let
cardTitles
=
[
"
Spain tour
"
,
"
Food waste
"
,
"
Coffee
"
,
"
Concert
"
,
"
New book
"
,
"
Pretty clothes
"
]
let
cardTitles
=
[
"
Spain tour
"
,
"
Food waste
"
,
"
Coffee
"
,
"
Concert
"
,
"
New book
"
,
"
Pretty clothes
"
]
let
firstname
=
ref
();
let
firstname
=
ref
();
let
lastname
=
ref
();
let
lastname
=
ref
();
const
imageUrl
=
ref
(
`../src/assets/userprofile.png`
);
const
imageUrl
=
ref
(
`../src/assets/userprofile.png`
);
const
bannerImageUrl
=
ref
(
bannerImage
);
let
hasHistory
=
ref
(
true
)
let
hasHistory
=
ref
(
true
)
let
hasBadges
=
ref
(
false
)
let
hasBadges
=
ref
(
false
)
...
@@ -23,12 +26,6 @@ const backgroundName = ref("");
...
@@ -23,12 +26,6 @@ const backgroundName = ref("");
const
points
=
ref
(
0
as
any
);
const
points
=
ref
(
0
as
any
);
const
streak
=
ref
(
0
as
any
);
const
streak
=
ref
(
0
as
any
);
let
goalName
=
ref
(
''
);
let
goalDescription
=
ref
(
''
);
let
targetAmount
=
ref
(
''
);
let
targetDate
=
ref
(
''
);
let
createdAt
=
ref
(
''
);
let
goals
=
ref
<
GoalDTO
[]
>
([])
let
goals
=
ref
<
GoalDTO
[]
>
([])
async
function
getGoals
()
{
async
function
getGoals
()
{
...
@@ -107,6 +104,11 @@ const getBadges = async () => {
...
@@ -107,6 +104,11 @@ const getBadges = async () => {
const
selectItem
=
(
item
:
any
)
=>
{
const
selectItem
=
(
item
:
any
)
=>
{
backgroundName
.
value
=
item
.
itemName
;
backgroundName
.
value
=
item
.
itemName
;
let
imageId
=
item
.
imageId
;
let
imageId
=
item
.
imageId
;
//const bannerImagePayload: UserUpdateDTO = {
// bannerImage: imageId as any,
// };
//UserService.update({ requestBody: bannerImagePayload })
//bannerImageUrl.value = `http://localhost:8080/api/images/${imageId}`;
}
}
...
@@ -135,7 +137,7 @@ const toUpdateUserSettings = () => {
...
@@ -135,7 +137,7 @@ const toUpdateUserSettings = () => {
<div
class=
"row d-flex justify-content-center align-items-center h-100"
>
<div
class=
"row d-flex justify-content-center align-items-center h-100"
>
<div
class=
"col 12"
>
<div
class=
"col 12"
>
<div
class=
"card"
>
<div
class=
"card"
>
<div
class=
"rounded-top text-white d-flex flex-row bg-primary"
style=
"height:200px
;"
id=
"banner
"
>
<div
class=
"rounded-top text-white d-flex flex-row bg-primary"
:
style=
"
{
height:
'
200px
', backgroundImage: `url(${bannerImageUrl})` }
">
<div
class=
" d-flex flex-column align-items-center justify-content-center"
>
<div
class=
" d-flex flex-column align-items-center justify-content-center"
>
<img
:src=
"imageUrl"
alt=
"Generisk plassholderbilde"
class=
"img-fluid img-thumbnail"
<img
:src=
"imageUrl"
alt=
"Generisk plassholderbilde"
class=
"img-fluid img-thumbnail"
style=
"width: 150px; height:150px; margin-left: 25px; margin-right: 15px;"
>
style=
"width: 150px; height:150px; margin-left: 25px; margin-right: 15px;"
>
...
...
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