move admin permissions to a separate folder
This commit is contained in:
parent
ec3947b992
commit
a4c816d07c
3 changed files with 32 additions and 14 deletions
6
locales/index.d.ts
vendored
6
locales/index.d.ts
vendored
|
|
@ -13460,9 +13460,13 @@ export interface Locale extends ILocale {
|
||||||
*/
|
*/
|
||||||
"hideAds": string;
|
"hideAds": string;
|
||||||
/**
|
/**
|
||||||
* Apps using this token will only have access to the functions listed below.
|
* Apps using this token will have no API access except for the functions listed below.
|
||||||
*/
|
*/
|
||||||
"permissionsDescription": string;
|
"permissionsDescription": string;
|
||||||
|
/**
|
||||||
|
* Apps using this token will have no administrative access except for the functions enabled below.
|
||||||
|
*/
|
||||||
|
"adminPermissionsDescription": string;
|
||||||
/**
|
/**
|
||||||
* Shared account
|
* Shared account
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -39,11 +39,19 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<div class="_gaps_s">
|
<div class="_gaps_s">
|
||||||
<MkSwitch v-for="kind in Object.keys(permissionSwitches)" :key="kind" v-model="permissionSwitches[kind]">{{ i18n.ts._permissions[kind] }}</MkSwitch>
|
<MkSwitch v-for="kind in Object.keys(permissionSwitches)" :key="kind" v-model="permissionSwitches[kind]">{{ i18n.ts._permissions[kind] }}</MkSwitch>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="iAmAdmin" :class="$style.adminPermissions">
|
</MkFolder>
|
||||||
<div :class="$style.adminPermissionsHeader"><b>{{ i18n.ts.adminPermission }}</b></div>
|
|
||||||
<div class="_gaps_s">
|
<MkFolder v-if="iAmAdmin">
|
||||||
<MkSwitch v-for="kind in Object.keys(permissionSwitchesForAdmin)" :key="kind" v-model="permissionSwitchesForAdmin[kind]">{{ i18n.ts._permissions[kind] }}</MkSwitch>
|
<template #label>{{ i18n.ts.adminPermission }}</template>
|
||||||
|
<template #caption>{{ i18n.ts.adminPermissionsDescription }}</template>
|
||||||
|
|
||||||
|
<div class="_buttons">
|
||||||
|
<MkButton inline @click="disableAllAdmin">{{ i18n.ts.disableAll }}</MkButton>
|
||||||
|
<MkButton inline @click="enableAllAdmin">{{ i18n.ts.enableAll }}</MkButton>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div :class="$style.adminPermissions" class="_gaps_s">
|
||||||
|
<MkSwitch v-for="kind in Object.keys(permissionSwitchesForAdmin)" :key="kind" v-model="permissionSwitchesForAdmin[kind]">{{ i18n.ts._permissions[kind] }}</MkSwitch>
|
||||||
</div>
|
</div>
|
||||||
</MkFolder>
|
</MkFolder>
|
||||||
|
|
||||||
|
|
@ -138,6 +146,9 @@ function disableAll(): void {
|
||||||
for (const p in permissionSwitches.value) {
|
for (const p in permissionSwitches.value) {
|
||||||
permissionSwitches.value[p] = false;
|
permissionSwitches.value[p] = false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function disableAllAdmin(): void {
|
||||||
if (iAmAdmin) {
|
if (iAmAdmin) {
|
||||||
for (const p in permissionSwitchesForAdmin.value) {
|
for (const p in permissionSwitchesForAdmin.value) {
|
||||||
permissionSwitchesForAdmin.value[p] = false;
|
permissionSwitchesForAdmin.value[p] = false;
|
||||||
|
|
@ -149,6 +160,9 @@ function enableAll(): void {
|
||||||
for (const p in permissionSwitches.value) {
|
for (const p in permissionSwitches.value) {
|
||||||
permissionSwitches.value[p] = true;
|
permissionSwitches.value[p] = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function enableAllAdmin(): void {
|
||||||
if (iAmAdmin) {
|
if (iAmAdmin) {
|
||||||
for (const p in permissionSwitchesForAdmin.value) {
|
for (const p in permissionSwitchesForAdmin.value) {
|
||||||
permissionSwitchesForAdmin.value[p] = true;
|
permissionSwitchesForAdmin.value[p] = true;
|
||||||
|
|
|
||||||
|
|
@ -679,8 +679,8 @@ customFontSize: "Custom font size"
|
||||||
|
|
||||||
hideAds: "Hide ads"
|
hideAds: "Hide ads"
|
||||||
|
|
||||||
permissionsDescription: "Apps using this token will only have access to the functions listed below."
|
permissionsDescription: "Apps using this token will have no API access except for the functions listed below."
|
||||||
|
adminPermissionsDescription: "Apps using this token will have no administrative access except for the functions enabled below."
|
||||||
sharedAccount: "Shared account"
|
sharedAccount: "Shared account"
|
||||||
sharedAccess: "Shared access"
|
sharedAccess: "Shared access"
|
||||||
sharedAccessDescription: "Any accounts listed here will be granted access to the token and may use it to access this account."
|
sharedAccessDescription: "Any accounts listed here will be granted access to the token and may use it to access this account."
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue