Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions config-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,8 @@ development_instance: true
host_ip: 0.0.0.0
host_port: 5000

# Guesslang service URL
guesslangUrl: http://ip:port/guess
Comment on lines +24 to +25

Copilot AI Mar 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The config example uses the key guesslangUrl (camelCase) for the language detection URL, but the config parsing code in config.d prefers the snake_case key language_detection_url and only falls back to guesslangUrl. This inconsistency means the example config is documenting the fallback (legacy) key rather than the preferred new key. The example should be updated to use language_detection_url to match the new preferred config key, or at a minimum show both options with a note about which is preferred.

Suggested change
# Guesslang service URL
guesslangUrl: http://ip:port/guess
# Language detection / Guesslang service URL
# Preferred key: language_detection_url (legacy fallback: guesslangUrl)
language_detection_url: http://ip:port/guess

Copilot uses AI. Check for mistakes.

# mongo connection string
mongo_connection: root:root@db.docker.local
7 changes: 6 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ services:
links:
- db:db.docker.local
ports:
- 5000:5000
- 5000

Copilot AI Mar 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docker-compose.yml previously exposed port 5000 on the host (5000:5000), making the app accessible from outside the container. Changing this to just 5000 exposes only the container port without host mapping, meaning the app will no longer be reachable from the host machine. This is a breaking change for anyone using docker-compose for local development. If the intention is to not expose the port externally (e.g., behind a reverse proxy), this should be documented, since the example config and setup docs may assume direct port access.

Suggested change
- 5000
- "5000:5000"

Copilot uses AI. Check for mistakes.
volumes:
- .:/app

volumes:
db-data:
driver: local
Comment on lines +26 to +28

Copilot AI Mar 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The db-data volume is now declared as a named volume in docker-compose.yml, but the db service still mounts ./db-data:/data/db as a bind mount (a host directory). The named volume declaration and the bind mount are incompatible — the named volume db-data is never used by any service. If the intent was to switch from a bind mount to a managed named Docker volume, the db service's volumes entry should be changed from ./db-data:/data/db to db-data:/data/db. As-is, the volume declaration is unused.

Copilot uses AI. Check for mistakes.

Binary file not shown.
3 changes: 2 additions & 1 deletion public/scripts/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { getWordwrap, getFullwidth } from "./helpers/options.js";

