diff --git a/client/modules/IDE/components/About.stories.jsx b/client/modules/IDE/components/About.stories.jsx new file mode 100644 index 0000000000..97289f9bc8 --- /dev/null +++ b/client/modules/IDE/components/About.stories.jsx @@ -0,0 +1,8 @@ +import About from './About'; + +export default { + title: 'IDE/About', + component: About +}; + +export const Default = {}; diff --git a/client/modules/IDE/components/AssetPreview.stories.jsx b/client/modules/IDE/components/AssetPreview.stories.jsx new file mode 100644 index 0000000000..c2e1bf4fbe --- /dev/null +++ b/client/modules/IDE/components/AssetPreview.stories.jsx @@ -0,0 +1,13 @@ +import AssetPreview from './AssetPreview'; + +export default { + title: 'IDE/AssetPreview', + component: AssetPreview +}; + +export const Default = { + args: { + url: 'https://p5js.org/assets/img/p5js.svg', + name: 'P5 Logo' + } +}; diff --git a/client/modules/IDE/components/AssetSize.stories.jsx b/client/modules/IDE/components/AssetSize.stories.jsx new file mode 100644 index 0000000000..958365ab0c --- /dev/null +++ b/client/modules/IDE/components/AssetSize.stories.jsx @@ -0,0 +1,12 @@ +import AssetSize from './AssetSize'; + +export default { + title: 'IDE/AssetSize', + component: AssetSize +}; + +export const Default = { + args: { + totalSize: 123 + } +}; diff --git a/client/modules/IDE/components/Console.stories.jsx b/client/modules/IDE/components/Console.stories.jsx new file mode 100644 index 0000000000..40bbb0631e --- /dev/null +++ b/client/modules/IDE/components/Console.stories.jsx @@ -0,0 +1,8 @@ +import Console from './Console'; + +export default { + title: 'IDE/Console', + component: Console +}; + +export const Default = {}; diff --git a/client/modules/IDE/components/ConsoleInput.stories.jsx b/client/modules/IDE/components/ConsoleInput.stories.jsx new file mode 100644 index 0000000000..daf3d88d83 --- /dev/null +++ b/client/modules/IDE/components/ConsoleInput.stories.jsx @@ -0,0 +1,8 @@ +import ConsoleInput from './ConsoleInput'; + +export default { + title: 'IDE/ConsoleInput', + component: ConsoleInput +}; + +export const Default = {}; diff --git a/client/modules/IDE/components/CopyableInput.stories.jsx b/client/modules/IDE/components/CopyableInput.stories.jsx new file mode 100644 index 0000000000..f4a6258cb2 --- /dev/null +++ b/client/modules/IDE/components/CopyableInput.stories.jsx @@ -0,0 +1,12 @@ +import CopyableInput from './CopyableInput'; + +export default { + title: 'IDE/CopyableInput', + component: CopyableInput +}; + +export const Default = { + args: { + value: 'Lorem Ipsum' + } +}; diff --git a/client/modules/IDE/components/EditableInput.stories.jsx b/client/modules/IDE/components/EditableInput.stories.jsx new file mode 100644 index 0000000000..a3cf638b61 --- /dev/null +++ b/client/modules/IDE/components/EditableInput.stories.jsx @@ -0,0 +1,13 @@ +import EditableInput from './EditableInput'; + +export default { + title: 'IDE/EditableInput', + component: EditableInput +}; + +export const Default = { + args: { + value: 'an@email.com', + label: 'Example' + } +}; diff --git a/client/modules/IDE/components/Feedback.stories.jsx b/client/modules/IDE/components/Feedback.stories.jsx new file mode 100644 index 0000000000..f8267e193d --- /dev/null +++ b/client/modules/IDE/components/Feedback.stories.jsx @@ -0,0 +1,8 @@ +import Feedback from './Feedback'; + +export default { + title: 'IDE/Feedback', + component: Feedback +}; + +export const Default = {}; diff --git a/client/modules/IDE/components/FileUploader.stories.jsx b/client/modules/IDE/components/FileUploader.stories.jsx new file mode 100644 index 0000000000..ed3097f000 --- /dev/null +++ b/client/modules/IDE/components/FileUploader.stories.jsx @@ -0,0 +1,8 @@ +import FileUploader from './FileUploader'; + +export default { + title: 'IDE/FileUploader', + component: FileUploader +}; + +export const Default = {}; diff --git a/client/modules/IDE/components/FloatingActionButton.stories.jsx b/client/modules/IDE/components/FloatingActionButton.stories.jsx new file mode 100644 index 0000000000..d80247a0d9 --- /dev/null +++ b/client/modules/IDE/components/FloatingActionButton.stories.jsx @@ -0,0 +1,8 @@ +import FloatingActionButton from './FloatingActionButton'; + +export default { + title: 'IDE/FloatingActionButton', + component: FloatingActionButton +}; + +export const Default = {}; diff --git a/client/modules/IDE/components/KeyboardShortcutModal.stories.jsx b/client/modules/IDE/components/KeyboardShortcutModal.stories.jsx new file mode 100644 index 0000000000..393e356d65 --- /dev/null +++ b/client/modules/IDE/components/KeyboardShortcutModal.stories.jsx @@ -0,0 +1,8 @@ +import KeyboardShortcutModal from './KeyboardShortcutModal'; + +export default { + title: 'IDE/KeyboardShortcutModal', + component: KeyboardShortcutModal +}; + +export const Default = {}; diff --git a/client/modules/IDE/components/NewFileForm.stories.jsx b/client/modules/IDE/components/NewFileForm.stories.jsx new file mode 100644 index 0000000000..0c47ddf669 --- /dev/null +++ b/client/modules/IDE/components/NewFileForm.stories.jsx @@ -0,0 +1,8 @@ +import NewFileForm from './NewFileForm'; + +export default { + title: 'IDE/NewFileForm', + component: NewFileForm +}; + +export const Default = {}; diff --git a/client/modules/IDE/components/NewFileModal.stories.jsx b/client/modules/IDE/components/NewFileModal.stories.jsx new file mode 100644 index 0000000000..84e7bdc15b --- /dev/null +++ b/client/modules/IDE/components/NewFileModal.stories.jsx @@ -0,0 +1,8 @@ +import NewFileModal from './NewFileModal'; + +export default { + title: 'IDE/NewFileModal', + component: NewFileModal +}; + +export const Default = {}; diff --git a/client/modules/IDE/components/NewFolderForm.stories.jsx b/client/modules/IDE/components/NewFolderForm.stories.jsx new file mode 100644 index 0000000000..0a05116bb1 --- /dev/null +++ b/client/modules/IDE/components/NewFolderForm.stories.jsx @@ -0,0 +1,8 @@ +import NewFolderForm from './NewFolderForm'; + +export default { + title: 'IDE/NewFolderForm', + component: NewFolderForm +}; + +export const Default = {}; diff --git a/client/modules/IDE/components/NewFolderModal.stories.jsx b/client/modules/IDE/components/NewFolderModal.stories.jsx new file mode 100644 index 0000000000..36db3e45bd --- /dev/null +++ b/client/modules/IDE/components/NewFolderModal.stories.jsx @@ -0,0 +1,8 @@ +import NewFolderModal from './NewFolderModal'; + +export default { + title: 'IDE/NewFolderModal', + component: NewFolderModal +}; + +export const Default = {}; diff --git a/client/modules/IDE/components/ShareModal.stories.jsx b/client/modules/IDE/components/ShareModal.stories.jsx new file mode 100644 index 0000000000..37bf731b90 --- /dev/null +++ b/client/modules/IDE/components/ShareModal.stories.jsx @@ -0,0 +1,8 @@ +import ShareModal from './ShareModal'; + +export default { + title: 'IDE/ShareModal', + component: ShareModal +}; + +export const Default = {}; diff --git a/client/modules/IDE/components/SketchList.stories.jsx b/client/modules/IDE/components/SketchList.stories.jsx new file mode 100644 index 0000000000..58971fefd9 --- /dev/null +++ b/client/modules/IDE/components/SketchList.stories.jsx @@ -0,0 +1,25 @@ +import SketchList from './SketchList'; + +export default { + title: 'IDE/SketchList', + component: SketchList +}; + +export const Default = { + args: { + user: { + username: 'Joe Blogs', + authenticated: true + }, + username: 'Joe Blogs', + loading: false, + sketches: [ + { + id: '1', + name: 'Play Sketch', + createdAt: Date.now().toString(), + updatedAt: Date.now().toString() + } + ] + } +}; diff --git a/client/modules/IDE/components/UploadFileModal.stories.jsx b/client/modules/IDE/components/UploadFileModal.stories.jsx new file mode 100644 index 0000000000..187c292c11 --- /dev/null +++ b/client/modules/IDE/components/UploadFileModal.stories.jsx @@ -0,0 +1,8 @@ +import UploadFileModal from './UploadFileModal'; + +export default { + title: 'IDE/UploadFileModal', + component: UploadFileModal +}; + +export const Default = {}; diff --git a/package-lock.json b/package-lock.json index ce124adb9b..4297d2d114 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "p5.js-web-editor", - "version": "2.9.1", + "version": "2.9.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "p5.js-web-editor", - "version": "2.9.1", + "version": "2.9.2", "license": "LGPL-2.1", "dependencies": { "@auth0/s3": "^1.0.0", diff --git a/package.json b/package.json index 9c6aaabcff..6f43829a0b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "p5.js-web-editor", - "version": "2.9.1", + "version": "2.9.2", "description": "The web editor for p5.js.", "scripts": { "clean": "rimraf dist", diff --git a/server/controllers/session.controller.js b/server/controllers/session.controller.js index 458e17def1..29b7f1be3f 100644 --- a/server/controllers/session.controller.js +++ b/server/controllers/session.controller.js @@ -31,17 +31,11 @@ export function getSession(req, res) { } export function destroySession(req, res, next) { - req.session.destroy((err) => { + req.logout((err) => { if (err) { next(err); return; } - req.logout((error) => { - if (error) { - next(error); - return; - } - res.json({ success: true }); - }); + res.json({ success: true }); }); }