frontend
Start work on formatter for content
This commit is contained in:
parent
1dbdec1905
commit
c7af216ce3
30 changed files with 292 additions and 22 deletions
|
@ -3,6 +3,7 @@
|
|||
<Note::UserHeader
|
||||
@displayname="{{@note.displayname}}"
|
||||
@handle="@{{@note.username}}@{{@note.server}}"
|
||||
@server="{{@note.servertype}}"
|
||||
/>
|
||||
<Note::Content @content="{{@note.content}}" />
|
||||
<div class="note-timestamps-container">
|
||||
|
|
15
frontend-reactive/app/components/note/formatter.hbs
Normal file
15
frontend-reactive/app/components/note/formatter.hbs
Normal 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>
|
|
@ -0,0 +1 @@
|
|||
{{yield}}
|
14
frontend-reactive/app/components/note/formatter/akoma.ts
Normal file
14
frontend-reactive/app/components/note/formatter/akoma.ts
Normal 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> {}
|
|
@ -0,0 +1 @@
|
|||
{{yield}}
|
14
frontend-reactive/app/components/note/formatter/linstrom.ts
Normal file
14
frontend-reactive/app/components/note/formatter/linstrom.ts
Normal 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> {}
|
|
@ -0,0 +1 @@
|
|||
{{yield}}
|
14
frontend-reactive/app/components/note/formatter/mastodon.ts
Normal file
14
frontend-reactive/app/components/note/formatter/mastodon.ts
Normal 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> {}
|
|
@ -0,0 +1 @@
|
|||
{{yield}}
|
14
frontend-reactive/app/components/note/formatter/misskey.ts
Normal file
14
frontend-reactive/app/components/note/formatter/misskey.ts
Normal 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> {}
|
|
@ -0,0 +1 @@
|
|||
{{yield}}
|
14
frontend-reactive/app/components/note/formatter/wafrn.ts
Normal file
14
frontend-reactive/app/components/note/formatter/wafrn.ts
Normal 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> {}
|
|
@ -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>
|
|
@ -1,5 +1,6 @@
|
|||
<div class="timeline">
|
||||
{{#each @notes as |note|}}
|
||||
<Note @isInTimeline="true" @note={{note}}/>
|
||||
<hr class="timeline-separator">
|
||||
{{/each}}
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue