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

Closed
fedward wants to merge 1 commit 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
Clean feature branch creating new showPublicExternalTimeline value and
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
af3b525442
depending on it for display of public external timeline links
Ghost 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) },
First-time 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 } }, ```
Ghost 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">
First-time 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.
First-time 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
First-time contributor

superseded by #250

superseded by #250
Ghost 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.