-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
176 lines (166 loc) · 10.4 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Windows 11</title>
<link rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" href="static/css/mini.css">
<link rel="stylesheet" href="static/css/style.css">
<script src="static/js/petite.js"></script>
<script src="static/js/axios.min.js"></script>
<script src="static/js/draggabilly.js"></script>
<script src="static/js/dragula.js"></script>
<script type="module" src="static/js/main.js"></script>
</head>
<body onload="init()">
<div id="windows11">
<div id="desktop" @click="os.desktop.toggle" class="selectable p-3"
@contextmenu="os.desktop.openContextMenu($event)">
<div class="desktop-icon d-flex flex-col text-center p-2" v-for="item in os.desktop.getItems()"
@dblclick="os.desktop.handleAppDblClick(item)"
@contextmenu="os.desktop.openIconContextMenu($event, item)">
<img :src="'static/'+item.icon" :alt="item.name">
<small>{{item.name}}</small>
</div>
</div>
<main id="workspaces" v-if="os.workspaces.show" class="pointer-events-none">
<div class="workspace pointer-events-none" v-for="workspace in os.workspaces.all">
<div class="application" v-for="(application, app_index) in os.workspaces.getApps(workspace)"
:class="{'hide': application.minimized, 'active': workspace.activeApp == application.name}"
@click="os.workspaces.handleAppSingleClick(application, workspace)"
@drag="os.workspaces.handleAppDrag(application, workspace)"
:style="{'width': application.window.size.w, 'height': application.window.size.h, 'left': application.window.position.x, 'top': application.window.position.y}">
<div class="application__title-bar ps-1">
<div class="d-flex align-content-center">
<img :src="'static/'+application.icon" alt="" class="icn icn-small px-1">
<strong class="application__title-bar__title">{{ application.name }}</strong>
</div>
<div class="application__window-toggler">
<div class="application__window-toggler-btn application__window-toggler__minimize"
@click="os.workspaces.handleAppMinimize(application, workspace)"><span>--</span>
</div>
<div class="application__window-toggler-btn application__window-toggler__maximize"
@click="application.maximized = !application.maximized"><span></span></div>
<!-- TODO: do here -->
<div class="application__window-toggler-btn application__window-toggler__close"
@click="os.workspaces.handleAppClose(application, workspace)">X</div>
</div>
</div>
<div class="application__window">
<p>{{ application.data.content }} {{ workspace.activeApp }} {{ app_index }}</p>
<strong>{{ os.workspaces.getActiveWorkspace().activeApp }}</strong>
<strong>{{ application.name }}</strong>
</div>
</div>
</div>
</main>
<div id="menu-right" :class="{'active':os.activity.focusedId==2 || os.activity.focusedId==3}"
class="shadow user-select-none">
<section id="system-tray" v-if="os.activity.focusedId==2">
<div class="container">
<div v-for="item in os.layout.menu.systemTray.items" class="system-tray__item"
:class="{'active': item.active}"
@click="{item.name != 'Airplane mode' ? item.active= !item.active : os.toggleAirplane()}">
<div>
<img :src="'static/'+item.icon" class="icn icn-lg" :alt="item.name">
</div>
<div>
<small v-html="item.name"></small>
</div>
</div>
</div>
<div class="container-fluid p-2">
<div class="d-flex">
<img src="static/svg/volume-up-solid.svg" class="icn icn-lg" alt="volume">
<input type="range" class="sliders" name="volume-slider" v-model="os.media.sound.volume"><b
v-html="os.media.sound.volume"> </b>
<!-- <b>></b> -->
</div>
<div class="d-flex">
<img src="static/svg/sun-solid.svg" class="icn icn-lg" alt="brighness">
<input type="range" class="sliders" name="brightness-slider" v-model="os.layout.brighness"
id="brightness-slider"><b v-html="os.layout.brighness"></b>
</div>
</div>
</section>
<section id="calender" v-if="os.activity.focusedId==3">
<span>1</span>
<span>2</span>
<span>3</span>
<span>4</span>
</section>
</div>
<div id="main-menu" class="d-flex flex-col user-select-none center-pop shadow p-3"
:class="{'hide-y': os.activity.focusedId==1}">
<div id="runner" class="b-primary">
<label for="runner__search">🔍️</label>
<input type="text" class="fluid b-none" name="search" v-model="os.runner.value" id="runner__search">
</div>
<div class="main-menu__container mt-3">
<div class="main-menu__searched-apps" v-if="os.runner.value.length >= 1">
<strong>Search Result: </strong>
<div class="apps d-flex flex-wrap">
<div class="app d-flex flex-col" v-for="app in os.runner.searchedApps()" :key="app.name">
<img :src="'static/' + app.icon" :alt="app.name">
<small class="text-center">{{app.name}}</small>
</div>
</div>
</div>
<div class="main-menu__pinned-apps" v-else>
<strong>Pinned</strong>
<div class="apps d-flex flex-wrap">
<div class="app d-flex flex-col" v-for="app in os.runner.pinnedApps()" :key="app.name">
<img :src="'static/' + app.icon" :alt="app.name">
<small class="text-center">{{app.name}}</small>
</div>
</div>
</div>
</div>
</div>
<div id="taskbar" :class="{'hide':!os.taskbar.show}" class="user-select-none">
<div id="taskbar__appbar" class="center-x d-flex">
<img @click="os.layout.menu.mainMenu.toggle" src="static/svg/windows.svg" class="win-btn icn-2x p-1"
alt="togglable menu">
<div class="d-flex dragula-sort">
<div class="app p-1" v-for="(app, app_index) in os.taskbar.getPinnedApps()"
:class="{'active':os.workspaces.getActiveWorkspace().activeApp === app.name, 'running':(app.running && app.running.indexOf(os.workspaces.active) != -1)}"
:index="app.pinned" @click="os.taskbar.handleAppSingleClick(app)">
<img :src="'static/'+app.icon" class="win-btn icn-2x" alt="togglable menu">
</div>
</div>
</div>
<div id="taskbar__right">
<img src="static/svg/angle-up-solid.svg" class="win-btn icn me-1" alt="togglable menu">
<img v-if="os.layout.menu.systemTray.items[0].active" src="static/svg/wifi-solid.svg"
class="win-btn icn icn-lg me-1" alt="wifi">
<img v-if="os.layout.menu.systemTray.items[1].active" src="static/svg/bluetooth-b.svg"
class="win-btn icn icn-lg me-1" alt="bluetooth">
<img src="static/svg/battery-half-solid.svg" class="win-btn icn icn-lg me-1" alt="battery">
<b @click="os.layout.menu.calender.toggle" class="win-btn"><small class="datetime"></small></b>
<b @click="os.layout.menu.systemTray.toggle"><i class="icn icn-ethernet win-btn"></i></b>
<!-- <b @click="os.layout.menu.menuRight=0">hide tray</b> -->
</div>
<div id="taskbar__show-desktop" class="win-btn" @click="os.workspaces.show = !os.workspaces.show">
</div>
</div>
<div id="brightoverlay" :style="{opacity: 1 - os.layout.brighness/100.0}"></div>
<div :class="{'hide': !os.desktop.contextMenu.show}" id="comp__desktopContextMenu" class="context-menu">
<div class="d-flex flex-col">
<span>working on this...</span>
</div>
</div>
<div :class="{'hide': !os.desktop.appContextMenu.show}" id="comp__desktopIconContextMenu"
class="context-menu">
<div class="d-flex flex-col">
<span
@click="os.desktop.handleAppDblClick(os.desktop.appContextMenu.app); os.desktop.appContextMenu.show = false">Open</span>
<span
@click="os.desktop.appContextMenu.app.desktop = false; os.desktop.appContextMenu.show = false">Delete</span>
</div>
</div>
</div>
<script src="static/js/helper.js"></script>
</body>
</html>