Merge remote-tracking branch 'misskey/master' into feature/misskey-2024.07
This commit is contained in:
commit
cfa9b852df
585 changed files with 23423 additions and 9623 deletions
|
|
@ -121,7 +121,7 @@ defineExpose<WidgetComponentExpose>({
|
|||
.root {
|
||||
padding: 16px 0;
|
||||
|
||||
&:after {
|
||||
&::after {
|
||||
content: "";
|
||||
display: block;
|
||||
clear: both;
|
||||
|
|
|
|||
|
|
@ -81,16 +81,19 @@ defineExpose<WidgetComponentExpose>({
|
|||
.body {
|
||||
text-overflow: ellipsis;
|
||||
overflow: clip;
|
||||
margin-left: -10px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.name {
|
||||
color: #fff;
|
||||
filter: drop-shadow(0 0 4px #000);
|
||||
filter: drop-shadow(0 0 4px #000) drop-shadow(0 0 0.1px rgba(0, 0, 0, 0.5));
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.host {
|
||||
color: #fff;
|
||||
filter: drop-shadow(0 0 4px #000);
|
||||
filter: drop-shadow(0 0 4px #000) drop-shadow(0 0 0.1px rgba(0, 0, 0, 0.5));
|
||||
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ const { widgetProps, configure, save } = useWidgetPropsManager(name,
|
|||
);
|
||||
|
||||
const configureNotification = () => {
|
||||
os.popup(defineAsyncComponent(() => import('@/components/MkNotificationSelectWindow.vue')), {
|
||||
const { dispose } = os.popup(defineAsyncComponent(() => import('@/components/MkNotificationSelectWindow.vue')), {
|
||||
excludeTypes: widgetProps.excludeTypes,
|
||||
}, {
|
||||
done: async (res) => {
|
||||
|
|
@ -62,7 +62,8 @@ const configureNotification = () => {
|
|||
widgetProps.excludeTypes = excludeTypes;
|
||||
save();
|
||||
},
|
||||
}, 'closed');
|
||||
closed: () => dispose(),
|
||||
});
|
||||
};
|
||||
|
||||
defineExpose<WidgetComponentExpose>({
|
||||
|
|
|
|||
|
|
@ -82,16 +82,19 @@ defineExpose<WidgetComponentExpose>({
|
|||
.body {
|
||||
text-overflow: ellipsis;
|
||||
overflow: clip;
|
||||
margin-left: -10px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.name {
|
||||
color: #fff;
|
||||
filter: drop-shadow(0 0 4px #000);
|
||||
filter: drop-shadow(0 0 4px #000) drop-shadow(0 0 0.1px rgba(0, 0, 0, 0.5));
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.username {
|
||||
color: #fff;
|
||||
filter: drop-shadow(0 0 4px #000);
|
||||
filter: drop-shadow(0 0 4px #000) drop-shadow(0 0 0.1px rgba(0, 0, 0, 0.5));
|
||||
font-weight: normal;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -6,11 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<template>
|
||||
<MkContainer :showHeader="widgetProps.showHeader" :style="`height: ${widgetProps.height}px;`" :scrollable="true" data-cy-mkw-timeline class="mkw-timeline">
|
||||
<template #icon>
|
||||
<i v-if="widgetProps.src === 'home'" class="ti ti-home"></i>
|
||||
<i v-else-if="widgetProps.src === 'local'" class="ti ti-planet"></i>
|
||||
<i v-else-if="widgetProps.src === 'social'" class="ti ti-universe"></i>
|
||||
<i v-else-if="widgetProps.src === 'bubble'" class="ph-drop ph-bold ph-lg"></i>
|
||||
<i v-else-if="widgetProps.src === 'global'" class="ti ti-whirl"></i>
|
||||
<i v-if="isBasicTimeline(widgetProps.src)" :class="basicTimelineIconClass(widgetProps.src)"></i>
|
||||
<i v-else-if="widgetProps.src === 'list'" class="ti ti-list"></i>
|
||||
<i v-else-if="widgetProps.src === 'antenna'" class="ti ti-antenna"></i>
|
||||
</template>
|
||||
|
|
@ -21,7 +17,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</button>
|
||||
</template>
|
||||
|
||||
<div v-if="(((widgetProps.src === 'local' || widgetProps.src === 'social') && !isLocalTimelineAvailable) || (widgetProps.src === 'bubble' && !isBubbleTimelineAvailable) || (widgetProps.src === 'global' && !isGlobalTimelineAvailable))" :class="$style.disabled">
|
||||
<div v-if="isBasicTimeline(widgetProps.src) && !isAvailableBasicTimeline(widgetProps.src)" :class="$style.disabled">
|
||||
<p :class="$style.disabledTitle">
|
||||
<i class="ti ti-minus"></i>
|
||||
{{ i18n.ts._disabledTimeline.title }}
|
||||
|
|
@ -43,13 +39,9 @@ import { misskeyApi } from '@/scripts/misskey-api.js';
|
|||
import MkContainer from '@/components/MkContainer.vue';
|
||||
import MkTimeline from '@/components/MkTimeline.vue';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { $i } from '@/account.js';
|
||||
import { instance } from '@/instance.js';
|
||||
import { availableBasicTimelines, isAvailableBasicTimeline, isBasicTimeline, basicTimelineIconClass } from '@/timelines.js';
|
||||
|
||||
const name = 'timeline';
|
||||
const isLocalTimelineAvailable = (($i == null && instance.policies.ltlAvailable) || ($i != null && $i.policies.ltlAvailable));
|
||||
const isGlobalTimelineAvailable = (($i == null && instance.policies.gtlAvailable) || ($i != null && $i.policies.gtlAvailable));
|
||||
const isBubbleTimelineAvailable = (($i == null && instance.policies.btlAvailable) || ($i != null && $i.policies.btlAvailable));
|
||||
|
||||
const widgetPropsDef = {
|
||||
showHeader: {
|
||||
|
|
@ -117,27 +109,11 @@ const choose = async (ev) => {
|
|||
setSrc('list');
|
||||
},
|
||||
}));
|
||||
os.popupMenu([{
|
||||
text: i18n.ts._timelines.home,
|
||||
icon: 'ti ti-home',
|
||||
action: () => { setSrc('home'); },
|
||||
}, {
|
||||
text: i18n.ts._timelines.local,
|
||||
icon: 'ti ti-planet',
|
||||
action: () => { setSrc('local'); },
|
||||
}, {
|
||||
text: i18n.ts._timelines.social,
|
||||
icon: 'ti ti-universe',
|
||||
action: () => { setSrc('social'); },
|
||||
}, {
|
||||
text: 'Bubble',
|
||||
icon: 'ph-drop ph-bold ph-lg',
|
||||
action: () => { setSrc('bubble'); },
|
||||
}, {
|
||||
text: i18n.ts._timelines.global,
|
||||
icon: 'ti ti-whirl',
|
||||
action: () => { setSrc('global'); },
|
||||
}, antennaItems.length > 0 ? { type: 'divider' } : undefined, ...antennaItems, listItems.length > 0 ? { type: 'divider' } : undefined, ...listItems], ev.currentTarget ?? ev.target).then(() => {
|
||||
os.popupMenu([...availableBasicTimelines().map(tl => ({
|
||||
text: i18n.ts._timelines[tl],
|
||||
icon: basicTimelineIconClass(tl),
|
||||
action: () => { setSrc(tl); },
|
||||
})), antennaItems.length > 0 ? { type: 'divider' } : undefined, ...antennaItems, listItems.length > 0 ? { type: 'divider' } : undefined, ...listItems], ev.currentTarget ?? ev.target).then(() => {
|
||||
menuOpened.value = false;
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue