-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Natan Vieira do Nascimento
committed
Aug 31, 2023
1 parent
7537d5b
commit cb6d453
Showing
16 changed files
with
202 additions
and
40 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.v-fade-enter-active, | ||
.v-fade-leave-active { | ||
transition: opacity 0.5s ease; | ||
} | ||
|
||
.v-fade-enter-from, | ||
.v-fade-leave-to { | ||
opacity: 0; | ||
} |
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 |
---|---|---|
@@ -1 +1,5 @@ | ||
{} | ||
{ | ||
"setup.title": "Configurar credenciais", | ||
"setup.header.label.docs": "Precisa de ajuda?", | ||
"setup.header.label.login": "Fazer login" | ||
} |
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 was deleted.
Oops, something went wrong.
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,3 @@ | ||
export type ServerInfo = { | ||
setup: boolean | ||
} |
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,23 @@ | ||
import type { ServerInfo } from "@/modules/platform/api/models/server-info" | ||
import { usePlatformStore } from "@/modules/platform/platform.store" | ||
import type { Logger } from "@/modules/platform/api/services/log.service" | ||
import logService from "@/modules/platform/api/services/log.service" | ||
|
||
class ServerService { | ||
|
||
private readonly logger: Logger = logService.create("backend") | ||
|
||
async getInfo(): Promise<ServerInfo> { | ||
const store = usePlatformStore() | ||
if (store.hasServerInfo) | ||
return store.getServerInfo | ||
|
||
const value = { setup: true } as ServerInfo | ||
this.logger.debug(value); | ||
store.updateServerInfo(value) | ||
return value | ||
// return httpService.get("/").then((res: AxiosResponse) => res.data as SystemInfo); | ||
} | ||
} | ||
|
||
export default new ServerService() |
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,25 @@ | ||
import { defineStore } from "pinia" | ||
import type { ServerInfo } from "@/modules/platform/api/models/server-info" | ||
import { isNull } from "@/utils" | ||
|
||
type PlatformStore = { serverInfo: ServerInfo | null } | ||
|
||
export const usePlatformStore = defineStore("platform", { | ||
state: (): PlatformStore => ({ serverInfo: null }), | ||
getters: { | ||
getServerInfo(): ServerInfo { | ||
if (!this.hasServerInfo) | ||
throw new Error("Missing system information") | ||
|
||
return this.serverInfo! | ||
}, | ||
hasServerInfo(): boolean { | ||
return !isNull(this.serverInfo); | ||
} | ||
}, | ||
actions: { | ||
updateServerInfo(serverInfo: ServerInfo) { | ||
this.serverInfo = serverInfo; | ||
} | ||
} | ||
}) |
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,105 @@ | ||
<template> | ||
<div class="header"> | ||
<VContainer class="items"> | ||
<TheLogo | ||
black | ||
class="logo" | ||
/> | ||
<ul class="links"> | ||
<li> | ||
<a | ||
v-t="'setup.header.label.docs'" | ||
:href="links.docs" | ||
target="_blank" | ||
/> | ||
</li> | ||
<li> | ||
<a | ||
v-t="'setup.header.label.login'" | ||
:href="links.login" | ||
/> | ||
</li> | ||
</ul> | ||
</VContainer> | ||
</div> | ||
<div class="root"> | ||
<VContainer> | ||
<h2 | ||
v-t="'setup.title'" | ||
class="title" | ||
/> | ||
<h4>Let's get you up and running!</h4> | ||
</VContainer> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import VContainer from "@/modules/platform/ui/components/grid/VContainer.vue" | ||
import TheLogo from "@/modules/platform/ui/components/TheLogo.vue" | ||
import configService from "@/modules/platform/api/services/config.service" | ||
import { useRouter } from "vue-router" | ||
const router = useRouter() | ||
const links = { | ||
docs: configService.appWebsite, | ||
login: "/login" | ||
} | ||
</script> | ||
|
||
<style scoped lang="scss"> | ||
.root { | ||
background-color: var(--kt-background-surface); | ||
height: 100%; | ||
width: 100%; | ||
} | ||
.title { | ||
margin-top: 0.8em; | ||
user-select: none; | ||
} | ||
.header { | ||
background-color: var(--kt-background-surface); | ||
border-bottom: 1px solid var(--kt-border-medium); | ||
padding: 0.8rem 0; | ||
.items { | ||
display: flex; | ||
flex-direction: row; | ||
align-content: space-between; | ||
width: 100%; | ||
} | ||
.logo { | ||
width: 48px; | ||
height: 48px; | ||
border-radius: 8px; | ||
} | ||
.links { | ||
display: flex; | ||
align-items: center; | ||
justify-content: flex-end; | ||
flex-grow: 1; | ||
gap: 2.4rem; | ||
li { | ||
font-weight: 500; | ||
font-size: 14px; | ||
a { | ||
text-decoration: none; | ||
color: var(--kt-content-neutral); | ||
&:hover { | ||
color: var(--kt-content-neutral-low); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
.languages { | ||
} | ||
</style> |
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