forked from owdproject/owdproject.org
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
hacklover
committed
Mar 26, 2021
1 parent
325c325
commit 1f7d5fe
Showing
13 changed files
with
366 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,77 +1,39 @@ | ||
<template> | ||
<v-toolbar max-height="64px" height="64px" elevation="0"> | ||
<Logo square small :class="['mr-12', {'visible': visible}]"> | ||
<v-toolbar-title>Open Web Desktop</v-toolbar-title> | ||
|
||
<Logo large class="mr-12" style="pointer-events: none;"> | ||
<v-toolbar-title class="font-weight-bold hidden-md-and-down">Open Web Desktop</v-toolbar-title> | ||
</Logo> | ||
|
||
<v-spacer /> | ||
|
||
<v-tooltip bottom> | ||
<template v-slot:activator="{ on, attrs }"> | ||
<v-btn text class="ml-2" :icon="$vuetify.breakpoint.xsOnly" v-on="on"> | ||
<v-icon :left="$vuetify.breakpoint.smAndUp">mdi-text-box-outline</v-icon> | ||
<span class="hidden-xs-only" v-text="`Documentation`" /> | ||
</v-btn> | ||
</template> | ||
<span>Not available</span> | ||
</v-tooltip> | ||
|
||
<v-btn text class="ml-2" :icon="$vuetify.breakpoint.xsOnly" :href="owdLinkModules" target="_blank"> | ||
<v-icon :left="$vuetify.breakpoint.smAndUp">mdi-puzzle</v-icon> | ||
<span class="hidden-xs-only" v-text="`Modules`" /> | ||
</v-btn> | ||
<HeaderMenuClient /> | ||
<HeaderMenuModules /> | ||
|
||
<v-btn text class="ml-2" :icon="$vuetify.breakpoint.xsOnly" :href="owdLinkRepository" target="_blank"> | ||
<v-icon :left="$vuetify.breakpoint.smAndUp">mdi-github</v-icon> | ||
<span class="hidden-xs-only" v-text="`GitHub`" /> | ||
</v-btn> | ||
</v-toolbar> | ||
</template> | ||
|
||
<script> | ||
import mixinLinks from "../../mixins/mixinLinks"; | ||
import mixinLinks from "@/mixins/mixinLinks"; | ||
import Logo from "~/components/Logo"; | ||
import {mapGetters} from "vuex"; | ||
import HeaderMenuClient from "./menu/HeaderMenuClient"; | ||
import HeaderMenuModules from "./menu/HeaderMenuModules"; | ||
export default { | ||
name: "Header", | ||
components: {Logo}, | ||
components: {HeaderMenuModules, HeaderMenuClient, Logo}, | ||
mixins: [mixinLinks], | ||
data() { | ||
return { | ||
visible: false | ||
} | ||
}, | ||
computed: { | ||
...mapGetters({ | ||
'demoActive': 'demo/active' | ||
}) | ||
}, | ||
mounted() { | ||
this.$store.subscribe((mutation) => { | ||
if (mutation.type === 'demo/SET_DEMO_LOADED') { | ||
this.visible = mutation.payload | ||
} | ||
if (mutation.type === 'demo/SET_DEMO_ACTIVE') { | ||
this.visible = mutation.payload | ||
} | ||
}) | ||
} | ||
} | ||
</script> | ||
|
||
<style lang="scss"> | ||
.v-toolbar { | ||
<style scoped lang="scss"> | ||
.theme--dark.v-toolbar.v-sheet { | ||
background: #1E1E1E; | ||
user-select: none; | ||
.logo { | ||
transition: transform 1s ease-in-out; | ||
transform: translateX(-56px); | ||
will-change: transform; | ||
&.visible { | ||
transform: translateX(8px); | ||
} | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
<template> | ||
<v-menu | ||
:close-on-content-click="false" | ||
:min-width="320" | ||
nudge-bottom="66" | ||
> | ||
<template v-slot:activator="{ on, attrs }"> | ||
<v-btn | ||
v-bind="attrs" | ||
v-on="on" | ||
text class="ml-2" :icon="$vuetify.breakpoint.xsOnly" | ||
> | ||
<v-icon :left="$vuetify.breakpoint.smAndUp">mdi-hexagon-multiple-outline</v-icon> | ||
<span class="hidden-xs-only" v-text="`OWD Client`" /> | ||
</v-btn> | ||
</template> | ||
|
||
<v-card> | ||
<v-list> | ||
<v-list-item> | ||
<v-list-item-avatar tile> | ||
<img | ||
src="favicon.png" | ||
alt="Open Web Desktop" | ||
> | ||
</v-list-item-avatar> | ||
|
||
<v-list-item-content> | ||
<v-list-item-title>OWD Client</v-list-item-title> | ||
<v-list-item-subtitle v-text="repositoryLastTagNext" /> | ||
</v-list-item-content> | ||
|
||
<v-list-item-action> | ||
<v-icon>mdi-github</v-icon> | ||
</v-list-item-action> | ||
</v-list-item> | ||
</v-list> | ||
|
||
<v-divider/> | ||
|
||
<v-list dense> | ||
<v-list-item-group | ||
color="primary" | ||
> | ||
<v-list-item :href="owdLinkRepository + '/tree/next'" target="_blank"> | ||
<v-list-item-icon> | ||
<v-icon>mdi-open-in-new</v-icon> | ||
</v-list-item-icon> | ||
<v-list-item-content> | ||
<v-list-item-title>OWD Client {{repositoryLastTagNext}}</v-list-item-title> | ||
</v-list-item-content> | ||
</v-list-item> | ||
<v-list-item :href="owdLinkRepository" target="_blank"> | ||
<v-list-item-icon> | ||
<v-icon>mdi-open-in-new</v-icon> | ||
</v-list-item-icon> | ||
<v-list-item-content> | ||
<v-list-item-title>OWD Client {{repositoryLastTagCurrent}}</v-list-item-title> | ||
</v-list-item-content> | ||
</v-list-item> | ||
</v-list-item-group> | ||
</v-list> | ||
|
||
<v-divider/> | ||
|
||
<v-card-actions> | ||
<v-spacer /> | ||
|
||
<v-btn text :href="socialLinkPatreon" target="_blank"> | ||
Patreon | ||
</v-btn> | ||
<v-btn text :href="socialLinkLiberaPay" target="_blank"> | ||
LiberaPay | ||
</v-btn> | ||
</v-card-actions> | ||
</v-card> | ||
</v-menu> | ||
</template> | ||
|
||
<script> | ||
import mixinLinks from "@/mixins/mixinLinks"; | ||
export default { | ||
mixins: [mixinLinks], | ||
computed: { | ||
repositoryLastTagCurrent() { | ||
const tag = this.$store.getters["repository/lastTagCurrent"] | ||
if (tag) { | ||
return tag.name.replace('v', '') | ||
} | ||
return "" | ||
}, | ||
repositoryLastTagNext() { | ||
const tag = this.$store.getters["repository/lastTagNext"] | ||
if (tag) { | ||
return tag.name.replace('v', '') | ||
} | ||
return "" | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style scoped lang="scss"> | ||
</style> |
Oops, something went wrong.