diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreEntryComp.java b/app/src/main/java/io/xpipe/app/comp/store/StoreEntryComp.java index 799d2f5b..9859cd03 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreEntryComp.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreEntryComp.java @@ -17,7 +17,6 @@ import io.xpipe.app.storage.DataStorage; import io.xpipe.app.storage.DataStoreColor; import io.xpipe.app.update.XPipeDistributionType; import io.xpipe.app.util.*; -import io.xpipe.core.util.XPipeInstallation; import javafx.beans.binding.Bindings; import javafx.beans.property.SimpleStringProperty; import javafx.beans.value.ObservableDoubleValue; @@ -450,7 +449,7 @@ public abstract class StoreEntryComp extends SimpleComp { private static String getDefaultNotes() { if (DEFAULT_NOTES == null) { AppResources.with(AppResources.XPIPE_MODULE, "misc/notes_default.md", f -> { - DEFAULT_NOTES = Files.readString(f).replace("__IMAGE__", XPipeInstallation.getLocalDefaultInstallationIcon().toString()); + DEFAULT_NOTES = Files.readString(f); }); } return DEFAULT_NOTES; diff --git a/app/src/main/java/io/xpipe/app/storage/DataStoreEntry.java b/app/src/main/java/io/xpipe/app/storage/DataStoreEntry.java index 6a9e18ac..ceb51e74 100644 --- a/app/src/main/java/io/xpipe/app/storage/DataStoreEntry.java +++ b/app/src/main/java/io/xpipe/app/storage/DataStoreEntry.java @@ -22,6 +22,7 @@ import java.nio.file.Path; import java.time.Instant; import java.util.*; import java.util.stream.Collectors; +import java.util.stream.Stream; @Value public class DataStoreEntry extends StorageElement { @@ -353,7 +354,9 @@ public class DataStoreEntry extends StorageElement { @Override public Path[] getShareableFiles() { - return new Path[] {directory.resolve("store.json"), directory.resolve("entry.json")}; + var notes = directory.resolve("notes.md"); + var list = List.of(directory.resolve("store.json"), directory.resolve("entry.json"), notes); + return Stream.concat(list.stream(), Files.exists(notes) ? Stream.of(notes) : Stream.of()).toArray(Path[]::new); } public void writeDataToDisk() throws Exception { diff --git a/app/src/main/resources/io/xpipe/app/resources/misc/notes_default.md b/app/src/main/resources/io/xpipe/app/resources/misc/notes_default.md index a0ef4938..c7ea2c8d 100644 --- a/app/src/main/resources/io/xpipe/app/resources/misc/notes_default.md +++ b/app/src/main/resources/io/xpipe/app/resources/misc/notes_default.md @@ -10,17 +10,12 @@ look like: * that one * the other one -Note that --- not considering the asterisk --- the actual text -content starts at 4-columns in. - > Block quotes are > written like so. > > They can span multiple paragraphs, > if you like. -Use 3 dashes for an em-dash. Use 2 dashes for ranges (ex., "it's all -in chapters 12--14"). Three dots ... will be converted to an ellipsis. Unicode is supported. ☺ @@ -49,18 +44,6 @@ define foobar() { } ~~~ -(which makes copying & pasting easier). You can optionally mark the -delimited block for Pandoc to syntax highlight it: - -~~~python -import time -# Quick, count to ten! -for i in range(10): - # (but not *too* quick) - time.sleep(0.5) - print i -~~~ - ### An h3 header ### @@ -91,8 +74,7 @@ Now a nested list: Notice again how text always lines up on 4-space indents (including that last line which continues item 3 above). -Here's a link to [a website](http://foo.bar), to a [local -doc](local-doc.html), and to a [section heading in the current +Here's a link to [a website](http://foo.bar) and to a [section heading in the current doc](#an-h2-header). Here's a footnote [^1]. [^1]: Footnote text goes here. @@ -123,20 +105,5 @@ tomatoes Again, text is indented 4 spaces. (Put a blank line between each term/definition pair to spread things out more.) -Here's a "line block": - -| Line one -| Line too -| Line tree - -and images can be specified like so: - -![example image](__IMAGE__ "An exemplary image") - -Inline math equations go in like so: $\omega = d\phi / dt$. Display -math should get its own line and be put in in double-dollarsigns: - -$$I = \int \rho R^{2} dV$$ - And note that you can backslash-escape any punctuation characters -which you wish to be displayed literally, ex.: \`foo\`, \*bar\*, etc. \ No newline at end of file +which you wish to be displayed literally, ex.: \`foo\`, \*bar\*, etc.