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>
import Window from '../../../lib/components/xp/Window.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 Menu from '../../../lib/components/xp/Menu.svelte';
import RButton from '../../../lib/components/xp/RButton.svelte';
@@ -146,15 +146,18 @@
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);
}
function open_link(link){
queueProgram.set({
path: './programs/internet_explorer.svelte',
fs_item: {url: link}
})
}
</script>
<Window options={options} bind:this={window} on_click_close={destroy}>

View File

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