help & support links

This commit is contained in:
Bao Nguyen
2023-02-16 17:07:46 +07:00
parent 4a97872b27
commit a860b8ad33
2 changed files with 28 additions and 12 deletions

View File

@@ -1,7 +1,7 @@
<script> <script>
import Window from '../../../lib/components/xp/Window.svelte'; import Window from '../../../lib/components/xp/Window.svelte';
import {onMount } from 'svelte'; import {onMount } from 'svelte';
import { runningPrograms, zIndex, hardDrive, selectingItems } from '../../../lib/store' import { runningPrograms, zIndex, hardDrive, selectingItems, queueProgram } from '../../../lib/store'
import {recycle_bin_id, icons} from '../../../lib/system'; import {recycle_bin_id, icons} from '../../../lib/system';
import Menu from '../../../lib/components/xp/Menu.svelte'; import Menu from '../../../lib/components/xp/Menu.svelte';
import RButton from '../../../lib/components/xp/RButton.svelte'; import RButton from '../../../lib/components/xp/RButton.svelte';
@@ -146,15 +146,18 @@
items: [ items: [
[ [
{ {
name: 'Help and Support Center' name: 'Help and Support Center',
action: () => open_link('https://docs.win32.run')
}, },
{ {
name: 'Is this copy legal?' name: 'Is this copy legal?',
action: () => open_link('https://docs.win32.run')
} }
], ],
[ [
{ {
name: 'About Windows' name: 'About Windows',
action: () => open_link('https://docs.win32.run')
} }
] ]
] ]
@@ -229,6 +232,13 @@
open(parent_id); open(parent_id);
} }
function open_link(link){
queueProgram.set({
path: './programs/internet_explorer.svelte',
fs_item: {url: link}
})
}
</script> </script>
<Window options={options} bind:this={window} on_click_close={destroy}> <Window options={options} bind:this={window} on_click_close={destroy}>

View File

@@ -93,11 +93,7 @@
name: 'Help and Support', name: 'Help and Support',
icon: '/images/xp/icons/HelpandSupport.png', icon: '/images/xp/icons/HelpandSupport.png',
path: './programs/webapp.svelte', path: './programs/webapp.svelte',
webapp: { link: 'https://docs.win32.run'
url: 'https://docs.win32.run',
icon: '/images/xp/icons/HelpandSupport.png',
name: 'Help and Support'
}
}, },
null, null,
{ {
@@ -409,15 +405,25 @@
function launch(item){ function launch(item){
console.log(item); console.log(item);
let {path, fs_item, webapp} = item; let {path, fs_item, webapp, link } = item;
if(path){ if(link){
open_link(link);
} else if(path){
queueProgram.set({ queueProgram.set({
path, path,
fs_item, fs_item,
webapp webapp
}) })
hide();
} }
hide();
}
function open_link(link){
queueProgram.set({
path: './programs/internet_explorer.svelte',
fs_item: {url: link}
})
} }
async function show_shutdown_panel(){ async function show_shutdown_panel(){