markdown messages
This commit is contained in:
parent
288556165b
commit
1c5cb3eda8
@ -33,9 +33,14 @@
|
|||||||
],
|
],
|
||||||
"styles": [
|
"styles": [
|
||||||
"node_modules/ngx-toastr/toastr.css",
|
"node_modules/ngx-toastr/toastr.css",
|
||||||
|
"node_modules/prismjs/themes/prism-okaidia.css",
|
||||||
"src/styles.scss"
|
"src/styles.scss"
|
||||||
],
|
],
|
||||||
"scripts": []
|
"scripts": [
|
||||||
|
"node_modules/prismjs/prism.js",
|
||||||
|
"node_modules/prismjs/components/prism-csharp.min.js",
|
||||||
|
"node_modules/prismjs/components/prism-css.min.js"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
"production": {
|
"production": {
|
||||||
@ -133,4 +138,4 @@
|
|||||||
"typeSeparator": "."
|
"typeSeparator": "."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
1530
package-lock.json
generated
1530
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -20,7 +20,9 @@
|
|||||||
"@angular/platform-browser": "^20.0.2",
|
"@angular/platform-browser": "^20.0.2",
|
||||||
"@angular/platform-browser-dynamic": "^20.0.2",
|
"@angular/platform-browser-dynamic": "^20.0.2",
|
||||||
"@angular/router": "^20.0.2",
|
"@angular/router": "^20.0.2",
|
||||||
|
"ngx-markdown": "^20.0.0",
|
||||||
"ngx-toastr": "^19.0.0",
|
"ngx-toastr": "^19.0.0",
|
||||||
|
"prismjs": "^1.30.0",
|
||||||
"rxjs": "~7.8.0",
|
"rxjs": "~7.8.0",
|
||||||
"tslib": "^2.3.0",
|
"tslib": "^2.3.0",
|
||||||
"zone.js": "~0.15.0"
|
"zone.js": "~0.15.0"
|
||||||
@ -38,4 +40,4 @@
|
|||||||
"karma-jasmine-html-reporter": "~2.1.0",
|
"karma-jasmine-html-reporter": "~2.1.0",
|
||||||
"typescript": "~5.8.3"
|
"typescript": "~5.8.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ import { routes } from './app.routes';
|
|||||||
import { provideHttpClient } from '@angular/common/http';
|
import { provideHttpClient } from '@angular/common/http';
|
||||||
import { provideToastr } from 'ngx-toastr';
|
import { provideToastr } from 'ngx-toastr';
|
||||||
import { provideAnimations } from '@angular/platform-browser/animations';
|
import { provideAnimations } from '@angular/platform-browser/animations';
|
||||||
|
import { provideMarkdown } from 'ngx-markdown';
|
||||||
|
|
||||||
export const appConfig: ApplicationConfig = {
|
export const appConfig: ApplicationConfig = {
|
||||||
providers: [
|
providers: [
|
||||||
@ -17,5 +18,6 @@ export const appConfig: ApplicationConfig = {
|
|||||||
positionClass: 'toast-top-right',
|
positionClass: 'toast-top-right',
|
||||||
closeButton: true
|
closeButton: true
|
||||||
}),
|
}),
|
||||||
|
provideMarkdown()
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
@ -18,6 +18,7 @@ import { MatFormFieldModule } from '@angular/material/form-field';
|
|||||||
import { MatInputModule } from '@angular/material/input';
|
import { MatInputModule } from '@angular/material/input';
|
||||||
import { ReactiveFormsModule } from '@angular/forms';
|
import { ReactiveFormsModule } from '@angular/forms';
|
||||||
import { MatSidenavModule } from '@angular/material/sidenav';
|
import { MatSidenavModule } from '@angular/material/sidenav';
|
||||||
|
import { MarkdownModule } from 'ngx-markdown'
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
@ -41,7 +42,8 @@ import { MatSidenavModule } from '@angular/material/sidenav';
|
|||||||
MatInputModule,
|
MatInputModule,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
MatSidenavModule,
|
MatSidenavModule,
|
||||||
DatePipe
|
DatePipe,
|
||||||
|
MarkdownModule
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class ChatModule { }
|
export class ChatModule { }
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
<span class="time">{{ this.message.time | date: GetMessageDateFormat() }}</span>
|
<span class="time">{{ this.message.time | date: GetMessageDateFormat() }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="message-content">{{this.message.content}}</div>
|
<markdown class="message-content" [data]="this.message.content"></markdown>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@ app-profile-picture {
|
|||||||
|
|
||||||
.message-content {
|
.message-content {
|
||||||
height: fit-content;
|
height: fit-content;
|
||||||
|
margin-right: 15px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user