Skip to content

Commit

Permalink
Feature/Readme (#75)
Browse files Browse the repository at this point in the history
* added readme

* added readme
  • Loading branch information
lilbonekit authored Oct 8, 2024
1 parent a47ecdd commit 9718596
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 16 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@

**Everything about Solarity ecosystem.**

## Environment Variables

Create a `.env` file in the root of the project and add the following environment variables:
- **`VITE_ENVIRONMENT`** — Specifies the environment (`development` or `production`).
- **`VITE_PORT`** — The available port number for the app.
- **`VITE_APP_API_URL`** — API base URL (e.g., `'https://api.stage.solarity.dev'`).
- **`VITE_APP_NAME`** — Application name (e.g., `'Solarity'`).
- **`VITE_APP_COMPANY_URL`** — Company website URL (e.g., `'https://distributedlab.com'`).
- **`VITE_APP_DOCUMENTATION_URL`** — Documentation URL (e.g., `'https://docs.stage.solarity.dev'`).
- **`VITE_APP_GITHUB_URL`** — GitHub repository URL (e.g., `'https://github.com/dl-solarity'`).

The example of `.env` file can be found in the [`.env.example`](.env.example) file.

## Setup

Make sure to install the dependencies:
Expand Down
1 change: 0 additions & 1 deletion forms/DurationForm.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
\
<template>
<form class="duration-form">
<div class="duration-form__input">
Expand Down
9 changes: 6 additions & 3 deletions helpers/period.helpers.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { PERIOD_IDS, PERIOD_CONSTANTS } from '@/enums'
import { duration } from 'dayjs'
import dayjs from 'dayjs'
import DurationPlugin from 'dayjs/plugin/duration'
import { Periods, PeriodKeys } from 'types/period.types'

dayjs.extend(DurationPlugin)

export const getTransformedPeriod = (dateString: string) => {
const dateUnits = Object.entries(PERIOD_IDS)

Expand All @@ -26,7 +29,7 @@ export const getTransformedPeriod = (dateString: string) => {
export const getNormalizedPeriod = (rawDuration: Periods): Periods => {
const normalizedTime = { ...rawDuration }
const seconds = getTotalDurationAsSeconds(rawDuration)
let totalDuration = duration(0)
let totalDuration = dayjs.duration(0)

totalDuration = totalDuration.add(seconds, 'seconds')

Expand Down Expand Up @@ -55,7 +58,7 @@ export const getNormalizedPeriod = (rawDuration: Periods): Periods => {
}

export const getTotalDurationAsSeconds = (rawDuration: Periods) => {
let totalDuration = duration(0)
let totalDuration = dayjs.duration(0)

totalDuration = totalDuration
.add(rawDuration.seconds, 'seconds')
Expand Down
27 changes: 15 additions & 12 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -97,21 +97,24 @@ http {
aio threads;
try_files $uri $uri/index.html =404;
}
location ~ ^/abi/encoder/.* {
error_page 404 /404.html;
}
location ~ ^/abi/encoder/.* {
error_page 404 /404.html;
}
location ~ ^/abi/decoder/.* {
error_page 404 /404.html;
}
location ~ ^/hash-function/keccak256/.* {
error_page 404 /404.html;
}
error_page 404 /404.html;
}
location ~ ^/hash-function/keccak256/.* {
error_page 404 /404.html;
}
location ~ ^/hash-function/sha256/.* {
error_page 404 /404.html;
}
location ~ ^/hash-function/ripemd160/.* {
error_page 404 /404.html;
}
}
location ~ ^/hash-function/ripemd160/.* {
error_page 404 /404.html;
}
location ~ ^/hash-function/poseidon6/.* {
error_page 404 /404.html;
}
}

}
1 change: 1 addition & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ export default defineNuxtConfig({
'/hash-function/keccak256',
'/hash-function/sha256',
'/hash-function/ripemd160',
'/hash-function/poseidon6',
],
},
},
Expand Down

0 comments on commit 9718596

Please sign in to comment.