This repository was archived by the owner on Dec 5, 2019. It is now read-only.
forked from jeff-zucker/solid-content-manager
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
189 lines (175 loc) · 6.86 KB
/
index.html
File metadata and controls
189 lines (175 loc) · 6.86 KB
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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<!DOCTYPE html><html><head><meta charset="UTF-8" /><meta name="viewport" content="width=device-width"><title>
Solside - a simple IDE and file manager for Solid Data Stores
</title>
<!--
libraries from remote CDN
rdflib,solid-auth-client,solid-file-client,vue,ace
local files
solside, zeditor
-->
<script src="https://cdn.jsdelivr.net/npm/solid-file-client@0.5.1/dist/browser/solid-file-client.bundle.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.1/ace.js"></script>
<script src="./solid-ide-solidHandler.js"></script>
<script src="./solid-ide-editor.js"></script>
<link rel="stylesheet" href="./assets/main.css">
</head>
<body>
<div id="app">
<div id="opt" class="topRow table" v-bind:class="fontSize"><span class="tr">
<span class="td left">
<input type="text" v-model="currentThing.url">
<button v-on:click="get(currentThing.url)">go</button>
</span>
<span class="td right">
<label for="viewSelect">view: </label>
<select id="viewSelect" v-model="fileDisplay.displayState" @change="fileDisplay.togglePanes($event)">
<option value="both">editor + data</option>
<option value="edOnly">editor only</option>
<option value="dataOnly">data only</option>
</select>
<button id="saveEdits" v-on:click="fileDisplay.saveEdits()">
save edits
</button>
<button id="editDisabled">save edits</button>
<button id="optionsButton" v-on:click="view.show('optionsManager')">
options
</button>
</span>
</span>
</div><!-- opt -->
<div id="folderMenu" v-bind:class="fontSize">
<button v-on:click="manageResource(folder)" class="docIcon" v-bind:class="canControl()">
<img src="./assets/folder.png">
</button>
<button class="fileName" v-on:click="get(folder)">
<span id="currentFolder">{{folder.name}}</span>
</button>
<hr>
<ul>
<li v-for="subFolder in folder.folders">
<button class="docIcon">
<img src="./assets/folder.png" />
</button>
<button class="fileName" v-on:click="get(subFolder)">
{{subFolder.name}}
</button>
</li>
</ul>
<hr>
<ul>
<li v-for="f in folder.files">
<button v-on:click="rm(f)" class="docIcon" v-bind:class="canControl()">
<img src="./assets/document.png">
</button>
<button class="fileName" v-on:click.right="download(f)" v-on:click="get(f)" v-bind:title="f.label+' '+f.type">
{{f.label}}
</button>
</li>
</ul>
</div><!-- folderMenu -->
<div id="fileManager" class="formArea">
<div class="cancel-icon">
<button v-on:click="view.hide('fileManager')"
class="xIcon" title="Cancel"> X
</button>
</div>
<div>File : <em>{{file.url}}</em></div>
<hr>
<button v-on:click="rm(file)">Delete file</button>
<hr>
<div>
<label>new folder :</label>
<input v-model="newThing.parentFolder"
placeholder=" (optional) path relative to original file"
/>
</div>
<div>
<label>new name :</label>
<input v-model="newThing.name"
placeholder=" name without path or extension"
/>
</div>
<p class="right-justify">
<button v-on:click="cpFile()">Copy file</button>
</p>
<hr>
</div><!-- fileManager -->
<div id="folderManager" class="formArea">
<div class="cancel-icon">
<button v-on:click="view.hide('folderManager')"
class="xIcon" title="Cancel"> X </button>
</div>
<div>Folder : <em>{{folder.url}}</em></div>
<hr>
<button v-on:click="rm(folder)">delete this folder</button>
<hr>
<div>
<label>new name</label>
<input v-model="newThing.name" placeholder=" (without path)">
</div>
<p class="right-justify"><button v-on:click="addThing('file')">create new file in this folder</button></p>
<p class="right-justify"><button v-on:click="addThing('folder')">create new folder in this folder</button></p>
<hr><hr>
<label>upload file(s) in this folder</label>
<input type="file" id="upFile" name="upFile" multiple size="100" v-on:change="upload(folder)">
</div><!-- folderManager -->
<div id="optionsManager" class="formArea">
<div class="cancel-icon">
<button v-on:click="view.hide('optionsManager')"
class="xIcon" title="Cancel"> X
</button>
</div>
<div class="table">
<div class="tr">
<span class="td">logged in as</span>
<span class="td left">
{{webId}}
<button v-on:click="setLogState()">{{logState}}</button>
<button id="profileButton" v-on:click="getProfile()">edit profile</button>
</span>
</div>
<div class="tr">
<span class="td">home URL</span>
<span class="td"><input v-model="homeUrl">
<button v-on:click="get(homeUrl)">go home</button>
</span>
</div>
</div><!-- table -->
<div class="table"><div class="tr center">
<span class="td">
<div>Key Bindings</div>
<select v-model="editKeys" v-on:change="setEditKeys()" size="2">
<option>emacs</option>
<option>vim</option>
</select>
</span>
<span class="td">
<div>Syntax Highlighting</div>
<select v-model="editTheme" v-on:change="setEditTheme()" size="2">
<option>light theme</option>
<option>dark theme</option>
</select>
</span>
</div></div>
<hr>
<button v-on:click="storePrefs()">save preferences</button>
<a type="button" target="_blank" href="mailto:dubzed@gmail.com">send feedback</a>
</div><!-- optionsManager -->
</div><!-- app -->
<!--
FILE DISPLAY & EDITOR & DATA-BROWSER
-->
<div id="fileDisplay" class="rightCol flex-item" v-bind:class="displayState">
<div id="embedDataBrowser">
<iframe id="dataBrowser" v-bind:src="file.srcUrl">
</iframe>
</div>
<div id="editorContainer">
<div id="editor" style="font-family: Monaco, monospace !important">
</div>
</div>
</div><!-- fileDisplay -->
<script src="./solid-ide.js"></script>
</body>
</html>