├── .eslintrc.json ├── .gitignore ├── .storybook ├── main.js ├── next-preset.js ├── preview.js └── webpack.config.js ├── Dockerfile ├── LICENSE ├── README.md ├── azure-pipelines-1.yml ├── azure-pipelines-2.yml ├── azure-pipelines.yml ├── next-env.d.ts ├── next.config.js ├── package.json ├── public ├── LanguageCheck.svg ├── angular.jpg ├── avatar-example.jpg ├── avatar.jpg ├── comment.svg ├── copy.svg ├── discord.svg ├── dislike.svg ├── edit.svg ├── favicon.ico ├── file.svg ├── firefox.svg ├── following.svg ├── github-2 1.svg ├── github.svg ├── google.svg ├── hide.svg ├── img.jpg ├── info.svg ├── ipfs.svg ├── like.svg ├── linkedin.svg ├── medium.svg ├── megaphone.svg ├── more.svg ├── photo.svg ├── qr.svg ├── react_logo.svg ├── reactions.svg ├── reddit.svg ├── share.svg ├── subsocial_text.svg ├── telegram.svg ├── telegram2.svg ├── translation.svg ├── twitter.svg ├── vue.svg ├── wallet.jpg ├── world.svg └── youtube.svg ├── scripts └── copy-lang.js ├── src ├── components │ ├── account │ │ ├── Account.module.sass │ │ ├── Account.tsx │ │ ├── AccountDescription.tsx │ │ └── followers-block │ │ │ ├── FollowersBlock.module.sass │ │ │ └── FollowersBlock.tsx │ ├── activity │ │ └── feed │ │ │ └── MyFeed.tsx │ ├── api │ │ ├── ApiContext.tsx │ │ └── index.tsx │ ├── auth │ │ └── AuthContext.tsx │ ├── common │ │ ├── Embed.tsx │ │ ├── address │ │ │ ├── Address.module.sass │ │ │ └── Address.tsx │ │ ├── avatar │ │ │ ├── AvatarElement.module.sass │ │ │ └── AvatarElement.tsx │ │ ├── balance │ │ │ ├── Balance.module.sass │ │ │ └── Balance.tsx │ │ ├── button │ │ │ ├── ButtonReply.tsx │ │ │ ├── TxButton.tsx │ │ │ ├── button-cancel │ │ │ │ ├── ButtonCancel.module.sass │ │ │ │ └── ButtonCancel.tsx │ │ │ ├── button-close │ │ │ │ ├── ButtonClose.module.sass │ │ │ │ └── ButtonClose.tsx │ │ │ ├── button-comment │ │ │ │ ├── ButtonComment.module.sass │ │ │ │ └── ButtonComment.tsx │ │ │ ├── button-component │ │ │ │ ├── ButtonComponent.module.sass │ │ │ │ └── ButtonComponent.tsx │ │ │ ├── button-edit │ │ │ │ ├── ButtonEdit.module.sass │ │ │ │ └── ButtonEdit.tsx │ │ │ ├── button-entity │ │ │ │ ├── ButtonEntity.module.sass │ │ │ │ └── ButtonEntity.tsx │ │ │ ├── button-follow │ │ │ │ ├── ButtonFollowAccount.tsx │ │ │ │ └── ButtonFollowSpace.tsx │ │ │ ├── button-icon │ │ │ │ ├── ButtonIcon.module.sass │ │ │ │ └── ButtonIcon.tsx │ │ │ ├── button-notification │ │ │ │ ├── ButtonNotification.tsx │ │ │ │ └── ButtonNotificatoin.module.sass │ │ │ ├── button-options │ │ │ │ ├── ButtonOptions.module.sass │ │ │ │ └── ButtonOptions.tsx │ │ │ ├── button-profile │ │ │ │ ├── ButtonProfile.module.sass │ │ │ │ └── ButtonProfile.tsx │ │ │ ├── button-qr │ │ │ │ └── ButtonQr.tsx │ │ │ ├── button-send-tips │ │ │ │ ├── ButtonSendTips.module.sass │ │ │ │ └── ButtonSendTips.tsx │ │ │ ├── button-share │ │ │ │ ├── ButtonShare.module.sass │ │ │ │ └── ButtonShare.tsx │ │ │ ├── button-sign-in │ │ │ │ └── ButtonSignIn.tsx │ │ │ ├── button-sign-out │ │ │ │ ├── ButtonSignOut.module.sass │ │ │ │ └── ButtonSignOut.tsx │ │ │ ├── button-toggler-visibility │ │ │ │ ├── ButtonTogglerVisibility.tsx │ │ │ │ └── ButtonsTogglerVisibility.module.sass │ │ │ ├── button-wtire-post │ │ │ │ └── ButtonWritePost.tsx │ │ │ └── buttons-vote │ │ │ │ ├── ButtonVotes.tsx │ │ │ │ ├── ButtonsVote.module.sass │ │ │ │ └── voting.ts │ │ ├── card-edit │ │ │ ├── CardEdit.module.sass │ │ │ └── CardEdit.tsx │ │ ├── card-wrapper │ │ │ ├── CardWrapper.module.sass │ │ │ └── CardWrapper.tsx │ │ ├── comments │ │ │ ├── Comment.tsx │ │ │ ├── CommentAction.tsx │ │ │ ├── Comments.module.sass │ │ │ ├── Comments.tsx │ │ │ ├── EditComment.tsx │ │ │ └── NewComment.tsx │ │ ├── editor │ │ │ └── Editor.tsx │ │ ├── empty │ │ │ ├── EmptyComponent.module.sass │ │ │ └── EmptyComponent.tsx │ │ ├── file │ │ │ ├── File.module.sass │ │ │ ├── File.tsx │ │ │ └── FileWarning.tsx │ │ ├── hidden-component │ │ │ ├── HiddenComponent.module.sass │ │ │ └── HiddenComponent.tsx │ │ ├── icons │ │ │ ├── IconComment.tsx │ │ │ ├── IconDislike.tsx │ │ │ ├── IconLike.tsx │ │ │ └── Icons.module.sass │ │ ├── image │ │ │ └── Image.tsx │ │ ├── infinity-list │ │ │ ├── InfinityListScroll.module.sass │ │ │ └── InfinityListScroll.tsx │ │ ├── inputs │ │ │ ├── input-money │ │ │ │ ├── InputMoney.module.sass │ │ │ │ └── InputMoney.tsx │ │ │ ├── input │ │ │ │ ├── Input.module.sass │ │ │ │ └── Input.tsx │ │ │ └── tags-input │ │ │ │ ├── TagsInput.module.sass │ │ │ │ └── TagsInput.tsx │ │ ├── links │ │ │ ├── icon-link │ │ │ │ ├── IconLink.module.sass │ │ │ │ └── IconLink.tsx │ │ │ ├── link │ │ │ │ ├── Link.module.sass │ │ │ │ └── Link.tsx │ │ │ ├── see-more │ │ │ │ ├── SeeMore.module.sass │ │ │ │ └── SeeMore.tsx │ │ │ └── small-link │ │ │ │ ├── SmallLink.module.sass │ │ │ │ └── SmallLink.tsx │ │ ├── loader │ │ │ ├── Loader.module.sass │ │ │ └── Loader.tsx │ │ ├── profile-followers │ │ │ ├── ProfileFollowers.module.sass │ │ │ └── ProfileFollowers.tsx │ │ ├── select-spaces │ │ │ ├── SelectSpaces.module.sass │ │ │ └── SelectSpaces.tsx │ │ ├── snackbar │ │ │ ├── Snackbar.module.sass │ │ │ └── Snackbar.tsx │ │ ├── space-hidden-component │ │ │ ├── SpaceHiddenComponent.module.sass │ │ │ └── SpaceHiddenComponent.tsx │ │ ├── tabs │ │ │ ├── Tabs.module.sass │ │ │ └── Tabs.tsx │ │ ├── tag │ │ │ ├── Tag.module.sass │ │ │ ├── Tag.tsx │ │ │ └── TagList.tsx │ │ ├── text │ │ │ ├── Text.module.sass │ │ │ └── Text.tsx │ │ ├── title │ │ │ ├── Title.module.sass │ │ │ └── Title.tsx │ │ └── vote-user-item │ │ │ ├── VoteUserItem.tsx │ │ │ └── VoteUserListItem.module.sass │ ├── header │ │ ├── Header.module.sass │ │ └── Header.tsx │ ├── home │ │ ├── HomePage.module.sass │ │ └── HomePage.tsx │ ├── layout │ │ ├── Layout.module.sass │ │ ├── Layout.tsx │ │ └── MainPage.tsx │ ├── modal │ │ ├── Modal.module.sass │ │ ├── Modal.tsx │ │ ├── modal-adblock │ │ │ ├── ModalAdBlock.module.sass │ │ │ └── ModalAdBlock.tsx │ │ ├── modal-create-shared-post │ │ │ ├── ModalCreateSharedPost.module.sass │ │ │ └── ModalCreateSharedPost.tsx │ │ ├── modal-qr │ │ │ ├── ModalQr.module.sass │ │ │ └── ModalQr.tsx │ │ ├── modal-reactions │ │ │ ├── ModalConnections.tsx │ │ │ ├── ModalReactions.module.sass │ │ │ ├── ModalReactionsLayout.tsx │ │ │ ├── ModalReactionsList.tsx │ │ │ ├── ModalVotes.tsx │ │ │ └── modal-follow │ │ │ │ └── ModalFollow.tsx │ │ ├── modal-send-tips │ │ │ ├── ModalSendTips.module.sass │ │ │ └── ModalSendTips.tsx │ │ └── modal-sign-in │ │ │ ├── Accounts.tsx │ │ │ ├── ModalListUserItem.tsx │ │ │ ├── ModalSignIn.module.sass │ │ │ ├── ModalSignIn.tsx │ │ │ ├── ModalSignInInfo.tsx │ │ │ ├── NoAccount.tsx │ │ │ ├── NoExtension.tsx │ │ │ └── Tokens.tsx │ ├── post │ │ ├── loadSuggestedPostIdsFromEnv.ts │ │ ├── post-full │ │ │ ├── PostFull.module.sass │ │ │ └── PostFull.tsx │ │ ├── post-item │ │ │ ├── Post.module.sass │ │ │ ├── Post.tsx │ │ │ ├── PostInfo.tsx │ │ │ ├── post-actions │ │ │ │ └── PostActions.tsx │ │ │ └── post-content │ │ │ │ └── PostContent.tsx │ │ ├── post-list │ │ │ └── post-list.tsx │ │ ├── post-page │ │ │ ├── PostPage.module.sass │ │ │ ├── PostPage.tsx │ │ │ └── loadPostOnNextReq.ts │ │ ├── shared-post │ │ │ └── SharedPost.tsx │ │ └── upsert-page │ │ │ ├── EditorPost.tsx │ │ │ ├── UpsertPost.module.sass │ │ │ └── UpsertPost.tsx │ ├── profile │ │ ├── profile-account │ │ │ ├── ProfileAccount.module.sass │ │ │ └── ProfileAccount.tsx │ │ └── profile-page │ │ │ └── ProfilePage.tsx │ ├── responsive │ │ └── ResponsiveContext.tsx │ ├── sidebar │ │ ├── Sidebar.module.sass │ │ ├── Sidebar.tsx │ │ └── sidebar-menu.tsx │ ├── space │ │ ├── reloadSpaceIdsFollowedByAccount.ts │ │ ├── space-account │ │ │ ├── SpaceAccount.module.sass │ │ │ └── SpaceAccount.tsx │ │ ├── space-edit-page │ │ │ ├── SpaceEditPage.module.sass │ │ │ └── SpaceEditPage.tsx │ │ ├── space-item │ │ │ ├── Space.module.sass │ │ │ ├── Space.tsx │ │ │ └── SpaceInfo.tsx │ │ ├── space-list │ │ │ └── space-list.tsx │ │ ├── space-new-page │ │ │ └── SpaceNewPage.tsx │ │ ├── space-page │ │ │ ├── SpacePage.module.sass │ │ │ ├── SpacePage.tsx │ │ │ └── loadSpaceOnNextReq.ts │ │ └── toEdit.ts │ ├── switch-account │ │ ├── AccountFollowers.tsx │ │ ├── SwitchAccount.module.sass │ │ ├── SwitchAccount.tsx │ │ ├── SwitchAccountContent.tsx │ │ ├── SwitchAccountMenu.tsx │ │ └── SwitchAccountsExtension.tsx │ └── utils │ │ ├── Section.tsx │ │ ├── address.tsx │ │ ├── embed.ts │ │ ├── getIds.ts │ │ ├── getInitialPostValue.tsx │ │ ├── getTxParams.ts │ │ ├── index.ts │ │ ├── insertDash.ts │ │ ├── labelForMenuItem.tsx │ │ ├── next.ts │ │ ├── num.ts │ │ ├── socialIcons.tsx │ │ ├── subsocial.ts │ │ ├── unpinIpfsCid.ts │ │ └── useLinkParams.ts ├── config │ └── index.ts ├── hooks │ ├── useDrawerSize.ts │ ├── useIsMySpace.ts │ ├── useIsUnlistedPost.tsx │ ├── useLoader.ts │ ├── useLocalStorage.ts │ ├── useModal.ts │ └── useSnackbar.ts ├── i18n │ ├── en.json │ ├── index.js │ ├── languages.ts │ └── ru.json ├── models │ ├── account.ts │ ├── auth.ts │ ├── comments.ts │ ├── common │ │ ├── address-props.ts │ │ ├── avatar.ts │ │ ├── balance.ts │ │ ├── button.ts │ │ ├── card-edit.ts │ │ ├── editor.ts │ │ ├── embed.ts │ │ ├── empty.ts │ │ ├── file.ts │ │ ├── followers-block.ts │ │ ├── icon.ts │ │ ├── input.ts │ │ ├── link.ts │ │ ├── profile-followers.ts │ │ ├── snackbar.ts │ │ ├── tabs.ts │ │ ├── tags.ts │ │ └── typography.ts │ ├── dataActivities.ts │ ├── header.ts │ ├── infinity-scroll.ts │ ├── modal.ts │ ├── notifications.ts │ ├── post.ts │ ├── profile.ts │ ├── sidebar.ts │ └── space.ts ├── pages │ ├── [spaceId] │ │ ├── [post] │ │ │ ├── edit.ts │ │ │ └── index.ts │ │ ├── edit.ts │ │ └── index.ts │ ├── _app.tsx │ ├── accounts │ │ └── [address] │ │ │ └── index.ts │ ├── index.ts │ ├── new.ts │ └── posts │ │ └── new.ts ├── store │ ├── app │ │ ├── helpers.ts │ │ ├── hooks.ts │ │ ├── hooksCommon.ts │ │ ├── index.ts │ │ ├── nextHelpers.tsx │ │ ├── rootReducer.ts │ │ └── store.ts │ └── features │ │ ├── contents │ │ └── contentsSlice.ts │ │ ├── mainSlice.ts │ │ ├── myAccount │ │ ├── myAccountHooks.ts │ │ └── myAccountSlice.ts │ │ ├── posts │ │ ├── postsHooks.ts │ │ └── postsSlice.ts │ │ ├── profiles │ │ ├── followedAccountIdsSlice.ts │ │ ├── profilesHooks.ts │ │ └── profilesSlice.ts │ │ ├── reactions │ │ ├── myPostReactionsHooks.ts │ │ └── myPostReactionsSlice.ts │ │ ├── replies │ │ └── repliesSlice.ts │ │ ├── spaceIds │ │ └── followedSpaceIdsSlice.ts │ │ └── spaces │ │ ├── spacesHooks.ts │ │ └── spacesSlice.ts ├── styles │ ├── _vars.sass │ ├── common.sass │ └── github-markdown.sass ├── stylesheets │ └── theme.ts └── utils │ └── index.ts ├── stories ├── Header.stories.tsx ├── buttons │ ├── ButtonComponent.stories.tsx │ ├── ButtonDownvote.stories.tsx │ ├── ButtonFollow.stories.tsx │ ├── ButtonFollowing.stories.tsx │ ├── ButtonUpvote.stories.tsx │ ├── CloseButton.stories.tsx │ ├── CommentButton.stories.tsx │ ├── CreateEntityButton.stories.tsx │ ├── CreateSpaceButton.stories.tsx │ ├── EditButton.stories.tsx │ ├── NotificationButton.stories.tsx │ ├── Option.stories.tsx │ ├── ProfileButton.stories.tsx │ ├── QrButton.stories.tsx │ ├── ReplyButton.stories.tsx │ ├── SendTipsButton.stories.tsx │ ├── ShareButton.stories.tsx │ ├── SignInButton.stories.tsx │ ├── SignOutButton.stories.tsx │ └── WritePostButton.stories.tsx ├── comments │ ├── CommentDefault.stories.tsx │ ├── CommentEdit.stories.tsx │ ├── CommentInput.stories.tsx │ └── CommentList.stories.tsx ├── content │ ├── HiddenContent.stories.tsx │ ├── NoContent.stories.tsx │ └── PostWithHiddenSpace.stories.tsx ├── inputs │ ├── ImageLoader.stories.tsx │ ├── Input.stories.tsx │ ├── MarkdownEditor.stories.tsx │ ├── Tag.stories.tsx │ └── TagInput.stories.tsx ├── mocked-data │ ├── MockedData.tsx │ ├── comment.ts │ ├── consts.ts │ ├── index.ts │ ├── posts.ts │ ├── profile.ts │ └── space.ts ├── modal │ ├── ModalAdBlock.stories.tsx │ ├── ModalConnections.stories.tsx │ ├── ModalFollowers.stories.tsx │ ├── ModalLogin.stories.tsx │ ├── ModalQr.stories.tsx │ ├── ModalSendTips.stories.tsx │ └── ModalSharePost.stories.tsx ├── post │ ├── Post.stories.tsx │ ├── PostInfo.stories.tsx │ └── SharedPostItem.stories.tsx ├── profile │ ├── AccountListItem.stories.tsx │ ├── ProfileAccount.stories.tsx │ └── SwitchAccountListItem.stories.tsx ├── shared │ ├── Address.stories.tsx │ ├── Avatar.stories.tsx │ ├── Balance.stories.tsx │ ├── Link.stories.tsx │ ├── LinkIcon.stories.tsx │ ├── LinkSmall.stories.tsx │ └── Tabs.stories.tsx ├── space │ ├── SpaceInfo.stories.tsx │ ├── SpaceItem.stories.tsx │ └── SpaceSelect.stories.tsx └── text │ ├── SeeMore.stories.tsx │ ├── Text.stories.tsx │ ├── TextWithSeeMore.stories.tsx │ └── Title.stories.tsx ├── tsconfig.json └── yarn.lock /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | /.idea 4 | *.lock 5 | 6 | # dependencies 7 | /node_modules 8 | /.pnp 9 | .pnp.js 10 | 11 | # testing 12 | /coverage 13 | 14 | # next.js 15 | /.next/ 16 | /out/ 17 | 18 | # production 19 | /build 20 | /storybook-static 21 | 22 | # misc 23 | .DS_Store 24 | *.pem 25 | 26 | # debug 27 | npm-debug.log* 28 | yarn-debug.log* 29 | yarn-error.log* 30 | 31 | # local env files 32 | .env.local 33 | .env.development.local 34 | .env.test.local 35 | .env.production.local 36 | 37 | # vercel 38 | .vercel 39 | -------------------------------------------------------------------------------- /.storybook/main.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "stories": [ 3 | "../stories/**/*.stories.mdx", 4 | "../stories/**/*.stories.@(js|jsx|ts|tsx)" 5 | ], 6 | "addons": [ 7 | "@storybook/addon-links", 8 | "@storybook/addon-essentials", 9 | "@storybook/preset-scss", 10 | "storybook-addon-next-router", 11 | 'storybook-react-i18next' 12 | ], 13 | webpackFinal: (config) => { 14 | const path = require('path'); 15 | 16 | delete config.resolve.alias['emotion-theming']; 17 | delete config.resolve.alias['@emotion/styled']; 18 | delete config.resolve.alias['@emotion/core']; 19 | 20 | config.module.rules.push({ 21 | test: /\.(s*)css$/, 22 | use: ['style-loader', 'sass-loader'], 23 | include: path.resolve(__dirname, '../src'), 24 | }); 25 | 26 | return config; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /.storybook/next-preset.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | 3 | module.exports = { 4 | webpackFinal: async (baseConfig) => { 5 | const { module = {} } = baseConfig; 6 | 7 | const newConfig = { 8 | ...baseConfig, 9 | module: { 10 | ...module, 11 | rules: [...(module.rules || [])], 12 | }, 13 | }; 14 | 15 | // TypeScript 16 | newConfig.module.rules.push({ 17 | test: /\.(ts|tsx)$/, 18 | include: [path.resolve(__dirname, '../components')], 19 | use: [ 20 | { 21 | loader: 'babel-loader', 22 | options: { 23 | presets: ['next/babel', require.resolve('babel-preset-react-app')], 24 | plugins: ['react-docgen'], 25 | }, 26 | }, 27 | ], 28 | }); 29 | newConfig.resolve.extensions.push('.ts', '.tsx'); 30 | 31 | return newConfig; 32 | }, 33 | }; 34 | -------------------------------------------------------------------------------- /.storybook/webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin') 3 | 4 | module.exports = ({config, isServer}) => { 5 | 6 | if (!isServer) { 7 | config.node = { 8 | fs: 'empty' 9 | } 10 | } 11 | 12 | // TSConfig, uses the same file as packages 13 | config.resolve.plugins = config.resolve.plugins || [] 14 | config.module.rules.push({ 15 | test: /\.js$/, 16 | loader: require.resolve('@open-wc/webpack-import-meta-loader') 17 | }) 18 | config.resolve.plugins.push( 19 | new TsconfigPathsPlugin({ 20 | configFile: path.resolve(__dirname, '../tsconfig.json'), 21 | }) 22 | ) 23 | 24 | return config 25 | } 26 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:latest 2 | WORKDIR /app 3 | 4 | COPY . . 5 | 6 | RUN npm install && npm run build 7 | 8 | ENTRYPOINT ["npm", "run", "start"] -------------------------------------------------------------------------------- /azure-pipelines-1.yml: -------------------------------------------------------------------------------- 1 | # Node.js 2 | # Build a general Node.js project with npm. 3 | # Add steps that analyze code, save build artifacts, deploy, and more: 4 | # https://docs.microsoft.com/azure/devops/pipelines/languages/javascript 5 | 6 | trigger: 7 | - master 8 | 9 | pool: 10 | vmImage: ubuntu-latest 11 | 12 | steps: 13 | - task: NodeTool@0 14 | inputs: 15 | versionSpec: '16.10' 16 | displayName: 'Install Node.js 16.10' 17 | 18 | - script: 19 | npm install yarn 20 | displayName: 'npm install yarn' 21 | 22 | - script: 23 | yarn install 24 | displayName: 'yarn install' 25 | 26 | - script: | 27 | yarn run build 28 | yarn run build-storybook 29 | displayName: 'yarn build' 30 | 31 | - task: ArchiveFiles@2 32 | displayName: 'Archive files' 33 | inputs: 34 | rootFolderOrFile: '$(System.DefaultWorkingDirectory)/storybook-static' 35 | includeRootFolder: false 36 | archiveType: zip 37 | archiveFile: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip 38 | replaceExistingArchive: true 39 | 40 | - upload: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip 41 | artifact: drop 42 | -------------------------------------------------------------------------------- /azure-pipelines-2.yml: -------------------------------------------------------------------------------- 1 | # Node.js 2 | # Build a general Node.js project with npm. 3 | # Add steps that analyze code, save build artifacts, deploy, and more: 4 | # https://docs.microsoft.com/azure/devops/pipelines/languages/javascript 5 | 6 | trigger: 7 | - develop 8 | 9 | pool: 10 | vmImage: ubuntu-latest 11 | 12 | steps: 13 | - task: NodeTool@0 14 | inputs: 15 | versionSpec: '16.10' 16 | displayName: 'Install Node.js 16.10' 17 | 18 | - script: 19 | npm install yarn 20 | displayName: 'npm install yarn' 21 | 22 | - script: 23 | yarn install 24 | displayName: 'yarn install' 25 | 26 | - script: | 27 | yarn run build 28 | yarn run build-storybook 29 | displayName: 'yarn build' 30 | 31 | - task: ArchiveFiles@2 32 | displayName: 'Archive files' 33 | inputs: 34 | rootFolderOrFile: '$(System.DefaultWorkingDirectory)/' 35 | includeRootFolder: false 36 | archiveType: zip 37 | archiveFile: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip 38 | replaceExistingArchive: true 39 | 40 | - upload: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip 41 | artifact: drop 42 | -------------------------------------------------------------------------------- /azure-pipelines.yml: -------------------------------------------------------------------------------- 1 | # Node.js 2 | # Build a general Node.js project with npm. 3 | # Add steps that analyze code, save build artifacts, deploy, and more: 4 | # https://docs.microsoft.com/azure/devops/pipelines/languages/javascript 5 | 6 | trigger: 7 | - master 8 | 9 | pool: 10 | vmImage: ubuntu-latest 11 | 12 | steps: 13 | - task: NodeTool@0 14 | inputs: 15 | versionSpec: '16.10' 16 | displayName: 'Install Node.js 16.10' 17 | 18 | - script: 19 | npm install yarn 20 | displayName: 'npm install yarn' 21 | 22 | - script: 23 | yarn install 24 | displayName: 'yarn install' 25 | 26 | - script: | 27 | yarn run build 28 | yarn run build-storybook 29 | displayName: 'yarn build' 30 | 31 | - task: ArchiveFiles@2 32 | displayName: 'Archive files' 33 | inputs: 34 | rootFolderOrFile: '$(System.DefaultWorkingDirectory)/' 35 | includeRootFolder: false 36 | archiveType: zip 37 | archiveFile: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip 38 | replaceExistingArchive: true 39 | 40 | - upload: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip 41 | artifact: drop 42 | -------------------------------------------------------------------------------- /next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | /// 4 | 5 | // NOTE: This file should not be edited 6 | // see https://nextjs.org/docs/basic-features/typescript for more information. 7 | -------------------------------------------------------------------------------- /public/LanguageCheck.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/angular.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dappforce/subsocial-react-template/8824e085f94948fef2a9f37cad6283853383ccfc/public/angular.jpg -------------------------------------------------------------------------------- /public/avatar-example.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dappforce/subsocial-react-template/8824e085f94948fef2a9f37cad6283853383ccfc/public/avatar-example.jpg -------------------------------------------------------------------------------- /public/avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dappforce/subsocial-react-template/8824e085f94948fef2a9f37cad6283853383ccfc/public/avatar.jpg -------------------------------------------------------------------------------- /public/comment.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /public/copy.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /public/dislike.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /public/edit.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dappforce/subsocial-react-template/8824e085f94948fef2a9f37cad6283853383ccfc/public/favicon.ico -------------------------------------------------------------------------------- /public/file.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/following.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /public/google.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /public/hide.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/img.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dappforce/subsocial-react-template/8824e085f94948fef2a9f37cad6283853383ccfc/public/img.jpg -------------------------------------------------------------------------------- /public/info.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/like.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /public/megaphone.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /public/more.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /public/photo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/reactions.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/reddit.svg: -------------------------------------------------------------------------------- 1 | Reddit icon 2 | -------------------------------------------------------------------------------- /public/share.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/telegram.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/telegram2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /public/translation.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/twitter.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /public/vue.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/wallet.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dappforce/subsocial-react-template/8824e085f94948fef2a9f37cad6283853383ccfc/public/wallet.jpg -------------------------------------------------------------------------------- /public/world.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/youtube.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /scripts/copy-lang.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs"); 2 | const path = require("path"); 3 | 4 | const INPUT_PATH = "../node_modules/@subsocial/i18n/examples"; 5 | const OUTPUT_PATH = "../src/i18n"; 6 | 7 | const inputFolderPath = path.join(__dirname, INPUT_PATH); 8 | const outputFolderPath = path.join(__dirname, OUTPUT_PATH); 9 | 10 | const files = fs.readdirSync(inputFolderPath); 11 | 12 | files.forEach((file) => resolveFile(file)); 13 | 14 | function resolveFile(file) { 15 | try { 16 | const data = fs.readFileSync(inputFolderPath + "/" + file); 17 | const langObj = JSON.parse(data); 18 | 19 | iterate(langObj); 20 | 21 | const stringify = JSON.stringify(langObj, null, 2); 22 | 23 | fs.writeFileSync(outputFolderPath + "/" + file, stringify); 24 | 25 | console.log(`File ${file} saved in directory ${outputFolderPath}`); 26 | } catch (e) { 27 | console.error(e); 28 | } 29 | } 30 | 31 | function iterate(obj) { 32 | for (let key in obj) { 33 | if (obj.hasOwnProperty(key)) { 34 | if (typeof obj[key] === "object") { 35 | iterate(obj[key]); 36 | } else { 37 | const value = obj[key].replace(/{/g, "{{").replace(/}/g, "}}"); 38 | obj[key] = value; 39 | } 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/components/account/Account.module.sass: -------------------------------------------------------------------------------- 1 | @import src/styles/vars 2 | 3 | .title 4 | margin-bottom: $space_mini 5 | 6 | .subheader 7 | display: flex 8 | flex-direction: column 9 | row-gap: 0.75rem 10 | 11 | .content 12 | font-size: $font_normal 13 | 14 | .button 15 | width: 100% 16 | 17 | .balance 18 | gap: .25rem !important 19 | 20 | .seemore 21 | padding: 0 22 | font-size: $font_normal 23 | color: $color_text_primary 24 | font-weight: 500 25 | white-space: nowrap 26 | 27 | .followers 28 | button span 29 | font-weight: 500 30 | 31 | .cardAction 32 | padding: 0 $space_normal $space_normal 33 | 34 | .accountBalanceInfo 35 | padding-top: 0 36 | display: flex 37 | flex-direction: column 38 | gap: 1rem 39 | 40 | .spaceIcon 41 | flex-wrap: wrap 42 | gap: 0.5rem 43 | 44 | .accountWallet 45 | display: flex 46 | gap: 0.25rem 47 | 48 | .accountButtons 49 | gap: 0.8125rem 50 | 51 | .description 52 | padding-top: 0 53 | padding-bottom: $space_normal 54 | -------------------------------------------------------------------------------- /src/components/account/AccountDescription.tsx: -------------------------------------------------------------------------------- 1 | import { FC, useCallback, useState } from 'react'; 2 | import ReactMarkdown from 'react-markdown'; 3 | import styles from './Account.module.sass'; 4 | import { CardContent } from '@mui/material'; 5 | import Text from '../common/text/Text'; 6 | import { TextSizes } from '../../models/common/typography'; 7 | import { AccountDescriptionProps } from '../../models/account'; 8 | import { useRouter } from 'next/router'; 9 | import { useTranslation } from 'react-i18next'; 10 | 11 | export const AccountDescription: FC = (props) => { 12 | const router = useRouter(); 13 | const [isShowMore, setIsShowMore] = useState(!!router?.query.isAutoExpand); 14 | const { t } = useTranslation(); 15 | 16 | const toggleText = useCallback( 17 | () => setIsShowMore((current) => !current), 18 | [] 19 | ); 20 | 21 | if (!props.about) return null; 22 | 23 | return ( 24 | 25 | 30 | {isShowMore || !props.isShowMore ? ( 31 | 32 | {props.about} 33 | 34 | ) : ( 35 | props.summary 36 | )}{' '} 37 | {props.isShowMore && ( 38 | 41 | )} 42 | 43 | 44 | ); 45 | }; 46 | -------------------------------------------------------------------------------- /src/components/account/followers-block/FollowersBlock.module.sass: -------------------------------------------------------------------------------- 1 | @import src/styles/vars 2 | 3 | .bold 4 | font-weight: 500 5 | 6 | .followers 7 | display: flex 8 | column-gap: 0.6rem 9 | 10 | 11 | button 12 | padding: 0 13 | color: #000000 14 | 15 | p 16 | margin: 0 17 | -------------------------------------------------------------------------------- /src/components/account/followers-block/FollowersBlock.tsx: -------------------------------------------------------------------------------- 1 | import React, { FC } from 'react'; 2 | import styles from './FollowersBlock.module.sass'; 3 | import { FollowersBlockProps } from 'src/models/common/followers-block'; 4 | import { transformCount } from '../../../utils'; 5 | import ModalFollow from '../../modal/modal-reactions/modal-follow/ModalFollow'; 6 | import Modal from '../../modal/Modal'; 7 | import { useModal } from 'src/hooks/useModal'; 8 | import { useTranslation } from 'react-i18next'; 9 | 10 | const FollowersBlock: FC = ({ 11 | className, 12 | followers = 0, 13 | posts = 0, 14 | id, 15 | }) => { 16 | const classname = className 17 | ? `${className} ${styles.followers}` 18 | : styles.followers; 19 | const { isVisible, toggleModal } = useModal(); 20 | const { t } = useTranslation(); 21 | 22 | return ( 23 |
24 | 25 | 26 | 27 | 31 | 35 |
36 | ); 37 | }; 38 | 39 | export default FollowersBlock; 40 | -------------------------------------------------------------------------------- /src/components/activity/feed/MyFeed.tsx: -------------------------------------------------------------------------------- 1 | import { AccountId } from '@subsocial/api/types/dto'; 2 | import { ListType } from 'src/components/home/HomePage'; 3 | import PostList from 'src/components/post/post-list/post-list'; 4 | 5 | export const MyFeed = ({ 6 | ids, 7 | type, 8 | address, 9 | }: { 10 | ids: string[]; 11 | type: ListType; 12 | address?: AccountId; 13 | }) => { 14 | return ( 15 | 21 | ); 22 | }; 23 | 24 | export default MyFeed; 25 | -------------------------------------------------------------------------------- /src/components/api/index.tsx: -------------------------------------------------------------------------------- 1 | export * from './ApiContext'; 2 | -------------------------------------------------------------------------------- /src/components/common/Embed.tsx: -------------------------------------------------------------------------------- 1 | import { allowEmbedList, getEmbedUrl } from '../utils/embed'; 2 | import { EmbedProps } from '../../models/common/embed'; 3 | 4 | const Embed = ({ link, className }: EmbedProps) => { 5 | const embed = allowEmbedList.find((embed) => link.includes(embed)); 6 | const src = getEmbedUrl(link, embed); 7 | 8 | return ( 9 | <> 10 | {src && ( 11 |
20 |