Skip to content

Commit

Permalink
🎨 Button styles, isDev flag, bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lancatlin committed Aug 23, 2022
1 parent 639d147 commit 6a5f667
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 9 deletions.
16 changes: 16 additions & 0 deletions assets/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ button.button {
border-radius: 4px;
}

button.button:disabled {
background-color: #58545e;
color: grey;
padding: 5px 10px;
margin: 3px;
border-radius: 4px;
}

input, textarea {
border: 2px solid grey;
border-radius: 4px;
Expand All @@ -45,6 +53,14 @@ input, textarea {
color: red;
}

h1 {
font-size: 1.8em;
}

h2 {
font-size: 1.5em;
}

hr {
margin: 10px;
}
3 changes: 1 addition & 2 deletions components/ISCNList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,7 @@ export default {
const timestamp = datetime.toLocaleString()
const iscn = data['@id']
if (isDepub(data)) {
const re = RegExp('iscn://[^/]+/', 'g') // eslint-disable-line prefer-regex-literals
const depubUrl = iscn.replace(re, '')
const depubUrl = iscn.replace(/iscn:\/\/[^/]+\//g, '')
data.contentMetadata.url = `https://depub.space/${depubUrl}`
}
if (data.contentMetadata.keywords) {
Expand Down
5 changes: 3 additions & 2 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ const { NODE_ENV } = process.env
export const ENV_DEV = 'development'
export const IPFS_GATEWAY = 'https://cloudflare-ipfs.com'
export const ARWEAVE_GATEWAY = 'https://arweave.net'
export const INDEXER = NODE_ENV === ENV_DEV
export const isDev = NODE_ENV === ENV_DEV
export const INDEXER = isDev
? 'https://node.testnet.like.co'
: 'https://mainnet-node.like.co'
export const WALLET_CONFIG = NODE_ENV === ENV_DEV
export const WALLET_CONFIG = isDev
? {
chainId: 'likecoin-public-testnet-5',
chainName: 'LikeCoin',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "nuxt",
"dev": "NODE_ENV=development nuxt",
"build": "nuxt build",
"start": "nuxt start",
"generate": "nuxt generate",
Expand Down
4 changes: 2 additions & 2 deletions pages/edit/_id.vue
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ export default {
const record = res.records[0].data
this.iscnId = record['@id']
Object.assign(this, record)
this.contentMetadata.keywords = record.contentMetadata.keywords.split(',').filter(k => k !== '')
this.contentMetadata.keywords = record.contentMetadata.keywords.split(',').filter(k => !!k)
},
computed: {
Expand Down Expand Up @@ -313,7 +313,7 @@ export default {
} = JSON.parse(this.rawJSON)
this.contentMetadata = {
...contentMetadata,
keywords: contentMetadata.keywords.split(',').filter(k => k !== ''),
keywords: contentMetadata.keywords.split(',').filter(k => !!k),
}
this.contentFingerprints = contentFingerprints
this.stakeholders = stakeholders
Expand Down
4 changes: 2 additions & 2 deletions pages/transfer/_id.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ export default {
const res = await this.$axios.$get(`/iscn/records?iscn_id_prefix=${this.iscnIdPrefix}&reverse=true&limit=1`)
const record = res.records[0].data
this.iscnId = record['@id']
Object.assign(this, record)
this.contentMetadata.keywords = record.contentMetadata.keywords.split(',').filter(k => k !== '')
this.owner = record.owner
this.contentMetadata = record.contentMetadata
},
computed: {
Expand Down

0 comments on commit 6a5f667

Please sign in to comment.