1
0
mirror of https://github.com/nerzhul/ocsms.git synced 2025-06-07 16:06:15 +00:00

Only show the reset button if there are messages

This commit is contained in:
Loic Blot 2018-09-08 00:54:13 +02:00 committed by Loïc Blot
parent f034644459
commit e2999f37ad
2 changed files with 4 additions and 1 deletions

View File

@ -76,6 +76,9 @@ var SmsSettings = new Vue({
ContactList.reset(); ContactList.reset();
Conversation.clear(); Conversation.clear();
}); });
},
isContactListEmpty: function () {
return ContactList.contacts.length === 0;
} }
} }
}); });

View File

@ -72,7 +72,7 @@ use \OCA\OcSms\Lib\CountryCodes;
<option value="0"><?php p($l->t('Disable'));?></option> <option value="0"><?php p($l->t('Disable'));?></option>
</select> </select>
</div> </div>
<div> <div v-if="!isContactListEmpty()">
<button class="crit-button primary" v-on:click="wipeAllMessages();">Reset all messages</button> <button class="crit-button primary" v-on:click="wipeAllMessages();">Reset all messages</button>
</div> </div>
</div> <!-- app-settings-content --> </div> <!-- app-settings-content -->