Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #5 from beclab/feat/dark-theme
Browse files Browse the repository at this point in the history
feat: adapting dark theme
  • Loading branch information
icebergtsn authored Jun 14, 2024
2 parents 411049a + 0e08891 commit c85d4f6
Show file tree
Hide file tree
Showing 46 changed files with 18,261 additions and 33,045 deletions.
49,736 changes: 17,399 additions & 32,337 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"build:preview": "ACTION=PREVIEW quasar build"
},
"dependencies": {
"@bytetrade/ui": "^0.0.83",
"@bytetrade/ui": "^0.1.12",
"@quasar/extras": "^1.16.9",
"axios": "^1.3.5",
"html2canvas": "^1.4.1",
Expand All @@ -32,7 +32,7 @@
"vue-router": "^4.0.0"
},
"devDependencies": {
"@quasar/app-vite": "^1.3.0",
"@quasar/app-vite": "^2.0.0-beta.1",
"@types/node": "^12.20.21",
"@typescript-eslint/eslint-plugin": "^5.10.0",
"@typescript-eslint/parser": "^5.10.0",
Expand Down
35 changes: 8 additions & 27 deletions packages/editor/quasar.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
// Configuration for your app
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js

const { configure } = require('quasar/wrappers');
const dotenv = require('dotenv');
import { configure } from 'quasar/wrappers';
import dotenv from 'dotenv';

dotenv.config();
console.log(process.env);

module.exports = configure(function (/* ctx */) {
export default configure(function (/* ctx */) {
return {
eslint: {
// fix: true,
Expand All @@ -31,7 +31,7 @@ module.exports = configure(function (/* ctx */) {
// app boot file (/src/boot)
// --> boot files are part of "main.js"
// https://v2.quasar.dev/quasar-cli-vite/boot-files
boot: ['i18n', 'smartEnginEntrance', 'bytetradeUi'],
boot: ['i18n', 'smartEnginEntrance', 'bytetrade-ui'],

// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css
css: ['app.scss'],
Expand Down Expand Up @@ -119,7 +119,7 @@ module.exports = configure(function (/* ctx */) {
ws: true
}
},
open: true, // opens browser window automatically
open: true // opens browser window automatically
// hmr: {
// port: 9100,
// clientPort: 443,
Expand All @@ -129,7 +129,9 @@ module.exports = configure(function (/* ctx */) {

// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#framework
framework: {
config: {},
config: {
dark: 'auto'
},

// iconSet: 'material-icons', // Quasar icon set
// lang: 'en-US', // Quasar language pack
Expand Down Expand Up @@ -161,27 +163,6 @@ module.exports = configure(function (/* ctx */) {
// electronPreload: 'src-electron/electron-preload'
// },

// https://v2.quasar.dev/quasar-cli-vite/developing-ssr/configuring-ssr
ssr: {
// ssrPwaHtmlFilename: 'offline.html', // do NOT use index.html as name!
// will mess up SSR

// extendSSRWebserverConf (esbuildConf) {},
// extendPackageJson (json) {},

pwa: false,

// manualStoreHydration: true,
// manualPostHydrationTrigger: true,

prodPort: 4020, // The default port that the production server should use
// (gets superseded if process.env.PORT is specified at runtime)

middlewares: [
'render' // keep this as last one
]
},

// https://v2.quasar.dev/quasar-cli-vite/developing-pwa/configuring-pwa
pwa: {
workboxMode: 'generateSW', // or 'injectManifest'
Expand Down
1 change: 1 addition & 0 deletions packages/editor/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<template>
<bt-theme />
<router-view />
</template>
<script>
Expand Down
10 changes: 10 additions & 0 deletions packages/editor/src/assets/loading-image.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions packages/editor/src/components/BioToolBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ const switchItem = (item: string) => {
.item {
width: 3.2rem;
height: 3.2rem;
margin: auto;
margin-top: 2.4rem;
margin: 2.4rem auto auto;
display: flex;
border: none;
background: #ffffff;
Expand Down
32 changes: 12 additions & 20 deletions packages/editor/src/components/avatar/AvatarChooseDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<q-icon
size="16px"
name="sym_r_clear"
color="grey-8"
color="ink-3"
@click="onDialogCancel"
/>
</div>
Expand All @@ -32,25 +32,15 @@
</template>
</q-tab>

<div
:style="{
background: tab === 'upload' ? '#E8E8E8' : '#F6F6F6'
}"
class="tab-title-line"
/>
<div class="tab-title-line" />

<q-tab style="padding: 0" name="nft">
<template v-slot:default>
<bt-tab-item :selected="tab === 'nft'" label="NFT avatar" />
</template>
</q-tab>

<div
:style="{
background: tab === 'default' ? '#E8E8E8' : '#F6F6F6'
}"
class="tab-title-line"
/>
<div class="tab-title-line" />

<q-tab style="padding: 0" name="upload">
<template v-slot:default>
Expand Down Expand Up @@ -116,7 +106,7 @@ import DefaultAvatar from './DefaultAvatar.vue';
import UploadAvatar from './UploadAvatar.vue';
import NFTAvatar from './NFTAvatar.vue';
import BioButton from 'components/base/BioButton.vue';
import { bus } from '../..//utils/bus';
import { bus } from 'src/utils/bus';
import { useUserStore } from 'src/stores/user';
import { Encoder } from '@bytetrade/core';
import ProfileAvatarBoard from './ProfileAvatarBoard.vue';
Expand Down Expand Up @@ -209,14 +199,14 @@ onUnmounted(() => {
width: 800px;
height: 500px;
max-height: 500px;
background: #ffffff;
background: $background-1;
padding: 0;
position: relative;
.avatar-choose-header {
width: 100%;
height: 32px;
background: #f8f8f8;
background: $background-3;
padding-left: 12px;
padding-right: 12px;
Expand All @@ -227,19 +217,20 @@ onUnmounted(() => {
line-height: 16px;
letter-spacing: 0;
text-align: left;
color: $ink-1;
}
}
.avatar-choose-view {
margin-top: 20px;
border-radius: 8px;
border: 1px solid var(--Grey-02, #ebebeb);
border: 1px solid $separator-2;
height: 364px;
width: 374px;
margin-right: 6px;
.tab-title-background {
background: #f6f6f6;
background: $background-3;
margin-top: 16px;
margin-left: 16px;
border-radius: 4px;
Expand All @@ -250,17 +241,18 @@ onUnmounted(() => {
width: 1px;
height: 14px;
border-radius: 0.5px;
background-color: $ink-3;
}
}
.avatar-crop-view {
margin-top: 20px;
border-radius: 8px;
border: 1px solid var(--Grey-02, #ebebeb);
border: 1px solid $separator-2;
height: 364px;
width: 374px;
margin-left: 6px;
background: #00000080;
background: $background-3;
.avatar-preview {
width: 100%;
Expand Down
4 changes: 2 additions & 2 deletions packages/editor/src/components/avatar/DefaultAvatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

<script setup lang="ts">
import { onMounted, ref } from 'vue';
import BioAvatarSelector from 'components/base/BioAvatarSelector.vue';
import { bus } from '../../utils/bus';
import BioAvatarSelector from 'src/components/base/BioAvatarSelector.vue';
import { bus } from 'src/utils/bus';
defineProps({
modelValue: {
Expand Down
10 changes: 5 additions & 5 deletions packages/editor/src/components/avatar/NFTAvatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</div>
</div>
<div v-else class="column justify-center items-center" style="height: 100%">
<q-icon size="32px" name="sym_r_imagesmode" color="grey-5" />
<q-icon size="32px" name="sym_r_imagesmode" color="ink-2" />
<div class="nft-image-title">
You have not bound the blockchain address and cannot obtain the
corresponding NFT image. Go to the settings to complete the binding and
Expand All @@ -25,7 +25,7 @@
class="nft-bind-border row justify-center items-center cursor-pointer"
@click="goBindCloude"
>
<q-icon size="16px" name="sym_r_add_photo_alternate" />
<q-icon color="ink-2" size="16px" name="sym_r_add_photo_alternate" />
<div class="nft-bind-label">Go to Binding</div>
</div>
</div>
Expand Down Expand Up @@ -70,13 +70,13 @@ const goBindCloude = () => {
line-height: 16px;
letter-spacing: 0em;
text-align: center;
color: var(--Grey-05, #adadad);
color: $ink-2;
margin-top: 8px;
}
.nft-bind-border {
margin-top: 12px;
border: 1px solid #2ee58a;
border: 1px solid $green-default;
padding: 8px 21px;
border-radius: 8px;
Expand All @@ -88,7 +88,7 @@ const goBindCloude = () => {
line-height: 16px;
letter-spacing: 0em;
text-align: left;
color: var(--Grey-10, #1f1814);
color: $ink-2;
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions packages/editor/src/components/avatar/UploadAvatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import { onMounted, ref } from 'vue';
import { useUserStore } from 'src/stores/user';
import { useQuasar } from 'quasar';
import { bus } from '../../utils/bus';
import { bus } from 'src/utils/bus';
defineProps({
modelValue: {
Expand Down Expand Up @@ -76,7 +76,7 @@ const fail = (response: unknown) => {
.upload-image-inner {
border-radius: 8px;
border: 1px solid var(--Grey-02, #ebebeb);
border: 1px solid $separator-2;
width: 120px;
height: 120px;
Expand All @@ -88,7 +88,7 @@ const fail = (response: unknown) => {
line-height: 16px;
letter-spacing: 0em;
text-align: left;
color: var(--Grey-08, #5c5551);
color: $ink-2;
}
}
Expand All @@ -100,7 +100,7 @@ const fail = (response: unknown) => {
line-height: 16px;
letter-spacing: 0em;
text-align: center;
color: #000;
color: $ink-1;
}
.upload-image-label {
Expand All @@ -111,7 +111,7 @@ const fail = (response: unknown) => {
letter-spacing: 0em;
text-align: center;
margin-top: 4px;
color: var(--Grey-05-, #adadad);
color: $ink-3;
}
}
</style>
2 changes: 1 addition & 1 deletion packages/editor/src/components/base/BioAvatarSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ defineProps({
height: 48px;
padding: 2px;
border-radius: 4px;
border: 1px solid var(--Grey-02, #ebebeb);
border: 1px solid $green-default;
}
.avatar-selector-normal {
Expand Down
12 changes: 6 additions & 6 deletions packages/editor/src/components/base/BioButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
<q-icon
v-if="icon"
size="16px"
:color="selected ? 'grey-10' : 'grey-8'"
:color="selected ? 'ink-on-brand-black' : 'ink-2'"
:name="icon"
style="margin-right: 8px"
class="q-mr-sm"
/>
<span
:class="selected ? 'bio-selected-button__label' : 'bio-button__label'"
Expand Down Expand Up @@ -73,8 +73,8 @@ onMounted(() => {

<style scoped lang="scss">
.bio-button {
background: white;
border: 1px solid var(--border, #ebebeb);
background: $background-1;
border: 1px solid $btn-stroke;
height: 32px;
width: var(--width, 100%);
padding-left: 12px;
Expand Down Expand Up @@ -109,7 +109,7 @@ onMounted(() => {
letter-spacing: 0em;
text-align: center;
overflow: hidden;
color: var(--grey-08, #5c5551);
color: $ink-2;
text-overflow: ellipsis;
}
}
Expand Down Expand Up @@ -153,7 +153,7 @@ onMounted(() => {
letter-spacing: 0em;
text-align: center;
overflow: hidden;
color: var(--grey-10, #1f1814);
color: $ink-on-brand-black;
text-overflow: ellipsis;
}
}
Expand Down
6 changes: 3 additions & 3 deletions packages/editor/src/components/base/BioImage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
>
<q-img v-if="imgUrl" class="bio-img" :src="imgUrl" />
<div v-else class="bio-img-none column justify-center items-center">
<q-icon size="32px" color="grey-5" name="sym_r_imagesmode" />
<q-icon size="32px" color="ink-3" name="sym_r_imagesmode" />
</div>
</BtUploader>
</template>
Expand Down Expand Up @@ -64,7 +64,7 @@ const fail = (response: unknown) => {
width: 72px;
height: 72px;
border-radius: 8px;
background: var(--grey-01, #f6f6f6);
border: 1px solid var(--border, #ebebeb);
background: $background-3;
border: $separator-2;
}
</style>
Loading

0 comments on commit c85d4f6

Please sign in to comment.