-
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.
- Loading branch information
Showing
9 changed files
with
101 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { RouteLocationNormalized } from 'vue-router'; | ||
import ServerService from '~/api/services/client/server'; | ||
|
||
class MaintenanceMode implements Middleware { | ||
name() { | ||
return 'maintenance_node'; | ||
} | ||
|
||
async run(to: RouteLocationNormalized) { | ||
const maintenance = await ServerService.getNodeMaintenanceMode(); | ||
|
||
if (to.name !== 'MaintenanceView' && maintenance) { | ||
return { | ||
name: 'MaintenanceView', | ||
}; | ||
} | ||
} | ||
} | ||
|
||
export default new MaintenanceMode(); |
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,38 @@ | ||
<template> | ||
<div class="flex flex-col justify-center items-center flex-grow"> | ||
<div class="text-center"> | ||
<h1 class="text-warning font-bold text-5xl"> | ||
<t path="navigation.maintenance.title" /> | ||
</h1> | ||
<p class="py-2"> | ||
<t path="navigation.maintenance.description" /> | ||
</p> | ||
<div class="py-5"> | ||
<v-button color="warning" class="p-4 mr-1" @click="$router.go(-1)"> | ||
← <t path="navigation.errors.go_back" /> | ||
</v-button> | ||
<v-button :to="{name: 'index'}" color="primary" class="p-4"> | ||
<t path="navigation.errors.go_home" /> | ||
</v-button> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<v-footer /> | ||
</template> | ||
|
||
<style scoped> | ||
button { | ||
line-height: revert; | ||
} | ||
</style> | ||
|
||
<script lang="ts"> | ||
import { defineComponent } from 'vue'; | ||
export default defineComponent({ | ||
setup() { | ||
return {}; | ||
} | ||
}); | ||
</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 |
---|---|---|
@@ -1 +1,2 @@ | ||
export { default as NotFoundView } from './404.vue'; | ||
export { default as NotFoundView } from './404.vue'; | ||
export { default as MaintenanceView } from './Maintenance.vue'; |