mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-12-22 19:01:26 +00:00
Merge pull request #277 from LemmyNet/feature/mark_post_as_read
Add show read posts option. Fixes #276
This commit is contained in:
commit
440d0c9b77
4 changed files with 27 additions and 6 deletions
|
@ -1 +1 @@
|
|||
Subproject commit 0cf2ad832d07d6c0232b3c9c1958d5572303410e
|
||||
Subproject commit 5fa4929d6660588c290dfb78f2cb001974e163a2
|
|
@ -68,7 +68,7 @@
|
|||
"eslint-plugin-prettier": "^3.4.0",
|
||||
"husky": "^6.0.0",
|
||||
"iso-639-1": "^2.1.9",
|
||||
"lemmy-js-client": "0.11.0-rc.12",
|
||||
"lemmy-js-client": "0.11.0-rc.13",
|
||||
"lint-staged": "^10.5.4",
|
||||
"mini-css-extract-plugin": "^1.5.0",
|
||||
"node-fetch": "^2.6.1",
|
||||
|
|
|
@ -824,6 +824,20 @@ export class Person extends Component<any, PersonState> {
|
|||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="form-check">
|
||||
<input
|
||||
class="form-check-input"
|
||||
id="user-show-read-posts"
|
||||
type="checkbox"
|
||||
checked={this.state.saveUserSettingsForm.show_read_posts}
|
||||
onChange={linkEvent(this, this.handleUserSettingsShowReadPosts)}
|
||||
/>
|
||||
<label class="form-check-label" htmlFor="user-show-read-posts">
|
||||
{i18n.t("show_read_posts")}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="form-check">
|
||||
<input
|
||||
|
@ -1007,6 +1021,11 @@ export class Person extends Component<any, PersonState> {
|
|||
i.setState(i.state);
|
||||
}
|
||||
|
||||
handleUserSettingsShowReadPosts(i: Person, event: any) {
|
||||
i.state.saveUserSettingsForm.show_read_posts = event.target.checked;
|
||||
i.setState(i.state);
|
||||
}
|
||||
|
||||
handleUserSettingsShowScoresChange(i: Person, event: any) {
|
||||
i.state.saveUserSettingsForm.show_scores = event.target.checked;
|
||||
UserService.Instance.localUserView.local_user.show_scores =
|
||||
|
@ -1191,6 +1210,8 @@ export class Person extends Component<any, PersonState> {
|
|||
UserService.Instance.localUserView.local_user.show_bot_accounts;
|
||||
this.state.saveUserSettingsForm.show_scores =
|
||||
UserService.Instance.localUserView.local_user.show_scores;
|
||||
this.state.saveUserSettingsForm.show_read_posts =
|
||||
UserService.Instance.localUserView.local_user.show_read_posts;
|
||||
this.state.saveUserSettingsForm.email =
|
||||
UserService.Instance.localUserView.local_user.email;
|
||||
this.state.saveUserSettingsForm.bio =
|
||||
|
|
|
@ -5160,10 +5160,10 @@ lcid@^1.0.0:
|
|||
dependencies:
|
||||
invert-kv "^1.0.0"
|
||||
|
||||
lemmy-js-client@0.11.0-rc.12:
|
||||
version "0.11.0-rc.12"
|
||||
resolved "https://registry.yarnpkg.com/lemmy-js-client/-/lemmy-js-client-0.11.0-rc.12.tgz#b6f80f69425ae9699857f98640a3d5a9697955b1"
|
||||
integrity sha512-tAYL6g+OgJcNy4SP0tbN6x/qyScAV5XPVyIYGGZd2FDfVd3VFDvfoesqGBOSryLhW9jDE6YSC09jhNLMyNtMCA==
|
||||
lemmy-js-client@0.11.0-rc.13:
|
||||
version "0.11.0-rc.13"
|
||||
resolved "https://registry.yarnpkg.com/lemmy-js-client/-/lemmy-js-client-0.11.0-rc.13.tgz#ba59315052b6f67ea034cdee400435ace277d503"
|
||||
integrity sha512-Nh57Euywhq5p4Y/KX1j8yOVNyXwhZLqUlqMk+96R9qQHgiy3xXhUBztXOk1PTE5HvjBPw8FuWyQPxTphIb/vQg==
|
||||
|
||||
levn@^0.4.1:
|
||||
version "0.4.1"
|
||||
|
|
Loading…
Reference in a new issue