Skip to content

Commit

Permalink
fix #1213,#1129 connection status show && import keys with replacement
Browse files Browse the repository at this point in the history
  • Loading branch information
qishibo committed Jun 5, 2024
1 parent 2a5ca50 commit 8ca81d7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/ConnectionMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<!-- right menu operate icons -->
<i :title="$t('message.redis_status')"
class="connection-right-icon fa fa-home"
:style="{ color: client ? '#7cad7c' : ''}"
@click.stop.prevent="openStatus">
</i>
<i :title="$t('message.redis_console')"
Expand Down Expand Up @@ -68,7 +69,9 @@
</el-dropdown-menu>
</el-dropdown>
</div>
<div :title="connectionTitle()" class="connection-name">{{config.connectionName}}</div>
<div :title="connectionTitle()" class="connection-name">{{config.connectionName}}
<!-- <i v-if="client" style="position: absolute; left: 2px; bottom: 5px; width: 8px; height: 8px; border-radius: 4px; background-color: green;"></i> -->
</div>

<!-- edit connection dialog -->
<NewConnectionDialog
Expand Down Expand Up @@ -269,7 +272,8 @@ export default {
content = Buffer.from(content, 'hex');
ttl = ttl > 0 ? ttl : 0;

this.client.callBuffer('RESTORE', key, ttl, content).then((reply) => {
// fix #1213, REPLACE can be used in Redis>=3.0
this.client.callBuffer('RESTORE', key, ttl, content, 'REPLACE').then((reply) => {
// reply == 'OK'
succ.push(key);
this.$set(this.$refs.importKeysNotify,
Expand Down

0 comments on commit 8ca81d7

Please sign in to comment.