1
0
mirror of https://github.com/citizenfx/cfx-server-data.git synced 2025-01-11 00:03:18 +08:00
cfx-server-data/resources/[system]/chat/html/index.html

109 lines
3.3 KiB
HTML
Raw Normal View History

2017-05-18 01:22:20 +08:00
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
2017-05-21 22:52:55 +08:00
<link href="vendor/latofonts.css" rel="stylesheet">
<link href="vendor/flexboxgrid.6.3.1.min.css" rel="stylesheet"></link>
<link href="vendor/animate.3.5.2.min.css" rel="stylesheet"></link>
<link href="index.css" rel="stylesheet"></link>
2017-05-21 23:02:31 +08:00
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js" type="text/javascript"></script> -->
2017-05-21 22:52:55 +08:00
2017-05-21 23:02:31 +08:00
<script src="nui://game/ui/jquery.js" type="text/javascript"></script>
2017-05-21 22:52:55 +08:00
<script src="vendor/vue.2.3.3.min.js" type="text/javascript"></script>
<script src="config.default.js" type="text/javascript"></script>
2017-05-21 23:02:31 +08:00
<script src="config.js" type="text/javascript"></script>
2017-05-18 01:22:20 +08:00
</head>
<body>
<div id="app"></div>
<!-- App Template -->
<script type="text/x-template" id="app_template">
<div id="app">
<div class="chat-window" :class="{ 'fadeOut animated': !showWindow }">
<div class="chat-messages" ref="messages">
<message v-for="msg in messages"
2017-05-21 22:52:55 +08:00
:templates="templates"
2017-05-18 01:22:20 +08:00
:multiline="msg.multiline"
:args="msg.args"
2017-05-21 22:52:55 +08:00
:color="msg.color"
2017-05-18 01:22:20 +08:00
:template="msg.template"
2017-05-21 22:52:55 +08:00
:template-id="msg.templateId"
2017-05-18 01:22:20 +08:00
:key="msg">
</message>
</div>
</div>
<div class="chat-input" v-show="showInput">
<span class="prefix"></span>
<textarea v-model="message"
ref="input"
type="text"
autofocus
@keyup.esc="hideInput"
@keyup="keyUp"
@keydown="keyDown"
2017-05-21 22:52:55 +08:00
@keypress.enter.prevent="send">
2017-05-18 01:22:20 +08:00
</textarea>
<suggestions :message="message" :suggestions="suggestions">
</suggestions>
</div>
</div>
</script>
<!-- Message Template -->
<script type="text/x-template" id="message_template">
<div class="msg" :class="{ multiline }">
<span v-html="textEscaped"></span>
</div>
</script>
<!-- Suggestions Template -->
<script type="text/x-template" id="suggestions_template">
<ul class="suggestions" v-show="currentSuggestions.length > 0">
<li class="suggestion" v-for="s in currentSuggestions">
<p>
<span :class="{ 'disabled': s.disabled }">
{{s.name}}
</span>
<span class="param"
v-for="(p, index) in s.params"
:class="{ 'disabled': p.disabled }">
[{{p.name}}]
</span>
</p>
<small class="help">
<template v-if="!s.disabled">
{{s.help}}
</template>
<template v-for="p in s.params" v-if="!p.disabled">
{{p.help}}
</template>
</small>
</li>
</ul>
</script>
<!-- Scripts -->
<script type="text/javascript" src="./Suggestions.js"></script>
<script type="text/javascript" src="./Message.js"></script>
<script type="text/javascript" src="./App.js"></script>
<!-- Main Entry -->
<script type="text/javascript">
const instance = new Vue({
el: '#app',
2017-05-21 22:52:55 +08:00
render: h => h(APP),
2017-05-18 01:22:20 +08:00
});
2017-05-21 22:52:55 +08:00
window.emulate = (type, detail = {}) => {
detail.type = type;
window.dispatchEvent(new CustomEvent('message', {
detail,
}));
};
2017-05-18 01:22:20 +08:00
</script>
</body>
</html>