Skip to content

Commit

Permalink
Merge pull request #2 from Vasak-OS/CU-85ztrgfbt
Browse files Browse the repository at this point in the history
Cu 85ztrgfbt
  • Loading branch information
JoaquinDecima authored Nov 27, 2023
2 parents d640163 + 890d0c0 commit 6facbaf
Show file tree
Hide file tree
Showing 41 changed files with 1,002 additions and 187 deletions.
Empty file modified .eslintrc.json
100644 → 100755
Empty file.
Empty file modified .github/workflows/eslint.yml
100644 → 100755
Empty file.
Empty file modified .github/workflows/sonarcloud.yml
100644 → 100755
Empty file.
1 change: 0 additions & 1 deletion .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
*.sig

pkg/
src/

### Linux ###
*~
Expand Down
Empty file modified COPYING
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
9 changes: 9 additions & 0 deletions VSKDesktop/VSKDesktopWindow.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from Vasak.VSKWindow import VSKWindow

class VSKDesktopWindow(VSKWindow):
def __init__(self, screen_num=0):
super().__init__(screen_num)
#self.set_title("vasak-desktop")
self.set_as_desktop()
self.showFullScreen()
self.load_html("index.html")
Empty file added VSKDesktop/__init__.py
Empty file.
7 changes: 0 additions & 7 deletions css/style.css

This file was deleted.

Empty file modified icon.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified icon.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 6 additions & 9 deletions index.html
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<link href="file:///usr/lib/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
<link rel="stylesheet" href="file:///usr/lib/libvasak-ui/css/style.min.css" />
<link rel="stylesheet" href="/css/style.css" />
<link rel="stylesheet" href="./css/style.css" />
</head>

<body>
Expand All @@ -25,15 +25,12 @@
}
</script>-->
<!-- Prod -->
<script type="importmap">
{
"imports": {
"vue": "file:///usr/lib/libvasak-vue/vue.esm-browser.prod.min.js"
}
}
</script>
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
<script src="file:///usr/lib/bootstrap/js/bootstrap.min.js"></script>
<script type="module" src="/js/App.js"></script>
<script src="./js/components/clock/ClockDate.js"></script>
<script src="./js/components/clock/ClockTime.js"></script>
<script src="./js/components/ClockWidget.js"></script>
<script src="./js/App.js"></script>
</body>

</html>
51 changes: 0 additions & 51 deletions js/App.js

This file was deleted.

58 changes: 0 additions & 58 deletions js/components/ClockWidget.js

This file was deleted.

25 changes: 0 additions & 25 deletions js/components/clock/ClockDate.js

This file was deleted.

33 changes: 0 additions & 33 deletions js/components/clock/ClockTime.js

This file was deleted.

Empty file modified package.json
100644 → 100755
Empty file.
Empty file modified sonar-project.properties
100644 → 100755
Empty file.
22 changes: 22 additions & 0 deletions src/DesktopBinding.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import os
from Vasak.system.VSKIconManager import VSKIconManager
from PyQt6.QtCore import pyqtSlot, QObject

class DesktopBinding(QObject):
def __init__(self, window):
super().__init__()
self.window = window
self.iconsManager = VSKIconManager()

@pyqtSlot(str, result=str)
def getGlobalIcon(self, iconName):
return self.iconsManager.get_icon(iconName)

@pyqtSlot(result=str)
def getHome(self):
home_path = os.path.expanduser("~")

if not os.path.isabs(home_path):
home_path = os.path.join("/", home_path)

return home_path
17 changes: 17 additions & 0 deletions src/DesktopWindow.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from Vasak.VSKWindow import VSKWindow
from PyQt6.QtWidgets import QApplication
from src.DesktopBinding import DesktopBinding

class DesktopWindow(VSKWindow):
def __init__(self):
super().__init__()
self.shareObject = DesktopBinding(self)
self.channel.registerObject("vsk", self.shareObject)
self.move_to_screen() # Mover la ventana a una pantalla específica
self.set_as_desktop() # Hacer que la ventana se comporte como un dock
self.load_html("ui/dist/index.html") # Cargar un HTML en el WebView


# Mover la ventana a una pantalla específica
def move_to_screen(self):
self.setGeometry(0, 0, QApplication.primaryScreen().availableGeometry().width(), QApplication.primaryScreen().availableGeometry().height())
26 changes: 26 additions & 0 deletions ui/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

__pycache__/
3 changes: 3 additions & 0 deletions ui/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
}
18 changes: 18 additions & 0 deletions ui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Vue 3 + TypeScript + Vite

This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.

## Recommended IDE Setup

- [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).

## Type Support For `.vue` Imports in TS

TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.

If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:

1. Disable the built-in TypeScript Extension
1. Run `Extensions: Show Built-in Extensions` from VSCode's command palette
2. Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
18 changes: 18 additions & 0 deletions ui/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vasak Desktop</title>

<link href="file:///usr/lib/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
<link rel="stylesheet" href="file:///usr/lib/libvasak-ui/css/style.min.css" />
<script src="qrc:///qtwebchannel/qwebchannel.js"></script>
</head>
<body>
<div id="app"></div>
<script src="file:///usr/lib/bootstrap/js/bootstrap.min.js"></script>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
21 changes: 21 additions & 0 deletions ui/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "vasak-desktop",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vue-tsc && vite build",
"preview": "vite preview"
},
"dependencies": {
"pinia": "^2.1.7",
"vue": "^3.3.8"
},
"devDependencies": {
"@vitejs/plugin-vue": "^4.5.0",
"typescript": "^5.2.2",
"vite": "^5.0.0",
"vue-tsc": "^1.8.22"
}
}
1 change: 1 addition & 0 deletions ui/public/vite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 6facbaf

Please sign in to comment.