-
-
Notifications
You must be signed in to change notification settings - Fork 448
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Craig Bassett <[email protected]>
- Loading branch information
Showing
23 changed files
with
209 additions
and
92 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,5 +14,5 @@ | |
"fluidd.xyz", | ||
"fluidd.net" | ||
], | ||
"skipClientUpdates": false | ||
"hosted": false | ||
} |
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 |
---|---|---|
|
@@ -14,5 +14,5 @@ | |
"fluidd.xyz", | ||
"fluidd.net" | ||
], | ||
"skipClientUpdates": true | ||
"hosted": true | ||
} |
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<template> | ||
<svg | ||
alt="Fluidd" | ||
:width="width" | ||
:height="height" | ||
viewBox="0 0 314 361" | ||
version="1.1" | ||
xmlns="http://www.w3.org/2000/svg" | ||
xmlns:xlink="http://www.w3.org/1999/xlink"> | ||
<g transform="translate(-162.000000, -110.000000)"> | ||
<path d="M234.444,327.531 L309.066,389.594 C309.906,390.313 310.81,390.928 311.759,391.436 L311.759,391.436 L311.771,391.442 L312.055,391.589 L312.163,391.643 L312.356,391.737 L312.534,391.821 L312.668,391.883 L312.902,391.987 L312.974,392.017 C314.656,392.733 316.433,393.128 318.217,393.206 L318.217,393.206 L318.278,393.209 L318.562,393.218 L318.674,393.22 L318.904,393.221 L319.104,393.22 L319.231,393.218 L319.529,393.208 L319.571,393.207 C321.359,393.128 323.142,392.733 324.829,392.013 L324.829,392.013 L324.877,391.993 L325.143,391.875 L325.244,391.829 L325.438,391.737 L325.643,391.638 L325.731,391.593 L326.012,391.447 L326.042,391.432 C326.989,390.925 327.891,390.311 328.729,389.593 L328.729,389.593 L398.493,331.574 L434.768,355.517 L318.896,470.422 L198.4,350.923 L234.444,327.531 Z M237.067,234.697 L310.465,281.908 C313.075,283.623 315.986,284.481 318.897,284.482 C321.805,284.482 324.713,283.626 327.325,281.912 L327.325,281.912 L400.727,234.702 L456.849,263.367 L318.897,378.093 L180.945,263.359 L237.067,234.697 Z M318.897,110.68 L475.771,168.448 L318.897,269.344 L162.024,168.44 L318.897,110.68 Z" id="Combined-Shape" :fill="secondaryColor"></path> | ||
<path d="M318.897,110.68 L475.771,168.448 L319,269.278 L319,111 L318.028,111 L318.897,110.68 Z" id="Combined-Shape" :fill="primaryColor"></path> | ||
<path d="M400.727,234.702 L456.849,263.367 L319,378.007 L319.000106,284.481641 C321.735222,284.46261 324.467243,283.686291 326.949875,282.151021 L327.325,281.912 L400.727,234.702 Z" id="Combined-Shape" :fill="primaryColor"></path> | ||
<path d="M398.493,331.574 L434.768,355.517 L319,470.319 L319,393.22 L319.104,393.22 L319.231,393.218 L319.529,393.208 L319.571,393.207 C321.359,393.128 323.142,392.733 324.829,392.013 L324.829,392.013 L324.877,391.993 L325.143,391.875 L325.244,391.829 L325.438,391.737 L325.643,391.638 L325.731,391.593 L326.012,391.447 L326.042,391.432 C326.989,390.925 327.891,390.311 328.729,389.593 L328.729,389.593 L398.493,331.574 Z" id="Combined-Shape" :fill="primaryColor"></path> | ||
</g> | ||
</svg> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import Vue from 'vue' | ||
import { Component, Prop } from 'vue-property-decorator' | ||
@Component({}) | ||
export default class FluiddIcon extends Vue { | ||
@Prop({ type: String, default: 'success' }) | ||
width!: string; | ||
@Prop({ type: String, default: 'Saved!' }) | ||
height!: string; | ||
@Prop({ type: String, required: true }) | ||
primaryColor!: string; | ||
@Prop({ type: String, required: true }) | ||
secondaryColor!: string; | ||
} | ||
</script> |
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,46 +1,98 @@ | ||
|
||
<template> | ||
<collapsable-card | ||
title="Themes" | ||
title="Theme" | ||
subTitle="Define a primary color, and whether to show in dark mode or not." | ||
cardKey="ThemeSettings" | ||
icon="$cogs"> | ||
<v-card-text> | ||
<v-select | ||
label="Theme" | ||
v-model="theme" | ||
:items="['dark', 'light']"> | ||
</v-select> | ||
<!-- <v-switch | ||
<!-- <pre>{{ $vuetify.theme.themes.dark }}</pre> --> | ||
<!-- <pre>{{ color }}</pre> --> | ||
|
||
<v-color-picker | ||
:value="theme.colors.primary" | ||
@update:color="handlePrimaryColorChange" | ||
mode="hexa" | ||
hide-mode-switch | ||
hide-inputs | ||
canvas-height="100" | ||
dot-size="25" | ||
> | ||
</v-color-picker> | ||
|
||
<v-switch | ||
@click.native.stop | ||
v-model="darkmode" | ||
label="Dark Mode" | ||
v-model="theme.darkMode" | ||
@change="handleDarkModeChange" | ||
hide-details | ||
class="mr-5 d-none d-sm-block" | ||
></v-switch> --> | ||
class="mb-5" | ||
></v-switch> | ||
|
||
<v-btn | ||
color="secondary" | ||
@click="handleReset" | ||
> | ||
Reset to default | ||
</v-btn> | ||
|
||
</v-card-text> | ||
</collapsable-card> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { Component, Mixins } from 'vue-property-decorator' | ||
import { debounce } from 'lodash-es' | ||
import UtilsMixin from '@/mixins/utils' | ||
import { ThemeConfig } from '@/store/config/types' | ||
@Component({ | ||
components: {} | ||
}) | ||
export default class ThemeSettingsCard extends Mixins(UtilsMixin) { | ||
// Theme is currently restricted to dark / light. | ||
// This starts impl thought on more options. | ||
get theme () { | ||
const darkMode = this.$store.state.config.uiSettings.general.darkMode | ||
return (darkMode) | ||
? 'dark' | ||
: 'light' | ||
return this.$store.getters['config/getTheme'] | ||
} | ||
setTheme (value: ThemeConfig) { | ||
this.$vuetify.theme.dark = value.darkMode | ||
this.$vuetify.theme.currentTheme.primary = value.colors.primary | ||
} | ||
handlePrimaryColorChange = debounce((value: { hex: string }) => { | ||
this.setTheme({ | ||
darkMode: this.theme.darkMode, | ||
colors: { | ||
primary: value.hex | ||
} | ||
}) | ||
this.$store.dispatch('config/saveGeneric', { key: 'uiSettings.theme.colors.primary', value: value.hex }) | ||
}, 500) | ||
handleDarkModeChange (value: boolean) { | ||
this.setTheme({ | ||
darkMode: value, | ||
colors: { | ||
primary: this.theme.colors.primary | ||
} | ||
}) | ||
this.$store.dispatch('config/saveGeneric', { key: 'uiSettings.theme.darkMode', value }) | ||
} | ||
set theme (val: string) { | ||
const darkMode = (val === 'dark') | ||
this.$vuetify.theme.dark = darkMode | ||
this.$store.dispatch('config/saveGeneric', { key: 'uiSettings.general.darkMode', value: darkMode }) | ||
handleReset () { | ||
const theme: ThemeConfig = { | ||
darkMode: true, | ||
colors: { | ||
primary: '#2196F3' | ||
} | ||
} | ||
this.setTheme(theme) | ||
this.$store.dispatch('config/saveGeneric', { | ||
key: 'uiSettings.theme', | ||
value: theme | ||
}) | ||
} | ||
} | ||
</script> |
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
Oops, something went wrong.