Oasis 0.8.7 mobile (nodejs-project baseline)
This commit is contained in:
commit
e563b86ede
226 changed files with 141968 additions and 0 deletions
1
src/configs/AI-history.json
Normal file
1
src/configs/AI-history.json
Normal file
|
|
@ -0,0 +1 @@
|
|||
[]
|
||||
3
src/configs/agenda-config.json
Normal file
3
src/configs/agenda-config.json
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"discardedItems": []
|
||||
}
|
||||
1
src/configs/banking-allocations.json
Normal file
1
src/configs/banking-allocations.json
Normal file
|
|
@ -0,0 +1 @@
|
|||
[]
|
||||
1
src/configs/banking-eco-history.json
Normal file
1
src/configs/banking-eco-history.json
Normal file
|
|
@ -0,0 +1 @@
|
|||
[]
|
||||
1
src/configs/banking-epochs.json
Normal file
1
src/configs/banking-epochs.json
Normal file
|
|
@ -0,0 +1 @@
|
|||
[]
|
||||
109
src/configs/config-manager.js
Normal file
109
src/configs/config-manager.js
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const configFilePath = path.join(__dirname, 'oasis-config.json');
|
||||
|
||||
if (!fs.existsSync(configFilePath)) {
|
||||
const defaultConfig = {
|
||||
"themes": {
|
||||
"current": "Dark-SNH"
|
||||
},
|
||||
"ux": {
|
||||
"current": "blocks"
|
||||
},
|
||||
"modules": {
|
||||
"popularMod": "on",
|
||||
"topicsMod": "on",
|
||||
"summariesMod": "on",
|
||||
"latestMod": "on",
|
||||
"threadsMod": "on",
|
||||
"multiverseMod": "on",
|
||||
"fediverseMod": "off",
|
||||
"invitesMod": "on",
|
||||
"walletMod": "on",
|
||||
"legacyMod": "on",
|
||||
"cipherMod": "on",
|
||||
"bookmarksMod": "on",
|
||||
"videosMod": "on",
|
||||
"docsMod": "on",
|
||||
"audiosMod": "on",
|
||||
"tagsMod": "on",
|
||||
"imagesMod": "on",
|
||||
"trendingMod": "on",
|
||||
"eventsMod": "on",
|
||||
"tasksMod": "on",
|
||||
"marketMod": "on",
|
||||
"votesMod": "on",
|
||||
"tribesMod": "on",
|
||||
"reportsMod": "on",
|
||||
"opinionsMod": "on",
|
||||
"padsMod": "on",
|
||||
"calendarsMod": "on",
|
||||
"transfersMod": "on",
|
||||
"feedMod": "on",
|
||||
"pixeliaMod": "on",
|
||||
"melodyMod": "on",
|
||||
"agendaMod": "on",
|
||||
"aiMod": "on",
|
||||
"aiNavMod": "on",
|
||||
"forumMod": "on",
|
||||
"gamesMod": "on",
|
||||
"jobsMod": "on",
|
||||
"shopsMod": "on",
|
||||
"projectsMod": "on",
|
||||
"bankingMod": "on",
|
||||
"parliamentMod": "on",
|
||||
"courtsMod": "on",
|
||||
"favoritesMod": "on",
|
||||
"logsMod": "on",
|
||||
"mapsMod": "on",
|
||||
"chatsMod": "on",
|
||||
"torrentsMod": "on",
|
||||
"graphosMod": "on",
|
||||
"larpMod": "on"
|
||||
},
|
||||
"wallet": {
|
||||
"url": "http://localhost:7474",
|
||||
"user": "",
|
||||
"pass": "",
|
||||
"fee": "5"
|
||||
},
|
||||
"walletPub": {
|
||||
"pubId": ""
|
||||
},
|
||||
"ai": {
|
||||
"prompt": "Provide an informative and precise response."
|
||||
},
|
||||
"ssbLogStream": {
|
||||
"limit": 2000
|
||||
},
|
||||
"homePage": "activity",
|
||||
"language": "en",
|
||||
"wish": "whole",
|
||||
"pmVisibility": "whole",
|
||||
"lanBroadcasting": true
|
||||
};
|
||||
fs.writeFileSync(configFilePath, JSON.stringify(defaultConfig, null, 2));
|
||||
}
|
||||
|
||||
const getConfig = () => {
|
||||
const configData = fs.readFileSync(configFilePath);
|
||||
const cfg = JSON.parse(configData);
|
||||
if (!['whole', 'mutuals', 'only-lan'].includes(cfg.wish)) cfg.wish = 'whole';
|
||||
if (cfg.pmVisibility !== 'whole' && cfg.pmVisibility !== 'mutuals') cfg.pmVisibility = 'whole';
|
||||
if (typeof cfg.ux === 'string') cfg.ux = { current: cfg.ux };
|
||||
if (!cfg.ux || typeof cfg.ux !== 'object') cfg.ux = { current: 'blocks' };
|
||||
if (cfg.ux.current === 'menus') cfg.ux.current = 'blocks';
|
||||
if (cfg.ux.current !== 'blocks' && cfg.ux.current !== 'ainav') cfg.ux.current = 'blocks';
|
||||
if (cfg.ux.current === 'ainav' && cfg.modules && cfg.modules.aiNavMod !== 'on') cfg.ux.current = 'blocks';
|
||||
return cfg;
|
||||
};
|
||||
|
||||
const saveConfig = (newConfig) => {
|
||||
fs.writeFileSync(configFilePath, JSON.stringify(newConfig, null, 2));
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
getConfig,
|
||||
saveConfig,
|
||||
};
|
||||
1
src/configs/fediverse-accounts.json
Normal file
1
src/configs/fediverse-accounts.json
Normal file
|
|
@ -0,0 +1 @@
|
|||
{}
|
||||
1
src/configs/follow_state.json
Normal file
1
src/configs/follow_state.json
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"pending":[],"accepted":[],"lastAcceptMs":0}
|
||||
13
src/configs/media-favorites.json
Normal file
13
src/configs/media-favorites.json
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"audios": [],
|
||||
"bookmarks": [],
|
||||
"calendars": [],
|
||||
"chats": [],
|
||||
"documents": [],
|
||||
"images": [],
|
||||
"maps": [],
|
||||
"pads": [],
|
||||
"shops": [],
|
||||
"torrents": [],
|
||||
"videos": []
|
||||
}
|
||||
79
src/configs/oasis-config.json
Normal file
79
src/configs/oasis-config.json
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
{
|
||||
"themes": {
|
||||
"current": "OasisMobile"
|
||||
},
|
||||
"ux": {
|
||||
"current": "blocks"
|
||||
},
|
||||
"modules": {
|
||||
"popularMod": "on",
|
||||
"topicsMod": "on",
|
||||
"summariesMod": "on",
|
||||
"latestMod": "on",
|
||||
"threadsMod": "on",
|
||||
"multiverseMod": "on",
|
||||
"fediverseMod": "on",
|
||||
"invitesMod": "on",
|
||||
"walletMod": "off",
|
||||
"legacyMod": "off",
|
||||
"cipherMod": "on",
|
||||
"bookmarksMod": "on",
|
||||
"videosMod": "on",
|
||||
"docsMod": "off",
|
||||
"audiosMod": "on",
|
||||
"tagsMod": "on",
|
||||
"imagesMod": "on",
|
||||
"trendingMod": "on",
|
||||
"eventsMod": "on",
|
||||
"tasksMod": "on",
|
||||
"marketMod": "on",
|
||||
"votesMod": "on",
|
||||
"tribesMod": "on",
|
||||
"reportsMod": "on",
|
||||
"opinionsMod": "on",
|
||||
"padsMod": "on",
|
||||
"calendarsMod": "on",
|
||||
"transfersMod": "off",
|
||||
"feedMod": "on",
|
||||
"pixeliaMod": "on",
|
||||
"melodyMod": "on",
|
||||
"agendaMod": "on",
|
||||
"aiMod": "off",
|
||||
"aiNavMod": "off",
|
||||
"forumMod": "on",
|
||||
"gamesMod": "off",
|
||||
"jobsMod": "on",
|
||||
"shopsMod": "on",
|
||||
"projectsMod": "on",
|
||||
"bankingMod": "off",
|
||||
"parliamentMod": "on",
|
||||
"courtsMod": "off",
|
||||
"favoritesMod": "on",
|
||||
"logsMod": "off",
|
||||
"mapsMod": "off",
|
||||
"chatsMod": "on",
|
||||
"torrentsMod": "off",
|
||||
"graphosMod": "on",
|
||||
"larpMod": "on"
|
||||
},
|
||||
"wallet": {
|
||||
"url": "http://localhost:7474",
|
||||
"user": "",
|
||||
"pass": "",
|
||||
"fee": "5"
|
||||
},
|
||||
"walletPub": {
|
||||
"pubId": ""
|
||||
},
|
||||
"ai": {
|
||||
"prompt": "Provide an informative and precise response."
|
||||
},
|
||||
"ssbLogStream": {
|
||||
"limit": 2000
|
||||
},
|
||||
"homePage": "activity",
|
||||
"language": "en",
|
||||
"wish": "whole",
|
||||
"pmVisibility": "whole",
|
||||
"lanBroadcasting": true
|
||||
}
|
||||
61
src/configs/server-config.json
Normal file
61
src/configs/server-config.json
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
"logging": {
|
||||
"level": "notice"
|
||||
},
|
||||
"caps": {
|
||||
"shs": "H5EC+V5BU9s0lWxCkt4z8a095Sj8a6TgiLKPYi1JD7s="
|
||||
},
|
||||
"pub": false,
|
||||
"local": true,
|
||||
"friends": {
|
||||
"dunbar": 300,
|
||||
"hops": 2
|
||||
},
|
||||
"gossip": {
|
||||
"connections": 20,
|
||||
"local": true,
|
||||
"friends": true,
|
||||
"seed": true,
|
||||
"global": true
|
||||
},
|
||||
"replicationScheduler": {
|
||||
"autostart": true,
|
||||
"partialReplication": null
|
||||
},
|
||||
"autofollow": {
|
||||
"enabled": false,
|
||||
"feeds": []
|
||||
},
|
||||
"connections": {
|
||||
"seeds": [],
|
||||
"incoming": {
|
||||
"net": [
|
||||
{
|
||||
"scope": ["device", "local"],
|
||||
"transform": "shs",
|
||||
"port": 8008
|
||||
}
|
||||
],
|
||||
"unix": [
|
||||
{
|
||||
"scope": [
|
||||
"device",
|
||||
"local",
|
||||
"private"
|
||||
],
|
||||
"transform": "noauth"
|
||||
}
|
||||
]
|
||||
},
|
||||
"outgoing": {
|
||||
"net": [
|
||||
{
|
||||
"transform": "shs"
|
||||
}
|
||||
],
|
||||
"tunnel": [],
|
||||
"onion": [],
|
||||
"ws": []
|
||||
}
|
||||
}
|
||||
}
|
||||
35
src/configs/shared-state.js
Normal file
35
src/configs/shared-state.js
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
let _inboxCount = 0;
|
||||
let _carbonHcT = 0;
|
||||
let _carbonHcH = 0;
|
||||
let _lastRefresh = 0;
|
||||
let _onlinePeers = null;
|
||||
let _inboxUnread = null;
|
||||
let _lastSyncTs = null;
|
||||
let _ecoValue = null;
|
||||
let _lastActivity = null;
|
||||
let _maxBlockBytes = 0;
|
||||
let _inhabitantCount = 0;
|
||||
module.exports = {
|
||||
getInboxCount: () => _inboxCount,
|
||||
setInboxCount: (n) => { _inboxCount = n; },
|
||||
getCarbonHcT: () => _carbonHcT,
|
||||
setCarbonHcT: (n) => { _carbonHcT = n; },
|
||||
getCarbonHcH: () => _carbonHcH,
|
||||
setCarbonHcH: (n) => { _carbonHcH = n; },
|
||||
getLastRefresh: () => _lastRefresh,
|
||||
setLastRefresh: (t) => { _lastRefresh = t; },
|
||||
getOnlinePeerCount: () => _onlinePeers,
|
||||
setOnlinePeerCount: (n) => { _onlinePeers = n; },
|
||||
getInboxUnreadCount: () => _inboxUnread,
|
||||
setInboxUnreadCount: (n) => { _inboxUnread = n; },
|
||||
getLastSyncTs: () => _lastSyncTs,
|
||||
setLastSyncTs: (t) => { _lastSyncTs = t; },
|
||||
getEcoValue: () => _ecoValue,
|
||||
setEcoValue: (v) => { _ecoValue = v; },
|
||||
getLastActivity: () => _lastActivity,
|
||||
setLastActivity: (a) => { _lastActivity = a; },
|
||||
getMaxBlockBytes: () => _maxBlockBytes,
|
||||
setMaxBlockBytes: (n) => { if (Number(n) > _maxBlockBytes) _maxBlockBytes = Number(n); },
|
||||
getInhabitantCount: () => _inhabitantCount,
|
||||
setInhabitantCount: (n) => { _inhabitantCount = Math.max(0, Number(n) || 0); }
|
||||
};
|
||||
7
src/configs/snh-invite-code.json
Normal file
7
src/configs/snh-invite-code.json
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"name": "SNH \"La Plaza\"",
|
||||
"description": "A shared place to begin a utopia ...",
|
||||
"url": "https://pub.solarnethub.com",
|
||||
"code": "pub.solarnethub.com:8008:@0qSCyK3xyL71X4qKkmf84Cb2riP6OeUqxCvbP2Z6HWs=.ed25519~7mC1c1gBJe8pmnWI9eIUYpFtEPUOiuHAxbzfxP/f0Ak=",
|
||||
"createdAt": "2026-05-24T00:00:00.000Z"
|
||||
}
|
||||
1
src/configs/wallet-addresses.json
Normal file
1
src/configs/wallet-addresses.json
Normal file
|
|
@ -0,0 +1 @@
|
|||
{}
|
||||
Loading…
Add table
Add a link
Reference in a new issue