Storage improve (#6976)

* wip

* wip

* wip

* wip

* wip

* Update storage.ts

* wip

* wip

* wip

* wip

* Update storage.ts

* Update storage.ts

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Update storage.ts

* wip

* wip

* wip

* wip

* 🍕

* wip

* wip

* wip

* wip

* wip

* wip

* Update deck-storage.ts

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Update store.ts

* wip

* wip

* wip

* wip

* Update init.ts

* wip

* wip

* Update pizzax.ts

* wip

* wip

* Update timeline.vue

* Update init.ts

* wip

* wip

* Update init.ts
This commit is contained in:
syuilo
2020-12-19 10:55:52 +09:00
committed by GitHub
parent 57d0c19a98
commit 43930e6a84
146 changed files with 1458 additions and 1519 deletions

View File

@@ -5,11 +5,12 @@ import copyToClipboard from '@/scripts/copy-to-clipboard';
import { host } from '@/config';
import getAcct from '../../misc/acct/render';
import * as os from '@/os';
import { store, userActions } from '@/store';
import { userActions } from '@/store';
import { router } from '@/router';
import { $i } from '@/account';
export function getUserMenu(user) {
const meId = store.getters.isSignedIn ? store.state.i.id : null;
const meId = $i ? $i.id : null;
async function pushList() {
const t = i18n.global.t('selectList'); // なぜか後で参照すると null になるので最初にメモリに確保しておく
@@ -146,7 +147,7 @@ export function getUserMenu(user) {
action: inviteGroup
} : undefined] as any;
if (store.getters.isSignedIn && meId != user.id) {
if ($i && meId != user.id) {
menu = menu.concat([null, {
icon: user.isMuted ? faEye : faEyeSlash,
text: user.isMuted ? i18n.global.t('unmute') : i18n.global.t('mute'),
@@ -163,7 +164,7 @@ export function getUserMenu(user) {
action: reportAbuse
}]);
if (store.getters.isSignedIn && (store.state.i.isAdmin || store.state.i.isModerator)) {
if ($i && ($i.isAdmin || $i.isModerator)) {
menu = menu.concat([null, {
icon: faMicrophoneSlash,
text: user.isSilenced ? i18n.global.t('unsilence') : i18n.global.t('silence'),
@@ -176,7 +177,7 @@ export function getUserMenu(user) {
}
}
if (store.getters.isSignedIn && meId === user.id) {
if ($i && meId === user.id) {
menu = menu.concat([null, {
icon: faPencilAlt,
text: i18n.global.t('editProfile'),