Skip to content

Commit

Permalink
fix(frontend): removes background2 for dim's joy
Browse files Browse the repository at this point in the history
  • Loading branch information
teocomi committed Mar 10, 2021
1 parent 1a762d1 commit 7efc8a4
Show file tree
Hide file tree
Showing 29 changed files with 88 additions and 129 deletions.
2 changes: 1 addition & 1 deletion packages/frontend/src/components/ErrorBlock.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<v-sheet rounded="lg" class="pa-15" color="background2">
<v-sheet rounded="lg" class="pa-15">
<h1>
<v-icon large>mdi-bug</v-icon>
Oups...
Expand Down
10 changes: 5 additions & 5 deletions packages/frontend/src/components/FeedCommit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@
</v-col>
</v-row>

<v-card class="mb-3" elevation="0" rounded="lg" color="background2">
<v-card class="mb-3" elevation="0" rounded="lg">
<v-card-title v-if="!commit.items" class="subtitle-2">
<router-link :to="`streams/${commit.streamId}/commits/${commit.id}`">
{{ commit.message }}
</router-link>
</v-card-title>
<v-expansion-panels v-else multiple :value="expando" flat color="background2">
<v-expansion-panels v-else multiple :value="expando" flat>
<v-expansion-panel>
<v-expansion-panel-header class="pl-4" color="background2">
<v-expansion-panel-header class="pl-4">
<span class="subtitle-2">
{{ commit.message }}
</span>
</v-expansion-panel-header>
<v-expansion-panel-content color="background2">
<v-list dense color="background2">
<v-expansion-panel-content>
<v-list dense>
<v-list-item
v-for="(item, i) in commit.items"
:key="i"
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/components/FeedStream.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<timeago :datetime="stream.createdAt"></timeago>
</v-col>
</v-row>
<v-card class="mb-3" elevation="0" rounded="lg" color="background2">
<v-card class="mb-3" elevation="0" rounded="lg">
<v-row justify-center>
<v-col cols="12">
<v-card-title class="subtitle-2">
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/components/ListItemStream.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<v-card class="pa-5 mb-3" color="background2" style="transition: all 0.2s" flat>
<v-card class="pa-5 mb-3" style="transition: all 0.2s" flat>
<v-row>
<v-col cols="12" sm="8" class="align-self-center">
<div class="subtitle-1 stream-link">
Expand Down
4 changes: 0 additions & 4 deletions packages/frontend/src/components/NoDataPlaceholder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
height="100%"
href="https://speckle.guide/user/quickstart.html"
tile
color="background2"
target="_blank"
:class="`pt-4 ${hover ? 'elevation-5' : 'elevation-0'} rounded-lg`"
style="transition: all 0.15s; min-height: 130px"
Expand All @@ -30,7 +29,6 @@
<v-card
slot-scope="{ hover }"
height="100%"
color="background2"
href="https://speckle.guide/"
target="_blank"
tile
Expand All @@ -50,7 +48,6 @@
<v-card
slot-scope="{ hover }"
height="100%"
color="background2"
href="http://speckle.community"
tile
target="_blank"
Expand All @@ -69,7 +66,6 @@
<v-card
slot-scope="{ hover }"
height="100%"
color="background2"
href="https://speckle.xyz/streams/3073b96e86"
tile
target="_blank"
Expand Down
31 changes: 13 additions & 18 deletions packages/frontend/src/components/ObjectListViewer.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
<template>
<v-card
:class="`my-1 mb-0 pa-0 pb-2 ${
localExpand ? 'elevation-3' : 'elevation-0'
} my-0`"
color="background2"
>
<v-card :class="`my-1 mb-0 pa-0 pb-2 ${localExpand ? 'elevation-3' : 'elevation-0'} my-0`">
<v-card-title>
<v-chip @click="toggleLoadExpand">
<v-icon small class="mr-2">mdi-code-array</v-icon>
{{ keyName }}
<span class="caption ml-2">List ({{ value.length }} elements)</span>
<v-icon class="ml-2" small>
{{ localExpand ? "mdi-minus" : "mdi-plus" }}
{{ localExpand ? 'mdi-minus' : 'mdi-plus' }}
</v-icon>
</v-chip>
</v-card-title>
Expand All @@ -32,11 +27,11 @@
</template>
<script>
export default {
name: "ObjectListViewer",
name: 'ObjectListViewer',
components: {
ObjectSpeckleViewer: () => import("./ObjectSpeckleViewer"),
ObjectSimpleViewer: () => import("./ObjectSimpleViewer"),
ObjectValueViewer: () => import("./ObjectValueViewer")
ObjectSpeckleViewer: () => import('./ObjectSpeckleViewer'),
ObjectSimpleViewer: () => import('./ObjectSimpleViewer'),
ObjectValueViewer: () => import('./ObjectValueViewer')
},
props: {
value: {
Expand Down Expand Up @@ -69,34 +64,34 @@ export default {
arr.push({
key: `${index}`,
value: val,
type: "ObjectListViewer"
type: 'ObjectListViewer'
})
} else if (typeof val === "object" && val !== null) {
if (val.speckle_type && val.speckle_type === "reference") {
} else if (typeof val === 'object' && val !== null) {
if (val.speckle_type && val.speckle_type === 'reference') {
arr.push({
key: `${index}`,
value: val,
type: "ObjectSpeckleViewer"
type: 'ObjectSpeckleViewer'
})
} else {
arr.push({
key: `${index}`,
value: val,
type: "ObjectSimpleViewer"
type: 'ObjectSimpleViewer'
})
}
} else {
arr.push({
key: `${index}`,
value: val,
type: "ObjectValueViewer"
type: 'ObjectValueViewer'
})
}
}
arr.sort((a, b) => {
if (a.type === b.type) return 0
if (a.type === "ObjectValueViewer") return -1
if (a.type === 'ObjectValueViewer') return -1
return 0
})
return arr
Expand Down
39 changes: 18 additions & 21 deletions packages/frontend/src/components/ObjectSimpleViewer.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
<template>
<v-card
:class="`my-1 pa-0 ${localExpand ? 'elevation-3' : 'elevation-0'} my-0`"
color="background2"
>
<v-card :class="`my-1 pa-0 ${localExpand ? 'elevation-3' : 'elevation-0'} my-0`">
<v-card-title>
<v-chip color="" @click="toggleLoadExpand">
<v-icon class="mr-2" small>mdi-code-braces</v-icon>
{{ keyName }}
<span class="caption ml-2">
{{ value.speckle_type ? value.speckle_type : "Object" }}
{{ value.speckle_type ? value.speckle_type : 'Object' }}
</span>
<v-icon small class="ml-2">
{{ localExpand ? "mdi-minus" : "mdi-plus" }}
{{ localExpand ? 'mdi-minus' : 'mdi-plus' }}
</v-icon>
</v-chip>
</v-card-title>
Expand All @@ -29,11 +26,11 @@
</template>
<script>
export default {
name: "ObjectSimpleViewer",
name: 'ObjectSimpleViewer',
components: {
ObjectListViewer: () => import("./ObjectListViewer"),
ObjectSpeckleViewer: () => import("./ObjectSpeckleViewer"),
ObjectValueViewer: () => import("./ObjectValueViewer")
ObjectListViewer: () => import('./ObjectListViewer'),
ObjectSpeckleViewer: () => import('./ObjectSpeckleViewer'),
ObjectValueViewer: () => import('./ObjectValueViewer')
},
props: {
value: {
Expand All @@ -60,44 +57,44 @@ export default {
let entries = Object.entries(this.value)
let arr = []
for (let [key, val] of entries) {
if (key.startsWith("__")) continue
if (key[0] === "@") key = key.substring(1)
if (key === "totalChildrenCount") key = "total children count"
if (key === "speckle_type") key = "speckle type"
if (key.startsWith('__')) continue
if (key[0] === '@') key = key.substring(1)
if (key === 'totalChildrenCount') key = 'total children count'
if (key === 'speckle_type') key = 'speckle type'
if (Array.isArray(val)) {
arr.push({
key,
value: val,
type: "ObjectListViewer",
type: 'ObjectListViewer',
description: `List (${val.length} elements)`
})
// TODO -> list value template displayer
} else if (typeof val === "object" && val !== null) {
if (val.speckle_type && val.speckle_type === "reference") {
} else if (typeof val === 'object' && val !== null) {
if (val.speckle_type && val.speckle_type === 'reference') {
arr.push({
key,
value: val,
type: "ObjectSpeckleViewer"
type: 'ObjectSpeckleViewer'
})
} else {
arr.push({
key,
value: val,
type: "ObjectSimpleViewer"
type: 'ObjectSimpleViewer'
})
}
} else {
arr.push({
key,
value: val,
type: "ObjectValueViewer"
type: 'ObjectValueViewer'
})
}
}
arr.sort((a, b) => {
if (a.type === b.type) return 0
if (a.type === "ObjectValueViewer") return -1
if (a.type === 'ObjectValueViewer') return -1
return 0
})
return arr
Expand Down
59 changes: 22 additions & 37 deletions packages/frontend/src/components/ObjectSpeckleViewer.vue
Original file line number Diff line number Diff line change
@@ -1,28 +1,17 @@
<template>
<v-card
:class="`my-1 pa-0 ${localExpand ? 'elevation-3' : 'elevation-0'} my-0`"
color="background2"
>
<v-card :class="`my-1 pa-0 ${localExpand ? 'elevation-3' : 'elevation-0'} my-0`">
<v-card-title v-if="object">
<v-chip color="" @click="toggleLoadExpand">
<v-icon small class="mr-2">mdi-code-braces</v-icon>
{{ keyName }}
<span class="caption ml-2">
{{
object.data.speckle_type
? object.data.speckle_type
: "Referenced Object"
}}
{{ object.data.speckle_type ? object.data.speckle_type : 'Referenced Object' }}
</span>
<v-icon small class="ml-2">
{{ localExpand ? "mdi-minus" : "mdi-plus" }}
{{ localExpand ? 'mdi-minus' : 'mdi-plus' }}
</v-icon>
</v-chip>
<v-btn
icon
small
:to="`/streams/${streamId}/objects/${value.referencedId}`"
>
<v-btn icon small :to="`/streams/${streamId}/objects/${value.referencedId}`">
<v-icon small>mdi-open-in-new</v-icon>
</v-btn>
</v-card-title>
Expand All @@ -32,14 +21,10 @@
{{ keyName }}
<span class="caption ml-2">Referenced Object</span>
<v-icon small class="ml-2">
{{ localExpand ? "mdi-minus" : "mdi-plus" }}
{{ localExpand ? 'mdi-minus' : 'mdi-plus' }}
</v-icon>
</v-chip>
<v-btn
icon
small
:to="`/streams/${streamId}/objects/${value.referencedId}`"
>
<v-btn icon small :to="`/streams/${streamId}/objects/${value.referencedId}`">
<v-icon small>mdi-open-in-new</v-icon>
</v-btn>
</v-card-title>
Expand All @@ -60,14 +45,14 @@
</v-card>
</template>
<script>
import objectQuery from "../graphql/objectSingle.gql"
import objectQuery from '../graphql/objectSingle.gql'
export default {
name: "ObjectSpeckleViewer",
name: 'ObjectSpeckleViewer',
components: {
ObjectListViewer: () => import("./ObjectListViewer"),
ObjectSimpleViewer: () => import("./ObjectSimpleViewer"),
ObjectValueViewer: () => import("./ObjectValueViewer")
ObjectListViewer: () => import('./ObjectListViewer'),
ObjectSimpleViewer: () => import('./ObjectSimpleViewer'),
ObjectValueViewer: () => import('./ObjectValueViewer')
},
props: {
expand: {
Expand Down Expand Up @@ -116,43 +101,43 @@ export default {
let entries = Object.entries(this.object.data)
let arr = []
for (let [key, val] of entries) {
if (key.startsWith("__")) continue
if (key[0] === "@") key = key.substring(1)
if (key === "totalChildrenCount") key = "total children count"
if (key === "speckle_type") key = "speckle type"
if (key.startsWith('__')) continue
if (key[0] === '@') key = key.substring(1)
if (key === 'totalChildrenCount') key = 'total children count'
if (key === 'speckle_type') key = 'speckle type'
if (Array.isArray(val)) {
arr.push({
key,
value: val,
type: "ObjectListViewer",
type: 'ObjectListViewer',
description: `List (${val.length} elements)`
})
} else if (typeof val === "object" && val !== null) {
if (val.speckle_type && val.speckle_type === "reference") {
} else if (typeof val === 'object' && val !== null) {
if (val.speckle_type && val.speckle_type === 'reference') {
arr.push({
key,
value: val,
type: "ObjectSpeckleViewer"
type: 'ObjectSpeckleViewer'
})
} else {
arr.push({
key,
value: val,
type: "ObjectSimpleViewer"
type: 'ObjectSimpleViewer'
})
}
} else {
arr.push({
key,
value: val,
type: "ObjectValueViewer"
type: 'ObjectValueViewer'
})
}
}
arr.sort((a, b) => {
if (a.type === b.type) return 0
if (a.type === "ObjectValueViewer") return -1
if (a.type === 'ObjectValueViewer') return -1
return 0
})
return arr
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/components/UserAccessTokens.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<v-card color="background2" class="elevation-0 mt-3">
<v-card class="elevation-0 mt-3">
<v-card-title>Personal Access Tokens</v-card-title>
<v-card-text>
Personal Access Tokens can be used to access the Speckle API on this server; they function
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/components/UserApps.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<v-card color="background2" class="elevation-0 mt-3 mb-5">
<v-card class="elevation-0 mt-3 mb-5">
<v-card-title>Applications</v-card-title>
<v-card-text>
Register and manage third-party Speckle Apps that, once authorised by a user on this server,
Expand Down
Loading

0 comments on commit 7efc8a4

Please sign in to comment.