[mirotalksfu] - typo + UI
هذا الالتزام موجود في:
@@ -87,15 +87,15 @@ const dir = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// html views
|
// html views
|
||||||
const view = {
|
const views = {
|
||||||
about: path.join(__dirname, '../../', 'public/view/about.html'),
|
about: path.join(__dirname, '../../', 'public/views/about.html'),
|
||||||
landing: path.join(__dirname, '../../', 'public/view/landing.html'),
|
landing: path.join(__dirname, '../../', 'public/views/landing.html'),
|
||||||
login: path.join(__dirname, '../../', 'public/view/login.html'),
|
login: path.join(__dirname, '../../', 'public/views/login.html'),
|
||||||
newRoom: path.join(__dirname, '../../', 'public/view/newroom.html'),
|
newRoom: path.join(__dirname, '../../', 'public/views/newroom.html'),
|
||||||
notFound: path.join(__dirname, '../../', 'public/view/404.html'),
|
notFound: path.join(__dirname, '../../', 'public/views/404.html'),
|
||||||
permission: path.join(__dirname, '../../', 'public/view/permission.html'),
|
permission: path.join(__dirname, '../../', 'public/views/permission.html'),
|
||||||
privacy: path.join(__dirname, '../../', 'public/view/privacy.html'),
|
privacy: path.join(__dirname, '../../', 'public/views/privacy.html'),
|
||||||
room: path.join(__dirname, '../../', 'public/view/Room.html'),
|
room: path.join(__dirname, '../../', 'public/views/Room.html'),
|
||||||
};
|
};
|
||||||
|
|
||||||
app.use(cors());
|
app.use(cors());
|
||||||
@@ -126,9 +126,9 @@ app.use((err, req, res, next) => {
|
|||||||
app.get(['/'], (req, res) => {
|
app.get(['/'], (req, res) => {
|
||||||
if (hostCfg.protected == true) {
|
if (hostCfg.protected == true) {
|
||||||
hostCfg.authenticated = false;
|
hostCfg.authenticated = false;
|
||||||
res.sendFile(view.login);
|
res.sendFile(views.login);
|
||||||
} else {
|
} else {
|
||||||
res.sendFile(view.landing);
|
res.sendFile(views.landing);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -142,11 +142,11 @@ app.get(['/login'], (req, res) => {
|
|||||||
hostCfg.authenticated = true;
|
hostCfg.authenticated = true;
|
||||||
authHost = new Host(ip, true);
|
authHost = new Host(ip, true);
|
||||||
log.debug('LOGIN OK', { ip: ip, authorized: authHost.isAuthorized(ip) });
|
log.debug('LOGIN OK', { ip: ip, authorized: authHost.isAuthorized(ip) });
|
||||||
res.sendFile(view.landing);
|
res.sendFile(views.landing);
|
||||||
} else {
|
} else {
|
||||||
log.debug('LOGIN KO', { ip: ip, authorized: false });
|
log.debug('LOGIN KO', { ip: ip, authorized: false });
|
||||||
hostCfg.authenticated = false;
|
hostCfg.authenticated = false;
|
||||||
res.sendFile(view.login);
|
res.sendFile(views.login);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
res.redirect('/');
|
res.redirect('/');
|
||||||
@@ -158,13 +158,13 @@ app.get(['/newroom'], (req, res) => {
|
|||||||
if (hostCfg.protected == true) {
|
if (hostCfg.protected == true) {
|
||||||
let ip = getIP(req);
|
let ip = getIP(req);
|
||||||
if (allowedIP(ip)) {
|
if (allowedIP(ip)) {
|
||||||
res.sendFile(view.newRoom);
|
res.sendFile(views.newRoom);
|
||||||
} else {
|
} else {
|
||||||
hostCfg.authenticated = false;
|
hostCfg.authenticated = false;
|
||||||
res.sendFile(view.login);
|
res.sendFile(views.login);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
res.sendFile(view.newRoom);
|
res.sendFile(views.newRoom);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -175,7 +175,7 @@ app.get('/join/', (req, res) => {
|
|||||||
// http://localhost:3010/join?room=test&name=mirotalksfu&audio=1&video=1&screen=1¬ify=1
|
// http://localhost:3010/join?room=test&name=mirotalksfu&audio=1&video=1&screen=1¬ify=1
|
||||||
const { room, name, audio, video, screen, notify } = req.query;
|
const { room, name, audio, video, screen, notify } = req.query;
|
||||||
if (room && name && audio && video && screen && notify) {
|
if (room && name && audio && video && screen && notify) {
|
||||||
return res.sendFile(view.room);
|
return res.sendFile(views.room);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
res.redirect('/');
|
res.redirect('/');
|
||||||
@@ -184,7 +184,7 @@ app.get('/join/', (req, res) => {
|
|||||||
// join room
|
// join room
|
||||||
app.get('/join/*', (req, res) => {
|
app.get('/join/*', (req, res) => {
|
||||||
if (hostCfg.authenticated) {
|
if (hostCfg.authenticated) {
|
||||||
res.sendFile(view.room);
|
res.sendFile(views.room);
|
||||||
} else {
|
} else {
|
||||||
res.redirect('/');
|
res.redirect('/');
|
||||||
}
|
}
|
||||||
@@ -192,17 +192,17 @@ app.get('/join/*', (req, res) => {
|
|||||||
|
|
||||||
// if not allow video/audio
|
// if not allow video/audio
|
||||||
app.get(['/permission'], (req, res) => {
|
app.get(['/permission'], (req, res) => {
|
||||||
res.sendFile(view.permission);
|
res.sendFile(views.permission);
|
||||||
});
|
});
|
||||||
|
|
||||||
// privacy policy
|
// privacy policy
|
||||||
app.get(['/privacy'], (req, res) => {
|
app.get(['/privacy'], (req, res) => {
|
||||||
res.sendFile(view.privacy);
|
res.sendFile(views.privacy);
|
||||||
});
|
});
|
||||||
|
|
||||||
// mirotalk about
|
// mirotalk about
|
||||||
app.get(['/about'], (req, res) => {
|
app.get(['/about'], (req, res) => {
|
||||||
res.sendFile(view.about);
|
res.sendFile(views.about);
|
||||||
});
|
});
|
||||||
|
|
||||||
// ####################################################
|
// ####################################################
|
||||||
@@ -261,7 +261,7 @@ app.post(['/api/v1/join'], (req, res) => {
|
|||||||
|
|
||||||
// not match any of page before, so 404 not found
|
// not match any of page before, so 404 not found
|
||||||
app.get('*', function (req, res) {
|
app.get('*', function (req, res) {
|
||||||
res.sendFile(view.notFound);
|
res.sendFile(views.notFound);
|
||||||
});
|
});
|
||||||
|
|
||||||
// ####################################################
|
// ####################################################
|
||||||
|
|||||||
@@ -31,6 +31,10 @@
|
|||||||
animation: show 0.4s ease;
|
animation: show 0.4s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.Camera:hover {
|
||||||
|
border: 3px solid rgb(113, 157, 239);
|
||||||
|
}
|
||||||
|
|
||||||
#videoMediaContainer i {
|
#videoMediaContainer i {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
display: none;
|
display: none;
|
||||||
|
|||||||
المرجع في مشكلة جديدة
حظر مستخدم