Commit e16823cd authored by Anton Palgunov's avatar Anton Palgunov

feat: Shop initial work

parent e9694e8c
......@@ -36,6 +36,40 @@
]
},
{
"name": "python3-requests",
"buildsystem": "simple",
"build-commands": [
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"requests==2.32.2\" --no-build-isolation"
],
"sources": [
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/1c/d5/c84e1a17bf61d4df64ca866a1c9a913874b4e9bdc131ec689a0ad013fb36/certifi-2024.7.4-py3-none-any.whl",
"sha256": "c198e21b1289c2ab85ee4e67bb4b4ef3ead0892059901a8d5b622f24a1101e90"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/63/09/c1bc53dab74b1816a00d8d030de5bf98f724c52c1635e07681d312f20be8/charset-normalizer-3.3.2.tar.gz",
"sha256": "f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/e5/3e/741d8c82801c347547f8a2a06aa57dbb1992be9e948df2ea0eda2c8b79e8/idna-3.7-py3-none-any.whl",
"sha256": "82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/c3/20/748e38b466e0819491f0ce6e90ebe4184966ee304fe483e2c414b0f4ef07/requests-2.32.2-py3-none-any.whl",
"sha256": "fc06670dd0ed212426dfeb94fc1b983d917c4f9847c863f313c9dfaaffb7c23c"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/ca/1c/89ffc63a9605b583d5df2be791a27bc1a42b7c32bab68d3c8f2f73a98cd4/urllib3-2.2.2-py3-none-any.whl",
"sha256": "a448b2f64d686155468037e1ace9f2d2199776e17f0a46610480d311f73e3472"
}
]
},
{
"name": "python3-docutils",
"buildsystem": "simple",
"build-commands": [
......
class Repository:
def __init__(self, name, description, url):
self.name = name
self.description = description
self.url = url
def display_info(self):
return {
"Name": self.name,
"Description": self.description,
"URL": self.url
# "source": "github",
# "repo_name": item["name"],
# "repo_full_name": item["full_name"],
# "stars": item["stargazers_count"],
# "branch": item["default_branch"],
# "description": item["description"] or "",
# "html_url": item["html_url"],
# "star_url": item["html_url"] + "/stargazers",
# "module_yaml": module_info
}
\ No newline at end of file
class GitHubService:
def __init__(self, base_url="https://api.github.com"):
self.base_url = base_url
def search_repositories(self, query):
# Logic to search repositories
pass
def fetch_repository_data(self, repo_id):
# Logic to fetch detailed repository data
pass
def parse_results(self, results):
# Logic to parse the results from the API response
pass
def download_module(self, repo):
# Download zip file from the repository
pass
\ No newline at end of file
class GitLabService:
def __init__(self, base_url="https://gitlab.com/api/v4"):
self.base_url = base_url
def search_repositories(self, query):
# Logic to search repositories
pass
def fetch_repository_data(self, repo_id):
# Logic to fetch detailed repository data
pass
def parse_results(self, results):
# Logic to parse the results from the API response
pass
def download_module(self, repo):
# Download zip file from the repository
pass
\ No newline at end of file
class PlatformService:
def __init__(self, base_url):
self.base_url = base_url
def search_repositories(self, query):
# Logic to search repositories
pass
def fetch_repository_data(self, repo_id):
# Logic to fetch detailed repository data
pass
def parse_results(self, results):
# Logic to parse the results from the API response
pass
def download_module(self, repo):
# Download zip file from the repository
pass
\ No newline at end of file
......@@ -73,7 +73,38 @@ template $TuneitWindow: Adw.ApplicationWindow {
}
Adw.ViewStackPage {
child: Box {};
child: Box {
Adw.NavigationSplitView shop_split_view {
hexpand: true;
content: Adw.NavigationPage {
Adw.ToolbarView {
[top]
Adw.HeaderBar shop_content_bar {
decoration-layout: "";
visible: false;
}
Stack shop_pagestack {}
}
};
sidebar: Adw.NavigationPage {
Adw.ClampScrollable {
margin-bottom: 8;
margin-end: 8;
margin-start: 8;
margin-top: 8;
ListBox shop_listbox {
styles [
"navigation-sidebar",
]
}
}
};
}
};
icon-name: "system-software-install-symbolic";
name: "shop";
title: _("Shop");
......
......@@ -20,6 +20,7 @@
from gi.repository import Adw, Gtk
from .settings import init_settings_stack
from .shop import init_shop_stack
@Gtk.Template(resource_path='/ru/ximperlinux/TuteIt/window.ui')
class TuneitWindow(Adw.ApplicationWindow):
......@@ -28,8 +29,14 @@ class TuneitWindow(Adw.ApplicationWindow):
settings_pagestack = Gtk.Template.Child()
settings_listbox = Gtk.Template.Child()
settings_split_view = Gtk.Template.Child()
shop_pagestack = Gtk.Template.Child()
shop_listbox = Gtk.Template.Child()
shop_split_view = Gtk.Template.Child()
def __init__(self, **kwargs):
super().__init__(**kwargs)
init_settings_stack(self.settings_pagestack, self.settings_listbox, self.settings_split_view)
init_shop_stack(self.shop_pagestack, self.shop_listbox, self.shop_split_view)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment