Skip to content

Commit dd43b62

Browse files
authored
Merge pull request #102 from SolidOS/newFace
Improvements
2 parents 93a2688 + 22104b6 commit dd43b62

38 files changed

+4129
-2716
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ permissions:
55
on:
66
push:
77
branches:
8-
- "**"
8+
- main
99
pull_request:
1010
branches:
11-
- "**"
11+
- main
1212
workflow_dispatch:
1313

1414
jobs:
@@ -17,7 +17,6 @@ jobs:
1717
strategy:
1818
matrix:
1919
node-version:
20-
- 18.x
2120
- 20.x
2221
- 22.x
2322
steps:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ pids
1313

1414
# Directory for instrumented libs generated by jscoverage/JSCover
1515
lib-cov
16+
dist
1617

1718
# Coverage directory used by tools like istanbul
1819
coverage

Makefile

Lines changed: 0 additions & 34 deletions
This file was deleted.

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,16 @@ At the moment to start a tracker you have to configure the config file in turtle
55

66
Would be good create a mintNew method to allow new ones to be created in the UI.
77

8+
# Testing Guide
9+
10+
## Running Tests
11+
12+
Only ESlint is active on this repo.
13+
14+
```bash
15+
# Run linting only
16+
npm run lint
17+
18+
# Auto-fix linting issues
19+
npm run lint-fix
20+
```

babel.config.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

babel.config.mjs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
export default {
2+
presets: [
3+
[
4+
'@babel/preset-env',
5+
{
6+
targets: {
7+
browsers: ['> 1%', 'last 3 versions', 'not dead']
8+
},
9+
},
10+
],
11+
],
12+
plugins: [
13+
[
14+
'babel-plugin-inline-import', {
15+
extensions: [
16+
'.ttl'
17+
]
18+
}
19+
]
20+
]
21+
}

dev/context.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
import { DataBrowserContext, PaneRegistry } from "pane-registry";
2-
import { LiveStore, solidLogicSingleton, store } from "solid-logic";
1+
import { solidLogicSingleton, store } from 'solid-logic'
32

43
export const context = {
54
session: {
6-
store: store,
5+
store,
76
paneRegistry: {
87
byName: (name) => {
9-
return // longChatPane
8+
// longChatPane
9+
return null
1010
}
1111
},
12-
logic : solidLogicSingleton
12+
logic: solidLogicSingleton
1313
},
1414
dom: document,
1515
getOutliner: () => null,
16-
};
16+
}
1717

18-
export const fetcher = store.fetcher;
18+
export const fetcher = store.fetcher

dev/index.js

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,26 @@
1-
import { sym } from "rdflib";
2-
import { default as pane } from "..";
3-
import { context, fetcher } from "./context";
4-
import { authn, authSession } from "solid-logic";
5-
import * as UI from "solid-ui";
1+
import { sym } from 'rdflib'
2+
import pane from '../src/issuePane'
3+
import { context, fetcher } from './context'
4+
import { authn, authSession } from 'solid-logic'
5+
import * as UI from 'solid-ui'
66

7-
const loginBanner = document.getElementById("loginBanner");
8-
const webId = document.getElementById("webId");
7+
const loginBanner = document.getElementById('loginBanner')
8+
const webId = document.getElementById('webId')
99

10-
loginBanner.appendChild(UI.login.loginStatusBox(document, null, {}));
10+
loginBanner.appendChild(UI.login.loginStatusBox(document, null, {}))
1111

12-
async function finishLogin() {
13-
await authSession.handleIncomingRedirect();
14-
const session = authSession;
12+
async function finishLogin () {
13+
await authSession.handleIncomingRedirect()
14+
const session = authSession
1515
if (session.info.isLoggedIn) {
1616
// Update the page with the status.
17-
webId.innerHTML = "Logged in as: " + authn.currentUser().uri;
17+
webId.innerHTML = 'Logged in as: ' + authn.currentUser().uri
1818
} else {
19-
webId.innerHTML = "";
19+
webId.innerHTML = ''
2020
}
2121
}
2222

23-
finishLogin();
24-
23+
finishLogin()
2524

2625
// https://testingsolidos.solidcommunity.net/profile/card#me
2726
// https://timbl.solidcommunity.net/profile/card#me
@@ -34,9 +33,9 @@ finishLogin();
3433

3534
// const targetURIToShow = "https://timbl.com/timbl/Automation/mother/tracker.n3#mother"
3635

37-
const targetURIToShow = "http://localhost:8080/big-tracker.ttl#this"
36+
const targetURIToShow = new URL('./big-tracker.ttl#this', window.location.href).href
3837

3938
fetcher.load(targetURIToShow).then(() => {
40-
const app = pane.render(sym(targetURIToShow), context);
41-
document.getElementById("app").replaceWith(app);
42-
});
39+
const app = pane.render(sym(targetURIToShow), context)
40+
document.getElementById('app').replaceWith(app)
41+
})

0 commit comments

Comments
 (0)