diff --git a/src/components/APIKeyDialog.vue b/src/components/APIKeyDialog.vue new file mode 100644 index 00000000..106ad8c7 --- /dev/null +++ b/src/components/APIKeyDialog.vue @@ -0,0 +1,214 @@ + + + + + + + + {{ $t("Add API Key") }} + + + + + + + {{ $t("Name") }} + + + + + + {{ $t("Expiry date") }} + + + + + {{ + $t("Don't expire") + }} + + + + + + + + + + + + + + {{ $t("Key Added") }} + + + + + + + {{ $t("apiKeyAddedMsg") }} + + + + + + + + + + + + + + + + diff --git a/src/pages/ManageAPIKeys.vue b/src/components/settings/APIKeys.vue similarity index 56% rename from src/pages/ManageAPIKeys.vue rename to src/components/settings/APIKeys.vue index ccfc0ce6..3ecd53b7 100644 --- a/src/pages/ManageAPIKeys.vue +++ b/src/components/settings/APIKeys.vue @@ -1,85 +1,83 @@ - - - - {{ $t("API Keys") }} - - - - - {{ $t("Add API Key") }} - - + + + + {{ $t("Add API Key") }} + + - - - {{ $t("No API Keys") }} - - - - - - - {{ item.name }} - - {{ $t("apiKey-" + item.status) }} - - - {{ $t("Created") }}: {{ item.createdDate }} - - - {{ $t("Expires") }}: {{ item.expires || $t("Never") }} - + + + {{ $t("No API Keys") }} + + + + + + + {{ item.name }} + + {{ $t("apiKey-" + item.status) }} + + + {{ $t("Created") }}: {{ item.createdDate }} + + + {{ $t("Expires") }}: {{ item.expires || $t("Never") }} + - - - - {{ $t("Disable") }} - + + + + {{ $t("Disable") }} + - - {{ $t("Enable") }} - + + {{ $t("Enable") }} + - - {{ $t("Delete") }} - - + + {{ $t("Delete") }} + + - - {{ $t("Learn More") }} - + + {{ $t("Learn More") }} + - - {{ $t("disableAPIKeyMsg") }} - + + {{ $t("disableAPIKeyMsg") }} + - - {{ $t("deleteAPIKeyMsg") }} - - - + + {{ $t("deleteAPIKeyMsg") }} + + + + diff --git a/src/pages/Settings.vue b/src/pages/Settings.vue index a076a4d3..d3c153df 100644 --- a/src/pages/Settings.vue +++ b/src/pages/Settings.vue @@ -7,9 +7,6 @@ {{ $t("Maintenance") }} - - {{ $t("API Keys") }} - @@ -110,6 +107,9 @@ export default { security: { title: this.$t("Security"), }, + "api-keys": { + title: this.$t("API Keys") + }, proxies: { title: this.$t("Proxies"), }, diff --git a/src/router.js b/src/router.js index af86356e..b9493f09 100644 --- a/src/router.js +++ b/src/router.js @@ -18,8 +18,7 @@ import NotFound from "./pages/NotFound.vue"; import DockerHosts from "./components/settings/Docker.vue"; import MaintenanceDetails from "./pages/MaintenanceDetails.vue"; import ManageMaintenance from "./pages/ManageMaintenance.vue"; -import ManageAPIKeys from "./pages/ManageAPIKeys.vue"; -import AddAPIKey from "./pages/AddAPIKey.vue"; +import APIKeys from "./components/settings/APIKeys.vue"; import Plugins from "./components/settings/Plugins.vue"; // Settings - Sub Pages @@ -115,6 +114,10 @@ const routes = [ path: "security", component: Security, }, + { + path: "api-keys", + component: APIKeys, + }, { path: "proxies", component: Proxies, @@ -157,14 +160,6 @@ const routes = [ path: "/maintenance/edit/:id", component: EditMaintenance, }, - { - path: "/apikeys", - component: ManageAPIKeys - }, - { - path: "/apikeys/add", - component: AddAPIKey - }, ], }, ],