if (localStorage.getItem("theme") === null)
{
{
// Here to change default
localStorage.setItem("theme", "myst");
}
else
Expand Down
2 changes: 1 addition & 1 deletion public/style/components/addEditorButton.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
background-color: var(--color-mystge);
display: flex;
flex-direction: row;
margin-top: 20px;
margin-top: 25px;
border-radius: var(--border-radius);
padding: 0.35rem 1rem;
padding-top: 0.5rem;
Expand Down
2 changes: 1 addition & 1 deletion public/style/components/footer.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ footer
{
background-color: var(--color-nanolight);
border-radius: var(--border-radius);
margin-top: 20px;
margin-top: 10px;
margin-bottom: 20px;
padding: 0.5rem 1rem;
display: flex;
Expand Down
30 changes: 30 additions & 0 deletions public/style/fonts.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,33 @@
font-style: italic;
font-display: swap;
}

@font-face {
font-family: fusion-pixel;
src: url('../assets/fonts/fusion-pixel-10px-monospaced-zh_hant.woff2');
font-weight: normal;
font-display: swap;
}

@font-face {
font-family: fusion-pixel;
src: url('../assets/fonts/fusion-pixel-10px-monospaced-zh_hant-bold.woff2');
font-weight: bold;
font-display: swap;
}

@font-face {
font-family: fusion-pixel;
src: url('../assets/fonts/fusion-pixel-10px-monospaced-zh_hant-italic.woff2');
font-weight: normal;
font-style: italic;
font-display: swap;
}

@font-face {
font-family: fusion-pixel;
src: url('../assets/fonts/fusion-pixel-10px-monospaced-zh_hant-bold-italic.woff2');
font-weight: bold;
font-style: italic;
font-display: swap;
}
Comment on lines +42 to +63

Copilot AI Mar 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Three of the four fusion-pixel font files referenced in fonts.css do not exist in the public/assets/fonts/ directory. Only fusion-pixel-10px-monospaced-zh_hant.woff2 is present; the bold (-bold.woff2), italic (-italic.woff2), and bold-italic (-bold-italic.woff2) variants are missing. This will cause font loading failures for bold and italic text when using the bit-fury theme.

Copilot uses AI. Check for mistakes.
50 changes: 50 additions & 0 deletions public/style/libs/codemirror-bit-fury.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@

/**
Name: bit-fury
Deep gray background with blue accents
*/

.cm-s-bit-fury span.cm-meta { color: #da7b69; }
.cm-s-bit-fury span.cm-number { color: #aaeac1e6; }

Copilot AI Mar 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The color value #aaeac1e6 is an 8-digit hex color code (with alpha channel), which is inconsistent with the rest of the theme files in this codebase (all using 6-digit hex colors). Same issue exists in codemirror-fury.css.

Suggested change
.cm-s-bit-fury span.cm-number { color: #aaeac1e6; }
.cm-s-bit-fury span.cm-number { color: #AAEAC1; }

Copilot uses AI. Check for mistakes.
.cm-s-bit-fury span.cm-keyword { color: #348CD6; line-height: 1em; font-weight: normal; }
.cm-s-bit-fury span.cm-def { color: #77d08b; font-style: italic; }
.cm-s-bit-fury span.cm-variable { color: #cec990; }
.cm-s-bit-fury span.cm-variable-2 { color: #A9B7C6; }
.cm-s-bit-fury span.cm-variable-3 { color: #9876AA; }
.cm-s-bit-fury span.cm-type { color: #348CD6; font-weight: normal; }
.cm-s-bit-fury span.cm-property { color: #9CD0CB; }
.cm-s-bit-fury span.cm-operator { color: #cad6d6; }
.cm-s-bit-fury span.cm-string { color: #CE9178; }
.cm-s-bit-fury span.cm-string-2 { color: #CE9178; }
.cm-s-bit-fury span.cm-comment { color: #41922d; font-style: italic; }
.cm-s-bit-fury span.cm-link { color: #CE9178; }
.cm-s-bit-fury span.cm-atom { color: #CE9178; }
.cm-s-bit-fury span.cm-error { color: #BC3F3C; }
.cm-s-bit-fury span.cm-tag { color: #348CD6; font-weight: normal; font-style: normal; }
.cm-s-bit-fury span.cm-attribute { color: #6897bb; }
.cm-s-bit-fury span.cm-qualifier { color: #D7BA7D; }
.cm-s-bit-fury span.cm-bracket { color: #798080; }
.cm-s-bit-fury span.cm-builtin { color: #FF9E59; }
.cm-s-bit-fury span.cm-special { color: #FF9E59; }
.cm-s-bit-fury span.cm-matchhighlight { color: #FFFFFF; background-color: rgba(50, 89, 48, .7); font-weight: normal;}
.cm-s-bit-fury span.cm-searching { color: #FFFFFF; background-color: rgba(61, 115, 59, .7); font-weight: normal;}
.cm-s-bit-fury .CodeMirror-cursor { border-left: 1px solid #d3dae2; }
.cm-s-bit-fury .CodeMirror-activeline-background { background: #323232; }
.cm-s-bit-fury .CodeMirror-gutters { border-right: none; }
.cm-s-bit-fury .CodeMirror-guttermarker { color: #FFEE80; }
.cm-s-bit-fury .CodeMirror-guttermarker-subtle { color: #D0D0D0; }
.cm-s-bit-fury .CodeMirrir-linenumber { color: #606366; }

Copilot AI Mar 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a typo in the CSS selector: .CodeMirrir-linenumber should be .CodeMirror-linenumber (note "Mirrir" vs "Mirror"). The correct class name used by CodeMirror is .CodeMirror-linenumber, as correctly used in codemirror-myst.css. This means the line number color rule for the bit-fury theme will never apply.

Suggested change
.cm-s-bit-fury .CodeMirrir-linenumber { color: #606366; }
.cm-s-bit-fury .CodeMirror-linenumber { color: #606366; }

Copilot uses AI. Check for mistakes.
.cm-s-bit-fury .CodeMirror-matchingbracket { background-color: #3B514D; color: #FFEF28 !important; font-weight: bold; }

.cm-s-bit-fury div.CodeMirror-selected { background: #2f4c67; }

.CodeMirror-hints.myst {
font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;
color: #9C9E9E;
background-color: #3B3E3F !important;
}

.CodeMirror-hints.myst .CodeMirror-hint-active {
background-color: #494D4E !important;
color: #9C9E9E !important;
}
50 changes: 50 additions & 0 deletions public/style/libs/codemirror-fury.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@

/**
Name: fury
Deep gray background with blue accents
*/

.cm-s-fury span.cm-meta { color: #da7b69; }
.cm-s-fury span.cm-number { color: #aaeac1e6; }

Copilot AI Mar 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The color value #aaeac1e6 is an 8-digit hex color code (with alpha channel) used in --color-nano context. While 8-digit hex colors are supported in modern browsers, they are not universally supported across all target environments and are inconsistent with the rest of the theme files in this codebase (which all use 6-digit hex colors). This applies to both codemirror-fury.css and codemirror-bit-fury.css line 8.

Suggested change
.cm-s-fury span.cm-number { color: #aaeac1e6; }
.cm-s-fury span.cm-number { color: #AAEAC1; }

Copilot uses AI. Check for mistakes.
.cm-s-fury span.cm-keyword { color: #348CD6; line-height: 1em; font-weight: normal; }
.cm-s-fury span.cm-def { color: #77d08b; font-style: italic; }
.cm-s-fury span.cm-variable { color: #cec990; }
.cm-s-fury span.cm-variable-2 { color: #A9B7C6; }
.cm-s-fury span.cm-variable-3 { color: #9876AA; }
.cm-s-fury span.cm-type { color: #348CD6; font-weight: normal; }
.cm-s-fury span.cm-property { color: #9CD0CB; }
.cm-s-fury span.cm-operator { color: #cad6d6; }
.cm-s-fury span.cm-string { color: #CE9178; }
.cm-s-fury span.cm-string-2 { color: #CE9178; }
.cm-s-fury span.cm-comment { color: #41922d; font-style: italic; }
.cm-s-fury span.cm-link { color: #CE9178; }
.cm-s-fury span.cm-atom { color: #CE9178; }
.cm-s-fury span.cm-error { color: #BC3F3C; }
.cm-s-fury span.cm-tag { color: #348CD6; font-weight: normal; font-style: normal; }
.cm-s-fury span.cm-attribute { color: #6897bb; }
.cm-s-fury span.cm-qualifier { color: #D7BA7D; }
.cm-s-fury span.cm-bracket { color: #798080; }
.cm-s-fury span.cm-builtin { color: #FF9E59; }
.cm-s-fury span.cm-special { color: #FF9E59; }
.cm-s-fury span.cm-matchhighlight { color: #FFFFFF; background-color: rgba(50, 89, 48, .7); font-weight: normal;}
.cm-s-fury span.cm-searching { color: #FFFFFF; background-color: rgba(61, 115, 59, .7); font-weight: normal;}
.cm-s-fury .CodeMirror-cursor { border-left: 1px solid #d3dae2; }
.cm-s-fury .CodeMirror-activeline-background { background: #323232; }
.cm-s-fury .CodeMirror-gutters { border-right: none; }
.cm-s-fury .CodeMirror-guttermarker { color: #FFEE80; }
.cm-s-fury .CodeMirror-guttermarker-subtle { color: #D0D0D0; }
.cm-s-fury .CodeMirrir-linenumber { color: #606366; }

Copilot AI Mar 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a typo in the CSS selector: .CodeMirrir-linenumber should be .CodeMirror-linenumber (note "Mirrir" vs "Mirror"). The correct class name used by CodeMirror is .CodeMirror-linenumber, as correctly used in the existing codemirror-myst.css file. This means the line number color rule for the fury theme will never apply.

Suggested change
.cm-s-fury .CodeMirrir-linenumber { color: #606366; }
.cm-s-fury .CodeMirror-linenumber { color: #606366; }

Copilot uses AI. Check for mistakes.
.cm-s-fury .CodeMirror-matchingbracket { background-color: #3B514D; color: #FFEF28 !important; font-weight: bold; }

.cm-s-fury div.CodeMirror-selected { background: #2f4c67; }

.CodeMirror-hints.myst {
font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;
color: #9C9E9E;
background-color: #3B3E3F !important;
}

.CodeMirror-hints.myst .CodeMirror-hint-active {
background-color: #494D4E !important;
color: #9C9E9E !important;
}
4 changes: 4 additions & 0 deletions public/style/main.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@import url(fonts.css);

@import url(theme-fury.css);
@import url(theme-bit-fury.css);
@import url(theme-myst.css);
@import url(theme-catppuccin.css);
@import url(theme-darkplus.css);
Expand All @@ -15,6 +17,8 @@
@import url(components/footer.css);

@import url(libs/codemirror.css);
@import url(libs/codemirror-fury.css);
@import url(libs/codemirror-bit-fury.css);
@import url(libs/codemirror-myst.css);
@import url(libs/codemirror-catppuccin.css);
@import url(libs/codemirror-darkplus.css);
Expand Down
17 changes: 9 additions & 8 deletions public/style/pages/home.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
padding: 1rem;
z-index: 100;
justify-content: space-between;
margin-top: 20px;
align-items: center;
margin-top: 25px;
-webkit-transition: all 250ms ease-in-out;
-moz-transition: all 250ms ease-in-out;
-ms-transition: all 250ms ease-in-out;
Expand All @@ -30,7 +31,7 @@
color: var(--color-nano);
border-radius: var(--border-radius);
padding: 0.5rem 1rem;
margin-bottom: 20px;
/* margin-bottom: 20px; */
width: 30%;
text-align: center;
}
Expand All @@ -51,14 +52,13 @@
color: var(--color-nanolightlight);
}

#home .paste-options-bottom-sticky
{
#home .paste-options-bottom-sticky {
-webkit-box-shadow: 0px -4px 13px 1px rgba(0,0,0,0.75);
-moz-box-shadow: 0px -4px 13px 1px rgba(0,0,0,0.75);
box-shadow: 0px -4px 13px 1px rgba(0,0,0,0.75);
border-bottom: none;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
box-shadow: 0px 0px 20px 5px rgb(93 93 93 / 50%);
bottom: 20px;
border: #91b9e0 3px solid;
border-radius: 15px;
}

#home .paste-options-bottom-1px
Expand Down Expand Up @@ -97,6 +97,7 @@
border-radius: var(--border-radius);
font-size: var(--font-size-normal);
width: 30%;
margin-top: 20px;
}

#home #drop-area
Expand Down
20 changes: 20 additions & 0 deletions public/style/theme-bit-fury.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
html.bit-fury
{
--color-nano: #18283d;
--color-nanonotsolight: #2d3439;
--color-nanolight: #222e37;
--color-nanolightlight: #afafaf;
--color-white: #6d7f91;
--color-mystge: #527fab;
--color-mystlue: #2d688d;
--color-mysted: #4b97ed;
--color-mysteen: #2ec933;
--font-size-code: 1rem;
--font-size-small: 1rem;
--font-size-normal: 1.2rem;
--font-size-medium: 1.5rem;
--font-size-big: 3rem;
--border-radius: 0.3rem;
--break-small: 640px;
--font-stack: 'fusion-pixel', monospace;
}
20 changes: 20 additions & 0 deletions public/style/theme-fury.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
html.fury
{
--color-nano: #18283d;
--color-nanonotsolight: #2d3439;
--color-nanolight: #222e37;
--color-nanolightlight: #afafaf;
--color-white: #6d7f91;
--color-mystge: #527fab;
--color-mystlue: #2d688d;
--color-mysted: #4b97ed;
--color-mysteen: #2ec933;
--font-size-code: 1rem;
--font-size-small: 1rem;
--font-size-normal: 1.2rem;
--font-size-medium: 1.5rem;
--font-size-big: 3rem;
--border-radius: 0.3rem;
--break-small: 640px;
--font-stack: 'UbuntuMono', monospace;
}
Comment on lines +1 to +20

Copilot AI Mar 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The theme-fury.css and theme-bit-fury.css files are identical in all CSS variable values — only the CSS selector differs (html.fury vs html.bit-fury) and the font stack ('fusion-pixel' vs 'UbuntuMono'). If these themes are intended to be distinct, the color values should differ; if they are the same theme with a different font, consider consolidating the shared values to avoid maintenance duplication.

Copilot uses AI. Check for mistakes.
3 changes: 3 additions & 0 deletions source/app.d
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ public void main()
import pastemyst.paste : deleteExpiredPastes;
import pastemyst.auth : deleteExpiredSessions;
import pastemyst.data : config;
import vibe.core.log : setLogLevel, LogLevel;

setLogLevel(LogLevel.info);

URLRouter router = new URLRouter();

Expand Down
14 changes: 14 additions & 0 deletions source/pastemyst/data/config.d
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ public struct Config
+ html code that will get added to every page in the head tag
+/
public string headHTML = "";

/++
+ optional guess-lang detection API URL
+/
public string languageDetectionUrl = "";
}

/++
Expand Down Expand Up @@ -166,5 +171,14 @@ static this()
{
_config.headHTML = cfg["head_html"].as!string();
}

if (cfg.containsKey("language_detection_url"))
{
_config.languageDetectionUrl = cfg["language_detection_url"].as!string();
}
else if (cfg.containsKey("guesslangUrl"))
{
_config.languageDetectionUrl = cfg["guesslangUrl"].as!string();
}
}
}
Loading
Loading