FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
TeleGhost/restore_menus.py at main · NullCoreDeveloper/TeleGhost · GitHub
This repository was archived by the owner on Aug 6, 2026. It is now read-only.
NullCoreDeveloper
/
TeleGhost
Public archive
Notifications
You must be signed in to change notification settings
Fork
1
Star
6
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
TeleGhost
/
restore_menus.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
67 lines (59 loc) · 3.75 KB
Breadcrumbs
TeleGhost
/
restore_menus.py
Copy path
File metadata and controls
67 lines (59 loc) · 3.75 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
import
os
file_path
=
'/home/nethunter/Documents/TeleGhost/frontend/src/App.svelte'
contact_menu
=
"""
<!-- Context Menu for Contacts -->
{#if contextMenu.show}
<div class="context-menu" style="top: {contextMenu.y}px; left: {contextMenu.x}px" on:click|stopPropagation>
<!-- Folder actions -->
{#if folders.length > 0}
<div class="context-header" style="padding: 8px 12px; font-size: 12px; opacity: 0.5;">ПАПКИ</div>
{#each folders as folder (folder.id)}
{#if folder.chatIds && folder.chatIds.includes(contextMenu.contact.id)}
<div class="context-item" on:click={() => { removeChatFromFolder(folder.id, contextMenu.contact.id); contextMenu.show = false; }}>
<span class="icon-svg-sm" style="display:inline-block; vertical-align:middle; margin-right:4px;">{@html Icons.X}</span> Из "{folder.name}"
</div>
{:else}
<div class="context-item" on:click={() => { addChatToFolder(folder.id, contextMenu.contact.id); contextMenu.show = false; }}>
<span class="icon-svg-sm" style="display:inline-block; vertical-align:middle; margin-right:4px;">{@html Icons.Plus}</span> В "{folder.name}"
</div>
{/if}
{/each}
<div class="divider" style="height: 1px; background: var(--border); margin: 4px 0;"></div>
{/if}
<div class="context-item" on:click={copyAddressFromMenu}>Скопировать адрес</div>
<div class="context-item" style="color: #ff6b6b;" on:click={deleteContactFromMenu}>Удалить контакт</div>
</div>
{/if}
"""
message_menu
=
"""
<!-- Context Menu for Messages/Files -->
{#if messageContextMenu.show}
<div class="context-menu" style="top: {messageContextMenu.y}px; left: {messageContextMenu.x}px" on:click|stopPropagation>
{#if messageContextMenu.imagePath}
<div class="context-item" on:click={() => copyImageToClipboard(messageContextMenu.imagePath)}>Скопировать картинку</div>
<div class="context-item" on:click={() => showInFolder(messageContextMenu.imagePath)}>Показать в папке</div>
{:else if messageContextMenu.filePath}
<div class="context-item" on:click={() => openFile(messageContextMenu.filePath)}>Открыть файл</div>
<div class="context-item" on:click={() => copyPathToClipboard(messageContextMenu.filePath)}>Скопировать путь</div>
<div class="context-item" on:click={() => showInFolder(messageContextMenu.filePath)}>Показать в папке</div>
{:else}
{#if messageContextMenu.message && !messageContextMenu.message.isOutgoing}
<!-- Incoming message options -->
<div class="context-item" on:click={() => { navigator.clipboard.writeText(messageContextMenu.message.content); messageContextMenu.show=false; }}>Скопировать текст</div>
{:else}
<!-- Outgoing message options -->
<div class="context-item" on:click={() => startEditMessage(messageContextMenu.message)}>Редактировать</div>
<div class="context-item" on:click={() => { navigator.clipboard.writeText(messageContextMenu.message.content); messageContextMenu.show=false; }}>Скопировать текст</div>
{/if}
{/if}
{#if messageContextMenu.message}
<div class="context-item" style="color: #ff6b6b;" on:click={() => deleteMsg(messageContextMenu.message)}>Удалить у себя</div>
<div class="context-item" style="color: #ff6b6b;" on:click={() => deleteMsg(messageContextMenu.message, true)}>Удалить у всех</div>
{/if}
</div>
{/if}
"""
with
open
(
file_path
,
'a'
)
as
f
:
f
.
write
(
contact_menu
)
f
.
write
(
message_menu
)
print
(
"Restored context menus."
)
Back
|
FazBrowse Home
|
New Git URL