Skip to content

Commit

Permalink
first time commiting from vscode
Browse files Browse the repository at this point in the history
  • Loading branch information
KorryKatti committed Mar 13, 2024
1 parent 840bbdc commit 71ce021
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 20 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/pull_request_automation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# Automate the acceptance of pull requests and restrict editing to the original committer.

name: Pull Request Automation

on:
pull_request:
types: [opened, edited]

jobs:
accept_pull_request:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2

- name: Merge pull request
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Automated pull request acceptance
title: Automated pull request acceptance
body: This pull request has been automatically accepted.
author: korrykatti
base: main

- name: Restrict editing to original committer
uses: srt32/commits-to-pr@main
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
allow-owner: true
49 changes: 29 additions & 20 deletions index.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,14 @@ def create_labels():
with open(os.path.join(data_dir, filename), "r") as f:
app_data = json.load(f)

# Create a frame for each application data
app_frame = ctk.CTkFrame(scrollable_frame)
app_frame.pack(fill=ctk.X, padx=10, pady=5)

# Create a label for the application name
name_label = ctk.CTkLabel(scrollable_frame, text=app_data.get("name", "Unknown"))
name_label.pack()
app_name = app_data.get("app_name", "Unknown")
name_label = ctk.CTkLabel(app_frame, text=app_name)
name_label.pack(side=ctk.LEFT, padx=10, pady=5)

# Display the application icon
icon_url = app_data.get("icon_url", "")
Expand All @@ -50,36 +55,32 @@ def create_labels():
ct_image = ctk.CTkImage(light_image=icon_image, dark_image=icon_image, size=(30, 30))

# Create a label to display the image
image_label = ctk.CTkLabel(scrollable_frame, image=ct_image, text="")
image_label.pack()
image_label = ctk.CTkLabel(app_frame, image=ct_image, text="")
image_label.pack(side=ctk.LEFT, padx=10, pady=5)

# Create a button for downloading the application
download_button = ctk.CTkButton(scrollable_frame, text="Download")
download_button.pack()
download_button = ctk.CTkButton(app_frame, text="Download")
download_button.pack(side=ctk.LEFT, padx=10, pady=5)

# Create a separator line
separator = ctk.CTkLabel(scrollable_frame, text="--------------------------")
separator.pack()
separator.pack(fill=ctk.X, padx=10, pady=5)

# Create the main application window
app = ctk.CTk()
app.geometry("800x600")
app.resizable(True, True)
app.title("Thunder 🗲")

#functions for optionmenu
def quit(window):
window.destroy()

# Create a frame inside the main window for organizing widgets
frame = ctk.CTkFrame(app)
frame.pack(fill=ctk.BOTH, expand=True, padx=20, pady=20) # Pack the frame to fill the window

# Define the callback function for the optionmenu
# Define the callback function for the optionmenu
def optionmenu_callback(choice):
print("Optionmenu dropdown clicked:", choice)
if choice == "Quit":
quit(app)
elif choice == "Home":
create_labels()


# Callback Function for Libmenu
def libmenu_callback():
Expand All @@ -93,29 +94,37 @@ def commenu_callback():
def devmenu_callback():
pass

#functions for optionmenu
def quit(window):
window.destroy()

# Create a frame inside the main window for organizing widgets
frame = ctk.CTkFrame(app)
frame.pack(fill=ctk.BOTH, expand=True, padx=20, pady=20) # Pack the frame to fill the window

# Create the optionmenu widget
optionmenu = ctk.CTkOptionMenu(frame, values=["Home", "Client Update", "Quit"],
command=optionmenu_callback)
optionmenu.grid(row=0, column=1, padx=10, pady=0, sticky=ctk.W) # Align to the west (left)
optionmenu.grid(row=0, column=0, padx=10, pady=0, sticky=ctk.W) # Align to the west (left)

# Create the library menu widget
libmenu = ctk.CTkOptionMenu(frame, values=["Library", "Apps Update"],
command=libmenu_callback)
libmenu.grid(row=0, column=2, padx=10, pady=0, sticky=ctk.W) # Align to the west (left)
libmenu.grid(row=0, column=1, padx=10, pady=0, sticky=ctk.W) # Align to the west (left)

# Create the Commmunity Widget
commenu = ctk.CTkOptionMenu(frame, values=["Community", "Image Board", "Thunder Halls"],
command=commenu_callback)
commenu.grid(row=0, column=3, padx=10, pady=0, sticky=ctk.W) # Align to the west (left)
commenu.grid(row=0, column=2, padx=10, pady=0, sticky=ctk.W) # Align to the west (left)

# Create DevBlogs Widget
devmenu = ctk.CTkOptionMenu(frame,values=["Dev Blog", "Changelogs"],
command=devmenu_callback)
devmenu.grid(row=0, column=4, padx=10, pady=0, sticky=ctk.W) # Align to the west (left)
devmenu.grid(row=0, column=3, padx=10, pady=0, sticky=ctk.W) # Align to the west (left)

# Create a scrollable frame inside the existing frame to display contents
scrollable_frame = ctk.CTkScrollableFrame(frame, width=750, height=750, corner_radius=0, fg_color="transparent")
scrollable_frame.grid(row=3, column=0, columnspan=33, sticky="nsew")
scrollable_frame.grid(row=1, column=0, columnspan=4, sticky="nsew")

# Add widgets to the scrollable frame
create_labels()
Expand Down

0 comments on commit 71ce021

Please sign in to comment.