wip
This commit is contained in:
parent
34ad95befa
commit
11288fd5c8
2 changed files with 20 additions and 11 deletions
|
@ -116,6 +116,11 @@ export default defineComponent({
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
required: false
|
required: false
|
||||||
},
|
},
|
||||||
|
visibleUsers: {
|
||||||
|
type: Array,
|
||||||
|
required: false,
|
||||||
|
default: () => []
|
||||||
|
},
|
||||||
initialNote: {
|
initialNote: {
|
||||||
type: Object,
|
type: Object,
|
||||||
required: false
|
required: false
|
||||||
|
@ -149,7 +154,6 @@ export default defineComponent({
|
||||||
cw: null,
|
cw: null,
|
||||||
localOnly: this.$store.state.rememberNoteVisibility ? this.$store.state.localOnly : this.$store.state.defaultNoteLocalOnly,
|
localOnly: this.$store.state.rememberNoteVisibility ? this.$store.state.localOnly : this.$store.state.defaultNoteLocalOnly,
|
||||||
visibility: (this.$store.state.rememberNoteVisibility ? this.$store.state.visibility : this.$store.state.defaultNoteVisibility) as typeof noteVisibilities[number],
|
visibility: (this.$store.state.rememberNoteVisibility ? this.$store.state.visibility : this.$store.state.defaultNoteVisibility) as typeof noteVisibilities[number],
|
||||||
visibleUsers: [],
|
|
||||||
autocomplete: null,
|
autocomplete: null,
|
||||||
draghover: false,
|
draghover: false,
|
||||||
quoteId: null,
|
quoteId: null,
|
||||||
|
|
|
@ -54,6 +54,7 @@ export default defineComponent({
|
||||||
visibility: null as string | null,
|
visibility: null as string | null,
|
||||||
localOnly: null as boolean | null,
|
localOnly: null as boolean | null,
|
||||||
files: null as any[] | null,
|
files: null as any[] | null,
|
||||||
|
visibleUsers: [] as any[],
|
||||||
|
|
||||||
faShareAlt
|
faShareAlt
|
||||||
}
|
}
|
||||||
|
@ -112,16 +113,20 @@ export default defineComponent({
|
||||||
this.renote = obj.object;
|
this.renote = obj.object;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})(),(async () => {
|
})(),(() => {
|
||||||
const specifiedId = urlParams.get('specifiedId');
|
const visibleUserIds = urlParams.get('visibleUserIds');
|
||||||
const specifiedAcct = urlParams.get('specifiedAcct');
|
if (!visibleUserIds) return;
|
||||||
if (specifiedId) {
|
return Promise.all(visibleUserIds.split(',')
|
||||||
this.specified = await os.api('users/show', {
|
.map(userId => os.api('users/show', { userId })
|
||||||
userId: specifiedId
|
.then(user => this.visibleUsers.push(user))
|
||||||
});
|
.catch(() => Error(`invalid userId: ${userId}`))));
|
||||||
} else if (specifiedAcct) {
|
})(),(() => {
|
||||||
this.specified = await os.api('users/show', parseAcct(specifiedAcct));
|
const visibleAccts = urlParams.get('visibleAccts');
|
||||||
}
|
if (!visibleAccts) return;
|
||||||
|
return Promise.all(visibleAccts.split(',')
|
||||||
|
.map(acct => os.api('users/show', parseAcct(acct))
|
||||||
|
.then(user => this.visibleUsers.push(user))
|
||||||
|
.catch(() => Error(`invalid acct: ${acct}`))));
|
||||||
})(),(async () => {
|
})(),(async () => {
|
||||||
const fileIds = urlParams.get('fileIds');
|
const fileIds = urlParams.get('fileIds');
|
||||||
if (fileIds) {
|
if (fileIds) {
|
||||||
|
|
Loading…
Reference in a new issue