display alert in link tab
This commit is contained in:
parent
ff67f8381b
commit
3b7732ceb2
@ -229,7 +229,7 @@
|
|||||||
&[readonly] {
|
&[readonly] {
|
||||||
background-color: @alertify-light-bg;
|
background-color: @alertify-light-bg;
|
||||||
color: @cryptpad_text_col;
|
color: @cryptpad_text_col;
|
||||||
border-color: @alertify-input-fg;
|
border-color: @alertify-light-bg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -509,5 +509,11 @@
|
|||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.alert {
|
||||||
|
margin:5px 0px;
|
||||||
|
font-size:12px;
|
||||||
|
padding:5px;
|
||||||
|
border-radius:0px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1068,6 +1068,16 @@ define([
|
|||||||
UI.createCheckbox('cp-share-embed', Messages.share_linkEmbed, false, { mark: {tabindex:1} }),
|
UI.createCheckbox('cp-share-embed', Messages.share_linkEmbed, false, { mark: {tabindex:1} }),
|
||||||
h('br'),
|
h('br'),
|
||||||
];
|
];
|
||||||
|
// check if the pad is password protection
|
||||||
|
var hash = hashes.editHash || hashes.viewHash;
|
||||||
|
var href = origin + pathname + '#' + hash;
|
||||||
|
var parsedHref = Hash.parsePadUrl(href);
|
||||||
|
var hasPassword = parsedHref.hashData.password;
|
||||||
|
if (hasPassword) {
|
||||||
|
linkContent.push(h('div.alert.alert-danger', [h('i.fa.fa-lock'),
|
||||||
|
' ', 'has password']))
|
||||||
|
};
|
||||||
|
|
||||||
linkContent.push(UI.dialog.selectable('', { id: 'cp-share-link-preview', tabindex: 1 }));
|
linkContent.push(UI.dialog.selectable('', { id: 'cp-share-link-preview', tabindex: 1 }));
|
||||||
|
|
||||||
var link = h('div.cp-share-modal', linkContent);
|
var link = h('div.cp-share-modal', linkContent);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user