Permalink
Browse files

a few changes to file search and chat stuff

last tested with libres 0.52a iirc
  • Loading branch information...
1 parent a4090ec commit de40038760268562aaaf64035d19bdabec67a0bc @public committed Feb 18, 2012
Showing with 36 additions and 20 deletions.
  1. +0 −11 bootstrap.sh
  2. +1 −1 raas/Makefile.am
  3. +6 −0 raas/config.h.in
  4. +1 −1 raas/configure.ac
  5. +3 −1 raas/src/entrypoints/file_share.cc
  6. +5 −0 raas/src/entrypoints/static.cc
  7. +3 −2 raas/src/url_map.h
  8. +13 −2 rsjs/chat.html
  9. +4 −2 rsjs/rs-chat.js
View
@@ -38,14 +38,3 @@ make
make test
make install
-# Uses it's own bizarro world build system that doesn't support make install
-# also needs to be made to point at the same openssl as the rest of the prohject
-# must point at the openssl source folder, not build-env because of how derped the build
-# scripts are
-cd ../OpenPGP-SDK
-./configure --without-idea --with-openssl=$(readlink -f ../openssl-$OPENSSL_VERSION)
-make
-cp -vR include/ "$PREFIX/"
-cp -vR lib/ "$PREFIX/"
-
-
View
@@ -14,7 +14,7 @@ BOOST_LDFLAGS_ALL = $(BOOST_THREAD_LDFLAGS) \
$(BOOST_SYSTEM_LDFLAGS) $(BOOST_REGEX_LDFLAGS) \
$(BOOST_STRING_ALGO_LDFLAGS)
-AM_CPPFLAGS = $(AM_CFLAGS) $(BOOST_CPPFLAGS)
+AM_CPPFLAGS = $(AM_CFLAGS) $(BOOST_CPPFLAGS)
AM_LDFLAGS = $(BOOST_LDFLAGS_ALL) -Wl,--gc-sections
if BUILD_WIN32
View
@@ -6,6 +6,9 @@
/* Define to 1 if you have <boost/algorithm/string.hpp> */
#undef HAVE_BOOST_ALGORITHM_STRING_HPP
+/* Define to 1 if you have <boost/bind.hpp> */
+#undef HAVE_BOOST_BIND_HPP
+
/* Define to 1 if you have <boost/filesystem/path.hpp> */
#undef HAVE_BOOST_FILESYSTEM_PATH_HPP
@@ -52,6 +55,9 @@
*/
#undef LT_OBJDIR
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+#undef NO_MINUS_C_MINUS_O
+
/* Name of package */
#undef PACKAGE
View
@@ -40,7 +40,7 @@ PKG_CHECK_MODULES([DEPS], [openssl = 0.9.8r, QtCore >= 4, libminiupnpc,
libretroshare, libbitdht, libgpgme,
jansson, gio-2.0])
-BOOST_REQUIRE
+BOOST_REQUIRE([1.42])
BOOST_SYSTEM
BOOST_FILESYSTEM
BOOST_THREADS
@@ -99,9 +99,11 @@ void __output_DirDetails_DIR_as_json(evhttp_request* req, void* ref, json_t* jro
evhttp_add_header(headers, "Content-Type", "text/plain");
evhttp_send_reply(req, 200, "OK", resp);
evbuffer_free(resp);
-
}
+void __map_rsweb_url_to_local_file(std::string url, std::string& file_url) {
+
+}
};
@@ -28,7 +28,12 @@ void ep_static_files(evhttp_request* req) {
struct evbuffer* outbuf = evhttp_request_get_output_buffer(req);
evbuffer_add_file(outbuf, file_fd, 0, fs::file_size(fs_path));
+#if BOOST_FILESYSTEM_VERSION == 3
const std::string filename = fs_path.filename().string();
+#else
+ const std::string filename = fs_path.filename();
+#endif
+
const char* mime = "text/plain";
if(boost::ends_with(filename, ".js")) mime = "application/ecmascript";
else if(boost::ends_with(filename, ".html")) mime = "text/html";
View
@@ -45,7 +45,8 @@ namespace rsweb {
// modify trust relationship with a given identity
entrypoint_rx("^/friend/add$",
ep_friend_add),
-
+ entrypoint_rx("^/friends/add$",
+ ep_friend_add),
// {{{
// lists available profiles and gpg identities
entrypoint_rx("^/(my/)?profiles$",
@@ -71,7 +72,7 @@ namespace rsweb {
// only for browsing files
// downloads must be initiated explicitly
- entrypoint_rx("^(?<_>/file_sharing/)(?<uid>[a-f0-9]{32,40})",
+ entrypoint_rx("^(?<_>/files/)(?<uid>[a-f0-9]{32,40})",
ep_file_share_browse),
// {{{
View
@@ -16,8 +16,8 @@
RS.UI.friend_list($('#friend_list'));
RS.UI.chat_input($('#chat_input'));
RS.UI.tabbed_chat_output($("#chat_output"));
- $("#add_friends").click(RS.UI.popup_overlay(RS.UI.add_friends_form()));;
-
+ $("#add_friends").click(function() { $('#add_friends_dialog').dialog(); });
+
RS.Identities.monitor_known_idents(RS.UI.trigger_ident_change);
RS.Chat.monitor_chat_queues(RS.UI.trigger_chat_incoming);
});</script>
@@ -36,7 +36,18 @@
<div id="right">
<input type="button" value="Add Friends" id="add_friends" />
+ <div id="add_friends_dialog" style="display:none" title="Add Friends">
+ <form method="POST" action="/friend/add">
+ <label>
+ <p>
+ Paste keys in here
+ </p>
+ <textarea name="cert"></textarea>
+ </label>
+ <input type="submit" value="Add Friends"/>
+ </form>
+ </div>
<ol id="friend_list">
<div id="ident_edit_panel_template"
class="pop-out-panel template">
View
@@ -256,7 +256,6 @@ RS.UI = {
// add a click handler that will pop up
// a panel to allow editing of trust relationships
// with people you already know
- console.log('click');console.log(el);
el.click(RS.UI.ident_edit_panel);
}
@@ -289,7 +288,6 @@ RS.UI = {
jQuery.each(newlist, function (index, ident) {
// FIXME: make a proper equals() operator for idents
if(!(index in oldlist) || oldlist[index]['connect_state'] != ident['connect_state']) {
- console.log([index, index in oldlist, oldlist[index], newlist[index]]);
var existing = $('.rs-ssl-id_' + index);
existing.each(function(i){ RS.UI.ident_label($(this), ident);});
}
@@ -318,6 +316,10 @@ RS.UI = {
anch.attr('href', '#');
return $('<li/>').append(anch).appendTo(elem);
},
+
+ popup_overlay: function(elem) {
+ return $(elem).dialog();
+ },
};

0 comments on commit de40038

Please sign in to comment.