forked from evolutio/djavue
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adiciona funcionalidades faltantes (logout, api guard, snackbar, pagi…
…na erro)
- Loading branch information
Showing
15 changed files
with
310 additions
and
79 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<template> | ||
<v-dialog v-model="showValue" persistent max-width="960px"> | ||
<v-card class="pa-5"> | ||
<v-card-title class="text-h5"> Opps! Algo deu errado </v-card-title> | ||
<v-card-text> | ||
{{ message }} | ||
</v-card-text> | ||
<v-card-actions> | ||
<v-spacer /> | ||
<v-btn color="primary" text @click="close"> Fechar </v-btn> | ||
</v-card-actions> | ||
</v-card> | ||
</v-dialog> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
props: { | ||
show: { | ||
type: Boolean, | ||
default: false, | ||
}, | ||
message: { | ||
type: String, | ||
default: null, | ||
}, | ||
}, | ||
emits: ["close"], | ||
computed: { | ||
showValue: { | ||
get() { | ||
return this.show | ||
}, | ||
}, | ||
}, | ||
methods: { | ||
close() { | ||
this.$emit("close") | ||
}, | ||
}, | ||
} | ||
</script> |
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,32 @@ | ||
<template> | ||
<v-footer :absolute="!fixed" app> | ||
<span> © {{ new Date().getFullYear() }} </span> | ||
<span v-if="user" class="pl-4"> | ||
<v-icon>mdi-account</v-icon> | ||
{{ user.username }} | ||
</span> | ||
<div class="px-5 text-grey"> | ||
<span class="px-5">API: {{ apiBaseUrl }}</span> | ||
<span class="px-5">ENV: {{ nodeEnv }}</span> | ||
</div> | ||
</v-footer> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
props: { | ||
fixed: { | ||
type: Boolean, | ||
default: true, | ||
}, | ||
user: { | ||
type: Object, | ||
default: null, | ||
}, | ||
}, | ||
data: () => ({ | ||
apiBaseUrl: import.meta.env.VITE_API_BASE_URL, | ||
nodeEnv: import.meta.env.VITE_NODE_ENV, | ||
}), | ||
} | ||
</script> |
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 |
---|---|---|
|
@@ -16,6 +16,7 @@ export default { | |
task: { | ||
type: Object, | ||
default: null, | ||
roger: "usalinter", | ||
}, | ||
}, | ||
data: () => ({}), | ||
|
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,21 +1,43 @@ | ||
<template> | ||
<VLayout> | ||
<app-error-dialog :show="showErrorMessage" :message="errorMessage" @close="closeErrorDialog" /> | ||
<VApp> | ||
<VMain> | ||
<RouterView /> | ||
</VMain> | ||
<app-footer :fixed="true" :user="loggedUser" /> | ||
</VApp> | ||
<app-snackbar /> | ||
</VLayout> | ||
</template> | ||
|
||
<script> | ||
import { mapState } from "pinia" | ||
import { useAppStore } from "@/stores/appStore" | ||
import { useAccountsStore } from "@/stores/accountsStore" | ||
import AppSnackbar from "@/components/AppSnackbar.vue" | ||
import AppErrorDialog from "@/components/AppErrorDialog.vue" | ||
import AppFooter from "@/components/AppFooter.vue" | ||
export default { | ||
name: "EmptyLayout", | ||
components: { | ||
AppSnackbar, | ||
AppErrorDialog, | ||
AppFooter, | ||
}, | ||
setup() { | ||
const appStore = useAppStore() | ||
return { appStore } | ||
}, | ||
computed: { | ||
...mapState(useAppStore, ["errorMessage", "showErrorMessage"]), | ||
...mapState(useAccountsStore, ["loggedUser"]), | ||
}, | ||
methods: { | ||
closeErrorDialog() { | ||
this.appStore.setShowErrorMessage(null) | ||
}, | ||
}, | ||
} | ||
</script> |
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
Oops, something went wrong.