forked from elk-zone/elk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add reply filter preference on timelines
- Loading branch information
Clovis
committed
Dec 28, 2024
1 parent
bf6cde7
commit 7803cf4
Showing
12 changed files
with
83 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
"name": "@bdxtown/akko", | ||
"description": "Akkoma API client for JavaScript, TypeScript, Node.js, browsers", | ||
"private": false, | ||
"version": "6.12.1", | ||
"version": "6.13.1", | ||
"author": "Ryo Igarashi <[email protected]>", | ||
"license": "MIT", | ||
"type": "module", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<script setup lang="ts"> | ||
import type { akkoma } from '@bdxtown/akko' | ||
const currentVisibility = usePreferences('replyVisibility') | ||
const replyVisibilities: { label: string, icon: string, value: akkoma.rest.v1.ListTimelineParams['replyVisibility'] }[] = [ | ||
{ | ||
value: 'self', | ||
icon: 'i-ri:user-line', | ||
label: 'null', | ||
}, | ||
{ | ||
value: 'following', | ||
icon: 'i-ri:group-line', | ||
label: 'null', | ||
}, | ||
{ | ||
value: null, | ||
icon: 'i-ri:user-community-line', | ||
label: 'null', | ||
}, | ||
] | ||
function setVisibility(value: akkoma.rest.v1.ListTimelineParams['replyVisibility']) { | ||
currentVisibility.value = value | ||
} | ||
</script> | ||
|
||
<template> | ||
<div px5 py2> | ||
<div flex items-center gap-2> | ||
{{ $t('settings.preferences.reply_visibility') }} | ||
</div> | ||
<div block text-sm text-secondary> | ||
{{ $t('settings.preferences.reply_visibility_description') }} | ||
</div> | ||
<div flex items-center gap2 mt-2 flex-wrap> | ||
<button | ||
v-for="visibility in replyVisibilities" | ||
:key="visibility.value || 'null'" | ||
type="button" | ||
btn-text min-w-full sm:min-w-auto flex="~ gap-1 items-center" p3 border="~ base rounded" bg-base ws-nowrap | ||
:aria-pressed="currentVisibility === visibility.value" | ||
:class="currentVisibility === visibility.value ? 'pointer-events-none' : 'filter-saturate-0'" | ||
@click="() => setVisibility(visibility.value)" | ||
> | ||
<div :class="visibility.icon" /> | ||
{{ $t(`reply_visibility.${visibility.value}`) }} | ||
</button> | ||
</div> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters