diff --git a/index.html b/index.html index 5581c894..5f8735ea 100644 --- a/index.html +++ b/index.html @@ -11,6 +11,7 @@ + diff --git a/src/components/settings_modal/tabs/profile_tab.js b/src/components/settings_modal/tabs/profile_tab.js index b69cf2f1..c29e8d2a 100644 --- a/src/components/settings_modal/tabs/profile_tab.js +++ b/src/components/settings_modal/tabs/profile_tab.js @@ -43,7 +43,9 @@ const ProfileTab = { bannerPreview: null, background: null, backgroundPreview: null, - emailLanguage: this.$store.state.users.currentUser.language || '' + emailLanguage: this.$store.state.users.currentUser.language || '', + newPostTTLDays: this.$store.state.users.currentUser.status_ttl_days, + expirePosts: this.$store.state.users.currentUser.status_ttl_days !== null, } }, components: { @@ -123,7 +125,8 @@ const ProfileTab = { display_name: this.newName, fields_attributes: this.newFields.filter(el => el != null), bot: this.bot, - show_role: this.showRole + show_role: this.showRole, + status_ttl_days: this.expirePosts ? this.newPostTTLDays : -1 /* eslint-enable camelcase */ } diff --git a/src/components/settings_modal/tabs/profile_tab.scss b/src/components/settings_modal/tabs/profile_tab.scss index 201f1a76..8b9a35e1 100644 --- a/src/components/settings_modal/tabs/profile_tab.scss +++ b/src/components/settings_modal/tabs/profile_tab.scss @@ -4,6 +4,10 @@ margin: 0; } + .expire-posts-days { + margin-left: 1em; + } + .visibility-tray { padding-top: 5px; } diff --git a/src/components/settings_modal/tabs/profile_tab.vue b/src/components/settings_modal/tabs/profile_tab.vue index 642d54ca..8748b685 100644 --- a/src/components/settings_modal/tabs/profile_tab.vue +++ b/src/components/settings_modal/tabs/profile_tab.vue @@ -89,6 +89,20 @@ {{ $t('settings.bot') }}

+

+ + {{ $t('settings.expire_posts_enabled') }} + + +

{ output.bot = data.bot if (data.akkoma) { output.instance = data.akkoma.instance + output.status_ttl_days = data.akkoma.status_ttl_days } if (data.pleroma) {