Update list-column.vue
This commit is contained in:
parent
917eb6b183
commit
9a2c3bcb6e
|
|
@ -9,7 +9,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<i class="ti ti-list"></i><span style="margin-left: 8px;">{{ column.name }}</span>
|
<i class="ti ti-list"></i><span style="margin-left: 8px;">{{ column.name }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<MkTimeline v-if="column.listId" ref="timeline" src="list" :list="column.listId" :with-renotes="withRenotes" :with-replies="withReplies"/>
|
<MkTimeline v-if="column.listId" ref="timeline" src="list" :list="column.listId" :withRenotes="withRenotes"/>
|
||||||
</XColumn>
|
</XColumn>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -28,7 +28,6 @@ const props = defineProps<{
|
||||||
|
|
||||||
let timeline = $shallowRef<InstanceType<typeof MkTimeline>>();
|
let timeline = $shallowRef<InstanceType<typeof MkTimeline>>();
|
||||||
const withRenotes = $ref(props.column.withRenotes ?? true);
|
const withRenotes = $ref(props.column.withRenotes ?? true);
|
||||||
const withReplies = $ref(props.column.withReplies ?? true);
|
|
||||||
|
|
||||||
if (props.column.listId == null) {
|
if (props.column.listId == null) {
|
||||||
setList();
|
setList();
|
||||||
|
|
@ -40,11 +39,6 @@ watch($$(withRenotes), v => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
watch($$(withReplies), v => {
|
|
||||||
updateColumn(props.column.id, {
|
|
||||||
withReplies: v,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
async function setList() {
|
async function setList() {
|
||||||
const lists = await os.api('users/lists/list');
|
const lists = await os.api('users/lists/list');
|
||||||
const { canceled, result: list } = await os.select({
|
const { canceled, result: list } = await os.select({
|
||||||
|
|
@ -80,10 +74,5 @@ const menu = [
|
||||||
text: i18n.ts.showRenotes,
|
text: i18n.ts.showRenotes,
|
||||||
ref: $$(withRenotes),
|
ref: $$(withRenotes),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
type: 'switch',
|
|
||||||
text: i18n.ts.withReplies,
|
|
||||||
ref: $$(withReplies),
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue