Skip to content

Commit

Permalink
Merge pull request #3 from JanluOfficial/main
Browse files Browse the repository at this point in the history
VirtualPC App (via copy.sh/v86)
  • Loading branch information
MTSyntho authored Dec 11, 2024
2 parents de19227 + 33f34ab commit 53130e8
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 6 deletions.
4 changes: 2 additions & 2 deletions assets/logo_black.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions assets/logo_white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions libs/system/sdk.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ const element = {
const elementObject = {
codename,
element: elm,
attribute: (name, value) => {
elm.setAttribute(name, value);
return elementObject;
},
class: (className) => {
elm.classList.add(className);
return elementObject;
Expand Down Expand Up @@ -280,6 +284,10 @@ const element = {
elm.style.marginRight = right;
return elementObject;
},
radius: (radius) => {
elm.style.radius = radius;
return elementObject;
},
css: (string) => {
elm.style.cssText = string;
return elementObject;
Expand Down
3 changes: 2 additions & 1 deletion pkgs/apps/desktop/icons.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ function addDesktopApp(name, icon, src) {


addDesktopApp('SDK Test', 'assets/icons/exclamation.svg', 'apps:dynamic-test.js');
addDesktopApp('About AzuOS', 'assets/icons/questionmark.svg', 'apps:sysver.js');
addDesktopApp('About', 'assets/icons/questionmark.svg', 'apps:sysver.js');
addDesktopApp('VirtualPC', 'assets/icons/questionmark.svg', 'apps:virtualpc.js');

// addDesktopApp('Settings', 'assets/icons/settings.svg', 'settings/index.html');
// console.log(fetch_directory('~/Desktop'));
Expand Down
2 changes: 1 addition & 1 deletion pkgs/apps/sysver.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ element.create('div', '', 'contents').then(elm => elm
);

element.create('img', '', 'logo').then(elm => elm
.source('assets/logo.svg')
.source('assets/logo_white.svg')
.width(100)
.align('center')
.dropshadow('0px 5px 5px #000000aa')
Expand Down
22 changes: 22 additions & 0 deletions pkgs/apps/virtualpc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
win.create("VirtualPC via v86", "virtualpc").then(win => win
.setWidth(1280*0.75)
.setHeight(720*0.75)
.confirm()
);

element.create('div', '', 'v86container').then(elm => elm
.window('virtualpc')
.width("100%")
.height("100%")
.radius("12px")
.overflow("hidden")
)

element.create('iframe', '', 'v86frame').then(elm => elm
.parent('v86container')
.width("100%")
.height("100%")
.radius("12px")
.source('https://copy.sh/v86/')
.attribute('allowfullscreen', 'true')
);

0 comments on commit 53130e8

Please sign in to comment.