Add deprecation notice for Send File and Send Image nodes #102

This commit is contained in:
Skylar Sadlier 2024-06-24 19:20:19 -06:00
parent 351679ad77
commit 65edc94854
2 changed files with 42 additions and 2 deletions

View File

@ -1,6 +1,6 @@
<script type="text/javascript"> <script type="text/javascript">
RED.nodes.registerType('matrix-send-file',{ RED.nodes.registerType('matrix-send-file',{
category: 'matrix', category: 'matrix (deprecated)',
color: '#00b7ca', color: '#00b7ca',
icon: "matrix.png", icon: "matrix.png",
outputLabels: ["success", "error"], outputLabels: ["success", "error"],
@ -20,6 +20,26 @@
</script> </script>
<script type="text/html" data-template-name="matrix-send-file"> <script type="text/html" data-template-name="matrix-send-file">
<style>
.matrix-chat-alert {
color: #b94a48;
background-color: #f2dede;
border-color: #eed3d7;
margin: 30px 0;
padding: 8px 35px 8px 14px;
}
.matrix-chat-alert a, .matrix-chat-alert a:active, .matrix-chat-alert a:hover {
color: #b94a48;
text-decoration: underline;
font-weight: bold;
}
</style>
<div class="matrix-chat-alert">
<strong>Deprecation Warning!</strong> This node will be removed in a future release. We have consolidated the Send File & Send Image nodes into a single Upload File node (with more options). Read <a href="https://github.com/Skylar-Tech/node-red-contrib-matrix-chat/issues/102" target="_blank">here</a> for more info.<br>
<br>
Replace this node with a File Upload node attached to a Send Message node to accomplish the same behavior.
</div>
<div class="form-row"> <div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label> <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name"> <input type="text" id="node-input-name" placeholder="Name">

View File

@ -1,6 +1,6 @@
<script type="text/javascript"> <script type="text/javascript">
RED.nodes.registerType('matrix-send-image',{ RED.nodes.registerType('matrix-send-image',{
category: 'matrix', category: 'matrix (deprecated)',
color: '#00b7ca', color: '#00b7ca',
icon: "matrix.png", icon: "matrix.png",
outputLabels: ["success", "error"], outputLabels: ["success", "error"],
@ -20,6 +20,26 @@
</script> </script>
<script type="text/html" data-template-name="matrix-send-image"> <script type="text/html" data-template-name="matrix-send-image">
<style>
.matrix-chat-alert {
color: #b94a48;
background-color: #f2dede;
border-color: #eed3d7;
margin: 30px 0;
padding: 8px 35px 8px 14px;
}
.matrix-chat-alert a, .matrix-chat-alert a:active, .matrix-chat-alert a:hover {
color: #b94a48;
text-decoration: underline;
font-weight: bold;
}
</style>
<div class="matrix-chat-alert">
<strong>Deprecation Warning!</strong> This node will be removed in a future release. We have consolidated the Send File & Send Image nodes into a single Upload File node (with more options). Read <a href="https://github.com/Skylar-Tech/node-red-contrib-matrix-chat/issues/102" target="_blank">here</a> for more info.<br>
<br>
Replace this node with a File Upload node attached to a Send Message node to accomplish the same behavior.
</div>
<div class="form-row"> <div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label> <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name"> <input type="text" id="node-input-name" placeholder="Name">