feat: segatools.ini loading
This commit is contained in:
@ -1,9 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { Ref, computed, ref } from 'vue';
|
||||
import Button from 'primevue/button';
|
||||
import ConfirmDialog from 'primevue/confirmdialog';
|
||||
import ContextMenu from 'primevue/contextmenu';
|
||||
import ScrollPanel from 'primevue/scrollpanel';
|
||||
import { useConfirm } from 'primevue/useconfirm';
|
||||
import { listen } from '@tauri-apps/api/event';
|
||||
import { getCurrentWindow } from '@tauri-apps/api/window';
|
||||
@ -38,6 +36,8 @@ const startline = async (force: boolean, refresh: boolean) => {
|
||||
confirmDialog.require({
|
||||
message: message.join('\n'),
|
||||
header: 'Start check failed',
|
||||
acceptLabel: 'Run anyway',
|
||||
rejectLabel: 'Cancel',
|
||||
accept: () => {
|
||||
startline(true, refresh);
|
||||
},
|
||||
@ -85,10 +85,6 @@ listen('launch-end', () => {
|
||||
getCurrentWindow().setFocus();
|
||||
});
|
||||
|
||||
const messageSplit = (message: any) => {
|
||||
return message.message?.split('\n');
|
||||
};
|
||||
|
||||
const menuItems = [
|
||||
{
|
||||
label: 'Refresh and start',
|
||||
@ -111,45 +107,6 @@ const showContextMenu = (event: Event) => {
|
||||
|
||||
<template>
|
||||
<ContextMenu ref="menu" :model="menuItems" />
|
||||
<ConfirmDialog>
|
||||
<template #container="{ message, acceptCallback, rejectCallback }">
|
||||
<div
|
||||
class="flex flex-col p-8 bg-surface-0 dark:bg-surface-900 rounded"
|
||||
>
|
||||
<span class="font-bold self-center text-2xl block mb-2 mt-2">{{
|
||||
message.header
|
||||
}}</span>
|
||||
<ScrollPanel
|
||||
v-if="messageSplit(message).length > 5"
|
||||
style="width: 100%; height: 40vh"
|
||||
>
|
||||
<p v-for="m in messageSplit(message)">
|
||||
{{ m }}
|
||||
</p></ScrollPanel
|
||||
>
|
||||
<div v-else>
|
||||
<p v-for="m in messageSplit(message)">
|
||||
{{ m }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="flex self-center items-center gap-2 mt-6">
|
||||
<Button
|
||||
label="Run anyway"
|
||||
@click="acceptCallback"
|
||||
size="small"
|
||||
class="w-32"
|
||||
></Button>
|
||||
<Button
|
||||
label="Cancel"
|
||||
outlined
|
||||
size="small"
|
||||
@click="rejectCallback"
|
||||
class="w-32"
|
||||
></Button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</ConfirmDialog>
|
||||
<Button
|
||||
v-if="startStatus === 'ready'"
|
||||
v-tooltip="disabledTooltip"
|
||||
|
Reference in New Issue
Block a user