Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0dc1e15e59 |
8
package-lock.json
generated
8
package-lock.json
generated
@@ -16,7 +16,7 @@
|
||||
"@angular/platform-browser": "^21.2.0",
|
||||
"@angular/router": "^21.2.0",
|
||||
"@angular/service-worker": "^21.2.0",
|
||||
"@chatenium/chatenium-sdk": "^1.1.8",
|
||||
"@chatenium/chatenium-sdk": "^1.1.10",
|
||||
"@fortawesome/angular-fontawesome": "^4.0.0",
|
||||
"@fortawesome/free-brands-svg-icons": "^7.1.0",
|
||||
"@fortawesome/free-solid-svg-icons": "^7.1.0",
|
||||
@@ -1011,9 +1011,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@chatenium/chatenium-sdk": {
|
||||
"version": "1.1.8",
|
||||
"resolved": "https://registry.npmjs.org/@chatenium/chatenium-sdk/-/chatenium-sdk-1.1.8.tgz",
|
||||
"integrity": "sha512-UuPCr/NqZhLrT/lt8I1AM+UNFAdI00adtvvlu3BQgqCYPASoUpTJJ4HdMzJ+E0cb0pUS6DmN0Kv+w3vFQfRYwg==",
|
||||
"version": "1.1.10",
|
||||
"resolved": "https://registry.npmjs.org/@chatenium/chatenium-sdk/-/chatenium-sdk-1.1.10.tgz",
|
||||
"integrity": "sha512-FRVKyOzkKQ5wWFL/m3G731VXhvqo3IHpKFcseWfpX5TxBq6Kh9GxpjN8/JQgQ5X+KDES1Nrm4FqOHkVw5CVHyA==",
|
||||
"dependencies": {
|
||||
"@faker-js/faker": "^10.4.0",
|
||||
"axios": "^1.14.0",
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"@angular/platform-browser": "^21.2.0",
|
||||
"@angular/router": "^21.2.0",
|
||||
"@angular/service-worker": "^21.2.0",
|
||||
"@chatenium/chatenium-sdk": "^1.1.8",
|
||||
"@chatenium/chatenium-sdk": "^1.1.10",
|
||||
"@fortawesome/angular-fontawesome": "^4.0.0",
|
||||
"@fortawesome/free-brands-svg-icons": "^7.1.0",
|
||||
"@fortawesome/free-solid-svg-icons": "^7.1.0",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "3.0 Beta 5 (April 13, 2026)",
|
||||
"version": "3.0 Beta 6 (April 14, 2026)",
|
||||
"ok": "Ok",
|
||||
"back": "Back",
|
||||
"aChatProgram": "A messaging platform that you can trust.",
|
||||
@@ -8,6 +8,7 @@
|
||||
"independent": "Independent",
|
||||
"scrollDownForMore": "Scroll down for more",
|
||||
"whatIsChtn": "Chatenium is a chat platform aiming to provide a secure, well integrated fast chatting experience across any devices. You can create a new account for free and start chatting and broadcasting messages.",
|
||||
"updating": "Updating...",
|
||||
"home": {
|
||||
"chtn": "Chatenium ",
|
||||
"chtnIs": "Chatenium is ",
|
||||
@@ -104,9 +105,8 @@
|
||||
"changeLogDialog": {
|
||||
"label": "Chatenium has been updated",
|
||||
"changeLog": {
|
||||
"1": "Started implementing Chatenium Pictures",
|
||||
"2": "Made small changes to the UI",
|
||||
"3": "Minor bug fixes in message box"
|
||||
"1": "UI issue fixes in the message box",
|
||||
"2": "Added caching to improve performance"
|
||||
}
|
||||
},
|
||||
"chatnav": {
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
<main id="content">
|
||||
<div id="content_tint">
|
||||
@if (router.url.startsWith("/chat/dm") && router.url.startsWith("/chat/picture")) {
|
||||
@if (router.url.startsWith("/chat/dm") || router.url.startsWith("/chat/picture")) {
|
||||
<!-- To ensure data is loaded -->
|
||||
@defer (when serviceManager.chatsStatus() != LoadStatus.loading) {
|
||||
<router-outlet/>
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
<button disabled tuiButton appearance="secondary" iconStart="@tui.mail-plus">
|
||||
{{"chat.chatnav.dmList.newChat"|translate}}
|
||||
</button>
|
||||
|
||||
@if (serviceManager.chatsStatus() == LoadStatus.updating) {
|
||||
<div id="loader">
|
||||
<tui-loader />
|
||||
{{"updating"|translate}}
|
||||
</div>
|
||||
}
|
||||
@for (chat of serviceManager.chats(); track chat.chatid) {
|
||||
<button [class.enlarge]="breakpoint() == 'mobile'" tuiButton [appearance]="router.url == '/chat/dm/' + chat.chatid ? 'primary' : 'flat'" [routerLink]="'/chat/dm/' + chat.chatid">
|
||||
<oimg [src]="chat.pfp" height="35px" width="35px" [radius]="10"></oimg>
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
flex-direction: column;
|
||||
gap: 5px;
|
||||
|
||||
#loader {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: start;
|
||||
padding: 5px;
|
||||
gap: 5px;
|
||||
}
|
||||
|
||||
button {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
|
||||
@@ -2,7 +2,7 @@ import {Component, inject, input, OnInit, signal} from '@angular/core';
|
||||
import {ChatService} from '@chatenium/chatenium-sdk/services/chatService';
|
||||
import {IndexedDB} from '../../storage/indexed-db';
|
||||
import {Chat} from '@chatenium/chatenium-sdk/domain/chatService.schema';
|
||||
import {TUI_BREAKPOINT, TuiButton} from '@taiga-ui/core';
|
||||
import {TUI_BREAKPOINT, TuiButton, TuiLoader} from '@taiga-ui/core';
|
||||
import {Oimg} from '../elements/oimg/oimg';
|
||||
import {Router, RouterLink} from '@angular/router';
|
||||
import {TranslatePipe} from '@ngx-translate/core';
|
||||
@@ -14,7 +14,8 @@ import {LoadStatus, ServiceManager} from '../../service-manager';
|
||||
TuiButton,
|
||||
Oimg,
|
||||
RouterLink,
|
||||
TranslatePipe
|
||||
TranslatePipe,
|
||||
TuiLoader
|
||||
],
|
||||
templateUrl: './dm-list.html',
|
||||
styleUrl: './dm-list.scss',
|
||||
@@ -30,6 +31,12 @@ export class DmList implements OnInit {
|
||||
|
||||
async ngOnInit() {
|
||||
this.serviceManager.chatService = new ChatService(this.userid(), this.token(), this.indexedDb.getApi(), () => {})
|
||||
try {
|
||||
this.serviceManager.chats.set(await this.serviceManager.chatService.getQuick())
|
||||
this.serviceManager.chatsStatus.set(LoadStatus.updating)
|
||||
} catch (e) {
|
||||
console.warn(`Cache load failed: ${e}. Skipping cache load...`)
|
||||
}
|
||||
try {
|
||||
this.serviceManager.chats.set(await this.serviceManager.chatService.get())
|
||||
this.serviceManager.chatsStatus.set(LoadStatus.loaded)
|
||||
@@ -38,4 +45,6 @@ export class DmList implements OnInit {
|
||||
this.serviceManager.chatsStatus.set(LoadStatus.error)
|
||||
}
|
||||
}
|
||||
|
||||
protected readonly LoadStatus = LoadStatus;
|
||||
}
|
||||
|
||||
@@ -156,6 +156,7 @@ export class Dm implements OnInit {
|
||||
this.route.params.subscribe(async params => {
|
||||
const chatid = params['chatid'];
|
||||
this.chatid = chatid;
|
||||
console.log(`Loading chat ${chatid}...`)
|
||||
|
||||
const session = this.serviceManager.currentSession();
|
||||
const chatData = this.serviceManager.chats().find(c => c.chatid === chatid);
|
||||
@@ -183,8 +184,14 @@ export class Dm implements OnInit {
|
||||
this.serviceManager.dmServices()[chatid] = newStore;
|
||||
|
||||
const currentStore = this.serviceManager.dmServices()[chatid];
|
||||
const history = await currentStore.service.get();
|
||||
currentStore.messages.set(history);
|
||||
try {
|
||||
const messagesCache = await currentStore.service.getQuick();
|
||||
currentStore.messages.set(messagesCache);
|
||||
} catch (e) {
|
||||
console.warn(`Cache load failed: ${e}. Skipping cache load...`)
|
||||
}
|
||||
const messages = await currentStore.service.get();
|
||||
currentStore.messages.set(messages);
|
||||
this.scrollToBottom("instant")
|
||||
|
||||
await currentStore.service.joinWebSocketRoom();
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
</ng-template>
|
||||
|
||||
<main>
|
||||
<div id="message-box-extension" tuiAppearance="floating" [class.shown]="viewModel().editingMessage()">
|
||||
<div id="message-box-extension" tuiAppearance="floating" [class.shown]="viewModel().editingMessage()" [class.fullWidth]="breakpoint() != 'desktopLarge'">
|
||||
<div id="content">
|
||||
@if (viewModel().editingMessage()) {
|
||||
<tui-icon icon="@tui.pencil"></tui-icon>
|
||||
@@ -59,7 +59,7 @@
|
||||
<tui-icon icon="@tui.paperclip"></tui-icon>
|
||||
<span>{{"chat.elements.messageBox.attachments"|translate}}</span>
|
||||
} @else {
|
||||
{{viewModel().editingMessage()!.message}}
|
||||
<span style="width: 300px" tuiScrollable tuiFade>{{viewModel().editingMessage()!.message}}</span>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -67,6 +67,10 @@
|
||||
justify-content: center;
|
||||
height: 0;
|
||||
|
||||
&.fullWidth {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#content {
|
||||
padding-left: 10px;
|
||||
display: flex;
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
TuiButton,
|
||||
TuiDialog,
|
||||
TuiGroup,
|
||||
TuiIcon,
|
||||
TuiIcon, TuiScrollable,
|
||||
TuiScrollbarDirective,
|
||||
TuiTextfield
|
||||
} from '@taiga-ui/core';
|
||||
@@ -17,7 +17,7 @@ import {v4 as uuidv4} from 'uuid';
|
||||
import {Masonry} from '../masonry/masonry';
|
||||
import {Oimg} from '../oimg/oimg';
|
||||
import {FileData} from '@chatenium/chatenium-sdk/domain/fileUploadService.schema';
|
||||
import {TuiTextarea, TuiTextareaComponent} from '@taiga-ui/kit';
|
||||
import {TuiFade, TuiTextarea, TuiTextareaComponent} from '@taiga-ui/kit';
|
||||
|
||||
@Component({
|
||||
selector: 'message-box',
|
||||
@@ -33,7 +33,9 @@ import {TuiTextarea, TuiTextareaComponent} from '@taiga-ui/kit';
|
||||
Oimg,
|
||||
Masonry,
|
||||
TuiTextfield,
|
||||
TuiTextarea
|
||||
TuiTextarea,
|
||||
TuiScrollable,
|
||||
TuiFade
|
||||
],
|
||||
templateUrl: './message-box.html',
|
||||
styleUrl: './message-box.scss',
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
<button disabled tuiButton appearance="secondary" iconStart="@tui.plus">
|
||||
{{ "chat.chatnav.networkList.newNetwork"|translate }}
|
||||
</button>
|
||||
|
||||
@if (serviceManager.networksStatus() == LoadStatus.updating) {
|
||||
<div id="loader">
|
||||
<tui-loader />
|
||||
{{"updating"|translate}}
|
||||
</div>
|
||||
}
|
||||
@for (network of serviceManager.networks(); track network.networkId) {
|
||||
<button [class.enlarge]="breakpoint() == 'mobile'" tuiButton
|
||||
[appearance]="router.url.startsWith('/chat/network/' + network.networkId) ? 'primary' : 'flat'"
|
||||
|
||||
@@ -2,7 +2,7 @@ import {Component, inject, input, OnInit} from '@angular/core';
|
||||
import {IndexedDB} from '../../storage/indexed-db';
|
||||
import {Router, RouterLink} from '@angular/router';
|
||||
import {LoadStatus, ServiceManager} from '../../service-manager';
|
||||
import {TUI_BREAKPOINT, TuiButton} from '@taiga-ui/core';
|
||||
import {TUI_BREAKPOINT, TuiButton, TuiLoader} from '@taiga-ui/core';
|
||||
import {ChatService} from '@chatenium/chatenium-sdk/services/chatService';
|
||||
import {NetworkService} from '@chatenium/chatenium-sdk/services/networkService';
|
||||
import {Oimg} from '../elements/oimg/oimg';
|
||||
@@ -14,7 +14,8 @@ import {TranslatePipe} from '@ngx-translate/core';
|
||||
Oimg,
|
||||
TranslatePipe,
|
||||
TuiButton,
|
||||
RouterLink
|
||||
RouterLink,
|
||||
TuiLoader
|
||||
],
|
||||
templateUrl: './network-list.html',
|
||||
styleUrl: './network-list.scss',
|
||||
@@ -30,6 +31,12 @@ export class NetworkList implements OnInit {
|
||||
|
||||
async ngOnInit() {
|
||||
this.serviceManager.networkService = new NetworkService(this.userid(), this.token(), "", this.indexedDb.getApi(), () => {})
|
||||
try {
|
||||
this.serviceManager.networks.set(await this.serviceManager.networkService.getQuick())
|
||||
this.serviceManager.networksStatus.set(LoadStatus.updating)
|
||||
} catch (e) {
|
||||
console.warn(`Cache load failed: ${e}. Skipping cache load...`)
|
||||
}
|
||||
try {
|
||||
this.serviceManager.networks.set(await this.serviceManager.networkService.get())
|
||||
this.serviceManager.networksStatus.set(LoadStatus.loaded)
|
||||
@@ -38,4 +45,6 @@ export class NetworkList implements OnInit {
|
||||
this.serviceManager.networksStatus.set(LoadStatus.error)
|
||||
}
|
||||
}
|
||||
|
||||
protected readonly LoadStatus = LoadStatus;
|
||||
}
|
||||
|
||||
@@ -222,9 +222,14 @@ export class Text {
|
||||
this.serviceManager.networkServices()[networkId].textChannels()[channelId] = newStore;
|
||||
|
||||
const currentStore = this.serviceManager.networkServices()[networkId].textChannels()[channelId]
|
||||
const history = await currentStore.service.get();
|
||||
currentStore.messages.set(history);
|
||||
this.scrollToBottom("instant")
|
||||
try {
|
||||
const messagesCache = await currentStore.service.getQuick();
|
||||
currentStore.messages.set(messagesCache);
|
||||
} catch (e) {
|
||||
console.warn(`Cache load failed: ${e}. Skipping cache load...`)
|
||||
}
|
||||
const messages = await currentStore.service.get();
|
||||
currentStore.messages.set(messages);
|
||||
|
||||
await currentStore.service.joinWebSocketRoom();
|
||||
}
|
||||
|
||||
@@ -30,6 +30,12 @@ export class PictureList implements OnInit {
|
||||
|
||||
async ngOnInit() {
|
||||
this.serviceManager.chatService = new ChatService(this.userid(), this.token(), this.indexedDb.getApi(), () => {})
|
||||
try {
|
||||
this.serviceManager.chats.set(await this.serviceManager.chatService.getQuick())
|
||||
this.serviceManager.chatsStatus.set(LoadStatus.updating)
|
||||
} catch (e) {
|
||||
console.warn(`Cache load failed: ${e}. Skipping cache load...`)
|
||||
}
|
||||
try {
|
||||
this.serviceManager.chats.set(await this.serviceManager.chatService.get())
|
||||
this.serviceManager.chatsStatus.set(LoadStatus.loaded)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export const environment = {
|
||||
version: "3.0-beta5",
|
||||
version: "3.0-beta6",
|
||||
api_url: "http://localhost:3000",
|
||||
cdn_url: "http://localhost:4000",
|
||||
ws_url: "ws://localhost:3000",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export const environment = {
|
||||
version: "3.0-beta5",
|
||||
version: "3.0-beta6",
|
||||
api_url: "https://api.chatenium.hu",
|
||||
cdn_url: "https://cdn.chatenium.hu",
|
||||
ws_url: "wss://api.chatenium.hu",
|
||||
|
||||
Reference in New Issue
Block a user