@@ -80,7 +80,7 @@ const menuDef = $computed(() => [{
}, ...(instance.disableRegistration ? [{
type: 'button',
icon: 'ti ti-user-plus',
- text: i18n.ts.invite,
+ text: i18n.ts.createInviteCode,
action: invite,
}] : [])],
}, {
@@ -95,6 +95,11 @@ const menuDef = $computed(() => [{
text: i18n.ts.users,
to: '/admin/users',
active: currentPage?.route.name === 'users',
+ }, {
+ icon: 'ti ti-user-plus',
+ text: i18n.ts.invite,
+ to: '/admin/invites',
+ active: currentPage?.route.name === 'invites',
}, {
icon: 'ti ti-badges',
text: i18n.ts.roles,
@@ -240,10 +245,10 @@ provideMetadataReceiver((info) => {
});
const invite = () => {
- os.api('invite').then(x => {
+ os.api('admin/invite/create').then(x => {
os.alert({
type: 'info',
- text: x.code,
+ text: x?.[0].code,
});
}).catch(err => {
os.alert({
diff --git a/packages/frontend/src/pages/admin/invites.vue b/packages/frontend/src/pages/admin/invites.vue
new file mode 100644
index 0000000000..70a9c93713
--- /dev/null
+++ b/packages/frontend/src/pages/admin/invites.vue
@@ -0,0 +1,126 @@
+
+
+
+
+
+
+
+ {{ i18n.ts.createInviteCode }}
+
+
+
+ {{ i18n.ts.noExpirationDate }}
+
+
+ {{ i18n.ts.expirationDate }}
+
+
+ {{ i18n.ts.createCount }}
+
+ {{ i18n.ts.create }}
+
+
+
+
+
+ {{ i18n.ts.state }}
+
+
+
+
+
+
+ {{ i18n.ts.sort }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/packages/frontend/src/pages/admin/moderation.vue b/packages/frontend/src/pages/admin/moderation.vue
index e36c9ac91d..13789820a0 100644
--- a/packages/frontend/src/pages/admin/moderation.vue
+++ b/packages/frontend/src/pages/admin/moderation.vue
@@ -24,7 +24,7 @@
{{ i18n.ts.preservedUsernames }}
{{ i18n.ts.preservedUsernamesDescription }}
-
+
{{ i18n.ts.sensitiveWords }}
{{ i18n.ts.sensitiveWordsDescription }}
{{ i18n.ts.sensitiveWordsDescription2 }}
diff --git a/packages/frontend/src/pages/admin/other-settings.vue b/packages/frontend/src/pages/admin/other-settings.vue
index d3e1d9efc1..13e3588740 100644
--- a/packages/frontend/src/pages/admin/other-settings.vue
+++ b/packages/frontend/src/pages/admin/other-settings.vue
@@ -3,22 +3,34 @@
-
-
- {{ i18n.ts.enableServerMachineStats }}
-
+
+
+
+ {{ i18n.ts.enableServerMachineStats }}
+ {{ i18n.ts.turnOffToImprovePerformance }}
+
+
-
- {{ i18n.ts.enableIdenticonGeneration }}
-
+
+
+ {{ i18n.ts.enableIdenticonGeneration }}
+ {{ i18n.ts.turnOffToImprovePerformance }}
+
+
-
- {{ i18n.ts.enableChartsForRemoteUser }}
-
+
+
+ {{ i18n.ts.enableChartsForRemoteUser }}
+ {{ i18n.ts.turnOffToImprovePerformance }}
+
+
-
- {{ i18n.ts.enableChartsForFederatedInstances }}
-
+
+
+ {{ i18n.ts.enableChartsForFederatedInstances }}
+ {{ i18n.ts.turnOffToImprovePerformance }}
+
+
diff --git a/packages/frontend/src/pages/admin/overview.ap-requests.vue b/packages/frontend/src/pages/admin/overview.ap-requests.vue
index ad8e623415..bde5580366 100644
--- a/packages/frontend/src/pages/admin/overview.ap-requests.vue
+++ b/packages/frontend/src/pages/admin/overview.ap-requests.vue
@@ -259,7 +259,7 @@ onMounted(async () => {
},
plugins: [chartVLine(vLineColor)],
});
-
+
fetching = false;
});
diff --git a/packages/frontend/src/pages/admin/overview.federation.vue b/packages/frontend/src/pages/admin/overview.federation.vue
index ab78c4c393..469d2e6927 100644
--- a/packages/frontend/src/pages/admin/overview.federation.vue
+++ b/packages/frontend/src/pages/admin/overview.federation.vue
@@ -58,7 +58,7 @@ let federationSubActiveDiff = $ref
(null);
let fetching = $ref(true);
const { handler: externalTooltipHandler } = useChartTooltip();
-
+
onMounted(async () => {
const chart = await os.apiGet('charts/federation', { limit: 2, span: 'day' });
federationPubActive = chart.pubActive[0];
diff --git a/packages/frontend/src/pages/admin/overview.queue.vue b/packages/frontend/src/pages/admin/overview.queue.vue
index 69ca89e226..7d8d468512 100644
--- a/packages/frontend/src/pages/admin/overview.queue.vue
+++ b/packages/frontend/src/pages/admin/overview.queue.vue
@@ -85,7 +85,7 @@ onMounted(() => {
connection.on('stats', onStats);
connection.on('statsLog', onStatsLog);
connection.send('requestLog', {
- id: Math.random().toString().substr(2, 8),
+ id: Math.random().toString().substring(2, 10),
length: 100,
});
});
@@ -122,4 +122,4 @@ onUnmounted(() => {
}
}
}
-
+
diff --git a/packages/frontend/src/pages/admin/overview.vue b/packages/frontend/src/pages/admin/overview.vue
index e8295c81b5..41a6d4f5b7 100644
--- a/packages/frontend/src/pages/admin/overview.vue
+++ b/packages/frontend/src/pages/admin/overview.vue
@@ -30,7 +30,7 @@
Federation
-
+
Instances
@@ -156,7 +156,7 @@ onMounted(async () => {
nextTick(() => {
queueStatsConnection.send('requestLog', {
- id: Math.random().toString().substr(2, 8),
+ id: Math.random().toString().substring(2, 10),
length: 100,
});
});
diff --git a/packages/frontend/src/pages/admin/queue.chart.vue b/packages/frontend/src/pages/admin/queue.chart.vue
index 8e6856fddd..83ca9639e7 100644
--- a/packages/frontend/src/pages/admin/queue.chart.vue
+++ b/packages/frontend/src/pages/admin/queue.chart.vue
@@ -106,7 +106,7 @@ onMounted(() => {
connection.on('stats', onStats);
connection.on('statsLog', onStatsLog);
connection.send('requestLog', {
- id: Math.random().toString().substr(2, 8),
+ id: Math.random().toString().substring(2, 10),
length: 200,
});
});
diff --git a/packages/frontend/src/pages/admin/roles.editor.vue b/packages/frontend/src/pages/admin/roles.editor.vue
index a1fa9d2932..1ba502ff86 100644
--- a/packages/frontend/src/pages/admin/roles.editor.vue
+++ b/packages/frontend/src/pages/admin/roles.editor.vue
@@ -1,5 +1,9 @@
+
+ ID
+
+
{{ i18n.ts._role.name }}
@@ -171,6 +175,65 @@
+
+ {{ i18n.ts._role._options.inviteLimit }}
+
+ {{ i18n.ts._role.useBaseValue }}
+ {{ role.policies.inviteLimit.value }}
+
+
+
+
+ {{ i18n.ts._role.useBaseValue }}
+
+
+
+
+ {{ i18n.ts._role.priority }}
+
+
+
+
+
+ {{ i18n.ts._role._options.inviteLimitCycle }}
+
+ {{ i18n.ts._role.useBaseValue }}
+ {{ role.policies.inviteLimitCycle.value + i18n.ts._time.minute }}
+
+
+
+
+ {{ i18n.ts._role.useBaseValue }}
+
+
+ {{ i18n.ts._time.minute }}
+
+
+ {{ i18n.ts._role.priority }}
+
+
+
+
+
+ {{ i18n.ts._role._options.inviteExpirationTime }}
+
+ {{ i18n.ts._role.useBaseValue }}
+ {{ role.policies.inviteExpirationTime.value + i18n.ts._time.minute }}
+
+
+
+
+ {{ i18n.ts._role.useBaseValue }}
+
+
+ {{ i18n.ts._time.minute }}
+
+
+ {{ i18n.ts._role.priority }}
+
+
+
+
{{ i18n.ts._role._options.canManageCustomEmojis }}
@@ -210,7 +273,7 @@
-
+
{{ i18n.ts._role._options.driveCapacity }}
diff --git a/packages/frontend/src/pages/admin/roles.vue b/packages/frontend/src/pages/admin/roles.vue
index 6634d9cba9..cdb6e90505 100644
--- a/packages/frontend/src/pages/admin/roles.vue
+++ b/packages/frontend/src/pages/admin/roles.vue
@@ -51,6 +51,29 @@
+
+ {{ i18n.ts._role._options.inviteLimit }}
+ {{ policies.inviteLimit }}
+
+
+
+
+
+ {{ i18n.ts._role._options.inviteLimitCycle }}
+ {{ policies.inviteLimitCycle + i18n.ts._time.minute }}
+
+ {{ i18n.ts._time.minute }}
+
+
+
+
+ {{ i18n.ts._role._options.inviteExpirationTime }}
+ {{ policies.inviteExpirationTime + i18n.ts._time.minute }}
+
+ {{ i18n.ts._time.minute }}
+
+
+
{{ i18n.ts._role._options.canManageCustomEmojis }}
{{ policies.canManageCustomEmojis ? i18n.ts.yes : i18n.ts.no }}
diff --git a/packages/frontend/src/pages/admin/settings.vue b/packages/frontend/src/pages/admin/settings.vue
index 4c2fe46f28..bd57c06181 100644
--- a/packages/frontend/src/pages/admin/settings.vue
+++ b/packages/frontend/src/pages/admin/settings.vue
@@ -37,6 +37,13 @@
{{ i18n.ts.cacheRemoteFiles }}
{{ i18n.ts.cacheRemoteFilesDescription }}
+
+
+
+ {{ i18n.ts.cacheRemoteSensitiveFiles }}
+ {{ i18n.ts.cacheRemoteSensitiveFilesDescription }}
+
+
@@ -104,7 +111,6 @@ import { fetchInstance } from '@/instance';
import { i18n } from '@/i18n';
import { definePageMetadata } from '@/scripts/page-metadata';
import MkButton from '@/components/MkButton.vue';
-import MkColorInput from '@/components/MkColorInput.vue';
let name: string | null = $ref(null);
let description: string | null = $ref(null);
@@ -112,13 +118,14 @@ let maintainerName: string | null = $ref(null);
let maintainerEmail: string | null = $ref(null);
let pinnedUsers: string = $ref('');
let cacheRemoteFiles: boolean = $ref(false);
+let cacheRemoteSensitiveFiles: boolean = $ref(false);
let enableServiceWorker: boolean = $ref(false);
let swPublicKey: any = $ref(null);
let swPrivateKey: any = $ref(null);
let deeplAuthKey: string = $ref('');
let deeplIsPro: boolean = $ref(false);
-async function init() {
+async function init(): Promise