mirror of
https://github.com/MathMan05/Fermi.git
synced 2026-09-16 12:43:15 +00:00
+1
-1
@@ -1,5 +1,5 @@
|
||||
# Code of conduct
|
||||
It's nothing complicated, I want to foster a nice community, if there's any issues feel free to contact me in any way you see fit, though please don't create problems for me. I'm just one person and I want to work on this project, not community management. I will likely start with a warning or two if any issues arise, though this is up to my (mathium05) sole discretion.
|
||||
Generally follow https://docs.spacebar.chat/contributing/conduct/ and you should be fine. Do not try to pull technicalities, this is a FOSS project, not a court of law.
|
||||
Generally follow https://redir.fermi.chat/coc and you should be fine. Do not try to pull technicalities, this is a FOSS project, not a court of law.
|
||||
|
||||
Happy coding!
|
||||
|
||||
+5
-6
@@ -21,7 +21,7 @@ Inside of `webpage` you'll see a file called `instances.json` in that file you'l
|
||||
"discord"?:<Discord @>,
|
||||
"github"?:<Github profile URL>,
|
||||
"email"?:<Email address>,
|
||||
"spacebar":?:<Spacebar username>,
|
||||
"harmony":?:<Harmony username>,
|
||||
"matrix"?:<Matrix account>,
|
||||
"mastodon"?:<Mastodon account>
|
||||
}
|
||||
@@ -32,14 +32,13 @@ Anything with a `?` in-front of its `:` are optional, though you must either inc
|
||||
Some of these values may not be used right now, though they will likely be used in the future, so feel free to fill out what you like, though the more you fill out the more information we can give the users about your instance in the future.
|
||||
`language` should be [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1_codes).
|
||||
`country` should be [ISO 8166-2 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
|
||||
You can also add yourself to [this](https://github.com/spacebarchat/spacebarchat/tree/master/instances) list, and you should, though there are **some disadvantages** to only being in that list such as not being on the Fermi Discovery list which shows Guilds more higher up on the Fermi client, etc.
|
||||
|
||||
# Questions
|
||||
## Do I have to do this to let Fermi Client connect to my server?
|
||||
No, you may choose to not do this, this just makes it easier for people using Fermi Client to find and use your instance as it's in the dropdown menu for instances, though the user may enter any instance they please.
|
||||
## If my instance isn't Spacebar is that allowed to be entered?
|
||||
If it's Spacebar compatible then yes, it may be entered. Though if there are **too many incompatibilities** however, it may not be included, or may need a warning of sorts.
|
||||
## I'm hosting my own instance of Spacebar and would like to change the default instance on my instance of Fermi Client to my own instance.
|
||||
## If my instance isn't Harmony is that allowed to be entered?
|
||||
If it's Harmony compatible then yes, it may be entered. Though if there are **too many incompatibilities** however, it may not be included, or may need a warning of sorts.
|
||||
## I'm hosting my own instance of Harmony and would like to change the default instance on my instance of Fermi Client to my own instance.
|
||||
Just change the first entry in the list to your own, and it should connect without issue.
|
||||
## Why would I put my instance in this list over the official Spacebar list?
|
||||
## Why would I put my instance in this list over the official Harmony list?
|
||||
While putting your instance in the other list will get it to show up on Fermi client, this list does have more settings, and will show up earlier in the results, though either list will work to get in the dropdown menu.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Fermi
|
||||
Fermi is a [Spacebar](https://spacebar.chat) Client written in TS, HTML, and CSS.
|
||||
Fermi is a [Harmony](https://redir.fermi.chat/server) Client written in TS, HTML, and CSS.
|
||||
|
||||

|
||||
|
||||
@@ -22,7 +22,7 @@ You can view the current roadmap on https://github.com/users/MathMan05/projects/
|
||||
AI code due to not being GPLv3 compatable is not allowed in this repo. I thought this didn't need to be said, but it does.
|
||||
And to be clear, *any* use of AI is not allowed in Fermi.
|
||||
## Link
|
||||
The official Spacebar server for Fermi: https://fermi.chat/invite/USgYJo?instance=https%3A%2F%2Fspacebar.chat
|
||||
The official Spacebar server for Fermi: https://redir.fermi.chat/invite
|
||||
|
||||
The current hosted instance of Fermi: https://fermi.chat/
|
||||
|
||||
|
||||
+1
-29
@@ -1,7 +1,6 @@
|
||||
import http from "http";
|
||||
import fs from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import {observe} from "./stats.js";
|
||||
import {getApiUrls} from "./utils.js";
|
||||
import {fileURLToPath} from "node:url";
|
||||
import {readFileSync} from "fs";
|
||||
@@ -149,7 +148,7 @@ export type instance = {
|
||||
discord?: string;
|
||||
github?: string;
|
||||
email?: string;
|
||||
spacebar?: string;
|
||||
harmony?: string;
|
||||
matrix?: string;
|
||||
mastodon?: string;
|
||||
};
|
||||
@@ -164,33 +163,6 @@ for (const instance of instances) {
|
||||
instanceNames.set(instance.name, instance);
|
||||
}
|
||||
|
||||
async function updateInstances(): Promise<void> {
|
||||
try {
|
||||
const response = await fetch(
|
||||
"https://raw.githubusercontent.com/spacebarchat/spacebarchat/master/instances/instances.json",
|
||||
);
|
||||
const json = (await response.json()) as Instance[];
|
||||
for (const instance of json) {
|
||||
if (instanceNames.has(instance.name)) {
|
||||
const existingInstance = instanceNames.get(instance.name);
|
||||
if (existingInstance) {
|
||||
for (const key of Object.keys(instance)) {
|
||||
if (!(key in existingInstance)) {
|
||||
existingInstance[key] = instance[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
instances.push(instance as any);
|
||||
}
|
||||
}
|
||||
observe(instances);
|
||||
} catch (error) {
|
||||
console.error("Error updating instances:", error);
|
||||
}
|
||||
}
|
||||
|
||||
updateInstances();
|
||||
/*
|
||||
app.set("trust proxy", (ip: unknown) => {
|
||||
if (typeof ip !== "string") return false;
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
</p>
|
||||
<br />
|
||||
<a
|
||||
href="https://translatewiki.net/wiki/Translating:Fermi"
|
||||
href="https://redir.fermi.chat/translate"
|
||||
class="TitleButtons"
|
||||
id="translate"
|
||||
i18n="htmlPages.trans"
|
||||
|
||||
@@ -3,26 +3,7 @@
|
||||
"name": "Spacebar",
|
||||
"description": "The official Spacebar instance.",
|
||||
"image": "https://raw.githubusercontent.com/spacebarchat/spacebarchat/master/branding/png/Spacebar__Icon-Discord.png",
|
||||
"url": "https://spacebar.chat"
|
||||
},
|
||||
{
|
||||
"name": "Fastbar",
|
||||
"description": "The best Spacebar instance with 95% uptime, running under on a NVME drive running with bleeding edge stuff <3",
|
||||
"image": "https://spacebar.greysilly7.xyz/logo.png",
|
||||
"url": "https://greysilly7.xyz",
|
||||
"language": "en",
|
||||
"country": "US",
|
||||
"display": true,
|
||||
"urls": {
|
||||
"wellknown": "https://greysilly7.xyz",
|
||||
"api": "https://api-spacebar.greysilly7.xyz/api",
|
||||
"cdn": "https://cdn-spacebar.greysilly7.xyz",
|
||||
"gateway": "wss://gateway-spacebar.greysilly7.xyz"
|
||||
},
|
||||
"contactInfo": {
|
||||
"discord": "greysilly7",
|
||||
"github": "https://github.com/greysilly7",
|
||||
"email": "greysilly7@gmail.com"
|
||||
}
|
||||
"url": "https://spacebar.chat",
|
||||
"display":false
|
||||
}
|
||||
]
|
||||
|
||||
@@ -47,6 +47,7 @@ type botjsonfetch = {
|
||||
if (window.location.pathname.startsWith("/oauth2")) {
|
||||
const users = getBulkUsers();
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
//TODO replace me
|
||||
const well = params.get("instance") || "https://spacebar.chat";
|
||||
const permstr = params.get("permissions");
|
||||
const joinable: Specialuser[] = [];
|
||||
|
||||
@@ -1003,9 +1003,6 @@ class InstancePicker implements OptionsElement<InstanceInfo | null> {
|
||||
}
|
||||
|
||||
for (const instance of json) {
|
||||
if (instance.display === false) {
|
||||
continue;
|
||||
}
|
||||
const option = document.createElement("option");
|
||||
option.disabled = !instance.online;
|
||||
option.value = instance.name;
|
||||
@@ -1024,6 +1021,9 @@ class InstancePicker implements OptionsElement<InstanceInfo | null> {
|
||||
} else {
|
||||
option.label = instance.name;
|
||||
}
|
||||
if (instance.display === false) {
|
||||
continue;
|
||||
}
|
||||
datalist.append(option);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -315,12 +315,3 @@ export async function ProgessiveDecodeJSON<X>(
|
||||
await prog.ready;
|
||||
return identifyType(prog) as Promise<Progressive<X>>;
|
||||
}
|
||||
/*
|
||||
const test = [1, 2, 3, 4, 5, 6];
|
||||
const blob = new Blob([JSON.stringify(test)]);
|
||||
ProgessiveDecodeJSON<typeof test>("https://api.github.com/repos/spacebarchat/server/git/refs")
|
||||
.then(async (obj) => {
|
||||
console.log(await obj.getWhole()); //returns the ping object
|
||||
})
|
||||
.then(console.warn);
|
||||
//*/
|
||||
|
||||
@@ -371,8 +371,12 @@ class Directory {
|
||||
|
||||
export {Directory};
|
||||
|
||||
const mobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent) || (window.matchMedia && window.matchMedia("(pointer: coarse)").matches);
|
||||
const iOS = /iPhone|iPad|iPod/i.test(navigator.userAgent) || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1);
|
||||
const mobile =
|
||||
/iPhone|iPad|iPod|Android/i.test(navigator.userAgent) ||
|
||||
(window.matchMedia && window.matchMedia("(pointer: coarse)").matches);
|
||||
const iOS =
|
||||
/iPhone|iPad|iPod/i.test(navigator.userAgent) ||
|
||||
(navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1);
|
||||
export {mobile, iOS};
|
||||
|
||||
const datalist = document.getElementById("instances");
|
||||
@@ -451,7 +455,7 @@ export async function getapiurls(str: string): Promise<InstanceUrls | null> {
|
||||
//region Instance list
|
||||
export async function getInstanceInfo(str: string): Promise<InstanceInfo | null> {
|
||||
// wait for it to be loaded...? Where is this even comming from?
|
||||
if (stringURLMap.size == 0) {
|
||||
if (stringURLMap.size === 0) {
|
||||
await new Promise<void>((res, _) => {
|
||||
let intervalId = setInterval(() => {
|
||||
if (stringURLMap.size !== 0) {
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ The translations are stored in `/src/webpage/translations` in this format below.
|
||||
```
|
||||
|
||||
## I want to help translate this
|
||||
Please go to [https://translatewiki.net/wiki/Translating:Fermi](https://translatewiki.net/wiki/Translating:Fermi) to help translate this project.
|
||||
Please go to [https://redir.fermi.chat/translate](https://redir.fermi.chat/translate) to help translate this project.
|
||||
## What is the format?
|
||||
It's the same format found [here](https://github.com/wikimedia/jquery.i18n#message-file-format), though we are not using jquery, and you might notice some of the strings use markdown, but most do not.
|
||||
|
||||
|
||||
+11
-7
@@ -200,7 +200,7 @@
|
||||
}
|
||||
},
|
||||
"channelLink": "# $1",
|
||||
"clientDesc": "Client version: $1\n\n[Join the official Fermi guild]($2/invite/USgYJo?instance=https%3A%2F%2Fspacebar.chat)\n\n[Help translate Fermi](https://translatewiki.net/wiki/Translating:JankClient#sortable:3=desc) \n\n[Help create Fermi](https://github.com/MathMan05/Fermi)\n\n[Help maintain the server Fermi relies on](https://github.com/spacebarchat/server)\n\n[Read the blog](https://blog.fermi.chat/)\n\nCalculated rights: $3",
|
||||
"clientDesc": "Client version: $1\n\n[Join the official Fermi guild](https://redir.fermi.chat/invite)\n\n[Help translate Fermi](https://redir.fermi.chat/translate) \n\n[Help create Fermi](https://github.com/MathMan05/Fermi)\n\n[Help maintain the server Fermi relies on](https://redir.fermi.chat/server)\n\n[Read the blog](https://blog.fermi.chat/)\n\nCalculated rights: $3",
|
||||
"commands": {
|
||||
"errorNotValid": "$1 is not a valid choice for $2",
|
||||
"required": "$1 is a required part of this command"
|
||||
@@ -219,7 +219,7 @@
|
||||
"cacheDesc": "map files will still load either way, this'll just make sure they're in cache when a new update rolls out.",
|
||||
"captureTrace": "This setting tells Fermi to capture _trace properties from the server, enabling this may cause progressive JSON decoding to not work (might require a reload)",
|
||||
"clearWellKnowns": "Re-fetch .well-known records:",
|
||||
"description": "These are for developers of Spacebar/Fermi, if you don't know what you're doing, please don't mess with these settings.",
|
||||
"description": "These are for developers of Harmony/Fermi, if you don't know what you're doing, please don't mess with these settings.",
|
||||
"gatewayComp": "Disable Gateway compression:",
|
||||
"reportSystem":"Enable experimental reporting system:",
|
||||
"logGateway": "Log received gateway events (log level info):",
|
||||
@@ -392,10 +392,10 @@
|
||||
"addBot": "Add to guild",
|
||||
"alreadyHave": "Already have an account?",
|
||||
"box1Items": "Direct Messaging|Reactions support|Invites|Account switching|User settings|Developer portal|Bot invites|Translation support",
|
||||
"box1title": "Fermi is a Spacebar-compatible client seeking to be as good as it can be with many features including:",
|
||||
"box1title": "Fermi is a Harmony-compatible client seeking to be as good as it can be with many features including:",
|
||||
"box3description": "We always appreciate some help, whether that be in the form of bug reports, or code, or even just pointing out some typos.",
|
||||
"box3title": "Contribute to Fermi",
|
||||
"compatableInstances": "Spacebar-compatible instances:",
|
||||
"compatableInstances": "Harmony-compatible instances:",
|
||||
"createAccount": "Create account",
|
||||
"dobField": "Date of birth:",
|
||||
"emailField": "Email:",
|
||||
@@ -478,7 +478,7 @@
|
||||
},
|
||||
"jankInfo": "Client information",
|
||||
"leaveGuild": "Leave guild",
|
||||
"leaving": "You're leaving Spacebar",
|
||||
"leaving": "You're leaving Harmony",
|
||||
"loaded": "Loaded",
|
||||
"localuser": {
|
||||
"2faCode:": "Code:",
|
||||
@@ -512,7 +512,7 @@
|
||||
"connections": "Connections",
|
||||
"createApp": "Create application",
|
||||
"customSound": "Custom sound",
|
||||
"customStatusWarn": "Spacebar does not support custom status being displayed at this time so while it'll accept the status, it will not do anything with it",
|
||||
"customStatusWarn": "Harmony does not support custom status being displayed at this time so while it'll accept the status, it will not do anything with it",
|
||||
"deleteAccount": "Account deletion",
|
||||
"deleteAccountButton": "Delete account",
|
||||
"description": "Description:",
|
||||
@@ -868,8 +868,12 @@
|
||||
"traces": "$1 ($2ms) $3"
|
||||
},
|
||||
"typing": "$2 {{PLURAL:$1|is|are}} typing",
|
||||
"unableToConnect": "Unable to connect to the Spacebar server. Please try logging out and back in.",
|
||||
"unableToConnect": "Unable to connect to the Harmony server. Please try logging out and back in.",
|
||||
"unableToPin": "Unable to pin message",
|
||||
"sbWarns":{
|
||||
"regi":"Spacebar instances are no longer officially supported by Fermi, while it'll likely still work, Harmony is recommended. Continue?",
|
||||
"in":"Spacebar instances are no longer officially supported by Fermi, while it'll likely still work, Harmony is recommended. If you're the instance owner, please look into switching your instance over to the fork called Harmony."
|
||||
},
|
||||
"unpinMessage": "Unpin message",
|
||||
"updateAv": "Updates available",
|
||||
"uploadBanner": "Upload banner:",
|
||||
|
||||
Reference in New Issue
Block a user