Skip to content

Commit

Permalink
ADD icons
Browse files Browse the repository at this point in the history
  • Loading branch information
RecuencoJones committed Nov 27, 2022
1 parent 88983b7 commit 920bd65
Show file tree
Hide file tree
Showing 11 changed files with 84 additions and 44 deletions.
13 changes: 13 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"@electron-forge/maker-zip": "^6.0.3",
"@types/luxon": "3.1.0",
"@vitejs/plugin-vue": "3.2.0",
"bootstrap-icons": "1.10.2",
"concurrently": "7.6.0",
"cross-env": "7.0.3",
"electron": "21.3.0",
Expand Down
8 changes: 4 additions & 4 deletions src/foreground/components/AppBreadcrumb.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<div class="app-breadcrumb">
<router-link class="crumb" to="/">home</router-link>
<router-link class="crumb" to="/"><i class="bi-house-fill" /> Home</router-link>
<template v-for="crumb of crumbs" :key="crumb.path" >
<span>&gt;</span>
<i class="bi-chevron-right" />
<router-link class="crumb" :to="crumb.path">
{{ sanitize(crumb.name) }}
</router-link>
Expand Down Expand Up @@ -49,9 +49,9 @@ export default {
.app-breadcrumb {
display: flex;
align-items: center;
height: 1.5rem;
height: 2rem;
padding: .25rem 1rem;
font-size: .85rem;
font-size: 1rem;
background-color: var(--color-breadcrumb-background);
.crumb {
Expand Down
14 changes: 5 additions & 9 deletions src/foreground/components/AppHeader.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<template>
<header class="app-header">
<nav class="app-header__left">
<router-link class="title" to="/">vizkochos</router-link>
<router-link class="title" to="/">Vizkochos</router-link>
</nav>
<nav class="app-header__right">
<router-link to="/preferences">Preferences</router-link>
<router-link to="/preferences"><i class="bi-sliders" /></router-link>
</nav>
</header>
</template>
Expand All @@ -14,20 +14,16 @@
display: flex;
justify-content: space-between;
align-items: center;
height: 2rem;
height: 3rem;
font-size: 1.25rem;
padding: .25rem 1rem;
background-color: var(--color-header-background);
box-shadow: 0 0 3px 2px var(--color-box-shadow);
z-index: 2;
&__left,
&__right {
flex: 0;
}
.title {
font-weight: bold;
font-size: 1.25rem;
font-size: 1.5rem;
color: var(--color-header-title);
}
Expand Down
34 changes: 22 additions & 12 deletions src/foreground/components/ContextSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,29 @@
<aside class="context-sidebar">
<div>
<h4>
<router-link :to="'/contexts/' + context">Overview</router-link>
<router-link :to="'/contexts/' + context"><i class="bi-binoculars" /> Overview</router-link>
</h4>
</div>
<div>
<h4>Cluster</h4>
<span v-if="config">{{ config.cluster }}</span>
<span v-else class="text-placeholder"></span>
<h4>User</h4>
<span v-if="config">{{ config.user }}</span>
<span v-else class="text-placeholder"></span>
<h4>Namespace</h4>
<span v-if="config">{{ config.namespace }}</span>
<span v-else class="text-placeholder"></span>
<h4><i class="bi-hdd-rack" /> Cluster</h4>
<div class="resource-link">
<span v-if="config">{{ config.cluster }}</span>
<span v-else class="text-placeholder"></span>
</div>
<h4><i class="bi-person" /> User</h4>
<div class="resource-link">
<span v-if="config">{{ config.user }}</span>
<span v-else class="text-placeholder"></span>
</div>
<h4><i class="bi-tag" /> Namespace</h4>
<div class="resource-link">
<span v-if="config">{{ config.namespace }}</span>
<span v-else class="text-placeholder"></span>
</div>
</div>
<div v-for="group of groups" :key="group.name">
<h4>{{ group.name }}</h4>
<div v-for="resource of group.resources" :key="resource">
<h4><i :class="group.icon" /> {{ group.name }}</h4>
<div class="resource-link" v-for="resource of group.resources" :key="resource">
<router-link :to="'/contexts/' + context + '/' + resource">{{ resource }}</router-link>
</div>
</div>
Expand Down Expand Up @@ -70,5 +76,9 @@ export default {
a, span {
color: var(--color-sidebar-link);
}
.resource-link {
padding: 0.25rem 0;
}
}
</style>
7 changes: 4 additions & 3 deletions src/foreground/components/ResourceDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<h3>{{ item.metadata.name }}</h3>
<details open>
<summary>
<strong>Details</strong>
<strong><i class="bi-card-list" /> Details</strong>
</summary>
<table>
<tbody>
Expand Down Expand Up @@ -53,7 +53,7 @@
</details>
<details v-if="item.spec && item.spec.containers" open>
<summary>
<strong>Logs</strong>
<strong><i class="bi-justify" /> Logs</strong>
</summary>
<pre class="logs" ref="logs"><span v-for="(entry, index) in logs" :key="index">{{ entry }}</span></pre>
</details>
Expand All @@ -74,7 +74,7 @@
</details>
<details>
<summary>
<strong>Manifest</strong>
<strong><i class="bi-filetype-yml" /> Manifest</strong>
</summary>
<pre>{{ toYaml(item) }}</pre>
</details>
Expand Down Expand Up @@ -158,6 +158,7 @@ export default {
bottom: 0;
background: white;
max-width: 50vw;
min-width: 35vw;
overflow: auto;
padding: 1rem;
background-color: var(--color-detail-background);
Expand Down
3 changes: 3 additions & 0 deletions src/foreground/config/resources.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export const resources = [
{
icon: 'bi-boxes',
name: 'Runtime',
resources: [
'pods',
Expand All @@ -11,13 +12,15 @@ export const resources = [
},
{
name: 'Configuration',
icon: 'bi-gear',
resources: [
'configmaps',
'secrets'
]
},
{
name: 'Connectivity',
icon: 'bi-ethernet',
resources: [
'services',
'ingresses',
Expand Down
1 change: 1 addition & 0 deletions src/foreground/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import AddContext from './pages/AddContext.vue';
import Context from './pages/Context.vue';
import ContextOverview from './pages/ContextOverview.vue';
import ContextResource from './pages/ContextResource.vue';
import 'bootstrap-icons/font/bootstrap-icons.css';
import './styles/global.scss';

const router = createRouter({
Expand Down
22 changes: 13 additions & 9 deletions src/foreground/pages/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,34 @@
<div class="columns">
<div>
<section>
<h4>Quickstart</h4>
<h4><i class="bi-bookmarks" /> Quickstart</h4>
<div>
<router-link to="/contexts/new">Add context</router-link>
<router-link to="/contexts/new"><i class="bi-plus-square-dotted" /> Add context</router-link>
</div>
<div>
<router-link to="/contexts">Manage contexts</router-link>
<router-link to="/contexts"><i class="bi-view-list" /> View contexts</router-link>
</div>
<div>
<router-link to="/preferences">Manage preferences</router-link>
<router-link to="/preferences"><i class="bi-sliders" /> Manage preferences</router-link>
</div>
</section>
<section>
<h4>Recently viewed</h4>
<h4><i class="bi-clock-history" /> Recently viewed</h4>
<div v-for="(recent, index) of recents" :key="index">
<router-link :to="recent.path">{{ recent.name }}</router-link>
<router-link :to="recent.path"><i class="bi-box" /> {{ recent.name }}</router-link>
</div>
</section>
</div>
<div>
<section>
<h4>Pinned</h4>
<h4><i class="bi-pin-angle" /> Pinned</h4>
<div v-if="pinned"></div>
<div v-else><i>Nothing pinned yet</i></div>
</section>
<section>
<h4>Help</h4>
<h4><i class="bi-info-circle" /> Help</h4>
<div>
<a href="#" @click="openGitHubRepository" >View in GitHub</a>
<a href="#" @click="openGitHubRepository"><i class="bi-github" /> View in GitHub</a>
</div>
</section>
</div>
Expand Down Expand Up @@ -76,6 +76,10 @@ export default {
section {
padding: 2vh 1vw;
div {
padding: .25rem 0;
}
}
}
</style>
21 changes: 16 additions & 5 deletions src/foreground/pages/ListContexts.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
<template>
<main class="toolbar-layout">
<main class="toolbar-layout contexts">
<nav class="toolbar">
<router-link to="/contexts/new">
<button>Create context</button>
</router-link>
<router-link to="/contexts/new"><i class="bi-plus-square-dotted" /> Add context</router-link>
</nav>
<section class="view">
<h4>Choose context</h4>
<div v-for="context of contexts" :key="context.name">
<router-link :to="'/contexts/' + context.name">{{ context.name }}</router-link>
<router-link :to="'/contexts/' + context.name"><i class="bi-box" /> {{ context.name }}</router-link>
</div>
</section>
</main>
Expand All @@ -31,3 +29,16 @@ export default {
}
}
</script>

<style lang="scss">
.contexts {
.view {
padding: 10vh 20vw;
div {
padding: 0.25rem 0;
}
}
}
</style>
4 changes: 2 additions & 2 deletions src/foreground/styles/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ html, body, #app {
}

.router-link-exact-active {
font-weight: bold;
font-weight: bold !important;
}

main {
Expand Down Expand Up @@ -45,7 +45,7 @@ dl {
.toolbar {
flex: 0 0 auto;
background-color: var(--color-toolbar-background);
padding: .5rem;
padding: 1rem 2rem;
}

.view {
Expand Down

0 comments on commit 920bd65

Please sign in to comment.