- {t("settings.restapi.response.info")}
+ {t("account.restapi.response.info")}
- {t("settings.restapi.response.title")}
+ {t("account.restapi.response.title")}
diff --git a/src/cronTasks.ts b/src/cronTasks.ts
index d1b82b9e..70c5bf90 100644
--- a/src/cronTasks.ts
+++ b/src/cronTasks.ts
@@ -5,7 +5,7 @@ import * as ztController from "~/utils/ztApi";
type FakeContext = {
session: {
user: {
- id: number;
+ id: string;
};
};
};
diff --git a/src/locales/en/common.json b/src/locales/en/common.json
index 376ad9fd..e4e4c975 100644
--- a/src/locales/en/common.json
+++ b/src/locales/en/common.json
@@ -272,30 +272,6 @@
"publicPages": {
"sectionTitle": "Public Pages",
"description": "Customize the text displayed on your login and registration pages to better align with your brand or provide specific instructions to your users."
- },
- "restapi": {
- "sectionTitle": "API Access Tokens",
- "description": "API access tokens are used to access the ZTNET Public API.",
- "inputFields": {
- "tokenName": {
- "label": "Add a meaningful name to your token",
- "placeholder": "My awesome token"
- }
- },
- "buttons": {
- "submitToken": "Generate Token",
- "cancle": "Delete Token"
- },
- "response": {
- "title": "Click the token to Copy",
- "info": "This token will only be shown once. Please copy it now!"
- },
- "modals": {
- "deleteToken": {
- "title": "Delete Token",
- "description": "Are you sure you want to delete this token? This cannot be undone."
- }
- }
}
},
"mail": {
@@ -516,15 +492,29 @@
"repeatNewPasswordPlaceholder": "Repeat New Password",
"role": "Role"
},
- "networkSetting": {
- "memberAnotations": "Member Anotations",
- "showMarkerInTable": "Show marker in Table",
- "showMarkerInTableDescription": "This will add a circle before the the member name with the anotation color.
You can still search the anotation if disabled.",
- "addBackgroundColorInTable": "Add background color in table",
- "addBackgroundColorInTableDescription": "This will add row background color based on the anotation color.
You can still search the anotation if disabled.",
- "memberTableTitle": "Member Table",
- "deAuthorizationWarningTitle": "Display warning on member De-Authorization",
- "deAuthorizationWarningLabel": "Display a confirmation modal to prevent accidental de-authorizations."
+ "restapi": {
+ "sectionTitle": "API Access Tokens",
+ "description": "This allows you to generate an API token that you can use to authenticate and gain access to our application's API services. With a valid token, you can make requests to the API and interact with the application's features programmatically.",
+ "inputFields": {
+ "tokenName": {
+ "label": "Add a meaningful name to your token",
+ "placeholder": "My awesome token"
+ }
+ },
+ "buttons": {
+ "submitToken": "Generate Token",
+ "cancle": "Delete Token"
+ },
+ "response": {
+ "title": "Click the token to Copy",
+ "info": "This token will only be shown once. Please copy it now!"
+ },
+ "modals": {
+ "deleteToken": {
+ "title": "Delete Token",
+ "description": "Are you sure you want to delete this token? This cannot be undone."
+ }
+ }
},
"zerotierCentral": {
"title": "Zerotier Central",
@@ -542,6 +532,18 @@
"version": "Version",
"developerMode": "developer mode"
}
+ },
+ "network": {
+ "annotations": {
+ "memberAnotations": "Member Annotations",
+ "showMarkerInTable": "Show marker in Table",
+ "showMarkerInTableDescription": "This will add a circle before the the member name with the anotation color.
You can still search the anotation if disabled.",
+ "addBackgroundColorInTable": "Add background color in table",
+ "addBackgroundColorInTableDescription": "This will add row background color based on the anotation color.
You can still search the anotation if disabled.",
+ "memberTableTitle": "Member Table",
+ "deAuthorizationWarningTitle": "Display warning on member De-Authorization",
+ "deAuthorizationWarningLabel": "Display a confirmation modal to prevent accidental de-authorizations."
+ }
}
}
}
\ No newline at end of file
diff --git a/src/locales/es/common.json b/src/locales/es/common.json
index e95b5d92..5227f272 100644
--- a/src/locales/es/common.json
+++ b/src/locales/es/common.json
@@ -272,30 +272,6 @@
"publicPages": {
"sectionTitle": "Páginas Públicas",
"description": "Personaliza el texto que se muestra en tus páginas de inicio de sesión y registro para alinearlo mejor con tu marca o proporcionar instrucciones específicas a tus usuarios."
- },
- "restapi": {
- "sectionTitle": "Tokens de Acceso a la API",
- "description": "Los tokens de acceso a la API se utilizan para acceder a la API pública de ZTNET.",
- "inputFields": {
- "tokenName": {
- "label": "Agrega un nombre significativo a tu token",
- "placeholder": "Mi token asombroso"
- }
- },
- "buttons": {
- "submitToken": "Generar Token",
- "cancle": "Eliminar Token"
- },
- "response": {
- "title": "Haz clic en el token para copiarlo",
- "info": "Este token solo se mostrará una vez. ¡Cópialo ahora!"
- },
- "modals": {
- "deleteToken": {
- "title": "Eliminar toke",
- "description": "¿Estás seguro de que quieres eliminar este token? Esto no se puede deshacer."
- }
- }
}
},
"mail": {
@@ -516,15 +492,29 @@
"repeatNewPasswordPlaceholder": "Repetir Nueva Contraseña",
"role": "Rol"
},
- "networkSetting": {
- "memberAnotations": "Anotaciones de miembro",
- "showMarkerInTable": "Mostrar marcador en la tabla",
- "showMarkerInTableDescription": "Esto agregará un círculo antes del nombre del miembro con el color de la anotación.
Todavía puedes buscar la anotación si está desactivada.",
- "addBackgroundColorInTable": "Agregar color de fondo en la tabla",
- "addBackgroundColorInTableDescription": "Esto agregará color de fondo a la fila según el color de la anotación.
Todavía puedes buscar la anotación si está desactivada.",
- "memberTableTitle": "Tabla de Miembros",
- "deAuthorizationWarningTitle": "Mostrar advertencia al desautorizar a un miembro",
- "deAuthorizationWarningLabel": "Mostrar un modal de confirmación para evitar desautorizaciones accidentales."
+ "restapi": {
+ "sectionTitle": "Tokens de Acceso a la API",
+ "description": "Los tokens de acceso a la API se utilizan para acceder a la API pública de ZTNET.",
+ "inputFields": {
+ "tokenName": {
+ "label": "Agrega un nombre significativo a tu token",
+ "placeholder": "Mi token asombroso"
+ }
+ },
+ "buttons": {
+ "submitToken": "Generar Token",
+ "cancle": "Eliminar Token"
+ },
+ "response": {
+ "title": "Haz clic en el token para copiarlo",
+ "info": "Este token solo se mostrará una vez. ¡Cópialo ahora!"
+ },
+ "modals": {
+ "deleteToken": {
+ "title": "Eliminar toke",
+ "description": "¿Estás seguro de que quieres eliminar este token? Esto no se puede deshacer."
+ }
+ }
},
"zerotierCentral": {
"title": "Zerotier Central",
@@ -542,6 +532,18 @@
"version": "Versión",
"developerMode": "modo de desarrollador"
}
+ },
+ "network": {
+ "annotations": {
+ "memberAnotations": "Anotaciones de miembro",
+ "showMarkerInTable": "Mostrar marcador en la tabla",
+ "showMarkerInTableDescription": "Esto agregará un círculo antes del nombre del miembro con el color de la anotación.
Todavía puedes buscar la anotación si está desactivada.",
+ "addBackgroundColorInTable": "Agregar color de fondo en la tabla",
+ "addBackgroundColorInTableDescription": "Esto agregará color de fondo a la fila según el color de la anotación.
Todavía puedes buscar la anotación si está desactivada.",
+ "memberTableTitle": "Tabla de Miembros",
+ "deAuthorizationWarningTitle": "Mostrar advertencia al desautorizar a un miembro",
+ "deAuthorizationWarningLabel": "Mostrar un modal de confirmación para evitar desautorizaciones accidentales."
+ }
}
}
}
\ No newline at end of file
diff --git a/src/locales/no/common.json b/src/locales/no/common.json
index dbdb44e7..9d8dd355 100644
--- a/src/locales/no/common.json
+++ b/src/locales/no/common.json
@@ -272,30 +272,6 @@
"publicPages": {
"sectionTitle": "Offentlige Sider",
"description": "Tilpass teksten som vises på innloggings- og registreringssidene dine for å bedre samsvare med merkevaren din eller gi spesifikke instruksjoner til brukerne dine."
- },
- "restapi": {
- "sectionTitle": "API-tilgangstokens",
- "description": "API-tilgangstokens brukes for å få tilgang til ZTNETs offentlige API.",
- "inputFields": {
- "tokenName": {
- "label": "Legg til et meningsfylt navn på tokenet ditt",
- "placeholder": "Mitt fantastiske token"
- }
- },
- "buttons": {
- "submitToken": "Generer token",
- "cancle": "Slett token"
- },
- "response": {
- "title": "Klikk på tokenet for å kopiere det",
- "info": "Dette tokenet vil bare vises en gang. Vennligst kopier det nå!"
- },
- "modals": {
- "deleteToken": {
- "title": "Slett token",
- "description": "Er du sikker på at du vil slette dette tokenet? Dette kan ikke angres."
- }
- }
}
},
"mail": {
@@ -516,15 +492,29 @@
"repeatNewPasswordPlaceholder": "Gjenta Nytt Passord",
"role": "Rolle"
},
- "networkSetting": {
- "memberAnotations": "Medlemsanmerkninger",
- "showMarkerInTable": "Vis markør i tabellen",
- "showMarkerInTableDescription": "Dette vil legge til en sirkel før medlemsnavnet med anmerkningsfargen.
Du kan fremdeles søke anmerkningen hvis deaktivert.",
- "addBackgroundColorInTable": "Legg til bakgrunnsfarge i tabellen",
- "addBackgroundColorInTableDescription": "Dette vil legge til radbakgrunnsfarge basert på anmerkningsfargen.
Du kan fremdeles søke anmerkningen hvis deaktivert.",
- "memberTableTitle": "Medlems Liste",
- "deAuthorizationWarningTitle": "Vis advarsel ved fjerning av medlemsautorisasjon",
- "deAuthorizationWarningLabel": "Vis en bekreftelsesmodal for å forhindre utilsiktet fjerning av autorisasjoner."
+ "restapi": {
+ "sectionTitle": "API-tilgangstokens",
+ "description": "API-tilgangstokens brukes for å få tilgang til ZTNETs offentlige API.",
+ "inputFields": {
+ "tokenName": {
+ "label": "Legg til et meningsfylt navn på tokenet ditt",
+ "placeholder": "Mitt fantastiske token"
+ }
+ },
+ "buttons": {
+ "submitToken": "Generer token",
+ "cancle": "Slett token"
+ },
+ "response": {
+ "title": "Klikk på tokenet for å kopiere det",
+ "info": "Dette tokenet vil bare vises en gang. Vennligst kopier det nå!"
+ },
+ "modals": {
+ "deleteToken": {
+ "title": "Slett token",
+ "description": "Er du sikker på at du vil slette dette tokenet? Dette kan ikke angres."
+ }
+ }
},
"zerotierCentral": {
"title": "Zerotier Central",
@@ -542,6 +532,18 @@
"version": "Versjon",
"developerMode": "utviklermodus"
}
+ },
+ "network": {
+ "annotations": {
+ "memberAnotations": "Medlemsanmerkninger",
+ "showMarkerInTable": "Vis markør i tabellen",
+ "showMarkerInTableDescription": "Dette vil legge til en sirkel før medlemsnavnet med anmerkningsfargen.
Du kan fremdeles søke anmerkningen hvis deaktivert.",
+ "addBackgroundColorInTable": "Legg til bakgrunnsfarge i tabellen",
+ "addBackgroundColorInTableDescription": "Dette vil legge til radbakgrunnsfarge basert på anmerkningsfargen.
Du kan fremdeles søke anmerkningen hvis deaktivert.",
+ "memberTableTitle": "Medlems Liste",
+ "deAuthorizationWarningTitle": "Vis advarsel ved fjerning av medlemsautorisasjon",
+ "deAuthorizationWarningLabel": "Vis en bekreftelsesmodal for å forhindre utilsiktet fjerning av autorisasjoner."
+ }
}
}
}
\ No newline at end of file
diff --git a/src/locales/zh/common.json b/src/locales/zh/common.json
index 3bc83feb..34847980 100644
--- a/src/locales/zh/common.json
+++ b/src/locales/zh/common.json
@@ -272,30 +272,6 @@
"publicPages": {
"sectionTitle": "公共页面",
"description": "自定义登录和注册页面上显示的文本,以更好地与您的品牌保持一致或向您的用户提供具体说明。"
- },
- "restapi": {
- "sectionTitle": "API访问令牌",
- "description": "API访问令牌用于访问ZTNET公共API。",
- "inputFields": {
- "tokenName": {
- "label": "为您的令牌添加有意义的名称",
- "placeholder": "我的超棒令牌"
- }
- },
- "buttons": {
- "submitToken": "生成令牌",
- "cancle": "删除令牌"
- },
- "response": {
- "title": "点击令牌以复制",
- "info": "此令牌只会显示一次。请立即复制它!"
- },
- "modals": {
- "deleteToken": {
- "title": "删除令牌",
- "description": "您确定要删除此令牌吗?此操作无法撤消。"
- }
- }
}
},
"mail": {
@@ -516,15 +492,29 @@
"repeatNewPasswordPlaceholder": "重复新密码",
"role": "角色"
},
- "networkSetting": {
- "memberAnotations": "成员注释",
- "showMarkerInTable": "在表格中显示标记",
- "showMarkerInTableDescription": "这将在成员名称前添加一个带有注释颜色的圆圈。
如果禁用,您仍然可以搜索注释。",
- "addBackgroundColorInTable": "在表格中添加背景颜色",
- "addBackgroundColorInTableDescription": "这将根据注释颜色添加行背景颜色。
如果禁用,您仍然可以搜索注释。",
- "memberTableTitle": "成员表格",
- "deAuthorizationWarningTitle": "在取消成员授权时显示警告",
- "deAuthorizationWarningLabel": "显示确认模态框以防止意外取消授权。"
+ "restapi": {
+ "sectionTitle": "API访问令牌",
+ "description": "API访问令牌用于访问ZTNET公共API。",
+ "inputFields": {
+ "tokenName": {
+ "label": "为您的令牌添加有意义的名称",
+ "placeholder": "我的超棒令牌"
+ }
+ },
+ "buttons": {
+ "submitToken": "生成令牌",
+ "cancle": "删除令牌"
+ },
+ "response": {
+ "title": "点击令牌以复制",
+ "info": "此令牌只会显示一次。请立即复制它!"
+ },
+ "modals": {
+ "deleteToken": {
+ "title": "删除令牌",
+ "description": "您确定要删除此令牌吗?此操作无法撤消。"
+ }
+ }
},
"zerotierCentral": {
"title": "Zerotier Central",
@@ -542,6 +532,18 @@
"version": "版本",
"developerMode": "开发者模式"
}
+ },
+ "network": {
+ "annotations": {
+ "memberAnotations": "成员注释",
+ "showMarkerInTable": "在表格中显示标记",
+ "showMarkerInTableDescription": "这将在成员名称前添加一个带有注释颜色的圆圈。
如果禁用,您仍然可以搜索注释。",
+ "addBackgroundColorInTable": "在表格中添加背景颜色",
+ "addBackgroundColorInTableDescription": "这将根据注释颜色添加行背景颜色。
如果禁用,您仍然可以搜索注释。",
+ "memberTableTitle": "成员表格",
+ "deAuthorizationWarningTitle": "在取消成员授权时显示警告",
+ "deAuthorizationWarningLabel": "显示确认模态框以防止意外取消授权。"
+ }
}
}
}
\ No newline at end of file
diff --git a/src/pages/admin/settings/index.tsx b/src/pages/admin/settings/index.tsx
index 0cb77275..7461692a 100644
--- a/src/pages/admin/settings/index.tsx
+++ b/src/pages/admin/settings/index.tsx
@@ -5,8 +5,6 @@ import { LayoutAdminAuthenticated } from "~/components/layouts/layout";
import { ErrorData, ZodErrorFieldErrors } from "~/types/errorHandling";
import { api } from "~/utils/api";
import { useTranslations } from "next-intl";
-import ApiToken from "~/components/adminPage/settings/apiToken";
-import Link from "next/link";
const Settings = () => {
const t = useTranslations("admin");
@@ -102,26 +100,6 @@ const Settings = () => {
/>
-