chore: カラム名が指定されている場合にはチャンネル名を取得しないように
This commit is contained in:
parent
6209947740
commit
e173d2b997
|
|
@ -40,11 +40,13 @@ const antennaName = ref<string | null>(null);
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (props.column.antennaId == null) {
|
if (props.column.antennaId == null) {
|
||||||
setAntenna();
|
setAntenna();
|
||||||
} else {
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
watch([() => props.column.name, () => props.column.antennaId], () => {
|
||||||
|
if (!props.column.name && props.column.antennaId) {
|
||||||
misskeyApi('antennas/show', { antennaId: props.column.antennaId })
|
misskeyApi('antennas/show', { antennaId: props.column.antennaId })
|
||||||
.then(value => {
|
.then(value => antennaName.value = value.name);
|
||||||
antennaName.value = value.name;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,11 @@ const channelName = ref<string | null>(null);
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (props.column.channelId == null) {
|
if (props.column.channelId == null) {
|
||||||
setChannel();
|
setChannel();
|
||||||
} else {
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
watch([() => props.column.name, () => props.column.channelId], () => {
|
||||||
|
if (!props.column.name && props.column.channelId) {
|
||||||
misskeyApi('channels/show', { channelId: props.column.channelId })
|
misskeyApi('channels/show', { channelId: props.column.channelId })
|
||||||
.then(value => channelName.value = value.name);
|
.then(value => channelName.value = value.name);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,11 @@ const listName = ref<string | null>(null);
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (props.column.listId == null) {
|
if (props.column.listId == null) {
|
||||||
setList();
|
setList();
|
||||||
} else {
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
watch([() => props.column.name, () => props.column.listId], () => {
|
||||||
|
if (!props.column.name && props.column.listId) {
|
||||||
misskeyApi('users/lists/show', { listId: props.column.listId })
|
misskeyApi('users/lists/show', { listId: props.column.listId })
|
||||||
.then(value => listName.value = value.name);
|
.then(value => listName.value = value.name);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref, shallowRef, watch } from 'vue';
|
import { computed, onMounted, ref, shallowRef, watch } from 'vue';
|
||||||
import XColumn from './column.vue';
|
import XColumn from './column.vue';
|
||||||
import { updateColumn, Column } from './deck-store.js';
|
import { updateColumn, Column } from './deck-store.js';
|
||||||
import MkTimeline from '@/components/MkTimeline.vue';
|
import MkTimeline from '@/components/MkTimeline.vue';
|
||||||
|
|
@ -38,7 +38,11 @@ const roleName = ref<string | null>(null);
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (props.column.roleId == null) {
|
if (props.column.roleId == null) {
|
||||||
setRole();
|
setRole();
|
||||||
} else {
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
watch([() => props.column.name, () => props.column.roleId], () => {
|
||||||
|
if (!props.column.name && props.column.roleId) {
|
||||||
misskeyApi('roles/show', { roleId: props.column.roleId })
|
misskeyApi('roles/show', { roleId: props.column.roleId })
|
||||||
.then(value => roleName.value = value.name);
|
.then(value => roleName.value = value.name);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue