fix: begin fixing linux support

This commit is contained in:
2025-04-23 17:17:59 +02:00
parent f26d83f291
commit bf4c06ee2d
13 changed files with 135 additions and 30 deletions

View File

@ -99,18 +99,21 @@ const createShortcut = async () => {
}
};
const hasShortcut = ref(false);
(async () => {
hasShortcut.value = (
(await invoke('list_platform_capabilities')) as string[]
).includes('shortcut');
})();
const menuItems = computed(() => {
const base = [
let base = [
{
label: t('start.button.unchecked'),
icon: 'pi pi-exclamation-circle',
command: async () => await startline(true, false),
},
{
label: t('start.button.shortcut'),
icon: 'pi pi-link',
command: createShortcut,
},
{
label: t('start.button.help'),
icon: 'pi pi-question-circle',
@ -123,6 +126,16 @@ const menuItems = computed(() => {
if (prf.current === null) {
return [];
}
if (hasShortcut.value === true) {
base = [
...base,
{
label: t('start.button.shortcut'),
icon: 'pi pi-link',
command: createShortcut,
},
];
}
if (prf.current.meta.game === 'chunithm') {
return base;
}
@ -181,7 +194,9 @@ const tryStart = () => {
}
"
/>
<ContextMenu ref="menu" :model="menuItems" />
<Lazy>
<ContextMenu ref="menu" :model="menuItems" />
</Lazy>
<Button
v-if="startStatus === 'ready'"
v-tooltip="disabledTooltip"