Compare commits
4 Commits
2024.8.0
...
featured-s
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f881465f4a | ||
![]() |
7246e6ff5b | ||
![]() |
e78110a5cd | ||
![]() |
6c5593d456 |
12
CHANGELOG.md
12
CHANGELOG.md
@@ -1,3 +1,15 @@
|
||||
## Unreleased
|
||||
|
||||
### General
|
||||
- Enhance: ハイライトからセンシティブなメディアを含むノートを除外するオプション
|
||||
|
||||
### Client
|
||||
-
|
||||
|
||||
### Server
|
||||
-
|
||||
|
||||
|
||||
## 2024.8.0
|
||||
|
||||
### General
|
||||
|
@@ -36,6 +36,7 @@ export const paramDef = {
|
||||
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
|
||||
untilId: { type: 'string', format: 'misskey:id' },
|
||||
channelId: { type: 'string', nullable: true, format: 'misskey:id' },
|
||||
withSensitive: { type: 'boolean', default: true },
|
||||
},
|
||||
required: [],
|
||||
} as const;
|
||||
@@ -103,7 +104,13 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||
|
||||
notes.sort((a, b) => a.id > b.id ? -1 : 1);
|
||||
|
||||
return await this.noteEntityService.packMany(notes, me);
|
||||
let packed = await this.noteEntityService.packMany(notes, me);
|
||||
|
||||
if (!ps.withSensitive) {
|
||||
packed = packed.filter(note => note.files?.length === 0 || note.files?.every(file => !file.isSensitive));
|
||||
}
|
||||
|
||||
return packed;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@@ -7,9 +7,11 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<MkSpacer :contentMax="800">
|
||||
<MkTab v-model="tab" style="margin-bottom: var(--margin);">
|
||||
<option value="notes">{{ i18n.ts.notes }}</option>
|
||||
<option value="notesWithSensitive">{{ i18n.ts.notes }} (+{{ i18n.ts.sensitive }})</option>
|
||||
<option value="polls">{{ i18n.ts.poll }}</option>
|
||||
</MkTab>
|
||||
<MkNotes v-if="tab === 'notes'" :pagination="paginationForNotes"/>
|
||||
<MkNotes v-else-if="tab === 'notesWithSensitive'" :pagination="paginationForNotesWithSensitive"/>
|
||||
<MkNotes v-else-if="tab === 'polls'" :pagination="paginationForPolls"/>
|
||||
</MkSpacer>
|
||||
</template>
|
||||
@@ -23,6 +25,17 @@ import { i18n } from '@/i18n.js';
|
||||
const paginationForNotes = {
|
||||
endpoint: 'notes/featured' as const,
|
||||
limit: 10,
|
||||
params: {
|
||||
withSensitive: false,
|
||||
},
|
||||
};
|
||||
|
||||
const paginationForNotesWithSensitive = {
|
||||
endpoint: 'notes/featured' as const,
|
||||
limit: 10,
|
||||
params: {
|
||||
withSensitive: true,
|
||||
},
|
||||
};
|
||||
|
||||
const paginationForPolls = {
|
||||
|
@@ -89,7 +89,6 @@
|
||||
X11: 'rgba(0, 0, 0, 0.3)',
|
||||
X12: 'rgba(255, 255, 255, 0.1)',
|
||||
X13: 'rgba(255, 255, 255, 0.15)',
|
||||
X14: ':alpha<0.5<@navBg',
|
||||
X15: ':alpha<0<@panel',
|
||||
X16: ':alpha<0.7<@panel',
|
||||
X17: ':alpha<0.8<@bg',
|
||||
|
@@ -89,7 +89,6 @@
|
||||
X11: 'rgba(0, 0, 0, 0.1)',
|
||||
X12: 'rgba(0, 0, 0, 0.1)',
|
||||
X13: 'rgba(0, 0, 0, 0.15)',
|
||||
X14: ':alpha<0.5<@navBg',
|
||||
X15: ':alpha<0<@panel',
|
||||
X16: ':alpha<0.7<@panel',
|
||||
X17: ':alpha<0.8<@bg',
|
||||
|
@@ -82,6 +82,8 @@ function more() {
|
||||
|
||||
<style lang="scss" module>
|
||||
.root {
|
||||
--nav-bg-transparent: color-mix(in srgb, var(--navBg), transparent 50%);
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
@@ -91,7 +93,7 @@ function more() {
|
||||
top: 0;
|
||||
z-index: 1;
|
||||
padding: 20px 0;
|
||||
background: var(--X14);
|
||||
background: var(--nav-bg-transparent);
|
||||
-webkit-backdrop-filter: var(--blur, blur(8px));
|
||||
backdrop-filter: var(--blur, blur(8px));
|
||||
}
|
||||
@@ -125,7 +127,7 @@ function more() {
|
||||
position: sticky;
|
||||
bottom: 0;
|
||||
padding: 20px 0;
|
||||
background: var(--X14);
|
||||
background: var(--nav-bg-transparent);
|
||||
-webkit-backdrop-filter: var(--blur, blur(8px));
|
||||
backdrop-filter: var(--blur, blur(8px));
|
||||
}
|
||||
|
@@ -111,6 +111,7 @@ function more(ev: MouseEvent) {
|
||||
.root {
|
||||
--nav-width: 250px;
|
||||
--nav-icon-only-width: 80px;
|
||||
--nav-bg-transparent: color-mix(in srgb, var(--navBg), transparent 50%);
|
||||
|
||||
flex: 0 0 var(--nav-width);
|
||||
width: var(--nav-width);
|
||||
@@ -144,7 +145,7 @@ function more(ev: MouseEvent) {
|
||||
top: 0;
|
||||
z-index: 1;
|
||||
padding: 20px 0;
|
||||
background: var(--X14);
|
||||
background: var(--nav-bg-transparent);
|
||||
-webkit-backdrop-filter: var(--blur, blur(8px));
|
||||
backdrop-filter: var(--blur, blur(8px));
|
||||
}
|
||||
@@ -187,7 +188,7 @@ function more(ev: MouseEvent) {
|
||||
position: sticky;
|
||||
bottom: 0;
|
||||
padding-top: 20px;
|
||||
background: var(--X14);
|
||||
background: var(--nav-bg-transparent);
|
||||
-webkit-backdrop-filter: var(--blur, blur(8px));
|
||||
backdrop-filter: var(--blur, blur(8px));
|
||||
}
|
||||
@@ -378,7 +379,7 @@ function more(ev: MouseEvent) {
|
||||
top: 0;
|
||||
z-index: 1;
|
||||
padding: 20px 0;
|
||||
background: var(--X14);
|
||||
background: var(--nav-bg-transparent);
|
||||
-webkit-backdrop-filter: var(--blur, blur(8px));
|
||||
backdrop-filter: var(--blur, blur(8px));
|
||||
}
|
||||
@@ -408,7 +409,7 @@ function more(ev: MouseEvent) {
|
||||
position: sticky;
|
||||
bottom: 0;
|
||||
padding-top: 20px;
|
||||
background: var(--X14);
|
||||
background: var(--nav-bg-transparent);
|
||||
-webkit-backdrop-filter: var(--blur, blur(8px));
|
||||
backdrop-filter: var(--blur, blur(8px));
|
||||
}
|
||||
|
Reference in New Issue
Block a user