Make display of links to public external timeline dependent on restrict_unauthenticated setting (#204) #216

Closed
fedward wants to merge 1 commits from fedward:issue204 into develop
First-time contributor

Create new showPublicExternalTimeline boolean and depend on it for display of public external timeline links in navigation.

Create new showPublicExternalTimeline boolean and depend on it for display of public external timeline links in navigation.
fedward added 1 commit 2022-11-16 19:36:40 +00:00
ci/woodpecker/pr/woodpecker Pipeline was successful Details
af3b525442
Clean feature branch creating new showPublicExternalTimeline value and
depending on it for display of public external timeline links
nbsp requested changes 2022-11-16 20:25:41 +00:00
@ -92,6 +92,7 @@ export default {
editingAvailable () { return this.$store.state.instance.editingAvailable },
layoutType () { return this.$store.state.interface.layoutType },
privateMode () { return this.$store.state.instance.private },
showPublicExternalTimeline () {return currentUser() || !(privateMode || this.$store.state.instance.restrict_unauthenticated.timelines.federated) },
Contributor

nit: {return => { return
surprised the console didn't scream at you for that

actually it's probably too big to be a oneliner, try this

    showPublicExternalTimeline () {
      if (currentUser() || !privateMode ||
        !this.$store.state.instance.restrict_unauthenticated.timelines.federated) {
        return true
      }
    },
nit: `{return => { return` surprised the console didn't scream at you for that actually it's probably too big to be a oneliner, try this ```js showPublicExternalTimeline () { if (currentUser() || !privateMode || !this.$store.state.instance.restrict_unauthenticated.timelines.federated) { return true } }, ```
nbsp reviewed 2022-11-16 20:26:42 +00:00
@ -49,3 +49,3 @@
</router-link>
</li>
<li v-if="federating && (currentUser || !privateMode)">
<li v-if="federating && showPublicExternalTimeline">
Contributor

maybe federating should be grouped into this new variable as well?

maybe `federating` should be grouped into this new variable as well?
Author
First-time contributor

My goal was the lightest possible change, but I thought about that. But then I also thought that maybe there should be a corresponding variable for the local timeline so the style could be consistent wherever those links appear.

My goal was the lightest possible change, but I thought about that. But then I also thought that maybe there should be a corresponding variable for the local timeline so the style could be consistent wherever those links appear.
Contributor

well it makes sense for it to be grouped; it wouldn't show if it doesn't federate, so the name is a bit misleading if it's not in there

well it makes sense for it to be grouped; it wouldn't `show` if it doesn't federate, so the name is a bit misleading if it's not in there
Mergan added the
Bug fix
label 2022-11-17 23:25:57 +00:00
Mergan changed title from Make display of links to public external timeline dependent on restrict_unauthenticated setting to Make display of links to public external timeline dependent on restrict_unauthenticated setting (#204) 2022-11-17 23:34:35 +00:00
Contributor

superseded by #250

superseded by #250
nbsp closed this pull request 2023-01-16 14:15:55 +00:00
fedward deleted branch issue204 2023-02-12 19:10:11 +00:00
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful

Pull request closed

Sign in to join this conversation.
No description provided.