wip
This commit is contained in:
parent
979f91bd34
commit
65a4dd15c4
|
@ -112,6 +112,10 @@ export default defineComponent({
|
||||||
type: Array,
|
type: Array,
|
||||||
required: false
|
required: false
|
||||||
},
|
},
|
||||||
|
initialLocalOnly: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false
|
||||||
|
},
|
||||||
initialNote: {
|
initialNote: {
|
||||||
type: Object,
|
type: Object,
|
||||||
required: false
|
required: false
|
||||||
|
@ -228,6 +232,10 @@ export default defineComponent({
|
||||||
this.files = this.initialFiles;
|
this.files = this.initialFiles;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (typeof this.initialLocalOnly === 'boolean') {
|
||||||
|
this.localOnly = this.initialLocalOnly;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.mention) {
|
if (this.mention) {
|
||||||
this.text = this.mention.host ? `@${this.mention.username}@${toASCII(this.mention.host)}` : `@${this.mention.username}`;
|
this.text = this.mention.host ? `@${this.mention.username}@${toASCII(this.mention.host)}` : `@${this.mention.username}`;
|
||||||
this.text += ' ';
|
this.text += ' ';
|
||||||
|
|
|
@ -50,6 +50,7 @@ export default defineComponent({
|
||||||
renote: null as any,
|
renote: null as any,
|
||||||
specified: null as any,
|
specified: null as any,
|
||||||
visibility: null as string | null,
|
visibility: null as string | null,
|
||||||
|
localOnly: null as boolean | null,
|
||||||
files: null as any[] | null,
|
files: null as any[] | null,
|
||||||
|
|
||||||
faShareAlt
|
faShareAlt
|
||||||
|
@ -70,8 +71,20 @@ export default defineComponent({
|
||||||
if (url) noteText += `${url}`;
|
if (url) noteText += `${url}`;
|
||||||
this.initialText = noteText.trim();
|
this.initialText = noteText.trim();
|
||||||
|
|
||||||
this.visibility = urlParams.get('visibility');
|
const visibility = urlParams.get('visibility');
|
||||||
if (!noteVisibilities.includes(this.visibility)) this.visibility = null;
|
if (noteVisibilities.includes(visibility)) {
|
||||||
|
this.visibility = visibility;
|
||||||
|
} else {
|
||||||
|
// Mastodonと互換性を持たせてみる
|
||||||
|
if (this.visibility === 'unlisted') this.visibility = 'home';
|
||||||
|
else if (this.visibility === 'private') this.visibility = 'followers';
|
||||||
|
else if (this.visibility === 'direct') this.visibility = 'specified';
|
||||||
|
else this.visibility = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
const localOnly = urlParams.get('localOnly');
|
||||||
|
if (localOnly === '0') this.localOnly = false;
|
||||||
|
else if (localOnly === '1') this.localOnly = true;
|
||||||
|
|
||||||
await Promise.all([(async () => {
|
await Promise.all([(async () => {
|
||||||
const replyId = urlParams.get('replyId');
|
const replyId = urlParams.get('replyId');
|
||||||
|
|
Loading…
Reference in New Issue