add columns

This commit is contained in:
samunohito 2024-02-12 12:04:27 +09:00
parent 83228a3422
commit 5dd1fd7c5f
5 changed files with 24 additions and 3 deletions

View file

@ -88,6 +88,7 @@ export class EmojiEntityService {
aliases: emoji.aliases,
category: emoji.category,
publicUrl: emoji.publicUrl,
originalUrl: emoji.originalUrl,
license: emoji.license,
localOnly: emoji.localOnly,
isSensitive: emoji.isSensitive,

View file

@ -131,6 +131,10 @@ export const packedEmojiDetailedAdminSchema = {
type: 'string',
optional: false, nullable: false,
},
originalUrl: {
type: 'string',
optional: false, nullable: false,
},
uri: {
type: 'string',
optional: false, nullable: true,

View file

@ -45,6 +45,7 @@ export const paramDef = {
host: { type: 'string' },
uri: { type: 'string' },
publicUrl: { type: 'string' },
originalUrl: { type: 'string' },
type: { type: 'string' },
aliases: { type: 'string' },
category: { type: 'string' },

View file

@ -57,6 +57,9 @@
<template #label>updatedAt(to)</template>
</MkInput>
</div>
<div role="separator" :class="$style.divider"></div>
<div :class="[[spMode ? $style.searchButtonsSp : $style.searchButtons]]">
<MkButton primary @click="onSearchButtonClicked">
{{ i18n.ts.search }}
@ -146,6 +149,8 @@ type GridItem = {
roleIdsThatCanBeUsedThisEmojiAsReaction: string;
fileId?: string;
updatedAt: string | null;
publicUrl?: string | null;
originalUrl?: string | null;
}
function setupGrid(): GridSetting {
@ -177,7 +182,9 @@ function setupGrid(): GridSetting {
{ bindTo: 'isSensitive', title: 'sensitive', type: 'boolean', editable: true, width: 90 },
{ bindTo: 'localOnly', title: 'localOnly', type: 'boolean', editable: true, width: 90 },
{ bindTo: 'roleIdsThatCanBeUsedThisEmojiAsReaction', title: 'role', type: 'text', editable: true, width: 140 },
{ bindTo: 'updatedAt', type: 'hidden', editable: false, width: 'auto' },
{ bindTo: 'updatedAt', type: 'text', editable: false, width: 'auto' },
{ bindTo: 'publicUrl', type: 'text', editable: false, width: 180 },
{ bindTo: 'originalUrl', type: 'text', editable: false, width: 180 },
],
};
}
@ -512,12 +519,14 @@ function refreshGridItems() {
name: it.name,
host: it.host ?? '',
category: it.category ?? '',
aliases: it.aliases.join(', '),
aliases: it.aliases.join(','),
license: it.license ?? '',
isSensitive: it.isSensitive,
localOnly: it.localOnly,
roleIdsThatCanBeUsedThisEmojiAsReaction: it.roleIdsThatCanBeUsedThisEmojiAsReaction.join(', '),
roleIdsThatCanBeUsedThisEmojiAsReaction: it.roleIdsThatCanBeUsedThisEmojiAsReaction.join(','),
updatedAt: it.updatedAt,
publicUrl: it.publicUrl,
originalUrl: it.originalUrl,
}));
originGridItems.value = JSON.parse(JSON.stringify(gridItems.value));
}
@ -614,4 +623,8 @@ onMounted(async () => {
flex-wrap: wrap;
}
.divider {
margin: 8px 0;
border-top: solid 0.5px var(--divider);
}
</style>

View file

@ -4454,6 +4454,7 @@ export type components = {
/** @description The local host is represented with `null`. */
host: string | null;
publicUrl: string;
originalUrl: string;
uri: string | null;
type: string | null;
aliases: string[];
@ -6950,6 +6951,7 @@ export type operations = {
host?: string;
uri?: string;
publicUrl?: string;
originalUrl?: string;
type?: string;
aliases?: string;
category?: string;