Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

D frontend #8

Merged
merged 45 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
de1c70c
Update environment and metadata
d0rich Nov 22, 2023
49043af
Delete template files
d0rich Nov 22, 2023
ba3b766
Update package.json scripts
d0rich Nov 22, 2023
d444fa1
Update build and prepare scripts
d0rich Nov 22, 2023
b0dd33f
Add TonConnect component to Home page
d0rich Nov 23, 2023
dcbe599
Add wallet functionality to useTonConnect
d0rich Nov 23, 2023
4804b6f
Move ton connections to Pinia store
d0rich Nov 23, 2023
1a141a2
Add @esbuild-plugins/node-globals-polyfill
d0rich Nov 23, 2023
de7cf73
Refactor TonConnectStore to use reactive
d0rich Nov 23, 2023
eed1a5e
Header draft
d0rich Nov 23, 2023
16e2491
Fix theme switch and ton connect UI
d0rich Nov 23, 2023
dcc78f7
Syncronyze tonConnect theme with website theme
d0rich Nov 23, 2023
d3eef0b
Update colors in App.vue
d0rich Nov 23, 2023
01375cd
Layout draft
d0rich Nov 23, 2023
5ef80ac
Remove unused DBtn import in DFooter.vue
d0rich Nov 23, 2023
aaeac53
lintfix
d0rich Nov 23, 2023
b6faf14
Refactor TonConnectStore and DSidebar components
d0rich Nov 23, 2023
c688f18
Polyfill buffer in build
d0rich Nov 23, 2023
3abf53a
Master contract store
d0rich Nov 24, 2023
1da7339
Make blogs NFT items
d0rich Nov 24, 2023
0d64c00
Fix fees in test fixtures and contracts
d0rich Nov 25, 2023
f092219
Refactor test setup in DSocialNetworkMaster and
d0rich Nov 25, 2023
5846291
Fix create post fee validation and restrict post
d0rich Nov 25, 2023
7ab9ae8
Add transfer tests
d0rich Nov 25, 2023
5e2a307
Group tests
d0rich Nov 25, 2023
851b247
Rename contracts hooks and handle royalty params on transfer
d0rich Nov 25, 2023
a2afb79
Optimize hooks
d0rich Nov 25, 2023
aa3c8d5
Move contracts to packages
d0rich Nov 25, 2023
9f8e404
Refactor masterContractStore to use dynamic master
d0rich Nov 25, 2023
99bebdd
Refactor DPost
d0rich Nov 25, 2023
273abc6
Create markdown converters
d0rich Nov 25, 2023
11e6352
Remove unused import and update link in
d0rich Nov 25, 2023
b59e4f6
Create text for the main page
d0rich Nov 25, 2023
a70e00f
Generate user avatar by wallet
d0rich Nov 25, 2023
e4f995c
Update UserAvatar.vue to use thumbs collection
d0rich Nov 25, 2023
583bd7d
Init sidebar navigation
d0rich Nov 25, 2023
c853236
Create blog form
d0rich Nov 25, 2023
60985d0
useOpenedContract
d0rich Nov 25, 2023
7a148ec
Replace deprecated ton packages
d0rich Nov 26, 2023
612ce60
Workaround for @ton/ton incompatibility with Vue
d0rich Nov 26, 2023
dd00e76
Fix @ton/core patch
d0rich Nov 26, 2023
8add2f6
Fix sidebar toggle in Layout.vue and DSidebar.vue
d0rich Nov 26, 2023
a1b40eb
Error: Unsupported item type: tvm.stackEntrySlice
d0rich Nov 26, 2023
b056948
My blogs draft
d0rich Nov 26, 2023
913cf59
Add redirect rule to netlify.toml
d0rich Nov 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ jobs:
- name: Installing packages
run: npm ci

- name: Prepare
run: npm run prepare:all

- name: Build
run: npm run build
run: npm run build:all

- name: Lint
run: npm run lint
Expand Down
1 change: 1 addition & 0 deletions apps/d.d0rich.me/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_TON_NETWORK=TESTNET
8 changes: 8 additions & 0 deletions apps/d.d0rich.me/env.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
/// <reference types="vite/client" />

interface ImportMetaEnv {
readonly VITE_TON_NETWORK: 'TESTNET' | 'MAINNET'
}

interface ImportMeta {
readonly env: ImportMetaEnv
}
21 changes: 19 additions & 2 deletions apps/d.d0rich.me/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,27 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- Fonts -->
<!-- TODO: Manually download fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Arsenal:ital,wght@0,400;0,700;1,400;1,700&family=JetBrains+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800&family=Roboto+Slab:wght@100;200;300;400;500;600;700;800;900&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap"
rel="stylesheet"
/>
<!-- Metadata -->
<link rel="manifest" href="/app.webmanifest" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
<meta property="og:title" content="Blogs on TON" />
<meta property="og:site_name" content="D" />
<meta
property="og:description"
content="Easily create blogs on TON Blockchain"
/>
<meta property="og:type" content="website" />
<meta property="og:image" content="https://d.d0rich.me/og/image.jpg" />
<title>D - Blogs on TON Blockchain</title>
</head>
<body>
<div id="app"></div>
Expand Down
5 changes: 5 additions & 0 deletions apps/d.d0rich.me/netlify.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
[build]
ignore = "node apps/d.d0rich.me/ignore-build.mjs"

