mirror of
https://github.com/perstarkse/minne.git
synced 2026-11-13 11:03:29 +01:00
fix: max-vw to prevent overflow, and some cleaning of wip comments
This commit is contained in:
1 parent
32141fce6e
commit
f567b7198b
5 files changed
+4
-20
No files matched your search
Generated
+1
-1
@@ -3127,7 +3127,7 @@ checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4"
|
||||
|
||||
[[package]]
|
||||
name = "main"
|
||||
version = "0.1.2"
|
||||
version = "0.1.3"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"api-router",
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
/*! tailwindcss v4.1.2 | MIT License | https://tailwindcss.com */
|
||||
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:rotateX(0);--tw-rotate-y:rotateY(0);--tw-rotate-z:rotateZ(0);--tw-skew-x:skewX(0);--tw-skew-y:skewY(0);--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-content:""}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-blue-500:oklch(62.3% .214 259.815);--color-blue-700:oklch(48.8% .243 264.376);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-500:oklch(55.1% .027 264.364);--color-neutral-700:oklch(37.1% 0 0);--color-neutral-800:oklch(26.9% 0 0);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-md:28rem;--container-3xl:48rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-5xl:3rem;--text-5xl--line-height:1;--text-6xl:3.75rem;--text-6xl--line-height:1;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--tracking-wide:.025em;--radius-md:.375rem;--radius-2xl:1rem;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transpLine truncated
|
||||
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:rotateX(0);--tw-rotate-y:rotateY(0);--tw-rotate-z:rotateZ(0);--tw-skew-x:skewX(0);--tw-skew-y:skewY(0);--tw-space-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-content:""}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-blue-500:oklch(62.3% .214 259.815);--color-blue-700:oklch(48.8% .243 264.376);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-500:oklch(55.1% .027 264.364);--color-neutral-700:oklch(37.1% 0 0);--color-neutral-800:oklch(26.9% 0 0);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-md:28rem;--container-3xl:48rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-5xl:3rem;--text-5xl--line-height:1;--text-6xl:3.75rem;--text-6xl--line-height:1;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--tracking-wide:.025em;--radius-md:.375rem;--radius-2xl:1rem;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resizLine truncated
|
||||
@@ -190,7 +190,7 @@ pub async fn show_recent_content(
|
||||
}
|
||||
|
||||
Ok(TemplateResponse::new_template(
|
||||
"/dashboard/recent_content.html",
|
||||
"dashboard/recent_content.html",
|
||||
RecentTextContentData {
|
||||
user,
|
||||
text_contents,
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<img src="/file/{{text_content.url_info.image_id}}" alt="website screenshot" />
|
||||
</figure>
|
||||
{% endif %}
|
||||
<div class="card-body">
|
||||
<div class="card-body max-w-[95vw]">
|
||||
<h2 class="card-title truncate">
|
||||
{% if text_content.url_info %}
|
||||
{{text_content.url_info.title}}
|
||||
|
||||
@@ -43,7 +43,6 @@ fn add_char_into_object(
|
||||
current_char: char,
|
||||
) -> Result<(), String> {
|
||||
match (&*object, &*current_status, current_char) {
|
||||
// String escape handling
|
||||
(&Value::String(_), &ObjectStatus::StringQuoteOpen(true), '"') => {
|
||||
if let Value::String(str) = object {
|
||||
str.push('"');
|
||||
@@ -54,7 +53,6 @@ fn add_char_into_object(
|
||||
*current_status = ObjectStatus::StringQuoteClose;
|
||||
}
|
||||
(&Value::String(_), &ObjectStatus::StringQuoteOpen(true), c) => {
|
||||
// Handle other escaped chars
|
||||
if let Value::String(str) = object {
|
||||
str.push('\\');
|
||||
str.push(c);
|
||||
@@ -70,7 +68,6 @@ fn add_char_into_object(
|
||||
}
|
||||
}
|
||||
|
||||
// Key escape handling
|
||||
(&Value::Object(_), &ObjectStatus::KeyQuoteOpen { escaped: true, .. }, '"') => {
|
||||
if let ObjectStatus::KeyQuoteOpen {
|
||||
ref mut key_so_far, ..
|
||||
@@ -124,7 +121,6 @@ fn add_char_into_object(
|
||||
}
|
||||
}
|
||||
|
||||
// Value string escape handling
|
||||
(&Value::Object(_), &ObjectStatus::ValueQuoteOpen { escaped: true, .. }, '"') => {
|
||||
if let ObjectStatus::ValueQuoteOpen { ref key, .. } = current_status {
|
||||
let key_str = key.iter().collect::<String>();
|
||||
@@ -178,7 +174,6 @@ fn add_char_into_object(
|
||||
}
|
||||
}
|
||||
|
||||
// All other cases from the original implementation
|
||||
(&Value::Null, &ObjectStatus::Ready, '"') => {
|
||||
*object = json!("");
|
||||
*current_status = ObjectStatus::StringQuoteOpen(false);
|
||||
@@ -188,7 +183,6 @@ fn add_char_into_object(
|
||||
*current_status = ObjectStatus::StartProperty;
|
||||
}
|
||||
|
||||
// ------ true ------
|
||||
(&Value::Null, &ObjectStatus::Ready, 't') => {
|
||||
*object = json!(true);
|
||||
*current_status = ObjectStatus::Scalar {
|
||||
@@ -219,7 +213,6 @@ fn add_char_into_object(
|
||||
*current_status = ObjectStatus::Closed;
|
||||
}
|
||||
|
||||
// ------ false ------
|
||||
(&Value::Null, &ObjectStatus::Ready, 'f') => {
|
||||
*object = json!(false);
|
||||
*current_status = ObjectStatus::Scalar {
|
||||
@@ -260,7 +253,6 @@ fn add_char_into_object(
|
||||
*current_status = ObjectStatus::Closed;
|
||||
}
|
||||
|
||||
// ------ null ------
|
||||
(&Value::Null, &ObjectStatus::Ready, 'n') => {
|
||||
*object = json!(null);
|
||||
*current_status = ObjectStatus::Scalar {
|
||||
@@ -285,13 +277,11 @@ fn add_char_into_object(
|
||||
if *value_so_far == vec!['n', 'u'] {
|
||||
value_so_far.push('l');
|
||||
} else if *value_so_far == vec!['n', 'u', 'l'] {
|
||||
// This is for the second 'l' in "null"
|
||||
*current_status = ObjectStatus::Closed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ------ number ------
|
||||
(&Value::Null, &ObjectStatus::Ready, c @ '0'..='9') => {
|
||||
*object = Value::Number(c.to_digit(10).unwrap().into());
|
||||
*current_status = ObjectStatus::ScalarNumber {
|
||||
@@ -310,7 +300,6 @@ fn add_char_into_object(
|
||||
} = current_status
|
||||
{
|
||||
value_so_far.push(c);
|
||||
// Parse based on whether it's a float or int
|
||||
if let Value::Number(ref mut num) = object {
|
||||
if value_so_far.contains(&'.') {
|
||||
let parsed_number = value_so_far
|
||||
@@ -341,7 +330,6 @@ fn add_char_into_object(
|
||||
}
|
||||
}
|
||||
|
||||
// Object handling
|
||||
(&Value::Object(_), &ObjectStatus::StartProperty, '"') => {
|
||||
*current_status = ObjectStatus::KeyQuoteOpen {
|
||||
key_so_far: vec![],
|
||||
@@ -367,7 +355,6 @@ fn add_char_into_object(
|
||||
}
|
||||
}
|
||||
|
||||
// ------ Add Scalar Value ------
|
||||
(&Value::Object(_), &ObjectStatus::Colon { .. }, char) => {
|
||||
if let ObjectStatus::Colon { ref key } = current_status {
|
||||
*current_status = ObjectStatus::ValueScalar {
|
||||
@@ -424,7 +411,6 @@ fn add_char_into_object(
|
||||
}
|
||||
}
|
||||
|
||||
// ------ Finished taking value ------
|
||||
(&Value::Object(_), &ObjectStatus::ValueQuoteClose, ',') => {
|
||||
*current_status = ObjectStatus::StartProperty;
|
||||
}
|
||||
@@ -432,7 +418,6 @@ fn add_char_into_object(
|
||||
*current_status = ObjectStatus::Closed;
|
||||
}
|
||||
|
||||
// ------ white spaces ------
|
||||
(_, _, ' ' | '\n') => {}
|
||||
|
||||
(val, st, c) => {
|
||||
@@ -445,7 +430,6 @@ fn add_char_into_object(
|
||||
Ok(())
|
||||
}
|
||||
|
||||
// The rest of the code remains the same
|
||||
#[cfg(debug_assertions)]
|
||||
pub fn parse_stream(json_string: &str) -> Result<Value, String> {
|
||||
let mut out: Value = Value::Null;
|
||||
|
||||
Reference in new issue
Block a user