commit: d5a5b8e25430e44690c51e56ad7f862ce363e458
parent 4d7a9151542da6298a68bf577ad61acf6feb339b
Author: Ekaterina Vaartis <vaartis@kotobank.ch>
Date: Mon, 22 Jan 2024 23:43:20 +0300
Fix typo, add warning on replacing local pack
Diffstat:
5 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/src/components/settings_modal/admin_tabs/emoji_tab.js b/src/components/settings_modal/admin_tabs/emoji_tab.js
@@ -60,6 +60,10 @@ const EmojiTab = {
}
return result
+ },
+ downloadWillReplaceLocal () {
+ return (this.remotePackDownloadAs.trim() === '' && this.pack.remote && this.pack.remote.baseName in this.knownLocalPacks) ||
+ (this.remotePackDownloadAs in this.knownLocalPacks)
}
},
diff --git a/src/components/settings_modal/admin_tabs/emoji_tab.scss b/src/components/settings_modal/admin_tabs/emoji_tab.scss
@@ -54,4 +54,8 @@
.emoji-tab-popover-file {
padding-top: 3px;
}
+
+ .warning {
+ color: var(--cOrange, $fallback--cOrange);
+ }
}
diff --git a/src/components/settings_modal/admin_tabs/emoji_tab.vue b/src/components/settings_modal/admin_tabs/emoji_tab.vue
@@ -200,10 +200,16 @@
<div>
<div>
<div class="emoji-tab-popover-input">
- <label for="remote-download-as-input">{{ $t('admin_dash.emoji.download_as_name') }}</label>
- <input id="remote-download-as-input" class="emoji-data-input"
- v-model="remotePackDownloadAs"
- :placeholder="$t('admin_dash.emoji.download_as_name_full')">
+ <label>
+ {{ $t('admin_dash.emoji.download_as_name') }}
+ <input class="emoji-data-input"
+ v-model="remotePackDownloadAs"
+ :placeholder="$t('admin_dash.emoji.download_as_name_full')">
+ </label>
+
+ <div v-if="downloadWillReplaceLocal" class="warning">
+ <em>{{ $t('admin_dash.emoji.replace_warning') }}</em>
+ </div>
</div>
<button
diff --git a/src/components/settings_modal/helpers/emoji_editing_popover.vue b/src/components/settings_modal/helpers/emoji_editing_popover.vue
@@ -168,7 +168,7 @@ export default {
})
}
},
- emits: ['updatePackFiles', 'displaError'],
+ emits: ['updatePackFiles', 'displayError'],
props: {
placement: String,
disabled: {
diff --git a/src/i18n/en.json b/src/i18n/en.json
@@ -974,7 +974,8 @@
"editing": "Editing {0}",
"delete_title": "Delete?",
"metadata_changed": "Metadata different from saved",
- "emoji_changed": "Unsaved emoji file changes, check highlighted emoji"
+ "emoji_changed": "Unsaved emoji file changes, check highlighted emoji",
+ "replace_warning": "This will REPLACE the local pack of the same name"
},
"temp_overrides": {
":pleroma": {