mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-05 10:05:52 +02:00
* wip * fix * ref -> reactive * tweak throttle threshold * tweak throttle threshold * rss設定にはmanualSaveを使用するように * Update MkWidgetSettingsDialog.vue --------- Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
This commit is contained in:
@@ -28,7 +28,6 @@ import { useWidgetPropsManager } from './widget.js';
|
||||
import type { WidgetComponentEmits, WidgetComponentExpose, WidgetComponentProps } from './widget.js';
|
||||
import type { FormWithDefault, GetFormResultType } from '@/utility/form.js';
|
||||
import MkContainer from '@/components/MkContainer.vue';
|
||||
import { i18n } from '@/i18n.js';
|
||||
|
||||
const name = 'rss';
|
||||
|
||||
@@ -36,6 +35,7 @@ const widgetPropsDef = {
|
||||
url: {
|
||||
type: 'string',
|
||||
default: 'http://feeds.afpbb.com/rss/afpbb/afpbbnews',
|
||||
manualSave: true,
|
||||
},
|
||||
refreshIntervalSec: {
|
||||
type: 'number',
|
||||
@@ -68,7 +68,7 @@ const fetching = ref(true);
|
||||
const fetchEndpoint = computed(() => {
|
||||
const url = new URL('/api/fetch-rss', base);
|
||||
url.searchParams.set('url', widgetProps.url);
|
||||
return url;
|
||||
return url.toString();
|
||||
});
|
||||
const intervalClear = ref<(() => void) | undefined>();
|
||||
|
||||
@@ -83,7 +83,7 @@ const tick = () => {
|
||||
});
|
||||
};
|
||||
|
||||
watch(() => fetchEndpoint, tick);
|
||||
watch(fetchEndpoint, tick);
|
||||
watch(() => widgetProps.refreshIntervalSec, () => {
|
||||
if (intervalClear.value) {
|
||||
intervalClear.value();
|
||||
|
||||
Reference in New Issue
Block a user