Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
<ft-prompt
v-if="showRestartPrompt"
:label="$t('Settings[\'The app needs to restart for changes to take effect. Restart and apply change?\']')"
:option-names="[$t('Yes'), $t('No')]"
:option-values="['yes', 'no']"
:option-names="[$t('Yes, Restart'), $t('Cancel')]"
:option-values="['restart', 'cancel']"
:is-first-option-destructive="true"
@click="handleReplaceHttpCache"
/>
</ft-settings-section>
Expand Down
14 changes: 14 additions & 0 deletions src/renderer/components/ft-icon-button/ft-icon-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,20 @@
}
}

&.destructive {
background-color: var(--destructive-color);
color: var(--destructive-text-color);

&:hover,
&:focus-visible {
background-color: var(--destructive-hover-color);
}

&:active {
background-color: var(--destructive-active-color);
}
}

&.favorite, &.favorite:hover, &.favorite:focus-visible {
color: var(--favorite-icon-color);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ export default defineComponent({
subscriptions: [],
selectedLength: 0,
deletePromptValues: [
'yes',
'no'
'delete',
'cancel'
]
}
},
Expand All @@ -61,8 +61,8 @@ export default defineComponent({
},
deletePromptNames: function () {
return [
this.$t('Yes'),
this.$t('No')
this.$t('Yes, Delete'),
this.$t('Cancel')
]
},
locale: function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
/>
<ft-button
:label="$t('Profile.Delete Selected')"
text-color="var(--text-with-main-color)"
background-color="var(--primary-color)"
text-color="var(--destructive-text-color)"
background-color="var(--destructive-color)"
@click="displayDeletePrompt"
/>
</ft-flex-box>
Expand All @@ -41,6 +41,7 @@
:label="deletePromptMessage"
:option-names="deletePromptNames"
:option-values="deletePromptValues"
:is-first-option-destructive="true"
@click="handleDeletePromptClick"
/>
</div>
Expand Down
10 changes: 5 additions & 5 deletions src/renderer/components/ft-profile-edit/ft-profile-edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ export default defineComponent({
profileBgColor: '',
profileTextColor: '',
deletePromptValues: [
'yes',
'no'
'delete',
'cancel'
]
}
},
Expand All @@ -62,8 +62,8 @@ export default defineComponent({
},
deletePromptNames: function () {
return [
this.$t('Yes'),
this.$t('No')
this.$t('Yes, Delete'),
this.$t('Cancel')
]
}
},
Expand All @@ -84,7 +84,7 @@ export default defineComponent({
},

handleDeletePrompt: function (response) {
if (response === 'yes') {
if (response === 'delete') {
this.deleteProfile()
} else {
this.showDeletePrompt = false
Expand Down
5 changes: 3 additions & 2 deletions src/renderer/components/ft-profile-edit/ft-profile-edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@
<ft-button
v-if="!isMainProfile"
:label="$t('Profile.Delete Profile')"
text-color="var(--text-with-main-color)"
background-color="var(--primary-color)"
text-color="var(--destructive-text-color)"
background-color="var(--destructive-color)"
@click="openDeletePrompt"
/>
</template>
Expand All @@ -96,6 +96,7 @@
:label="deletePromptLabel"
:option-names="deletePromptNames"
:option-values="deletePromptValues"
:is-first-option-destructive="true"
@click="handleDeletePrompt"
/>
</div>
Expand Down
6 changes: 5 additions & 1 deletion src/renderer/components/ft-prompt/ft-prompt.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ export default defineComponent({
autosize: {
type: Boolean,
default: false
}
},
isFirstOptionDestructive: {
Comment thread
kommunarr marked this conversation as resolved.
type: Boolean,
default: false
},
},
data: function () {
return {
Expand Down
2 changes: 2 additions & 0 deletions src/renderer/components/ft-prompt/ft-prompt.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
:id="'prompt-' + sanitizedLabel + '-' + index"
:key="index"
:label="option"
:text-color="index === 0 && isFirstOptionDestructive ? 'var(--destructive-text-color)' : null"
:background-color="index === 0 && isFirstOptionDestructive ? 'var(--destructive-color)' : null"
@click="$emit('click', optionValues[index])"
/>
<ft-button
Expand Down
14 changes: 7 additions & 7 deletions src/renderer/components/privacy-settings/privacy-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export default defineComponent({
showRemoveHistoryPrompt: false,
showRemoveSubscriptionsPrompt: false,
promptValues: [
'yes',
'no'
'delete',
'cancel'
]
}
},
Expand All @@ -50,16 +50,16 @@ export default defineComponent({
},
promptNames: function () {
return [
this.$t('Yes'),
this.$t('No')
this.$t('Yes, Delete'),
this.$t('Cancel')
]
}
},
methods: {
handleSearchCache: function (option) {
this.showSearchCachePrompt = false

if (option === 'yes') {
if (option === 'delete') {
this.clearSessionSearchHistory()
showToast(this.$t('Settings.Privacy Settings.Search cache has been cleared'))
}
Expand All @@ -83,7 +83,7 @@ export default defineComponent({
handleRemoveHistory: function (option) {
this.showRemoveHistoryPrompt = false

if (option === 'yes') {
if (option === 'delete') {
this.removeAllHistory()
showToast(this.$t('Settings.Privacy Settings.Watch history has been cleared'))
}
Expand All @@ -94,7 +94,7 @@ export default defineComponent({

this.updateActiveProfile(MAIN_PROFILE_ID)

if (option !== 'yes') { return }
if (option !== 'delete') { return }

this.profileList.forEach((profile) => {
if (profile._id === MAIN_PROFILE_ID) {
Expand Down
15 changes: 9 additions & 6 deletions src/renderer/components/privacy-settings/privacy-settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,20 @@
<ft-flex-box>
<ft-button
:label="$t('Settings.Privacy Settings.Clear Search Cache')"
text-color="var(--text-with-main-color)"
background-color="var(--primary-color)"
text-color="var(--destructive-text-color)"
background-color="var(--destructive-color)"
@click="showSearchCachePrompt = true"
/>
<ft-button
:label="$t('Settings.Privacy Settings.Remove Watch History')"
text-color="var(--text-with-main-color)"
background-color="var(--primary-color)"
text-color="var(--destructive-text-color)"
background-color="var(--destructive-color)"
@click="showRemoveHistoryPrompt = true"
/>
<ft-button
:label="$t('Settings.Privacy Settings.Remove All Subscriptions / Profiles')"
text-color="var(--text-with-main-color)"
background-color="var(--primary-color)"
text-color="var(--destructive-text-color)"
background-color="var(--destructive-color)"
@click="showRemoveSubscriptionsPrompt = true"
/>
</ft-flex-box>
Expand All @@ -65,20 +65,23 @@
:label="$t('Settings.Privacy Settings.Are you sure you want to clear out your search cache?')"
:option-names="promptNames"
:option-values="promptValues"
:is-first-option-destructive="true"
@click="handleSearchCache"
/>
<ft-prompt
v-if="showRemoveHistoryPrompt"
:label="$t('Settings.Privacy Settings.Are you sure you want to remove your entire watch history?')"
:option-names="promptNames"
:option-values="promptValues"
:is-first-option-destructive="true"
@click="handleRemoveHistory"
/>
<ft-prompt
v-if="showRemoveSubscriptionsPrompt"
:label="removeSubscriptionsPromptMessage"
:option-names="promptNames"
:option-values="promptValues"
:is-first-option-destructive="true"
@click="handleRemoveSubscriptions"
/>
</ft-settings-section>
Expand Down
10 changes: 5 additions & 5 deletions src/renderer/components/theme-settings/theme-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ export default defineComponent({
disableSmoothScrollingToggleValue: false,
showRestartPrompt: false,
restartPromptValues: [
'yes',
'no'
'restart',
'cancel'
],
baseThemeValues: [
'system',
Expand Down Expand Up @@ -88,8 +88,8 @@ export default defineComponent({

restartPromptNames: function () {
return [
this.$t('Yes'),
this.$t('No')
this.$t('Yes, Restart'),
this.$t('Cancel')
]
},

Expand Down Expand Up @@ -146,7 +146,7 @@ export default defineComponent({
handleSmoothScrolling: function (value) {
this.showRestartPrompt = false

if (value === null || value === 'no') {
if (value === null || value === 'cancel') {
this.disableSmoothScrollingToggleValue = !this.disableSmoothScrollingToggleValue
return
}
Expand Down
1 change: 1 addition & 0 deletions src/renderer/components/theme-settings/theme-settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
:label="restartPromptMessage"
:option-names="restartPromptNames"
:option-values="restartPromptValues"
:is-first-option-destructive="true"
@click="handleSmoothScrolling"
/>
</ft-settings-section>
Expand Down
11 changes: 11 additions & 0 deletions src/renderer/themes.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
.pastelPink,
.hotPink {
--primary-input-color: rgba(0, 0, 0, 0.50);
--destructive-color: #f44336;
--destructive-text-color: #FFFFFF;
--destructive-hover-color: #e53935;
--destructive-active-color: #c62828;
}

.system[data-system-theme*='light'], .light,
Expand Down Expand Up @@ -237,6 +241,13 @@ it can be safely elided. This looks quite pleasant on this theme. */
text-decoration: underline;
}

.mainRed, .secRed {
--destructive-color: #7F0000 !important;
--destructive-text-color: #FFFFFF !important;
--destructive-hover-color: #FF2F2F !important;
--destructive-active-color: #AD6060 !important;
}

.mainRed,
.mainPink,
.mainPurple,
Expand Down
3 changes: 3 additions & 0 deletions static/locales/en-US.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -939,3 +939,6 @@ Hashtag:
Yes: Yes
No: No
Ok: Ok
Yes, Delete: Yes, Delete
Yes, Restart: Yes, Restart
Cancel: Cancel