fix: nav external blank option

This commit is contained in:
NGPixel
2020-05-08 18:48:07 -04:00
parent 98bf0d9ccb
commit cc9f022051
14 changed files with 110 additions and 77 deletions

View File

@@ -27,13 +27,13 @@
v-list-item-avatar(size='24', tile): v-icon mdi-file-document-outline
v-list-item-title {{ $t('admin:pages.title') }}
v-list-item-action(style='min-width:auto;')
v-chip(x-small, :color='darkMode ? `grey darken-3-d4` : `grey lighten-5`')
v-chip(x-small, :color='$vuetify.theme.dark ? `grey darken-3-d4` : `grey lighten-5`')
.caption.grey--text {{ info.pagesTotal }}
v-list-item(to='/tags', v-if='hasPermission([`manage:system`])')
v-list-item-avatar(size='24', tile): v-icon mdi-tag-multiple
v-list-item-title {{ $t('admin:tags.title') }}
v-list-item-action(style='min-width:auto;')
v-chip(x-small, :color='darkMode ? `grey darken-3-d4` : `grey lighten-5`')
v-chip(x-small, :color='$vuetify.theme.dark ? `grey darken-3-d4` : `grey lighten-5`')
.caption.grey--text {{ info.tagsTotal }}
v-list-item(to='/theme', color='primary', v-if='hasPermission([`manage:system`, `manage:theme`])')
v-list-item-avatar(size='24', tile): v-icon mdi-palette-outline
@@ -45,13 +45,13 @@
v-list-item-avatar(size='24', tile): v-icon mdi-account-group
v-list-item-title {{ $t('admin:groups.title') }}
v-list-item-action(style='min-width:auto;')
v-chip(x-small, :color='darkMode ? `grey darken-3-d4` : `grey lighten-4`')
v-chip(x-small, :color='$vuetify.theme.dark ? `grey darken-3-d4` : `grey lighten-4`')
.caption.grey--text {{ info.groupsTotal }}
v-list-item(to='/users', color='primary', v-if='hasPermission([`manage:system`, `manage:groups`, `write:groups`, `manage:users`, `write:users`])')
v-list-item-avatar(size='24', tile): v-icon mdi-account-box
v-list-item-title {{ $t('admin:users.title') }}
v-list-item-action(style='min-width:auto;')
v-chip(x-small, :color='darkMode ? `grey darken-3-d4` : `grey lighten-4`')
v-chip(x-small, :color='$vuetify.theme.dark ? `grey darken-3-d4` : `grey lighten-4`')
.caption.grey--text {{ info.usersTotal }}
template(v-if='hasPermission(`manage:system`)')
v-divider.my-2
@@ -123,7 +123,7 @@
v-list-item-avatar(size='24', tile): v-icon mdi-heart-outline
v-list-item-title {{ $t('admin:contribute.title') }}
v-content(:class='darkMode ? "grey darken-5" : "grey lighten-5"')
v-content(:class='$vuetify.theme.dark ? "grey darken-5" : "grey lighten-5"')
transition(name='admin-router')
router-view
@@ -210,7 +210,6 @@ export default {
}
},
computed: {
darkMode: get('site/dark'),
info: sync('admin/info'),
permissions: get('user/permissions')
},

View File

