merge: upstream

This commit is contained in:
Mar0xy 2023-11-22 23:40:27 +01:00
commit 42bf8e5e76
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828
86 changed files with 3938 additions and 2258 deletions

View file

@ -35,7 +35,7 @@ import MkSuperMenu from '@/components/MkSuperMenu.vue';
import MkInfo from '@/components/MkInfo.vue';
import { instance } from '@/instance.js';
import * as os from '@/os.js';
import { lookupUser } from '@/scripts/lookup-user.js';
import { lookupUser, lookupUserByEmail } from '@/scripts/lookup-user.js';
import { useRouter } from '@/router.js';
import { definePageMetadata, provideMetadataReceiver } from '@/scripts/page-metadata.js';
@ -279,7 +279,7 @@ provideMetadataReceiver((info) => {
}
});
const invite = () => {
function invite() {
os.api('admin/invite/create').then(x => {
os.alert({
type: 'info',
@ -291,15 +291,21 @@ const invite = () => {
text: err,
});
});
};
}
const lookup = (ev) => {
function lookup(ev: MouseEvent) {
os.popupMenu([{
text: i18n.ts.user,
icon: 'ph-user ph-bold ph-lg',
action: () => {
lookupUser();
},
}, {
text: `${i18n.ts.user} (${i18n.ts.email})`,
icon: 'ti ti-user',
action: () => {
lookupUserByEmail();
},
}, {
text: i18n.ts.note,
icon: 'ph-pencil ph-bold ph-lg',
@ -319,7 +325,7 @@ const lookup = (ev) => {
alert('TODO');
},
}], ev.currentTarget ?? ev.target);
};
}
const headerActions = $computed(() => []);