Merge branch 'princess' into drone

This commit is contained in:
bad 2020-10-20 09:44:01 +00:00
commit 4c6523a9a7
6 changed files with 78 additions and 9 deletions

65
README.md Normal file
View file

@ -0,0 +1,65 @@
# Carbon Chat
Carbon is the Matrix client for Discord refugees.
## The dream
Carbon's planned features, compared to Discord:
- End to end encryption
- $0 per-account custom emojis and custom emoji packs
- Uses the open Matrix and Mumble systems
- Much better IRC layout
- Probably more
Carbon's planned features, compared to Element:
- Get rid of the unmanageable combined rooms list
- Groups like Discord's guilds
- Always have one group selected at a time
- Synchronised membership, moderators, power levels and bans
- Ordered channel list
- Unread indicators
- Add existing channels to groups
- Pin any channel to the groups bar
- Tidy Mumble integration to add voice channels
- More reliable unreads
- Per-account custom emojis (Ponies+FluffyChat integration) and custom emoji packs
- Slightly better IRC layout
- Probably more
## The reality
Carbon is currently _technically_ usable as a chat app, but is very
early in development. These important features still need to be
implemented:
- Login GUI
- Unreads
- Chat history
- Formatting
- Emojis
- Reactions
- Groups v2
- Group management
- Pinned channels
- Mumble integration
## The code
### Building
npm install -D
npm run rebuild
### Hosting
Send the files from the `build` folder to a static file server. Apply
a long cache-control header to everything served under `/static`, and
no cache-control header to everything else.
### Developing
npm run watch
Files will be rebuilt as you save them.

View file

@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="static/main.css?static=f7c0898b94"> <link rel="stylesheet" type="text/css" href="static/main.css?static=e9db1a3439">
<script type="module" src="static/groups.js?static=2cc7f0daf8"></script> <script type="module" src="static/groups.js?static=2cc7f0daf8"></script>
<script type="module" src="static/chat-input.js?static=16321d4eb4"></script> <script type="module" src="static/chat-input.js?static=16321d4eb4"></script>
<script type="module" src="static/room-picker.js?static=edb9a5f669"></script> <script type="module" src="static/room-picker.js?static=edb9a5f669"></script>

View file

@ -81,11 +81,11 @@ class Sender {
this.avatar.clearChildren() this.avatar.clearChildren()
if (this.sender.value().content.avatar_url) { if (this.sender.value().content.avatar_url) {
this.avatar.child( this.avatar.child(
ejs("img").class("c-message-group__icon").attribute("src", resolveMxc(this.sender.value().content.avatar_url, 32, "crop")) ejs("img").class("c-message-group__icon").attribute("src", resolveMxc(this.sender.value().content.avatar_url, 96, "crop"))
) )
} else { } else {
this.avatar.child( this.avatar.child(
ejs("div").class("c-message-group__icon") ejs("div").class("c-message-group__icon", "c-message-group__icon--no-icon")
) )
} }
} }

View file

@ -155,9 +155,11 @@ body {
cursor: pointer; cursor: pointer;
} }
.c-message-group__icon { .c-message-group__icon {
width: 32px; width: 40px;
height: 32px; height: 40px;
border-radius: 50%; border-radius: 50%;
}
.c-message-group__icon--no-icon {
background-color: #48d; background-color: #48d;
} }
.c-message-group__intro { .c-message-group__intro {

View file

@ -81,11 +81,11 @@ class Sender {
this.avatar.clearChildren() this.avatar.clearChildren()
if (this.sender.value().content.avatar_url) { if (this.sender.value().content.avatar_url) {
this.avatar.child( this.avatar.child(
ejs("img").class("c-message-group__icon").attribute("src", resolveMxc(this.sender.value().content.avatar_url, 32, "crop")) ejs("img").class("c-message-group__icon").attribute("src", resolveMxc(this.sender.value().content.avatar_url, 96, "crop"))
) )
} else { } else {
this.avatar.child( this.avatar.child(
ejs("div").class("c-message-group__icon") ejs("div").class("c-message-group__icon", "c-message-group__icon--no-icon")
) )
} }
} }

View file

@ -17,10 +17,12 @@
cursor: pointer cursor: pointer
&__icon &__icon
$size: 32px $size: 40px
width: $size width: $size
height: $size height: $size
border-radius: 50% border-radius: 50%
&--no-icon
background-color: #48d background-color: #48d
&__intro &__intro