[[redirects]]
from = "/*"
to = "/index.html"
status = 200
23 changes: 22 additions & 1 deletion apps/d.d0rich.me/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,43 @@
"type-check": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false"
},
"dependencies": {
"@d0rich/contracts": "*",
"@d0rich/esprit-design": "*",
"@d0rich/ton-contracts": "*",
"@dicebear/collection": "^7.0.1",
"@dicebear/core": "^7.0.1",
"@orbs-network/ton-access": "^2.3.3",
"@ton/core": "^0.53.0",
"@ton/ton": "^13.9.0",
"@tonconnect/ui": "^2.0.0-beta.6",
"@vueuse/core": "^10.6.1",
"consola": "^3.2.3",
"dateformat": "^5.0.3",
"pinia": "^2.1.7",
"rehype-stringify": "^10.0.0",
"remark-parse": "^11.0.0",
"remark-rehype": "^11.0.0",
"strip-markdown": "^6.0.0",
"unified": "^11.0.4",
"vue": "^3.3.4",
"vue-router": "^4.2.5"
},
"devDependencies": {
"@tailwindcss/forms": "^0.5.7",
"@tailwindcss/typography": "^0.5.10",
"@tsconfig/node18": "^18.2.2",
"@types/jsdom": "^21.1.3",
"@types/node": "^18.18.5",
"@vitejs/plugin-vue": "^4.4.0",
"@vue/test-utils": "^2.4.1",
"@vue/tsconfig": "^0.4.0",
"autoprefixer": "^10.4.16",
"jsdom": "^22.1.0",
"npm-run-all2": "^6.1.1",
"postcss": "^8.4.31",
"tailwindcss": "^3.3.5",
"typescript": "~5.2.0",
"vite": "^4.4.11",
"vite-plugin-node-polyfills": "^0.16.0",
"vitest": "^0.34.6",
"vue-tsc": "^1.8.19"
}
Expand Down
6 changes: 6 additions & 0 deletions apps/d.d0rich.me/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {}
}
}
5 changes: 5 additions & 0 deletions apps/d.d0rich.me/public/tonconnect-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"url": "https://d.d0rich.me",
"name": "D",
"iconUrl": "https://d.d0rich.me/android-chrome-192x192.png"
}
5 changes: 5 additions & 0 deletions apps/d.d0rich.me/public/tonconnect-testnet-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"url": "https://testnet.d.d0rich.me",
"name": "D",
"iconUrl": "https://testnet.d.d0rich.me/android-chrome-192x192.png"
}
93 changes: 10 additions & 83 deletions apps/d.d0rich.me/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,91 +1,18 @@
<script setup lang="ts">
import { RouterLink, RouterView } from 'vue-router'
import HelloWorld from './components/HelloWorld.vue'
import { RouterView } from 'vue-router'
import Layout from './layout/Layout.vue'
</script>

<template>
<header>
<img
alt="Vue logo"
class="logo"
src="@/assets/logo.svg"
width="125"
height="125"
/>

<div class="wrapper">
<HelloWorld msg="You did it!" />

<nav>
<RouterLink to="/">Home</RouterLink>
<RouterLink to="/about">About</RouterLink>
</nav>
</div>
</header>

<RouterView />
<Layout>
<RouterView />
</Layout>
</template>

<style scoped>
header {
line-height: 1.5;
max-height: 100vh;
}

.logo {
display: block;
margin: 0 auto 2rem;
}

nav {
width: 100%;
font-size: 12px;
text-align: center;
margin-top: 2rem;
}

nav a.router-link-exact-active {
color: var(--color-text);
}

nav a.router-link-exact-active:hover {
background-color: transparent;
}

nav a {
display: inline-block;
padding: 0 1rem;
border-left: 1px solid var(--color-border);
}

nav a:first-of-type {
border: 0;
}

@media (min-width: 1024px) {
header {
display: flex;
place-items: center;
padding-right: calc(var(--section-gap) / 2);
}

.logo {
margin: 0 2rem 0 0;
}

header .wrapper {
display: flex;
place-items: flex-start;
flex-wrap: wrap;
}

nav {
text-align: left;
margin-left: -1rem;
font-size: 1rem;

padding: 1rem 0;
margin-top: 1rem;
}
<style>
/* TODO: Configure colors more percisely */
body {
@apply text-black dark:text-white
bg-neutral-300 dark:bg-neutral-800;
}
</style>
74 changes: 0 additions & 74 deletions apps/d.d0rich.me/src/assets/base.css

This file was deleted.

1 change: 0 additions & 1 deletion apps/d.d0rich.me/src/assets/logo.svg

This file was deleted.

35 changes: 0 additions & 35 deletions apps/d.d0rich.me/src/assets/main.css

This file was deleted.

3 changes: 3 additions & 0 deletions apps/d.d0rich.me/src/assets/tailwind.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
42 changes: 0 additions & 42 deletions apps/d.d0rich.me/src/components/HelloWorld.vue

This file was deleted.

Loading