Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 Refactor and improve user setting fields #4642

Merged
merged 3 commits into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,35 @@
<BaseBadge class="--capitalized" :text="userInfo.role" />
</div>

<div class="form-group user-first_name">
<h2 class="--heading5 --medium description__title">Username</h2>
<div class="form-group">
<h2
class="--heading5 --medium description__title"
v-text="$t('userSettings.fields.userName')"
/>
<p class="--body1 description__text" v-text="userInfo.username" />
</div>

<div class="form-group user-first_name">
<h2 class="--heading5 --medium description__title">Name</h2>
<div class="form-group">
<h2
class="--heading5 --medium description__title"
v-text="$t('userSettings.fields.firstName')"
/>
<p class="--body1 description__text" v-text="userInfo.first_name" />
</div>

<div class="form-group user-last_name">
<h2 class="--heading5 --medium description__title">Surname</h2>
<p
class="--body1 description__text"
v-if="userInfo.last_name"
v-text="userInfo.last_name"
<div class="form-group">
<h2
class="--heading5 --medium description__title"
v-text="$t('userSettings.fields.lastName')"
/>
<p class="--body1 description__text" v-else>-</p>
<p class="--body1 description__text" v-text="userInfo.last_name" />
</div>

<div class="form-group">
<h2 class="--heading5 --medium description__title">Workspaces</h2>
<h2
class="--heading5 --medium description__title"
v-text="$t('userSettings.fields.workspaces')"
/>
<div class="workspaces" v-if="userInfo.workspaces.length">
<BaseBadge
v-for="workspace in userInfo.workspaces"
Expand Down Expand Up @@ -82,20 +89,6 @@ export default {
padding-bottom: 0;
}

.user-first_name {
display: flex;
flex-direction: column;
}

.user-last_name {
display: flex;
flex-direction: column;
}

.user-username {
@include font-size(16px);
}

.description {
&__title {
margin-top: 0;
Expand Down
10 changes: 10 additions & 0 deletions frontend/layouts/HeaderAndTopAndTwoColumns.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,19 @@ export default {
}
.top {
grid-area: 2 / 2 / 3 / 5;

@include media("<tablet") {
grid-area: 2 / 1 / 3 / 6;
padding-inline: 2em;
}
}
.left {
grid-area: 3 / 2 / 6 / 4;

@include media("<tablet") {
grid-area: 3 / 1 / 6 / 6;
padding-inline: 2em;
}
}
.right {
grid-area: 3 / 4 / 6 / 5;
Expand Down
6 changes: 6 additions & 0 deletions frontend/translation/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ export default {
},
userSettings: {
title: "My settings",
fields: {
userName: "Username",
firstName: "Name",
lastName: "Surname",
workspaces: "Workspaces",
},
},
settings: {
title: "Dataset settings",
Expand Down
Loading