Git Product home page Git Product logo

win10-ui's Introduction

Hi there 👋

🍓 About Me

  • 🔭 主要使用: Typescript, html
  • 📫 E-mail: [email protected]
  • 👯 About me: web/misc 方向
  • 🌐 Languages: English, 中文

❄️ Skills

🎄 Others

win10-ui's People

Contributors

mryan2005 avatar yuri2peter avatar yuri3peter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

win10-ui's Issues

我帮你优化的一个细节

_startAnimate:function () {
    setInterval(function () {
        var classes_lenth=Win10._animated_classes.length;
        var animated_liveness=Win10._animated_liveness;
        if(animated_liveness===0 || classes_lenth===0 || !$("#win10-menu").hasClass('opened')){return;}
        $('#win10-menu>.blocks>.menu_group>.block').each(function () {
            if(!$(this).hasClass('onAnimate') && Math.random()<=animated_liveness){
                var that=$(this);
                var class_animate = Win10._animated_classes[Math.floor((Math.random()*classes_lenth))];
                 **# that.css('zIndex',999);**
                that.addClass('onAnimate');
                setTimeout(function () {
                    that.addClass(class_animate);
                    setTimeout(function () {
                        that.removeClass('onAnimate');
                        that.removeClass(class_animate);
                        **# that.css('zIndex',1);**
                    },3000);
                },Math.random()*100)
            }
        })
    },100);
},

iframe参数问题

Some thoughts on this project

It's an amazing project! To make it better, here I sincerely provide some tips:

  1. Keep it a pure JavaScript project, and leave out well-defined APIs (e.g., file read/write/upload/download, open with...);
  2. Borrow some useful features from KodExplorer, especially Markdown and LaTeX rendering support;
  3. System command support for NAS and web server panel use.

[TODO]关闭回调功能实现

尝试写了下关闭回调的功能,作者若不嫌弃,可参考,代码如下

$.extend(Win10, {
    exit: function (params) {
        var opts = {
            msg_zh: '确定要关闭本页面吗?',
            msg_en: 'Are you sure you want to close this page?',
            callback: function(index){
                window.location.href="about:blank";
                window.close();
                layer.close(index);
                layer.alert(Win10.lang('哎呀,好像失败了呢。','Ops...There seems to be a little problem.'), {
                    skin: 'layui-layer-lan'
                    ,closeBtn: 0
                });
            }
        };
        if (params){
        	if (typeof(params)=='function'){
	            opts.callback = params;
	        }else{
	            opts = $.extend(opts, params);
	        }
        }
        layer.confirm(Win10.lang(opts.msg_zh, opts.msg_en), {icon: 3, title:Win10.lang('提示','Prompt')}, function(index){
            document.body.onbeforeunload = function(){};
            opts.callback(index);
        });
    }
})

调用方法:

<div class="item"
     onclick="Win10.exit(function(index){
         window.location.href = 'login.html';
     })">
    <i class="black icon fa fa-power-off fa-fw"></i><span class="title">关闭</span>
</div>

<div class="item"
     onclick="Win10.exit({callback: function(index){
         window.location.href = 'login.html';
     }})">
    <i class="black icon fa fa-power-off fa-fw"></i><span class="title">关闭</span>
</div>

<div class="item"
     onclick="Win10.exit()">
    <i class="black icon fa fa-power-off fa-fw"></i><span class="title">关闭</span>
</div>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.