File size: 3,704 Bytes
8b7724e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
class FileBrowser extends HTMLElement {
  connectedCallback() {
    this.attachShadow({ mode: 'open' });
    this.shadowRoot.innerHTML = `
      <style>
        .file-browser {
          background: rgba(15, 10, 31, 0.7);
          border: 1px solid rgba(110, 64, 201, 0.3);
          border-radius: 0.5rem;
          padding: 1.5rem;
          font-family: 'JetBrains Mono', monospace;
          color: rgba(255, 255, 255, 0.8);
          box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
          backdrop-filter: blur(5px);
          max-height: 400px;
          overflow-y: auto;
        }
        .browser-header {
          display: flex;
          justify-content: space-between;
          margin-bottom: 1rem;
          padding-bottom: 0.5rem;
          border-bottom: 1px solid rgba(110, 64, 201, 0.2);
        }
        .browser-title {
          font-weight: bold;
          color: #6e40c9;
        }
        .refresh-btn {
          background: rgba(110, 64, 201, 0.2);
          color: #6e40c9;
          border: none;
          padding: 0.25rem 0.5rem;
          border-radius: 0.25rem;
          cursor: pointer;
          font-size: 0.8rem;
        }
        .file-list {
          list-style: none;
          padding: 0;
          margin: 0;
        }
        .file-item {
          padding: 0.5rem;
          border-radius: 0.25rem;
          display: flex;
          align-items: center;
          gap: 0.5rem;
          margin-bottom: 0.25rem;
        }
        .file-item:hover {
          background: rgba(110, 64, 201, 0.1);
        }
        .file-icon {
          color: #6e40c9;
        }
        .file-name {
          flex-grow: 1;
        }
        .file-path {
          font-size: 0.8rem;
          color: rgba(255, 255, 255, 0.5);
        }
        .download-btn {
          background: transparent;
          border: none;
          color: #6e40c9;
          cursor: pointer;
        }
      </style>
      <div class="file-browser">
        <div class="browser-header">
          <div class="browser-title">File Browser</div>
          <button class="refresh-btn">
            <i data-feather="refresh-cw"></i> Refresh
          </button>
        </div>
        <ul class="file-list">
          <li class="file-item">
            <i data-feather="file-text" class="file-icon"></i>
            <div class="file-name">telegram_session</div>
            <div class="file-path">/home/user/.telegram/tdata</div>
            <button class="download-btn">
              <i data-feather="download"></i>
            </button>
          </li>
          <li class="file-item">
            <i data-feather="file-text" class="file-icon"></i>
            <div class="file-name">discord_tokens</div>
            <div class="file-path">/home/user/.config/discord/Local Storage</div>
            <button class="download-btn">
              <i data-feather="download"></i>
            </button>
          </li>
          <li class="file-item">
            <i data-feather="folder" class="file-icon"></i>
            <div class="file-name">tdata</div>
            <div class="file-path">/home/user/.TelegramDesktop/tdata</div>
            <button class="download-btn">
              <i data-feather="download"></i>
            </button>
          </li>
          <li class="file-item">
            <i data-feather="key" class="file-icon"></i>
            <div class="file-name">discord_token.txt</div>
            <div class="file-path">/home/user/.config/discord/tokens</div>
            <button class="download-btn">
              <i data-feather="download"></i>
            </button>
          </li>
        </ul>
      </div>
    `;
  }
}
customElements.define('file-browser', FileBrowser);