diff --git a/Rakefile b/Rakefile index fbf473c..cdf97a9 100644 --- a/Rakefile +++ b/Rakefile @@ -116,3 +116,9 @@ task "format" do sh "cd sub-chart && pnpm run lint:fix" sh "cd sub-image && cargo fmt" end + +task "secret" do + require "securerandom" + secret = SecureRandom.hex(64) + puts %(secret_key_base: "#{secret}") +end diff --git a/config.dev.yml b/config.dev.yml index 72af031..d78dc34 100644 --- a/config.dev.yml +++ b/config.dev.yml @@ -3,7 +3,8 @@ admin_handle: "1073" host: "http://192.168.1.2:3000" -secret_key_base: "e381a4e3818fe38288e381bfe381a1e38283e38293e381afe3818be3828fe38184e38184" +# rake secret to generate a new secret key base. +secret_key_base: "" hosts: backend: "http://localhost:3000" frontend: "http://localhost:3100" diff --git a/config.prod.yml b/config.prod.yml index 6c8e130..419fb79 100644 --- a/config.prod.yml +++ b/config.prod.yml @@ -3,7 +3,8 @@ admin_handle: "1073" host: "https://example.com" -secret_key_base: "e381a4e3818fe38288e381bfe381a1e38283e38293e381afe3818be3828fe38184e38184" +# rake secret to generate a new secret key base. +secret_key_base: "" hosts: backend: "http://backend:3000" frontend: "http://frontend:3100" diff --git a/frontend/i18n/en.yml b/frontend/i18n/en.yml index fc2b858..1627c59 100644 --- a/frontend/i18n/en.yml +++ b/frontend/i18n/en.yml @@ -66,10 +66,7 @@ liked: upload: title: "Post chart" titleEdit: "Edit chart: {{title}}" - description: | - Read <0>Guideline0> before posting a chart. - - You can upload files by dragging and dropping them here. + description: Read <0>Guideline0> before posting a chart. You can upload files by dragging and dropping them here. discordInfo: description: You need to link your Discord account to post a chart. status: diff --git a/frontend/pages/charts/upload.tsx b/frontend/pages/charts/upload.tsx index 9e6d594..559e0b9 100644 --- a/frontend/pages/charts/upload.tsx +++ b/frontend/pages/charts/upload.tsx @@ -603,7 +603,7 @@ const UploadChart: NextPage< } }, []) - const canUpload = !isDiscordEnabled() || !!session.discord + const canPost = !isDiscordEnabled() || !!session.discord return (