mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-23 11:21:32 +00:00
Fixing tribute.
This commit is contained in:
parent
4e982ccf51
commit
a47af02e1b
4 changed files with 7 additions and 4 deletions
2
ui/assets/libs/tribute.min.js
vendored
Normal file
2
ui/assets/libs/tribute.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
6
ui/src/components/comment-form.tsx
vendored
6
ui/src/components/comment-form.tsx
vendored
|
@ -6,7 +6,7 @@ import { WebSocketService, UserService } from '../services';
|
|||
import * as autosize from 'autosize';
|
||||
import { i18n } from '../i18next';
|
||||
import { T } from 'inferno-i18next';
|
||||
import * as tributejs from 'tributejs';
|
||||
declare var Tribute: any;
|
||||
|
||||
interface CommentFormProps {
|
||||
postId?: number;
|
||||
|
@ -23,7 +23,7 @@ interface CommentFormState {
|
|||
|
||||
export class CommentForm extends Component<CommentFormProps, CommentFormState> {
|
||||
|
||||
private id = `comment-form-${btoa(Math.random()).substring(0,12)}`;
|
||||
private id = `comment-form-${Math.random().toString(36).replace(/[^a-z]+/g, '').substr(2, 10)}`;
|
||||
private userSub: Subscription;
|
||||
private communitySub: Subscription;
|
||||
private tribute: any;
|
||||
|
@ -40,7 +40,7 @@ export class CommentForm extends Component<CommentFormProps, CommentFormState> {
|
|||
constructor(props: any, context: any) {
|
||||
super(props, context);
|
||||
|
||||
this.tribute = new tributejs({
|
||||
this.tribute = new Tribute({
|
||||
collection: [
|
||||
|
||||
// Users
|
||||
|
|
1
ui/src/index.html
vendored
1
ui/src/index.html
vendored
|
@ -9,6 +9,7 @@
|
|||
<link rel="shortcut icon" type="image/svg+xml" href="/static/assets/favicon.svg" />
|
||||
<link rel="apple-touch-icon" href="/static/assets/apple-touch-icon.png" />
|
||||
<script async src="/static/assets/libs/sortable/sortable.min.js"></script>
|
||||
<script async src="/static/assets/libs/tribute.min.js"></script>
|
||||
<script src="/static/assets/libs/markdown-it-emoji/markdown-it-emoji.min.js" type="text/javascript"></script>
|
||||
</head>
|
||||
|
||||
|
|
2
ui/yarn.lock
vendored
2
ui/yarn.lock
vendored
|
@ -3286,7 +3286,7 @@ uc.micro@^1.0.1, uc.micro@^1.0.5:
|
|||
resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac"
|
||||
integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==
|
||||
|
||||
uglify-js@^3.0.5:
|
||||
uglify-js@^3.0.5, uglify-js@^3.6.0:
|
||||
version "3.6.0"
|
||||
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.6.0.tgz#704681345c53a8b2079fb6cec294b05ead242ff5"
|
||||
integrity sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==
|
||||
|
|
Loading…
Reference in a new issue