Fix note rendering, new function header
Fixed note rendering due to bad user header TODO: It's a stupid bandaid, replace with proper formatter once it works Remove test stuff Some spacing in the colours for readability CreateNoteRemote header added
This commit is contained in:
parent
c919cc8c67
commit
599874c486
13 changed files with 78 additions and 71 deletions
|
@ -1,13 +0,0 @@
|
||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"embed"
|
|
||||||
"fmt"
|
|
||||||
)
|
|
||||||
|
|
||||||
//go:embed example
|
|
||||||
var fs embed.FS
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
fmt.Println(fs.ReadDir("example"))
|
|
||||||
}
|
|
BIN
cmd/test/test
BIN
cmd/test/test
Binary file not shown.
|
@ -3,7 +3,8 @@
|
||||||
<p>Pfp</p>
|
<p>Pfp</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="note-user-name-and-handle">
|
<div class="note-user-name-and-handle">
|
||||||
<Note::Formatter @classes="note-user-displayname" @content={{@displayname}} @server={{@server}}/>
|
<p class="note-user-displayname">{{@displayname}}:{{@server}}</p>
|
||||||
|
<!--<Util::Formatter @classes="note-user-displayname" @content={{@displayname}} @server={{@server}}/>-->
|
||||||
<p class="note-user-displayname"></p>
|
<p class="note-user-displayname"></p>
|
||||||
<p class="note-user-handle">{{@handle}}</p>
|
<p class="note-user-handle">{{@handle}}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{{yield}}
|
<p>{{@content}}</p>
|
|
@ -1 +1,2 @@
|
||||||
|
<p>{{@content}}</p>
|
||||||
{{yield}}
|
{{yield}}
|
|
@ -1 +1,2 @@
|
||||||
|
<p>{{@content}}</p>
|
||||||
{{yield}}
|
{{yield}}
|
|
@ -1 +1,2 @@
|
||||||
|
<p>{{@content}}</p>
|
||||||
{{yield}}
|
{{yield}}
|
|
@ -1 +1,2 @@
|
||||||
|
<p>{{@content}}</p>
|
||||||
{{yield}}
|
{{yield}}
|
|
@ -1,54 +1,4 @@
|
||||||
import Route from '@ember/routing/route';
|
import Route from '@ember/routing/route'
|
||||||
import { type Registry as Services, service } from '@ember/service';
|
import { type Registry as Services, service } from '@ember/service'
|
||||||
|
|
||||||
export default class ApplicationRoute extends Route {
|
export default class ApplicationRoute extends Route {}
|
||||||
@service declare intl: Services['intl'];
|
|
||||||
|
|
||||||
beforeModel() {
|
|
||||||
this.intl.setLocale(['en-us']);
|
|
||||||
}
|
|
||||||
|
|
||||||
model() {
|
|
||||||
console.log('root route loaded');
|
|
||||||
return {
|
|
||||||
notes: [
|
|
||||||
{
|
|
||||||
displayname: 'alice',
|
|
||||||
username: 'bob',
|
|
||||||
server: 'example.com',
|
|
||||||
content: 'lorem ipsum',
|
|
||||||
createdAt: Date.now() - 360000,
|
|
||||||
editedAt: Date.now() - 60000,
|
|
||||||
servertype: 'mastodon',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
displayname: 'Melody',
|
|
||||||
username: 'mstar',
|
|
||||||
server: 'woem.men',
|
|
||||||
content:
|
|
||||||
'Grapple keel reef fathom haul wind bilge rat swing the lead belay line pink. Man-of-war mizzenmast killick lookout yo-ho-ho Sail ho gabion careen sutler stern. Draught wherry lookout schooner prow hail-shot spanker Letter of Marque lateen sail strike colors.\n\nLad heave to topgallant scallywag scuppers Spanish Main poop deck spike hulk broadside. Snow take a caulk hornswaggle gaff swab quarter lugger spanker bilge provost. Man-of-war measured fer yer chains lugger cable loaded to the gunwalls prow piracy snow doubloon furl.\n\nDead men tell no tales jib chase guns gunwalls Gold Road smartly nipperkin topsail bilge water Pirate Round. Gaff gunwalls bilged on her anchor bilge water scourge of the seven seas parley ho sheet chase guns squiffy. Scuppers fathom ho quarter gally heave to yardarm coxswain red ensign pink.',
|
|
||||||
createdAt: Date.now() - 3600,
|
|
||||||
servertype: 'linstrom',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
displayname: 'alice',
|
|
||||||
username: 'bob',
|
|
||||||
server: 'example.com',
|
|
||||||
content: 'lorem ipsum',
|
|
||||||
createdAt: Date.now() - 360000,
|
|
||||||
editedAt: Date.now() - 60000,
|
|
||||||
servertype: 'wafrn',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
displayname: 'Melody',
|
|
||||||
username: 'mstar',
|
|
||||||
server: 'woem.men',
|
|
||||||
content:
|
|
||||||
'Grapple keel reef fathom haul wind bilge rat swing the lead belay line pink. Man-of-war mizzenmast killick lookout yo-ho-ho Sail ho gabion careen sutler stern. Draught wherry lookout schooner prow hail-shot spanker Letter of Marque lateen sail strike colors.\n\nLad heave to topgallant scallywag scuppers Spanish Main poop deck spike hulk broadside. Snow take a caulk hornswaggle gaff swab quarter lugger spanker bilge provost. Man-of-war measured fer yer chains lugger cable loaded to the gunwalls prow piracy snow doubloon furl.\n\nDead men tell no tales jib chase guns gunwalls Gold Road smartly nipperkin topsail bilge water Pirate Round. Gaff gunwalls bilged on her anchor bilge water scourge of the seven seas parley ho sheet chase guns squiffy. Scuppers fathom ho quarter gally heave to yardarm coxswain red ensign pink.',
|
|
||||||
createdAt: Date.now() - 3600,
|
|
||||||
servertype: 'unknown',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,3 +1,54 @@
|
||||||
import Route from '@ember/routing/route';
|
import Route from '@ember/routing/route'
|
||||||
|
import { type Registry as Services, service } from '@ember/service'
|
||||||
|
|
||||||
export default class IndexRoute extends Route {}
|
export default class IndexRoute extends Route {
|
||||||
|
@service declare intl: Services['intl']
|
||||||
|
|
||||||
|
beforeModel() {
|
||||||
|
this.intl.setLocale(['en-us'])
|
||||||
|
}
|
||||||
|
|
||||||
|
model() {
|
||||||
|
console.log('root route loaded')
|
||||||
|
return {
|
||||||
|
notes: [
|
||||||
|
{
|
||||||
|
displayname: 'alice',
|
||||||
|
username: 'bob',
|
||||||
|
server: 'example.com',
|
||||||
|
content: 'lorem ipsum',
|
||||||
|
createdAt: Date.now() - 360000,
|
||||||
|
editedAt: Date.now() - 60000,
|
||||||
|
servertype: 'mastodon',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayname: 'Melody',
|
||||||
|
username: 'mstar',
|
||||||
|
server: 'woem.men',
|
||||||
|
content:
|
||||||
|
'Grapple keel reef fathom haul wind bilge rat swing the lead belay line pink. Man-of-war mizzenmast killick lookout yo-ho-ho Sail ho gabion careen sutler stern. Draught wherry lookout schooner prow hail-shot spanker Letter of Marque lateen sail strike colors.\n\nLad heave to topgallant scallywag scuppers Spanish Main poop deck spike hulk broadside. Snow take a caulk hornswaggle gaff swab quarter lugger spanker bilge provost. Man-of-war measured fer yer chains lugger cable loaded to the gunwalls prow piracy snow doubloon furl.\n\nDead men tell no tales jib chase guns gunwalls Gold Road smartly nipperkin topsail bilge water Pirate Round. Gaff gunwalls bilged on her anchor bilge water scourge of the seven seas parley ho sheet chase guns squiffy. Scuppers fathom ho quarter gally heave to yardarm coxswain red ensign pink.',
|
||||||
|
createdAt: Date.now() - 3600,
|
||||||
|
servertype: 'linstrom',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayname: 'alice',
|
||||||
|
username: 'bob',
|
||||||
|
server: 'example.com',
|
||||||
|
content: 'lorem ipsum',
|
||||||
|
createdAt: Date.now() - 360000,
|
||||||
|
editedAt: Date.now() - 60000,
|
||||||
|
servertype: 'wafrn',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayname: 'Melody',
|
||||||
|
username: 'mstar',
|
||||||
|
server: 'woem.men',
|
||||||
|
content:
|
||||||
|
'Grapple keel reef fathom haul wind bilge rat swing the lead belay line pink. Man-of-war mizzenmast killick lookout yo-ho-ho Sail ho gabion careen sutler stern. Draught wherry lookout schooner prow hail-shot spanker Letter of Marque lateen sail strike colors.\n\nLad heave to topgallant scallywag scuppers Spanish Main poop deck spike hulk broadside. Snow take a caulk hornswaggle gaff swab quarter lugger spanker bilge provost. Man-of-war measured fer yer chains lugger cable loaded to the gunwalls prow piracy snow doubloon furl.\n\nDead men tell no tales jib chase guns gunwalls Gold Road smartly nipperkin topsail bilge water Pirate Round. Gaff gunwalls bilged on her anchor bilge water scourge of the seven seas parley ho sheet chase guns squiffy. Scuppers fathom ho quarter gally heave to yardarm coxswain red ensign pink.',
|
||||||
|
createdAt: Date.now() - 3600,
|
||||||
|
servertype: 'unknown',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
--text-800: hsl(273deg 35% 20%);
|
--text-800: hsl(273deg 35% 20%);
|
||||||
--text-900: hsl(272deg 33% 10%);
|
--text-900: hsl(272deg 33% 10%);
|
||||||
--text-950: hsl(273deg 36% 5%);
|
--text-950: hsl(273deg 36% 5%);
|
||||||
|
|
||||||
--background-50: hsl(267deg 36% 95%);
|
--background-50: hsl(267deg 36% 95%);
|
||||||
--background-100: hsl(268deg 37% 90%);
|
--background-100: hsl(268deg 37% 90%);
|
||||||
--background-200: hsl(267deg 35% 80%);
|
--background-200: hsl(267deg 35% 80%);
|
||||||
|
@ -42,6 +43,7 @@
|
||||||
--background-800: hsl(267deg 35% 20%);
|
--background-800: hsl(267deg 35% 20%);
|
||||||
--background-900: hsl(268deg 37% 10%);
|
--background-900: hsl(268deg 37% 10%);
|
||||||
--background-950: hsl(267deg 36% 5%);
|
--background-950: hsl(267deg 36% 5%);
|
||||||
|
|
||||||
--primary-50: hsl(273deg 36% 95%);
|
--primary-50: hsl(273deg 36% 95%);
|
||||||
--primary-100: hsl(272deg 37% 90%);
|
--primary-100: hsl(272deg 37% 90%);
|
||||||
--primary-200: hsl(273deg 37% 80%);
|
--primary-200: hsl(273deg 37% 80%);
|
||||||
|
@ -53,6 +55,7 @@
|
||||||
--primary-800: hsl(273deg 37% 20%);
|
--primary-800: hsl(273deg 37% 20%);
|
||||||
--primary-900: hsl(272deg 37% 10%);
|
--primary-900: hsl(272deg 37% 10%);
|
||||||
--primary-950: hsl(273deg 36% 5%);
|
--primary-950: hsl(273deg 36% 5%);
|
||||||
|
|
||||||
--secondary-50: hsl(307deg 36% 95%);
|
--secondary-50: hsl(307deg 36% 95%);
|
||||||
--secondary-100: hsl(306deg 37% 90%);
|
--secondary-100: hsl(306deg 37% 90%);
|
||||||
--secondary-200: hsl(308deg 37% 80%);
|
--secondary-200: hsl(308deg 37% 80%);
|
||||||
|
@ -64,6 +67,7 @@
|
||||||
--secondary-800: hsl(308deg 37% 20%);
|
--secondary-800: hsl(308deg 37% 20%);
|
||||||
--secondary-900: hsl(306deg 37% 10%);
|
--secondary-900: hsl(306deg 37% 10%);
|
||||||
--secondary-950: hsl(307deg 36% 5%);
|
--secondary-950: hsl(307deg 36% 5%);
|
||||||
|
|
||||||
--accent-50: hsl(320deg 36% 95%);
|
--accent-50: hsl(320deg 36% 95%);
|
||||||
--accent-100: hsl(319deg 37% 90%);
|
--accent-100: hsl(319deg 37% 90%);
|
||||||
--accent-200: hsl(317deg 37% 80%);
|
--accent-200: hsl(317deg 37% 80%);
|
||||||
|
@ -91,6 +95,7 @@
|
||||||
--text-800: hsl(273deg 35% 80%);
|
--text-800: hsl(273deg 35% 80%);
|
||||||
--text-900: hsl(272deg 33% 90%);
|
--text-900: hsl(272deg 33% 90%);
|
||||||
--text-950: hsl(273deg 36% 95%);
|
--text-950: hsl(273deg 36% 95%);
|
||||||
|
|
||||||
--background-50: hsl(267deg 36% 5%);
|
--background-50: hsl(267deg 36% 5%);
|
||||||
--background-100: hsl(268deg 37% 10%);
|
--background-100: hsl(268deg 37% 10%);
|
||||||
--background-200: hsl(267deg 35% 20%);
|
--background-200: hsl(267deg 35% 20%);
|
||||||
|
@ -102,6 +107,7 @@
|
||||||
--background-800: hsl(267deg 35% 80%);
|
--background-800: hsl(267deg 35% 80%);
|
||||||
--background-900: hsl(268deg 37% 90%);
|
--background-900: hsl(268deg 37% 90%);
|
||||||
--background-950: hsl(267deg 36% 95%);
|
--background-950: hsl(267deg 36% 95%);
|
||||||
|
|
||||||
--primary-50: hsl(273deg 36% 5%);
|
--primary-50: hsl(273deg 36% 5%);
|
||||||
--primary-100: hsl(272deg 37% 10%);
|
--primary-100: hsl(272deg 37% 10%);
|
||||||
--primary-200: hsl(273deg 37% 20%);
|
--primary-200: hsl(273deg 37% 20%);
|
||||||
|
@ -113,6 +119,7 @@
|
||||||
--primary-800: hsl(273deg 37% 80%);
|
--primary-800: hsl(273deg 37% 80%);
|
||||||
--primary-900: hsl(272deg 37% 90%);
|
--primary-900: hsl(272deg 37% 90%);
|
||||||
--primary-950: hsl(273deg 36% 95%);
|
--primary-950: hsl(273deg 36% 95%);
|
||||||
|
|
||||||
--secondary-50: hsl(307deg 36% 5%);
|
--secondary-50: hsl(307deg 36% 5%);
|
||||||
--secondary-100: hsl(306deg 37% 10%);
|
--secondary-100: hsl(306deg 37% 10%);
|
||||||
--secondary-200: hsl(308deg 37% 20%);
|
--secondary-200: hsl(308deg 37% 20%);
|
||||||
|
@ -124,6 +131,7 @@
|
||||||
--secondary-800: hsl(308deg 37% 80%);
|
--secondary-800: hsl(308deg 37% 80%);
|
||||||
--secondary-900: hsl(306deg 37% 90%);
|
--secondary-900: hsl(306deg 37% 90%);
|
||||||
--secondary-950: hsl(307deg 36% 95%);
|
--secondary-950: hsl(307deg 36% 95%);
|
||||||
|
|
||||||
--accent-50: hsl(313deg 36% 5%);
|
--accent-50: hsl(313deg 36% 5%);
|
||||||
--accent-100: hsl(319deg 37% 10%);
|
--accent-100: hsl(319deg 37% 10%);
|
||||||
--accent-200: hsl(317deg 37% 20%);
|
--accent-200: hsl(317deg 37% 20%);
|
||||||
|
|
|
@ -121,7 +121,13 @@ func (s *Storage) UpdateNote(note *Note) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Storage) CreateNote() (*Note, error) {
|
func (s *Storage) CreateNoteLocal() (*Note, error) {
|
||||||
|
defer util.Untrace(util.Trace(&log.Logger))
|
||||||
|
// TODO: Think of good arguments and implement me
|
||||||
|
panic("not implemented")
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *Storage) CreateNoteRemote() (*Note, error) {
|
||||||
defer util.Untrace(util.Trace(&log.Logger))
|
defer util.Untrace(util.Trace(&log.Logger))
|
||||||
// TODO: Think of good arguments and implement me
|
// TODO: Think of good arguments and implement me
|
||||||
panic("not implemented")
|
panic("not implemented")
|
||||||
|
|
Loading…
Reference in a new issue