mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-25 13:39:06 +01:00
Fix UI, beta versioning
This commit is contained in:
parent
578f787e49
commit
4f9dfbc3c6
3 changed files with 15 additions and 13 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "calckey",
|
||||
"version": "13.0.0-rc5",
|
||||
"version": "13.0.0-beta1",
|
||||
"codename": "aqua",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
import { In } from 'typeorm';
|
||||
import { User } from '@/models/entities/user.js';
|
||||
import type { User } from '@/models/entities/user.js';
|
||||
import { Users, DriveFiles, Notes, Channels, Blockings } from '@/models/index.js';
|
||||
import { resolveUser } from '@/remote/resolve-user.js';
|
||||
import { ApiError } from '../../error.js';
|
||||
import acceptAllFollowRequests from '@/services/following/requests/accept-all.js';
|
||||
import { publishToFollowers } from '@/services/i/update.js';
|
||||
import { apiLogger } from '../../logger.js';
|
||||
import { publishMainStream, publishUserEvent } from '@/services/stream.js';
|
||||
import define from '../../define.js';
|
||||
import { DAY } from '@/const.js';
|
||||
import { apiLogger } from '../../logger.js';
|
||||
import define from '../../define.js';
|
||||
import { ApiError } from '../../error.js';
|
||||
|
||||
export const meta = {
|
||||
tags: ['users'],
|
||||
|
@ -32,7 +32,7 @@ export const meta = {
|
|||
code: 'NOT_REMOTE',
|
||||
id: '4362f8dc-731f-4ad8-a694-be2a88922a24',
|
||||
},
|
||||
}
|
||||
},
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
|
@ -45,7 +45,6 @@ export const paramDef = {
|
|||
|
||||
// eslint-disable-next-line import/no-default-export
|
||||
export default define(meta, paramDef, async (ps, user) => {
|
||||
|
||||
if (!ps.alsoKnownAs) throw new ApiError(meta.errors.noSuchUser);
|
||||
|
||||
let unfiltered: string = ps.alsoKnownAs;
|
||||
|
@ -53,7 +52,7 @@ export default define(meta, paramDef, async (ps, user) => {
|
|||
if (unfiltered.startsWith('@')) unfiltered = unfiltered.substring(1);
|
||||
if (!unfiltered.includes('@')) throw new ApiError(meta.errors.notRemote);
|
||||
|
||||
let userAddress: string[] = unfiltered.split("@");
|
||||
const userAddress: string[] = unfiltered.split('@');
|
||||
|
||||
const knownAs: User = await resolveUser(userAddress[0], userAddress[1]).catch(e => {
|
||||
apiLogger.warn(`failed to resolve remote user: ${e}`);
|
||||
|
@ -62,7 +61,7 @@ export default define(meta, paramDef, async (ps, user) => {
|
|||
|
||||
const updates = {} as Partial<User>;
|
||||
|
||||
if(!knownAs.uri) knownAs.uri = "";
|
||||
if (!knownAs.uri) knownAs.uri = '';
|
||||
updates.alsoKnownAs = [knownAs.uri];
|
||||
|
||||
await Users.update(user.id, updates);
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<template #prefix><i class="ph-airplane-landing-bold ph-lg"></i></template>
|
||||
<template #label>{{ i18n.ts.moveFromLabel }}</template>
|
||||
</FormInput>
|
||||
<FormButton class="button" inline primary @click="save(accountAlias)">
|
||||
<FormButton class="button" inline primary @click="save(accountAlias.toString())">
|
||||
<i class="ph-floppy-disk-back-bold ph-lg"></i> {{ i18n.ts.save }}
|
||||
</FormButton>
|
||||
<div class="description">{{ i18n.ts.moveFromDescription }}</div>
|
||||
|
@ -38,6 +38,9 @@ let moveToAccount = $ref('');
|
|||
let accountAlias = $ref('');
|
||||
|
||||
async function save(account): Promise<void> {
|
||||
console.log(accountAlias);
|
||||
console.log(accountAlias.toString());
|
||||
console.log(account);
|
||||
os.apiWithDialog('i/known-as', {
|
||||
alsoKnownAs: account,
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue