-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
164 lines (153 loc) · 5.08 KB
/
index.html
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<!DOCTYPE html>
<html data-theme="light" lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- Primary Meta Tags -->
<title>Nostr SpreadSheets</title>
<meta name="title" content="Nostr Spreadsheets" />
<meta name="description" content="The first Nostr-native spreadsheet" />
<!-- Favicon -->
<link rel="shortcut icon" href="img/icon.png" type="image/x-icon" />
<!-- CSS -->
<link rel="stylesheet" href="style.css" />
<!-- Lightning -->
<meta name="lightning" content="[email protected]" />
<!-- PWA -->
<meta name="theme-color" content="#ffffff" />
<link rel="apple-touch-icon" href="img/icon.png" />
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta property="og:title" content="Nostr Spreadsheets" />
<meta
property="og:description"
content="The first Nostr-native spreadsheet"
/>
<meta
property="og:image"
content="https://sheetstr.amethyst.social/img/sheetstr-card-wide.png"
/>
<!-- Replace with the URL of your larger image -->
<meta property="og:url" content="https://sheetstr.amethyst.social" />
<script src="https://unpkg.com/@univerjs/umd/lib/locale/en-US.js"></script>
<script src="https://unpkg.com/@univerjs/umd/lib/univer.full.umd.js"></script>
<link
rel="stylesheet"
href="https://unpkg.com/@univerjs/umd/lib/univer.css"
/>
<script src="https://bundle.run/[email protected]"></script>
<script src="https://bundle.run/[email protected]"></script>
<script src="https://unpkg.com/nostr-tools/lib/nostr.bundle.js"></script>
<script src="js/jquery-3.6.2.min.js"></script>
<script src="js/nostr-sign.js"></script>
<script src="js/nostr-filter.js"></script>
<script src="js/nostr-sheetstr.js"></script>
<script src="js/univer-utils.js"></script>
<script
src="https://www.unpkg.com/nostr-login@latest/dist/unpkg.js"
data-perms="sign_event:35337,nip44_encrypt,nip44_decrypt"
></script>
<script src="main.js"></script>
</head>
<body>
<div id="dashboard">
<header id="header" class="center">
<h1>Your Spreadsheets</h1>
</header>
<table class="styled-table">
<thead>
<tr>
<th style="width: 45%">Name</th>
<th>By</th>
<th>View</th>
<th>Edit</th>
<th class="right">Last Modified</th>
<th class="center">Actions</th>
</tr>
</thead>
<tbody id="sheets"></tbody>
</table>
<div style="display: inline-block">
<!--input type="text" style="float: left; margin-right: 5px;" class="cool-field" id="newName" name="newName" value="" placeholder="My cool new sheet" -->
<button
id="create-button"
onclick="document.location.href='?id=' + generateUUID(); return false;"
>
Create
</button>
</div>
<footer id="footer" class="center">
<p class="text-xs text-gray-500">
Made with <span class="text-red-500">💜</span> from Amethyst. Source
Code: <a href="https://github.com/vitorpamplona/sheetstr">GitHub</a>
</p>
</footer>
</div>
<div id="app-container">
<header id="mini-header">
<h2 id="sheet-name" onclick="toggleNameEdit(this);">
Your Spreadsheets
</h2>
<table class="simple-table">
<tr>
<td>Viewers:</td>
<td>
<span id="shares-view"></span>
</td>
<td>
<input
type="text"
style="margin-right: 3px"
class="cool-field"
id="newPubkeyView"
name="newPubkeyView"
value=""
placeholder="Add npub"
/>
<button
id="create-button"
style="margin-bottom: 1px"
onclick="addNewViewShare()"
>
Share
</button>
</td>
<td>
<input
type="checkbox"
id="public-view"
name="public-view"
onclick="toggleMakeItPublic(this.checked);"
/>
Make it public
</td>
</tr>
<tr>
<td>Editors:</td>
<td><span id="shares-edit"></span></td>
<td>
<input
type="text"
style="margin-right: 3px"
class="cool-field"
id="newPubkeyEdit"
name="newPubkeyEdit"
value=""
placeholder="Add npub"
/>
<button
id="create-button"
style="margin-bottom: 1px"
onclick="addNewEditShare()"
>
Share
</button>
</td>
<td></td>
</tr>
</table>
</header>
<div id="app"></div>
</div>
</body>
</html>