fix(frontend): removes background2 for dim's joy

This commit is contained in:
Matteo Cominetti
2021-03-10 21:38:16 +00:00
parent 1a762d1fbd
commit 7efc8a4e73
29 changed files with 88 additions and 129 deletions
@@ -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...
@@ -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"
@@ -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">
@@ -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">
@@ -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"
@@ -30,7 +29,6 @@
<v-card
slot-scope="{ hover }"
height="100%"
color="background2"
href="https://speckle.guide/"
target="_blank"
tile
@@ -50,7 +48,6 @@
<v-card
slot-scope="{ hover }"
height="100%"
color="background2"
href="http://speckle.community"
tile
target="_blank"
@@ -69,7 +66,6 @@
<v-card
slot-scope="{ hover }"
height="100%"
color="background2"
href="https://speckle.xyz/streams/3073b96e86"
tile
target="_blank"
@@ -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>
@@ -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: {
@@ -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
@@ -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>
@@ -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: {
@@ -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
@@ -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>
@@ -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>
@@ -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: {
@@ -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
@@ -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
@@ -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,
@@ -1,5 +1,5 @@
<template>
<v-card xxxcolor="background2" class="elevation-0 mt-3 mb-5 transparent">
<v-card class="elevation-0 mt-3 mb-5 transparent">
<v-card-title>Your Apps</v-card-title>
<v-card-text class="">
Here you can review the apps that you have granted access to.
@@ -23,7 +23,7 @@
class="d-flex"
style="flex-direction: column"
>
<v-card class="background2 flex-grow-1 d-flex flex-column">
<v-card flex-grow-1 d-flex flex-column>
<v-card-text>
<h3 class="mb-3">
<v-icon v-if="app.trustByDefault" class="mr-1 primary--text" small>
@@ -8,7 +8,7 @@
</v-avatar>
</v-btn>
</template>
<v-list color="background2" class="py-0 my-0">
<v-list class="py-0 my-0">
<v-list-item to="/profile">
<v-list-item-content>
<v-list-item-title>
@@ -1,5 +1,5 @@
<template>
<v-card class="pa-4" color="background2">
<v-card class="pa-4">
<v-card-title>Create a New App</v-card-title>
<v-form v-show="!appCreateResult" ref="form" v-model="valid" @submit.prevent="createApp">
@@ -1,6 +1,6 @@
<template>
<v-dialog v-model="show" width="500" @keydown.esc="cancel">
<v-card class="pa-4" color="background2">
<v-card class="pa-4">
<v-card-title class="subtitle-1">Edit Commit</v-card-title>
<v-form ref="form" v-model="valid" lazy-validation @submit.prevent="agree">
<v-card-text class="pl-2 pr-2 pt-0 pb-0">
@@ -1,6 +1,6 @@
<template>
<v-dialog v-model="show" width="500" @keydown.esc="cancel">
<v-card class="pa-4" color="background2">
<v-card class="pa-4">
<v-card-title class="subtitle-1">Edit Server Info</v-card-title>
<v-form ref="form" v-model="valid" lazy-validation @submit.prevent="agree">
@@ -1,5 +1,5 @@
<template>
<v-card class="pa-4" color="background2">
<v-card class="pa-4">
<v-card-title>Create a New Personal Access Token</v-card-title>
<v-form v-show="!fullTokenResult" ref="form" v-model="valid" @submit.prevent="createToken">
<v-card-text>
@@ -1,5 +1,5 @@
<template>
<v-card class="pa-4" color="background2">
<v-card class="pa-4">
<v-card-title class="subtitle-1">Edit Profile</v-card-title>
<v-form ref="form" v-model="valid" lazy-validation @submit.prevent="updateUser">
<v-card-text class="pl-2 pr-2 pt-0 pb-0">
+1 -3
View File
@@ -26,7 +26,6 @@ export default new Vuetify({
info: '#313BCF', //dark blue
success: '#4caf50',
background: '#eeeeee',
background2: '#ffffff',
text: '#FFFFFF'
},
dark: {
@@ -37,8 +36,7 @@ export default new Vuetify({
warning: '#FF9100', //orange
info: '#313BCF', //dark blue
success: '#4caf50',
background: '#3a3b3c',
background2: '#303132'
background: '#3a3b3c'
}
}
}
+2 -8
View File
@@ -4,7 +4,7 @@
<v-card v-if="$apollo.queries.stream.loading">
<v-skeleton-loader type="article"></v-skeleton-loader>
</v-card>
<v-card v-else rounded="lg" class="pa-4 mb-4" elevation="0" color="background2">
<v-card v-else rounded="lg" class="pa-4 mb-4" elevation="0">
<v-dialog v-model="dialogBranch" max-width="500">
<new-branch-dialog
:branch-names="branches.items.map((b) => b.name)"
@@ -39,13 +39,7 @@
</v-card-text>
</v-card>
<v-card
v-if="!$apollo.queries.stream.loading"
class="mt-5 pa-4"
elevation="0"
rounded="lg"
color="background2"
>
<v-card v-if="!$apollo.queries.stream.loading" class="mt-5 pa-4" elevation="0" rounded="lg">
<v-subheader class="text-uppercase">Branches ({{ branches.items.length }})</v-subheader>
<v-card-text>
<v-list two-line color="transparent">
+1 -1
View File
@@ -6,7 +6,7 @@
</v-card>
</v-col>
<v-col v-else cols="12">
<v-card elevation="0" rounded="lg" color="background2">
<v-card elevation="0" rounded="lg">
<v-sheet class="pa-4" color="transparent">
<commit-edit-dialog ref="commitDialog"></commit-edit-dialog>
<v-card-title>
+2 -2
View File
@@ -4,7 +4,7 @@
<v-skeleton-loader type="article, article"></v-skeleton-loader>
</v-col>
<v-col v-else cols="12">
<v-card class="pa-4" elevation="0" rounded="lg" color="background2">
<v-card class="pa-4" elevation="0" rounded="lg">
<v-dialog v-model="dialogEdit" max-width="500">
<branch-edit-dialog :branch="stream.branch" @close="closeEdit" />
</v-dialog>
@@ -34,7 +34,7 @@
</v-card-text>
</v-card>
<v-card class="mt-5 pa-4" elevation="0" rounded="lg" color="background2">
<v-card class="mt-5 pa-4" elevation="0" rounded="lg">
<v-subheader class="text-uppercase">
Commits ({{ stream.branch.commits.totalCount }})
</v-subheader>
+2 -2
View File
@@ -1,6 +1,6 @@
<template>
<v-app id="speckle">
<v-app-bar app color="background2">
<v-app-bar app>
<v-container class="py-0 fill-height hidden-sm-and-down">
<v-btn text to="/" active-class="no-active">
<v-img class="" contain max-height="30" max-width="30" src="@/assets/logo.svg" />
@@ -41,7 +41,7 @@
<v-icon>mdi-magnify</v-icon>
</v-btn>
</template>
<v-card class="background2">
<v-card>
<v-row>
<!-- <v-col v-for="link in navLinks" :key="link.name" cols="12">
<v-btn text block :to="link.link">
+2 -2
View File
@@ -2,11 +2,11 @@
<v-container>
<v-row align="center" justify="center">
<v-col cols="12" md="8">
<v-sheet rounded="lg" class="pa-15 text-center" color="background2">
<v-sheet rounded="lg" class="pa-15 text-center">
<h1>Need Help?</h1>
<p class="ma-10 subtitle-1 font-weight-light">
Get free help from the
<a href="https://discourse.speckle.works/">Speckle Community forum</a>
<a href="https://speckle.community/">Speckle Community forum</a>
or
<a href="mailto:hello@speckle.systems">contact us</a>
to set up a support agreement and one of our engineers will help right away 🚀!
+1 -1
View File
@@ -43,7 +43,7 @@
>
<v-row>
<v-col xxxclass="pt-0">
<v-card class="pa-5" elevation="0" rounded="lg" color="background2">
<v-card class="pa-5" elevation="0" rounded="lg">
<v-subheader class="text-uppercase">Recent activity:</v-subheader>
<v-chip-group
v-model="selectedActivity"
+1 -1
View File
@@ -4,7 +4,7 @@
<v-card class="pa-0" elevation="0" rounded="lg" color="transparent" style="height: 50vh">
<renderer :object-url="commitObjectUrl" />
</v-card>
<v-card class="pa-4 mt-3" elevation="0" rounded="lg" color="background2">
<v-card class="pa-4 mt-3" elevation="0" rounded="lg">
<v-card-title class="mr-8">
<v-icon class="mr-2">mdi-database</v-icon>
Object {{ $route.params.objectId }}
+1 -1
View File
@@ -10,7 +10,7 @@
<user-info-card :user="user"></user-info-card>
</v-col>
<v-col cols="12" sm="12" md="8" lg="9" xl="8" class="pt-10">
<v-card class="mb-3 elevation-0" color="background2">
<v-card class="mb-3 elevation-0">
<v-card-title>
{{ user.name }} and you share {{ user.streams.totalCount }}
{{ user.streams.totalCount === 1 ? 'stream' : 'streams' }} and
+2 -3
View File
@@ -8,7 +8,6 @@
<v-sheet
class="px-5 pt-5 align-center justify-center"
:class="latestCommit ? '' : 'rounded-b-lg'"
color="background2"
>
<v-select
v-if="branches"
@@ -52,7 +51,7 @@
<renderer :object-url="latestCommitObjectUrl" :unload-trigger="clearRendererTrigger" />
</div>
<v-sheet v-if="latestCommit" color="background2">
<v-sheet v-if="latestCommit">
<!-- LAST COMMIT -->
<v-list two-line class="pa-0">
<v-list-item :to="'/streams/' + $route.params.streamId + '/commits/' + latestCommit.id">
@@ -148,7 +147,7 @@
<v-skeleton-loader type="article"></v-skeleton-loader>
</v-card>
<v-card v-else rounded="lg" class="pa-4 mb-4" elevation="0" color="background2">
<v-card v-else rounded="lg" class="pa-4 mb-4" elevation="0">
<v-dialog v-model="dialogDescription">
<stream-description-dialog
:id="$route.params.streamId"
+1 -6
View File
@@ -81,12 +81,7 @@
:message="`Hello there! It seems like you don't have any streams yet. Here's a handful of useful links to help you get started:`"
/>
</div>
<v-card
v-if="user && user.streams.totalCount > 0"
class="mt-5 mx-4"
color="background2"
flat
>
<v-card v-if="user && user.streams.totalCount > 0" class="mt-5 mx-4" flat>
<v-card-text class="body-1">
<span>
You have
@@ -1,6 +1,6 @@
<template>
<v-card v-if="!$apollo.loading && action === 0" rounded="lg" class="pb-4 elevation-10">
<v-card-text class="text-center background2">
<v-card-text class="text-center">
<user-avatar></user-avatar>
</v-card-text>
<v-card-text class="text-h5 font-weight-regular text-center pt-10">