+ Links for ${input.file.name}
+
+
+ Below are links and copy-pastable syntax for sharing the file. They can be used for linking to it
+ in your stories and wiki pages.
+
+
+
+ This is the link to the actual file on the CDN, not a share of it. You must delete the file if you want
+ to un-share it.
+
+
+
+
+ Images uploaded here cannot be inlined on the wiki. For that you have to upload it there.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/marko/page/data/components/link-file-modal/style.less b/marko/page/data/components/link-file-modal/style.less
new file mode 100644
index 0000000..33736c6
--- /dev/null
+++ b/marko/page/data/components/link-file-modal/style.less
@@ -0,0 +1,19 @@
+div.link-file-modal {
+ user-select: text;
+
+ p {
+ user-select: text;
+ cursor: text;
+ }
+
+ img {
+ margin: 0;
+ padding: 0;
+ margin-top: 0.25em;
+ width: 100%;
+ }
+
+ input {
+ user-select: all !important;
+ }
+}
\ No newline at end of file
diff --git a/marko/page/data/components/remove-file-modal/component.js b/marko/page/data/components/remove-file-modal/component.js
new file mode 100644
index 0000000..20036ec
--- /dev/null
+++ b/marko/page/data/components/remove-file-modal/component.js
@@ -0,0 +1,51 @@
+const {fileApi} = require("../../../../../rpdata/api/File")
+
+module.exports = class {
+ onCreate(input) {
+ this.state = {
+ error: null,
+ loading: false,
+ values: {
+ id: "",
+ }
+ }
+ }
+
+ onInput(input) {
+ this.state.values = {
+ id: input.file.id,
+ }
+ }
+
+ change(key, ev) {
+ this.state.values = Object.assign({}, this.state.values, {[key]: ev.target.value})
+ }
+
+ open() {
+
+ }
+
+ close() {
+ this.emit("close")
+ }
+
+ doIt() {
+ if (this.state.loading) {
+ return
+ }
+
+ const input = Object.assign({}, this.state.values)
+
+ this.state.loading = true
+ fileApi.removeFile(input).then((res) => {
+ this.emit("removed", res)
+ this.emit("close")
+ }).catch(errs => {
+ console.warn("Failed to add:", errs)
+
+ this.state.error = "Failed to add: " + JSON.stringify(errs)
+ }).then(() => {
+ this.state.loading = false
+ })
+ }
+}
\ No newline at end of file
diff --git a/marko/page/data/components/remove-file-modal/index.marko b/marko/page/data/components/remove-file-modal/index.marko
new file mode 100644
index 0000000..577cf9a
--- /dev/null
+++ b/marko/page/data/components/remove-file-modal/index.marko
@@ -0,0 +1,11 @@
+
+ Delete File ${input.file.name}
+
+ ${state.error}
+
+
+ It might take up to an hour for it to be removed from CDN caches if it's been recently loaded.
+
+
+
+
\ No newline at end of file
diff --git a/marko/page/data/files.marko b/marko/page/data/files.marko
new file mode 100644
index 0000000..38870b3
--- /dev/null
+++ b/marko/page/data/files.marko
@@ -0,0 +1,6 @@
+