Skip to content

Commit

Permalink
Update theme config (#19)
Browse files Browse the repository at this point in the history
* Add org overview

* Add verify proofs block

* Add links block

* Display links

* Chore code

* Update theme config

* Remove sass & stylelint

* Rename dashboard to app

* Remove useThemeMode hook

* Remove ThemeMode

* Move theme constants
  • Loading branch information
ardier16 authored Jan 16, 2024
1 parent b034d3b commit 98d1fa7
Show file tree
Hide file tree
Showing 47 changed files with 401 additions and 3,824 deletions.
6 changes: 0 additions & 6 deletions .stylelintignore

This file was deleted.

7 changes: 2 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@ The format is based on [Keep a Changelog], and this project adheres to [Semantic

## [Unreleased]

## [0.1.0] - 2023-12-07
### Changed
## Unreleased
### Added
- Initiated project

[Unreleased]: https://github.com/rarimo/dashboard-rarime/compare/0.1.0...HEAD
[0.1.0]: https://github.com/rarimo/dashboard-rarime/releases/tag/0.1.0

[Keep a Changelog]: https://keepachangelog.com/en/1.0.0/
[Semantic Versioning]: https://semver.org/spec/v2.0.0.html
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div align="center"><h1><b>Rarime Dashboard</b></h1></div>
<div align="center"><h1><b>Rarime App</b></h1></div>

Manage your identity credentials and Soulbound Tokens (SBTs) easily from the Rarime Dashboard.
Manage your identity credentials and Soulbound Tokens (SBTs) easily from the Rarime App.

## Getting Started

Expand Down
4 changes: 2 additions & 2 deletions env-example
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
VITE_MODE=production
VITE_PORT=8000
VITE_APP_NAME='Rarime Dashboard'
VITE_APP_DOMAIN='https://dashboard.rarime.com'
VITE_APP_NAME='Rarime App'
VITE_APP_DOMAIN='https://app.rarime.com'
VITE_DEFAULT_CHAIN='SEPOLIA'
14 changes: 7 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<title>Rarime Dashboard</title>
<title>Rarime App</title>

<noscript>
<style>
Expand All @@ -16,12 +16,12 @@
<meta name="theme-color" content="#ffffff">

<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0">
<meta name="description" content="Manage your identity credentials and Soulbound Tokens (SBTs) easily from the Rarime Dashboard">
<meta property="og:title" content="Rarime Dashboard">
<meta property="og:description" content="Manage your identity credentials and Soulbound Tokens (SBTs) easily from the Rarime Dashboard.">
<meta name="description" content="Manage your identity credentials and Soulbound Tokens (SBTs) easily from the Rarime App">
<meta property="og:title" content="Rarime App">
<meta property="og:description" content="Manage your identity credentials and Soulbound Tokens (SBTs) easily from the Rarime App.">
<!-- TODO: fix link to the actual one -->
<meta property="og:url" content="https://rarime-dashboard.com">
<meta property="og:image" content="/branding/logo.png">
<meta property="og:url" content="https://app.rarime.com">
<meta property="og:image" content="https://app.rarime.com/branding/logo.png">
<meta property="og:locale" content="en_GB">
<meta property="og:type" content="website">
<meta name="twitter:card" content="summary_large_image">
Expand All @@ -47,7 +47,7 @@
<body>
<div id="root">
<div id="noscript" class="app__init">
<img src="/branding/logo.svg" alt="react-template" width="280">
<img src="/branding/logo.svg" alt="RariMe logo" width="280">
</div>
</div>
<div id="modal"></div>
Expand Down
17 changes: 5 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "dashboard-rarime",
"version": "0.1.0",
"description": "Manage your identity credentials and Soulbound Tokens (SBTs) easily from the Rarime Dashboard.",
"name": "rarime-app",
"version": "0.0.0",
"description": "Manage your identity credentials and Soulbound Tokens (SBTs) easily from the Rarime App.",
"author": "Zero Block Global Foundation",
"license": "MIT",
"private": true,
Expand All @@ -13,7 +13,7 @@
],
"repository": {
"type": "git",
"url": "https://github.com/rarimo/dashboard-rarime.git"
"url": "https://github.com/rarimo/rarime-app.git"
},
"gitHooks": {
"pre-commit": "yarn lint",
Expand All @@ -25,8 +25,7 @@
"start": "dotenv -e .env.local yarn vite-dev-server",
"build": "dotenv -e .env.production yarn vite-build",
"analyze": "dotenv -e .env.analyze yarn vite-build",
"lint": "yarn lint:styles && yarn lint:scripts",
"lint:styles": "stylelint \"src/**/*.{css,sass,scss}\" --max-warnings=0",
"lint": "yarn lint:scripts",
"lint:scripts": "eslint \"{src,config}/**/*.{js,ts,jsx,tsx}\" --cache --fix --max-warnings=0",
"preview": "vite preview",
"rsc": "node scripts/release-sanity-check.mjs"
Expand Down Expand Up @@ -58,7 +57,6 @@
"yup": "^1.3.2"
},
"devDependencies": {
"@comparaonline/stylelint-config-scss-modules": "^1.1.0",
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
"@types/lodash": "^4",
Expand All @@ -84,11 +82,6 @@
"postcss": "^8.4.24",
"prettier": "^2.7.1",
"rollup-plugin-visualizer": "^5.9.2",
"sass": "^1.63.6",
"stylelint": "^15.9.0",
"stylelint-config-standard-scss": "^9.0.0",
"stylelint-declaration-strict-value": "^1.9.2",
"stylelint-scss": "^5.0.1",
"typescript": "^5.2.2",
"vite": "^4.4.12",
"vite-plugin-checker": "^0.6.1",
Expand Down
2 changes: 1 addition & 1 deletion scripts/release-sanity-check.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function validateChangelogHasVersionOnTop () {
}

function validateChangelogAnchorsLegend () {
const baseRepoUrl = 'https://github.com/rarimo/dashboard-rarime'
const baseRepoUrl = 'https://github.com/rarimo/rarime-app'
const anyReleaseTagRe =
/## \[\d+\.\d+\.\d+((-rc|-x)\.\d+)?\] - \d{4}-\d{2}-\d{2}/gi

Expand Down
10 changes: 2 additions & 8 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,16 @@ import { CircularProgress, CssBaseline, Stack, ThemeProvider } from '@mui/materi
import { FC, HTMLAttributes, memo, useCallback, useEffect, useState } from 'react'

import { ErrorHandler } from '@/helpers'
import {
useAuth,
useMetamaskZkpSnapContext,
useThemeMode,
useViewportSizes,
useWeb3Context,
} from '@/hooks'
import { useAuth, useMetamaskZkpSnapContext, useViewportSizes, useWeb3Context } from '@/hooks'

import { ToastsManager } from './contexts'
import { AppRoutes } from './routes'
import { theme } from './theme'

const App: FC<HTMLAttributes<HTMLDivElement>> = () => {
const [isAppInitialized, setIsAppInitialized] = useState(false)

const { provider, isValidChain } = useWeb3Context()
const { theme } = useThemeMode()
const { checkSnapStatus } = useMetamaskZkpSnapContext()
const { authorize } = useAuth()

Expand Down
1 change: 0 additions & 1 deletion src/enums/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export * from './bus'
export * from './icons'
export * from './routes'
export * from './theme'
1 change: 0 additions & 1 deletion src/hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ export * from './metamask-zkp-snap'
export * from './provider'
export * from './router'
export * from './stepper'
export * from './theme'
export * from './viewport'
export * from './web3'
40 changes: 0 additions & 40 deletions src/hooks/theme.ts

This file was deleted.

3 changes: 2 additions & 1 deletion src/layouts/AuthLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ import { Box, Stack } from '@mui/material'
import { Outlet } from 'react-router-dom'

import { config } from '@/config'
import { vh } from '@/theme/helpers'

const AuthLayout = () => {
return (
<Stack
alignItems='center'
justifyContent='center'
height='calc(100 * var(--vh, 1vh))'
height={vh(100)}
width='100%'
sx={{
backgroundImage: 'url("/imgs/app-bg.png")',
Expand Down
3 changes: 2 additions & 1 deletion src/layouts/MainLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ import { Stack } from '@mui/material'
import { Outlet } from 'react-router-dom'

import { AppNavbar } from '@/common'
import { vh } from '@/theme/helpers'

const MainLayout = () => {
return (
<Stack direction='row' px={4} py={5} spacing={4} height='calc(100 * var(--vh, 1vh))'>
<Stack direction='row' px={4} py={5} spacing={4} height={vh(100)}>
<AppNavbar />
<Stack
overflow='hidden auto'
Expand Down
2 changes: 1 addition & 1 deletion src/locales/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { initReactI18next } from 'react-i18next'

import resources from './resources'

const STORAGE_KEY = 'dashboard-rarime-locale'
const STORAGE_KEY = 'rarime-app-locale'
const DEFAULT_LOCALE = 'en-US'

const locale = localStorage?.getItem(STORAGE_KEY) ?? DEFAULT_LOCALE
Expand Down
6 changes: 3 additions & 3 deletions src/locales/resources/en.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"profile-page": {
"title" : "Profiles & Wallets",
"description": "Manage your identity credentials and Soulbound Tokens (SBTs) easily from this dashboard",
"description": "Manage your identity credentials and Soulbound Tokens (SBTs) easily from this app",
"wallet": "Wallet",
"filter": "Filter",
"empty-title": "Add Credentials",
"empty-description": "Explore credentials marketplace with different providers "
},
"sign-in-page": {
"title": "Sign in",
"description": "Manage your identity credentials and Soulbound Tokens (SBTs) easily from this dashboard",
"description": "Manage your identity credentials and Soulbound Tokens (SBTs) easily from this app",
"connect-btn": "Connect Metamask",
"install-btn": "Install Metamask",
"reload-page-btn": "Please, reload page"
Expand Down Expand Up @@ -54,6 +54,6 @@
},
"org-list": {
"title": "Organizations",
"subtitle": "Manage your identity credentials and Soulbound Tokens (SBTs) easily from this dashboard"
"subtitle": "Manage your identity credentials and Soulbound Tokens (SBTs) easily from this app"
}
}
1 change: 0 additions & 1 deletion src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import '@/styles/index.scss'
import '@/locales'
// eslint-disable-next-line import/no-unresolved
import 'virtual:svg-icons-register'
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Orgs/pages/OrgsList/components/ListCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ export default function ListCard({ org, ...rest }: Props) {
borderColor={palette.grey[300]}
>
<Grid item xs={7}>
<Typography variant={'body3'} paragraph color={palette.text.secondary}>
<Typography variant={'body3'} component={'p'} color={palette.text.secondary}>
{'Associated people'}
</Typography>
<Typography mt={2} color={palette.text.primary} variant={'overline'}>
{org.members_count}
</Typography>
</Grid>
<Grid item xs={5}>
<Typography variant={'body3'} paragraph color={palette.text.secondary}>
<Typography variant={'body3'} component={'p'} color={palette.text.secondary}>
{'Credentials'}
</Typography>
<Typography mt={2} color={palette.text.primary} variant={'overline'}>
Expand Down
3 changes: 2 additions & 1 deletion src/pages/UiKit/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ import { Stack } from '@mui/material'
import UiKitButtons from '@/pages/UiKit/UiKitButtons'
import UiKitFields from '@/pages/UiKit/UiKitFields'
import UiKitOther from '@/pages/UiKit/UiKitOther'
import { vh } from '@/theme/helpers'
import { UiTabs } from '@/ui'

export default function UiKit() {
return (
<Stack px={8} mt={40} width='100%' height='calc(100 * var(--vh, 1vh))' overflow='hidden'>
<Stack px={8} mt={40} width='100%' height={vh(100)} overflow='hidden'>
<UiTabs
tabs={[
{ label: 'BUTTONS', content: <UiKitButtons /> },
Expand Down
13 changes: 7 additions & 6 deletions src/store/modules/ui.module.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
import { ThemeMode } from '@/enums'
import { PaletteMode } from '@mui/material'

import { createStore } from '@/helpers'

interface UiStore {
viewportWidth: number
themeMode?: ThemeMode
paletteMode?: PaletteMode
}

export const [uiStore, useUiState] = createStore(
'ui',
{
viewportWidth: 0,
themeMode: ThemeMode.Light,
paletteMode: 'light',
} as UiStore,
state => ({
setViewportWidth: (width: number) => {
state.viewportWidth = width
},
setThemeMode: (mode: ThemeMode) => {
state.themeMode = mode
setPaletteMode: (mode: PaletteMode) => {
state.paletteMode = mode
},
clearUiStorage: () => {
state.themeMode = '' as ThemeMode
state.paletteMode = 'light'
state.viewportWidth = 0
},
}),
Expand Down
Loading

0 comments on commit 98d1fa7

Please sign in to comment.