Merge branch 'develop' into chat
This commit is contained in:
@@ -58,7 +58,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||||||
</FormSection>
|
</FormSection>
|
||||||
<slot name="additionalInfo"/>
|
<slot name="additionalInfo"/>
|
||||||
<div class="_buttonsCenter">
|
<div class="_buttonsCenter">
|
||||||
<MkButton primary @click="emits('confirm')"><i class="ti ti-check"></i> {{ i18n.ts.install }}</MkButton>
|
<MkButton gradate rounded @click="emits('confirm')"><i class="ti ti-check"></i> {{ i18n.ts.install }}</MkButton>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@@ -44,7 +44,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, computed, onActivated, onDeactivated, nextTick } from 'vue';
|
import { ref, computed, nextTick } from 'vue';
|
||||||
import type { Extension } from '@/components/MkExtensionInstaller.vue';
|
import type { Extension } from '@/components/MkExtensionInstaller.vue';
|
||||||
import type { AiScriptPluginMeta } from '@/plugin.js';
|
import type { AiScriptPluginMeta } from '@/plugin.js';
|
||||||
import MkLoading from '@/components/global/MkLoading.vue';
|
import MkLoading from '@/components/global/MkLoading.vue';
|
||||||
@@ -229,16 +229,10 @@ async function install() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onActivated(() => {
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
const urlParams = new URLSearchParams(window.location.search);
|
url.value = urlParams.get('url');
|
||||||
url.value = urlParams.get('url');
|
hash.value = urlParams.get('hash');
|
||||||
hash.value = urlParams.get('hash');
|
fetch();
|
||||||
fetch();
|
|
||||||
});
|
|
||||||
|
|
||||||
onDeactivated(() => {
|
|
||||||
uiPhase.value = 'fetching';
|
|
||||||
});
|
|
||||||
|
|
||||||
const headerActions = computed(() => []);
|
const headerActions = computed(() => []);
|
||||||
|
|
||||||
|
@@ -56,12 +56,18 @@ import { deepMerge } from '@/utility/merge.js';
|
|||||||
import { miLocalStorage } from '@/local-storage.js';
|
import { miLocalStorage } from '@/local-storage.js';
|
||||||
import { availableBasicTimelines, hasWithReplies, isAvailableBasicTimeline, isBasicTimeline, basicTimelineIconClass } from '@/timelines.js';
|
import { availableBasicTimelines, hasWithReplies, isAvailableBasicTimeline, isBasicTimeline, basicTimelineIconClass } from '@/timelines.js';
|
||||||
import { prefer } from '@/preferences.js';
|
import { prefer } from '@/preferences.js';
|
||||||
|
import { useRouter } from '@/router.js';
|
||||||
|
|
||||||
provide('shouldOmitHeaderTitle', true);
|
provide('shouldOmitHeaderTitle', true);
|
||||||
|
|
||||||
const tlComponent = useTemplateRef('tlComponent');
|
const tlComponent = useTemplateRef('tlComponent');
|
||||||
const rootEl = useTemplateRef('rootEl');
|
const rootEl = useTemplateRef('rootEl');
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
router.useListener('same', () => {
|
||||||
|
top();
|
||||||
|
});
|
||||||
|
|
||||||
type TimelinePageSrc = BasicTimelineType | `list:${string}`;
|
type TimelinePageSrc = BasicTimelineType | `list:${string}`;
|
||||||
|
|
||||||
const queue = ref(0);
|
const queue = ref(0);
|
||||||
@@ -128,7 +134,7 @@ function queueUpdated(q: number): void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function top(): void {
|
function top(): void {
|
||||||
if (rootEl.value) scroll(rootEl.value, { top: 0 });
|
if (rootEl.value) scroll(rootEl.value, { top: 0, behavior: 'smooth' });
|
||||||
}
|
}
|
||||||
|
|
||||||
async function chooseList(ev: MouseEvent): Promise<void> {
|
async function chooseList(ev: MouseEvent): Promise<void> {
|
||||||
|
Reference in New Issue
Block a user