From 37d3fc7a55c27cbed3f24f606daf0de828d2619f Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Thu, 5 Jan 2023 13:53:42 +0100 Subject: [PATCH] Move JavaScript source into app/assets/javascript --- .../javascript/retrospring/common.ts | 6 +- .../controllers/announcement_controller.ts | 0 .../controllers/autofocus_controller.ts | 0 .../controllers/character_count_controller.ts | 0 .../features/answerbox/comment/destroy.ts | 0 .../features/answerbox/comment/index.ts | 0 .../features/answerbox/comment/new.ts | 0 .../features/answerbox/comment/report.ts | 0 .../features/answerbox/comment/smile.ts | 0 .../features/answerbox/comment/toggle.ts | 0 .../retrospring/features/answerbox/destroy.ts | 0 .../retrospring/features/answerbox/index.ts | 0 .../retrospring/features/answerbox/report.ts | 0 .../retrospring/features/answerbox/share.ts | 0 .../retrospring/features/answerbox/smile.ts | 0 .../features/answerbox/subscribe.ts | 0 .../features/capabilities/index.ts | 0 .../retrospring/features/front/index.ts | 0 .../retrospring/features/front/theme.ts | 0 .../retrospring/features/inbox/author.ts | 0 .../retrospring/features/inbox/delete.ts | 0 .../features/inbox/entry/answer.ts | 0 .../features/inbox/entry/delete.ts | 0 .../retrospring/features/inbox/entry/index.ts | 0 .../features/inbox/entry/options.ts | 0 .../features/inbox/entry/report.ts | 0 .../retrospring/features/inbox/index.ts | 0 .../retrospring/features/lists/create.ts | 0 .../retrospring/features/lists/destroy.ts | 0 .../retrospring/features/lists/index.ts | 0 .../retrospring/features/lists/membership.ts | 0 .../retrospring/features/memes/index.ts | 0 .../retrospring/features/moderation/ban.ts | 0 .../features/moderation/destroy.ts | 0 .../retrospring/features/moderation/index.ts | 0 .../features/moderation/privilege.ts | 0 .../retrospring/features/question/answer.ts | 0 .../retrospring/features/question/destroy.ts | 0 .../retrospring/features/question/index.ts | 0 .../retrospring/features/question/report.ts | 0 .../retrospring/features/questionbox/all.ts | 0 .../retrospring/features/questionbox/index.ts | 0 .../retrospring/features/questionbox/user.ts | 0 .../retrospring/features/settings/crop.ts | 0 .../retrospring/features/settings/index.ts | 0 .../retrospring/features/settings/password.ts | 0 .../retrospring/features/settings/theme.ts | 0 .../retrospring/features/user/action.ts | 0 .../retrospring/features/user/index.ts | 0 .../retrospring/features/user/report.ts | 0 .../retrospring/features/webpush/dismiss.ts | 0 .../retrospring/features/webpush/enable.ts | 0 .../retrospring/features/webpush/index.ts | 0 .../features/webpush/settingsButtons.ts | 0 .../features/webpush/unsubscribe.ts | 0 app/assets/javascript/retrospring/i18n.json | 134 ++++++++++++++++++ .../javascript/retrospring/i18n.ts | 0 .../retrospring/initializers/bootstrap.ts | 0 .../javascript/retrospring/utilities/noop.ts | 0 .../retrospring/utilities/notifications.ts | 0 .../javascript/retrospring/utilities/on.ts | 0 .../retrospring/utilities/registerEvents.ts | 0 .../retrospring/utilities/reportDialog.ts | 0 .../retrospring/initializers/index.ts | 20 --- 64 files changed, 137 insertions(+), 23 deletions(-) rename app/{ => assets}/javascript/retrospring/common.ts (65%) rename app/{ => assets}/javascript/retrospring/controllers/announcement_controller.ts (100%) rename app/{ => assets}/javascript/retrospring/controllers/autofocus_controller.ts (100%) rename app/{ => assets}/javascript/retrospring/controllers/character_count_controller.ts (100%) rename app/{ => assets}/javascript/retrospring/features/answerbox/comment/destroy.ts (100%) rename app/{ => assets}/javascript/retrospring/features/answerbox/comment/index.ts (100%) rename app/{ => assets}/javascript/retrospring/features/answerbox/comment/new.ts (100%) rename app/{ => assets}/javascript/retrospring/features/answerbox/comment/report.ts (100%) rename app/{ => assets}/javascript/retrospring/features/answerbox/comment/smile.ts (100%) rename app/{ => assets}/javascript/retrospring/features/answerbox/comment/toggle.ts (100%) rename app/{ => assets}/javascript/retrospring/features/answerbox/destroy.ts (100%) rename app/{ => assets}/javascript/retrospring/features/answerbox/index.ts (100%) rename app/{ => assets}/javascript/retrospring/features/answerbox/report.ts (100%) rename app/{ => assets}/javascript/retrospring/features/answerbox/share.ts (100%) rename app/{ => assets}/javascript/retrospring/features/answerbox/smile.ts (100%) rename app/{ => assets}/javascript/retrospring/features/answerbox/subscribe.ts (100%) rename app/{ => assets}/javascript/retrospring/features/capabilities/index.ts (100%) rename app/{ => assets}/javascript/retrospring/features/front/index.ts (100%) rename app/{ => assets}/javascript/retrospring/features/front/theme.ts (100%) rename app/{ => assets}/javascript/retrospring/features/inbox/author.ts (100%) rename app/{ => assets}/javascript/retrospring/features/inbox/delete.ts (100%) rename app/{ => assets}/javascript/retrospring/features/inbox/entry/answer.ts (100%) rename app/{ => assets}/javascript/retrospring/features/inbox/entry/delete.ts (100%) rename app/{ => assets}/javascript/retrospring/features/inbox/entry/index.ts (100%) rename app/{ => assets}/javascript/retrospring/features/inbox/entry/options.ts (100%) rename app/{ => assets}/javascript/retrospring/features/inbox/entry/report.ts (100%) rename app/{ => assets}/javascript/retrospring/features/inbox/index.ts (100%) rename app/{ => assets}/javascript/retrospring/features/lists/create.ts (100%) rename app/{ => assets}/javascript/retrospring/features/lists/destroy.ts (100%) rename app/{ => assets}/javascript/retrospring/features/lists/index.ts (100%) rename app/{ => assets}/javascript/retrospring/features/lists/membership.ts (100%) rename app/{ => assets}/javascript/retrospring/features/memes/index.ts (100%) rename app/{ => assets}/javascript/retrospring/features/moderation/ban.ts (100%) rename app/{ => assets}/javascript/retrospring/features/moderation/destroy.ts (100%) rename app/{ => assets}/javascript/retrospring/features/moderation/index.ts (100%) rename app/{ => assets}/javascript/retrospring/features/moderation/privilege.ts (100%) rename app/{ => assets}/javascript/retrospring/features/question/answer.ts (100%) rename app/{ => assets}/javascript/retrospring/features/question/destroy.ts (100%) rename app/{ => assets}/javascript/retrospring/features/question/index.ts (100%) rename app/{ => assets}/javascript/retrospring/features/question/report.ts (100%) rename app/{ => assets}/javascript/retrospring/features/questionbox/all.ts (100%) rename app/{ => assets}/javascript/retrospring/features/questionbox/index.ts (100%) rename app/{ => assets}/javascript/retrospring/features/questionbox/user.ts (100%) rename app/{ => assets}/javascript/retrospring/features/settings/crop.ts (100%) rename app/{ => assets}/javascript/retrospring/features/settings/index.ts (100%) rename app/{ => assets}/javascript/retrospring/features/settings/password.ts (100%) rename app/{ => assets}/javascript/retrospring/features/settings/theme.ts (100%) rename app/{ => assets}/javascript/retrospring/features/user/action.ts (100%) rename app/{ => assets}/javascript/retrospring/features/user/index.ts (100%) rename app/{ => assets}/javascript/retrospring/features/user/report.ts (100%) rename app/{ => assets}/javascript/retrospring/features/webpush/dismiss.ts (100%) rename app/{ => assets}/javascript/retrospring/features/webpush/enable.ts (100%) rename app/{ => assets}/javascript/retrospring/features/webpush/index.ts (100%) rename app/{ => assets}/javascript/retrospring/features/webpush/settingsButtons.ts (100%) rename app/{ => assets}/javascript/retrospring/features/webpush/unsubscribe.ts (100%) create mode 100644 app/assets/javascript/retrospring/i18n.json rename app/{ => assets}/javascript/retrospring/i18n.ts (100%) rename app/{ => assets}/javascript/retrospring/initializers/bootstrap.ts (100%) rename app/{ => assets}/javascript/retrospring/utilities/noop.ts (100%) rename app/{ => assets}/javascript/retrospring/utilities/notifications.ts (100%) rename app/{ => assets}/javascript/retrospring/utilities/on.ts (100%) rename app/{ => assets}/javascript/retrospring/utilities/registerEvents.ts (100%) rename app/{ => assets}/javascript/retrospring/utilities/reportDialog.ts (100%) delete mode 100644 app/javascript/retrospring/initializers/index.ts diff --git a/app/javascript/retrospring/common.ts b/app/assets/javascript/retrospring/common.ts similarity index 65% rename from app/javascript/retrospring/common.ts rename to app/assets/javascript/retrospring/common.ts index 712edf3e..49875e03 100644 --- a/app/javascript/retrospring/common.ts +++ b/app/assets/javascript/retrospring/common.ts @@ -1,10 +1,10 @@ import '@hotwired/turbo-rails'; -import initialize from './initializers'; +import bootstrap from './initializers/bootstrap'; export default function start(): void { try { - initialize(); + bootstrap(); } catch (e) { // initialization errors } -} \ No newline at end of file +} diff --git a/app/javascript/retrospring/controllers/announcement_controller.ts b/app/assets/javascript/retrospring/controllers/announcement_controller.ts similarity index 100% rename from app/javascript/retrospring/controllers/announcement_controller.ts rename to app/assets/javascript/retrospring/controllers/announcement_controller.ts diff --git a/app/javascript/retrospring/controllers/autofocus_controller.ts b/app/assets/javascript/retrospring/controllers/autofocus_controller.ts similarity index 100% rename from app/javascript/retrospring/controllers/autofocus_controller.ts rename to app/assets/javascript/retrospring/controllers/autofocus_controller.ts diff --git a/app/javascript/retrospring/controllers/character_count_controller.ts b/app/assets/javascript/retrospring/controllers/character_count_controller.ts similarity index 100% rename from app/javascript/retrospring/controllers/character_count_controller.ts rename to app/assets/javascript/retrospring/controllers/character_count_controller.ts diff --git a/app/javascript/retrospring/features/answerbox/comment/destroy.ts b/app/assets/javascript/retrospring/features/answerbox/comment/destroy.ts similarity index 100% rename from app/javascript/retrospring/features/answerbox/comment/destroy.ts rename to app/assets/javascript/retrospring/features/answerbox/comment/destroy.ts diff --git a/app/javascript/retrospring/features/answerbox/comment/index.ts b/app/assets/javascript/retrospring/features/answerbox/comment/index.ts similarity index 100% rename from app/javascript/retrospring/features/answerbox/comment/index.ts rename to app/assets/javascript/retrospring/features/answerbox/comment/index.ts diff --git a/app/javascript/retrospring/features/answerbox/comment/new.ts b/app/assets/javascript/retrospring/features/answerbox/comment/new.ts similarity index 100% rename from app/javascript/retrospring/features/answerbox/comment/new.ts rename to app/assets/javascript/retrospring/features/answerbox/comment/new.ts diff --git a/app/javascript/retrospring/features/answerbox/comment/report.ts b/app/assets/javascript/retrospring/features/answerbox/comment/report.ts similarity index 100% rename from app/javascript/retrospring/features/answerbox/comment/report.ts rename to app/assets/javascript/retrospring/features/answerbox/comment/report.ts diff --git a/app/javascript/retrospring/features/answerbox/comment/smile.ts b/app/assets/javascript/retrospring/features/answerbox/comment/smile.ts similarity index 100% rename from app/javascript/retrospring/features/answerbox/comment/smile.ts rename to app/assets/javascript/retrospring/features/answerbox/comment/smile.ts diff --git a/app/javascript/retrospring/features/answerbox/comment/toggle.ts b/app/assets/javascript/retrospring/features/answerbox/comment/toggle.ts similarity index 100% rename from app/javascript/retrospring/features/answerbox/comment/toggle.ts rename to app/assets/javascript/retrospring/features/answerbox/comment/toggle.ts diff --git a/app/javascript/retrospring/features/answerbox/destroy.ts b/app/assets/javascript/retrospring/features/answerbox/destroy.ts similarity index 100% rename from app/javascript/retrospring/features/answerbox/destroy.ts rename to app/assets/javascript/retrospring/features/answerbox/destroy.ts diff --git a/app/javascript/retrospring/features/answerbox/index.ts b/app/assets/javascript/retrospring/features/answerbox/index.ts similarity index 100% rename from app/javascript/retrospring/features/answerbox/index.ts rename to app/assets/javascript/retrospring/features/answerbox/index.ts diff --git a/app/javascript/retrospring/features/answerbox/report.ts b/app/assets/javascript/retrospring/features/answerbox/report.ts similarity index 100% rename from app/javascript/retrospring/features/answerbox/report.ts rename to app/assets/javascript/retrospring/features/answerbox/report.ts diff --git a/app/javascript/retrospring/features/answerbox/share.ts b/app/assets/javascript/retrospring/features/answerbox/share.ts similarity index 100% rename from app/javascript/retrospring/features/answerbox/share.ts rename to app/assets/javascript/retrospring/features/answerbox/share.ts diff --git a/app/javascript/retrospring/features/answerbox/smile.ts b/app/assets/javascript/retrospring/features/answerbox/smile.ts similarity index 100% rename from app/javascript/retrospring/features/answerbox/smile.ts rename to app/assets/javascript/retrospring/features/answerbox/smile.ts diff --git a/app/javascript/retrospring/features/answerbox/subscribe.ts b/app/assets/javascript/retrospring/features/answerbox/subscribe.ts similarity index 100% rename from app/javascript/retrospring/features/answerbox/subscribe.ts rename to app/assets/javascript/retrospring/features/answerbox/subscribe.ts diff --git a/app/javascript/retrospring/features/capabilities/index.ts b/app/assets/javascript/retrospring/features/capabilities/index.ts similarity index 100% rename from app/javascript/retrospring/features/capabilities/index.ts rename to app/assets/javascript/retrospring/features/capabilities/index.ts diff --git a/app/javascript/retrospring/features/front/index.ts b/app/assets/javascript/retrospring/features/front/index.ts similarity index 100% rename from app/javascript/retrospring/features/front/index.ts rename to app/assets/javascript/retrospring/features/front/index.ts diff --git a/app/javascript/retrospring/features/front/theme.ts b/app/assets/javascript/retrospring/features/front/theme.ts similarity index 100% rename from app/javascript/retrospring/features/front/theme.ts rename to app/assets/javascript/retrospring/features/front/theme.ts diff --git a/app/javascript/retrospring/features/inbox/author.ts b/app/assets/javascript/retrospring/features/inbox/author.ts similarity index 100% rename from app/javascript/retrospring/features/inbox/author.ts rename to app/assets/javascript/retrospring/features/inbox/author.ts diff --git a/app/javascript/retrospring/features/inbox/delete.ts b/app/assets/javascript/retrospring/features/inbox/delete.ts similarity index 100% rename from app/javascript/retrospring/features/inbox/delete.ts rename to app/assets/javascript/retrospring/features/inbox/delete.ts diff --git a/app/javascript/retrospring/features/inbox/entry/answer.ts b/app/assets/javascript/retrospring/features/inbox/entry/answer.ts similarity index 100% rename from app/javascript/retrospring/features/inbox/entry/answer.ts rename to app/assets/javascript/retrospring/features/inbox/entry/answer.ts diff --git a/app/javascript/retrospring/features/inbox/entry/delete.ts b/app/assets/javascript/retrospring/features/inbox/entry/delete.ts similarity index 100% rename from app/javascript/retrospring/features/inbox/entry/delete.ts rename to app/assets/javascript/retrospring/features/inbox/entry/delete.ts diff --git a/app/javascript/retrospring/features/inbox/entry/index.ts b/app/assets/javascript/retrospring/features/inbox/entry/index.ts similarity index 100% rename from app/javascript/retrospring/features/inbox/entry/index.ts rename to app/assets/javascript/retrospring/features/inbox/entry/index.ts diff --git a/app/javascript/retrospring/features/inbox/entry/options.ts b/app/assets/javascript/retrospring/features/inbox/entry/options.ts similarity index 100% rename from app/javascript/retrospring/features/inbox/entry/options.ts rename to app/assets/javascript/retrospring/features/inbox/entry/options.ts diff --git a/app/javascript/retrospring/features/inbox/entry/report.ts b/app/assets/javascript/retrospring/features/inbox/entry/report.ts similarity index 100% rename from app/javascript/retrospring/features/inbox/entry/report.ts rename to app/assets/javascript/retrospring/features/inbox/entry/report.ts diff --git a/app/javascript/retrospring/features/inbox/index.ts b/app/assets/javascript/retrospring/features/inbox/index.ts similarity index 100% rename from app/javascript/retrospring/features/inbox/index.ts rename to app/assets/javascript/retrospring/features/inbox/index.ts diff --git a/app/javascript/retrospring/features/lists/create.ts b/app/assets/javascript/retrospring/features/lists/create.ts similarity index 100% rename from app/javascript/retrospring/features/lists/create.ts rename to app/assets/javascript/retrospring/features/lists/create.ts diff --git a/app/javascript/retrospring/features/lists/destroy.ts b/app/assets/javascript/retrospring/features/lists/destroy.ts similarity index 100% rename from app/javascript/retrospring/features/lists/destroy.ts rename to app/assets/javascript/retrospring/features/lists/destroy.ts diff --git a/app/javascript/retrospring/features/lists/index.ts b/app/assets/javascript/retrospring/features/lists/index.ts similarity index 100% rename from app/javascript/retrospring/features/lists/index.ts rename to app/assets/javascript/retrospring/features/lists/index.ts diff --git a/app/javascript/retrospring/features/lists/membership.ts b/app/assets/javascript/retrospring/features/lists/membership.ts similarity index 100% rename from app/javascript/retrospring/features/lists/membership.ts rename to app/assets/javascript/retrospring/features/lists/membership.ts diff --git a/app/javascript/retrospring/features/memes/index.ts b/app/assets/javascript/retrospring/features/memes/index.ts similarity index 100% rename from app/javascript/retrospring/features/memes/index.ts rename to app/assets/javascript/retrospring/features/memes/index.ts diff --git a/app/javascript/retrospring/features/moderation/ban.ts b/app/assets/javascript/retrospring/features/moderation/ban.ts similarity index 100% rename from app/javascript/retrospring/features/moderation/ban.ts rename to app/assets/javascript/retrospring/features/moderation/ban.ts diff --git a/app/javascript/retrospring/features/moderation/destroy.ts b/app/assets/javascript/retrospring/features/moderation/destroy.ts similarity index 100% rename from app/javascript/retrospring/features/moderation/destroy.ts rename to app/assets/javascript/retrospring/features/moderation/destroy.ts diff --git a/app/javascript/retrospring/features/moderation/index.ts b/app/assets/javascript/retrospring/features/moderation/index.ts similarity index 100% rename from app/javascript/retrospring/features/moderation/index.ts rename to app/assets/javascript/retrospring/features/moderation/index.ts diff --git a/app/javascript/retrospring/features/moderation/privilege.ts b/app/assets/javascript/retrospring/features/moderation/privilege.ts similarity index 100% rename from app/javascript/retrospring/features/moderation/privilege.ts rename to app/assets/javascript/retrospring/features/moderation/privilege.ts diff --git a/app/javascript/retrospring/features/question/answer.ts b/app/assets/javascript/retrospring/features/question/answer.ts similarity index 100% rename from app/javascript/retrospring/features/question/answer.ts rename to app/assets/javascript/retrospring/features/question/answer.ts diff --git a/app/javascript/retrospring/features/question/destroy.ts b/app/assets/javascript/retrospring/features/question/destroy.ts similarity index 100% rename from app/javascript/retrospring/features/question/destroy.ts rename to app/assets/javascript/retrospring/features/question/destroy.ts diff --git a/app/javascript/retrospring/features/question/index.ts b/app/assets/javascript/retrospring/features/question/index.ts similarity index 100% rename from app/javascript/retrospring/features/question/index.ts rename to app/assets/javascript/retrospring/features/question/index.ts diff --git a/app/javascript/retrospring/features/question/report.ts b/app/assets/javascript/retrospring/features/question/report.ts similarity index 100% rename from app/javascript/retrospring/features/question/report.ts rename to app/assets/javascript/retrospring/features/question/report.ts diff --git a/app/javascript/retrospring/features/questionbox/all.ts b/app/assets/javascript/retrospring/features/questionbox/all.ts similarity index 100% rename from app/javascript/retrospring/features/questionbox/all.ts rename to app/assets/javascript/retrospring/features/questionbox/all.ts diff --git a/app/javascript/retrospring/features/questionbox/index.ts b/app/assets/javascript/retrospring/features/questionbox/index.ts similarity index 100% rename from app/javascript/retrospring/features/questionbox/index.ts rename to app/assets/javascript/retrospring/features/questionbox/index.ts diff --git a/app/javascript/retrospring/features/questionbox/user.ts b/app/assets/javascript/retrospring/features/questionbox/user.ts similarity index 100% rename from app/javascript/retrospring/features/questionbox/user.ts rename to app/assets/javascript/retrospring/features/questionbox/user.ts diff --git a/app/javascript/retrospring/features/settings/crop.ts b/app/assets/javascript/retrospring/features/settings/crop.ts similarity index 100% rename from app/javascript/retrospring/features/settings/crop.ts rename to app/assets/javascript/retrospring/features/settings/crop.ts diff --git a/app/javascript/retrospring/features/settings/index.ts b/app/assets/javascript/retrospring/features/settings/index.ts similarity index 100% rename from app/javascript/retrospring/features/settings/index.ts rename to app/assets/javascript/retrospring/features/settings/index.ts diff --git a/app/javascript/retrospring/features/settings/password.ts b/app/assets/javascript/retrospring/features/settings/password.ts similarity index 100% rename from app/javascript/retrospring/features/settings/password.ts rename to app/assets/javascript/retrospring/features/settings/password.ts diff --git a/app/javascript/retrospring/features/settings/theme.ts b/app/assets/javascript/retrospring/features/settings/theme.ts similarity index 100% rename from app/javascript/retrospring/features/settings/theme.ts rename to app/assets/javascript/retrospring/features/settings/theme.ts diff --git a/app/javascript/retrospring/features/user/action.ts b/app/assets/javascript/retrospring/features/user/action.ts similarity index 100% rename from app/javascript/retrospring/features/user/action.ts rename to app/assets/javascript/retrospring/features/user/action.ts diff --git a/app/javascript/retrospring/features/user/index.ts b/app/assets/javascript/retrospring/features/user/index.ts similarity index 100% rename from app/javascript/retrospring/features/user/index.ts rename to app/assets/javascript/retrospring/features/user/index.ts diff --git a/app/javascript/retrospring/features/user/report.ts b/app/assets/javascript/retrospring/features/user/report.ts similarity index 100% rename from app/javascript/retrospring/features/user/report.ts rename to app/assets/javascript/retrospring/features/user/report.ts diff --git a/app/javascript/retrospring/features/webpush/dismiss.ts b/app/assets/javascript/retrospring/features/webpush/dismiss.ts similarity index 100% rename from app/javascript/retrospring/features/webpush/dismiss.ts rename to app/assets/javascript/retrospring/features/webpush/dismiss.ts diff --git a/app/javascript/retrospring/features/webpush/enable.ts b/app/assets/javascript/retrospring/features/webpush/enable.ts similarity index 100% rename from app/javascript/retrospring/features/webpush/enable.ts rename to app/assets/javascript/retrospring/features/webpush/enable.ts diff --git a/app/javascript/retrospring/features/webpush/index.ts b/app/assets/javascript/retrospring/features/webpush/index.ts similarity index 100% rename from app/javascript/retrospring/features/webpush/index.ts rename to app/assets/javascript/retrospring/features/webpush/index.ts diff --git a/app/javascript/retrospring/features/webpush/settingsButtons.ts b/app/assets/javascript/retrospring/features/webpush/settingsButtons.ts similarity index 100% rename from app/javascript/retrospring/features/webpush/settingsButtons.ts rename to app/assets/javascript/retrospring/features/webpush/settingsButtons.ts diff --git a/app/javascript/retrospring/features/webpush/unsubscribe.ts b/app/assets/javascript/retrospring/features/webpush/unsubscribe.ts similarity index 100% rename from app/javascript/retrospring/features/webpush/unsubscribe.ts rename to app/assets/javascript/retrospring/features/webpush/unsubscribe.ts diff --git a/app/assets/javascript/retrospring/i18n.json b/app/assets/javascript/retrospring/i18n.json new file mode 100644 index 00000000..bdf32abb --- /dev/null +++ b/app/assets/javascript/retrospring/i18n.json @@ -0,0 +1,134 @@ +{ + "en": { + "frontend": { + "destroy_comment": { + "confirm": { + "text": "You will not be able to recover this comment.", + "title": "Are you sure?" + } + }, + "destroy_own": { + "confirm": { + "text": "The question will be removed.", + "title": "Are you sure?" + } + }, + "destroy_question": { + "confirm": { + "text": "The question will be moved back to your inbox, but it won't delete any posts to social media.", + "title": "Are you sure?" + } + }, + "destroy_report": { + "confirm": { + "text": "You will not be able to recover this report.", + "title": "Are you sure?" + } + }, + "error": { + "message": "An error occurred, a developer should check the console for details", + "title": "Uh-oh…" + }, + "inbox": { + "confirm": { + "text": "This question will be gone forever.", + "title": "Are you sure?" + }, + "confirm_all": { + "text": "They will be gone forever.", + "title": "Are you sure you want to delete %{count} questions?" + }, + "empty": "Nothing to see here." + }, + "list": { + "confirm": { + "text": "You will not be able to recover this list.", + "title": "Are you sure?" + }, + "item": { + "members": { + "one": "1 member", + "other": "%{count} members", + "zero": "No members" + } + } + }, + "load": "Load more", + "mod_mute": { + "confirm": { + "text": "This will mute this user for everyone.", + "title": "Are you sure?" + } + }, + "push_notifications": { + "inbox": { + "title": "New question from %{user}" + }, + "setup_fail": "Failed to set up push notifications. Please try again later.", + "subscribe": { + "fail": { + "body": "Please try again later", + "title": "Failed to subscribe to push notifications" + }, + "success": { + "body": "You will now receive push notifications for new questions on this device.", + "title": "Push notifications enabled!" + } + }, + "unsubscribe": { + "fail": "Failed to disable push notifications.", + "success": "Push notifications disabled successfully." + } + }, + "report": { + "confirm": { + "input": "Specify a reason…", + "text": "A moderator will review your report and decide what happens.\nYou can optionally specify a reason.", + "title": "Are you sure you want to report this %{type}?" + } + }, + "subscription": { + "fail": { + "subscribe": "Failed to subscribe to answer.", + "unsubscribe": "Failed to unsubscribe from answer." + }, + "subscribe": "Successfully subscribed.", + "unsubscribe": "Successfully unsubscribed." + }, + "success": { + "title": "Success!" + } + }, + "voc": { + "add": "Add", + "answer": "Answer", + "block": "Block", + "block_site_wide": "Block user site-wide", + "cancel": "Cancel", + "close": "Close", + "confirm": "Are you sure?", + "delete": "Delete", + "edit": "Edit", + "follow": "Follow", + "load": "Load more", + "login": "Sign in", + "logout": "Sign out", + "mute": "Mute", + "n": "No", + "register": "Sign up", + "remove": "Remove", + "report": "Report", + "save": "Save changes", + "show_anonymous_questions": "Show all questions from this user", + "subscribe": "Subscribe", + "terms": "Terms of Service", + "unblock": "Unblock", + "unfollow": "Unfollow", + "unmute": "Unmute", + "unsubscribe": "Unsubscribe", + "update": "Update", + "view_in_rails_admin": "View in Rails Admin", + "y": "Yes" + } + } +} \ No newline at end of file diff --git a/app/javascript/retrospring/i18n.ts b/app/assets/javascript/retrospring/i18n.ts similarity index 100% rename from app/javascript/retrospring/i18n.ts rename to app/assets/javascript/retrospring/i18n.ts diff --git a/app/javascript/retrospring/initializers/bootstrap.ts b/app/assets/javascript/retrospring/initializers/bootstrap.ts similarity index 100% rename from app/javascript/retrospring/initializers/bootstrap.ts rename to app/assets/javascript/retrospring/initializers/bootstrap.ts diff --git a/app/javascript/retrospring/utilities/noop.ts b/app/assets/javascript/retrospring/utilities/noop.ts similarity index 100% rename from app/javascript/retrospring/utilities/noop.ts rename to app/assets/javascript/retrospring/utilities/noop.ts diff --git a/app/javascript/retrospring/utilities/notifications.ts b/app/assets/javascript/retrospring/utilities/notifications.ts similarity index 100% rename from app/javascript/retrospring/utilities/notifications.ts rename to app/assets/javascript/retrospring/utilities/notifications.ts diff --git a/app/javascript/retrospring/utilities/on.ts b/app/assets/javascript/retrospring/utilities/on.ts similarity index 100% rename from app/javascript/retrospring/utilities/on.ts rename to app/assets/javascript/retrospring/utilities/on.ts diff --git a/app/javascript/retrospring/utilities/registerEvents.ts b/app/assets/javascript/retrospring/utilities/registerEvents.ts similarity index 100% rename from app/javascript/retrospring/utilities/registerEvents.ts rename to app/assets/javascript/retrospring/utilities/registerEvents.ts diff --git a/app/javascript/retrospring/utilities/reportDialog.ts b/app/assets/javascript/retrospring/utilities/reportDialog.ts similarity index 100% rename from app/javascript/retrospring/utilities/reportDialog.ts rename to app/assets/javascript/retrospring/utilities/reportDialog.ts diff --git a/app/javascript/retrospring/initializers/index.ts b/app/javascript/retrospring/initializers/index.ts deleted file mode 100644 index 3e7768c0..00000000 --- a/app/javascript/retrospring/initializers/index.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Using some JavaScript trickery with require.context - * and default exports, we're basically rebuilding the - * Rails concept of "initializers" in JavaScript. - * - * Every file in this folder exports a default function - * which this index script is loading and executing, so - * we don't have to specify several single import - * statements and can dynamically extend this with as - * many initializers as we see fit. - */ -export default function initialize(): void { - const files = require.context('.', false, /\.ts$/); - - files.keys().forEach((key) => { - if (key === './index.ts') return; - if (key.startsWith('./_')) return; - files(key).default(); - }); -} \ No newline at end of file