-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #298 from universi-me/main
Atualizando branch
- Loading branch information
Showing
37 changed files
with
1,689 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { type LoaderFunctionArgs } from "react-router-dom"; | ||
import UniversimeApi from "@/services/UniversimeApi"; | ||
|
||
export type EnvironmentsLoaderResponse = { | ||
envDic: {} | undefined; | ||
}; | ||
|
||
export async function EnvironmentsFetch(): Promise<EnvironmentsLoaderResponse> { | ||
const environments = await UniversimeApi.Group.listEnvironments({}); | ||
return { envDic: (environments as any).body.environments??{}, }; | ||
} | ||
|
||
export async function EnvironmentsLoader(args: LoaderFunctionArgs) { | ||
return EnvironmentsFetch(); | ||
} |
183 changes: 183 additions & 0 deletions
183
src/pages/Settings/EnvironmentsPage/EnvironmentsPage.less
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,183 @@ | ||
@import url(/src/layouts/colors.less); | ||
@import url(/src/layouts/fonts.less); | ||
@import url(/src/layouts/transitions.less); | ||
@import url(/src/layouts/border-radius.less); | ||
|
||
#environments-settings { | ||
|
||
.environments-list { | ||
margin-top: 1rem; | ||
|
||
.environments-item { | ||
|
||
margin: .5rem; | ||
align-items: center; | ||
|
||
h3 { | ||
margin-top: 1.5rem; | ||
margin-bottom: 1rem; | ||
font-size: 1.2rem; | ||
margin-left: 1rem; | ||
align-items: center; | ||
} | ||
|
||
.environments-label { | ||
display: flex; | ||
font-size: 1rem; | ||
margin-bottom: .5rem; | ||
margin-left: 0; | ||
text-align: left; | ||
align-items: center; | ||
} | ||
|
||
&:not(:last-of-type) { | ||
@margin-size: .75rem; | ||
|
||
padding-bottom: @margin-size; | ||
margin-bottom: @margin-size; | ||
border-bottom: solid 1px @card-item-color; | ||
} | ||
|
||
.enabled-delete-wrapper { | ||
|
||
margin-bottom: .5rem; | ||
display: flex; | ||
justify-content: space-between; | ||
margin-left: 2rem; | ||
align-items: center; | ||
|
||
&:not(:last-of-type) { | ||
@margin-size: .5rem; | ||
|
||
padding-bottom: @margin-size; | ||
margin-bottom: @margin-size; | ||
border-bottom: solid 1px @card-item-color; | ||
} | ||
|
||
.enabled-wrapper { | ||
display: flex; | ||
align-items: center; | ||
|
||
.filter-enabled-root { | ||
|
||
|
||
|
||
@radix-switch-width: 2.5rem; | ||
@radix-switch-height: 1.5rem; | ||
@radix-thumb-diameter: @radix-switch-height; | ||
|
||
width: @radix-switch-width; | ||
height: @radix-switch-height; | ||
margin-right: .5rem; | ||
margin-left: .5rem; | ||
|
||
border-radius: 9999px; | ||
border: none; | ||
outline: 2px solid @primary-color; | ||
|
||
box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.75); | ||
|
||
cursor: pointer; | ||
|
||
&:focus { | ||
outline: 2px solid @secondary-color; | ||
} | ||
|
||
&:not([data-state='checked']) { | ||
background-color: @card-background-color; | ||
} | ||
|
||
&[data-state='checked'] { | ||
background-color: @card-item-color; | ||
|
||
.filter-enabled-thumb { | ||
transform: translateX(calc(@radix-switch-width - @radix-thumb-diameter)); | ||
background-color: @primary-color; | ||
} | ||
} | ||
|
||
.filter-enabled-thumb { | ||
display: block; | ||
width: @radix-thumb-diameter; | ||
height: @radix-thumb-diameter; | ||
background-color: #FFF; | ||
border-radius: 50%; | ||
outline: 2px solid @primary-color; | ||
|
||
transition: transform 100ms; | ||
will-change: transform; | ||
} | ||
|
||
} | ||
|
||
} | ||
|
||
|
||
|
||
.environments-text-wrapper { | ||
@email-font-size: 1rem; | ||
@email-padding: .5rem; | ||
@trigger-width: 9.25em; | ||
|
||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
justify-content: space-between; | ||
|
||
align-items: center; | ||
|
||
.environments-text-input { | ||
|
||
align-items: center; | ||
font-size: @email-font-size; | ||
padding: @email-padding; | ||
|
||
background-color: @card-item-color; | ||
border: none; | ||
border-radius: .625rem; | ||
|
||
width: calc(100% + @trigger-width + 10em); | ||
|
||
} | ||
} | ||
} | ||
|
||
} | ||
} | ||
|
||
.buttons-wrapper { | ||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
justify-content: end; | ||
|
||
margin-top: 1rem; | ||
width: 100%; | ||
|
||
> button { | ||
padding: .5em 1em; | ||
border: none; | ||
|
||
font-size: 1rem; | ||
text-transform: uppercase; | ||
font-weight: @font-weight-bold; | ||
|
||
cursor: pointer; | ||
|
||
& + button { | ||
margin-left: 1rem; | ||
} | ||
|
||
&.submit { | ||
color: @font-color-v1; | ||
background-color: @primary-color; | ||
border-radius: .625rem; | ||
|
||
&[disabled] { | ||
background-color: @card-item-color; | ||
color: @font-color-v2; | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.