Less cluttered notifications

This commit is contained in:
ThatOneCalculator 2022-07-23 21:30:42 -07:00
parent 3d26526d61
commit bf8a82bf67
4 changed files with 59 additions and 3 deletions

View file

@ -11,7 +11,6 @@
- Fully revamp non-logged-in screen
- Personal notes for all accounts
- Admin custom CSS
- Improve notifications (content is too verbose)
- Non-nyaify cat mode
- Timeline filters
- "Bubble" timeline
@ -25,6 +24,7 @@
- Rosé Pine by default (+ non-themable elements made Rosé Pine)
- Better sidebar/navbar
- Mark as read from notifications widget
- Less cluttered notification summary
- Better welcome screen (not logged in)
- Ability to turn off "Connection lost" message
- Spinner instead of "Loading..."

View file

@ -32,6 +32,7 @@ export const getNoteSummary = (note: Packed<'Note'>): string => {
summary += ` (📊)`;
}
/*
// 返信のとき
if (note.replyId) {
if (note.reply) {
@ -49,6 +50,7 @@ export const getNoteSummary = (note: Packed<'Note'>): string => {
summary += '\n\nRN: ...';
}
}
*/
return summary.trim();
};

View file

@ -32,7 +32,7 @@
</MkA>
<div class="divider"></div>
<div class="about">
<MkA v-click-anime class="link" to="/about">
<MkA v-click-anime class="link" @click="openInstanceMenu">
<img :src="$instance.iconUrl || $instance.faviconUrl || '/favicon.ico'" class="_ghost"/>
</MkA>
</div>
@ -133,6 +133,60 @@ export default defineComponent({
},
},
});
function openInstanceMenu(ev: MouseEvent) {
os.popupMenu([{
text: instance.name ?? host,
type: 'label',
}, {
type: 'link',
text: i18n.ts.instanceInfo,
icon: 'fas fa-info-circle',
to: '/about',
}, {
type: 'link',
text: i18n.ts.customEmojis,
icon: 'fas fa-laugh',
to: '/about#emojis',
}, {
type: 'link',
text: i18n.ts.federation,
icon: 'fas fa-globe',
to: '/about#federation',
}, null, {
type: 'parent',
text: i18n.ts.help,
icon: 'fas fa-question-circle',
children: [{
type: 'link',
to: '/mfm-cheat-sheet',
text: i18n.ts._mfm.cheatSheet,
icon: 'fas fa-code',
}, {
type: 'link',
to: '/scratchpad',
text: i18n.ts.scratchpad,
icon: 'fas fa-terminal',
}, {
type: 'link',
to: '/api-console',
text: 'API Console',
icon: 'fas fa-terminal',
}, null, {
text: i18n.ts.document,
icon: 'fas fa-question-circle',
action: () => {
window.open('https://misskey-hub.net/help.html', '_blank');
},
}],
}, {
type: 'link',
text: i18n.ts.aboutMisskey,
to: '/about-misskey',
}], ev.currentTarget ?? ev.target, {
align: 'left',
});
}
</script>
<style lang="scss" scoped>

View file

@ -263,7 +263,7 @@ export async function createEmptyNotification() {
if (!swLang.i18n) swLang.fetchLocale();
const i18n = await swLang.i18n as I18n<any>;
const { t } = i18n;
await self.registration.showNotification(
t('_notification.emptyPushNotificationMessage'),
{