Start work on formatter for content
This commit is contained in:
Melody Becker 2024-10-23 17:02:19 +02:00
parent 1dbdec1905
commit c7af216ce3
30 changed files with 292 additions and 22 deletions

View file

@ -0,0 +1,15 @@
<div class="{{ @classes }}">
{{#if (equals @server "mastodon")}}
<Note::Formatter::Mastodon>{{ @content }}Masto</Note::Formatter::Mastodon>
{{else if (equals @server "misskey")}}
<Note::Formatter::Misskey>{{ @content }}Misskey</Note::Formatter::Misskey>
{{else if (equals @server "akoma")}}
<Note::Formatter::Akoma>{{ @content }}Akoma</Note::Formatter::Akoma>
{{else if (equals @server "linstrom")}}
<Note::Formatter::Linstrom>{{ @content }}Linstrom</Note::Formatter::Linstrom>
{{else if (equals @server "wafrn")}}
<Note::Formatter::Wafrn>{{ @content }}Wafrn</Note::Formatter::Wafrn>
{{else}}
<Note::Formatter::Linstrom>{{ @content }}Unkown:{{@server}}</Note::Formatter::Linstrom>
{{/if}}
</div>

View file

@ -0,0 +1 @@
{{yield}}

View file

@ -0,0 +1,14 @@
import Component from '@glimmer/component';
export interface NoteFormatterAkomaSignature {
// The arguments accepted by the component
Args: {};
// Any blocks yielded by the component
Blocks: {
default: [];
};
// The element to which `...attributes` is applied in the component template
Element: null;
}
export default class NoteFormatterAkoma extends Component<NoteFormatterAkomaSignature> {}

View file

@ -0,0 +1 @@
{{yield}}

View file

@ -0,0 +1,14 @@
import Component from '@glimmer/component';
export interface NoteFormatterLinstromSignature {
// The arguments accepted by the component
Args: {};
// Any blocks yielded by the component
Blocks: {
default: [];
};
// The element to which `...attributes` is applied in the component template
Element: null;
}
export default class NoteFormatterLinstrom extends Component<NoteFormatterLinstromSignature> {}

View file

@ -0,0 +1 @@
{{yield}}

View file

@ -0,0 +1,14 @@
import Component from '@glimmer/component';
export interface NoteFormatterMastodonSignature {
// The arguments accepted by the component
Args: {};
// Any blocks yielded by the component
Blocks: {
default: [];
};
// The element to which `...attributes` is applied in the component template
Element: null;
}
export default class NoteFormatterMastodon extends Component<NoteFormatterMastodonSignature> {}

View file

@ -0,0 +1 @@
{{yield}}

View file

@ -0,0 +1,14 @@
import Component from '@glimmer/component';
export interface NoteFormatterMisskeySignature {
// The arguments accepted by the component
Args: {};
// Any blocks yielded by the component
Blocks: {
default: [];
};
// The element to which `...attributes` is applied in the component template
Element: null;
}
export default class NoteFormatterMisskey extends Component<NoteFormatterMisskeySignature> {}

View file

@ -0,0 +1 @@
{{yield}}

View file

@ -0,0 +1,14 @@
import Component from '@glimmer/component';
export interface NoteFormatterWafrnSignature {
// The arguments accepted by the component
Args: {};
// Any blocks yielded by the component
Blocks: {
default: [];
};
// The element to which `...attributes` is applied in the component template
Element: null;
}
export default class NoteFormatterWafrn extends Component<NoteFormatterWafrnSignature> {}

View file

@ -3,7 +3,8 @@
<p>Pfp</p>
</div>
<div class="note-user-name-and-handle">
<p class="note-user-displayname">{{@displayname}}</p>
<Note::Formatter @classes="note-user-displayname" @content={{@displayname}} @server={{@server}}/>
<p class="note-user-displayname"></p>
<p class="note-user-handle">{{@handle}}</p>
</div>
</div>