Skip to content

Commit 8ba0f18

Browse files
committed
feat: make sharing user name optional on timeline (fix #1452)
Signed-off-by: Varun Patil <[email protected]>
1 parent 53beb2f commit 8ba0f18

File tree

6 files changed

+26
-1
lines changed

6 files changed

+26
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file.
55
## Unreleased
66

77
- **Feature**: Looping of live photos is now gated behind a user setting ([[#1457](https://github.com/pulsejet/memories/issues/1457)])
8+
- **Feature**: Option to hide sharing user from timeline ([#1452](https://github.com/pulsejet/memories/issues/1452))
89
- **Fix**: Hide sharing user from public links ([#1452](https://github.com/pulsejet/memories/issues/1452))
910

1011
## [v7.5.1] - 2025-02-26

lib/Controller/OtherController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ public function getUserConfig(): Http\Response
101101
'timeline_path' => $getAppConfig('timelinePath', SystemConfig::get('memories.timeline.default_path')),
102102
'enable_top_memories' => 'true' === $getAppConfig('enableTopMemories', 'true'),
103103
'stack_raw_files' => 'true' === $getAppConfig('stackRawFiles', 'true'),
104+
'dedup_identical' => 'true' === $getAppConfig('dedupIdentical', 'false'),
105+
'show_owner_name_timeline' => 'true' === $getAppConfig('showOwnerNameTimeline', 'false'),
104106

105107
// viewer settings
106108
'high_res_cond_default' => SystemConfig::get('memories.viewer.high_res_cond_default'),

src/components/Settings.vue

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@
4444
>
4545
{{ t('memories', 'De-duplicate identical files') }}
4646
</NcCheckboxRadioSwitch>
47+
48+
<NcCheckboxRadioSwitch
49+
:checked.sync="config.show_owner_name_timeline"
50+
@update:checked="updateShowOwnerNameTimeline"
51+
type="switch"
52+
>
53+
{{ t('memories', 'Show photo owner name on timeline') }}
54+
</NcCheckboxRadioSwitch>
4755
</NcAppSettingsSection>
4856

4957
<NcAppSettingsSection id="viewer-settings" :name="names.viewer">
@@ -334,6 +342,10 @@ export default defineComponent({
334342
await this.updateSetting('dedup_identical', 'dedupIdentical');
335343
},
336344
345+
async updateShowOwnerNameTimeline() {
346+
await this.updateSetting('show_owner_name_timeline', 'showOwnerNameTimeline');
347+
},
348+
337349
// Viewer settings
338350
async updateHighResCond(val: IConfig['high_res_cond']) {
339351
this.config.high_res_cond = val;

src/components/frame/Photo.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
</div>
4242

4343
<div class="flag bottom-left">
44-
<span class="shared-by" v-if="sharedBy">{{ sharedBy }}</span>
44+
<span class="shared-by" v-if="showOwnerName && sharedBy">{{ sharedBy }}</span>
4545
</div>
4646

4747
<div
@@ -84,6 +84,7 @@
8484
import { defineComponent, type PropType } from 'vue';
8585
8686
import * as utils from '@services/utils';
87+
import staticConfig from '@services/static-config';
8788
8889
import LivePhotoIcon from '@components/icons/LivePhoto.vue';
8990
import CheckCircleIcon from 'vue-material-design-icons/CheckCircle.vue';
@@ -208,6 +209,13 @@ export default defineComponent({
208209
return !!this.data.stackraw || this.data.mimetype === this.c.MIME_RAW;
209210
},
210211
212+
showOwnerName(): boolean {
213+
if (this.routeIsBase && !staticConfig.getSync('show_owner_name_timeline')) {
214+
return false;
215+
}
216+
return true;
217+
},
218+
211219
sharedBy(): string | null {
212220
if (this.data.shared_by == '[unknown]') {
213221
return this.t('memories', 'Shared');

src/services/static-config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ class StaticConfig {
135135
enable_top_memories: true,
136136
stack_raw_files: true,
137137
dedup_identical: false,
138+
show_owner_name_timeline: false,
138139

139140
// viewer settings
140141
high_res_cond_default: 'zoom',

src/typings/config.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ declare module '@typings' {
2222
enable_top_memories: boolean;
2323
stack_raw_files: boolean;
2424
dedup_identical: boolean;
25+
show_owner_name_timeline: boolean;
2526

2627
// viewer settings
2728
high_res_cond_default: HighResCond;

0 commit comments

Comments
 (0)