@@ -260,7 +260,7 @@
<script>
import _ from 'lodash'
import { get, sync } from 'vuex-pathify'
import { sync } from 'vuex-pathify'
import gql from 'graphql-tag'
import editorStore from '../../store/editor'
@@ -323,7 +323,6 @@ export default {
}
},
computed: {
darkMode: get('site/dark'),
siteTitle: sync('site/title'),
logoUrl: sync('site/logoUrl'),
company: sync('site/company'),

View File

@@ -168,7 +168,7 @@
hide-details
)
v-text-field.mt-4(
v-if='current.targetType === `external`'
v-if='current.targetType === `external` || current.targetType === `externalblank`'
outlined
:label='$t("navigation.target")'
prepend-icon='mdi-near-me'
@@ -302,6 +302,7 @@ export default {
navTypes () {
return [
{ text: this.$t('navigation.navType.external'), value: 'external' },
{ text: this.$t('navigation.navType.externalblank'), value: 'externalblank' },
{ text: this.$t('navigation.navType.home'), value: 'home' },
{ text: this.$t('navigation.navType.page'), value: 'page' }
// { text: this.$t('navigation.navType.searchQuery'), value: 'search' }

View File

@@ -51,7 +51,7 @@
v-list-item(
:key='rdr.key'
@click='selectRenderer(rdr.key)'
:class='currentRenderer.key === rdr.key ? (darkMode ? `grey darken-4-l4` : `blue lighten-5`) : ``'
:class='currentRenderer.key === rdr.key ? ($vuetify.theme.dark ? `grey darken-4-l4` : `blue lighten-5`) : ``'
)
v-list-item-avatar(size='24', tile)
v-icon(:color='currentRenderer.key === rdr.key ? "primary" : "grey"') {{rdr.icon}}
@@ -126,7 +126,6 @@
<script>
import _ from 'lodash'
import { DepGraph } from 'dependency-graph'
import { get } from 'vuex-pathify'
import { StatusIndicator } from 'vue-status-indicator'
@@ -144,9 +143,6 @@ export default {
currentRenderer: {}
}
},
computed: {
darkMode: get('site/dark')
},
watch: {
renderers(newValue, oldValue) {
_.delay(() => {

View File

@@ -41,7 +41,7 @@
:hint='$t(`editor:props.shortDescriptionHint`)'
)
v-divider
v-card-text.grey.pt-5(:class='darkMode ? `darken-3-d3` : `lighten-5`')
v-card-text.grey.pt-5(:class='$vuetify.theme.dark ? `darken-3-d3` : `lighten-5`')
.overline.pb-5 {{$t('editor:props.path')}}
v-container.pa-0(fluid, grid-list-lg)
v-layout(row, wrap)
@@ -65,7 +65,7 @@
@click:append='showPathSelector'
)
v-divider
v-card-text.grey.pt-5(:class='darkMode ? `darken-3-d5` : `lighten-4`')
v-card-text.grey.pt-5(:class='$vuetify.theme.dark ? `darken-3-d5` : `lighten-4`')
.overline.pb-5 {{$t('editor:props.categorization')}}
v-chip-group.radius-5.mb-5(column, v-if='tags && tags.length > 0')
v-chip(
@@ -101,7 +101,7 @@
inset
)
v-divider
v-card-text.grey.pt-5(:class='darkMode ? `darken-3-d3` : `lighten-5`')
v-card-text.grey.pt-5(:class='$vuetify.theme.dark ? `darken-3-d3` : `lighten-5`')
v-container.pa-0(fluid, grid-list-lg)
v-row
v-col(cols='6')
@@ -197,7 +197,7 @@
persistent-hint
)
v-divider
v-card-text.grey.pt-5(:class='darkMode ? `darken-3-d3` : `lighten-5`')
v-card-text.grey.pt-5(:class='$vuetify.theme.dark ? `darken-3-d3` : `lighten-5`')
.overline.pb-3 {{$t('editor:props.css')}}
v-textarea(
outlined
@@ -279,7 +279,6 @@ export default {
get() { return this.value },
set(val) { this.$emit('input', val) }
},
darkMode: get('site/dark'),
mode: get('editor/mode'),
title: sync('page/title'),
description: sync('page/description'),

View File

@@ -1,5 +1,5 @@
<template lang='pug'>
v-app(:dark='darkMode').history
v-app(:dark='$vuetify.theme.dark').history
nav-header
v-content
v-toolbar(color='primary', dark)
@@ -15,8 +15,8 @@
v-chip.my-0.ml-6(
label
small
:color='darkMode ? `grey darken-2` : `grey lighten-2`'
:class='darkMode ? `grey--text text--lighten-2` : `grey--text text--darken-2`'
:color='$vuetify.theme.dark ? `grey darken-2` : `grey lighten-2`'
:class='$vuetify.theme.dark ? `grey--text text--lighten-2` : `grey--text text--darken-2`'
)
span Live
v-timeline(
@@ -92,14 +92,14 @@
v-else
label
small
:color='darkMode ? `grey darken-2` : `grey lighten-2`'
:class='darkMode ? `grey--text text--lighten-2` : `grey--text text--darken-2`'
:color='$vuetify.theme.dark ? `grey darken-2` : `grey lighten-2`'
:class='$vuetify.theme.dark ? `grey--text text--lighten-2` : `grey--text text--darken-2`'
) End of history trail
v-flex(xs12, md8)
v-card.radius-7(:class='$vuetify.breakpoint.mdAndUp ? `mt-8` : ``')
v-card-text
v-card.grey.radius-7(flat, :class='darkMode ? `darken-2` : `lighten-4`')
v-card.grey.radius-7(flat, :class='$vuetify.theme.dark ? `darken-2` : `lighten-4`')
v-row(no-gutters, align='center')
v-col
v-card-text
@@ -132,7 +132,6 @@
<script>
import * as Diff2Html from 'diff2html'
import { createPatch } from 'diff'
import { get } from 'vuex-pathify'
import _ from 'lodash'
import gql from 'graphql-tag'
@@ -224,7 +223,6 @@ export default {
}
},
computed: {
darkMode: get('site/dark'),
fullTrail () {
const liveTrailItem = {
versionId: 0,
@@ -501,13 +499,13 @@ export default {
trailBgColor (actionType) {
switch (actionType) {
case 'move':
return this.darkMode ? 'purple' : 'purple lighten-5'
return this.$vuetify.theme.dark ? 'purple' : 'purple lighten-5'
case 'initial':
return this.darkMode ? 'teal darken-3' : 'teal lighten-5'
return this.$vuetify.theme.dark ? 'teal darken-3' : 'teal lighten-5'
case 'live':
return this.darkMode ? 'orange darken-3' : 'orange lighten-5'
return this.$vuetify.theme.dark ? 'orange darken-3' : 'orange lighten-5'
default:
return this.darkMode ? 'grey darken-3' : 'grey lighten-4'
return this.$vuetify.theme.dark ? 'grey darken-3' : 'grey lighten-4'
}
}
},

View File

@@ -1,5 +1,5 @@
<template lang='pug'>
v-app(:dark='darkMode').profile
v-app(:dark='$vuetify.theme.dark').profile
nav-header
v-navigation-drawer.pb-0(v-model='profileDrawerShown', app, fixed, clipped, left, permanent)
v-list(dense, nav)
@@ -34,7 +34,7 @@
<script>
import VueRouter from 'vue-router'
/* global WIKI, siteConfig */
/* global WIKI */
const router = new VueRouter({
mode: 'history',
@@ -63,9 +63,6 @@ export default {
profileDrawerShown: true
}
},
computed: {
darkMode() { return siteConfig.darkMode }
},
router,
created() {
this.$store.commit('page/SET_MODE', 'profile')

View File

@@ -1,5 +1,5 @@
<template lang='pug'>
v-app(:dark='darkMode').source
v-app(:dark='$vuetify.theme.dark').source
nav-header
v-content
v-toolbar(color='primary', dark)
@@ -17,7 +17,7 @@
v-btn.ml-4(depressed, color='blue darken-1', @click='goLive') {{$t('common:page.returnNormalView')}}
v-card(tile)
v-card-text
v-card.grey.radius-7(flat, :class='darkMode ? `darken-4` : `lighten-4`')
v-card.grey.radius-7(flat, :class='$vuetify.theme.dark ? `darken-4` : `lighten-4`')
v-card-text
pre
code
@@ -29,8 +29,6 @@
</template>
<script>
import { get } from 'vuex-pathify'
export default {
props: {
pageId: {
@@ -57,9 +55,6 @@ export default {
data() {
return {}
},
computed: {
darkMode: get('site/dark')
},
created () {
this.$store.commit('page/SET_ID', this.id)
this.$store.commit('page/SET_LOCALE', this.locale)

View File

@@ -1,5 +1,5 @@
<template lang='pug'>
v-app(:dark='darkMode').tags
v-app(:dark='$vuetify.theme.dark').tags
nav-header
v-navigation-drawer.pb-0.elevation-1(app, fixed, clipped, :right='$vuetify.rtl', permanent, width='300')
vue-scroll(:ops='scrollStyle')
@@ -151,7 +151,6 @@
</template>
<script>
import { get } from 'vuex-pathify'
import VueRouter from 'vue-router'
import _ from 'lodash'
@@ -209,7 +208,6 @@ export default {
}
},
computed: {
darkMode: get('site/dark'),
tagsGrouped () {
return _.groupBy(this.tags, t => t.title.charAt(0).toUpperCase())
},