Skip to content

Commit c4f1eff

Browse files
committed
adds external apps: Github, Ask Tars
1 parent 9e349d5 commit c4f1eff

File tree

10 files changed

+82
-11
lines changed

10 files changed

+82
-11
lines changed

apps.config.js

+21
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,27 @@ const apps = [
9090
desktop_shortcut: true,
9191
screen: displayGedit,
9292
},
93+
{
94+
id: "github",
95+
title: "GitHub",
96+
icon: './themes/Yaru/apps/github.png',
97+
disabled: false,
98+
favourite: false,
99+
desktop_shortcut: true,
100+
isExternalApp: true,
101+
url: "https://github.com/vivek9patel",
102+
screen: () => {},
103+
},
104+
{
105+
id: "tars",
106+
title: "Ask Tars",
107+
icon: './themes/Yaru/apps/tars.svg',
108+
disabled: false,
109+
favourite: false,
110+
desktop_shortcut: true,
111+
isExternalApp: true,
112+
url: "https://www.vivek9patel.com/tars"
113+
},
93114
]
94115

95116
export default apps;

components/apps/vivek.js

+3-6
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ function Education() {
153153
<div className="text-sm text-gray-300 font-bold mt-1">GPA &nbsp; 4.0/4.0</div>
154154
</li>
155155
<li className="list-disc">
156-
<div className=" text-lg md:text-xl text-left font-bold leading-tight">
156+
<div className=" text-lg md:text-xl mt-4 text-left font-bold leading-tight">
157157
Pandit Deendayal Energy University - PDEU
158158
</div>
159159
<div className=" text-sm text-gray-400 mt-0.5">2018 - 2022</div>
@@ -162,7 +162,7 @@ function Education() {
162162
</li>
163163
<li className="list-disc mt-5">
164164
<div className=" text-lg md:text-xl text-left font-bold leading-tight">
165-
Class 12<sup>th</sup> (GSEB)
165+
Class 12<sup>th</sup>
166166
</div>
167167
<div className=" text-sm text-gray-400 mt-0.5">2016 - 2018</div>
168168
<div className=" text-sm md:text-base">Maths, Physics, Chemistry</div>
@@ -379,10 +379,7 @@ function Projects() {
379379
{
380380
(project.domains ?
381381
project.domains.map((domain, index) => {
382-
const borderColorClass = `border-${tag_colors[domain]}`
383-
const textColorClass = `text-${tag_colors[domain]}`
384-
385-
return <span key={index} className={`px-1.5 py-0.5 w-max border ${borderColorClass} ${textColorClass} m-1 rounded-full`}>{domain}</span>
382+
return <span key={index} className={`px-1.5 py-0.5 w-max border border-${tag_colors[domain]} text-${tag_colors[domain]} m-1 rounded-full`}>{domain}</span>
386383
})
387384

388385
: null)

components/base/ubuntu_app.js

+16-4
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,32 @@ import React, { Component } from 'react'
33
export class UbuntuApp extends Component {
44

55
openApp = () => {
6-
this.props.openApp(this.props.id);
6+
if (this.props.isExternalApp && this.props.url) {
7+
window.open(this.props.url, "_blank");
8+
} else {
9+
this.props.openApp(this.props.id);
10+
}
711
}
812

913
render() {
1014
return (
1115
<div
12-
className="p-1 m-px z-10 bg-white bg-opacity-0 hover:bg-opacity-20 focus:bg-ub-orange focus:bg-opacity-50 focus:border-yellow-700 focus:border-opacity-100 border border-transparent outline-none rounded select-none w-24 h-20 flex flex-col justify-start items-center text-center text-xs font-normal text-white "
16+
className="p-1 m-px z-10 bg-white bg-opacity-0 hover:bg-opacity-20 focus:bg-ub-orange focus:bg-opacity-50 focus:border-yellow-700 focus:border-opacity-100 border border-transparent outline-none rounded select-none w-24 h-20 flex flex-col justify-start items-center text-center text-xs font-normal text-white relative"
1317
id={"app-" + this.props.id}
1418
onDoubleClick={this.openApp}
1519
tabIndex={0}
1620
>
17-
<img width="40px" height="40px" className="mb-1 w-10" src={this.props.icon} alt={"Ubuntu " + this.props.name} />
21+
<div className="relative">
22+
<img width="40px" height="40px" className="mb-1 w-10" src={this.props.icon} alt={"Ubuntu " + this.props.name} />
23+
{this.props.isExternalApp && (
24+
<img
25+
src="./themes/Yaru/status/arrow-up-right.svg"
26+
alt="External Link"
27+
className="w-2.5 h-2.5 absolute -bottom-0.5 -right-0.5"
28+
/>
29+
)}
30+
</div>
1831
{this.props.name}
19-
2032
</div>
2133
)
2234
}

components/base/window.js

+1
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ export class WindowMainScreen extends Component {
283283
}
284284
}
285285
componentDidMount() {
286+
console.log("here", this.props.screen);
286287
setTimeout(() => {
287288
this.setState({ setDarkBg: true });
288289
}, 3000);

components/screen/desktop.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,9 @@ export class Desktop extends Component {
240240
name: app.title,
241241
id: app.id,
242242
icon: app.icon,
243-
openApp: this.openApp
243+
openApp: this.openApp,
244+
isExternalApp: app.isExternalApp,
245+
url: app.url
244246
}
245247

246248
appsJsx.push(

public/files/Vivek-Patel-Resume.pdf

27.9 KB
Binary file not shown.

public/themes/Yaru/apps/github.png

1.01 KB
Loading

public/themes/Yaru/apps/tars.svg

+31
Loading
Loading
Loading

0 commit comments

Comments
 (0)