Feat: タイムライン更新中に広告を挿入 (#11989)
* Feat: タイムライン更新中に広告を挿入 * 翻訳を変更 * Run api extractor * fix api extractor * Update locales/ja-JP.yml Co-authored-by: syuilo <Syuilotan@yahoo.co.jp> * confirm -> mkinfo * MkInputにmin, maxを指定できるように * 負の値が指定されたら何もしない --------- Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
@@ -23,6 +23,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
:spellcheck="spellcheck"
|
||||
:step="step"
|
||||
:list="id"
|
||||
:min="min"
|
||||
:max="max"
|
||||
@focus="focused = true"
|
||||
@blur="focused = false"
|
||||
@keydown="onKeydown($event)"
|
||||
@@ -59,6 +61,8 @@ const props = defineProps<{
|
||||
spellcheck?: boolean;
|
||||
step?: any;
|
||||
datalist?: string[];
|
||||
min?: string;
|
||||
max?: string;
|
||||
inline?: boolean;
|
||||
debounce?: boolean;
|
||||
manualSave?: boolean;
|
||||
|
||||
@@ -13,6 +13,7 @@ import MkNotes from '@/components/MkNotes.vue';
|
||||
import { useStream } from '@/stream.js';
|
||||
import * as sound from '@/scripts/sound.js';
|
||||
import { $i } from '@/account.js';
|
||||
import { instance } from '@/instance.js';
|
||||
import { defaultStore } from '@/store.js';
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
@@ -38,7 +39,15 @@ provide('inChannel', computed(() => props.src === 'channel'));
|
||||
|
||||
const tlComponent: InstanceType<typeof MkNotes> = $ref();
|
||||
|
||||
let tlNotesCount = 0;
|
||||
|
||||
const prepend = note => {
|
||||
tlNotesCount++;
|
||||
|
||||
if (instance.notesPerOneAd > 0 && tlNotesCount % instance.notesPerOneAd === 0) {
|
||||
note._shouldInsertAd_ = true;
|
||||
}
|
||||
|
||||
tlComponent.pagingComponent?.prepend(note);
|
||||
|
||||
emit('note');
|
||||
|
||||
Reference in New Issue
Block a user