-
Notifications
You must be signed in to change notification settings - Fork 897
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'development' into use-i18n-polyfill
- Loading branch information
Showing
47 changed files
with
993 additions
and
543 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
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
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
File renamed without changes.
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,45 @@ | ||
<template> | ||
<FtCard | ||
class="card" | ||
> | ||
<h3>{{ $t("Settings.Password Dialog.Enter Password To Unlock") }}</h3> | ||
|
||
<FtInput | ||
ref="password" | ||
:placeholder="$t('Settings.Password Dialog.Password')" | ||
:show-action-button="false" | ||
input-type="password" | ||
class="passwordInput" | ||
@input="handlePasswordInput" | ||
/> | ||
</FtCard> | ||
</template> | ||
|
||
<script setup> | ||
import { computed, onMounted, ref } from 'vue' | ||
import FtCard from '../ft-card/ft-card.vue' | ||
import FtInput from '../ft-input/ft-input.vue' | ||
import store from '../../store/index' | ||
const emit = defineEmits(['unlocked']) | ||
const password = ref(null) | ||
onMounted(() => { | ||
password.value.focus() | ||
}) | ||
const settingsPassword = computed(() => { | ||
return store.getters.getSettingsPassword | ||
}) | ||
function handlePasswordInput(input) { | ||
if (input === settingsPassword.value) { | ||
emit('unlocked') | ||
} | ||
} | ||
</script> | ||
|
||
<style scoped src="./PasswordDialog.css" /> |
File renamed without changes.
67 changes: 67 additions & 0 deletions
67
src/renderer/components/PasswordSettings/PasswordSettings.vue
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,67 @@ | ||
<template> | ||
<FtSettingsSection | ||
:title="$t('Settings.Password Settings.Password Settings')" | ||
> | ||
<FtFlexBox | ||
v-if="hasStoredPassword" | ||
class="settingsFlexStart460px" | ||
> | ||
<FtButton | ||
:label="$t('Settings.Password Settings.Remove Password')" | ||
@click="handleRemovePassword" | ||
/> | ||
</FtFlexBox> | ||
<FtFlexBox | ||
v-else | ||
class="settingsFlexStart460px" | ||
> | ||
<FtInput | ||
:placeholder="$t('Settings.Password Settings.Set Password To Prevent Access')" | ||
:show-action-button="false" | ||
show-label | ||
input-type="password" | ||
:value="password" | ||
@input="e => password = e" | ||
@keydown.enter.native="handleSetPassword" | ||
/> | ||
<FtButton | ||
class="centerButton" | ||
:label="$t('Settings.Password Settings.Set Password')" | ||
@click="handleSetPassword" | ||
/> | ||
</FtFlexBox> | ||
</FtSettingsSection> | ||
</template> | ||
|
||
<script setup> | ||
import { computed, ref } from 'vue' | ||
import FtSettingsSection from '../ft-settings-section/ft-settings-section.vue' | ||
import FtInput from '../ft-input/ft-input.vue' | ||
import FtFlexBox from '../ft-flex-box/ft-flex-box.vue' | ||
import FtButton from '../ft-button/ft-button.vue' | ||
import store from '../../store/index' | ||
const settingsPassword = computed(() => { | ||
return store.getters.getSettingsPassword | ||
}) | ||
const hasStoredPassword = computed(() => { | ||
return settingsPassword.value !== '' | ||
}) | ||
const password = ref('') | ||
function handleSetPassword() { | ||
store.dispatch('updateSettingsPassword', password.value) | ||
password.value = '' | ||
} | ||
function handleRemovePassword() { | ||
store.dispatch('updateSettingsPassword', '') | ||
password.value = '' | ||
} | ||
</script> | ||
|
||
<style scoped src="./PasswordSettings.css" /> |
Oops, something went wrong.