mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-26 16:53:09 +02:00
upd: apply all minor changes to stable
This commit is contained in:
commit
6390c829ab
7 changed files with 21 additions and 2 deletions
|
@ -922,6 +922,7 @@ recentNHours: "Last {n} hours"
|
||||||
recentNDays: "Last {n} days"
|
recentNDays: "Last {n} days"
|
||||||
noEmailServerWarning: "Email server not configured."
|
noEmailServerWarning: "Email server not configured."
|
||||||
thereIsUnresolvedAbuseReportWarning: "There are unsolved reports."
|
thereIsUnresolvedAbuseReportWarning: "There are unsolved reports."
|
||||||
|
pendingUserApprovals: "There are users awaiting approval."
|
||||||
recommended: "Recommended"
|
recommended: "Recommended"
|
||||||
check: "Check"
|
check: "Check"
|
||||||
driveCapOverrideLabel: "Change the drive capacity for this user"
|
driveCapOverrideLabel: "Change the drive capacity for this user"
|
||||||
|
|
1
locales/index.d.ts
vendored
1
locales/index.d.ts
vendored
|
@ -925,6 +925,7 @@ export interface Locale {
|
||||||
"recentNDays": string;
|
"recentNDays": string;
|
||||||
"noEmailServerWarning": string;
|
"noEmailServerWarning": string;
|
||||||
"thereIsUnresolvedAbuseReportWarning": string;
|
"thereIsUnresolvedAbuseReportWarning": string;
|
||||||
|
"pendingUserApprovals": string;
|
||||||
"recommended": string;
|
"recommended": string;
|
||||||
"check": string;
|
"check": string;
|
||||||
"driveCapOverrideLabel": string;
|
"driveCapOverrideLabel": string;
|
||||||
|
|
|
@ -922,6 +922,7 @@ recentNHours: "直近{n}時間"
|
||||||
recentNDays: "直近{n}日"
|
recentNDays: "直近{n}日"
|
||||||
noEmailServerWarning: "メールサーバーの設定がされていません。"
|
noEmailServerWarning: "メールサーバーの設定がされていません。"
|
||||||
thereIsUnresolvedAbuseReportWarning: "未対応の通報があります。"
|
thereIsUnresolvedAbuseReportWarning: "未対応の通報があります。"
|
||||||
|
pendingUserApprovals: "承認待ちのユーザーがいる。"
|
||||||
recommended: "推奨"
|
recommended: "推奨"
|
||||||
check: "チェック"
|
check: "チェック"
|
||||||
driveCapOverrideLabel: "このユーザーのドライブ容量上限を変更"
|
driveCapOverrideLabel: "このユーザーのドライブ容量上限を変更"
|
||||||
|
|
|
@ -370,6 +370,7 @@ export class UserEntityService implements OnModuleInit {
|
||||||
isCat: user.isCat,
|
isCat: user.isCat,
|
||||||
isSilenced: user.isSilenced || this.roleService.getUserPolicies(user.id).then(r => !r.canPublicNote),
|
isSilenced: user.isSilenced || this.roleService.getUserPolicies(user.id).then(r => !r.canPublicNote),
|
||||||
speakAsCat: user.speakAsCat ?? falsy,
|
speakAsCat: user.speakAsCat ?? falsy,
|
||||||
|
approved: user.approved,
|
||||||
instance: user.host ? this.federatedInstanceService.federatedInstanceCache.fetch(user.host).then(instance => instance ? {
|
instance: user.host ? this.federatedInstanceService.federatedInstanceCache.fetch(user.host).then(instance => instance ? {
|
||||||
name: instance.name,
|
name: instance.name,
|
||||||
softwareName: instance.softwareName,
|
softwareName: instance.softwareName,
|
||||||
|
@ -489,7 +490,6 @@ export class UserEntityService implements OnModuleInit {
|
||||||
...(opts.includeSecrets ? {
|
...(opts.includeSecrets ? {
|
||||||
email: profile!.email,
|
email: profile!.email,
|
||||||
emailVerified: profile!.emailVerified,
|
emailVerified: profile!.emailVerified,
|
||||||
approved: user.approved,
|
|
||||||
signupReason: user.signupReason,
|
signupReason: user.signupReason,
|
||||||
securityKeysList: profile!.twoFactorEnabled
|
securityKeysList: profile!.twoFactorEnabled
|
||||||
? this.userSecurityKeysRepository.find({
|
? this.userSecurityKeysRepository.find({
|
||||||
|
|
|
@ -4,7 +4,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div v-adaptive-bg :class="[$style.root, { yellow: user.isSilenced, red: user.isSuspended, gray: false }]">
|
<div v-adaptive-bg :class="[$style.root, { yellow: user.isSilenced, blue: !user.approved, red: user.isSuspended, gray: false }]">
|
||||||
<MkAvatar class="avatar" :user="user" indicator/>
|
<MkAvatar class="avatar" :user="user" indicator/>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<span class="name"><MkUserName class="name" :user="user"/></span>
|
<span class="name"><MkUserName class="name" :user="user"/></span>
|
||||||
|
@ -97,6 +97,12 @@ onMounted(() => {
|
||||||
background-size: 16px 16px;
|
background-size: 16px 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&:global(.blue) {
|
||||||
|
--c: rgba(0 153 255 / 15%);
|
||||||
|
background-image: linear-gradient(45deg, var(--c) 16.67%, transparent 16.67%, transparent 50%, var(--c) 50%, var(--c) 66.67%, transparent 66.67%, transparent 100%);
|
||||||
|
background-size: 16px 16px;
|
||||||
|
}
|
||||||
|
|
||||||
&:global(.red) {
|
&:global(.red) {
|
||||||
--c: rgb(255 0 0 / 15%);
|
--c: rgb(255 0 0 / 15%);
|
||||||
background-image: linear-gradient(45deg, var(--c) 16.67%, transparent 16.67%, transparent 50%, var(--c) 50%, var(--c) 66.67%, transparent 66.67%, transparent 100%);
|
background-image: linear-gradient(45deg, var(--c) 16.67%, transparent 16.67%, transparent 50%, var(--c) 50%, var(--c) 66.67%, transparent 66.67%, transparent 100%);
|
||||||
|
|
|
@ -16,6 +16,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<MkInfo v-if="noMaintainerInformation" warn class="info">{{ i18n.ts.noMaintainerInformationWarning }} <MkA to="/admin/settings" class="_link">{{ i18n.ts.configure }}</MkA></MkInfo>
|
<MkInfo v-if="noMaintainerInformation" warn class="info">{{ i18n.ts.noMaintainerInformationWarning }} <MkA to="/admin/settings" class="_link">{{ i18n.ts.configure }}</MkA></MkInfo>
|
||||||
<MkInfo v-if="noBotProtection" warn class="info">{{ i18n.ts.noBotProtectionWarning }} <MkA to="/admin/security" class="_link">{{ i18n.ts.configure }}</MkA></MkInfo>
|
<MkInfo v-if="noBotProtection" warn class="info">{{ i18n.ts.noBotProtectionWarning }} <MkA to="/admin/security" class="_link">{{ i18n.ts.configure }}</MkA></MkInfo>
|
||||||
<MkInfo v-if="noEmailServer" warn class="info">{{ i18n.ts.noEmailServerWarning }} <MkA to="/admin/email-settings" class="_link">{{ i18n.ts.configure }}</MkA></MkInfo>
|
<MkInfo v-if="noEmailServer" warn class="info">{{ i18n.ts.noEmailServerWarning }} <MkA to="/admin/email-settings" class="_link">{{ i18n.ts.configure }}</MkA></MkInfo>
|
||||||
|
<MkInfo v-if="pendingUserApprovals" warn class="info">{{ i18n.ts.pendingUserApprovals }} <MkA to="/admin/users" class="_link">{{ i18n.ts.check }}</MkA></MkInfo>
|
||||||
|
|
||||||
<MkSuperMenu :def="menuDef" :grid="narrow"></MkSuperMenu>
|
<MkSuperMenu :def="menuDef" :grid="narrow"></MkSuperMenu>
|
||||||
</div>
|
</div>
|
||||||
|
@ -60,6 +61,7 @@ let noMaintainerInformation = isEmpty(instance.maintainerName) || isEmpty(instan
|
||||||
let noBotProtection = !instance.disableRegistration && !instance.enableHcaptcha && !instance.enableRecaptcha && !instance.enableTurnstile;
|
let noBotProtection = !instance.disableRegistration && !instance.enableHcaptcha && !instance.enableRecaptcha && !instance.enableTurnstile;
|
||||||
let noEmailServer = !instance.enableEmail;
|
let noEmailServer = !instance.enableEmail;
|
||||||
let thereIsUnresolvedAbuseReport = $ref(false);
|
let thereIsUnresolvedAbuseReport = $ref(false);
|
||||||
|
let pendingUserApprovals = $ref(false);
|
||||||
let currentPage = $computed(() => router.currentRef.value.child);
|
let currentPage = $computed(() => router.currentRef.value.child);
|
||||||
|
|
||||||
os.api('admin/abuse-user-reports', {
|
os.api('admin/abuse-user-reports', {
|
||||||
|
@ -69,6 +71,13 @@ os.api('admin/abuse-user-reports', {
|
||||||
if (reports.length > 0) thereIsUnresolvedAbuseReport = true;
|
if (reports.length > 0) thereIsUnresolvedAbuseReport = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
os.api('admin/show-users', {
|
||||||
|
state: 'approved',
|
||||||
|
limit: 1,
|
||||||
|
}).then(approvals => {
|
||||||
|
if (approvals.length > 0) pendingUserApprovals = true;
|
||||||
|
});
|
||||||
|
|
||||||
const NARROW_THRESHOLD = 600;
|
const NARROW_THRESHOLD = 600;
|
||||||
const ro = new ResizeObserver((entries, observer) => {
|
const ro = new ResizeObserver((entries, observer) => {
|
||||||
if (entries.length === 0) return;
|
if (entries.length === 0) return;
|
||||||
|
|
|
@ -16,6 +16,7 @@ export type UserLite = {
|
||||||
onlineStatus: 'online' | 'active' | 'offline' | 'unknown';
|
onlineStatus: 'online' | 'active' | 'offline' | 'unknown';
|
||||||
avatarUrl: string;
|
avatarUrl: string;
|
||||||
avatarBlurhash: string;
|
avatarBlurhash: string;
|
||||||
|
approved: boolean;
|
||||||
emojis: {
|
emojis: {
|
||||||
name: string;
|
name: string;
|
||||||
url: string;
|
url: string;
|
||||||
|
|
Loading…
Reference in a new issue