diff --git a/.eslintrc.cjs b/.eslintrc.cjs
index d030347..637c87e 100644
--- a/.eslintrc.cjs
+++ b/.eslintrc.cjs
@@ -12,5 +12,6 @@ module.exports = {
sourceType: 'module'
},
rules: {
- }
+ },
+ ignorePatterns: ["**/*.jest.js"],
}
diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml
new file mode 100644
index 0000000..0ac616c
--- /dev/null
+++ b/.github/workflows/codecov.yml
@@ -0,0 +1,31 @@
+name: Running Code Coverage
+
+on: [push, pull_request]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ node-version: [18.x, 16.x]
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v2
+ with:
+ fetch-depth: 2
+
+ - name: Set up Node.js ${{ matrix.node-version }}
+ uses: actions/setup-node@v1
+ with:
+ node-version: ${{ matrix.node-version }}
+
+ - name: Install dependencies
+ run: npm install
+
+ - name: Run tests
+ run: npm run test
+
+ - name: Upload coverage to Codecov
+ uses: codecov/codecov-action@v1
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 0000000..131ba90
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,25 @@
+name: Unit Tests
+
+on: [push, pull_request]
+
+jobs:
+ tests:
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ node-version: [18.x, 16.x]
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Use Node.js ${{ matrix.node-version }}
+ uses: actions/setup-node@v2
+ with:
+ node-version: ${{ matrix.node-version }}
+
+ - name: Install dependencies
+ run: npm install
+
+ - name: Run tests
+ run: npm test
diff --git a/README.md b/README.md
index e5fd7e5..1466530 100644
--- a/README.md
+++ b/README.md
@@ -216,3 +216,5 @@ To block users or instances:
- Add an entry to the file at `.data/blocks`
- You can block a user using their actor ID (something like https://foo.bar/@jerk) or their entire domain (https://foo.bar/)
- Restart the app
+
+CSE 210 ROXXX
diff --git a/babel.config.cjs b/babel.config.cjs
new file mode 100644
index 0000000..a1db3ce
--- /dev/null
+++ b/babel.config.cjs
@@ -0,0 +1,3 @@
+module.exports = {
+ presets: [['@babel/preset-env', {targets: {node: 'current'}}]],
+};
\ No newline at end of file
diff --git a/compose-dev.yaml b/compose-dev.yaml
new file mode 100644
index 0000000..cc7fd0a
--- /dev/null
+++ b/compose-dev.yaml
@@ -0,0 +1,12 @@
+services:
+ app:
+ entrypoint:
+ - sleep
+ - infinity
+ image: docker/dev-environments-javascript:stable-1
+ init: true
+ volumes:
+ - type: bind
+ source: /var/run/docker.sock
+ target: /var/run/docker.sock
+
diff --git a/design/dashboard.handlebars b/design/dashboard.handlebars
index a9f394c..66a73a9 100644
--- a/design/dashboard.handlebars
+++ b/design/dashboard.handlebars
@@ -1,43 +1,50 @@
-
- {{prefs.icons.latest}} Latest
-
-
-
- {{#if activitystream}}
- {{#each activitystream}}
- {{#with this}}
-
- {{#if boost}}
-
- {{/if}}
- {{> note note=note me=../me}}
-
- {{/with}}
- {{/each}}
- {{else}}
-
-
Follow some people to fill your feed with posts.
-
I suggest following me!
- I'm benbrown@hackers.town
-
-
+
+
+ {{#if activitystream}}
+ {{#each activitystream}}
+
+ {{#with this}}
+ {{#if boost}}
+
+ {{/if}}
+ {{> note note=note me=../me}}
+ {{/with}}
+
+ {{/each}}
+ {{else}}
+
+ {{/if}}
+
+
+ {{#if next}}
+
{{/if}}
-
-{{#if next}}
-
More
-{{/if}}
-
diff --git a/design/dms.handlebars b/design/dms.handlebars
index 7dff60d..d7d7750 100644
--- a/design/dms.handlebars
+++ b/design/dms.handlebars
@@ -1,27 +1,38 @@
-{{#if error}}
-
- {{error.message}}
-
-{{else}}
-
- {{#if feed}}
-
-
-
- {{#each inbox}}
- {{> dm message=this me=../me}}
- {{/each}}
-
- {{> minicomposer inReplyTo=lastIncoming to=feed.id}}
-
- {{else}}
-
-
- Select a conversation. To create a new one, navigate to a profile.
-
- {{/if}}
-
-{{/if}}
+
+ {{#if error}}
+
+ {{else}}
+
+ {{#if feed}}
+
+
+
+ {{#each inbox}}
+ -
+ {{> dm message=this me=../me}}
+
+ {{/each}}
+
+ {{> minicomposer inReplyTo=lastIncoming to=feed.id}}
+
+ {{else}}
+
+ Select a conversation. To create a new one, navigate to a profile.
+
+ {{/if}}
+
+ {{/if}}
+
\ No newline at end of file
+ document.addEventListener('DOMContentLoaded', () => {
+ app.pollForPosts();
+ });
+
diff --git a/design/feeds.handlebars b/design/feeds.handlebars
index 7c48688..5b7e740 100644
--- a/design/feeds.handlebars
+++ b/design/feeds.handlebars
@@ -1,40 +1,47 @@
-{{#if error}}
-
- {{error.message}}
-
-{{else}}
-
- {{#if feed}}
- {{> profileHeader actor=feed nobio=true}}
- {{/if}}
- {{#if activitystream}}
- {{#each activitystream}}
- {{#with this}}
-
- {{#if boost}}
-
- {{> note note=note}}
- {{else}}
- {{> note note=note hidebyline=true}}
- {{/if}}
-
- {{/with}}
- {{/each}}
- {{else}}
-
-
- {{/if}}
+
+ {{#if error}}
+
+ {{else}}
+
+ {{#if feed}}
+ {{> profileHeader actor=feed nobio=true}}
+ {{/if}}
+
+ {{#if activitystream}}
+ {{#each activitystream}}
+ {{#with this}}
+
+ {{#if boost}}
+
+ {{> note note=note}}
+ {{else}}
+ {{> note note=note hidebyline=true}}
+ {{/if}}
+
+ {{/with}}
+ {{/each}}
+ {{else}}
+
+ {{/if}}
- {{#if next}}
- More
- {{/if}}
+ {{#if next}}
+
+ {{/if}}
+
+ {{/if}}
+
-
-{{/if}}
\ No newline at end of file
+ document.addEventListener('DOMContentLoaded', () => {
+ app.pollForPosts();
+ });
+
diff --git a/design/findresults.handlebars b/design/findresults.handlebars
index 8335e62..52df3f4 100644
--- a/design/findresults.handlebars
+++ b/design/findresults.handlebars
@@ -1,23 +1,34 @@
-
+
+
{{#if results}}
- {{#each results}}
-
- {{> personCard actor=this nobio=true}}
-
- {{/each}}
+
+ {{#each results}}
+
+ {{> personCard actor=this nobio=true}}
+
+ {{/each}}
+
{{else}}
-
- Nobody results
+
+ No results found.
{{/if}}
-
+
\ No newline at end of file
+ document.addEventListener('DOMContentLoaded', () => {
+ app.pollForPosts();
+ });
+
diff --git a/design/followers.handlebars b/design/followers.handlebars
index 7f5a864..e0d072d 100644
--- a/design/followers.handlebars
+++ b/design/followers.handlebars
@@ -1,15 +1,21 @@
-
-
+
+
-{{#each followers}}
-
- {{> personCard actor=this}}
-
-{{/each}}
+
+ {{#each followers}}
+
+ {{> personCard actor=this}}
+
+ {{/each}}
+
+
{{> peopleTools}}
+
\ No newline at end of file
+ document.addEventListener('DOMContentLoaded', () => {
+ app.pollForPosts();
+ });
+
diff --git a/design/following.handlebars b/design/following.handlebars
index 8e568b8..47e9106 100644
--- a/design/following.handlebars
+++ b/design/following.handlebars
@@ -1,15 +1,21 @@
-
+
-{{#each following}}
-
- {{> personCard actor=this}}
-
-{{/each}}
+
+ {{#each following}}
+
+ {{> personCard actor=this}}
+
+ {{/each}}
+
+
{{> peopleTools}}
+
\ No newline at end of file
+ document.addEventListener('DOMContentLoaded', () => {
+ app.pollForPosts();
+ });
+
diff --git a/design/layouts/public.handlebars b/design/layouts/public.handlebars
index 14f6f30..615e13c 100644
--- a/design/layouts/public.handlebars
+++ b/design/layouts/public.handlebars
@@ -1,19 +1,22 @@
-
-
{{me.preferredUsername}}
-
-
-
-
-
-
-
-
-
+
+
+
{{me.preferredUsername}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+